diff --git a/apps/create-app/.eslintrc.cjs b/apps/create-app/.eslintrc.cjs index b8748f0c..87777cee 100644 --- a/apps/create-app/.eslintrc.cjs +++ b/apps/create-app/.eslintrc.cjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + module.exports = { parser: "@typescript-eslint/parser", parserOptions: { diff --git a/apps/create-app/src/index.ts b/apps/create-app/src/index.ts index 6cb83f9e..8723c363 100644 --- a/apps/create-app/src/index.ts +++ b/apps/create-app/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import path from 'path'; import { execSync } from 'child_process'; diff --git a/apps/demo-fixed-layout-simple/.eslintrc.js b/apps/demo-fixed-layout-simple/.eslintrc.js index 9f8bd759..8becb8c2 100644 --- a/apps/demo-fixed-layout-simple/.eslintrc.js +++ b/apps/demo-fixed-layout-simple/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-fixed-layout-simple/rsbuild.config.ts b/apps/demo-fixed-layout-simple/rsbuild.config.ts index 4fa8430b..9df97f11 100644 --- a/apps/demo-fixed-layout-simple/rsbuild.config.ts +++ b/apps/demo-fixed-layout-simple/rsbuild.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { pluginReact } from '@rsbuild/plugin-react'; import { defineConfig } from '@rsbuild/core'; diff --git a/apps/demo-fixed-layout-simple/src/app.tsx b/apps/demo-fixed-layout-simple/src/app.tsx index 150c56b5..4e74a311 100644 --- a/apps/demo-fixed-layout-simple/src/app.tsx +++ b/apps/demo-fixed-layout-simple/src/app.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createRoot } from 'react-dom/client'; import { Editor } from './editor'; diff --git a/apps/demo-fixed-layout-simple/src/components/base-node.tsx b/apps/demo-fixed-layout-simple/src/components/base-node.tsx index 45f8cde8..fd0cc22c 100644 --- a/apps/demo-fixed-layout-simple/src/components/base-node.tsx +++ b/apps/demo-fixed-layout-simple/src/components/base-node.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, useNodeRender, useClientContext } from '@flowgram.ai/fixed-layout-editor'; import { IconDeleteStroked } from '@douyinfe/semi-icons'; diff --git a/apps/demo-fixed-layout-simple/src/components/branch-adder.tsx b/apps/demo-fixed-layout-simple/src/components/branch-adder.tsx index 2b16e017..e7f7d95e 100644 --- a/apps/demo-fixed-layout-simple/src/components/branch-adder.tsx +++ b/apps/demo-fixed-layout-simple/src/components/branch-adder.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { type FlowNodeEntity, useClientContext } from '@flowgram.ai/fixed-layout-editor'; import { IconPlus } from '@douyinfe/semi-icons'; diff --git a/apps/demo-fixed-layout-simple/src/components/flow-select.tsx b/apps/demo-fixed-layout-simple/src/components/flow-select.tsx index 834e8bc0..e87dc26c 100644 --- a/apps/demo-fixed-layout-simple/src/components/flow-select.tsx +++ b/apps/demo-fixed-layout-simple/src/components/flow-select.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState } from 'react'; import { useClientContext, FlowLayoutDefault } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout-simple/src/components/minimap.tsx b/apps/demo-fixed-layout-simple/src/components/minimap.tsx index 6e481681..5ab5ac30 100644 --- a/apps/demo-fixed-layout-simple/src/components/minimap.tsx +++ b/apps/demo-fixed-layout-simple/src/components/minimap.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowMinimapService, MinimapRender } from '@flowgram.ai/minimap-plugin'; import { useService } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout-simple/src/components/node-adder.tsx b/apps/demo-fixed-layout-simple/src/components/node-adder.tsx index 067f5e01..fb105d32 100644 --- a/apps/demo-fixed-layout-simple/src/components/node-adder.tsx +++ b/apps/demo-fixed-layout-simple/src/components/node-adder.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, FlowOperationService, diff --git a/apps/demo-fixed-layout-simple/src/components/tools.tsx b/apps/demo-fixed-layout-simple/src/components/tools.tsx index 9bf4d630..e3aab16c 100644 --- a/apps/demo-fixed-layout-simple/src/components/tools.tsx +++ b/apps/demo-fixed-layout-simple/src/components/tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState, useCallback } from 'react'; import { usePlaygroundTools, useClientContext, useRefresh } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout-simple/src/data/condition.ts b/apps/demo-fixed-layout-simple/src/data/condition.ts index 657aafa4..469d3cb7 100644 --- a/apps/demo-fixed-layout-simple/src/data/condition.ts +++ b/apps/demo-fixed-layout-simple/src/data/condition.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor'; export const condition: FlowDocumentJSON = { diff --git a/apps/demo-fixed-layout-simple/src/data/dynamicSplit.ts b/apps/demo-fixed-layout-simple/src/data/dynamicSplit.ts index 81fca2fe..95224624 100644 --- a/apps/demo-fixed-layout-simple/src/data/dynamicSplit.ts +++ b/apps/demo-fixed-layout-simple/src/data/dynamicSplit.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor'; export const dynamicSplit: FlowDocumentJSON = { diff --git a/apps/demo-fixed-layout-simple/src/data/index.ts b/apps/demo-fixed-layout-simple/src/data/index.ts index b0556ac5..dee9a1e5 100644 --- a/apps/demo-fixed-layout-simple/src/data/index.ts +++ b/apps/demo-fixed-layout-simple/src/data/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON, FlowLayoutDefault } from '@flowgram.ai/fixed-layout-editor'; import { tryCatch } from './tryCatch'; diff --git a/apps/demo-fixed-layout-simple/src/data/loop.ts b/apps/demo-fixed-layout-simple/src/data/loop.ts index 6d72e3ca..3ffc408e 100644 --- a/apps/demo-fixed-layout-simple/src/data/loop.ts +++ b/apps/demo-fixed-layout-simple/src/data/loop.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor'; export const loop: FlowDocumentJSON = { diff --git a/apps/demo-fixed-layout-simple/src/data/mindmap.ts b/apps/demo-fixed-layout-simple/src/data/mindmap.ts index 756eb49f..4b83278d 100644 --- a/apps/demo-fixed-layout-simple/src/data/mindmap.ts +++ b/apps/demo-fixed-layout-simple/src/data/mindmap.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor'; export const mindmap: FlowDocumentJSON = { diff --git a/apps/demo-fixed-layout-simple/src/data/multiInputs.ts b/apps/demo-fixed-layout-simple/src/data/multiInputs.ts index e1078826..d5ca2fb2 100644 --- a/apps/demo-fixed-layout-simple/src/data/multiInputs.ts +++ b/apps/demo-fixed-layout-simple/src/data/multiInputs.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor'; export const multiInputs: FlowDocumentJSON = { diff --git a/apps/demo-fixed-layout-simple/src/data/multiOutputs.ts b/apps/demo-fixed-layout-simple/src/data/multiOutputs.ts index 666b0344..0e9921c2 100644 --- a/apps/demo-fixed-layout-simple/src/data/multiOutputs.ts +++ b/apps/demo-fixed-layout-simple/src/data/multiOutputs.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor'; export const multiOutputs: FlowDocumentJSON = { diff --git a/apps/demo-fixed-layout-simple/src/data/slots.ts b/apps/demo-fixed-layout-simple/src/data/slots.ts index e69de29b..77723d8d 100644 --- a/apps/demo-fixed-layout-simple/src/data/slots.ts +++ b/apps/demo-fixed-layout-simple/src/data/slots.ts @@ -0,0 +1,5 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + diff --git a/apps/demo-fixed-layout-simple/src/data/tryCatch.ts b/apps/demo-fixed-layout-simple/src/data/tryCatch.ts index e15ecd45..6f57c12c 100644 --- a/apps/demo-fixed-layout-simple/src/data/tryCatch.ts +++ b/apps/demo-fixed-layout-simple/src/data/tryCatch.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor'; export const tryCatch: FlowDocumentJSON = { diff --git a/apps/demo-fixed-layout-simple/src/editor.tsx b/apps/demo-fixed-layout-simple/src/editor.tsx index abcbd01f..c6fa864c 100644 --- a/apps/demo-fixed-layout-simple/src/editor.tsx +++ b/apps/demo-fixed-layout-simple/src/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FixedLayoutEditorProvider, EditorRenderer } from '@flowgram.ai/fixed-layout-editor'; import '@flowgram.ai/fixed-layout-editor/index.css'; diff --git a/apps/demo-fixed-layout-simple/src/hooks/use-editor-props.tsx b/apps/demo-fixed-layout-simple/src/hooks/use-editor-props.tsx index 522fb9f0..5a57c317 100644 --- a/apps/demo-fixed-layout-simple/src/hooks/use-editor-props.tsx +++ b/apps/demo-fixed-layout-simple/src/hooks/use-editor-props.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { createMinimapPlugin } from '@flowgram.ai/minimap-plugin'; diff --git a/apps/demo-fixed-layout-simple/src/index.css b/apps/demo-fixed-layout-simple/src/index.css index 9c32ee85..9e13e5a0 100644 --- a/apps/demo-fixed-layout-simple/src/index.css +++ b/apps/demo-fixed-layout-simple/src/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .demo-fixed-node { align-items: flex-start; background-color: #fff; diff --git a/apps/demo-fixed-layout-simple/src/index.ts b/apps/demo-fixed-layout-simple/src/index.ts index 5137584d..5b720e90 100644 --- a/apps/demo-fixed-layout-simple/src/index.ts +++ b/apps/demo-fixed-layout-simple/src/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Editor as DemoFixedLayout } from './editor'; diff --git a/apps/demo-fixed-layout-simple/src/initial-data.ts b/apps/demo-fixed-layout-simple/src/initial-data.ts index 7e29a1e1..694832ee 100644 --- a/apps/demo-fixed-layout-simple/src/initial-data.ts +++ b/apps/demo-fixed-layout-simple/src/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor'; import { condition as conditionDemo } from './data/condition'; diff --git a/apps/demo-fixed-layout-simple/src/node-registries.ts b/apps/demo-fixed-layout-simple/src/node-registries.ts index 7e24f600..8fd57443 100644 --- a/apps/demo-fixed-layout-simple/src/node-registries.ts +++ b/apps/demo-fixed-layout-simple/src/node-registries.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/.eslintrc.js b/apps/demo-fixed-layout/.eslintrc.js index 9f8bd759..8becb8c2 100644 --- a/apps/demo-fixed-layout/.eslintrc.js +++ b/apps/demo-fixed-layout/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-fixed-layout/rsbuild.config.ts b/apps/demo-fixed-layout/rsbuild.config.ts index 02109b3c..b7af376e 100644 --- a/apps/demo-fixed-layout/rsbuild.config.ts +++ b/apps/demo-fixed-layout/rsbuild.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { pluginReact } from '@rsbuild/plugin-react'; import { pluginLess } from '@rsbuild/plugin-less'; import { defineConfig } from '@rsbuild/core'; diff --git a/apps/demo-fixed-layout/src/app.tsx b/apps/demo-fixed-layout/src/app.tsx index 150c56b5..4e74a311 100644 --- a/apps/demo-fixed-layout/src/app.tsx +++ b/apps/demo-fixed-layout/src/app.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createRoot } from 'react-dom/client'; import { Editor } from './editor'; diff --git a/apps/demo-fixed-layout/src/assets/icon-mouse.tsx b/apps/demo-fixed-layout/src/assets/icon-mouse.tsx index c79519de..fd46edcf 100644 --- a/apps/demo-fixed-layout/src/assets/icon-mouse.tsx +++ b/apps/demo-fixed-layout/src/assets/icon-mouse.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function MouseIcon() { return ( diff --git a/apps/demo-fixed-layout/src/assets/icon-pad.tsx b/apps/demo-fixed-layout/src/assets/icon-pad.tsx index 4ca84893..374d1070 100644 --- a/apps/demo-fixed-layout/src/assets/icon-pad.tsx +++ b/apps/demo-fixed-layout/src/assets/icon-pad.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function PadIcon() { return ( diff --git a/apps/demo-fixed-layout/src/components/base-node/index.tsx b/apps/demo-fixed-layout/src/components/base-node/index.tsx index 99b0d212..7a839dde 100644 --- a/apps/demo-fixed-layout/src/components/base-node/index.tsx +++ b/apps/demo-fixed-layout/src/components/base-node/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useContext } from 'react'; import { FlowNodeEntity, useNodeRender } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/components/base-node/styles.tsx b/apps/demo-fixed-layout/src/components/base-node/styles.tsx index 1d7849af..3fabcb70 100644 --- a/apps/demo-fixed-layout/src/components/base-node/styles.tsx +++ b/apps/demo-fixed-layout/src/components/base-node/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { IconInfoCircle } from '@douyinfe/semi-icons'; diff --git a/apps/demo-fixed-layout/src/components/branch-adder/index.tsx b/apps/demo-fixed-layout/src/components/branch-adder/index.tsx index 423fc883..89b9dcbf 100644 --- a/apps/demo-fixed-layout/src/components/branch-adder/index.tsx +++ b/apps/demo-fixed-layout/src/components/branch-adder/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeEntity, useClientContext } from '@flowgram.ai/fixed-layout-editor'; import { IconPlus } from '@douyinfe/semi-icons'; diff --git a/apps/demo-fixed-layout/src/components/branch-adder/styles.tsx b/apps/demo-fixed-layout/src/components/branch-adder/styles.tsx index 7d8546ba..c50d4cd5 100644 --- a/apps/demo-fixed-layout/src/components/branch-adder/styles.tsx +++ b/apps/demo-fixed-layout/src/components/branch-adder/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Container = styled.div<{ activated?: boolean; isVertical: boolean }>` diff --git a/apps/demo-fixed-layout/src/components/drag-node/index.tsx b/apps/demo-fixed-layout/src/components/drag-node/index.tsx index ab96a8f2..8671071c 100644 --- a/apps/demo-fixed-layout/src/components/drag-node/index.tsx +++ b/apps/demo-fixed-layout/src/components/drag-node/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { FlowNodeEntity } from '@flowgram.ai/fixed-layout-editor'; import { FlowNodeRegistries } from '../../nodes'; diff --git a/apps/demo-fixed-layout/src/components/drag-node/styles.tsx b/apps/demo-fixed-layout/src/components/drag-node/styles.tsx index dc232ab4..1e47bc48 100644 --- a/apps/demo-fixed-layout/src/components/drag-node/styles.tsx +++ b/apps/demo-fixed-layout/src/components/drag-node/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; const primary = 'hsl(252 62% 54.9%)'; diff --git a/apps/demo-fixed-layout/src/components/index.ts b/apps/demo-fixed-layout/src/components/index.ts index 21c61c06..b5a1185f 100644 --- a/apps/demo-fixed-layout/src/components/index.ts +++ b/apps/demo-fixed-layout/src/components/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { DemoTools } from './tools'; export { DragNode } from './drag-node'; diff --git a/apps/demo-fixed-layout/src/components/node-adder/index.tsx b/apps/demo-fixed-layout/src/components/node-adder/index.tsx index c8421a61..4f3aa984 100644 --- a/apps/demo-fixed-layout/src/components/node-adder/index.tsx +++ b/apps/demo-fixed-layout/src/components/node-adder/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useMemo, useState } from 'react'; import { useClientContext } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/components/node-adder/styles.tsx b/apps/demo-fixed-layout/src/components/node-adder/styles.tsx index 63578381..60b0aa81 100644 --- a/apps/demo-fixed-layout/src/components/node-adder/styles.tsx +++ b/apps/demo-fixed-layout/src/components/node-adder/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const PasteIcon = styled.div` diff --git a/apps/demo-fixed-layout/src/components/node-adder/utils.ts b/apps/demo-fixed-layout/src/components/node-adder/utils.ts index fd0565fa..0cbf11a9 100644 --- a/apps/demo-fixed-layout/src/components/node-adder/utils.ts +++ b/apps/demo-fixed-layout/src/components/node-adder/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeEntity } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/components/node-list.tsx b/apps/demo-fixed-layout/src/components/node-list.tsx index bb575f36..4c42c79e 100644 --- a/apps/demo-fixed-layout/src/components/node-list.tsx +++ b/apps/demo-fixed-layout/src/components/node-list.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { FlowNodeEntity, diff --git a/apps/demo-fixed-layout/src/components/selector-box-popover/index.tsx b/apps/demo-fixed-layout/src/components/selector-box-popover/index.tsx index d1235067..dfd69743 100644 --- a/apps/demo-fixed-layout/src/components/selector-box-popover/index.tsx +++ b/apps/demo-fixed-layout/src/components/selector-box-popover/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FunctionComponent, useMemo } from 'react'; import { diff --git a/apps/demo-fixed-layout/src/components/sidebar/index.tsx b/apps/demo-fixed-layout/src/components/sidebar/index.tsx index 2afd32dc..ab8a549c 100644 --- a/apps/demo-fixed-layout/src/components/sidebar/index.tsx +++ b/apps/demo-fixed-layout/src/components/sidebar/index.tsx @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { SidebarProvider } from './sidebar-provider'; export { SidebarRenderer } from './sidebar-renderer'; diff --git a/apps/demo-fixed-layout/src/components/sidebar/sidebar-node-renderer.tsx b/apps/demo-fixed-layout/src/components/sidebar/sidebar-node-renderer.tsx index 5ff469d0..4c277854 100644 --- a/apps/demo-fixed-layout/src/components/sidebar/sidebar-node-renderer.tsx +++ b/apps/demo-fixed-layout/src/components/sidebar/sidebar-node-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useNodeRender, FlowNodeEntity } from '@flowgram.ai/fixed-layout-editor'; import { NodeRenderContext } from '../../context'; diff --git a/apps/demo-fixed-layout/src/components/sidebar/sidebar-provider.tsx b/apps/demo-fixed-layout/src/components/sidebar/sidebar-provider.tsx index fb9efe70..70c9f079 100644 --- a/apps/demo-fixed-layout/src/components/sidebar/sidebar-provider.tsx +++ b/apps/demo-fixed-layout/src/components/sidebar/sidebar-provider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { SidebarContext } from '../../context'; diff --git a/apps/demo-fixed-layout/src/components/sidebar/sidebar-renderer.tsx b/apps/demo-fixed-layout/src/components/sidebar/sidebar-renderer.tsx index 087b5927..bf5478e3 100644 --- a/apps/demo-fixed-layout/src/components/sidebar/sidebar-renderer.tsx +++ b/apps/demo-fixed-layout/src/components/sidebar/sidebar-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useContext, useEffect, useMemo } from 'react'; import { diff --git a/apps/demo-fixed-layout/src/components/tools/fit-view.tsx b/apps/demo-fixed-layout/src/components/tools/fit-view.tsx index c205aafd..831b60fe 100644 --- a/apps/demo-fixed-layout/src/components/tools/fit-view.tsx +++ b/apps/demo-fixed-layout/src/components/tools/fit-view.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IconButton, Tooltip } from '@douyinfe/semi-ui'; import { IconExpand } from '@douyinfe/semi-icons'; diff --git a/apps/demo-fixed-layout/src/components/tools/index.tsx b/apps/demo-fixed-layout/src/components/tools/index.tsx index 6aef2d1f..18d31fc0 100644 --- a/apps/demo-fixed-layout/src/components/tools/index.tsx +++ b/apps/demo-fixed-layout/src/components/tools/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState, useEffect } from 'react'; import { usePlayground, usePlaygroundTools, useRefresh } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/components/tools/minimap-switch.tsx b/apps/demo-fixed-layout/src/components/tools/minimap-switch.tsx index 6c7ee6cd..4ebfbbbc 100644 --- a/apps/demo-fixed-layout/src/components/tools/minimap-switch.tsx +++ b/apps/demo-fixed-layout/src/components/tools/minimap-switch.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Tooltip, IconButton } from '@douyinfe/semi-ui'; import { IconGridRectangle } from '@douyinfe/semi-icons'; diff --git a/apps/demo-fixed-layout/src/components/tools/minimap.tsx b/apps/demo-fixed-layout/src/components/tools/minimap.tsx index 100640ab..e0231da3 100644 --- a/apps/demo-fixed-layout/src/components/tools/minimap.tsx +++ b/apps/demo-fixed-layout/src/components/tools/minimap.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowMinimapService, MinimapRender } from '@flowgram.ai/minimap-plugin'; import { useService } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/components/tools/readonly.tsx b/apps/demo-fixed-layout/src/components/tools/readonly.tsx index c231dc8c..0f176921 100644 --- a/apps/demo-fixed-layout/src/components/tools/readonly.tsx +++ b/apps/demo-fixed-layout/src/components/tools/readonly.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback } from 'react'; import { usePlayground } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/components/tools/run.tsx b/apps/demo-fixed-layout/src/components/tools/run.tsx index d394aa98..84155572 100644 --- a/apps/demo-fixed-layout/src/components/tools/run.tsx +++ b/apps/demo-fixed-layout/src/components/tools/run.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { diff --git a/apps/demo-fixed-layout/src/components/tools/save.tsx b/apps/demo-fixed-layout/src/components/tools/save.tsx index 7edf72f0..6f5a1b85 100644 --- a/apps/demo-fixed-layout/src/components/tools/save.tsx +++ b/apps/demo-fixed-layout/src/components/tools/save.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState, useEffect, useCallback } from 'react'; import { useClientContext, getNodeForm, FlowNodeEntity } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/components/tools/styles.tsx b/apps/demo-fixed-layout/src/components/tools/styles.tsx index 0bb1701b..e7e7d490 100644 --- a/apps/demo-fixed-layout/src/components/tools/styles.tsx +++ b/apps/demo-fixed-layout/src/components/tools/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const ToolContainer = styled.div` diff --git a/apps/demo-fixed-layout/src/components/tools/switch-vertical.tsx b/apps/demo-fixed-layout/src/components/tools/switch-vertical.tsx index 6ae57ebf..f732393d 100644 --- a/apps/demo-fixed-layout/src/components/tools/switch-vertical.tsx +++ b/apps/demo-fixed-layout/src/components/tools/switch-vertical.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { usePlaygroundTools } from '@flowgram.ai/fixed-layout-editor'; import { Button, Tooltip } from '@douyinfe/semi-ui'; import { IconServer } from '@douyinfe/semi-icons'; diff --git a/apps/demo-fixed-layout/src/components/tools/zoom-select.tsx b/apps/demo-fixed-layout/src/components/tools/zoom-select.tsx index 6528b7a3..f93db04b 100644 --- a/apps/demo-fixed-layout/src/components/tools/zoom-select.tsx +++ b/apps/demo-fixed-layout/src/components/tools/zoom-select.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { usePlaygroundTools } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/context/index.ts b/apps/demo-fixed-layout/src/context/index.ts index ca6c0067..9a623a6e 100644 --- a/apps/demo-fixed-layout/src/context/index.ts +++ b/apps/demo-fixed-layout/src/context/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { NodeRenderContext } from './node-render-context'; export { SidebarContext, IsSidebarContext } from './sidebar-context'; diff --git a/apps/demo-fixed-layout/src/context/node-render-context.ts b/apps/demo-fixed-layout/src/context/node-render-context.ts index 69bda127..5c2a7ee2 100644 --- a/apps/demo-fixed-layout/src/context/node-render-context.ts +++ b/apps/demo-fixed-layout/src/context/node-render-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { type NodeRenderReturnType } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/context/sidebar-context.ts b/apps/demo-fixed-layout/src/context/sidebar-context.ts index 4f8f3158..b10a9b62 100644 --- a/apps/demo-fixed-layout/src/context/sidebar-context.ts +++ b/apps/demo-fixed-layout/src/context/sidebar-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export const SidebarContext = React.createContext<{ diff --git a/apps/demo-fixed-layout/src/editor.tsx b/apps/demo-fixed-layout/src/editor.tsx index a314aa87..95ed06c1 100644 --- a/apps/demo-fixed-layout/src/editor.tsx +++ b/apps/demo-fixed-layout/src/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EditorRenderer, FixedLayoutEditorProvider } from '@flowgram.ai/fixed-layout-editor'; import { FlowNodeRegistries } from './nodes'; diff --git a/apps/demo-fixed-layout/src/form-components/feedback.tsx b/apps/demo-fixed-layout/src/form-components/feedback.tsx index 2000300e..d96ce634 100644 --- a/apps/demo-fixed-layout/src/form-components/feedback.tsx +++ b/apps/demo-fixed-layout/src/form-components/feedback.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { FieldError, FieldState, FieldWarning } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/form-components/form-content/index.tsx b/apps/demo-fixed-layout/src/form-components/form-content/index.tsx index 78b937a5..cf9204f0 100644 --- a/apps/demo-fixed-layout/src/form-components/form-content/index.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-content/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { FlowNodeRegistry } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/form-components/form-content/styles.tsx b/apps/demo-fixed-layout/src/form-components/form-content/styles.tsx index 18528132..e67ca485 100644 --- a/apps/demo-fixed-layout/src/form-components/form-content/styles.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-content/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const FormWrapper = styled.div` diff --git a/apps/demo-fixed-layout/src/form-components/form-header/index.tsx b/apps/demo-fixed-layout/src/form-components/form-header/index.tsx index 35f392af..a43c65a7 100644 --- a/apps/demo-fixed-layout/src/form-components/form-header/index.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-header/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext, useCallback, useMemo, useState } from 'react'; import { useClientContext } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/form-components/form-header/styles.tsx b/apps/demo-fixed-layout/src/form-components/form-header/styles.tsx index fb133a81..61923f1f 100644 --- a/apps/demo-fixed-layout/src/form-components/form-header/styles.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-header/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Header = styled.div` diff --git a/apps/demo-fixed-layout/src/form-components/form-header/title-input.tsx b/apps/demo-fixed-layout/src/form-components/form-header/title-input.tsx index 5793bc36..1e040fc5 100644 --- a/apps/demo-fixed-layout/src/form-components/form-header/title-input.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-header/title-input.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useRef, useEffect } from 'react'; import { Field, FieldRenderProps } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/form-components/form-header/utils.tsx b/apps/demo-fixed-layout/src/form-components/form-header/utils.tsx index d8232143..d4a25540 100644 --- a/apps/demo-fixed-layout/src/form-components/form-header/utils.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-header/utils.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeEntity } from '@flowgram.ai/fixed-layout-editor'; import { FlowNodeRegistry } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/form-components/form-inputs/index.tsx b/apps/demo-fixed-layout/src/form-components/form-inputs/index.tsx index 58ecbcc5..be3138db 100644 --- a/apps/demo-fixed-layout/src/form-components/form-inputs/index.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-inputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DynamicValueInput } from '@flowgram.ai/form-materials'; import { Field } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/form-components/form-inputs/styles.tsx b/apps/demo-fixed-layout/src/form-components/form-inputs/styles.tsx index a92a565e..ce2e80ae 100644 --- a/apps/demo-fixed-layout/src/form-components/form-inputs/styles.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-inputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import styled from 'styled-components'; // TODO diff --git a/apps/demo-fixed-layout/src/form-components/form-item/index.css b/apps/demo-fixed-layout/src/form-components/form-item/index.css index 27b42da0..412bb002 100644 --- a/apps/demo-fixed-layout/src/form-components/form-item/index.css +++ b/apps/demo-fixed-layout/src/form-components/form-item/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .form-item-type-tag { color: inherit; padding: 0 2px; diff --git a/apps/demo-fixed-layout/src/form-components/form-item/index.tsx b/apps/demo-fixed-layout/src/form-components/form-item/index.tsx index 698324e5..dd1208d6 100644 --- a/apps/demo-fixed-layout/src/form-components/form-item/index.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-item/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback } from 'react'; import { Typography, Tooltip } from '@douyinfe/semi-ui'; diff --git a/apps/demo-fixed-layout/src/form-components/form-outputs/index.tsx b/apps/demo-fixed-layout/src/form-components/form-outputs/index.tsx index 953903c2..b6d60aae 100644 --- a/apps/demo-fixed-layout/src/form-components/form-outputs/index.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-outputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field } from '@flowgram.ai/fixed-layout-editor'; import { TypeTag } from '../type-tag'; diff --git a/apps/demo-fixed-layout/src/form-components/form-outputs/styles.tsx b/apps/demo-fixed-layout/src/form-components/form-outputs/styles.tsx index 701c7790..01b9e5b7 100644 --- a/apps/demo-fixed-layout/src/form-components/form-outputs/styles.tsx +++ b/apps/demo-fixed-layout/src/form-components/form-outputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const FormOutputsContainer = styled.div` diff --git a/apps/demo-fixed-layout/src/form-components/index.ts b/apps/demo-fixed-layout/src/form-components/index.ts index 597f3544..78647081 100644 --- a/apps/demo-fixed-layout/src/form-components/index.ts +++ b/apps/demo-fixed-layout/src/form-components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './feedback'; export * from './form-content'; export * from './form-outputs'; diff --git a/apps/demo-fixed-layout/src/form-components/properties-edit/index.tsx b/apps/demo-fixed-layout/src/form-components/properties-edit/index.tsx index 18ea4d81..9f2b8d3d 100644 --- a/apps/demo-fixed-layout/src/form-components/properties-edit/index.tsx +++ b/apps/demo-fixed-layout/src/form-components/properties-edit/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useContext, useState } from 'react'; import { Button } from '@douyinfe/semi-ui'; diff --git a/apps/demo-fixed-layout/src/form-components/properties-edit/property-edit.tsx b/apps/demo-fixed-layout/src/form-components/properties-edit/property-edit.tsx index 654c562a..8801d9f8 100644 --- a/apps/demo-fixed-layout/src/form-components/properties-edit/property-edit.tsx +++ b/apps/demo-fixed-layout/src/form-components/properties-edit/property-edit.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState, useLayoutEffect } from 'react'; import { VariableSelector, TypeSelector, DynamicValueInput } from '@flowgram.ai/form-materials'; diff --git a/apps/demo-fixed-layout/src/form-components/properties-edit/styles.tsx b/apps/demo-fixed-layout/src/form-components/properties-edit/styles.tsx index c2001874..2bb81132 100644 --- a/apps/demo-fixed-layout/src/form-components/properties-edit/styles.tsx +++ b/apps/demo-fixed-layout/src/form-components/properties-edit/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Row = styled.div` diff --git a/apps/demo-fixed-layout/src/form-components/type-tag.tsx b/apps/demo-fixed-layout/src/form-components/type-tag.tsx index 397e7e56..2203c6de 100644 --- a/apps/demo-fixed-layout/src/form-components/type-tag.tsx +++ b/apps/demo-fixed-layout/src/form-components/type-tag.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { VariableTypeIcons, ArrayIcons } from '@flowgram.ai/form-materials'; import { Tag, Tooltip } from '@douyinfe/semi-ui'; diff --git a/apps/demo-fixed-layout/src/form-components/value-display/index.tsx b/apps/demo-fixed-layout/src/form-components/value-display/index.tsx index 2ae631a4..490a3780 100644 --- a/apps/demo-fixed-layout/src/form-components/value-display/index.tsx +++ b/apps/demo-fixed-layout/src/form-components/value-display/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import { TypeTag } from '../type-tag' import { ValueDisplayStyle } from './styles'; diff --git a/apps/demo-fixed-layout/src/form-components/value-display/styles.tsx b/apps/demo-fixed-layout/src/form-components/value-display/styles.tsx index 991e91c2..e55e0c9f 100644 --- a/apps/demo-fixed-layout/src/form-components/value-display/styles.tsx +++ b/apps/demo-fixed-layout/src/form-components/value-display/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const ValueDisplayStyle = styled.div` diff --git a/apps/demo-fixed-layout/src/hooks/index.ts b/apps/demo-fixed-layout/src/hooks/index.ts index f687af19..43aa82d2 100644 --- a/apps/demo-fixed-layout/src/hooks/index.ts +++ b/apps/demo-fixed-layout/src/hooks/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { useEditorProps } from './use-editor-props'; export { useNodeRenderContext } from './use-node-render-context'; export { useIsSidebar } from './use-is-sidebar'; diff --git a/apps/demo-fixed-layout/src/hooks/use-editor-props.ts b/apps/demo-fixed-layout/src/hooks/use-editor-props.ts index 039bbba8..6552bee3 100644 --- a/apps/demo-fixed-layout/src/hooks/use-editor-props.ts +++ b/apps/demo-fixed-layout/src/hooks/use-editor-props.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { debounce } from 'lodash-es'; diff --git a/apps/demo-fixed-layout/src/hooks/use-is-sidebar.ts b/apps/demo-fixed-layout/src/hooks/use-is-sidebar.ts index 65ce37d2..5451b94f 100644 --- a/apps/demo-fixed-layout/src/hooks/use-is-sidebar.ts +++ b/apps/demo-fixed-layout/src/hooks/use-is-sidebar.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext } from 'react'; import { IsSidebarContext } from '../context'; diff --git a/apps/demo-fixed-layout/src/hooks/use-node-render-context.ts b/apps/demo-fixed-layout/src/hooks/use-node-render-context.ts index b529b8c4..69bd9524 100644 --- a/apps/demo-fixed-layout/src/hooks/use-node-render-context.ts +++ b/apps/demo-fixed-layout/src/hooks/use-node-render-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext } from 'react'; import { NodeRenderContext } from '../context'; diff --git a/apps/demo-fixed-layout/src/index.ts b/apps/demo-fixed-layout/src/index.ts index 5137584d..5b720e90 100644 --- a/apps/demo-fixed-layout/src/index.ts +++ b/apps/demo-fixed-layout/src/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Editor as DemoFixedLayout } from './editor'; diff --git a/apps/demo-fixed-layout/src/initial-data.ts b/apps/demo-fixed-layout/src/initial-data.ts index 6046ebfc..f3827a30 100644 --- a/apps/demo-fixed-layout/src/initial-data.ts +++ b/apps/demo-fixed-layout/src/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from './typings'; export const initialData: FlowDocumentJSON = { diff --git a/apps/demo-fixed-layout/src/nodes/break-loop/form-meta.tsx b/apps/demo-fixed-layout/src/nodes/break-loop/form-meta.tsx index c688d805..7f44373d 100644 --- a/apps/demo-fixed-layout/src/nodes/break-loop/form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/break-loop/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormMeta } from '@flowgram.ai/fixed-layout-editor'; import { FormHeader } from '../../form-components'; diff --git a/apps/demo-fixed-layout/src/nodes/break-loop/index.ts b/apps/demo-fixed-layout/src/nodes/break-loop/index.ts index 41f37a33..3f1f7c04 100644 --- a/apps/demo-fixed-layout/src/nodes/break-loop/index.ts +++ b/apps/demo-fixed-layout/src/nodes/break-loop/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/nodes/case-default/form-meta.tsx b/apps/demo-fixed-layout/src/nodes/case-default/form-meta.tsx index d883231a..ecb43f88 100644 --- a/apps/demo-fixed-layout/src/nodes/case-default/form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/case-default/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/fixed-layout-editor'; import { FlowNodeJSON } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/nodes/case-default/index.ts b/apps/demo-fixed-layout/src/nodes/case-default/index.ts index c2f24ef5..5c7232d1 100644 --- a/apps/demo-fixed-layout/src/nodes/case-default/index.ts +++ b/apps/demo-fixed-layout/src/nodes/case-default/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry } from '../../typings'; import iconCase from '../../assets/icon-case.png'; import { formMeta } from './form-meta'; diff --git a/apps/demo-fixed-layout/src/nodes/case/form-meta.tsx b/apps/demo-fixed-layout/src/nodes/case/form-meta.tsx index d883231a..ecb43f88 100644 --- a/apps/demo-fixed-layout/src/nodes/case/form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/case/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/fixed-layout-editor'; import { FlowNodeJSON } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/nodes/case/index.ts b/apps/demo-fixed-layout/src/nodes/case/index.ts index d0e6f95a..f05c4054 100644 --- a/apps/demo-fixed-layout/src/nodes/case/index.ts +++ b/apps/demo-fixed-layout/src/nodes/case/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/nodes/catch-block/form-meta.tsx b/apps/demo-fixed-layout/src/nodes/catch-block/form-meta.tsx index d883231a..ecb43f88 100644 --- a/apps/demo-fixed-layout/src/nodes/catch-block/form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/catch-block/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/fixed-layout-editor'; import { FlowNodeJSON } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/nodes/catch-block/index.ts b/apps/demo-fixed-layout/src/nodes/catch-block/index.ts index e6143445..ba225792 100644 --- a/apps/demo-fixed-layout/src/nodes/catch-block/index.ts +++ b/apps/demo-fixed-layout/src/nodes/catch-block/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/nodes/default-form-meta.tsx b/apps/demo-fixed-layout/src/nodes/default-form-meta.tsx index 159ae870..4915838b 100644 --- a/apps/demo-fixed-layout/src/nodes/default-form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/default-form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { autoRenameRefEffect, provideJsonSchemaOutputs, diff --git a/apps/demo-fixed-layout/src/nodes/end/form-meta.tsx b/apps/demo-fixed-layout/src/nodes/end/form-meta.tsx index 6719f9f1..79df3211 100644 --- a/apps/demo-fixed-layout/src/nodes/end/form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/end/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { mapValues } from 'lodash-es'; import { IFlowValue } from '@flowgram.ai/form-materials'; import { Field, FieldRenderProps, FormMeta } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/nodes/end/index.ts b/apps/demo-fixed-layout/src/nodes/end/index.ts index 2360cd6f..6f08a09a 100644 --- a/apps/demo-fixed-layout/src/nodes/end/index.ts +++ b/apps/demo-fixed-layout/src/nodes/end/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeBaseType } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/nodes/if-block/form-meta.tsx b/apps/demo-fixed-layout/src/nodes/if-block/form-meta.tsx index 45deff81..9b62fe69 100644 --- a/apps/demo-fixed-layout/src/nodes/if-block/form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/if-block/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormRenderProps, FormMeta, Field } from '@flowgram.ai/fixed-layout-editor'; import { FlowNodeJSON } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/nodes/if-block/index.ts b/apps/demo-fixed-layout/src/nodes/if-block/index.ts index b398b5ea..85cdbc87 100644 --- a/apps/demo-fixed-layout/src/nodes/if-block/index.ts +++ b/apps/demo-fixed-layout/src/nodes/if-block/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry } from '../../typings'; import iconIf from '../../assets/icon-if.png'; import { formMeta } from './form-meta'; diff --git a/apps/demo-fixed-layout/src/nodes/if/index.ts b/apps/demo-fixed-layout/src/nodes/if/index.ts index 1678544d..6ad28bca 100644 --- a/apps/demo-fixed-layout/src/nodes/if/index.ts +++ b/apps/demo-fixed-layout/src/nodes/if/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeSplitType } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/nodes/index.ts b/apps/demo-fixed-layout/src/nodes/index.ts index b5cedd80..dc2abb99 100644 --- a/apps/demo-fixed-layout/src/nodes/index.ts +++ b/apps/demo-fixed-layout/src/nodes/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeRegistry } from '../typings'; import { TryCatchNodeRegistry } from './trycatch'; import { SwitchNodeRegistry } from './switch'; diff --git a/apps/demo-fixed-layout/src/nodes/llm/index.ts b/apps/demo-fixed-layout/src/nodes/llm/index.ts index 49265bfd..1985782b 100644 --- a/apps/demo-fixed-layout/src/nodes/llm/index.ts +++ b/apps/demo-fixed-layout/src/nodes/llm/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { defaultFormMeta } from '../default-form-meta'; diff --git a/apps/demo-fixed-layout/src/nodes/loop/index.ts b/apps/demo-fixed-layout/src/nodes/loop/index.ts index 85ffa680..89c30567 100644 --- a/apps/demo-fixed-layout/src/nodes/loop/index.ts +++ b/apps/demo-fixed-layout/src/nodes/loop/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { defaultFormMeta } from '../default-form-meta'; diff --git a/apps/demo-fixed-layout/src/nodes/loop/loop-form-render.tsx b/apps/demo-fixed-layout/src/nodes/loop/loop-form-render.tsx index b3be3e31..28ae259e 100644 --- a/apps/demo-fixed-layout/src/nodes/loop/loop-form-render.tsx +++ b/apps/demo-fixed-layout/src/nodes/loop/loop-form-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { BatchVariableSelector, IFlowRefValue } from '@flowgram.ai/form-materials'; import { FormRenderProps, FlowNodeJSON, Field } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/nodes/start/form-meta.tsx b/apps/demo-fixed-layout/src/nodes/start/form-meta.tsx index 2783155a..858f12ac 100644 --- a/apps/demo-fixed-layout/src/nodes/start/form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/start/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { JsonSchemaEditor, provideJsonSchemaOutputs, diff --git a/apps/demo-fixed-layout/src/nodes/start/index.ts b/apps/demo-fixed-layout/src/nodes/start/index.ts index 5efca223..8251d9d8 100644 --- a/apps/demo-fixed-layout/src/nodes/start/index.ts +++ b/apps/demo-fixed-layout/src/nodes/start/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry } from '../../typings'; import iconStart from '../../assets/icon-start.jpg'; import { formMeta } from './form-meta'; diff --git a/apps/demo-fixed-layout/src/nodes/switch/index.ts b/apps/demo-fixed-layout/src/nodes/switch/index.ts index bab588c5..5bf46de3 100644 --- a/apps/demo-fixed-layout/src/nodes/switch/index.ts +++ b/apps/demo-fixed-layout/src/nodes/switch/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeSplitType } from '@flowgram.ai/fixed-layout-editor'; diff --git a/apps/demo-fixed-layout/src/nodes/trycatch/form-meta.tsx b/apps/demo-fixed-layout/src/nodes/trycatch/form-meta.tsx index 648d3f16..814decef 100644 --- a/apps/demo-fixed-layout/src/nodes/trycatch/form-meta.tsx +++ b/apps/demo-fixed-layout/src/nodes/trycatch/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/fixed-layout-editor'; import { FlowNodeJSON } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/nodes/trycatch/index.ts b/apps/demo-fixed-layout/src/nodes/trycatch/index.ts index 7644c45b..7a501dc6 100644 --- a/apps/demo-fixed-layout/src/nodes/trycatch/index.ts +++ b/apps/demo-fixed-layout/src/nodes/trycatch/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '../../typings'; diff --git a/apps/demo-fixed-layout/src/plugins/clipboard-plugin/create-clipboard-plugin.ts b/apps/demo-fixed-layout/src/plugins/clipboard-plugin/create-clipboard-plugin.ts index f6bdcc56..8ab87159 100644 --- a/apps/demo-fixed-layout/src/plugins/clipboard-plugin/create-clipboard-plugin.ts +++ b/apps/demo-fixed-layout/src/plugins/clipboard-plugin/create-clipboard-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator, FixedLayoutPluginContext, diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/group-box-header.tsx b/apps/demo-fixed-layout/src/plugins/group-plugin/group-box-header.tsx index 7cb1ad58..997c07bb 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/group-box-header.tsx +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/group-box-header.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type CSSProperties } from 'react'; import { IGroupBoxHeader } from '@flowgram.ai/group-plugin'; diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/group-node.tsx b/apps/demo-fixed-layout/src/plugins/group-plugin/group-node.tsx index f52fe899..cecf2442 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/group-node.tsx +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/group-node.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IGroupNode } from '@flowgram.ai/group-plugin'; import { GroupTools } from './group-tools'; diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/group-note.tsx b/apps/demo-fixed-layout/src/plugins/group-plugin/group-note.tsx index 0ec87446..4f67de55 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/group-note.tsx +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/group-note.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useRef, useState, type CSSProperties, type FC } from 'react'; import { diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/group-tools.tsx b/apps/demo-fixed-layout/src/plugins/group-plugin/group-tools.tsx index 1ac24156..d1094636 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/group-tools.tsx +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/group-tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type CSSProperties, type FC } from 'react'; import { diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/icons/index.tsx b/apps/demo-fixed-layout/src/plugins/group-plugin/icons/index.tsx index 80150198..2d4a36ea 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/icons/index.tsx +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/icons/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type ReactNode, type Ref, forwardRef } from 'react'; import Icon, { type IconProps } from '@douyinfe/semi-icons'; diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/index.ts b/apps/demo-fixed-layout/src/plugins/group-plugin/index.ts index 4011cd33..1fa58595 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/index.ts +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { GroupBoxHeader } from './group-box-header'; export { GroupNode } from './group-node'; diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/base-textarea.tsx b/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/base-textarea.tsx index 4285cc45..e376b3d5 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/base-textarea.tsx +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/base-textarea.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState, useRef, useEffect, useCallback } from 'react'; import type { AutosizeRow } from '@douyinfe/semi-ui/lib/es/input/textarea'; diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/index.css b/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/index.css index 122a4a58..a84a7b1d 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/index.css +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .node-description { color: var(--semi-color-text-2); font-size: 12px; diff --git a/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/index.tsx b/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/index.tsx index 69b36615..900043ac 100644 --- a/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/index.tsx +++ b/apps/demo-fixed-layout/src/plugins/group-plugin/multilang-textarea-editor/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState, useCallback, useRef, type CSSProperties } from 'react'; import styled from 'styled-components'; diff --git a/apps/demo-fixed-layout/src/plugins/index.ts b/apps/demo-fixed-layout/src/plugins/index.ts index 26305aa4..61a6fbc7 100644 --- a/apps/demo-fixed-layout/src/plugins/index.ts +++ b/apps/demo-fixed-layout/src/plugins/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createClipboardPlugin } from './clipboard-plugin/create-clipboard-plugin'; export { createVariablePanelPlugin } from './variable-panel-plugin'; diff --git a/apps/demo-fixed-layout/src/services/custom-service.ts b/apps/demo-fixed-layout/src/services/custom-service.ts index b4c953f8..608b8cb4 100644 --- a/apps/demo-fixed-layout/src/services/custom-service.ts +++ b/apps/demo-fixed-layout/src/services/custom-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from '@flowgram.ai/fixed-layout-editor'; import { FixedLayoutPluginContext, diff --git a/apps/demo-fixed-layout/src/services/index.ts b/apps/demo-fixed-layout/src/services/index.ts index 01db6d60..ac882c94 100644 --- a/apps/demo-fixed-layout/src/services/index.ts +++ b/apps/demo-fixed-layout/src/services/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { CustomService } from './custom-service'; diff --git a/apps/demo-fixed-layout/src/shortcuts/constants.ts b/apps/demo-fixed-layout/src/shortcuts/constants.ts index 3df90c87..99ea0075 100644 --- a/apps/demo-fixed-layout/src/shortcuts/constants.ts +++ b/apps/demo-fixed-layout/src/shortcuts/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum FlowCommandId { COPY = 'COPY', PASTE = 'PASTE', diff --git a/apps/demo-fixed-layout/src/shortcuts/index.ts b/apps/demo-fixed-layout/src/shortcuts/index.ts index d63804ed..18211282 100644 --- a/apps/demo-fixed-layout/src/shortcuts/index.ts +++ b/apps/demo-fixed-layout/src/shortcuts/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { CommandRegistry, diff --git a/apps/demo-fixed-layout/src/shortcuts/utils.ts b/apps/demo-fixed-layout/src/shortcuts/utils.ts index fddceebb..40ecc54d 100644 --- a/apps/demo-fixed-layout/src/shortcuts/utils.ts +++ b/apps/demo-fixed-layout/src/shortcuts/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ClipboardService } from '@flowgram.ai/fixed-layout-editor'; export const readData = async (clipboard: ClipboardService) => { diff --git a/apps/demo-fixed-layout/src/type.d.ts b/apps/demo-fixed-layout/src/type.d.ts index 320cdbc4..aa8d7035 100644 --- a/apps/demo-fixed-layout/src/type.d.ts +++ b/apps/demo-fixed-layout/src/type.d.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + declare module '*.svg' declare module '*.png' declare module '*.jpg' diff --git a/apps/demo-fixed-layout/src/typings/index.ts b/apps/demo-fixed-layout/src/typings/index.ts index e2dd6769..e8bc0aed 100644 --- a/apps/demo-fixed-layout/src/typings/index.ts +++ b/apps/demo-fixed-layout/src/typings/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './node'; export * from './json-schema'; diff --git a/apps/demo-fixed-layout/src/typings/json-schema.ts b/apps/demo-fixed-layout/src/typings/json-schema.ts index ff8152aa..e71c472b 100644 --- a/apps/demo-fixed-layout/src/typings/json-schema.ts +++ b/apps/demo-fixed-layout/src/typings/json-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IJsonSchema, IBasicJsonSchema } from '@flowgram.ai/form-materials'; export type BasicType = IBasicJsonSchema; diff --git a/apps/demo-fixed-layout/src/typings/node.ts b/apps/demo-fixed-layout/src/typings/node.ts index 05318b95..0209b2b5 100644 --- a/apps/demo-fixed-layout/src/typings/node.ts +++ b/apps/demo-fixed-layout/src/typings/node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IFlowValue } from '@flowgram.ai/form-materials'; import { FlowNodeJSON as FlowNodeJSONDefault, diff --git a/apps/demo-free-layout-simple/.eslintrc.js b/apps/demo-free-layout-simple/.eslintrc.js index 9f8bd759..8becb8c2 100644 --- a/apps/demo-free-layout-simple/.eslintrc.js +++ b/apps/demo-free-layout-simple/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-free-layout-simple/rsbuild.config.ts b/apps/demo-free-layout-simple/rsbuild.config.ts index d78f48e0..012b448f 100644 --- a/apps/demo-free-layout-simple/rsbuild.config.ts +++ b/apps/demo-free-layout-simple/rsbuild.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { pluginReact } from '@rsbuild/plugin-react'; import { defineConfig } from '@rsbuild/core'; diff --git a/apps/demo-free-layout-simple/src/app.tsx b/apps/demo-free-layout-simple/src/app.tsx index 150c56b5..4e74a311 100644 --- a/apps/demo-free-layout-simple/src/app.tsx +++ b/apps/demo-free-layout-simple/src/app.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createRoot } from 'react-dom/client'; import { Editor } from './editor'; diff --git a/apps/demo-free-layout-simple/src/components/minimap.tsx b/apps/demo-free-layout-simple/src/components/minimap.tsx index 518eacfa..7a7ca4d4 100644 --- a/apps/demo-free-layout-simple/src/components/minimap.tsx +++ b/apps/demo-free-layout-simple/src/components/minimap.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowMinimapService, MinimapRender } from '@flowgram.ai/minimap-plugin'; import { useService } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout-simple/src/components/node-add-panel.tsx b/apps/demo-free-layout-simple/src/components/node-add-panel.tsx index 0a64e2cc..25ceccd9 100644 --- a/apps/demo-free-layout-simple/src/components/node-add-panel.tsx +++ b/apps/demo-free-layout-simple/src/components/node-add-panel.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { WorkflowDragService, useService } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout-simple/src/components/tools.tsx b/apps/demo-free-layout-simple/src/components/tools.tsx index 6f38bac3..f0d0c771 100644 --- a/apps/demo-free-layout-simple/src/components/tools.tsx +++ b/apps/demo-free-layout-simple/src/components/tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState } from 'react'; import { usePlaygroundTools, useClientContext } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout-simple/src/editor.tsx b/apps/demo-free-layout-simple/src/editor.tsx index 267f7012..362b4060 100644 --- a/apps/demo-free-layout-simple/src/editor.tsx +++ b/apps/demo-free-layout-simple/src/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EditorRenderer, FreeLayoutEditorProvider } from '@flowgram.ai/free-layout-editor'; import { useEditorProps } from './hooks/use-editor-props'; diff --git a/apps/demo-free-layout-simple/src/hooks/use-editor-props.tsx b/apps/demo-free-layout-simple/src/hooks/use-editor-props.tsx index 7a94d197..7c9be8e6 100644 --- a/apps/demo-free-layout-simple/src/hooks/use-editor-props.tsx +++ b/apps/demo-free-layout-simple/src/hooks/use-editor-props.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { createMinimapPlugin } from '@flowgram.ai/minimap-plugin'; diff --git a/apps/demo-free-layout-simple/src/index.css b/apps/demo-free-layout-simple/src/index.css index f51b6788..96ed9a00 100644 --- a/apps/demo-free-layout-simple/src/index.css +++ b/apps/demo-free-layout-simple/src/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .demo-free-node { display: flex; flex-direction: column; diff --git a/apps/demo-free-layout-simple/src/index.tsx b/apps/demo-free-layout-simple/src/index.tsx index c38080e9..5b7e3f86 100644 --- a/apps/demo-free-layout-simple/src/index.tsx +++ b/apps/demo-free-layout-simple/src/index.tsx @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Editor as DemoFreeLayout } from './editor'; diff --git a/apps/demo-free-layout-simple/src/initial-data.ts b/apps/demo-free-layout-simple/src/initial-data.ts index 48304be4..6feb7d09 100644 --- a/apps/demo-free-layout-simple/src/initial-data.ts +++ b/apps/demo-free-layout-simple/src/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; export const initialData: WorkflowJSON = { diff --git a/apps/demo-free-layout-simple/src/node-registries.ts b/apps/demo-free-layout-simple/src/node-registries.ts index f9be00fd..712d81b1 100644 --- a/apps/demo-free-layout-simple/src/node-registries.ts +++ b/apps/demo-free-layout-simple/src/node-registries.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeRegistry } from '@flowgram.ai/free-layout-editor'; /** diff --git a/apps/demo-free-layout/.eslintrc.js b/apps/demo-free-layout/.eslintrc.js index 9f8bd759..8becb8c2 100644 --- a/apps/demo-free-layout/.eslintrc.js +++ b/apps/demo-free-layout/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-free-layout/rsbuild.config.ts b/apps/demo-free-layout/rsbuild.config.ts index ba160c50..38364c97 100644 --- a/apps/demo-free-layout/rsbuild.config.ts +++ b/apps/demo-free-layout/rsbuild.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { pluginReact } from '@rsbuild/plugin-react'; import { pluginLess } from '@rsbuild/plugin-less'; import { defineConfig } from '@rsbuild/core'; diff --git a/apps/demo-free-layout/src/app.tsx b/apps/demo-free-layout/src/app.tsx index 150c56b5..4e74a311 100644 --- a/apps/demo-free-layout/src/app.tsx +++ b/apps/demo-free-layout/src/app.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createRoot } from 'react-dom/client'; import { Editor } from './editor'; diff --git a/apps/demo-free-layout/src/assets/icon-auto-layout.tsx b/apps/demo-free-layout/src/assets/icon-auto-layout.tsx index 6d1b1561..420b4b3f 100644 --- a/apps/demo-free-layout/src/assets/icon-auto-layout.tsx +++ b/apps/demo-free-layout/src/assets/icon-auto-layout.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const IconAutoLayout = ( ( diff --git a/apps/demo-free-layout/src/assets/icon-mouse.tsx b/apps/demo-free-layout/src/assets/icon-mouse.tsx index 05bdddd8..17d879a9 100644 --- a/apps/demo-free-layout/src/assets/icon-mouse.tsx +++ b/apps/demo-free-layout/src/assets/icon-mouse.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function IconMouse(props: { width?: number; height?: number }) { const { width, height } = props; return ( diff --git a/apps/demo-free-layout/src/assets/icon-pad.tsx b/apps/demo-free-layout/src/assets/icon-pad.tsx index e0382fde..45cf7416 100644 --- a/apps/demo-free-layout/src/assets/icon-pad.tsx +++ b/apps/demo-free-layout/src/assets/icon-pad.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function IconPad(props: { width?: number; height?: number }) { const { width, height } = props; return ( diff --git a/apps/demo-free-layout/src/assets/icon-switch-line.tsx b/apps/demo-free-layout/src/assets/icon-switch-line.tsx index d614e84c..53ba1ff6 100644 --- a/apps/demo-free-layout/src/assets/icon-switch-line.tsx +++ b/apps/demo-free-layout/src/assets/icon-switch-line.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const IconSwitchLine = ( ( ( diff --git a/apps/demo-free-layout/src/components/line-add-button/index.less b/apps/demo-free-layout/src/components/line-add-button/index.less index cd48bdb0..f36b734a 100644 --- a/apps/demo-free-layout/src/components/line-add-button/index.less +++ b/apps/demo-free-layout/src/components/line-add-button/index.less @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .line-add-button { position: absolute; transform: translate(-50%, -60%); diff --git a/apps/demo-free-layout/src/components/line-add-button/index.tsx b/apps/demo-free-layout/src/components/line-add-button/index.tsx index 4207508f..c542c107 100644 --- a/apps/demo-free-layout/src/components/line-add-button/index.tsx +++ b/apps/demo-free-layout/src/components/line-add-button/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback } from 'react'; import { diff --git a/apps/demo-free-layout/src/components/line-add-button/use-visible.ts b/apps/demo-free-layout/src/components/line-add-button/use-visible.ts index 61776d0a..2915dd0b 100644 --- a/apps/demo-free-layout/src/components/line-add-button/use-visible.ts +++ b/apps/demo-free-layout/src/components/line-add-button/use-visible.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { usePlayground, WorkflowLineEntity } from '@flowgram.ai/free-layout-editor'; import './index.less'; diff --git a/apps/demo-free-layout/src/components/node-menu/index.tsx b/apps/demo-free-layout/src/components/node-menu/index.tsx index ea55fc28..f278a299 100644 --- a/apps/demo-free-layout/src/components/node-menu/index.tsx +++ b/apps/demo-free-layout/src/components/node-menu/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC, useCallback, useState, type MouseEvent } from 'react'; import { diff --git a/apps/demo-free-layout/src/components/node-panel/index.less b/apps/demo-free-layout/src/components/node-panel/index.less index 38c56548..6dac0d7e 100644 --- a/apps/demo-free-layout/src/components/node-panel/index.less +++ b/apps/demo-free-layout/src/components/node-panel/index.less @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .node-placeholder { width: 360px; diff --git a/apps/demo-free-layout/src/components/node-panel/index.tsx b/apps/demo-free-layout/src/components/node-panel/index.tsx index 10829283..c670b26a 100644 --- a/apps/demo-free-layout/src/components/node-panel/index.tsx +++ b/apps/demo-free-layout/src/components/node-panel/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC } from 'react'; import { NodePanelRenderProps } from '@flowgram.ai/free-node-panel-plugin'; diff --git a/apps/demo-free-layout/src/components/node-panel/node-list.tsx b/apps/demo-free-layout/src/components/node-panel/node-list.tsx index 3d357f59..44012e03 100644 --- a/apps/demo-free-layout/src/components/node-panel/node-list.tsx +++ b/apps/demo-free-layout/src/components/node-panel/node-list.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { FC } from 'react'; import styled from 'styled-components'; diff --git a/apps/demo-free-layout/src/components/node-panel/node-placeholder.tsx b/apps/demo-free-layout/src/components/node-panel/node-placeholder.tsx index f35c41f3..4237a7fe 100644 --- a/apps/demo-free-layout/src/components/node-panel/node-placeholder.tsx +++ b/apps/demo-free-layout/src/components/node-panel/node-placeholder.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Skeleton } from '@douyinfe/semi-ui'; export const NodePlaceholder = () => ( diff --git a/apps/demo-free-layout/src/components/selector-box-popover/index.tsx b/apps/demo-free-layout/src/components/selector-box-popover/index.tsx index 8a0c3360..5d47a457 100644 --- a/apps/demo-free-layout/src/components/selector-box-popover/index.tsx +++ b/apps/demo-free-layout/src/components/selector-box-popover/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FunctionComponent } from 'react'; import { SelectorBoxPopoverProps } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/sidebar/index.tsx b/apps/demo-free-layout/src/components/sidebar/index.tsx index 2afd32dc..ab8a549c 100644 --- a/apps/demo-free-layout/src/components/sidebar/index.tsx +++ b/apps/demo-free-layout/src/components/sidebar/index.tsx @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { SidebarProvider } from './sidebar-provider'; export { SidebarRenderer } from './sidebar-renderer'; diff --git a/apps/demo-free-layout/src/components/sidebar/sidebar-node-renderer.tsx b/apps/demo-free-layout/src/components/sidebar/sidebar-node-renderer.tsx index ee59d646..2a5e1141 100644 --- a/apps/demo-free-layout/src/components/sidebar/sidebar-node-renderer.tsx +++ b/apps/demo-free-layout/src/components/sidebar/sidebar-node-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useNodeRender, FlowNodeEntity } from '@flowgram.ai/free-layout-editor'; import { NodeRenderContext } from '../../context'; diff --git a/apps/demo-free-layout/src/components/sidebar/sidebar-provider.tsx b/apps/demo-free-layout/src/components/sidebar/sidebar-provider.tsx index fb9efe70..70c9f079 100644 --- a/apps/demo-free-layout/src/components/sidebar/sidebar-provider.tsx +++ b/apps/demo-free-layout/src/components/sidebar/sidebar-provider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { SidebarContext } from '../../context'; diff --git a/apps/demo-free-layout/src/components/sidebar/sidebar-renderer.tsx b/apps/demo-free-layout/src/components/sidebar/sidebar-renderer.tsx index e8fb2b28..33c8fdf8 100644 --- a/apps/demo-free-layout/src/components/sidebar/sidebar-renderer.tsx +++ b/apps/demo-free-layout/src/components/sidebar/sidebar-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useContext, useEffect, useMemo } from 'react'; import { diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/group/index.css b/apps/demo-free-layout/src/components/testrun/node-status-bar/group/index.css index a683fe8f..9fdf9fcd 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/group/index.css +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/group/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .node-status-group { padding: 6px; font-weight: 500; diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/group/index.tsx b/apps/demo-free-layout/src/components/testrun/node-status-bar/group/index.tsx index dd6a7936..e29c0890 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/group/index.tsx +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/group/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC, useState } from 'react'; import { IconSmallTriangleDown } from '@douyinfe/semi-icons'; diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/header/index.tsx b/apps/demo-free-layout/src/components/testrun/node-status-bar/header/index.tsx index 6ce6075f..7ab4c62b 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/header/index.tsx +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/header/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState } from 'react'; import { IconChevronDown } from '@douyinfe/semi-icons'; diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/header/style.ts b/apps/demo-free-layout/src/components/testrun/node-status-bar/header/style.ts index e9cefa9b..a695c6fb 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/header/style.ts +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/header/style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const NodeStatusHeaderStyle = styled.div` diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/icon/success.tsx b/apps/demo-free-layout/src/components/testrun/node-status-bar/icon/success.tsx index ca2f3af6..028a450d 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/icon/success.tsx +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/icon/success.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + interface Props { className?: string; style?: React.CSSProperties; diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/icon/warning.tsx b/apps/demo-free-layout/src/components/testrun/node-status-bar/icon/warning.tsx index fa6108e6..d6c18ab1 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/icon/warning.tsx +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/icon/warning.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + interface Props { className?: string; style?: React.CSSProperties; diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/index.tsx b/apps/demo-free-layout/src/components/testrun/node-status-bar/index.tsx index 3f78b1c6..1b29a3e0 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/index.tsx +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState } from 'react'; import { NodeReport } from '@flowgram.ai/runtime-interface'; diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/render/index.css b/apps/demo-free-layout/src/components/testrun/node-status-bar/render/index.css index e116c559..0951d5fc 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/render/index.css +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/render/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .node-status-succeed { background-color: rgba(105, 209, 140, 0.3); color: rgba(0, 178, 60, 1); diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/render/index.tsx b/apps/demo-free-layout/src/components/testrun/node-status-bar/render/index.tsx index 4581ee06..d7c9792b 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/render/index.tsx +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/render/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC, useMemo, useState } from 'react'; import { NodeReport, WorkflowStatus } from '@flowgram.ai/runtime-interface'; diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/viewer/index.css b/apps/demo-free-layout/src/components/testrun/node-status-bar/viewer/index.css index 72625e64..1f845eed 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/viewer/index.css +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/viewer/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .node-status-data-structure-viewer { font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 14px; diff --git a/apps/demo-free-layout/src/components/testrun/node-status-bar/viewer/index.tsx b/apps/demo-free-layout/src/components/testrun/node-status-bar/viewer/index.tsx index 10e319ac..b01b7f69 100644 --- a/apps/demo-free-layout/src/components/testrun/node-status-bar/viewer/index.tsx +++ b/apps/demo-free-layout/src/components/testrun/node-status-bar/viewer/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState } from 'react'; import './index.css'; diff --git a/apps/demo-free-layout/src/components/testrun/testrun-button/index.tsx b/apps/demo-free-layout/src/components/testrun/testrun-button/index.tsx index c838f39f..5a6924ce 100644 --- a/apps/demo-free-layout/src/components/testrun/testrun-button/index.tsx +++ b/apps/demo-free-layout/src/components/testrun/testrun-button/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState, useEffect, useCallback } from 'react'; import { useClientContext, getNodeForm, FlowNodeEntity } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/testrun/testrun-sidesheet/index.tsx b/apps/demo-free-layout/src/components/testrun/testrun-sidesheet/index.tsx index 5b9dd297..6a2a5615 100644 --- a/apps/demo-free-layout/src/components/testrun/testrun-sidesheet/index.tsx +++ b/apps/demo-free-layout/src/components/testrun/testrun-sidesheet/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC, useEffect, useState } from 'react'; import { WorkflowInputs, WorkflowOutputs } from '@flowgram.ai/runtime-interface'; diff --git a/apps/demo-free-layout/src/components/tools/auto-layout.tsx b/apps/demo-free-layout/src/components/tools/auto-layout.tsx index e42191ef..58f43f88 100644 --- a/apps/demo-free-layout/src/components/tools/auto-layout.tsx +++ b/apps/demo-free-layout/src/components/tools/auto-layout.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback } from 'react'; import { usePlayground, usePlaygroundTools } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/tools/comment.tsx b/apps/demo-free-layout/src/components/tools/comment.tsx index ba97f049..a063774a 100644 --- a/apps/demo-free-layout/src/components/tools/comment.tsx +++ b/apps/demo-free-layout/src/components/tools/comment.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState, useCallback } from 'react'; import { diff --git a/apps/demo-free-layout/src/components/tools/fit-view.tsx b/apps/demo-free-layout/src/components/tools/fit-view.tsx index f619737f..6f78dcdf 100644 --- a/apps/demo-free-layout/src/components/tools/fit-view.tsx +++ b/apps/demo-free-layout/src/components/tools/fit-view.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { usePlaygroundTools } from '@flowgram.ai/free-layout-editor'; import { IconButton, Tooltip } from '@douyinfe/semi-ui'; import { IconExpand } from '@douyinfe/semi-icons'; diff --git a/apps/demo-free-layout/src/components/tools/index.tsx b/apps/demo-free-layout/src/components/tools/index.tsx index 9e33e20b..c7e45ea9 100644 --- a/apps/demo-free-layout/src/components/tools/index.tsx +++ b/apps/demo-free-layout/src/components/tools/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState, useEffect } from 'react'; import { useRefresh } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/tools/interactive.tsx b/apps/demo-free-layout/src/components/tools/interactive.tsx index 188d5b5a..6487062a 100644 --- a/apps/demo-free-layout/src/components/tools/interactive.tsx +++ b/apps/demo-free-layout/src/components/tools/interactive.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState } from 'react'; import { diff --git a/apps/demo-free-layout/src/components/tools/minimap-switch.tsx b/apps/demo-free-layout/src/components/tools/minimap-switch.tsx index e2f0b4e9..ffd69f52 100644 --- a/apps/demo-free-layout/src/components/tools/minimap-switch.tsx +++ b/apps/demo-free-layout/src/components/tools/minimap-switch.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Tooltip, IconButton } from '@douyinfe/semi-ui'; import { UIIconMinimap } from './styles'; diff --git a/apps/demo-free-layout/src/components/tools/minimap.tsx b/apps/demo-free-layout/src/components/tools/minimap.tsx index e6bedab6..dd060636 100644 --- a/apps/demo-free-layout/src/components/tools/minimap.tsx +++ b/apps/demo-free-layout/src/components/tools/minimap.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowMinimapService, MinimapRender } from '@flowgram.ai/minimap-plugin'; import { useService } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/tools/mouse-pad-selector.less b/apps/demo-free-layout/src/components/tools/mouse-pad-selector.less index cbde73cd..4c363ae2 100644 --- a/apps/demo-free-layout/src/components/tools/mouse-pad-selector.less +++ b/apps/demo-free-layout/src/components/tools/mouse-pad-selector.less @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* stylelint-disable no-descending-specificity */ /* stylelint-disable selector-class-pattern */ .ui-mouse-pad-selector { diff --git a/apps/demo-free-layout/src/components/tools/mouse-pad-selector.tsx b/apps/demo-free-layout/src/components/tools/mouse-pad-selector.tsx index a317c9fb..5f76c61c 100644 --- a/apps/demo-free-layout/src/components/tools/mouse-pad-selector.tsx +++ b/apps/demo-free-layout/src/components/tools/mouse-pad-selector.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { type CSSProperties, useState } from 'react'; import { Popover, Typography } from '@douyinfe/semi-ui'; diff --git a/apps/demo-free-layout/src/components/tools/readonly.tsx b/apps/demo-free-layout/src/components/tools/readonly.tsx index 1250f642..a23009f1 100644 --- a/apps/demo-free-layout/src/components/tools/readonly.tsx +++ b/apps/demo-free-layout/src/components/tools/readonly.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback } from 'react'; import { usePlayground } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/tools/run.tsx b/apps/demo-free-layout/src/components/tools/run.tsx index d3b09b0a..8e0260d3 100644 --- a/apps/demo-free-layout/src/components/tools/run.tsx +++ b/apps/demo-free-layout/src/components/tools/run.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { useService } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/tools/save.tsx b/apps/demo-free-layout/src/components/tools/save.tsx index 8c3d3477..c21d6e0d 100644 --- a/apps/demo-free-layout/src/components/tools/save.tsx +++ b/apps/demo-free-layout/src/components/tools/save.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState, useEffect, useCallback } from 'react'; import { useClientContext, getNodeForm, FlowNodeEntity } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/tools/styles.tsx b/apps/demo-free-layout/src/components/tools/styles.tsx index 15db1792..ec1a0ffa 100644 --- a/apps/demo-free-layout/src/components/tools/styles.tsx +++ b/apps/demo-free-layout/src/components/tools/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { IconMinimap } from '../../assets/icon-minimap'; diff --git a/apps/demo-free-layout/src/components/tools/switch-line.tsx b/apps/demo-free-layout/src/components/tools/switch-line.tsx index b68cf68b..01e08998 100644 --- a/apps/demo-free-layout/src/components/tools/switch-line.tsx +++ b/apps/demo-free-layout/src/components/tools/switch-line.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback } from 'react'; import { useService, WorkflowLinesManager } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/components/tools/zoom-select.tsx b/apps/demo-free-layout/src/components/tools/zoom-select.tsx index 7fa24b88..fb633704 100644 --- a/apps/demo-free-layout/src/components/tools/zoom-select.tsx +++ b/apps/demo-free-layout/src/components/tools/zoom-select.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { usePlayground, usePlaygroundTools } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/context/index.ts b/apps/demo-free-layout/src/context/index.ts index ca6c0067..9a623a6e 100644 --- a/apps/demo-free-layout/src/context/index.ts +++ b/apps/demo-free-layout/src/context/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { NodeRenderContext } from './node-render-context'; export { SidebarContext, IsSidebarContext } from './sidebar-context'; diff --git a/apps/demo-free-layout/src/context/node-render-context.ts b/apps/demo-free-layout/src/context/node-render-context.ts index 926016b2..ecd10be7 100644 --- a/apps/demo-free-layout/src/context/node-render-context.ts +++ b/apps/demo-free-layout/src/context/node-render-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import type { NodeRenderReturnType } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/context/sidebar-context.ts b/apps/demo-free-layout/src/context/sidebar-context.ts index 4f8f3158..b10a9b62 100644 --- a/apps/demo-free-layout/src/context/sidebar-context.ts +++ b/apps/demo-free-layout/src/context/sidebar-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export const SidebarContext = React.createContext<{ diff --git a/apps/demo-free-layout/src/editor.tsx b/apps/demo-free-layout/src/editor.tsx index 6e7c2363..38ebccc3 100644 --- a/apps/demo-free-layout/src/editor.tsx +++ b/apps/demo-free-layout/src/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EditorRenderer, FreeLayoutEditorProvider } from '@flowgram.ai/free-layout-editor'; import '@flowgram.ai/free-layout-editor/index.css'; diff --git a/apps/demo-free-layout/src/form-components/feedback.tsx b/apps/demo-free-layout/src/form-components/feedback.tsx index 46802b65..9110fccc 100644 --- a/apps/demo-free-layout/src/form-components/feedback.tsx +++ b/apps/demo-free-layout/src/form-components/feedback.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { FieldError, FieldState, FieldWarning } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/form-components/form-content/index.tsx b/apps/demo-free-layout/src/form-components/form-content/index.tsx index 7820775a..ad74c1bc 100644 --- a/apps/demo-free-layout/src/form-components/form-content/index.tsx +++ b/apps/demo-free-layout/src/form-components/form-content/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { FlowNodeRegistry } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/form-components/form-content/styles.tsx b/apps/demo-free-layout/src/form-components/form-content/styles.tsx index 18528132..e67ca485 100644 --- a/apps/demo-free-layout/src/form-components/form-content/styles.tsx +++ b/apps/demo-free-layout/src/form-components/form-content/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const FormWrapper = styled.div` diff --git a/apps/demo-free-layout/src/form-components/form-header/index.tsx b/apps/demo-free-layout/src/form-components/form-header/index.tsx index cfb4f652..dc237609 100644 --- a/apps/demo-free-layout/src/form-components/form-header/index.tsx +++ b/apps/demo-free-layout/src/form-components/form-header/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { useClientContext, CommandService } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/form-components/form-header/styles.tsx b/apps/demo-free-layout/src/form-components/form-header/styles.tsx index 253abed4..6eee0425 100644 --- a/apps/demo-free-layout/src/form-components/form-header/styles.tsx +++ b/apps/demo-free-layout/src/form-components/form-header/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Header = styled.div` diff --git a/apps/demo-free-layout/src/form-components/form-header/title-input.tsx b/apps/demo-free-layout/src/form-components/form-header/title-input.tsx index 7c59c1dc..8e28be24 100644 --- a/apps/demo-free-layout/src/form-components/form-header/title-input.tsx +++ b/apps/demo-free-layout/src/form-components/form-header/title-input.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useRef, useEffect } from 'react'; import { Field, FieldRenderProps } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/form-components/form-header/utils.tsx b/apps/demo-free-layout/src/form-components/form-header/utils.tsx index bd3c0a66..f9fbeb06 100644 --- a/apps/demo-free-layout/src/form-components/form-header/utils.tsx +++ b/apps/demo-free-layout/src/form-components/form-header/utils.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeEntity } from '@flowgram.ai/free-layout-editor'; import { FlowNodeRegistry } from '../../typings'; diff --git a/apps/demo-free-layout/src/form-components/form-inputs/index.tsx b/apps/demo-free-layout/src/form-components/form-inputs/index.tsx index 691fe36b..53939719 100644 --- a/apps/demo-free-layout/src/form-components/form-inputs/index.tsx +++ b/apps/demo-free-layout/src/form-components/form-inputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field } from '@flowgram.ai/free-layout-editor'; import { DynamicValueInput } from '@flowgram.ai/form-materials'; diff --git a/apps/demo-free-layout/src/form-components/form-inputs/styles.tsx b/apps/demo-free-layout/src/form-components/form-inputs/styles.tsx index a92a565e..ce2e80ae 100644 --- a/apps/demo-free-layout/src/form-components/form-inputs/styles.tsx +++ b/apps/demo-free-layout/src/form-components/form-inputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import styled from 'styled-components'; // TODO diff --git a/apps/demo-free-layout/src/form-components/form-item/index.css b/apps/demo-free-layout/src/form-components/form-item/index.css index 27b42da0..412bb002 100644 --- a/apps/demo-free-layout/src/form-components/form-item/index.css +++ b/apps/demo-free-layout/src/form-components/form-item/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .form-item-type-tag { color: inherit; padding: 0 2px; diff --git a/apps/demo-free-layout/src/form-components/form-item/index.tsx b/apps/demo-free-layout/src/form-components/form-item/index.tsx index 9d70ff03..9a26a305 100644 --- a/apps/demo-free-layout/src/form-components/form-item/index.tsx +++ b/apps/demo-free-layout/src/form-components/form-item/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback } from 'react'; import { Typography, Tooltip } from '@douyinfe/semi-ui'; diff --git a/apps/demo-free-layout/src/form-components/form-outputs/index.tsx b/apps/demo-free-layout/src/form-components/form-outputs/index.tsx index fb0abf23..0ecdca18 100644 --- a/apps/demo-free-layout/src/form-components/form-outputs/index.tsx +++ b/apps/demo-free-layout/src/form-components/form-outputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC } from 'react'; import { Field } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/form-components/form-outputs/styles.tsx b/apps/demo-free-layout/src/form-components/form-outputs/styles.tsx index 701c7790..01b9e5b7 100644 --- a/apps/demo-free-layout/src/form-components/form-outputs/styles.tsx +++ b/apps/demo-free-layout/src/form-components/form-outputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const FormOutputsContainer = styled.div` diff --git a/apps/demo-free-layout/src/form-components/index.ts b/apps/demo-free-layout/src/form-components/index.ts index 597f3544..78647081 100644 --- a/apps/demo-free-layout/src/form-components/index.ts +++ b/apps/demo-free-layout/src/form-components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './feedback'; export * from './form-content'; export * from './form-outputs'; diff --git a/apps/demo-free-layout/src/form-components/properties-edit/index.tsx b/apps/demo-free-layout/src/form-components/properties-edit/index.tsx index bc8966d0..f941bd80 100644 --- a/apps/demo-free-layout/src/form-components/properties-edit/index.tsx +++ b/apps/demo-free-layout/src/form-components/properties-edit/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState } from 'react'; import { Button } from '@douyinfe/semi-ui'; diff --git a/apps/demo-free-layout/src/form-components/properties-edit/property-edit.tsx b/apps/demo-free-layout/src/form-components/properties-edit/property-edit.tsx index 076d3137..310926b6 100644 --- a/apps/demo-free-layout/src/form-components/properties-edit/property-edit.tsx +++ b/apps/demo-free-layout/src/form-components/properties-edit/property-edit.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState, useLayoutEffect } from 'react'; import { VariableSelector, TypeSelector, DynamicValueInput } from '@flowgram.ai/form-materials'; diff --git a/apps/demo-free-layout/src/form-components/properties-edit/styles.tsx b/apps/demo-free-layout/src/form-components/properties-edit/styles.tsx index c2001874..2bb81132 100644 --- a/apps/demo-free-layout/src/form-components/properties-edit/styles.tsx +++ b/apps/demo-free-layout/src/form-components/properties-edit/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Row = styled.div` diff --git a/apps/demo-free-layout/src/form-components/type-tag.tsx b/apps/demo-free-layout/src/form-components/type-tag.tsx index 397e7e56..2203c6de 100644 --- a/apps/demo-free-layout/src/form-components/type-tag.tsx +++ b/apps/demo-free-layout/src/form-components/type-tag.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { VariableTypeIcons, ArrayIcons } from '@flowgram.ai/form-materials'; import { Tag, Tooltip } from '@douyinfe/semi-ui'; diff --git a/apps/demo-free-layout/src/form-components/value-display/index.tsx b/apps/demo-free-layout/src/form-components/value-display/index.tsx index 2ae631a4..490a3780 100644 --- a/apps/demo-free-layout/src/form-components/value-display/index.tsx +++ b/apps/demo-free-layout/src/form-components/value-display/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import { TypeTag } from '../type-tag' import { ValueDisplayStyle } from './styles'; diff --git a/apps/demo-free-layout/src/form-components/value-display/styles.tsx b/apps/demo-free-layout/src/form-components/value-display/styles.tsx index 991e91c2..e55e0c9f 100644 --- a/apps/demo-free-layout/src/form-components/value-display/styles.tsx +++ b/apps/demo-free-layout/src/form-components/value-display/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const ValueDisplayStyle = styled.div` diff --git a/apps/demo-free-layout/src/hooks/index.ts b/apps/demo-free-layout/src/hooks/index.ts index a0d583cb..f35a8660 100644 --- a/apps/demo-free-layout/src/hooks/index.ts +++ b/apps/demo-free-layout/src/hooks/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { useEditorProps } from './use-editor-props'; export { useNodeRenderContext } from './use-node-render-context'; export { useIsSidebar } from './use-is-sidebar'; diff --git a/apps/demo-free-layout/src/hooks/use-editor-props.tsx b/apps/demo-free-layout/src/hooks/use-editor-props.tsx index 0b9df4a8..5a0c9eb6 100644 --- a/apps/demo-free-layout/src/hooks/use-editor-props.tsx +++ b/apps/demo-free-layout/src/hooks/use-editor-props.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable no-console */ import { useMemo } from 'react'; diff --git a/apps/demo-free-layout/src/hooks/use-is-sidebar.ts b/apps/demo-free-layout/src/hooks/use-is-sidebar.ts index 65ce37d2..5451b94f 100644 --- a/apps/demo-free-layout/src/hooks/use-is-sidebar.ts +++ b/apps/demo-free-layout/src/hooks/use-is-sidebar.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext } from 'react'; import { IsSidebarContext } from '../context'; diff --git a/apps/demo-free-layout/src/hooks/use-node-render-context.ts b/apps/demo-free-layout/src/hooks/use-node-render-context.ts index b529b8c4..69bd9524 100644 --- a/apps/demo-free-layout/src/hooks/use-node-render-context.ts +++ b/apps/demo-free-layout/src/hooks/use-node-render-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext } from 'react'; import { NodeRenderContext } from '../context'; diff --git a/apps/demo-free-layout/src/hooks/use-port-click.ts b/apps/demo-free-layout/src/hooks/use-port-click.ts index e4ec4cac..3468b892 100644 --- a/apps/demo-free-layout/src/hooks/use-port-click.ts +++ b/apps/demo-free-layout/src/hooks/use-port-click.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback } from 'react'; import { diff --git a/apps/demo-free-layout/src/index.ts b/apps/demo-free-layout/src/index.ts index c38080e9..5b7e3f86 100644 --- a/apps/demo-free-layout/src/index.ts +++ b/apps/demo-free-layout/src/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Editor as DemoFreeLayout } from './editor'; diff --git a/apps/demo-free-layout/src/initial-data.ts b/apps/demo-free-layout/src/initial-data.ts index fd38b4d7..1a3bee4b 100644 --- a/apps/demo-free-layout/src/initial-data.ts +++ b/apps/demo-free-layout/src/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from './typings'; export const initialData: FlowDocumentJSON = { diff --git a/apps/demo-free-layout/src/nodes/comment/index.tsx b/apps/demo-free-layout/src/nodes/comment/index.tsx index afd9faa7..d07e4298 100644 --- a/apps/demo-free-layout/src/nodes/comment/index.tsx +++ b/apps/demo-free-layout/src/nodes/comment/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeType } from '../constants'; import { FlowNodeRegistry } from '../../typings'; diff --git a/apps/demo-free-layout/src/nodes/condition/condition-inputs/index.tsx b/apps/demo-free-layout/src/nodes/condition/condition-inputs/index.tsx index ca2b0cfc..fd436e87 100644 --- a/apps/demo-free-layout/src/nodes/condition/condition-inputs/index.tsx +++ b/apps/demo-free-layout/src/nodes/condition/condition-inputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { Field, FieldArray } from '@flowgram.ai/free-layout-editor'; import { ConditionRow, ConditionRowValueType } from '@flowgram.ai/form-materials'; diff --git a/apps/demo-free-layout/src/nodes/condition/condition-inputs/styles.tsx b/apps/demo-free-layout/src/nodes/condition/condition-inputs/styles.tsx index 0434dc89..c14d14e1 100644 --- a/apps/demo-free-layout/src/nodes/condition/condition-inputs/styles.tsx +++ b/apps/demo-free-layout/src/nodes/condition/condition-inputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const ConditionPort = styled.div` diff --git a/apps/demo-free-layout/src/nodes/condition/form-meta.tsx b/apps/demo-free-layout/src/nodes/condition/form-meta.tsx index df8565ba..ce581690 100644 --- a/apps/demo-free-layout/src/nodes/condition/form-meta.tsx +++ b/apps/demo-free-layout/src/nodes/condition/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormRenderProps, FormMeta, ValidateTrigger } from '@flowgram.ai/free-layout-editor'; import { FlowNodeJSON } from '../../typings'; diff --git a/apps/demo-free-layout/src/nodes/condition/index.ts b/apps/demo-free-layout/src/nodes/condition/index.ts index bc454c8c..27127c03 100644 --- a/apps/demo-free-layout/src/nodes/condition/index.ts +++ b/apps/demo-free-layout/src/nodes/condition/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '../../typings'; diff --git a/apps/demo-free-layout/src/nodes/constants.ts b/apps/demo-free-layout/src/nodes/constants.ts index d598ad96..3bd4f8bb 100644 --- a/apps/demo-free-layout/src/nodes/constants.ts +++ b/apps/demo-free-layout/src/nodes/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum WorkflowNodeType { Start = 'start', End = 'end', diff --git a/apps/demo-free-layout/src/nodes/default-form-meta.tsx b/apps/demo-free-layout/src/nodes/default-form-meta.tsx index 89db1d8c..0ed9c3fa 100644 --- a/apps/demo-free-layout/src/nodes/default-form-meta.tsx +++ b/apps/demo-free-layout/src/nodes/default-form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormRenderProps, FormMeta, diff --git a/apps/demo-free-layout/src/nodes/end/form-meta.tsx b/apps/demo-free-layout/src/nodes/end/form-meta.tsx index b8fddf15..76878f2b 100644 --- a/apps/demo-free-layout/src/nodes/end/form-meta.tsx +++ b/apps/demo-free-layout/src/nodes/end/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { mapValues } from 'lodash-es'; import { Field, FieldRenderProps, FormMeta } from '@flowgram.ai/free-layout-editor'; import { IFlowValue } from '@flowgram.ai/form-materials'; diff --git a/apps/demo-free-layout/src/nodes/end/index.ts b/apps/demo-free-layout/src/nodes/end/index.ts index 4e6f0c70..01b1daa4 100644 --- a/apps/demo-free-layout/src/nodes/end/index.ts +++ b/apps/demo-free-layout/src/nodes/end/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry } from '../../typings'; import iconEnd from '../../assets/icon-end.jpg'; import { formMeta } from './form-meta'; diff --git a/apps/demo-free-layout/src/nodes/index.ts b/apps/demo-free-layout/src/nodes/index.ts index accdcbc1..adaa26a0 100644 --- a/apps/demo-free-layout/src/nodes/index.ts +++ b/apps/demo-free-layout/src/nodes/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry } from '../typings'; import { StartNodeRegistry } from './start'; import { LoopNodeRegistry } from './loop'; diff --git a/apps/demo-free-layout/src/nodes/llm/index.ts b/apps/demo-free-layout/src/nodes/llm/index.ts index 2b8023b0..5ca6aee3 100644 --- a/apps/demo-free-layout/src/nodes/llm/index.ts +++ b/apps/demo-free-layout/src/nodes/llm/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { WorkflowNodeType } from '../constants'; diff --git a/apps/demo-free-layout/src/nodes/loop/index.ts b/apps/demo-free-layout/src/nodes/loop/index.ts index e9519989..0bf43a51 100644 --- a/apps/demo-free-layout/src/nodes/loop/index.ts +++ b/apps/demo-free-layout/src/nodes/loop/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { WorkflowNodeEntity, diff --git a/apps/demo-free-layout/src/nodes/loop/loop-form-render.tsx b/apps/demo-free-layout/src/nodes/loop/loop-form-render.tsx index 420a287e..7f94019d 100644 --- a/apps/demo-free-layout/src/nodes/loop/loop-form-render.tsx +++ b/apps/demo-free-layout/src/nodes/loop/loop-form-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormRenderProps, FlowNodeJSON, Field } from '@flowgram.ai/free-layout-editor'; import { SubCanvasRender } from '@flowgram.ai/free-container-plugin'; import { BatchOutputs, BatchVariableSelector, IFlowRefValue } from '@flowgram.ai/form-materials'; diff --git a/apps/demo-free-layout/src/nodes/start/form-meta.tsx b/apps/demo-free-layout/src/nodes/start/form-meta.tsx index 1890e284..96020136 100644 --- a/apps/demo-free-layout/src/nodes/start/form-meta.tsx +++ b/apps/demo-free-layout/src/nodes/start/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field, FieldRenderProps, diff --git a/apps/demo-free-layout/src/nodes/start/index.ts b/apps/demo-free-layout/src/nodes/start/index.ts index f9cf740e..ff227b4b 100644 --- a/apps/demo-free-layout/src/nodes/start/index.ts +++ b/apps/demo-free-layout/src/nodes/start/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry } from '../../typings'; import iconStart from '../../assets/icon-start.jpg'; import { formMeta } from './form-meta'; diff --git a/apps/demo-free-layout/src/plugins/context-menu-plugin/context-menu-layer.tsx b/apps/demo-free-layout/src/plugins/context-menu-plugin/context-menu-layer.tsx index 10fbd42d..5629ab6b 100644 --- a/apps/demo-free-layout/src/plugins/context-menu-plugin/context-menu-layer.tsx +++ b/apps/demo-free-layout/src/plugins/context-menu-plugin/context-menu-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { NodePanelResult, WorkflowNodePanelService } from '@flowgram.ai/free-node-panel-plugin'; import { Layer, diff --git a/apps/demo-free-layout/src/plugins/context-menu-plugin/context-menu-plugin.ts b/apps/demo-free-layout/src/plugins/context-menu-plugin/context-menu-plugin.ts index e6a56f52..f45b32bb 100644 --- a/apps/demo-free-layout/src/plugins/context-menu-plugin/context-menu-plugin.ts +++ b/apps/demo-free-layout/src/plugins/context-menu-plugin/context-menu-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator, PluginCreator, diff --git a/apps/demo-free-layout/src/plugins/context-menu-plugin/index.ts b/apps/demo-free-layout/src/plugins/context-menu-plugin/index.ts index 9940298d..70ba9071 100644 --- a/apps/demo-free-layout/src/plugins/context-menu-plugin/index.ts +++ b/apps/demo-free-layout/src/plugins/context-menu-plugin/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createContextMenuPlugin } from './context-menu-plugin'; diff --git a/apps/demo-free-layout/src/plugins/index.ts b/apps/demo-free-layout/src/plugins/index.ts index 34595606..9b088fd4 100644 --- a/apps/demo-free-layout/src/plugins/index.ts +++ b/apps/demo-free-layout/src/plugins/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createContextMenuPlugin } from './context-menu-plugin'; export { createRuntimePlugin } from './runtime-plugin'; export { createVariablePanelPlugin } from './variable-panel-plugin'; diff --git a/apps/demo-free-layout/src/plugins/runtime-plugin/browser-client/index.ts b/apps/demo-free-layout/src/plugins/runtime-plugin/browser-client/index.ts index 82c05a4a..52099430 100644 --- a/apps/demo-free-layout/src/plugins/runtime-plugin/browser-client/index.ts +++ b/apps/demo-free-layout/src/plugins/runtime-plugin/browser-client/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable no-console */ import { TaskCancelAPI, TaskReportAPI, TaskResultAPI, TaskRunAPI } from '@flowgram.ai/runtime-js'; import { FlowGramAPIName, IRuntimeClient } from '@flowgram.ai/runtime-interface'; diff --git a/apps/demo-free-layout/src/plugins/runtime-plugin/create-runtime-plugin.ts b/apps/demo-free-layout/src/plugins/runtime-plugin/create-runtime-plugin.ts index 0826920a..d769488a 100644 --- a/apps/demo-free-layout/src/plugins/runtime-plugin/create-runtime-plugin.ts +++ b/apps/demo-free-layout/src/plugins/runtime-plugin/create-runtime-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator, PluginContext } from '@flowgram.ai/free-layout-editor'; import { RuntimePluginOptions } from './type'; diff --git a/apps/demo-free-layout/src/plugins/runtime-plugin/index.ts b/apps/demo-free-layout/src/plugins/runtime-plugin/index.ts index fbff0a8b..98286cac 100644 --- a/apps/demo-free-layout/src/plugins/runtime-plugin/index.ts +++ b/apps/demo-free-layout/src/plugins/runtime-plugin/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createRuntimePlugin } from './create-runtime-plugin'; export { WorkflowRuntimeClient } from './browser-client'; diff --git a/apps/demo-free-layout/src/plugins/runtime-plugin/runtime-service/index.ts b/apps/demo-free-layout/src/plugins/runtime-plugin/runtime-service/index.ts index 5435cf9c..11b17a5d 100644 --- a/apps/demo-free-layout/src/plugins/runtime-plugin/runtime-service/index.ts +++ b/apps/demo-free-layout/src/plugins/runtime-plugin/runtime-service/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IReport, NodeReport, diff --git a/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/constant.ts b/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/constant.ts index a689542e..ffb1113a 100644 --- a/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/constant.ts +++ b/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ServerConfig } from '../type'; export const DEFAULT_SERVER_CONFIG: ServerConfig = { diff --git a/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/index.ts b/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/index.ts index 0ce8a93e..627d391c 100644 --- a/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/index.ts +++ b/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowGramAPIName, IRuntimeClient, diff --git a/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/type.ts b/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/type.ts index d0c90a22..a8780b0b 100644 --- a/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/type.ts +++ b/apps/demo-free-layout/src/plugins/runtime-plugin/server-client/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface ServerError { code: string; message: string; diff --git a/apps/demo-free-layout/src/plugins/runtime-plugin/type.ts b/apps/demo-free-layout/src/plugins/runtime-plugin/type.ts index 0f76f17b..63d67ad6 100644 --- a/apps/demo-free-layout/src/plugins/runtime-plugin/type.ts +++ b/apps/demo-free-layout/src/plugins/runtime-plugin/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface RuntimeBrowserOptions { mode?: 'browser'; } diff --git a/apps/demo-free-layout/src/services/custom-service.ts b/apps/demo-free-layout/src/services/custom-service.ts index a2a047f8..34a77ba1 100644 --- a/apps/demo-free-layout/src/services/custom-service.ts +++ b/apps/demo-free-layout/src/services/custom-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from '@flowgram.ai/free-layout-editor'; import { FreeLayoutPluginContext, diff --git a/apps/demo-free-layout/src/services/index.ts b/apps/demo-free-layout/src/services/index.ts index 01db6d60..ac882c94 100644 --- a/apps/demo-free-layout/src/services/index.ts +++ b/apps/demo-free-layout/src/services/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { CustomService } from './custom-service'; diff --git a/apps/demo-free-layout/src/shortcuts/collapse/index.ts b/apps/demo-free-layout/src/shortcuts/collapse/index.ts index 977e0b51..747efc5c 100644 --- a/apps/demo-free-layout/src/shortcuts/collapse/index.ts +++ b/apps/demo-free-layout/src/shortcuts/collapse/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, ShortcutsHandler, diff --git a/apps/demo-free-layout/src/shortcuts/constants.ts b/apps/demo-free-layout/src/shortcuts/constants.ts index 735297c1..8a9db30d 100644 --- a/apps/demo-free-layout/src/shortcuts/constants.ts +++ b/apps/demo-free-layout/src/shortcuts/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const WorkflowClipboardDataID = 'flowgram-workflow-clipboard-data'; export enum FlowCommandId { diff --git a/apps/demo-free-layout/src/shortcuts/copy/index.ts b/apps/demo-free-layout/src/shortcuts/copy/index.ts index 064bf8b3..f159489f 100644 --- a/apps/demo-free-layout/src/shortcuts/copy/index.ts +++ b/apps/demo-free-layout/src/shortcuts/copy/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, Rectangle, diff --git a/apps/demo-free-layout/src/shortcuts/delete/index.ts b/apps/demo-free-layout/src/shortcuts/delete/index.ts index 03829da6..897855c8 100644 --- a/apps/demo-free-layout/src/shortcuts/delete/index.ts +++ b/apps/demo-free-layout/src/shortcuts/delete/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, ShortcutsHandler, diff --git a/apps/demo-free-layout/src/shortcuts/expand/index.ts b/apps/demo-free-layout/src/shortcuts/expand/index.ts index f59dac9f..cb2bb6df 100644 --- a/apps/demo-free-layout/src/shortcuts/expand/index.ts +++ b/apps/demo-free-layout/src/shortcuts/expand/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, ShortcutsHandler, diff --git a/apps/demo-free-layout/src/shortcuts/index.ts b/apps/demo-free-layout/src/shortcuts/index.ts index 84b2b382..a28144c8 100644 --- a/apps/demo-free-layout/src/shortcuts/index.ts +++ b/apps/demo-free-layout/src/shortcuts/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './constants'; export * from './shortcuts'; diff --git a/apps/demo-free-layout/src/shortcuts/paste/index.ts b/apps/demo-free-layout/src/shortcuts/paste/index.ts index 693eafee..9ef78866 100644 --- a/apps/demo-free-layout/src/shortcuts/paste/index.ts +++ b/apps/demo-free-layout/src/shortcuts/paste/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { delay, EntityManager, diff --git a/apps/demo-free-layout/src/shortcuts/paste/traverse.ts b/apps/demo-free-layout/src/shortcuts/paste/traverse.ts index 7d2c2286..296fd024 100644 --- a/apps/demo-free-layout/src/shortcuts/paste/traverse.ts +++ b/apps/demo-free-layout/src/shortcuts/paste/traverse.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // traverse value type - 遍历值类型 export type TraverseValue = any; diff --git a/apps/demo-free-layout/src/shortcuts/paste/unique-workflow.ts b/apps/demo-free-layout/src/shortcuts/paste/unique-workflow.ts index 88e2b1cd..16b7e0be 100644 --- a/apps/demo-free-layout/src/shortcuts/paste/unique-workflow.ts +++ b/apps/demo-free-layout/src/shortcuts/paste/unique-workflow.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { customAlphabet } from 'nanoid'; import type { WorkflowJSON, WorkflowNodeJSON } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-free-layout/src/shortcuts/select-all/index.ts b/apps/demo-free-layout/src/shortcuts/select-all/index.ts index e70029d6..3a60094b 100644 --- a/apps/demo-free-layout/src/shortcuts/select-all/index.ts +++ b/apps/demo-free-layout/src/shortcuts/select-all/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, Playground, diff --git a/apps/demo-free-layout/src/shortcuts/shortcuts.ts b/apps/demo-free-layout/src/shortcuts/shortcuts.ts index 7228c708..6b66dafe 100644 --- a/apps/demo-free-layout/src/shortcuts/shortcuts.ts +++ b/apps/demo-free-layout/src/shortcuts/shortcuts.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, ShortcutsRegistry } from '@flowgram.ai/free-layout-editor'; import { ZoomOutShortcut } from './zoom-out'; diff --git a/apps/demo-free-layout/src/shortcuts/type.ts b/apps/demo-free-layout/src/shortcuts/type.ts index 175fcaec..80ebd204 100644 --- a/apps/demo-free-layout/src/shortcuts/type.ts +++ b/apps/demo-free-layout/src/shortcuts/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; import type { WorkflowClipboardDataID } from './constants'; diff --git a/apps/demo-free-layout/src/shortcuts/zoom-in/index.ts b/apps/demo-free-layout/src/shortcuts/zoom-in/index.ts index 55d43455..ad10cc8d 100644 --- a/apps/demo-free-layout/src/shortcuts/zoom-in/index.ts +++ b/apps/demo-free-layout/src/shortcuts/zoom-in/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, PlaygroundConfigEntity, diff --git a/apps/demo-free-layout/src/shortcuts/zoom-out/index.ts b/apps/demo-free-layout/src/shortcuts/zoom-out/index.ts index a4bab37f..518b2811 100644 --- a/apps/demo-free-layout/src/shortcuts/zoom-out/index.ts +++ b/apps/demo-free-layout/src/shortcuts/zoom-out/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, PlaygroundConfigEntity, diff --git a/apps/demo-free-layout/src/styles/index.css b/apps/demo-free-layout/src/styles/index.css index 6f88e2ba..596d9cfa 100644 --- a/apps/demo-free-layout/src/styles/index.css +++ b/apps/demo-free-layout/src/styles/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + :root { /* Port colors */ --g-workflow-port-color-primary: #4d53e8; diff --git a/apps/demo-free-layout/src/type.d.ts b/apps/demo-free-layout/src/type.d.ts index 320cdbc4..aa8d7035 100644 --- a/apps/demo-free-layout/src/type.d.ts +++ b/apps/demo-free-layout/src/type.d.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + declare module '*.svg' declare module '*.png' declare module '*.jpg' diff --git a/apps/demo-free-layout/src/typings/index.ts b/apps/demo-free-layout/src/typings/index.ts index e2dd6769..e8bc0aed 100644 --- a/apps/demo-free-layout/src/typings/index.ts +++ b/apps/demo-free-layout/src/typings/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './node'; export * from './json-schema'; diff --git a/apps/demo-free-layout/src/typings/json-schema.ts b/apps/demo-free-layout/src/typings/json-schema.ts index ff8152aa..e71c472b 100644 --- a/apps/demo-free-layout/src/typings/json-schema.ts +++ b/apps/demo-free-layout/src/typings/json-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IJsonSchema, IBasicJsonSchema } from '@flowgram.ai/form-materials'; export type BasicType = IBasicJsonSchema; diff --git a/apps/demo-free-layout/src/typings/node.ts b/apps/demo-free-layout/src/typings/node.ts index e54a49a4..7055fc1f 100644 --- a/apps/demo-free-layout/src/typings/node.ts +++ b/apps/demo-free-layout/src/typings/node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeJSON as FlowNodeJSONDefault, WorkflowNodeRegistry as FlowNodeRegistryDefault, diff --git a/apps/demo-free-layout/src/utils/index.ts b/apps/demo-free-layout/src/utils/index.ts index 6a4ffb59..f47fd127 100644 --- a/apps/demo-free-layout/src/utils/index.ts +++ b/apps/demo-free-layout/src/utils/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { onDragLineEnd } from './on-drag-line-end'; diff --git a/apps/demo-free-layout/src/utils/on-drag-line-end.ts b/apps/demo-free-layout/src/utils/on-drag-line-end.ts index 92cf4d28..0dc354ff 100644 --- a/apps/demo-free-layout/src/utils/on-drag-line-end.ts +++ b/apps/demo-free-layout/src/utils/on-drag-line-end.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodePanelService, WorkflowNodePanelUtils, diff --git a/apps/demo-nextjs-antd/.eslintrc.js b/apps/demo-nextjs-antd/.eslintrc.js index 08d7f75b..48cb2c50 100644 --- a/apps/demo-nextjs-antd/.eslintrc.js +++ b/apps/demo-nextjs-antd/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-nextjs-antd/next.config.ts b/apps/demo-nextjs-antd/next.config.ts index fc85415f..ca7d58ab 100644 --- a/apps/demo-nextjs-antd/next.config.ts +++ b/apps/demo-nextjs-antd/next.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import path from 'path'; import type { NextConfig } from 'next'; diff --git a/apps/demo-nextjs-antd/postcss.config.mjs b/apps/demo-nextjs-antd/postcss.config.mjs index ba720fe5..d18a7ef6 100644 --- a/apps/demo-nextjs-antd/postcss.config.mjs +++ b/apps/demo-nextjs-antd/postcss.config.mjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const config = { plugins: ['@tailwindcss/postcss'], }; diff --git a/apps/demo-nextjs-antd/src/app/globals.css b/apps/demo-nextjs-antd/src/app/globals.css index a2dc41ec..62acd9bf 100644 --- a/apps/demo-nextjs-antd/src/app/globals.css +++ b/apps/demo-nextjs-antd/src/app/globals.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + @import "tailwindcss"; :root { diff --git a/apps/demo-nextjs-antd/src/app/layout.tsx b/apps/demo-nextjs-antd/src/app/layout.tsx index ce9dc724..198bb7ff 100644 --- a/apps/demo-nextjs-antd/src/app/layout.tsx +++ b/apps/demo-nextjs-antd/src/app/layout.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Geist, Geist_Mono } from 'next/font/google'; import type { Metadata } from 'next'; import './globals.css'; diff --git a/apps/demo-nextjs-antd/src/app/page.tsx b/apps/demo-nextjs-antd/src/app/page.tsx index f9fb9a30..673cec56 100644 --- a/apps/demo-nextjs-antd/src/app/page.tsx +++ b/apps/demo-nextjs-antd/src/app/page.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { EditorClient } from '@editor/index'; diff --git a/apps/demo-nextjs-antd/src/editor/assets/icon-auto-layout.tsx b/apps/demo-nextjs-antd/src/editor/assets/icon-auto-layout.tsx index 6d1b1561..420b4b3f 100644 --- a/apps/demo-nextjs-antd/src/editor/assets/icon-auto-layout.tsx +++ b/apps/demo-nextjs-antd/src/editor/assets/icon-auto-layout.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const IconAutoLayout = ( ( diff --git a/apps/demo-nextjs-antd/src/editor/assets/icon-mouse.tsx b/apps/demo-nextjs-antd/src/editor/assets/icon-mouse.tsx index 05bdddd8..17d879a9 100644 --- a/apps/demo-nextjs-antd/src/editor/assets/icon-mouse.tsx +++ b/apps/demo-nextjs-antd/src/editor/assets/icon-mouse.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function IconMouse(props: { width?: number; height?: number }) { const { width, height } = props; return ( diff --git a/apps/demo-nextjs-antd/src/editor/assets/icon-pad.tsx b/apps/demo-nextjs-antd/src/editor/assets/icon-pad.tsx index e0382fde..45cf7416 100644 --- a/apps/demo-nextjs-antd/src/editor/assets/icon-pad.tsx +++ b/apps/demo-nextjs-antd/src/editor/assets/icon-pad.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function IconPad(props: { width?: number; height?: number }) { const { width, height } = props; return ( diff --git a/apps/demo-nextjs-antd/src/editor/assets/icon-switch-line.tsx b/apps/demo-nextjs-antd/src/editor/assets/icon-switch-line.tsx index d614e84c..53ba1ff6 100644 --- a/apps/demo-nextjs-antd/src/editor/assets/icon-switch-line.tsx +++ b/apps/demo-nextjs-antd/src/editor/assets/icon-switch-line.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const IconSwitchLine = ( ( diff --git a/apps/demo-nextjs-antd/src/editor/components/base-node/utils.ts b/apps/demo-nextjs-antd/src/editor/components/base-node/utils.ts index 3769e91a..5711f377 100644 --- a/apps/demo-nextjs-antd/src/editor/components/base-node/utils.ts +++ b/apps/demo-nextjs-antd/src/editor/components/base-node/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, FreeLayoutPluginContext } from '@flowgram.ai/free-layout-editor'; export function scrollToView( diff --git a/apps/demo-nextjs-antd/src/editor/components/editor-client.tsx b/apps/demo-nextjs-antd/src/editor/components/editor-client.tsx index 90828c12..2c9e35c0 100644 --- a/apps/demo-nextjs-antd/src/editor/components/editor-client.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/editor-client.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { useEffect, useState } from 'react'; diff --git a/apps/demo-nextjs-antd/src/editor/components/editor.tsx b/apps/demo-nextjs-antd/src/editor/components/editor.tsx index f4ad94af..42e7d99d 100644 --- a/apps/demo-nextjs-antd/src/editor/components/editor.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { EditorRenderer, FreeLayoutEditorProvider } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/form-render.tsx b/apps/demo-nextjs-antd/src/editor/components/form-render.tsx index 60ad493f..36b18719 100644 --- a/apps/demo-nextjs-antd/src/editor/components/form-render.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/form-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field } from '@flowgram.ai/free-layout-editor'; export const FormRender = () => ( diff --git a/apps/demo-nextjs-antd/src/editor/components/group/color.ts b/apps/demo-nextjs-antd/src/editor/components/group/color.ts index 4a079036..6a8852ba 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/color.ts +++ b/apps/demo-nextjs-antd/src/editor/components/group/color.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + type GroupColor = { '50': string; '300': string; diff --git a/apps/demo-nextjs-antd/src/editor/components/group/components/background.tsx b/apps/demo-nextjs-antd/src/editor/components/group/components/background.tsx index dc8f2278..ed504735 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/components/background.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/group/components/background.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { CSSProperties, FC, useEffect } from 'react'; import { WorkflowNodeEntity, useWatch } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/group/components/color.tsx b/apps/demo-nextjs-antd/src/editor/components/group/components/color.tsx index d87e63b0..e5df559b 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/components/color.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/group/components/color.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC } from 'react'; import { Popover, Tooltip } from 'antd'; diff --git a/apps/demo-nextjs-antd/src/editor/components/group/components/header.tsx b/apps/demo-nextjs-antd/src/editor/components/group/components/header.tsx index d7278ad0..4a7bc98e 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/components/header.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/group/components/header.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { CSSProperties, FC, MouseEvent, ReactNode } from 'react'; import { useWatch } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/group/components/icon-group.tsx b/apps/demo-nextjs-antd/src/editor/components/group/components/icon-group.tsx index 1a51409f..6dc6ebc4 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/components/icon-group.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/group/components/icon-group.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC } from 'react'; interface IconGroupProps { diff --git a/apps/demo-nextjs-antd/src/editor/components/group/components/index.ts b/apps/demo-nextjs-antd/src/editor/components/group/components/index.ts index f217671f..4bf46696 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/components/index.ts +++ b/apps/demo-nextjs-antd/src/editor/components/group/components/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { GroupNodeRender } from './node-render'; export { IconGroup } from './icon-group'; diff --git a/apps/demo-nextjs-antd/src/editor/components/group/components/node-render.tsx b/apps/demo-nextjs-antd/src/editor/components/group/components/node-render.tsx index b0775942..0800472f 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/components/node-render.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/group/components/node-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { diff --git a/apps/demo-nextjs-antd/src/editor/components/group/components/tips/global-store.ts b/apps/demo-nextjs-antd/src/editor/components/group/components/tips/global-store.ts index b9a18c50..0bbe0446 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/components/tips/global-store.ts +++ b/apps/demo-nextjs-antd/src/editor/components/group/components/tips/global-store.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention -- no need */ const STORAGE_KEY = 'workflow-move-into-group-tip-visible'; diff --git a/apps/demo-nextjs-antd/src/editor/components/group/components/tips/icon-close.tsx b/apps/demo-nextjs-antd/src/editor/components/group/components/tips/icon-close.tsx index 366a3fbf..21fe8b59 100644 --- a/apps/demo-nextjs-antd/src/editor/components/group/components/tips/icon-close.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/group/components/tips/icon-close.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const IconClose = () => ( ( diff --git a/apps/demo-nextjs-antd/src/editor/components/line-add-button/index.scss b/apps/demo-nextjs-antd/src/editor/components/line-add-button/index.scss index cd48bdb0..f36b734a 100644 --- a/apps/demo-nextjs-antd/src/editor/components/line-add-button/index.scss +++ b/apps/demo-nextjs-antd/src/editor/components/line-add-button/index.scss @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .line-add-button { position: absolute; transform: translate(-50%, -60%); diff --git a/apps/demo-nextjs-antd/src/editor/components/line-add-button/index.tsx b/apps/demo-nextjs-antd/src/editor/components/line-add-button/index.tsx index 18c46a44..63ac243d 100644 --- a/apps/demo-nextjs-antd/src/editor/components/line-add-button/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/line-add-button/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IconPlusCircle } from './button'; import './index.scss'; import { useVisible } from './use-visible'; diff --git a/apps/demo-nextjs-antd/src/editor/components/line-add-button/use-visible.ts b/apps/demo-nextjs-antd/src/editor/components/line-add-button/use-visible.ts index 29ade559..f0e3629b 100644 --- a/apps/demo-nextjs-antd/src/editor/components/line-add-button/use-visible.ts +++ b/apps/demo-nextjs-antd/src/editor/components/line-add-button/use-visible.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import './index.scss'; import { WorkflowLineEntity, usePlayground } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/blank-area.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/blank-area.tsx index 9e24e48a..3a4d6fc5 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/blank-area.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/blank-area.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { FC } from 'react'; import { useNodeRender, usePlayground } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/border-area.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/border-area.tsx index b60f3f95..f353a8ef 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/border-area.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/border-area.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FC } from 'react'; import type { CommentEditorModel } from '../model'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/container.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/container.tsx index 91de8631..3c99d968 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/container.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/container.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { CSSProperties, FC, ReactNode } from 'react'; interface ICommentContainer { diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/content-drag-area.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/content-drag-area.tsx index b129207b..8693dead 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/content-drag-area.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/content-drag-area.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FC, type WheelEventHandler, useEffect, useState } from 'react'; import { useNodeRender, usePlayground } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/drag-area.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/drag-area.tsx index 316e7b7b..89da7853 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/drag-area.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/drag-area.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { CSSProperties, type FC } from 'react'; import { useNodeRender, usePlayground } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/editor.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/editor.tsx index 1f0749de..64580fb9 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/editor.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type CSSProperties, type FC, useEffect, useRef } from 'react'; import { usePlayground } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/index.css b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/index.css index c0366328..6b2b74b7 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/index.css +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .workflow-comment { width: auto; height: auto; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/index.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/index.ts index 1666338e..c52ceeff 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/index.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import './index.css'; export { CommentRender } from './render'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/more-button.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/more-button.tsx index 4da1e843..5489be53 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/more-button.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/more-button.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { FC } from 'react'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/render.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/render.tsx index c4773ef4..28548bff 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/render.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC } from 'react'; import { diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/resize-area.tsx b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/resize-area.tsx index 8f12745e..b1355675 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/components/resize-area.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/components/resize-area.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { CSSProperties, type FC } from 'react'; import { useNodeRender, usePlayground } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/constant.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/constant.ts index 159b42e3..4b7a1baf 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/constant.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention -- enum */ export enum CommentEditorFormField { diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/index.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/index.ts index cc260e37..7db12165 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/index.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { useSize } from './use-size'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-model.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-model.ts index 5787c784..bb1ddd87 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-model.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-model.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useMemo } from 'react'; import { diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-overflow.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-overflow.ts index a0762c20..d39a4ddc 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-overflow.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-overflow.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useEffect, useState } from 'react'; import { usePlayground } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-size.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-size.ts index 7309c533..49e52390 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-size.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/hooks/use-size.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useEffect, useState } from 'react'; import { diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/index.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/index.ts index d840f324..80b8eb8b 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/index.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { CommentRender } from './components'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/model.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/model.ts index ce594949..7ad0fb9c 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/model.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/model.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Emitter } from '@flowgram.ai/free-layout-editor'; import { CommentEditorEventParams } from './type'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-comment/type.ts b/apps/demo-nextjs-antd/src/editor/components/node-comment/type.ts index 3de297cf..f8f77c43 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-comment/type.ts +++ b/apps/demo-nextjs-antd/src/editor/components/node-comment/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { CommentEditorEvent } from './constant'; interface CommentEditorChangeEvent { diff --git a/apps/demo-nextjs-antd/src/editor/components/node-menu/index.tsx b/apps/demo-nextjs-antd/src/editor/components/node-menu/index.tsx index f794c52a..8d8fd374 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-menu/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-menu/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC, type MouseEvent, useCallback, useState } from 'react'; import { Button, Dropdown } from 'antd'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-panel/index.scss b/apps/demo-nextjs-antd/src/editor/components/node-panel/index.scss index f45c45ca..f3d6df72 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-panel/index.scss +++ b/apps/demo-nextjs-antd/src/editor/components/node-panel/index.scss @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .node-placeholder { width: 360px; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-panel/index.tsx b/apps/demo-nextjs-antd/src/editor/components/node-panel/index.tsx index e5ef6a92..ab28e7cc 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-panel/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-panel/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import './index.scss'; import { FC } from 'react'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-panel/node-list.tsx b/apps/demo-nextjs-antd/src/editor/components/node-panel/node-list.tsx index a3058120..5e51f3ce 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-panel/node-list.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-panel/node-list.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { FC } from 'react'; import styled from 'styled-components'; diff --git a/apps/demo-nextjs-antd/src/editor/components/node-panel/node-placeholder.tsx b/apps/demo-nextjs-antd/src/editor/components/node-panel/node-placeholder.tsx index 5becd1de..ccc9cada 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-panel/node-placeholder.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-panel/node-placeholder.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Skeleton } from 'antd'; export const NodePlaceholder = () => ( diff --git a/apps/demo-nextjs-antd/src/editor/components/node-render.tsx b/apps/demo-nextjs-antd/src/editor/components/node-render.tsx index 9f0cd82d..2aca2f75 100644 --- a/apps/demo-nextjs-antd/src/editor/components/node-render.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/node-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import classnames from 'classnames'; import { WorkflowNodeProps, diff --git a/apps/demo-nextjs-antd/src/editor/components/selector-box-popover/index.tsx b/apps/demo-nextjs-antd/src/editor/components/selector-box-popover/index.tsx index 99e0c0a1..c6c1e726 100644 --- a/apps/demo-nextjs-antd/src/editor/components/selector-box-popover/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/selector-box-popover/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FunctionComponent } from 'react'; import { Button, Tooltip } from 'antd'; diff --git a/apps/demo-nextjs-antd/src/editor/components/sidebar/index.tsx b/apps/demo-nextjs-antd/src/editor/components/sidebar/index.tsx index 2afd32dc..ab8a549c 100644 --- a/apps/demo-nextjs-antd/src/editor/components/sidebar/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/sidebar/index.tsx @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { SidebarProvider } from './sidebar-provider'; export { SidebarRenderer } from './sidebar-renderer'; diff --git a/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-node-renderer.tsx b/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-node-renderer.tsx index 1b8ba346..c96d3dbd 100644 --- a/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-node-renderer.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-node-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, useNodeRender } from '@flowgram.ai/free-layout-editor'; import { NodeRenderContext } from '@editor/context'; diff --git a/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-provider.tsx b/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-provider.tsx index cc42be4f..b1fa67df 100644 --- a/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-provider.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-provider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { SidebarContext } from '@editor/context'; diff --git a/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-renderer.tsx b/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-renderer.tsx index 3f76692c..13e54f6e 100644 --- a/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-renderer.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/sidebar/sidebar-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useContext, useEffect, useMemo } from 'react'; import { Drawer } from 'antd'; diff --git a/apps/demo-nextjs-antd/src/editor/components/tools.tsx b/apps/demo-nextjs-antd/src/editor/components/tools.tsx index 9f0334c8..fa7f0455 100644 --- a/apps/demo-nextjs-antd/src/editor/components/tools.tsx +++ b/apps/demo-nextjs-antd/src/editor/components/tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + { /* TODO */ } diff --git a/apps/demo-nextjs-antd/src/editor/context/index.ts b/apps/demo-nextjs-antd/src/editor/context/index.ts index ca6c0067..9a623a6e 100644 --- a/apps/demo-nextjs-antd/src/editor/context/index.ts +++ b/apps/demo-nextjs-antd/src/editor/context/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { NodeRenderContext } from './node-render-context'; export { SidebarContext, IsSidebarContext } from './sidebar-context'; diff --git a/apps/demo-nextjs-antd/src/editor/context/node-render-context.ts b/apps/demo-nextjs-antd/src/editor/context/node-render-context.ts index 926016b2..ecd10be7 100644 --- a/apps/demo-nextjs-antd/src/editor/context/node-render-context.ts +++ b/apps/demo-nextjs-antd/src/editor/context/node-render-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import type { NodeRenderReturnType } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/context/sidebar-context.ts b/apps/demo-nextjs-antd/src/editor/context/sidebar-context.ts index 4f8f3158..b10a9b62 100644 --- a/apps/demo-nextjs-antd/src/editor/context/sidebar-context.ts +++ b/apps/demo-nextjs-antd/src/editor/context/sidebar-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export const SidebarContext = React.createContext<{ diff --git a/apps/demo-nextjs-antd/src/editor/data/initial-data.ts b/apps/demo-nextjs-antd/src/editor/data/initial-data.ts index 3815d4f5..e213534c 100644 --- a/apps/demo-nextjs-antd/src/editor/data/initial-data.ts +++ b/apps/demo-nextjs-antd/src/editor/data/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; export const initialData: WorkflowJSON = { diff --git a/apps/demo-nextjs-antd/src/editor/data/node-registries.ts b/apps/demo-nextjs-antd/src/editor/data/node-registries.ts index 84726008..f932bb27 100644 --- a/apps/demo-nextjs-antd/src/editor/data/node-registries.ts +++ b/apps/demo-nextjs-antd/src/editor/data/node-registries.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { FlowNodeRegistry } from '@editor/typings'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/feedback.tsx b/apps/demo-nextjs-antd/src/editor/form-components/feedback.tsx index 46802b65..9110fccc 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/feedback.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/feedback.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { FieldError, FieldState, FieldWarning } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-content/index.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-content/index.tsx index 5bb8c686..21874b7c 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-content/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-content/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import React from 'react'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-content/styles.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-content/styles.tsx index 9f81f119..cf81d8a1 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-content/styles.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-content/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const FormWrapper = styled.div` diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-header/index.scss b/apps/demo-nextjs-antd/src/editor/form-components/form-header/index.scss index 3122c77d..a2f97dd2 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-header/index.scss +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-header/index.scss @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .node-form-header { &-title { font-size: 20px; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-header/index.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-header/index.tsx index 6c2e6aa3..00daac8d 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-header/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-header/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import './index.scss'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-header/styles.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-header/styles.tsx index 8d2db191..8f5e4d58 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-header/styles.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-header/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Header = styled.div` diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-header/title-input.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-header/title-input.tsx index 992647ab..eddd5994 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-header/title-input.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-header/title-input.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useRef } from 'react'; import { Input, Typography } from 'antd'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-header/utils.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-header/utils.tsx index d2a7b082..497b1a57 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-header/utils.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-header/utils.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeEntity } from '@flowgram.ai/free-layout-editor'; import { FlowNodeRegistry } from '@editor/typings'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-inputs/index.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-inputs/index.tsx index 570d629e..2d9d7b85 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-inputs/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-inputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field } from '@flowgram.ai/free-layout-editor'; import { DynamicValueInput } from '@flowgram.ai/form-antd-materials'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-inputs/styles.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-inputs/styles.tsx index a92a565e..ce2e80ae 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-inputs/styles.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-inputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import styled from 'styled-components'; // TODO diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-item/index.css b/apps/demo-nextjs-antd/src/editor/form-components/form-item/index.css index 27b42da0..412bb002 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-item/index.css +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-item/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .form-item-type-tag { color: inherit; padding: 0 2px; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-item/index.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-item/index.tsx index 181da2aa..718d6ef2 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-item/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-item/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { TypeTag } from '../type-tag'; import './index.css'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-outputs/index.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-outputs/index.tsx index bd946011..d2f1f5b2 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-outputs/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-outputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field } from '@flowgram.ai/free-layout-editor'; import { JsonSchema } from '@editor/typings'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/form-outputs/styles.tsx b/apps/demo-nextjs-antd/src/editor/form-components/form-outputs/styles.tsx index 8dae9b4a..5fe1a879 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/form-outputs/styles.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/form-outputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const FormOutputsContainer = styled.div` diff --git a/apps/demo-nextjs-antd/src/editor/form-components/index.ts b/apps/demo-nextjs-antd/src/editor/form-components/index.ts index 597f3544..78647081 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/index.ts +++ b/apps/demo-nextjs-antd/src/editor/form-components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './feedback'; export * from './form-content'; export * from './form-outputs'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/index.tsx b/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/index.tsx index 549229f3..7053c45d 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState } from 'react'; import { Button } from 'antd'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/property-edit.tsx b/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/property-edit.tsx index f0874dbd..2f809aec 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/property-edit.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/property-edit.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useLayoutEffect, useState } from 'react'; import { Button, Input } from 'antd'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/styles.tsx b/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/styles.tsx index c2001874..2bb81132 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/styles.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/properties-edit/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Row = styled.div` diff --git a/apps/demo-nextjs-antd/src/editor/form-components/type-tag.tsx b/apps/demo-nextjs-antd/src/editor/form-components/type-tag.tsx index b0ceca51..87845b14 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/type-tag.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/type-tag.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { Tag, Tooltip } from 'antd'; import { ArrayIcons, VariableTypeIcons } from '@flowgram.ai/form-antd-materials'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/value-display/index.tsx b/apps/demo-nextjs-antd/src/editor/form-components/value-display/index.tsx index d37ee8fd..2d5f3e87 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/value-display/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/value-display/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import { TypeTag } from '../type-tag' import { ValueDisplayStyle } from './styles'; diff --git a/apps/demo-nextjs-antd/src/editor/form-components/value-display/styles.tsx b/apps/demo-nextjs-antd/src/editor/form-components/value-display/styles.tsx index 0a0bfe95..c37bd8f8 100644 --- a/apps/demo-nextjs-antd/src/editor/form-components/value-display/styles.tsx +++ b/apps/demo-nextjs-antd/src/editor/form-components/value-display/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const ValueDisplayStyle = styled.div` diff --git a/apps/demo-nextjs-antd/src/editor/hooks/index.ts b/apps/demo-nextjs-antd/src/editor/hooks/index.ts index f687af19..43aa82d2 100644 --- a/apps/demo-nextjs-antd/src/editor/hooks/index.ts +++ b/apps/demo-nextjs-antd/src/editor/hooks/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { useEditorProps } from './use-editor-props'; export { useNodeRenderContext } from './use-node-render-context'; export { useIsSidebar } from './use-is-sidebar'; diff --git a/apps/demo-nextjs-antd/src/editor/hooks/use-editor-props.tsx b/apps/demo-nextjs-antd/src/editor/hooks/use-editor-props.tsx index 5acaf08a..86ea32b3 100644 --- a/apps/demo-nextjs-antd/src/editor/hooks/use-editor-props.tsx +++ b/apps/demo-nextjs-antd/src/editor/hooks/use-editor-props.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { useMemo } from 'react'; diff --git a/apps/demo-nextjs-antd/src/editor/hooks/use-is-sidebar.ts b/apps/demo-nextjs-antd/src/editor/hooks/use-is-sidebar.ts index 65ce37d2..5451b94f 100644 --- a/apps/demo-nextjs-antd/src/editor/hooks/use-is-sidebar.ts +++ b/apps/demo-nextjs-antd/src/editor/hooks/use-is-sidebar.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext } from 'react'; import { IsSidebarContext } from '../context'; diff --git a/apps/demo-nextjs-antd/src/editor/hooks/use-node-render-context.ts b/apps/demo-nextjs-antd/src/editor/hooks/use-node-render-context.ts index b529b8c4..69bd9524 100644 --- a/apps/demo-nextjs-antd/src/editor/hooks/use-node-render-context.ts +++ b/apps/demo-nextjs-antd/src/editor/hooks/use-node-render-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext } from 'react'; import { NodeRenderContext } from '../context'; diff --git a/apps/demo-nextjs-antd/src/editor/index.ts b/apps/demo-nextjs-antd/src/editor/index.ts index 63ab1a8f..7260d716 100644 --- a/apps/demo-nextjs-antd/src/editor/index.ts +++ b/apps/demo-nextjs-antd/src/editor/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import './style/index.css'; export { EditorClient } from './components/editor-client'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/comment/index.tsx b/apps/demo-nextjs-antd/src/editor/nodes/comment/index.tsx index f15f2c05..c8776111 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/comment/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/nodes/comment/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { FlowNodeRegistry } from '@editor/typings'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/condition/condition-inputs/index.tsx b/apps/demo-nextjs-antd/src/editor/nodes/condition/condition-inputs/index.tsx index c063c933..e2cbe04b 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/condition/condition-inputs/index.tsx +++ b/apps/demo-nextjs-antd/src/editor/nodes/condition/condition-inputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { Button } from 'antd'; import { Field, FieldArray } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/condition/condition-inputs/styles.tsx b/apps/demo-nextjs-antd/src/editor/nodes/condition/condition-inputs/styles.tsx index 0434dc89..c14d14e1 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/condition/condition-inputs/styles.tsx +++ b/apps/demo-nextjs-antd/src/editor/nodes/condition/condition-inputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const ConditionPort = styled.div` diff --git a/apps/demo-nextjs-antd/src/editor/nodes/condition/form-meta.tsx b/apps/demo-nextjs-antd/src/editor/nodes/condition/form-meta.tsx index f73e41d1..205bfaee 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/condition/form-meta.tsx +++ b/apps/demo-nextjs-antd/src/editor/nodes/condition/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormMeta, FormRenderProps, ValidateTrigger } from '@flowgram.ai/free-layout-editor'; import { FlowNodeJSON } from '@editor/typings'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/condition/index.ts b/apps/demo-nextjs-antd/src/editor/nodes/condition/index.ts index 6e0db3d9..17b6825b 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/condition/index.ts +++ b/apps/demo-nextjs-antd/src/editor/nodes/condition/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '@editor/typings'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/constants.ts b/apps/demo-nextjs-antd/src/editor/nodes/constants.ts index d598ad96..3bd4f8bb 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/constants.ts +++ b/apps/demo-nextjs-antd/src/editor/nodes/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum WorkflowNodeType { Start = 'start', End = 'end', diff --git a/apps/demo-nextjs-antd/src/editor/nodes/default-form-meta.tsx b/apps/demo-nextjs-antd/src/editor/nodes/default-form-meta.tsx index 357f5bc4..9fb9e849 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/default-form-meta.tsx +++ b/apps/demo-nextjs-antd/src/editor/nodes/default-form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormMeta, FormRenderProps, ValidateTrigger } from '@flowgram.ai/free-layout-editor'; import { autoRenameRefEffect } from '@flowgram.ai/form-antd-materials'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/end/form-meta.tsx b/apps/demo-nextjs-antd/src/editor/nodes/end/form-meta.tsx index a8926d4a..bbdd687f 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/end/form-meta.tsx +++ b/apps/demo-nextjs-antd/src/editor/nodes/end/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { mapValues } from 'lodash-es'; import { Field, FieldRenderProps, FormMeta } from '@flowgram.ai/free-layout-editor'; import { IFlowValue } from '@flowgram.ai/form-antd-materials'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/end/index.ts b/apps/demo-nextjs-antd/src/editor/nodes/end/index.ts index cbdb5bfc..9fe6580a 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/end/index.ts +++ b/apps/demo-nextjs-antd/src/editor/nodes/end/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry } from '@editor/typings'; import { WorkflowNodeType } from '../constants'; import iconEnd from '../../assets/icon-end.jpg'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/index.ts b/apps/demo-nextjs-antd/src/editor/nodes/index.ts index 2181119e..6f42f962 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/index.ts +++ b/apps/demo-nextjs-antd/src/editor/nodes/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; // import { FlowNodeRegistry } from '../typings'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/llm/index.ts b/apps/demo-nextjs-antd/src/editor/nodes/llm/index.ts index 99e89baf..b32e3f84 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/llm/index.ts +++ b/apps/demo-nextjs-antd/src/editor/nodes/llm/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeRegistry } from '@editor/typings'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/loop/index.ts b/apps/demo-nextjs-antd/src/editor/nodes/loop/index.ts index df64c74d..f1c46c66 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/loop/index.ts +++ b/apps/demo-nextjs-antd/src/editor/nodes/loop/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { FlowNodeTransformData, diff --git a/apps/demo-nextjs-antd/src/editor/nodes/loop/loop-form-render.tsx b/apps/demo-nextjs-antd/src/editor/nodes/loop/loop-form-render.tsx index d0f597a0..7545296b 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/loop/loop-form-render.tsx +++ b/apps/demo-nextjs-antd/src/editor/nodes/loop/loop-form-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field, FlowNodeJSON, FormRenderProps } from '@flowgram.ai/free-layout-editor'; import { SubCanvasRender } from '@flowgram.ai/free-container-plugin'; import { BatchVariableSelector, IFlowRefValue } from '@flowgram.ai/form-antd-materials'; diff --git a/apps/demo-nextjs-antd/src/editor/nodes/start/form-meta.tsx b/apps/demo-nextjs-antd/src/editor/nodes/start/form-meta.tsx index c1e48325..d31f07d7 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/start/form-meta.tsx +++ b/apps/demo-nextjs-antd/src/editor/nodes/start/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { diff --git a/apps/demo-nextjs-antd/src/editor/nodes/start/index.ts b/apps/demo-nextjs-antd/src/editor/nodes/start/index.ts index 16f6e2ee..61471425 100644 --- a/apps/demo-nextjs-antd/src/editor/nodes/start/index.ts +++ b/apps/demo-nextjs-antd/src/editor/nodes/start/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { FlowNodeRegistry } from '@editor/typings'; diff --git a/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/context-menu-layer.tsx b/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/context-menu-layer.tsx index 10fbd42d..5629ab6b 100644 --- a/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/context-menu-layer.tsx +++ b/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/context-menu-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { NodePanelResult, WorkflowNodePanelService } from '@flowgram.ai/free-node-panel-plugin'; import { Layer, diff --git a/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/context-menu-plugin.ts b/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/context-menu-plugin.ts index b4545855..d2664221 100644 --- a/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/context-menu-plugin.ts +++ b/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/context-menu-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, PluginCreator, diff --git a/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/index.ts b/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/index.ts index 9940298d..70ba9071 100644 --- a/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/index.ts +++ b/apps/demo-nextjs-antd/src/editor/plugins/context-menu-plugin/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createContextMenuPlugin } from './context-menu-plugin'; diff --git a/apps/demo-nextjs-antd/src/editor/plugins/index.ts b/apps/demo-nextjs-antd/src/editor/plugins/index.ts index 0376fd87..3ffd1d9a 100644 --- a/apps/demo-nextjs-antd/src/editor/plugins/index.ts +++ b/apps/demo-nextjs-antd/src/editor/plugins/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createSyncVariablePlugin } from './sync-variable-plugin/sync-variable-plugin'; export { createContextMenuPlugin } from './context-menu-plugin'; diff --git a/apps/demo-nextjs-antd/src/editor/plugins/sync-variable-plugin/index.ts b/apps/demo-nextjs-antd/src/editor/plugins/sync-variable-plugin/index.ts index 3fbb018d..d54b2c22 100644 --- a/apps/demo-nextjs-antd/src/editor/plugins/sync-variable-plugin/index.ts +++ b/apps/demo-nextjs-antd/src/editor/plugins/sync-variable-plugin/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './sync-variable-plugin'; diff --git a/apps/demo-nextjs-antd/src/editor/plugins/sync-variable-plugin/sync-variable-plugin.ts b/apps/demo-nextjs-antd/src/editor/plugins/sync-variable-plugin/sync-variable-plugin.ts index 02151bfe..d5c8a10d 100644 --- a/apps/demo-nextjs-antd/src/editor/plugins/sync-variable-plugin/sync-variable-plugin.ts +++ b/apps/demo-nextjs-antd/src/editor/plugins/sync-variable-plugin/sync-variable-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/collapse/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/collapse/index.ts index 977e0b51..747efc5c 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/collapse/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/collapse/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, ShortcutsHandler, diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/constants.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/constants.ts index 735297c1..8a9db30d 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/constants.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const WorkflowClipboardDataID = 'flowgram-workflow-clipboard-data'; export enum FlowCommandId { diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/copy/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/copy/index.ts index e523e3f0..3907bbee 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/copy/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/copy/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { message as Toast } from 'antd'; import { FreeLayoutPluginContext, diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/delete/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/delete/index.ts index 5465d9f7..abff834b 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/delete/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/delete/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { message as Toast } from 'antd'; import { FreeLayoutPluginContext, diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/expand/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/expand/index.ts index f59dac9f..cb2bb6df 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/expand/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/expand/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, ShortcutsHandler, diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/index.ts index 84b2b382..a28144c8 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './constants'; export * from './shortcuts'; diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/paste/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/paste/index.ts index b41a4dee..81ea46bb 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/paste/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/paste/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { message as Toast } from 'antd'; import { EntityManager, diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/paste/traverse.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/paste/traverse.ts index 7d2c2286..296fd024 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/paste/traverse.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/paste/traverse.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // traverse value type - 遍历值类型 export type TraverseValue = any; diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/paste/unique-workflow.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/paste/unique-workflow.ts index acf67f2e..5434a86d 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/paste/unique-workflow.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/paste/unique-workflow.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { customAlphabet } from 'nanoid'; import type { WorkflowJSON, WorkflowNodeJSON } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/select-all/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/select-all/index.ts index e70029d6..3a60094b 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/select-all/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/select-all/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, Playground, diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/shortcuts.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/shortcuts.ts index 7228c708..6b66dafe 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/shortcuts.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/shortcuts.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, ShortcutsRegistry } from '@flowgram.ai/free-layout-editor'; import { ZoomOutShortcut } from './zoom-out'; diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/type.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/type.ts index 175fcaec..80ebd204 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/type.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; import type { WorkflowClipboardDataID } from './constants'; diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/zoom-in/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/zoom-in/index.ts index 55d43455..ad10cc8d 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/zoom-in/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/zoom-in/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, PlaygroundConfigEntity, diff --git a/apps/demo-nextjs-antd/src/editor/shortcuts/zoom-out/index.ts b/apps/demo-nextjs-antd/src/editor/shortcuts/zoom-out/index.ts index a4bab37f..518b2811 100644 --- a/apps/demo-nextjs-antd/src/editor/shortcuts/zoom-out/index.ts +++ b/apps/demo-nextjs-antd/src/editor/shortcuts/zoom-out/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FreeLayoutPluginContext, PlaygroundConfigEntity, diff --git a/apps/demo-nextjs-antd/src/editor/style/index.css b/apps/demo-nextjs-antd/src/editor/style/index.css index 74425001..e38bc057 100644 --- a/apps/demo-nextjs-antd/src/editor/style/index.css +++ b/apps/demo-nextjs-antd/src/editor/style/index.css @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + @import './var.css'; diff --git a/apps/demo-nextjs-antd/src/editor/style/var.css b/apps/demo-nextjs-antd/src/editor/style/var.css index 904bdd4d..92d231f6 100644 --- a/apps/demo-nextjs-antd/src/editor/style/var.css +++ b/apps/demo-nextjs-antd/src/editor/style/var.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + :root { --node-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.04), 0 4px 12px 0 rgba(0, 0, 0, 0.02); diff --git a/apps/demo-nextjs-antd/src/editor/typings/flow-value/index.ts b/apps/demo-nextjs-antd/src/editor/typings/flow-value/index.ts index 6627f3fe..ebafeb6c 100644 --- a/apps/demo-nextjs-antd/src/editor/typings/flow-value/index.ts +++ b/apps/demo-nextjs-antd/src/editor/typings/flow-value/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface IFlowConstantValue { type: 'constant'; content?: string | number | boolean; diff --git a/apps/demo-nextjs-antd/src/editor/typings/index.ts b/apps/demo-nextjs-antd/src/editor/typings/index.ts index 70f1cc22..aed47fdd 100644 --- a/apps/demo-nextjs-antd/src/editor/typings/index.ts +++ b/apps/demo-nextjs-antd/src/editor/typings/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './node'; export * from './json-schema'; export * from './flow-value'; diff --git a/apps/demo-nextjs-antd/src/editor/typings/json-schema/index.ts b/apps/demo-nextjs-antd/src/editor/typings/json-schema/index.ts index 250a9275..592d874c 100644 --- a/apps/demo-nextjs-antd/src/editor/typings/json-schema/index.ts +++ b/apps/demo-nextjs-antd/src/editor/typings/json-schema/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IJsonSchema, IBasicJsonSchema } from '@flowgram.ai/form-antd-materials'; export type BasicType = IBasicJsonSchema; diff --git a/apps/demo-nextjs-antd/src/editor/typings/node.ts b/apps/demo-nextjs-antd/src/editor/typings/node.ts index 761c8ed0..ae60e2ff 100644 --- a/apps/demo-nextjs-antd/src/editor/typings/node.ts +++ b/apps/demo-nextjs-antd/src/editor/typings/node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { StaticImageData } from 'next/image'; import { FlowNodeEntity, diff --git a/apps/demo-nextjs-antd/src/editor/utils/index.ts b/apps/demo-nextjs-antd/src/editor/utils/index.ts index 6a4ffb59..f47fd127 100644 --- a/apps/demo-nextjs-antd/src/editor/utils/index.ts +++ b/apps/demo-nextjs-antd/src/editor/utils/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { onDragLineEnd } from './on-drag-line-end'; diff --git a/apps/demo-nextjs-antd/src/editor/utils/on-drag-line-end.ts b/apps/demo-nextjs-antd/src/editor/utils/on-drag-line-end.ts index 54f4d3e9..0d9f3c52 100644 --- a/apps/demo-nextjs-antd/src/editor/utils/on-drag-line-end.ts +++ b/apps/demo-nextjs-antd/src/editor/utils/on-drag-line-end.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodePanelService, WorkflowNodePanelUtils, diff --git a/apps/demo-nextjs/.eslintrc.js b/apps/demo-nextjs/.eslintrc.js index 08d7f75b..48cb2c50 100644 --- a/apps/demo-nextjs/.eslintrc.js +++ b/apps/demo-nextjs/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-nextjs/next.config.ts b/apps/demo-nextjs/next.config.ts index 70444622..d08461ee 100644 --- a/apps/demo-nextjs/next.config.ts +++ b/apps/demo-nextjs/next.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import path from 'path'; import type { NextConfig } from 'next'; diff --git a/apps/demo-nextjs/postcss.config.mjs b/apps/demo-nextjs/postcss.config.mjs index ba720fe5..d18a7ef6 100644 --- a/apps/demo-nextjs/postcss.config.mjs +++ b/apps/demo-nextjs/postcss.config.mjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const config = { plugins: ['@tailwindcss/postcss'], }; diff --git a/apps/demo-nextjs/src/app/api/runtime/route.ts b/apps/demo-nextjs/src/app/api/runtime/route.ts index ec22dfd8..a9bcfcca 100644 --- a/apps/demo-nextjs/src/app/api/runtime/route.ts +++ b/apps/demo-nextjs/src/app/api/runtime/route.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { NextResponse } from 'next/server'; import { main } from '../../../runtime'; diff --git a/apps/demo-nextjs/src/app/globals.css b/apps/demo-nextjs/src/app/globals.css index a2dc41ec..62acd9bf 100644 --- a/apps/demo-nextjs/src/app/globals.css +++ b/apps/demo-nextjs/src/app/globals.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + @import "tailwindcss"; :root { diff --git a/apps/demo-nextjs/src/app/layout.tsx b/apps/demo-nextjs/src/app/layout.tsx index ce9dc724..198bb7ff 100644 --- a/apps/demo-nextjs/src/app/layout.tsx +++ b/apps/demo-nextjs/src/app/layout.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Geist, Geist_Mono } from 'next/font/google'; import type { Metadata } from 'next'; import './globals.css'; diff --git a/apps/demo-nextjs/src/app/page.tsx b/apps/demo-nextjs/src/app/page.tsx index f9fb9a30..673cec56 100644 --- a/apps/demo-nextjs/src/app/page.tsx +++ b/apps/demo-nextjs/src/app/page.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { EditorClient } from '@editor/index'; diff --git a/apps/demo-nextjs/src/editor/components/editor-client.tsx b/apps/demo-nextjs/src/editor/components/editor-client.tsx index 499b059a..a6991a49 100644 --- a/apps/demo-nextjs/src/editor/components/editor-client.tsx +++ b/apps/demo-nextjs/src/editor/components/editor-client.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { useEffect, useState } from 'react'; diff --git a/apps/demo-nextjs/src/editor/components/editor.tsx b/apps/demo-nextjs/src/editor/components/editor.tsx index 2932db7d..bdbbb514 100644 --- a/apps/demo-nextjs/src/editor/components/editor.tsx +++ b/apps/demo-nextjs/src/editor/components/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EditorRenderer, FreeLayoutEditorProvider } from '@flowgram.ai/free-layout-editor'; import '@flowgram.ai/free-layout-editor/index.css'; diff --git a/apps/demo-nextjs/src/editor/components/form-render.tsx b/apps/demo-nextjs/src/editor/components/form-render.tsx index 60ad493f..36b18719 100644 --- a/apps/demo-nextjs/src/editor/components/form-render.tsx +++ b/apps/demo-nextjs/src/editor/components/form-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field } from '@flowgram.ai/free-layout-editor'; export const FormRender = () => ( diff --git a/apps/demo-nextjs/src/editor/components/node-render.tsx b/apps/demo-nextjs/src/editor/components/node-render.tsx index 30c0d7de..d367cf26 100644 --- a/apps/demo-nextjs/src/editor/components/node-render.tsx +++ b/apps/demo-nextjs/src/editor/components/node-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import classnames from 'classnames'; import { useNodeRender, diff --git a/apps/demo-nextjs/src/editor/components/tools.tsx b/apps/demo-nextjs/src/editor/components/tools.tsx index 76da699c..3d1e222b 100644 --- a/apps/demo-nextjs/src/editor/components/tools.tsx +++ b/apps/demo-nextjs/src/editor/components/tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState } from 'react'; import { useService, WorkflowDocument } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs/src/editor/data/initial-data.ts b/apps/demo-nextjs/src/editor/data/initial-data.ts index e23756e0..cb989cbc 100644 --- a/apps/demo-nextjs/src/editor/data/initial-data.ts +++ b/apps/demo-nextjs/src/editor/data/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; export const initialData: WorkflowJSON = { diff --git a/apps/demo-nextjs/src/editor/data/node-registries.ts b/apps/demo-nextjs/src/editor/data/node-registries.ts index 703a1f60..9b342cb8 100644 --- a/apps/demo-nextjs/src/editor/data/node-registries.ts +++ b/apps/demo-nextjs/src/editor/data/node-registries.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeRegistry } from '@flowgram.ai/free-layout-editor'; /** diff --git a/apps/demo-nextjs/src/editor/hooks/index.ts b/apps/demo-nextjs/src/editor/hooks/index.ts index a7f481d9..c2cf17a3 100644 --- a/apps/demo-nextjs/src/editor/hooks/index.ts +++ b/apps/demo-nextjs/src/editor/hooks/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { useEditorProps } from './use-editor-props'; diff --git a/apps/demo-nextjs/src/editor/hooks/use-editor-props.tsx b/apps/demo-nextjs/src/editor/hooks/use-editor-props.tsx index a8ee79f6..e0200cd6 100644 --- a/apps/demo-nextjs/src/editor/hooks/use-editor-props.tsx +++ b/apps/demo-nextjs/src/editor/hooks/use-editor-props.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { createMinimapPlugin } from '@flowgram.ai/minimap-plugin'; diff --git a/apps/demo-nextjs/src/editor/index.ts b/apps/demo-nextjs/src/editor/index.ts index 63ab1a8f..7260d716 100644 --- a/apps/demo-nextjs/src/editor/index.ts +++ b/apps/demo-nextjs/src/editor/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import './style/index.css'; export { EditorClient } from './components/editor-client'; diff --git a/apps/demo-nextjs/src/editor/style/index.css b/apps/demo-nextjs/src/editor/style/index.css index 68830d08..51c9b0b3 100644 --- a/apps/demo-nextjs/src/editor/style/index.css +++ b/apps/demo-nextjs/src/editor/style/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + @import 'tailwindcss'; @import './theme.css'; @import './var.css'; diff --git a/apps/demo-nextjs/src/editor/style/theme.css b/apps/demo-nextjs/src/editor/style/theme.css index 0f4ce9e5..bb12cd1e 100644 --- a/apps/demo-nextjs/src/editor/style/theme.css +++ b/apps/demo-nextjs/src/editor/style/theme.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + @import 'tailwindcss'; @theme { diff --git a/apps/demo-nextjs/src/editor/style/var.css b/apps/demo-nextjs/src/editor/style/var.css index c26a662a..994ecab3 100644 --- a/apps/demo-nextjs/src/editor/style/var.css +++ b/apps/demo-nextjs/src/editor/style/var.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + :root { --node-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.04), 0 4px 12px 0 rgba(0, 0, 0, 0.02); diff --git a/apps/demo-nextjs/src/runtime/index.ts b/apps/demo-nextjs/src/runtime/index.ts index 63b406f1..74fb244a 100644 --- a/apps/demo-nextjs/src/runtime/index.ts +++ b/apps/demo-nextjs/src/runtime/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './models'; export { main } from './main'; diff --git a/apps/demo-nextjs/src/runtime/main.ts b/apps/demo-nextjs/src/runtime/main.ts index 4521eb7f..239bc1ad 100644 --- a/apps/demo-nextjs/src/runtime/main.ts +++ b/apps/demo-nextjs/src/runtime/main.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'server-only'; import { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-nextjs/src/runtime/models/index.ts b/apps/demo-nextjs/src/runtime/models/index.ts index 2bc3e791..09bab853 100644 --- a/apps/demo-nextjs/src/runtime/models/index.ts +++ b/apps/demo-nextjs/src/runtime/models/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './runtime'; diff --git a/apps/demo-nextjs/src/runtime/models/runtime/index.ts b/apps/demo-nextjs/src/runtime/models/runtime/index.ts index 0745e192..75134ca5 100644 --- a/apps/demo-nextjs/src/runtime/models/runtime/index.ts +++ b/apps/demo-nextjs/src/runtime/models/runtime/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowRuntimeModel } from './model'; export type { IWorkflowRuntimeModel } from './type'; diff --git a/apps/demo-nextjs/src/runtime/models/runtime/model.ts b/apps/demo-nextjs/src/runtime/models/runtime/model.ts index a6307295..d4c8b1b1 100644 --- a/apps/demo-nextjs/src/runtime/models/runtime/model.ts +++ b/apps/demo-nextjs/src/runtime/models/runtime/model.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IWorkflowRuntimeModel } from './type'; export class WorkflowRuntimeModel implements IWorkflowRuntimeModel { diff --git a/apps/demo-nextjs/src/runtime/models/runtime/type.ts b/apps/demo-nextjs/src/runtime/models/runtime/type.ts index 7f8357f2..040c6fa1 100644 --- a/apps/demo-nextjs/src/runtime/models/runtime/type.ts +++ b/apps/demo-nextjs/src/runtime/models/runtime/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface IWorkflowRuntimeModel { run: () => Promise; } diff --git a/apps/demo-node-form/.eslintrc.js b/apps/demo-node-form/.eslintrc.js index 9f8bd759..8becb8c2 100644 --- a/apps/demo-node-form/.eslintrc.js +++ b/apps/demo-node-form/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-node-form/rsbuild.config.ts b/apps/demo-node-form/rsbuild.config.ts index cb6fc557..7dd6381a 100644 --- a/apps/demo-node-form/rsbuild.config.ts +++ b/apps/demo-node-form/rsbuild.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { pluginReact } from '@rsbuild/plugin-react'; import { defineConfig } from '@rsbuild/core'; diff --git a/apps/demo-node-form/src/app.tsx b/apps/demo-node-form/src/app.tsx index 150c56b5..4e74a311 100644 --- a/apps/demo-node-form/src/app.tsx +++ b/apps/demo-node-form/src/app.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createRoot } from 'react-dom/client'; import { Editor } from './editor'; diff --git a/apps/demo-node-form/src/components/field-title.tsx b/apps/demo-node-form/src/components/field-title.tsx index 3bc680d9..b20c61c4 100644 --- a/apps/demo-node-form/src/components/field-title.tsx +++ b/apps/demo-node-form/src/components/field-title.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const FieldTitle = styled.div` diff --git a/apps/demo-node-form/src/components/field-wrapper.css b/apps/demo-node-form/src/components/field-wrapper.css index 0963e991..650bf746 100644 --- a/apps/demo-node-form/src/components/field-wrapper.css +++ b/apps/demo-node-form/src/components/field-wrapper.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .error-message { color: #f5222d !important; } diff --git a/apps/demo-node-form/src/components/field-wrapper.tsx b/apps/demo-node-form/src/components/field-wrapper.tsx index c315da5b..bbafb730 100644 --- a/apps/demo-node-form/src/components/field-wrapper.tsx +++ b/apps/demo-node-form/src/components/field-wrapper.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import './field-wrapper.css'; diff --git a/apps/demo-node-form/src/components/index.ts b/apps/demo-node-form/src/components/index.ts index f04829e6..fd6cb68c 100644 --- a/apps/demo-node-form/src/components/index.ts +++ b/apps/demo-node-form/src/components/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FieldTitle } from './field-title'; export { FieldWrapper } from './field-wrapper'; diff --git a/apps/demo-node-form/src/constant.ts b/apps/demo-node-form/src/constant.ts index 10e47e68..23a7fa6f 100644 --- a/apps/demo-node-form/src/constant.ts +++ b/apps/demo-node-form/src/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const fieldWrapperTs = `import React from 'react'; import './field-wrapper.css'; diff --git a/apps/demo-node-form/src/editor.tsx b/apps/demo-node-form/src/editor.tsx index ad395ec6..6c8ce132 100644 --- a/apps/demo-node-form/src/editor.tsx +++ b/apps/demo-node-form/src/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EditorRenderer, FlowNodeRegistry, diff --git a/apps/demo-node-form/src/form-meta.tsx b/apps/demo-node-form/src/form-meta.tsx index 8cf213e0..e1224a71 100644 --- a/apps/demo-node-form/src/form-meta.tsx +++ b/apps/demo-node-form/src/form-meta.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field, FieldRenderProps, diff --git a/apps/demo-node-form/src/hooks/use-editor-props.tsx b/apps/demo-node-form/src/hooks/use-editor-props.tsx index 5184355b..cb4bdf3c 100644 --- a/apps/demo-node-form/src/hooks/use-editor-props.tsx +++ b/apps/demo-node-form/src/hooks/use-editor-props.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { createMinimapPlugin } from '@flowgram.ai/minimap-plugin'; diff --git a/apps/demo-node-form/src/index.css b/apps/demo-node-form/src/index.css index 15728111..d22e81c6 100644 --- a/apps/demo-node-form/src/index.css +++ b/apps/demo-node-form/src/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .demo-free-node { display: flex; min-width: 300px; diff --git a/apps/demo-node-form/src/index.tsx b/apps/demo-node-form/src/index.tsx index ecd5a5c2..8e5a87c9 100644 --- a/apps/demo-node-form/src/index.tsx +++ b/apps/demo-node-form/src/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Editor } from './editor'; export { FieldTitle, FieldWrapper } from './components'; export { DEFAULT_FORM_META } from './form-meta'; diff --git a/apps/demo-node-form/src/initial-data.ts b/apps/demo-node-form/src/initial-data.ts index 0a0c8cdb..e7662658 100644 --- a/apps/demo-node-form/src/initial-data.ts +++ b/apps/demo-node-form/src/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; export const DEFAULT_INITIAL_DATA: WorkflowJSON = { diff --git a/apps/demo-node-form/src/node-registries.tsx b/apps/demo-node-form/src/node-registries.tsx index 1afa4cab..3041e83f 100644 --- a/apps/demo-node-form/src/node-registries.tsx +++ b/apps/demo-node-form/src/node-registries.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeRegistry } from '@flowgram.ai/free-layout-editor'; import { DEFAULT_FORM_META } from './form-meta'; diff --git a/apps/demo-playground/.eslintrc.js b/apps/demo-playground/.eslintrc.js index 9f8bd759..8becb8c2 100644 --- a/apps/demo-playground/.eslintrc.js +++ b/apps/demo-playground/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-playground/rsbuild.config.ts b/apps/demo-playground/rsbuild.config.ts index bc018825..818507c1 100644 --- a/apps/demo-playground/rsbuild.config.ts +++ b/apps/demo-playground/rsbuild.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { pluginReact } from '@rsbuild/plugin-react'; import { defineConfig } from '@rsbuild/core'; diff --git a/apps/demo-playground/src/components/card.tsx b/apps/demo-playground/src/components/card.tsx index 0f9ac59f..72664269 100644 --- a/apps/demo-playground/src/components/card.tsx +++ b/apps/demo-playground/src/components/card.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback, useState } from 'react'; import { usePlayground, usePlaygroundDrag } from '@flowgram.ai/playground-react'; diff --git a/apps/demo-playground/src/components/playground-tools.tsx b/apps/demo-playground/src/components/playground-tools.tsx index 96021d73..43b30e0d 100644 --- a/apps/demo-playground/src/components/playground-tools.tsx +++ b/apps/demo-playground/src/components/playground-tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { usePlaygroundTools } from '@flowgram.ai/playground-react'; diff --git a/apps/demo-playground/src/index.tsx b/apps/demo-playground/src/index.tsx index 30af2e0c..99c8870a 100644 --- a/apps/demo-playground/src/index.tsx +++ b/apps/demo-playground/src/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { createRoot } from 'react-dom/client'; diff --git a/apps/demo-react-16/.eslintrc.js b/apps/demo-react-16/.eslintrc.js index 0505b186..eb6c8cd1 100644 --- a/apps/demo-react-16/.eslintrc.js +++ b/apps/demo-react-16/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-react-16/rsbuild.config.ts b/apps/demo-react-16/rsbuild.config.ts index dec36fe9..2790fec7 100644 --- a/apps/demo-react-16/rsbuild.config.ts +++ b/apps/demo-react-16/rsbuild.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import path from 'node:path'; import { pluginReact } from '@rsbuild/plugin-react'; diff --git a/apps/demo-react-16/src/app.tsx b/apps/demo-react-16/src/app.tsx index 71e859fb..7cfd9558 100644 --- a/apps/demo-react-16/src/app.tsx +++ b/apps/demo-react-16/src/app.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import ReactDOM from 'react-dom'; import React from 'react'; console.log(React.version); diff --git a/apps/demo-react-16/src/components/minimap.tsx b/apps/demo-react-16/src/components/minimap.tsx index 3cd95aef..892a590a 100644 --- a/apps/demo-react-16/src/components/minimap.tsx +++ b/apps/demo-react-16/src/components/minimap.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { FlowMinimapService, MinimapRender } from '@flowgram.ai/minimap-plugin'; diff --git a/apps/demo-react-16/src/components/node-add-panel.tsx b/apps/demo-react-16/src/components/node-add-panel.tsx index ba7ede20..b38d50c8 100644 --- a/apps/demo-react-16/src/components/node-add-panel.tsx +++ b/apps/demo-react-16/src/components/node-add-panel.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { WorkflowDragService, useService } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-react-16/src/components/tools.tsx b/apps/demo-react-16/src/components/tools.tsx index 3bb708b9..ff45cd41 100644 --- a/apps/demo-react-16/src/components/tools.tsx +++ b/apps/demo-react-16/src/components/tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { useEffect, useState } from 'react'; diff --git a/apps/demo-react-16/src/editor.tsx b/apps/demo-react-16/src/editor.tsx index 33ecb2fe..523a5856 100644 --- a/apps/demo-react-16/src/editor.tsx +++ b/apps/demo-react-16/src/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { EditorRenderer, FreeLayoutEditorProvider } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-react-16/src/hooks/use-editor-props.tsx b/apps/demo-react-16/src/hooks/use-editor-props.tsx index e7182e83..51469e3e 100644 --- a/apps/demo-react-16/src/hooks/use-editor-props.tsx +++ b/apps/demo-react-16/src/hooks/use-editor-props.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { createMinimapPlugin } from '@flowgram.ai/minimap-plugin'; diff --git a/apps/demo-react-16/src/index.css b/apps/demo-react-16/src/index.css index c76cebfb..f829ac0b 100644 --- a/apps/demo-react-16/src/index.css +++ b/apps/demo-react-16/src/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .demo-free-node { display: flex; min-width: 300px; diff --git a/apps/demo-react-16/src/index.tsx b/apps/demo-react-16/src/index.tsx index c38080e9..5b7e3f86 100644 --- a/apps/demo-react-16/src/index.tsx +++ b/apps/demo-react-16/src/index.tsx @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Editor as DemoFreeLayout } from './editor'; diff --git a/apps/demo-react-16/src/initial-data.ts b/apps/demo-react-16/src/initial-data.ts index e23756e0..cb989cbc 100644 --- a/apps/demo-react-16/src/initial-data.ts +++ b/apps/demo-react-16/src/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; export const initialData: WorkflowJSON = { diff --git a/apps/demo-react-16/src/node-registries.ts b/apps/demo-react-16/src/node-registries.ts index 703a1f60..9b342cb8 100644 --- a/apps/demo-react-16/src/node-registries.ts +++ b/apps/demo-react-16/src/node-registries.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeRegistry } from '@flowgram.ai/free-layout-editor'; /** diff --git a/apps/demo-vite/.eslintrc.js b/apps/demo-vite/.eslintrc.js index eb44479a..204b5a22 100644 --- a/apps/demo-vite/.eslintrc.js +++ b/apps/demo-vite/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/demo-vite/src/app.tsx b/apps/demo-vite/src/app.tsx index 150c56b5..4e74a311 100644 --- a/apps/demo-vite/src/app.tsx +++ b/apps/demo-vite/src/app.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createRoot } from 'react-dom/client'; import { Editor } from './editor'; diff --git a/apps/demo-vite/src/components/minimap.tsx b/apps/demo-vite/src/components/minimap.tsx index 518eacfa..7a7ca4d4 100644 --- a/apps/demo-vite/src/components/minimap.tsx +++ b/apps/demo-vite/src/components/minimap.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowMinimapService, MinimapRender } from '@flowgram.ai/minimap-plugin'; import { useService } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-vite/src/components/node-add-panel.tsx b/apps/demo-vite/src/components/node-add-panel.tsx index ba7ede20..b38d50c8 100644 --- a/apps/demo-vite/src/components/node-add-panel.tsx +++ b/apps/demo-vite/src/components/node-add-panel.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { WorkflowDragService, useService } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-vite/src/components/tools.tsx b/apps/demo-vite/src/components/tools.tsx index 6f38bac3..f0d0c771 100644 --- a/apps/demo-vite/src/components/tools.tsx +++ b/apps/demo-vite/src/components/tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState } from 'react'; import { usePlaygroundTools, useClientContext } from '@flowgram.ai/free-layout-editor'; diff --git a/apps/demo-vite/src/editor.tsx b/apps/demo-vite/src/editor.tsx index 267f7012..362b4060 100644 --- a/apps/demo-vite/src/editor.tsx +++ b/apps/demo-vite/src/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EditorRenderer, FreeLayoutEditorProvider } from '@flowgram.ai/free-layout-editor'; import { useEditorProps } from './hooks/use-editor-props'; diff --git a/apps/demo-vite/src/hooks/use-editor-props.tsx b/apps/demo-vite/src/hooks/use-editor-props.tsx index 84163317..0d5a1794 100644 --- a/apps/demo-vite/src/hooks/use-editor-props.tsx +++ b/apps/demo-vite/src/hooks/use-editor-props.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { createMinimapPlugin } from '@flowgram.ai/minimap-plugin'; diff --git a/apps/demo-vite/src/index.css b/apps/demo-vite/src/index.css index c76cebfb..f829ac0b 100644 --- a/apps/demo-vite/src/index.css +++ b/apps/demo-vite/src/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .demo-free-node { display: flex; min-width: 300px; diff --git a/apps/demo-vite/src/index.tsx b/apps/demo-vite/src/index.tsx index c38080e9..5b7e3f86 100644 --- a/apps/demo-vite/src/index.tsx +++ b/apps/demo-vite/src/index.tsx @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Editor as DemoFreeLayout } from './editor'; diff --git a/apps/demo-vite/src/initial-data.ts b/apps/demo-vite/src/initial-data.ts index e23756e0..cb989cbc 100644 --- a/apps/demo-vite/src/initial-data.ts +++ b/apps/demo-vite/src/initial-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowJSON } from '@flowgram.ai/free-layout-editor'; export const initialData: WorkflowJSON = { diff --git a/apps/demo-vite/src/node-registries.ts b/apps/demo-vite/src/node-registries.ts index 703a1f60..9b342cb8 100644 --- a/apps/demo-vite/src/node-registries.ts +++ b/apps/demo-vite/src/node-registries.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeRegistry } from '@flowgram.ai/free-layout-editor'; /** diff --git a/apps/demo-vite/vite.config.js b/apps/demo-vite/vite.config.js index 4a5def4c..f60aebb6 100644 --- a/apps/demo-vite/vite.config.js +++ b/apps/demo-vite/vite.config.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; diff --git a/apps/docs/.eslintrc.js b/apps/docs/.eslintrc.js index 9f8bd759..8becb8c2 100644 --- a/apps/docs/.eslintrc.js +++ b/apps/docs/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/apps/docs/components/fixed-feature-overview/index.less b/apps/docs/components/fixed-feature-overview/index.less index 27b89668..daa6d401 100644 --- a/apps/docs/components/fixed-feature-overview/index.less +++ b/apps/docs/components/fixed-feature-overview/index.less @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .doc-feature-overview { .gedit-playground { position: relative; diff --git a/apps/docs/components/fixed-feature-overview/index.tsx b/apps/docs/components/fixed-feature-overview/index.tsx index 92ff1f31..ac1c2b05 100644 --- a/apps/docs/components/fixed-feature-overview/index.tsx +++ b/apps/docs/components/fixed-feature-overview/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import './index.less'; diff --git a/apps/docs/components/fixed-layout-simple/composite-nodes-preview.tsx b/apps/docs/components/fixed-layout-simple/composite-nodes-preview.tsx index 740c1f0d..bbe6acbc 100644 --- a/apps/docs/components/fixed-layout-simple/composite-nodes-preview.tsx +++ b/apps/docs/components/fixed-layout-simple/composite-nodes-preview.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable import/no-unresolved */ import { FixedLayoutSimple } from './fixed-layout-simple.tsx'; import { PreviewEditor } from '../preview-editor.tsx'; diff --git a/apps/docs/components/fixed-layout-simple/fixed-layout-simple.tsx b/apps/docs/components/fixed-layout-simple/fixed-layout-simple.tsx index 475e577b..f4d9f361 100644 --- a/apps/docs/components/fixed-layout-simple/fixed-layout-simple.tsx +++ b/apps/docs/components/fixed-layout-simple/fixed-layout-simple.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; // https://github.com/web-infra-dev/rspress/issues/553 diff --git a/apps/docs/components/fixed-layout-simple/index.tsx b/apps/docs/components/fixed-layout-simple/index.tsx index f6a8c3d1..05990085 100644 --- a/apps/docs/components/fixed-layout-simple/index.tsx +++ b/apps/docs/components/fixed-layout-simple/index.tsx @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FixedLayoutSimple } from './fixed-layout-simple.tsx'; export { CompositeNodesPreview } from './composite-nodes-preview.tsx'; diff --git a/apps/docs/components/fixed-layout-simple/preview.tsx b/apps/docs/components/fixed-layout-simple/preview.tsx index 9cc740c3..a0892136 100644 --- a/apps/docs/components/fixed-layout-simple/preview.tsx +++ b/apps/docs/components/fixed-layout-simple/preview.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable import/no-unresolved */ import { PreviewEditor } from '../preview-editor'; import { FixedLayoutSimple } from './index'; diff --git a/apps/docs/components/free-feature-overview/index.less b/apps/docs/components/free-feature-overview/index.less index a3db2541..3d4375bd 100644 --- a/apps/docs/components/free-feature-overview/index.less +++ b/apps/docs/components/free-feature-overview/index.less @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .doc-free-feature-overview { .demo-container { position: relative; diff --git a/apps/docs/components/free-feature-overview/index.tsx b/apps/docs/components/free-feature-overview/index.tsx index 93a2d755..a2c53257 100644 --- a/apps/docs/components/free-feature-overview/index.tsx +++ b/apps/docs/components/free-feature-overview/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import './index.less'; diff --git a/apps/docs/components/free-layout-simple/index.tsx b/apps/docs/components/free-layout-simple/index.tsx index 3360b21b..939f242c 100644 --- a/apps/docs/components/free-layout-simple/index.tsx +++ b/apps/docs/components/free-layout-simple/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; // https://github.com/web-infra-dev/rspress/issues/553 diff --git a/apps/docs/components/free-layout-simple/preview.tsx b/apps/docs/components/free-layout-simple/preview.tsx index 00c42f03..f0f1a813 100644 --- a/apps/docs/components/free-layout-simple/preview.tsx +++ b/apps/docs/components/free-layout-simple/preview.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable import/no-unresolved */ import { PreviewEditor } from '../preview-editor'; import { FreeLayoutSimple } from '.'; diff --git a/apps/docs/components/index.ts b/apps/docs/components/index.ts index a5d3cdb3..915318b2 100644 --- a/apps/docs/components/index.ts +++ b/apps/docs/components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { PreviewEditor } from './preview-editor'; export { FixedFeatureOverview } from './fixed-feature-overview'; export { FreeFeatureOverview } from './free-feature-overview'; diff --git a/apps/docs/components/materials.tsx b/apps/docs/components/materials.tsx index fae6a9c5..576fcb04 100644 --- a/apps/docs/components/materials.tsx +++ b/apps/docs/components/materials.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // @ts-expect-error import { PackageManagerTabs, SourceCode } from '@theme'; diff --git a/apps/docs/components/node-form/array/index.css b/apps/docs/components/node-form/array/index.css index fe733c6b..e1889b48 100644 --- a/apps/docs/components/node-form/array/index.css +++ b/apps/docs/components/node-form/array/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .array-item-wrapper { display: flex; align-items: center; diff --git a/apps/docs/components/node-form/array/node-registry.tsx b/apps/docs/components/node-form/array/node-registry.tsx index 4d3a0492..cb44e160 100644 --- a/apps/docs/components/node-form/array/node-registry.tsx +++ b/apps/docs/components/node-form/array/node-registry.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DataEvent, EffectFuncProps, diff --git a/apps/docs/components/node-form/array/preview.tsx b/apps/docs/components/node-form/array/preview.tsx index 87cfbbe6..fbe24355 100644 --- a/apps/docs/components/node-form/array/preview.tsx +++ b/apps/docs/components/node-form/array/preview.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_INITIAL_DATA, defaultInitialDataTs, diff --git a/apps/docs/components/node-form/basic-preview.tsx b/apps/docs/components/node-form/basic-preview.tsx index e31724c4..da898fc4 100644 --- a/apps/docs/components/node-form/basic-preview.tsx +++ b/apps/docs/components/node-form/basic-preview.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_DEMO_REGISTRY, DEFAULT_INITIAL_DATA, diff --git a/apps/docs/components/node-form/dynamic/node-registry.tsx b/apps/docs/components/node-form/dynamic/node-registry.tsx index 0823eafe..f14cc90a 100644 --- a/apps/docs/components/node-form/dynamic/node-registry.tsx +++ b/apps/docs/components/node-form/dynamic/node-registry.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field, FieldRenderProps, diff --git a/apps/docs/components/node-form/dynamic/preview.tsx b/apps/docs/components/node-form/dynamic/preview.tsx index 12768eb3..c86f9f91 100644 --- a/apps/docs/components/node-form/dynamic/preview.tsx +++ b/apps/docs/components/node-form/dynamic/preview.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_INITIAL_DATA, defaultInitialDataTs, diff --git a/apps/docs/components/node-form/editor.tsx b/apps/docs/components/node-form/editor.tsx index 24153819..9b25af06 100644 --- a/apps/docs/components/node-form/editor.tsx +++ b/apps/docs/components/node-form/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; // https://github.com/web-infra-dev/rspress/issues/553 diff --git a/apps/docs/components/node-form/effect/node-registry.tsx b/apps/docs/components/node-form/effect/node-registry.tsx index 4e9823a1..091eda33 100644 --- a/apps/docs/components/node-form/effect/node-registry.tsx +++ b/apps/docs/components/node-form/effect/node-registry.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DataEvent, EffectFuncProps, diff --git a/apps/docs/components/node-form/effect/preview.tsx b/apps/docs/components/node-form/effect/preview.tsx index 7cbd4948..ef5aee7d 100644 --- a/apps/docs/components/node-form/effect/preview.tsx +++ b/apps/docs/components/node-form/effect/preview.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_INITIAL_DATA, defaultInitialDataTs, diff --git a/apps/docs/components/node-form/index.css b/apps/docs/components/node-form/index.css index c9f4fd27..98813030 100644 --- a/apps/docs/components/node-form/index.css +++ b/apps/docs/components/node-form/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .demo-node-content { padding: 8px 12px; flex-grow: 1; diff --git a/apps/docs/components/node-form/index.ts b/apps/docs/components/node-form/index.ts index 981c0b51..5b459155 100644 --- a/apps/docs/components/node-form/index.ts +++ b/apps/docs/components/node-form/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { NodeFormBasicPreview } from './basic-preview'; export { NodeFormEffectPreview } from './effect/preview'; export { NodeFormDynamicPreview } from './dynamic/preview'; diff --git a/apps/docs/components/preview-editor.tsx b/apps/docs/components/preview-editor.tsx index 77590f32..7fcb8a9f 100644 --- a/apps/docs/components/preview-editor.tsx +++ b/apps/docs/components/preview-editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { useDark } from '@rspress/core/runtime'; diff --git a/apps/docs/components/tsx-editor.tsx b/apps/docs/components/tsx-editor.tsx index 51447d9c..783fe88b 100644 --- a/apps/docs/components/tsx-editor.tsx +++ b/apps/docs/components/tsx-editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { useDark } from '@rspress/core/runtime'; diff --git a/apps/docs/global.less b/apps/docs/global.less index 4f74775a..99c39877 100644 --- a/apps/docs/global.less +++ b/apps/docs/global.less @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + .rspress-doc-container:not(:has(.aside-container_edeb4)) .rspress-doc { width: 1400px; max-width: 1400px; diff --git a/apps/docs/rspress.config.ts b/apps/docs/rspress.config.ts index 8f498a8f..88704097 100644 --- a/apps/docs/rspress.config.ts +++ b/apps/docs/rspress.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as path from 'node:path'; import { merge } from 'webpack-merge'; diff --git a/apps/docs/scripts/auto-generate.ts b/apps/docs/scripts/auto-generate.ts index c104ba07..b56a4b0b 100644 --- a/apps/docs/scripts/auto-generate.ts +++ b/apps/docs/scripts/auto-generate.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // @ts-ignore import * as path from 'path'; // @ts-ignore diff --git a/apps/docs/scripts/constants.ts b/apps/docs/scripts/constants.ts index 293703fb..2fb557e3 100644 --- a/apps/docs/scripts/constants.ts +++ b/apps/docs/scripts/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const docLabelMap = { classes: 'Classes', enums: 'Enums', diff --git a/apps/docs/scripts/patch.ts b/apps/docs/scripts/patch.ts index c39e5051..bf081325 100644 --- a/apps/docs/scripts/patch.ts +++ b/apps/docs/scripts/patch.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // @ts-ignore import path from 'path'; // @ts-ignore diff --git a/apps/docs/scripts/translate.ts b/apps/docs/scripts/translate.ts index ebf8e483..477a2e44 100644 --- a/apps/docs/scripts/translate.ts +++ b/apps/docs/scripts/translate.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * How to use it: * - cd apps/docs diff --git a/apps/docs/src/global.d.ts b/apps/docs/src/global.d.ts index f35bc7cf..7b4f4b24 100644 --- a/apps/docs/src/global.d.ts +++ b/apps/docs/src/global.d.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + declare module "!!raw-loader!*" { const content: string; export default content; diff --git a/common/autoinstallers/license-header/index.js b/common/autoinstallers/license-header/index.js new file mode 100644 index 00000000..e9aac029 --- /dev/null +++ b/common/autoinstallers/license-header/index.js @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + +const fs = require("fs"); +const path = require("path"); +const ig = require("ignore")(); + +const ignoreFile = fs.readFileSync(path.join(__dirname, "../../../.gitignore"), { + encoding: "utf-8", +}); +ig.add(ignoreFile); + +const src = path.resolve(__dirname, '../../../'); + +const header = ` Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + SPDX-License-Identifier: MIT`; + +const bashHeader = `#!/usr/bin/env`; +const rushPreHeader = `// THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED.`; + +/** +* Add License Header to all files in the folder +* @param {string} targetDir - target folder path (absolute path) +* @param {string} licenseContent - License content to be added (plain text) +* @param {object} options - configuration items +* @param {string[]} [options.includeExts] - file extensions to be processed (such as ['.js', '.ts']), all text files are processed by default +* @param {string[]} [options.excludeDirs] - directories to be excluded (such as ['node_modules', 'dist']) +* @param {string} [options.commentLinePrefix] - comment prefix (such as '// ' or '/* '), comment format is not added by default +* @param {boolean} [options.force] - whether to force overwrite (re-add even if there is already a license), default false +*/ +function addLicenseHeader(targetDir, licenseContent, options = {}) { + const { + includeExts = [".js", ".ts", ".mjs", ".cjs", ".html", ".css", ".scss"], + commentLinePrefix = "// ", // default by js + commentPrefix, + commentSuffix, + force = false, + } = options; + + const licensedText = + (commentPrefix ? commentPrefix + "\n" : "") + + licenseContent + .split("\n") + .map((line) => commentLinePrefix + line) + .join("\n") + + (commentSuffix ? "\n" + commentSuffix : "") + + "\n\n"; + + function traverseDir(currentDir) { + const entries = fs.readdirSync(currentDir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(currentDir, entry.name); + + if ( + entry.isDirectory() && + ig.ignores(path.relative(targetDir, fullPath)) + ) { + continue; + } + + if (entry.isDirectory()) { + traverseDir(fullPath); + } else { + processFile(fullPath); + } + } + } + + function processFile(filePath) { + const ext = path.extname(filePath).toLowerCase(); + if (includeExts.length > 0 && !includeExts.includes(ext)) { + return; + } + + try { + const originalContent = fs.readFileSync(filePath, "utf8"); + + // Check if the license already exists (simple match at the beginning) + if (!force && (originalContent.startsWith(licensedText.trim()) || originalContent.startsWith(bashHeader.trim()) || originalContent.startsWith(rushPreHeader.trim()))) { + return; + } + + let newContent = originalContent; + + const shebangMatch = originalContent.match(/^#!.*\n/); + if (shebangMatch) { + newContent = + shebangMatch[0] + + licensedText + + originalContent.replace(shebangMatch[0], ""); + } else { + newContent = licensedText + originalContent; + } + + fs.writeFileSync(filePath, newContent, "utf8"); + console.log(`[Success] License added: ${filePath}, please manually upload the locally modified file`); + } catch (err) { + console.error(`[ERROR] Failed to process file ${filePath}:`, err.message); + } + } + + if (fs.existsSync(targetDir) && fs.statSync(targetDir).isDirectory()) { + traverseDir(targetDir); + console.log("License Header add successfully"); + } else { + console.error("Error: The destination path is not a valid folder"); + } +} + +addLicenseHeader( + src, + header, + { + includeExts: ['.js', '.ts', '.tsx', '.jsx', '.mjs', '.cjs', '.scss', '.less', '.prisma', '.styl', '.css'], + commentPrefix: '/**', + commentLinePrefix: ' *', + commentSuffix: ' */', + force: false + } +); + +addLicenseHeader( + src, + header, + { + includeExts: ['.sh'], + commentLinePrefix: '# ', + force: false + } +); diff --git a/common/autoinstallers/license-header/package.json b/common/autoinstallers/license-header/package.json new file mode 100644 index 00000000..f28241f7 --- /dev/null +++ b/common/autoinstallers/license-header/package.json @@ -0,0 +1,15 @@ +{ + "name": "license-header", + "version": "1.0.0", + "private": true, + "author": "289056872@qq.com", + "scripts": { + "license-header-fix": "node ./index.js" + }, + "dependencies": { + "ignore": "^7.0.4" + }, + "devDependencies": { + "@types/node": "^20" + } +} diff --git a/common/autoinstallers/license-header/pnpm-lock.yaml b/common/autoinstallers/license-header/pnpm-lock.yaml new file mode 100644 index 00000000..a5800908 --- /dev/null +++ b/common/autoinstallers/license-header/pnpm-lock.yaml @@ -0,0 +1,22 @@ +lockfileVersion: '6.0' + +dependencies: + ignore: + specifier: ^7.0.4 + version: 7.0.4 + +devDependencies: + '@types/node': + specifier: ^20 + version: 20.0.0 + +packages: + + /@types/node@20.0.0: + resolution: {integrity: sha512-cD2uPTDnQQCVpmRefonO98/PPijuOnnEy5oytWJFPY1N9aJCz2wJ5kSGWO+zJoed2cY2JxQh6yBuUq4vIn61hw==} + dev: true + + /ignore@7.0.4: + resolution: {integrity: sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==} + engines: {node: '>= 4'} + dev: false diff --git a/common/autoinstallers/rush-commands/check-circular-dependency.mjs b/common/autoinstallers/rush-commands/check-circular-dependency.mjs index eb3db003..c1a14e69 100644 --- a/common/autoinstallers/rush-commands/check-circular-dependency.mjs +++ b/common/autoinstallers/rush-commands/check-circular-dependency.mjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import RushSdk from '@rushstack/rush-sdk'; const rushConfig = RushSdk.RushConfiguration.loadFromDefaultLocation(); diff --git a/common/autoinstallers/rush-commitlint/.cz-config.js b/common/autoinstallers/rush-commitlint/.cz-config.js index 6c6cf2e5..b22d0da2 100644 --- a/common/autoinstallers/rush-commitlint/.cz-config.js +++ b/common/autoinstallers/rush-commitlint/.cz-config.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const chalk = require('chalk'); const spawn = require('cross-spawn'); const defaultConfig = require('cz-customizable'); diff --git a/common/autoinstallers/rush-commitlint/commitlint.config.js b/common/autoinstallers/rush-commitlint/commitlint.config.js index f94bd559..ef02d09a 100644 --- a/common/autoinstallers/rush-commitlint/commitlint.config.js +++ b/common/autoinstallers/rush-commitlint/commitlint.config.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + module.exports = { extends: ['@commitlint/config-conventional'], rules: { diff --git a/common/autoinstallers/rush-commitlint/utils.js b/common/autoinstallers/rush-commitlint/utils.js index 13385bc0..15eab7d6 100644 --- a/common/autoinstallers/rush-commitlint/utils.js +++ b/common/autoinstallers/rush-commitlint/utils.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { RushConfiguration } = require('@rushstack/rush-sdk') const getRushConfiguration = (function () { diff --git a/common/autoinstallers/rush-lint-staged/.lintstagedrc.js b/common/autoinstallers/rush-lint-staged/.lintstagedrc.js index e49289f7..76ea7e14 100644 --- a/common/autoinstallers/rush-lint-staged/.lintstagedrc.js +++ b/common/autoinstallers/rush-lint-staged/.lintstagedrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { excludeIgnoredFiles } = require('./utils'); const micromatch = require('micromatch'); const path = require('path'); diff --git a/common/autoinstallers/rush-lint-staged/utils.js b/common/autoinstallers/rush-lint-staged/utils.js index a390cac4..6ca184cc 100644 --- a/common/autoinstallers/rush-lint-staged/utils.js +++ b/common/autoinstallers/rush-lint-staged/utils.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { RushConfiguration } = require('@microsoft/rush-lib') const { ESLint } = require('eslint') const path = require('path') diff --git a/common/config/rush/.pnpmfile.cjs b/common/config/rush/.pnpmfile.cjs index 98cf3279..424cb45a 100644 --- a/common/config/rush/.pnpmfile.cjs +++ b/common/config/rush/.pnpmfile.cjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; /** diff --git a/common/config/rush/command-line.json b/common/config/rush/command-line.json index ebf871bf..ef7b0ce1 100644 --- a/common/config/rush/command-line.json +++ b/common/config/rush/command-line.json @@ -3,570 +3,579 @@ * More documentation is available on the Rush website: https://rushjs.io */ { - "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json", - - /** + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json", + /** * Custom "commands" introduce new verbs for the command-line. To see the help for these * example commands, try "rush --help", "rush my-bulk-command --help", or * "rush my-global-command --help". */ - "commands": [ - // { - // /** - // * (Required) Determines the type of custom command. - // * Rush's "bulk" commands are invoked separately for each project. By default, the command will run for - // * every project in the repo, according to the dependency graph (similar to how "rush build" works). - // * The set of projects can be restricted e.g. using the "--to" or "--from" parameters. - // */ - // "commandKind": "bulk", - // - // /** - // * (Required) The name that will be typed as part of the command line. This is also the name - // * of the "scripts" hook in the project's package.json file (if "shellCommand" is not specified). - // * - // * The name should be comprised of lower case words separated by hyphens or colons. The name should include an - // * English verb (e.g. "deploy"). Use a hyphen to separate words (e.g. "upload-docs"). A group of related commands - // * can be prefixed with a colon (e.g. "docs:generate", "docs:deploy", "docs:serve", etc). - // * - // * Note that if the "rebuild" command is overridden here, it becomes separated from the "build" command - // * and will call the "rebuild" script instead of the "build" script. - // */ - // "name": "my-bulk-command", - // - // /** - // * (Required) A short summary of the custom command to be shown when printing command line - // * help, e.g. "rush --help". - // */ - // "summary": "Example bulk custom command", - // - // /** - // * A detailed description of the command to be shown when printing command line - // * help (e.g. "rush --help my-command"). - // * If omitted, the "summary" text will be shown instead. - // * - // * Whenever you introduce commands/parameters, taking a little time to write meaningful - // * documentation can make a big difference for the developer experience in your repo. - // */ - // "description": "This is an example custom command that runs separately for each project", - // - // /** - // * By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously - // * in the same repo folder. (For example, it would be a mistake to run "rush install" and "rush build" at the - // * same time.) If your command makes sense to run concurrently with other operations, - // * set "safeForSimultaneousRushProcesses" to true to disable this protection. - // * - // * In particular, this is needed for custom scripts that invoke other Rush commands. - // */ - // "safeForSimultaneousRushProcesses": false, - // - // /** - // * (Optional) If the `shellCommand` field is set for a bulk command, Rush will invoke it for each - // * selected project; otherwise, Rush will invoke the package.json `"scripts"` entry matching Rush command name. - // * - // * The string is the path to a script that will be invoked using the OS shell. The working directory will be - // * the folder that contains rush.json. If custom parameters are associated with this command, their - // * values will be appended to the end of this string. - // */ - // // "shellCommand": "node common/scripts/my-bulk-command.js", - // - // /** - // * (Required) If true, then this command is safe to be run in parallel, i.e. executed - // * simultaneously for multiple projects. Similar to "rush build", regardless of parallelism - // * projects will not start processing until their dependencies have completed processing. - // */ - // "enableParallelism": false, - // - // /** - // * Normally projects will be processed according to their dependency order: a given project will not start - // * processing the command until all of its dependencies have completed. This restriction doesn't apply for - // * certain operations, for example a "clean" task that deletes output files. In this case - // * you can set "ignoreDependencyOrder" to true to increase parallelism. - // */ - // "ignoreDependencyOrder": false, - // - // /** - // * Normally Rush requires that each project's package.json has a "scripts" entry matching - // * the custom command name. To disable this check, set "ignoreMissingScript" to true; - // * projects with a missing definition will be skipped. - // */ - // "ignoreMissingScript": false, - // - // /** - // * When invoking shell scripts, Rush uses a heuristic to distinguish errors from warnings: - // * - If the shell script returns a nonzero process exit code, Rush interprets this as "one or more errors". - // * Error output is displayed in red, and it prevents Rush from attempting to process any downstream projects. - // * - If the shell script returns a zero process exit code but writes something to its stderr stream, - // * Rush interprets this as "one or more warnings". Warning output is printed in yellow, but does NOT prevent - // * Rush from processing downstream projects. - // * - // * Thus, warnings do not interfere with local development, but they will cause a CI job to fail, because - // * the Rush process itself returns a nonzero exit code if there are any warnings or errors. This is by design. - // * In an active monorepo, we've found that if you allow any warnings in your main branch, it inadvertently - // * teaches developers to ignore warnings, which quickly leads to a situation where so many "expected" warnings - // * have accumulated that warnings no longer serve any useful purpose. - // * - // * Sometimes a poorly behaved task will write output to stderr even though its operation was successful. - // * In that case, it's strongly recommended to fix the task. However, as a workaround you can set - // * allowWarningsInSuccessfulBuild=true, which causes Rush to return a nonzero exit code for errors only. - // * - // * Note: The default value is false. In Rush 5.7.x and earlier, the default value was true. - // */ - // "allowWarningsInSuccessfulBuild": false, - // - // /** - // * If true then this command will be incremental like the built-in "build" command - // */ - // "incremental": false, - // - // /** - // * (EXPERIMENTAL) Normally Rush terminates after the command finishes. If this option is set to "true" Rush - // * will instead enter a loop where it watches the file system for changes to the selected projects. Whenever a - // * change is detected, the command will be invoked again for the changed project and any selected projects that - // * directly or indirectly depend on it. - // * - // * For details, refer to the website article "Using watch mode". - // */ - // "watchForChanges": false, - // - // /** - // * (EXPERIMENTAL) Disable cache for this action. This may be useful if this command affects state outside of - // * projects' own folders. - // */ - // "disableBuildCache": false - // }, - // - // { - // /** - // * (Required) Determines the type of custom command. - // * Rush's "global" commands are invoked once for the entire repo. - // */ - // "commandKind": "global", - // - // "name": "my-global-command", - // "summary": "Example global custom command", - // "description": "This is an example custom command that runs once for the entire repo", - // - // "safeForSimultaneousRushProcesses": false, - // - // /** - // * (Required) A script that will be invoked using the OS shell. The working directory will be - // * the folder that contains rush.json. If custom parameters are associated with this command, their - // * values will be appended to the end of this string. - // */ - // "shellCommand": "node common/scripts/my-global-command.js", - // - // /** - // * If your "shellCommand" script depends on NPM packages, the recommended best practice is - // * to make it into a regular Rush project that builds using your normal toolchain. In cases where - // * the command needs to work without first having to run "rush build", the recommended practice - // * is to publish the project to an NPM registry and use common/scripts/install-run.js to launch it. - // * - // * Autoinstallers offer another possibility: They are folders under "common/autoinstallers" with - // * a package.json file and shrinkwrap file. Rush will automatically invoke the package manager to - // * install these dependencies before an associated command is invoked. Autoinstallers have the - // * advantage that they work even in a branch where "rush install" is broken, which makes them a - // * good solution for Git hook scripts. But they have the disadvantages of not being buildable - // * projects, and of increasing the overall installation footprint for your monorepo. - // * - // * The "autoinstallerName" setting must not contain a path and must be a valid NPM package name. - // * For example, the name "my-task" would map to "common/autoinstallers/my-task/package.json", and - // * the "common/autoinstallers/my-task/node_modules/.bin" folder would be added to the shell PATH when - // * invoking the "shellCommand". - // */ - // // "autoinstallerName": "my-task" - // } - // 提交前的 lint 检查 - { - "name": "lint-staged", - "commandKind": "global", - "summary": "⭐️️ Use to run some task before commit", - "autoinstallerName": "rush-lint-staged", - "shellCommand": "lint-staged --config common/autoinstallers/rush-lint-staged/.lintstagedrc.js" - }, - { - "name": "commitlint", - "commandKind": "global", - "summary": "⭐️️ Used by the pre-commit Git hook. This command invokes commitlint to ensure that the commit messages meet the conventional commit format", - "safeForSimultaneousRushProcesses": true, - "autoinstallerName": "rush-commitlint", - "shellCommand": "commitlint" - }, - // 循环依赖检查 - { - "name": "check-circular-dependency", - "commandKind": "global", - "summary": "⭐️️ Auto check circular dependency", - "safeForSimultaneousRushProcesses": true, - "autoinstallerName": "rush-commands", - "shellCommand": "node common/autoinstallers/rush-commands/check-circular-dependency.mjs" - }, - { - "commandKind": "bulk", - "name": "test", - "description": "Executes automated tests.", - "allowWarningsInSuccessfulBuild": true, - "ignoreMissingScript": true, - "enableParallelism": true, - "incremental": true, - "summary": "⭐️️ Run test command for each package" - }, - { - "commandKind": "bulk", - "name": "test:cov", - "description": "Executes automated tests with coverage collection.", - "allowWarningsInSuccessfulBuild": true, - "ignoreMissingScript": true, - "enableParallelism": true, - "incremental": true, - "summary": "⭐️️ Run coverage command for each package" - }, - // 本地包构建 + watch - { - "name": "build:watch", - "commandKind": "bulk", - "summary": "⭐️️ Run build:watch command for each package", - "description": "For details, see the article \"Using watch mode\" on the Rush website: https://rushjs.io/", - "ignoreMissingScript": true, - "safeForSimultaneousRushProcesses": true, - // 使用增量构建逻辑 (重要) - "incremental": true, - "enableParallelism": true, - // 启用 "watch mode" - "watchForChanges": true - }, - // 一键 build 所有包 + 运行 docs 官网 dev - { - "name": "dev:docs", - "commandKind": "global", - "summary": "⭐️️ Run dev in apps/docs", - "autoinstallerName": "rush-commands", - "safeForSimultaneousRushProcesses": true, - "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/docs\" \"cd apps/docs && rushx dev\"" - }, - { - "name": "ts-check", - "commandKind": "bulk", - "summary": "⭐️️ Run ts check in packages", - "ignoreMissingScript": true, - "enableParallelism": true, - "safeForSimultaneousRushProcesses": true - }, - { - "name": "lint", - "commandKind": "bulk", - "summary": "⭐️️ Run eslint check in packages", - "ignoreMissingScript": true, - "enableParallelism": true, - "safeForSimultaneousRushProcesses": true - }, - { - "name": "lint:fix", - "commandKind": "bulk", - "summary": "⭐️️ Run eslint fix in packages", - "ignoreMissingScript": true, - "enableParallelism": true, - "safeForSimultaneousRushProcesses": true - }, - { - "name": "e2e:test", - "commandKind": "bulk", - "summary": "⭐️️ Run e2e cases in packages", - "ignoreMissingScript": true, - "enableParallelism": false, - "allowWarningsInSuccessfulBuild": true, - "safeForSimultaneousRushProcesses": false - }, - { - "name": "e2e:update-screenshot", - "commandKind": "bulk", - "summary": "⭐️️ Update screenshots of e2e cases", - "ignoreMissingScript": true, - "enableParallelism": false, - "allowWarningsInSuccessfulBuild": true, - "safeForSimultaneousRushProcesses": false - }, - { - "name": "dev:demo-fixed-layout", - "commandKind": "global", - "summary": "⭐️️ run dev in app/demo-fixed-layout", - "autoinstallerName": "rush-commands", - "safeForSimultaneousRushProcesses": true, - "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-fixed-layout\" \"cd apps/demo-fixed-layout && rushx dev\"" - }, - { - "name": "dev:demo-fixed-layout-simple", - "commandKind": "global", - "summary": "⭐️️ run dev in app/demo-fixed-layout-simple", - "autoinstallerName": "rush-commands", - "safeForSimultaneousRushProcesses": true, - "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-fixed-layout-simple\" \"cd apps/demo-fixed-layout-simple && rushx dev\"" - }, - { - "name": "dev:demo-free-layout", - "commandKind": "global", - "summary": "⭐️️ run dev in app/demo-free-layout", - "autoinstallerName": "rush-commands", - "safeForSimultaneousRushProcesses": true, - "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-free-layout\" \"cd apps/demo-free-layout && rushx dev\"" - }, - { - "name": "dev:demo-free-layout-simple", - "commandKind": "global", - "summary": "⭐️️ run dev in app/demo-free-layout-simple", - "autoinstallerName": "rush-commands", - "safeForSimultaneousRushProcesses": true, - "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-free-layout-simple\" \"cd apps/demo-free-layout-simple && rushx dev\"" - }, - { - "name": "dev:demo-nextjs", - "commandKind": "global", - "summary": "⭐️️ run dev in app/demo-nextjs", - "autoinstallerName": "rush-commands", - "safeForSimultaneousRushProcesses": true, - "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-nextjs\" \"cd apps/demo-nextjs && rushx dev\"" - }, - { - "name": "dev:demo-nextjs-antd", - "commandKind": "global", - "summary": "⭐️️ run dev in app/demo-nextjs-antd", - "autoinstallerName": "rush-commands", - "safeForSimultaneousRushProcesses": true, - "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-nextjs-antd\" \"cd apps/demo-nextjs-antd && rushx dev\"" - } - ], - - /** + "commands": [ + // { + // /** + // * (Required) Determines the type of custom command. + // * Rush's "bulk" commands are invoked separately for each project. By default, the command will run for + // * every project in the repo, according to the dependency graph (similar to how "rush build" works). + // * The set of projects can be restricted e.g. using the "--to" or "--from" parameters. + // */ + // "commandKind": "bulk", + // + // /** + // * (Required) The name that will be typed as part of the command line. This is also the name + // * of the "scripts" hook in the project's package.json file (if "shellCommand" is not specified). + // * + // * The name should be comprised of lower case words separated by hyphens or colons. The name should include an + // * English verb (e.g. "deploy"). Use a hyphen to separate words (e.g. "upload-docs"). A group of related commands + // * can be prefixed with a colon (e.g. "docs:generate", "docs:deploy", "docs:serve", etc). + // * + // * Note that if the "rebuild" command is overridden here, it becomes separated from the "build" command + // * and will call the "rebuild" script instead of the "build" script. + // */ + // "name": "my-bulk-command", + // + // /** + // * (Required) A short summary of the custom command to be shown when printing command line + // * help, e.g. "rush --help". + // */ + // "summary": "Example bulk custom command", + // + // /** + // * A detailed description of the command to be shown when printing command line + // * help (e.g. "rush --help my-command"). + // * If omitted, the "summary" text will be shown instead. + // * + // * Whenever you introduce commands/parameters, taking a little time to write meaningful + // * documentation can make a big difference for the developer experience in your repo. + // */ + // "description": "This is an example custom command that runs separately for each project", + // + // /** + // * By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously + // * in the same repo folder. (For example, it would be a mistake to run "rush install" and "rush build" at the + // * same time.) If your command makes sense to run concurrently with other operations, + // * set "safeForSimultaneousRushProcesses" to true to disable this protection. + // * + // * In particular, this is needed for custom scripts that invoke other Rush commands. + // */ + // "safeForSimultaneousRushProcesses": false, + // + // /** + // * (Optional) If the `shellCommand` field is set for a bulk command, Rush will invoke it for each + // * selected project; otherwise, Rush will invoke the package.json `"scripts"` entry matching Rush command name. + // * + // * The string is the path to a script that will be invoked using the OS shell. The working directory will be + // * the folder that contains rush.json. If custom parameters are associated with this command, their + // * values will be appended to the end of this string. + // */ + // // "shellCommand": "node common/scripts/my-bulk-command.js", + // + // /** + // * (Required) If true, then this command is safe to be run in parallel, i.e. executed + // * simultaneously for multiple projects. Similar to "rush build", regardless of parallelism + // * projects will not start processing until their dependencies have completed processing. + // */ + // "enableParallelism": false, + // + // /** + // * Normally projects will be processed according to their dependency order: a given project will not start + // * processing the command until all of its dependencies have completed. This restriction doesn't apply for + // * certain operations, for example a "clean" task that deletes output files. In this case + // * you can set "ignoreDependencyOrder" to true to increase parallelism. + // */ + // "ignoreDependencyOrder": false, + // + // /** + // * Normally Rush requires that each project's package.json has a "scripts" entry matching + // * the custom command name. To disable this check, set "ignoreMissingScript" to true; + // * projects with a missing definition will be skipped. + // */ + // "ignoreMissingScript": false, + // + // /** + // * When invoking shell scripts, Rush uses a heuristic to distinguish errors from warnings: + // * - If the shell script returns a nonzero process exit code, Rush interprets this as "one or more errors". + // * Error output is displayed in red, and it prevents Rush from attempting to process any downstream projects. + // * - If the shell script returns a zero process exit code but writes something to its stderr stream, + // * Rush interprets this as "one or more warnings". Warning output is printed in yellow, but does NOT prevent + // * Rush from processing downstream projects. + // * + // * Thus, warnings do not interfere with local development, but they will cause a CI job to fail, because + // * the Rush process itself returns a nonzero exit code if there are any warnings or errors. This is by design. + // * In an active monorepo, we've found that if you allow any warnings in your main branch, it inadvertently + // * teaches developers to ignore warnings, which quickly leads to a situation where so many "expected" warnings + // * have accumulated that warnings no longer serve any useful purpose. + // * + // * Sometimes a poorly behaved task will write output to stderr even though its operation was successful. + // * In that case, it's strongly recommended to fix the task. However, as a workaround you can set + // * allowWarningsInSuccessfulBuild=true, which causes Rush to return a nonzero exit code for errors only. + // * + // * Note: The default value is false. In Rush 5.7.x and earlier, the default value was true. + // */ + // "allowWarningsInSuccessfulBuild": false, + // + // /** + // * If true then this command will be incremental like the built-in "build" command + // */ + // "incremental": false, + // + // /** + // * (EXPERIMENTAL) Normally Rush terminates after the command finishes. If this option is set to "true" Rush + // * will instead enter a loop where it watches the file system for changes to the selected projects. Whenever a + // * change is detected, the command will be invoked again for the changed project and any selected projects that + // * directly or indirectly depend on it. + // * + // * For details, refer to the website article "Using watch mode". + // */ + // "watchForChanges": false, + // + // /** + // * (EXPERIMENTAL) Disable cache for this action. This may be useful if this command affects state outside of + // * projects' own folders. + // */ + // "disableBuildCache": false + // }, + // + // { + // /** + // * (Required) Determines the type of custom command. + // * Rush's "global" commands are invoked once for the entire repo. + // */ + // "commandKind": "global", + // + // "name": "my-global-command", + // "summary": "Example global custom command", + // "description": "This is an example custom command that runs once for the entire repo", + // + // "safeForSimultaneousRushProcesses": false, + // + // /** + // * (Required) A script that will be invoked using the OS shell. The working directory will be + // * the folder that contains rush.json. If custom parameters are associated with this command, their + // * values will be appended to the end of this string. + // */ + // "shellCommand": "node common/scripts/my-global-command.js", + // + // /** + // * If your "shellCommand" script depends on NPM packages, the recommended best practice is + // * to make it into a regular Rush project that builds using your normal toolchain. In cases where + // * the command needs to work without first having to run "rush build", the recommended practice + // * is to publish the project to an NPM registry and use common/scripts/install-run.js to launch it. + // * + // * Autoinstallers offer another possibility: They are folders under "common/autoinstallers" with + // * a package.json file and shrinkwrap file. Rush will automatically invoke the package manager to + // * install these dependencies before an associated command is invoked. Autoinstallers have the + // * advantage that they work even in a branch where "rush install" is broken, which makes them a + // * good solution for Git hook scripts. But they have the disadvantages of not being buildable + // * projects, and of increasing the overall installation footprint for your monorepo. + // * + // * The "autoinstallerName" setting must not contain a path and must be a valid NPM package name. + // * For example, the name "my-task" would map to "common/autoinstallers/my-task/package.json", and + // * the "common/autoinstallers/my-task/node_modules/.bin" folder would be added to the shell PATH when + // * invoking the "shellCommand". + // */ + // // "autoinstallerName": "my-task" + // } + // 提交前的 lint 检查 + { + "name": "lint-staged", + "commandKind": "global", + "summary": "⭐️️ Use to run some task before commit", + "autoinstallerName": "rush-lint-staged", + "shellCommand": "lint-staged --config common/autoinstallers/rush-lint-staged/.lintstagedrc.js" + }, + { + "name": "commitlint", + "commandKind": "global", + "summary": "⭐️️ Used by the pre-commit Git hook. This command invokes commitlint to ensure that the commit messages meet the conventional commit format", + "safeForSimultaneousRushProcesses": true, + "autoinstallerName": "rush-commitlint", + "shellCommand": "commitlint" + }, + // 循环依赖检查 + { + "name": "check-circular-dependency", + "commandKind": "global", + "summary": "⭐️️ Auto check circular dependency", + "safeForSimultaneousRushProcesses": true, + "autoinstallerName": "rush-commands", + "shellCommand": "node common/autoinstallers/rush-commands/check-circular-dependency.mjs" + }, + { + "commandKind": "bulk", + "name": "test", + "description": "Executes automated tests.", + "allowWarningsInSuccessfulBuild": true, + "ignoreMissingScript": true, + "enableParallelism": true, + "incremental": true, + "summary": "⭐️️ Run test command for each package" + }, + { + "commandKind": "bulk", + "name": "test:cov", + "description": "Executes automated tests with coverage collection.", + "allowWarningsInSuccessfulBuild": true, + "ignoreMissingScript": true, + "enableParallelism": true, + "incremental": true, + "summary": "⭐️️ Run coverage command for each package" + }, + // 本地包构建 + watch + { + "name": "build:watch", + "commandKind": "bulk", + "summary": "⭐️️ Run build:watch command for each package", + "description": "For details, see the article \"Using watch mode\" on the Rush website: https://rushjs.io/", + "ignoreMissingScript": true, + "safeForSimultaneousRushProcesses": true, + // 使用增量构建逻辑 (重要) + "incremental": true, + "enableParallelism": true, + // 启用 "watch mode" + "watchForChanges": true + }, + // 一键 build 所有包 + 运行 docs 官网 dev + { + "name": "dev:docs", + "commandKind": "global", + "summary": "⭐️️ Run dev in apps/docs", + "autoinstallerName": "rush-commands", + "safeForSimultaneousRushProcesses": true, + "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/docs\" \"cd apps/docs && rushx dev\"" + }, + { + "name": "ts-check", + "commandKind": "bulk", + "summary": "⭐️️ Run ts check in packages", + "ignoreMissingScript": true, + "enableParallelism": true, + "safeForSimultaneousRushProcesses": true + }, + { + "name": "lint", + "commandKind": "bulk", + "summary": "⭐️️ Run eslint check in packages", + "ignoreMissingScript": true, + "enableParallelism": true, + "safeForSimultaneousRushProcesses": true + }, + { + "name": "lint:fix", + "commandKind": "bulk", + "summary": "⭐️️ Run eslint fix in packages", + "ignoreMissingScript": true, + "enableParallelism": true, + "safeForSimultaneousRushProcesses": true + }, + { + "name": "e2e:test", + "commandKind": "bulk", + "summary": "⭐️️ Run e2e cases in packages", + "ignoreMissingScript": true, + "enableParallelism": false, + "allowWarningsInSuccessfulBuild": true, + "safeForSimultaneousRushProcesses": false + }, + { + "name": "e2e:update-screenshot", + "commandKind": "bulk", + "summary": "⭐️️ Update screenshots of e2e cases", + "ignoreMissingScript": true, + "enableParallelism": false, + "allowWarningsInSuccessfulBuild": true, + "safeForSimultaneousRushProcesses": false + }, + { + "name": "dev:demo-fixed-layout", + "commandKind": "global", + "summary": "⭐️️ run dev in app/demo-fixed-layout", + "autoinstallerName": "rush-commands", + "safeForSimultaneousRushProcesses": true, + "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-fixed-layout\" \"cd apps/demo-fixed-layout && rushx dev\"" + }, + { + "name": "dev:demo-fixed-layout-simple", + "commandKind": "global", + "summary": "⭐️️ run dev in app/demo-fixed-layout-simple", + "autoinstallerName": "rush-commands", + "safeForSimultaneousRushProcesses": true, + "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-fixed-layout-simple\" \"cd apps/demo-fixed-layout-simple && rushx dev\"" + }, + { + "name": "dev:demo-free-layout", + "commandKind": "global", + "summary": "⭐️️ run dev in app/demo-free-layout", + "autoinstallerName": "rush-commands", + "safeForSimultaneousRushProcesses": true, + "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-free-layout\" \"cd apps/demo-free-layout && rushx dev\"" + }, + { + "name": "dev:demo-free-layout-simple", + "commandKind": "global", + "summary": "⭐️️ run dev in app/demo-free-layout-simple", + "autoinstallerName": "rush-commands", + "safeForSimultaneousRushProcesses": true, + "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-free-layout-simple\" \"cd apps/demo-free-layout-simple && rushx dev\"" + }, + { + "name": "dev:demo-nextjs", + "commandKind": "global", + "summary": "⭐️️ run dev in app/demo-nextjs", + "autoinstallerName": "rush-commands", + "safeForSimultaneousRushProcesses": true, + "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-nextjs\" \"cd apps/demo-nextjs && rushx dev\"" + }, + { + "name": "dev:demo-nextjs-antd", + "commandKind": "global", + "summary": "⭐️️ run dev in app/demo-nextjs-antd", + "autoinstallerName": "rush-commands", + "safeForSimultaneousRushProcesses": true, + "shellCommand": "concurrently --kill-others --prefix \"{name}\" --names [watch],[demo] -c white,blue \"rush build:watch --to-except @flowgram.ai/demo-nextjs-antd\" \"cd apps/demo-nextjs-antd && rushx dev\"" + }, + { + "name": "license-header", + "commandKind": "global", + "summary": "⭐️️ Update license header of all code files.", + "safeForSimultaneousRushProcesses": true, + "autoinstallerName": "license-header", + "shellCommand": "node common/autoinstallers/license-header/index.js" + } + ], + /** * Custom "parameters" introduce new parameters for specified Rush command-line commands. * For example, you might define a "--production" parameter for the "rush build" command. */ - "parameters": [ - // { - // /** - // * (Required) Determines the type of custom parameter. - // * A "flag" is a custom command-line parameter whose presence acts as an on/off switch. - // */ - // "parameterKind": "flag", - // - // /** - // * (Required) The long name of the parameter. It must be lower-case and use dash delimiters. - // */ - // "longName": "--my-flag", - // - // /** - // * An optional alternative short name for the parameter. It must be a dash followed by a single - // * lower-case or upper-case letter, which is case-sensitive. - // * - // * NOTE: The Rush developers recommend that automation scripts should always use the long name - // * to improve readability. The short name is only intended as a convenience for humans. - // * The alphabet letters run out quickly, and are difficult to memorize, so *only* use - // * a short name if you expect the parameter to be needed very often in everyday operations. - // */ - // "shortName": "-m", - // - // /** - // * (Required) A long description to be shown in the command-line help. - // * - // * Whenever you introduce commands/parameters, taking a little time to write meaningful - // * documentation can make a big difference for the developer experience in your repo. - // */ - // "description": "A custom flag parameter that is passed to the scripts that are invoked when building projects", - // - // /** - // * (Required) A list of custom commands and/or built-in Rush commands that this parameter may - // * be used with. The parameter will be appended to the shell command that Rush invokes. - // */ - // "associatedCommands": ["build", "rebuild"] - // }, - // - // { - // /** - // * (Required) Determines the type of custom parameter. - // * A "string" is a custom command-line parameter whose argument is a single text string. - // */ - // "parameterKind": "string", - // "longName": "--my-string", - // "description": "A custom string parameter for the \"my-global-command\" custom command", - // - // "associatedCommands": ["my-global-command"], - // - // "argumentName": "SOME_TEXT", - // - // /** - // * If true, this parameter must be included with the command. The default is false. - // */ - // "required": false - // }, - // - // { - // /** - // * (Required) Determines the type of custom parameter. - // * A "choice" is a custom command-line parameter whose argument must be chosen from a list of - // * allowable alternatives (similar to an enum). - // */ - // "parameterKind": "choice", - // "longName": "--my-choice", - // "description": "A custom choice parameter for the \"my-global-command\" custom command", - // - // "associatedCommands": ["my-global-command"], - // "required": false, - // - // /** - // * If a "defaultValue" is specified, then if the Rush command line is invoked without - // * this parameter, it will be automatically added with the "defaultValue" as the argument. - // * The value must be one of the defined alternatives. - // */ - // "defaultValue": "vanilla", - // - // /** - // * (Required) A list of alternative argument values that can be chosen for this parameter. - // */ - // "alternatives": [ - // { - // /** - // * A token that is one of the alternatives that can be used with the choice parameter, - // * e.g. "vanilla" in "--flavor vanilla". - // */ - // "name": "vanilla", - // - // /** - // * A detailed description for the alternative that can be shown in the command-line help. - // * - // * Whenever you introduce commands/parameters, taking a little time to write meaningful - // * documentation can make a big difference for the developer experience in your repo. - // */ - // "description": "Use the vanilla flavor" - // }, - // - // { - // "name": "chocolate", - // "description": "Use the chocolate flavor" - // }, - // - // { - // "name": "strawberry", - // "description": "Use the strawberry flavor" - // } - // ] - // }, - // - // { - // /** - // * (Required) Determines the type of custom parameter. - // * An "integer" is a custom command-line parameter whose value is an integer number. - // */ - // "parameterKind": "integer", - // "longName": "--my-integer", - // "description": "A custom integer parameter for the \"my-global-command\" custom command", - // - // "associatedCommands": ["my-global-command"], - // "argumentName": "SOME_NUMBER", - // "required": false - // }, - // - // { - // /** - // * (Required) Determines the type of custom parameter. - // * An "integerList" is a custom command-line parameter whose argument is an integer. - // * The parameter can be specified multiple times to build a list. - // * - // * For example, if the parameter name is "--my-integer-list", then the custom command - // * might be invoked as - // * `rush my-global-command --my-integer-list 1 --my-integer-list 2 --my-integer-list 3` - // * and the parsed array would be [1,2,3]. - // */ - // "parameterKind": "integerList", - // "longName": "--my-integer-list", - // "description": "A custom integer list parameter for the \"my-global-command\" custom command", - // - // "associatedCommands": ["my-global-command"], - // "argumentName": "SOME_NUMBER", - // "required": false - // }, - // - // { - // /** - // * (Required) Determines the type of custom parameter. - // * An "stringList" is a custom command-line parameter whose argument is a text string. - // * The parameter can be specified multiple times to build a list. - // * - // * For example, if the parameter name is "--my-string-list", then the custom command - // * might be invoked as - // * `rush my-global-command --my-string-list A --my-string-list B --my-string-list C` - // * and the parsed array would be [A,B,C]. - // */ - // "parameterKind": "stringList", - // "longName": "--my-string-list", - // "description": "A custom string list parameter for the \"my-global-command\" custom command", - // - // "associatedCommands": ["my-global-command"], - // "argumentName": "SOME_TEXT", - // "required": false - // }, - // - // { - // /** - // * (Required) Determines the type of custom parameter. - // * A "choice" is a custom command-line parameter whose argument must be chosen from a list of - // * allowable alternatives (similar to an enum). - // * The parameter can be specified multiple times to build a list. - // * - // * For example, if the parameter name is "--my-choice-list", then the custom command - // * might be invoked as - // * `rush my-global-command --my-string-list vanilla --my-string-list chocolate` - // * and the parsed array would be [vanilla,chocolate]. - // */ - // "parameterKind": "choiceList", - // "longName": "--my-choice-list", - // "description": "A custom choice list parameter for the \"my-global-command\" custom command", - // - // "associatedCommands": ["my-global-command"], - // "required": false, - // - // /** - // * (Required) A list of alternative argument values that can be chosen for this parameter. - // */ - // "alternatives": [ - // { - // /** - // * A token that is one of the alternatives that can be used with the choice parameter, - // * e.g. "vanilla" in "--flavor vanilla". - // */ - // "name": "vanilla", - // - // /** - // * A detailed description for the alternative that can be shown in the command-line help. - // * - // * Whenever you introduce commands/parameters, taking a little time to write meaningful - // * documentation can make a big difference for the developer experience in your repo. - // */ - // "description": "Use the vanilla flavor" - // }, - // - // { - // "name": "chocolate", - // "description": "Use the chocolate flavor" - // }, - // - // { - // "name": "strawberry", - // "description": "Use the strawberry flavor" - // } - // ] - // } - - { - "parameterKind": "string", - "argumentName": "MESSAGE", - "longName": "--edit", - "description": "", - "associatedCommands": ["commitlint"] - }, - { - "parameterKind": "string", - "argumentName": "MESSAGE", - "longName": "--config", - "description": "", - "associatedCommands": ["commitlint"] - } - ] + "parameters": [ + // { + // /** + // * (Required) Determines the type of custom parameter. + // * A "flag" is a custom command-line parameter whose presence acts as an on/off switch. + // */ + // "parameterKind": "flag", + // + // /** + // * (Required) The long name of the parameter. It must be lower-case and use dash delimiters. + // */ + // "longName": "--my-flag", + // + // /** + // * An optional alternative short name for the parameter. It must be a dash followed by a single + // * lower-case or upper-case letter, which is case-sensitive. + // * + // * NOTE: The Rush developers recommend that automation scripts should always use the long name + // * to improve readability. The short name is only intended as a convenience for humans. + // * The alphabet letters run out quickly, and are difficult to memorize, so *only* use + // * a short name if you expect the parameter to be needed very often in everyday operations. + // */ + // "shortName": "-m", + // + // /** + // * (Required) A long description to be shown in the command-line help. + // * + // * Whenever you introduce commands/parameters, taking a little time to write meaningful + // * documentation can make a big difference for the developer experience in your repo. + // */ + // "description": "A custom flag parameter that is passed to the scripts that are invoked when building projects", + // + // /** + // * (Required) A list of custom commands and/or built-in Rush commands that this parameter may + // * be used with. The parameter will be appended to the shell command that Rush invokes. + // */ + // "associatedCommands": ["build", "rebuild"] + // }, + // + // { + // /** + // * (Required) Determines the type of custom parameter. + // * A "string" is a custom command-line parameter whose argument is a single text string. + // */ + // "parameterKind": "string", + // "longName": "--my-string", + // "description": "A custom string parameter for the \"my-global-command\" custom command", + // + // "associatedCommands": ["my-global-command"], + // + // "argumentName": "SOME_TEXT", + // + // /** + // * If true, this parameter must be included with the command. The default is false. + // */ + // "required": false + // }, + // + // { + // /** + // * (Required) Determines the type of custom parameter. + // * A "choice" is a custom command-line parameter whose argument must be chosen from a list of + // * allowable alternatives (similar to an enum). + // */ + // "parameterKind": "choice", + // "longName": "--my-choice", + // "description": "A custom choice parameter for the \"my-global-command\" custom command", + // + // "associatedCommands": ["my-global-command"], + // "required": false, + // + // /** + // * If a "defaultValue" is specified, then if the Rush command line is invoked without + // * this parameter, it will be automatically added with the "defaultValue" as the argument. + // * The value must be one of the defined alternatives. + // */ + // "defaultValue": "vanilla", + // + // /** + // * (Required) A list of alternative argument values that can be chosen for this parameter. + // */ + // "alternatives": [ + // { + // /** + // * A token that is one of the alternatives that can be used with the choice parameter, + // * e.g. "vanilla" in "--flavor vanilla". + // */ + // "name": "vanilla", + // + // /** + // * A detailed description for the alternative that can be shown in the command-line help. + // * + // * Whenever you introduce commands/parameters, taking a little time to write meaningful + // * documentation can make a big difference for the developer experience in your repo. + // */ + // "description": "Use the vanilla flavor" + // }, + // + // { + // "name": "chocolate", + // "description": "Use the chocolate flavor" + // }, + // + // { + // "name": "strawberry", + // "description": "Use the strawberry flavor" + // } + // ] + // }, + // + // { + // /** + // * (Required) Determines the type of custom parameter. + // * An "integer" is a custom command-line parameter whose value is an integer number. + // */ + // "parameterKind": "integer", + // "longName": "--my-integer", + // "description": "A custom integer parameter for the \"my-global-command\" custom command", + // + // "associatedCommands": ["my-global-command"], + // "argumentName": "SOME_NUMBER", + // "required": false + // }, + // + // { + // /** + // * (Required) Determines the type of custom parameter. + // * An "integerList" is a custom command-line parameter whose argument is an integer. + // * The parameter can be specified multiple times to build a list. + // * + // * For example, if the parameter name is "--my-integer-list", then the custom command + // * might be invoked as + // * `rush my-global-command --my-integer-list 1 --my-integer-list 2 --my-integer-list 3` + // * and the parsed array would be [1,2,3]. + // */ + // "parameterKind": "integerList", + // "longName": "--my-integer-list", + // "description": "A custom integer list parameter for the \"my-global-command\" custom command", + // + // "associatedCommands": ["my-global-command"], + // "argumentName": "SOME_NUMBER", + // "required": false + // }, + // + // { + // /** + // * (Required) Determines the type of custom parameter. + // * An "stringList" is a custom command-line parameter whose argument is a text string. + // * The parameter can be specified multiple times to build a list. + // * + // * For example, if the parameter name is "--my-string-list", then the custom command + // * might be invoked as + // * `rush my-global-command --my-string-list A --my-string-list B --my-string-list C` + // * and the parsed array would be [A,B,C]. + // */ + // "parameterKind": "stringList", + // "longName": "--my-string-list", + // "description": "A custom string list parameter for the \"my-global-command\" custom command", + // + // "associatedCommands": ["my-global-command"], + // "argumentName": "SOME_TEXT", + // "required": false + // }, + // + // { + // /** + // * (Required) Determines the type of custom parameter. + // * A "choice" is a custom command-line parameter whose argument must be chosen from a list of + // * allowable alternatives (similar to an enum). + // * The parameter can be specified multiple times to build a list. + // * + // * For example, if the parameter name is "--my-choice-list", then the custom command + // * might be invoked as + // * `rush my-global-command --my-string-list vanilla --my-string-list chocolate` + // * and the parsed array would be [vanilla,chocolate]. + // */ + // "parameterKind": "choiceList", + // "longName": "--my-choice-list", + // "description": "A custom choice list parameter for the \"my-global-command\" custom command", + // + // "associatedCommands": ["my-global-command"], + // "required": false, + // + // /** + // * (Required) A list of alternative argument values that can be chosen for this parameter. + // */ + // "alternatives": [ + // { + // /** + // * A token that is one of the alternatives that can be used with the choice parameter, + // * e.g. "vanilla" in "--flavor vanilla". + // */ + // "name": "vanilla", + // + // /** + // * A detailed description for the alternative that can be shown in the command-line help. + // * + // * Whenever you introduce commands/parameters, taking a little time to write meaningful + // * documentation can make a big difference for the developer experience in your repo. + // */ + // "description": "Use the vanilla flavor" + // }, + // + // { + // "name": "chocolate", + // "description": "Use the chocolate flavor" + // }, + // + // { + // "name": "strawberry", + // "description": "Use the strawberry flavor" + // } + // ] + // } + { + "parameterKind": "string", + "argumentName": "MESSAGE", + "longName": "--edit", + "description": "", + "associatedCommands": [ + "commitlint" + ] + }, + { + "parameterKind": "string", + "argumentName": "MESSAGE", + "longName": "--config", + "description": "", + "associatedCommands": [ + "commitlint" + ] + } + ] } diff --git a/common/git-hooks/pre-commit b/common/git-hooks/pre-commit index 1ba1b3e2..8c9dcbcc 100755 --- a/common/git-hooks/pre-commit +++ b/common/git-hooks/pre-commit @@ -11,4 +11,5 @@ if [ "$PRE_LINT" != "1" ]; then node common/scripts/install-run-rush.js -q lint-staged || exit $? node common/scripts/install-run-rush.js check + node common/autoinstallers/license-header/index.js fi diff --git a/config/eslint-config/.eslintrc.base.js b/config/eslint-config/.eslintrc.base.js index e75326ab..d9fc94e2 100644 --- a/config/eslint-config/.eslintrc.base.js +++ b/config/eslint-config/.eslintrc.base.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // This is a workaround for https://github.com/eslint/eslint/issues/3458 require('@rushstack/eslint-config/patch/modern-module-resolution'); diff --git a/config/eslint-config/.eslintrc.js b/config/eslint-config/.eslintrc.js index 48cce2c2..aa421eef 100644 --- a/config/eslint-config/.eslintrc.js +++ b/config/eslint-config/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); const { main } = require('./package.json'); diff --git a/config/eslint-config/.eslintrc.node.js b/config/eslint-config/.eslintrc.node.js index 0622c0a2..b315bdb8 100644 --- a/config/eslint-config/.eslintrc.node.js +++ b/config/eslint-config/.eslintrc.node.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // This is a workaround for https://github.com/eslint/eslint/issues/3458 require('@rushstack/eslint-config/patch/modern-module-resolution'); diff --git a/config/eslint-config/.eslintrc.web.js b/config/eslint-config/.eslintrc.web.js index 82e54772..9ab7f577 100644 --- a/config/eslint-config/.eslintrc.web.js +++ b/config/eslint-config/.eslintrc.web.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // This is a workaround for https://github.com/eslint/eslint/issues/3458 require('@rushstack/eslint-config/patch/modern-module-resolution'); diff --git a/config/eslint-config/src/defineConfig.ts b/config/eslint-config/src/defineConfig.ts index da22f9e0..3f54d5c1 100644 --- a/config/eslint-config/src/defineConfig.ts +++ b/config/eslint-config/src/defineConfig.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import path from 'path'; import type { ESLintConfig, Rules } from 'eslint-define-config'; diff --git a/config/eslint-config/src/index.js b/config/eslint-config/src/index.js index 9d700674..a74d8382 100644 --- a/config/eslint-config/src/index.js +++ b/config/eslint-config/src/index.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + require('ts-node').register({ transpileOnly: true, cwd: __dirname }); const { defineConfig } = require('./defineConfig'); diff --git a/config/ts-config/.eslintrc.js b/config/ts-config/.eslintrc.js index 982b4afc..6d73d09a 100644 --- a/config/ts-config/.eslintrc.js +++ b/config/ts-config/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + module.exports = { extends: ['../eslint-config/.eslintrc.node.js'], rules: {}, diff --git a/config/ts-config/global.d.ts b/config/ts-config/global.d.ts index e69de29b..77723d8d 100644 --- a/config/ts-config/global.d.ts +++ b/config/ts-config/global.d.ts @@ -0,0 +1,5 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + diff --git a/doc_build.sh b/doc_build.sh index 64b7b88e..8eb3ad70 100644 --- a/doc_build.sh +++ b/doc_build.sh @@ -1,3 +1,6 @@ +# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates +# SPDX-License-Identifier: MIT + rush build cd apps/docs npm run docs diff --git a/e2e/fixed-layout/.eslintrc.js b/e2e/fixed-layout/.eslintrc.js index 3aef16ba..00266872 100644 --- a/e2e/fixed-layout/.eslintrc.js +++ b/e2e/fixed-layout/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/e2e/fixed-layout/playwright.config.ts b/e2e/fixed-layout/playwright.config.ts index 893b3274..1326505a 100644 --- a/e2e/fixed-layout/playwright.config.ts +++ b/e2e/fixed-layout/playwright.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { defineConfig } from '@playwright/test'; export default defineConfig({ diff --git a/e2e/fixed-layout/tests/layout.spec.ts b/e2e/fixed-layout/tests/layout.spec.ts index 297db73d..9ebb9fab 100644 --- a/e2e/fixed-layout/tests/layout.spec.ts +++ b/e2e/fixed-layout/tests/layout.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { test, expect } from '@playwright/test'; test('page render test', async ({ page }) => { diff --git a/e2e/fixed-layout/tests/models/index.ts b/e2e/fixed-layout/tests/models/index.ts index a2e77a08..0126ebe0 100644 --- a/e2e/fixed-layout/tests/models/index.ts +++ b/e2e/fixed-layout/tests/models/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { Page } from '@playwright/test'; type InsertEdgeOptions = { diff --git a/e2e/fixed-layout/tests/node.spec.ts b/e2e/fixed-layout/tests/node.spec.ts index 9a8f8e6c..2a6a1e79 100644 --- a/e2e/fixed-layout/tests/node.spec.ts +++ b/e2e/fixed-layout/tests/node.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { test, expect } from '@playwright/test'; import PageModel from './models'; diff --git a/e2e/free-layout/.eslintrc.js b/e2e/free-layout/.eslintrc.js index be186c32..69044591 100644 --- a/e2e/free-layout/.eslintrc.js +++ b/e2e/free-layout/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/e2e/free-layout/playwright.config.ts b/e2e/free-layout/playwright.config.ts index e4c037ec..1c5618e7 100644 --- a/e2e/free-layout/playwright.config.ts +++ b/e2e/free-layout/playwright.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { defineConfig } from '@playwright/test'; export default defineConfig({ diff --git a/e2e/free-layout/tests/layout.spec.ts b/e2e/free-layout/tests/layout.spec.ts index 627f263c..02198cd3 100644 --- a/e2e/free-layout/tests/layout.spec.ts +++ b/e2e/free-layout/tests/layout.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { test } from '@playwright/test'; // ensure layout render diff --git a/e2e/free-layout/tests/models/index.ts b/e2e/free-layout/tests/models/index.ts index 380d68ed..cbd464a4 100644 --- a/e2e/free-layout/tests/models/index.ts +++ b/e2e/free-layout/tests/models/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { Page } from '@playwright/test'; class FreeLayoutModel { diff --git a/e2e/free-layout/tests/node.spec.ts b/e2e/free-layout/tests/node.spec.ts index 01b420c0..78b296e0 100644 --- a/e2e/free-layout/tests/node.spec.ts +++ b/e2e/free-layout/tests/node.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { test, expect } from '@playwright/test'; import PageModel from './models'; diff --git a/packages/canvas-engine/core/.eslintrc.js b/packages/canvas-engine/core/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/canvas-engine/core/.eslintrc.js +++ b/packages/canvas-engine/core/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/canvas-engine/core/__mocks__/create-entity.mock.ts b/packages/canvas-engine/core/__mocks__/create-entity.mock.ts index 2c648ed1..f834c24a 100644 --- a/packages/canvas-engine/core/__mocks__/create-entity.mock.ts +++ b/packages/canvas-engine/core/__mocks__/create-entity.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Container } from 'inversify' import { diff --git a/packages/canvas-engine/core/__mocks__/layers.mock.tsx b/packages/canvas-engine/core/__mocks__/layers.mock.tsx index 36fdccae..2b918869 100644 --- a/packages/canvas-engine/core/__mocks__/layers.mock.tsx +++ b/packages/canvas-engine/core/__mocks__/layers.mock.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { domUtils } from '@flowgram.ai/utils'; import { Layer } from '../src/core'; diff --git a/packages/canvas-engine/core/__mocks__/playground-container.mock.ts b/packages/canvas-engine/core/__mocks__/playground-container.mock.ts index 853e3236..81f346a8 100644 --- a/packages/canvas-engine/core/__mocks__/playground-container.mock.ts +++ b/packages/canvas-engine/core/__mocks__/playground-container.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Playground, createPlaygroundContainer } from '../src' export function createPlayground(): Playground { diff --git a/packages/canvas-engine/core/__tests__/core/layer/config/editor-state-config-entity.spec.ts b/packages/canvas-engine/core/__tests__/core/layer/config/editor-state-config-entity.spec.ts index dc98bed5..a80e059c 100644 --- a/packages/canvas-engine/core/__tests__/core/layer/config/editor-state-config-entity.spec.ts +++ b/packages/canvas-engine/core/__tests__/core/layer/config/editor-state-config-entity.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EditorStateConfigEntity } from '../../../../src/core/layer/config/editor-state-config-entity'; it('should expose isPressingSpaceBar', () => { diff --git a/packages/canvas-engine/core/__tests__/core/layer/config/payground-config-entity.spec.ts b/packages/canvas-engine/core/__tests__/core/layer/config/payground-config-entity.spec.ts index 93f2a1e9..ac7c8f10 100644 --- a/packages/canvas-engine/core/__tests__/core/layer/config/payground-config-entity.spec.ts +++ b/packages/canvas-engine/core/__tests__/core/layer/config/payground-config-entity.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PlaygroundConfigEntity } from '../../../../src/core/layer/config/playground-config-entity'; it('should disable grab', () => { diff --git a/packages/canvas-engine/core/__tests__/core/layer/playground-layer.spec.tsx b/packages/canvas-engine/core/__tests__/core/layer/playground-layer.spec.tsx index 0dab8ff1..fb9d4842 100644 --- a/packages/canvas-engine/core/__tests__/core/layer/playground-layer.spec.tsx +++ b/packages/canvas-engine/core/__tests__/core/layer/playground-layer.spec.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/canvas-engine/core/__tests__/entity.spec.ts b/packages/canvas-engine/core/__tests__/entity.spec.ts index 44d00e6e..59b27301 100644 --- a/packages/canvas-engine/core/__tests__/entity.spec.ts +++ b/packages/canvas-engine/core/__tests__/entity.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi } from 'vitest'; import { Container } from 'inversify'; diff --git a/packages/canvas-engine/core/__tests__/layer.spec.tsx b/packages/canvas-engine/core/__tests__/layer.spec.tsx index 80a1eeb7..a1b61e8a 100644 --- a/packages/canvas-engine/core/__tests__/layer.spec.tsx +++ b/packages/canvas-engine/core/__tests__/layer.spec.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/canvas-engine/core/__tests__/pipeline.spec.tsx b/packages/canvas-engine/core/__tests__/pipeline.spec.tsx index 773feff0..1d44400f 100644 --- a/packages/canvas-engine/core/__tests__/pipeline.spec.tsx +++ b/packages/canvas-engine/core/__tests__/pipeline.spec.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/canvas-engine/core/__tests__/playground-contribution.spec.tsx b/packages/canvas-engine/core/__tests__/playground-contribution.spec.tsx index 9477824a..34257042 100644 --- a/packages/canvas-engine/core/__tests__/playground-contribution.spec.tsx +++ b/packages/canvas-engine/core/__tests__/playground-contribution.spec.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { render, cleanup } from '@testing-library/react'; diff --git a/packages/canvas-engine/core/__tests__/playground-mock-tools.spec.ts b/packages/canvas-engine/core/__tests__/playground-mock-tools.spec.ts index df6042e9..c4145bbc 100644 --- a/packages/canvas-engine/core/__tests__/playground-mock-tools.spec.ts +++ b/packages/canvas-engine/core/__tests__/playground-mock-tools.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { EntityManager, PlaygroundLayer, PlaygroundMockTools, Playground, Layer } from '../src'; diff --git a/packages/canvas-engine/core/__tests__/playground-react.spec.tsx b/packages/canvas-engine/core/__tests__/playground-react.spec.tsx index b3b448e4..76276df9 100644 --- a/packages/canvas-engine/core/__tests__/playground-react.spec.tsx +++ b/packages/canvas-engine/core/__tests__/playground-react.spec.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useRef, useEffect } from 'react'; import { expect } from 'vitest'; diff --git a/packages/canvas-engine/core/__tests__/playground.test.ts b/packages/canvas-engine/core/__tests__/playground.test.ts index a597f21c..442cdbe4 100644 --- a/packages/canvas-engine/core/__tests__/playground.test.ts +++ b/packages/canvas-engine/core/__tests__/playground.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Rectangle } from '@flowgram.ai/utils'; import { createPlayground } from '../__mocks__/playground-container.mock'; diff --git a/packages/canvas-engine/core/__tests__/plugin.test.ts b/packages/canvas-engine/core/__tests__/plugin.test.ts index 0764a1c3..e1248bae 100644 --- a/packages/canvas-engine/core/__tests__/plugin.test.ts +++ b/packages/canvas-engine/core/__tests__/plugin.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces, ContainerModule } from 'inversify'; import { diff --git a/packages/canvas-engine/core/__tests__/react-hooks.spec.tsx b/packages/canvas-engine/core/__tests__/react-hooks.spec.tsx index a1aa3b61..582162c5 100644 --- a/packages/canvas-engine/core/__tests__/react-hooks.spec.tsx +++ b/packages/canvas-engine/core/__tests__/react-hooks.spec.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { describe, it } from 'vitest'; diff --git a/packages/canvas-engine/core/__tests__/schema.spec.ts b/packages/canvas-engine/core/__tests__/schema.spec.ts index c45106be..c41471a5 100644 --- a/packages/canvas-engine/core/__tests__/schema.spec.ts +++ b/packages/canvas-engine/core/__tests__/schema.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Container } from 'inversify'; import { diff --git a/packages/canvas-engine/core/__tests__/selection.spec.ts b/packages/canvas-engine/core/__tests__/selection.spec.ts index 4a7bc455..93893672 100644 --- a/packages/canvas-engine/core/__tests__/selection.spec.ts +++ b/packages/canvas-engine/core/__tests__/selection.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi } from 'vitest'; import { createPlayground } from '../__mocks__/playground-container.mock'; diff --git a/packages/canvas-engine/core/__tests__/services/clipboard-service.spec.ts b/packages/canvas-engine/core/__tests__/services/clipboard-service.spec.ts index ab30f300..44b8e4a5 100644 --- a/packages/canvas-engine/core/__tests__/services/clipboard-service.spec.ts +++ b/packages/canvas-engine/core/__tests__/services/clipboard-service.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, beforeEach, it, expect, vi } from 'vitest'; import { DefaultClipboardService } from '../../src/services'; diff --git a/packages/canvas-engine/core/__tests__/services/storage-service.spec.ts b/packages/canvas-engine/core/__tests__/services/storage-service.spec.ts index 9e12526e..7b87fcd6 100644 --- a/packages/canvas-engine/core/__tests__/services/storage-service.spec.ts +++ b/packages/canvas-engine/core/__tests__/services/storage-service.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, beforeEach, it, expect, vi } from 'vitest'; import { LocalStorageService, StorageService } from '../../src/services'; diff --git a/packages/canvas-engine/core/__tests__/transform-schema.spec.ts b/packages/canvas-engine/core/__tests__/transform-schema.spec.ts index 5be736cd..f63089be 100644 --- a/packages/canvas-engine/core/__tests__/transform-schema.spec.ts +++ b/packages/canvas-engine/core/__tests__/transform-schema.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Container } from 'inversify'; import { type IPoint, PI, Rectangle, type SizeSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/__tests__/utils.test.ts b/packages/canvas-engine/core/__tests__/utils.test.ts index 7276d93f..3ccb1960 100644 --- a/packages/canvas-engine/core/__tests__/utils.test.ts +++ b/packages/canvas-engine/core/__tests__/utils.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable, domUtils } from '@flowgram.ai/utils'; import { diff --git a/packages/canvas-engine/core/src/common/config-entity.ts b/packages/canvas-engine/core/src/common/config-entity.ts index e455a41d..d203db1d 100644 --- a/packages/canvas-engine/core/src/common/config-entity.ts +++ b/packages/canvas-engine/core/src/common/config-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type Disposable } from '@flowgram.ai/utils'; import type { EntityDataRegistry } from './entity-data'; diff --git a/packages/canvas-engine/core/src/common/entity-data.ts b/packages/canvas-engine/core/src/common/entity-data.ts index 6d256511..4d4aec0f 100644 --- a/packages/canvas-engine/core/src/common/entity-data.ts +++ b/packages/canvas-engine/core/src/common/entity-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Compare, DisposableImpl, Emitter } from '@flowgram.ai/utils'; import { Entity } from './entity'; diff --git a/packages/canvas-engine/core/src/common/entity-manager-contribution.ts b/packages/canvas-engine/core/src/common/entity-manager-contribution.ts index fda64557..5d17aeec 100644 --- a/packages/canvas-engine/core/src/common/entity-manager-contribution.ts +++ b/packages/canvas-engine/core/src/common/entity-manager-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type EntityManager } from './entity-manager'; export const EntityManagerContribution = Symbol('EntityManagerContribution'); diff --git a/packages/canvas-engine/core/src/common/entity-manager.ts b/packages/canvas-engine/core/src/common/entity-manager.ts index 93554483..28524fe7 100644 --- a/packages/canvas-engine/core/src/common/entity-manager.ts +++ b/packages/canvas-engine/core/src/common/entity-manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, interfaces, multiInject, optional, postConstruct } from 'inversify'; import { Disposable, DisposableCollection, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/entity.ts b/packages/canvas-engine/core/src/common/entity.ts index 00a35ad4..90066a37 100644 --- a/packages/canvas-engine/core/src/common/entity.ts +++ b/packages/canvas-engine/core/src/common/entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { interfaces } from 'inversify'; import { Compare, Disposable, DisposableCollection, Emitter, type Event } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/index.ts b/packages/canvas-engine/core/src/common/index.ts index 5e9d789c..f8a45f30 100644 --- a/packages/canvas-engine/core/src/common/index.ts +++ b/packages/canvas-engine/core/src/common/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './schema'; export * from './utils'; // export * from './able'; diff --git a/packages/canvas-engine/core/src/common/playground-context.ts b/packages/canvas-engine/core/src/common/playground-context.ts index dde3e92c..f71d9191 100644 --- a/packages/canvas-engine/core/src/common/playground-context.ts +++ b/packages/canvas-engine/core/src/common/playground-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { injectByProvider } from '../core/utils'; diff --git a/packages/canvas-engine/core/src/common/playground-decorator-helper.ts b/packages/canvas-engine/core/src/common/playground-decorator-helper.ts index 559d58dc..b43e7546 100644 --- a/packages/canvas-engine/core/src/common/playground-decorator-helper.ts +++ b/packages/canvas-engine/core/src/common/playground-decorator-helper.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import type { AbleRegistry } from './able'; import type { EntityDataRegistry, EntityRegistry } from '.'; diff --git a/packages/canvas-engine/core/src/common/playground-decorators.ts b/packages/canvas-engine/core/src/common/playground-decorators.ts index e645312b..89791772 100644 --- a/packages/canvas-engine/core/src/common/playground-decorators.ts +++ b/packages/canvas-engine/core/src/common/playground-decorators.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { // ABLES_DECO_KEY, ENTITIES_DECO_KEY, diff --git a/packages/canvas-engine/core/src/common/playground-schedule.ts b/packages/canvas-engine/core/src/common/playground-schedule.ts index 1722ed01..18c1bf7f 100644 --- a/packages/canvas-engine/core/src/common/playground-schedule.ts +++ b/packages/canvas-engine/core/src/common/playground-schedule.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { throttle } from 'lodash'; import { type Disposable } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/protect-wheel-area.ts b/packages/canvas-engine/core/src/common/protect-wheel-area.ts index 2ebc2edd..20612942 100644 --- a/packages/canvas-engine/core/src/common/protect-wheel-area.ts +++ b/packages/canvas-engine/core/src/common/protect-wheel-area.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * 保护区域不被画布劫持滚动事件 */ diff --git a/packages/canvas-engine/core/src/common/schema/index.ts b/packages/canvas-engine/core/src/common/schema/index.ts index 2181b42b..63cd262a 100644 --- a/packages/canvas-engine/core/src/common/schema/index.ts +++ b/packages/canvas-engine/core/src/common/schema/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './node'; export * from './origin-schema'; export * from './opacity-schema'; diff --git a/packages/canvas-engine/core/src/common/schema/node.ts b/packages/canvas-engine/core/src/common/schema/node.ts index dd0bd5d6..584e1830 100644 --- a/packages/canvas-engine/core/src/common/schema/node.ts +++ b/packages/canvas-engine/core/src/common/schema/node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type TransformSchema } from './transform-schema'; export interface NodeSchema { diff --git a/packages/canvas-engine/core/src/common/schema/opacity-schema.ts b/packages/canvas-engine/core/src/common/schema/opacity-schema.ts index 34134a99..9048c184 100644 --- a/packages/canvas-engine/core/src/common/schema/opacity-schema.ts +++ b/packages/canvas-engine/core/src/common/schema/opacity-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { OpacitySchemaDecoration, Schema } from '@flowgram.ai/utils'; import type { OpacitySchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/schema/origin-schema.ts b/packages/canvas-engine/core/src/common/schema/origin-schema.ts index 48bd664d..b06f4b79 100644 --- a/packages/canvas-engine/core/src/common/schema/origin-schema.ts +++ b/packages/canvas-engine/core/src/common/schema/origin-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { OriginSchemaDecoration, Schema } from '@flowgram.ai/utils'; import type { OriginSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/schema/position-schema.ts b/packages/canvas-engine/core/src/common/schema/position-schema.ts index 7d005284..c2b5d575 100644 --- a/packages/canvas-engine/core/src/common/schema/position-schema.ts +++ b/packages/canvas-engine/core/src/common/schema/position-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PositionSchemaDecoration, Schema } from '@flowgram.ai/utils'; import type { PositionSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/schema/rotation-schema.ts b/packages/canvas-engine/core/src/common/schema/rotation-schema.ts index 5957b4df..e0c262e1 100644 --- a/packages/canvas-engine/core/src/common/schema/rotation-schema.ts +++ b/packages/canvas-engine/core/src/common/schema/rotation-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { RotationSchemaDecoration, Schema } from '@flowgram.ai/utils'; import type { RotationSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/schema/scale-schema.ts b/packages/canvas-engine/core/src/common/schema/scale-schema.ts index c4702337..d684b3aa 100644 --- a/packages/canvas-engine/core/src/common/schema/scale-schema.ts +++ b/packages/canvas-engine/core/src/common/schema/scale-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ScaleSchemaDecoration, Schema } from '@flowgram.ai/utils'; import type { ScaleSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/schema/size-schema.ts b/packages/canvas-engine/core/src/common/schema/size-schema.ts index dd60a928..32b29dde 100644 --- a/packages/canvas-engine/core/src/common/schema/size-schema.ts +++ b/packages/canvas-engine/core/src/common/schema/size-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { SizeSchema, SizeSchemaDecoration, Schema } from '@flowgram.ai/utils'; import { EntityData } from '../entity-data'; diff --git a/packages/canvas-engine/core/src/common/schema/skew-schema.ts b/packages/canvas-engine/core/src/common/schema/skew-schema.ts index 8946c45f..c97f8b7b 100644 --- a/packages/canvas-engine/core/src/common/schema/skew-schema.ts +++ b/packages/canvas-engine/core/src/common/schema/skew-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { SkewSchemaDecoration, Schema } from '@flowgram.ai/utils'; import type { SkewSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/common/schema/transform-schema.ts b/packages/canvas-engine/core/src/common/schema/transform-schema.ts index aa84cdd9..5bf87cdc 100644 --- a/packages/canvas-engine/core/src/common/schema/transform-schema.ts +++ b/packages/canvas-engine/core/src/common/schema/transform-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Angle, Circle, diff --git a/packages/canvas-engine/core/src/common/utils/bounds.spec.ts b/packages/canvas-engine/core/src/common/utils/bounds.spec.ts index 63a2b314..231c8873 100644 --- a/packages/canvas-engine/core/src/common/utils/bounds.spec.ts +++ b/packages/canvas-engine/core/src/common/utils/bounds.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // nolint: cyclo_complexity,method_line import { expect, describe, beforeEach, it } from 'vitest'; import { Container } from 'inversify'; diff --git a/packages/canvas-engine/core/src/common/utils/bounds.ts b/packages/canvas-engine/core/src/common/utils/bounds.ts index 4f864572..415c7637 100644 --- a/packages/canvas-engine/core/src/common/utils/bounds.ts +++ b/packages/canvas-engine/core/src/common/utils/bounds.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type Matrix, Point, Rectangle } from '@flowgram.ai/utils'; import type { PositionSchema, TransformSchema } from '../schema'; diff --git a/packages/canvas-engine/core/src/common/utils/index.ts b/packages/canvas-engine/core/src/common/utils/index.ts index 8956ceea..71dbf721 100644 --- a/packages/canvas-engine/core/src/common/utils/index.ts +++ b/packages/canvas-engine/core/src/common/utils/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './bounds'; diff --git a/packages/canvas-engine/core/src/core/index.ts b/packages/canvas-engine/core/src/core/index.ts index afed8856..b0fc5b06 100644 --- a/packages/canvas-engine/core/src/core/index.ts +++ b/packages/canvas-engine/core/src/core/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './pipeline'; export * from './layer'; export * from './utils'; diff --git a/packages/canvas-engine/core/src/core/layer/config/editor-state-config-entity.ts b/packages/canvas-engine/core/src/core/layer/config/editor-state-config-entity.ts index a1633e4d..750f3344 100644 --- a/packages/canvas-engine/core/src/core/layer/config/editor-state-config-entity.ts +++ b/packages/canvas-engine/core/src/core/layer/config/editor-state-config-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { Disposable, Emitter } from '@flowgram.ai/utils'; import { ConfigEntity, EntityOpts } from '../../../common'; diff --git a/packages/canvas-engine/core/src/core/layer/config/index.ts b/packages/canvas-engine/core/src/core/layer/config/index.ts index 81d8371e..060a15c7 100644 --- a/packages/canvas-engine/core/src/core/layer/config/index.ts +++ b/packages/canvas-engine/core/src/core/layer/config/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './editor-state-config-entity' export * from './playground-config-entity' diff --git a/packages/canvas-engine/core/src/core/layer/config/playground-config-entity.ts b/packages/canvas-engine/core/src/core/layer/config/playground-config-entity.ts index 97981ffe..61bfe1cd 100644 --- a/packages/canvas-engine/core/src/core/layer/config/playground-config-entity.ts +++ b/packages/canvas-engine/core/src/core/layer/config/playground-config-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable, domUtils, Emitter, PromiseDeferred, Rectangle } from '@flowgram.ai/utils' import { ConfigEntity, diff --git a/packages/canvas-engine/core/src/core/layer/index.ts b/packages/canvas-engine/core/src/core/layer/index.ts index 4416b447..f9407477 100644 --- a/packages/canvas-engine/core/src/core/layer/index.ts +++ b/packages/canvas-engine/core/src/core/layer/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './config'; export * from './layer'; export * from './playground-layer'; diff --git a/packages/canvas-engine/core/src/core/layer/layer.ts b/packages/canvas-engine/core/src/core/layer/layer.ts index 17a544da..5a9facb3 100644 --- a/packages/canvas-engine/core/src/core/layer/layer.ts +++ b/packages/canvas-engine/core/src/core/layer/layer.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { type CacheManager, diff --git a/packages/canvas-engine/core/src/core/layer/playground-layer.ts b/packages/canvas-engine/core/src/core/layer/playground-layer.ts index ba2fc7cb..662e0860 100644 --- a/packages/canvas-engine/core/src/core/layer/playground-layer.ts +++ b/packages/canvas-engine/core/src/core/layer/playground-layer.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, optional } from 'inversify'; import { Disposable, domUtils, PositionSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/core/pipeline/index.ts b/packages/canvas-engine/core/src/core/pipeline/index.ts index e53c55c4..a9113331 100644 --- a/packages/canvas-engine/core/src/core/pipeline/index.ts +++ b/packages/canvas-engine/core/src/core/pipeline/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './pipeline'; export * from './pipeline-renderer'; export * from './pipeline-registry'; diff --git a/packages/canvas-engine/core/src/core/pipeline/pipeline-entities-selector.ts b/packages/canvas-engine/core/src/core/pipeline/pipeline-entities-selector.ts index 7d47d746..8330c43c 100644 --- a/packages/canvas-engine/core/src/core/pipeline/pipeline-entities-selector.ts +++ b/packages/canvas-engine/core/src/core/pipeline/pipeline-entities-selector.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { type Layer } from '../layer'; diff --git a/packages/canvas-engine/core/src/core/pipeline/pipeline-entities.ts b/packages/canvas-engine/core/src/core/pipeline/pipeline-entities.ts index cd2d95e8..306c3434 100644 --- a/packages/canvas-engine/core/src/core/pipeline/pipeline-entities.ts +++ b/packages/canvas-engine/core/src/core/pipeline/pipeline-entities.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { // type AbleRegistry, type ConfigEntity, diff --git a/packages/canvas-engine/core/src/core/pipeline/pipeline-registry.ts b/packages/canvas-engine/core/src/core/pipeline/pipeline-registry.ts index 01582840..f825bc84 100644 --- a/packages/canvas-engine/core/src/core/pipeline/pipeline-registry.ts +++ b/packages/canvas-engine/core/src/core/pipeline/pipeline-registry.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { ConflatableMessage, diff --git a/packages/canvas-engine/core/src/core/pipeline/pipeline-renderer.tsx b/packages/canvas-engine/core/src/core/pipeline/pipeline-renderer.tsx index d9e92198..f275a3be 100644 --- a/packages/canvas-engine/core/src/core/pipeline/pipeline-renderer.tsx +++ b/packages/canvas-engine/core/src/core/pipeline/pipeline-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { inject, injectable } from 'inversify'; diff --git a/packages/canvas-engine/core/src/core/pipeline/pipeline.ts b/packages/canvas-engine/core/src/core/pipeline/pipeline.ts index 3c3b45f0..b593a37d 100644 --- a/packages/canvas-engine/core/src/core/pipeline/pipeline.ts +++ b/packages/canvas-engine/core/src/core/pipeline/pipeline.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type Layer, type LayerRegistry } from '../layer'; export type PipeSupportEvent = MouseEvent | DragEvent | KeyboardEvent | UIEvent | TouchEvent | any; diff --git a/packages/canvas-engine/core/src/core/pipeline/pipline-react-utils.tsx b/packages/canvas-engine/core/src/core/pipeline/pipline-react-utils.tsx index 3df2d801..46d03169 100644 --- a/packages/canvas-engine/core/src/core/pipeline/pipline-react-utils.tsx +++ b/packages/canvas-engine/core/src/core/pipeline/pipline-react-utils.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import ReactDOM from 'react-dom'; import React, { useEffect, useState, useCallback } from 'react'; diff --git a/packages/canvas-engine/core/src/core/utils/index.ts b/packages/canvas-engine/core/src/core/utils/index.ts index 911faf88..38438323 100644 --- a/packages/canvas-engine/core/src/core/utils/index.ts +++ b/packages/canvas-engine/core/src/core/utils/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './playground-drag'; // export * from './adsorber'; export * from './tween'; diff --git a/packages/canvas-engine/core/src/core/utils/inject-provider-decorators.ts b/packages/canvas-engine/core/src/core/utils/inject-provider-decorators.ts index 7d624f36..c656ca68 100644 --- a/packages/canvas-engine/core/src/core/utils/inject-provider-decorators.ts +++ b/packages/canvas-engine/core/src/core/utils/inject-provider-decorators.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, interfaces, optional } from 'inversify'; import 'reflect-metadata'; diff --git a/packages/canvas-engine/core/src/core/utils/lazy-inject-decorators.ts b/packages/canvas-engine/core/src/core/utils/lazy-inject-decorators.ts index f47ebbde..5d48af54 100644 --- a/packages/canvas-engine/core/src/core/utils/lazy-inject-decorators.ts +++ b/packages/canvas-engine/core/src/core/utils/lazy-inject-decorators.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, interfaces } from 'inversify'; export const LazyInjectContext = Symbol('LazyInjectContext'); diff --git a/packages/canvas-engine/core/src/core/utils/mouse-touch-event.ts b/packages/canvas-engine/core/src/core/utils/mouse-touch-event.ts index 19924735..f65a156b 100644 --- a/packages/canvas-engine/core/src/core/utils/mouse-touch-event.ts +++ b/packages/canvas-engine/core/src/core/utils/mouse-touch-event.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export namespace MouseTouchEvent { export const isTouchEvent = (event: TouchEvent | React.TouchEvent): event is TouchEvent => 'touches' in event; diff --git a/packages/canvas-engine/core/src/core/utils/playground-drag.ts b/packages/canvas-engine/core/src/core/utils/playground-drag.ts index 90ab9b2e..59ed8a1e 100644 --- a/packages/canvas-engine/core/src/core/utils/playground-drag.ts +++ b/packages/canvas-engine/core/src/core/utils/playground-drag.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable, Emitter, diff --git a/packages/canvas-engine/core/src/core/utils/playground-gesture.spec.ts b/packages/canvas-engine/core/src/core/utils/playground-gesture.spec.ts index d31bcc8b..3d61e578 100644 --- a/packages/canvas-engine/core/src/core/utils/playground-gesture.spec.ts +++ b/packages/canvas-engine/core/src/core/utils/playground-gesture.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, vi } from 'vitest'; import { PlaygroundGesture } from './playground-gesture'; diff --git a/packages/canvas-engine/core/src/core/utils/playground-gesture.ts b/packages/canvas-engine/core/src/core/utils/playground-gesture.ts index d6d3f952..db8b1940 100644 --- a/packages/canvas-engine/core/src/core/utils/playground-gesture.ts +++ b/packages/canvas-engine/core/src/core/utils/playground-gesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable, DisposableImpl } from '@flowgram.ai/utils'; import { type PlaygroundConfigEntity } from '../layer/config/playground-config-entity'; diff --git a/packages/canvas-engine/core/src/core/utils/tween.ts b/packages/canvas-engine/core/src/core/utils/tween.ts index 1845bcb0..28ca0eb1 100644 --- a/packages/canvas-engine/core/src/core/utils/tween.ts +++ b/packages/canvas-engine/core/src/core/utils/tween.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import TWEEN from '@tweenjs/tween.js'; import { Disposable } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/Controller.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/Controller.ts index 301e6ffe..1c534944 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/Controller.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/Controller.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { chain } from './utils/fn'; import { isTouch, parseProp, toHandlerProp, touchIds } from './utils/events'; import { diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/EventStore.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/EventStore.ts index d3dc61b8..77f0a4a1 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/EventStore.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/EventStore.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { toDomEventType } from './utils/events'; import { GestureKey } from './types'; import type { Controller } from './Controller'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/TimeoutStore.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/TimeoutStore.ts index 680739c8..7ac9d499 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/TimeoutStore.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/TimeoutStore.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export class TimeoutStore { private _timeouts = new Map(); diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/actions.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/actions.ts index a241f7af..6612f956 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/actions.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/actions.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { GestureKey, EngineClass, Action } from './types'; import { WheelEngine } from './engines/WheelEngine'; import { ScrollEngine } from './engines/ScrollEngine'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/commonConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/commonConfigResolver.ts index 059ed9ac..0545d95a 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/commonConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/commonConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { InternalGestureOptions } from '../types' import { Vector2, State, GenericOptions } from '../types' import { V } from '../utils/maths' diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/coordinatesConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/coordinatesConfigResolver.ts index 3d9a3337..25ff1700 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/coordinatesConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/coordinatesConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { commonConfigResolver } from './commonConfigResolver' import { InternalCoordinatesOptions, CoordinatesConfig, Bounds, DragBounds, State, Vector2 } from '../types' diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/dragConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/dragConfigResolver.ts index d5dbad5f..3a431e71 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/dragConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/dragConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PointerType } from '../types' import { DragConfig, InternalDragOptions, Vector2 } from '../types' import { V } from '../utils/maths' diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/hoverConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/hoverConfigResolver.ts index 71a421bd..75909996 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/hoverConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/hoverConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { coordinatesConfigResolver } from './coordinatesConfigResolver' export const hoverConfigResolver = { diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/moveConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/moveConfigResolver.ts index 9832e1e2..6b755e49 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/moveConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/moveConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { coordinatesConfigResolver } from './coordinatesConfigResolver' export const moveConfigResolver = { diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/pinchConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/pinchConfigResolver.ts index 30d9be54..94596401 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/pinchConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/pinchConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ModifierKey } from '../types' import { PinchConfig, GenericOptions, InternalPinchOptions, State, Vector2 } from '../types' import { call, assignDefault } from '../utils/fn' diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/resolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/resolver.ts index 850e5695..fb53601e 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/resolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/resolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { sharedConfigResolver } from './sharedConfigResolver' import { ConfigResolverMap } from '../actions' import { GestureKey, InternalConfig, UserGestureConfig } from '../types' diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/scrollConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/scrollConfigResolver.ts index 89e9ee84..395d485e 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/scrollConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/scrollConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { coordinatesConfigResolver } from './coordinatesConfigResolver' export const scrollConfigResolver = coordinatesConfigResolver diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/sharedConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/sharedConfigResolver.ts index 5085e5d3..1537d0f2 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/sharedConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/sharedConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Target } from '../types' import { SUPPORT } from './support' diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/support.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/support.ts index e1e595f6..8d4b40bf 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/support.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/support.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const isBrowser = typeof window !== 'undefined' && window.document && window.document.createElement function supportsTouchEvents(): boolean { diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/wheelConfigResolver.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/wheelConfigResolver.ts index b71c3f06..1ab53a4b 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/wheelConfigResolver.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/config/wheelConfigResolver.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { coordinatesConfigResolver } from './coordinatesConfigResolver' export const wheelConfigResolver = coordinatesConfigResolver diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/CoordinatesEngine.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/CoordinatesEngine.ts index 5225df6e..64f0c09a 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/CoordinatesEngine.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/CoordinatesEngine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { V } from '../utils/maths'; import { getPointerType } from '../utils/events'; import { CoordinatesKey, Vector2 } from '../types'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/DragEngine.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/DragEngine.ts index 44d6a4e8..4d2880bb 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/DragEngine.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/DragEngine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { V } from '../utils/maths'; import { pointerId, getPointerType, pointerValues } from '../utils/events'; import { Vector2 } from '../types'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/Engine.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/Engine.ts index 70bdfb53..21b4f9c2 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/Engine.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/Engine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { V, computeRubberband } from '../utils/maths'; import { call } from '../utils/fn'; import { getEventDetails } from '../utils/events'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/HoverEngine.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/HoverEngine.ts index 57cd12dd..39dc4028 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/HoverEngine.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/HoverEngine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { V } from '../utils/maths'; import { pointerValues } from '../utils/events'; import { CoordinatesEngine } from './CoordinatesEngine'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/MoveEngine.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/MoveEngine.ts index a5cafa7a..4bb2b0c6 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/MoveEngine.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/MoveEngine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { V } from '../utils/maths'; import { pointerValues } from '../utils/events'; import { CoordinatesEngine } from './CoordinatesEngine'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/PinchEngine.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/PinchEngine.ts index 18cb9af3..25b49c46 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/PinchEngine.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/PinchEngine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { clampStateInternalMovementToBounds } from '../utils/state'; import { V } from '../utils/maths'; import { touchDistanceAngle, distanceAngle, wheelValues } from '../utils/events'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/ScrollEngine.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/ScrollEngine.ts index 5adf2fee..465630fe 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/ScrollEngine.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/ScrollEngine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { V } from '../utils/maths'; import { scrollValues } from '../utils/events'; import { CoordinatesEngine } from './CoordinatesEngine'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/WheelEngine.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/WheelEngine.ts index ef376ff5..55b5c1b8 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/WheelEngine.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/engines/WheelEngine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { clampStateInternalMovementToBounds } from '../utils/state'; import { V } from '../utils/maths'; import { wheelValues } from '../utils/events'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/index.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/index.ts index a4948721..627f5cbc 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/index.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Controller } from './Controller'; export { parseMergedHandlers } from './parser'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/parser.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/parser.ts index 953e01fd..95b338b8 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/parser.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/parser.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FullGestureState, GestureHandlers, diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types.ts index d621873e..66877568 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // type exports for core export * from './types/index'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/action.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/action.ts index 8127b107..84dcc5db 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/action.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/action.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { Engine } from '../engines/Engine'; import type { Controller } from '../Controller'; import type { ResolverMap } from '../config/resolver'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/config.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/config.ts index c41de41e..28294f27 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/config.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Vector2, Target, PointerType, NonUndefined } from './utils'; import { State } from './state'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/handlers.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/handlers.ts index b5fda714..21222a79 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/handlers.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/handlers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DOMHandlers, EventHandler } from './utils'; import { FullGestureState, State, EventTypes } from './state'; import { GestureKey } from './config'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/index.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/index.ts index 5bfaba35..ab3476a4 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/index.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './config'; export * from './internalConfig'; export * from './state'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/internalConfig.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/internalConfig.ts index dd7a173d..844f5aef 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/internalConfig.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/internalConfig.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PointerType, Vector2 } from './utils'; import { State } from './state'; import { GestureKey, CoordinatesKey, ModifierKey } from './config'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/state.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/state.ts index d75b4a9f..75f8d3ae 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/state.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { NonUndefined, Vector2, WebKitGestureEvent } from './utils'; import { GestureKey } from './config'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/utils.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/utils.ts index b50c4319..2db47b2f 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/utils.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/types/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type Vector2 = [number, number]; export type WebKitGestureEvent = PointerEvent & { scale: number; rotation: number }; export type Target = EventTarget | { current: EventTarget | null }; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils.ts index 1613b36c..7d2ffa90 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // additional core exports export { rubberbandIfOutOfBounds } from './utils/maths'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/events.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/events.ts index d6945f57..0f51b76b 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/events.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/events.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PointerType } from '../types'; import { Vector2 } from '../types'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/fn.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/fn.ts index 33cc441c..31c16bb6 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/fn.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/fn.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function call(v: T | ((...args: any[]) => T), ...args: any[]): T { if (typeof v === 'function') { // @ts-ignore diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/maths.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/maths.ts index 8fa5977d..7d031dd0 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/maths.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/maths.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Vector2 } from '../types'; export function clamp(v: number, min: number, max: number) { diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/state.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/state.ts index 7bb296e1..d231f748 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/state.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/core/utils/state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { CommonGestureState } from '../types'; // _movement rolls back to when it passed the bounds. diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/index.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/index.ts index 1d3c132d..4be5b29d 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/index.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './vanilla'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/DragGesture.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/DragGesture.ts index 3a5177d6..2cc13ec6 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/DragGesture.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/DragGesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EventTypes, Handler, UserDragConfig } from '../core/types'; import { registerAction, dragAction } from '../core/actions'; import { Recognizer } from './Recognizer'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/Gesture.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/Gesture.ts index 339abc42..be7077c5 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/Gesture.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/Gesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { AnyHandlerEventTypes, EventTypes, diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/HoverGesture.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/HoverGesture.ts index fea06bf8..fc96f198 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/HoverGesture.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/HoverGesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EventTypes, UserHoverConfig, Handler } from '../core/types'; import { registerAction, hoverAction } from '../core/actions'; import { Recognizer } from './Recognizer'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/MoveGesture.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/MoveGesture.ts index bb8f39fa..e2ed35d5 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/MoveGesture.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/MoveGesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { UserMoveConfig, Handler, EventTypes } from '../core/types'; import { registerAction, moveAction } from '../core/actions'; import { Recognizer } from './Recognizer'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/PinchGesture.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/PinchGesture.ts index d2254306..185edf36 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/PinchGesture.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/PinchGesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { UserPinchConfig, Handler, EventTypes } from '../core/types'; import { registerAction, pinchAction } from '../core/actions'; import { Recognizer } from './Recognizer'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/Recognizer.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/Recognizer.ts index 212b9471..39b98cd7 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/Recognizer.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/Recognizer.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { GestureKey, InternalHandlers, NativeHandlers, UserGestureConfig } from '../core/types'; import { Controller } from '../core'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/ScrollGesture.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/ScrollGesture.ts index b354ddc0..db79a8e2 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/ScrollGesture.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/ScrollGesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { UserScrollConfig, Handler, EventTypes } from '../core/types'; import { registerAction, scrollAction } from '../core/actions'; import { Recognizer } from './Recognizer'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/WheelGesture.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/WheelGesture.ts index 9f607bf1..d9bbaadf 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/WheelGesture.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/WheelGesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { UserWheelConfig, Handler, EventTypes } from '../core/types'; import { registerAction, wheelAction } from '../core/actions'; import { Recognizer } from './Recognizer'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/createGesture.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/createGesture.ts index 80ca1835..03041926 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/createGesture.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/createGesture.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Action, GestureHandlers, UserGestureConfig } from '../core/types'; import { registerAction } from '../core/actions'; import { parseMergedHandlers } from '../core'; diff --git a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/index.ts b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/index.ts index 06b5dae8..763b65cd 100644 --- a/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/index.ts +++ b/packages/canvas-engine/core/src/core/utils/use-gesture/vanilla/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { DragGesture } from './DragGesture'; export { PinchGesture } from './PinchGesture'; export { WheelGesture } from './WheelGesture'; diff --git a/packages/canvas-engine/core/src/index.ts b/packages/canvas-engine/core/src/index.ts index 995db031..58bacaf5 100644 --- a/packages/canvas-engine/core/src/index.ts +++ b/packages/canvas-engine/core/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './common'; export * from './core'; export * from './react'; diff --git a/packages/canvas-engine/core/src/playground-config.ts b/packages/canvas-engine/core/src/playground-config.ts index d35318a1..3b385973 100644 --- a/packages/canvas-engine/core/src/playground-config.ts +++ b/packages/canvas-engine/core/src/playground-config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import { // PlaygroundConfigEntity, // SelectorBoxConfigEntity, diff --git a/packages/canvas-engine/core/src/playground-container.ts b/packages/canvas-engine/core/src/playground-container.ts index 1a5d3eb0..6d075ad0 100644 --- a/packages/canvas-engine/core/src/playground-container.ts +++ b/packages/canvas-engine/core/src/playground-container.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Container, ContainerModule, type interfaces } from 'inversify'; import { CommandService, CommandContainerModule } from '@flowgram.ai/command'; diff --git a/packages/canvas-engine/core/src/playground-contribution.ts b/packages/canvas-engine/core/src/playground-contribution.ts index 667fb9f7..1fd0bcb1 100644 --- a/packages/canvas-engine/core/src/playground-contribution.ts +++ b/packages/canvas-engine/core/src/playground-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { PlaygroundConfig } from './playground-config'; diff --git a/packages/canvas-engine/core/src/playground-mock-tools.ts b/packages/canvas-engine/core/src/playground-mock-tools.ts index fda7b464..d533f9ea 100644 --- a/packages/canvas-engine/core/src/playground-mock-tools.ts +++ b/packages/canvas-engine/core/src/playground-mock-tools.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { createPlaygroundContainer, createPlaygroundLayerDefault } from './playground-container'; diff --git a/packages/canvas-engine/core/src/playground.ts b/packages/canvas-engine/core/src/playground.ts index 10876b31..6079c13a 100644 --- a/packages/canvas-engine/core/src/playground.ts +++ b/packages/canvas-engine/core/src/playground.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { nanoid } from 'nanoid'; diff --git a/packages/canvas-engine/core/src/plugin/index.ts b/packages/canvas-engine/core/src/plugin/index.ts index 1110b645..24bca5d7 100644 --- a/packages/canvas-engine/core/src/plugin/index.ts +++ b/packages/canvas-engine/core/src/plugin/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './plugin'; diff --git a/packages/canvas-engine/core/src/plugin/plugin.ts b/packages/canvas-engine/core/src/plugin/plugin.ts index 6f5cca5e..9abda1d9 100644 --- a/packages/canvas-engine/core/src/plugin/plugin.ts +++ b/packages/canvas-engine/core/src/plugin/plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule, interfaces } from 'inversify'; import { PlaygroundContribution } from '../playground-contribution'; diff --git a/packages/canvas-engine/core/src/react-hooks/index.ts b/packages/canvas-engine/core/src/react-hooks/index.ts index 4e5a7a06..10263083 100644 --- a/packages/canvas-engine/core/src/react-hooks/index.ts +++ b/packages/canvas-engine/core/src/react-hooks/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './use-entities'; export * from './use-entity-data-from-context'; export * from './use-entity-from-context'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-config-entity.ts b/packages/canvas-engine/core/src/react-hooks/use-config-entity.ts index 3adb9102..e51ade56 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-config-entity.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-config-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useLayoutEffect } from 'react'; import { Disposable } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-entities.ts b/packages/canvas-engine/core/src/react-hooks/use-entities.ts index 70582f47..886116e0 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-entities.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-entities.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useLayoutEffect } from 'react'; import { Entity, EntityManager, EntityRegistry } from '../common'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-entity-data-from-context.ts b/packages/canvas-engine/core/src/react-hooks/use-entity-data-from-context.ts index 8e7dcec1..9bb2f51e 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-entity-data-from-context.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-entity-data-from-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useLayoutEffect } from 'react'; import { EntityData } from '../common'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-entity-from-context.ts b/packages/canvas-engine/core/src/react-hooks/use-entity-from-context.ts index 045cc1bb..73df1495 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-entity-from-context.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-entity-from-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext, useLayoutEffect } from 'react'; import { Disposable } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-listen-events.ts b/packages/canvas-engine/core/src/react-hooks/use-listen-events.ts index ff03db52..0a8ecc28 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-listen-events.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-listen-events.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useLayoutEffect } from 'react'; import { DisposableCollection, type Event } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-playground-container.ts b/packages/canvas-engine/core/src/react-hooks/use-playground-container.ts index 6559730b..027a1619 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-playground-container.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-playground-container.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { type interfaces } from 'inversify'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-playground-context.ts b/packages/canvas-engine/core/src/react-hooks/use-playground-context.ts index 16af9a00..c8ca5a6e 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-playground-context.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-playground-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { PlaygroundReactContext } from '../react/playground-react-context'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-playground-drag.ts b/packages/canvas-engine/core/src/react-hooks/use-playground-drag.ts index 018722b9..abe17400 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-playground-drag.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-playground-drag.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { Disposable } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-playground-latest.ts b/packages/canvas-engine/core/src/react-hooks/use-playground-latest.ts index b991a61d..c44bd5c2 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-playground-latest.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-playground-latest.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState } from 'react'; import { Playground } from '../playground'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-playground.ts b/packages/canvas-engine/core/src/react-hooks/use-playground.ts index a8f8e055..0f6d91b8 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-playground.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-playground.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { PlaygroundReactRefContext } from '../react/playground-react-context'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-refresh.ts b/packages/canvas-engine/core/src/react-hooks/use-refresh.ts index 59f6b45f..f9eaa52f 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-refresh.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-refresh.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { useRefresh } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/react-hooks/use-service.ts b/packages/canvas-engine/core/src/react-hooks/use-service.ts index 0b9acf17..fbe41503 100644 --- a/packages/canvas-engine/core/src/react-hooks/use-service.ts +++ b/packages/canvas-engine/core/src/react-hooks/use-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type interfaces } from 'inversify'; import { usePlaygroundContainer } from './use-playground-container'; diff --git a/packages/canvas-engine/core/src/react/index.tsx b/packages/canvas-engine/core/src/react/index.tsx index b1128c4f..87e6f62c 100644 --- a/packages/canvas-engine/core/src/react/index.tsx +++ b/packages/canvas-engine/core/src/react/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './playground-react-context'; export * from './playground-react-provider'; export * from './playground-react-renderer'; diff --git a/packages/canvas-engine/core/src/react/playground-react-context.ts b/packages/canvas-engine/core/src/react/playground-react-context.ts index 2ee1e7b4..9cf7541b 100644 --- a/packages/canvas-engine/core/src/react/playground-react-context.ts +++ b/packages/canvas-engine/core/src/react/playground-react-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export const PlaygroundReactContext = React.createContext({}); diff --git a/packages/canvas-engine/core/src/react/playground-react-provider.tsx b/packages/canvas-engine/core/src/react/playground-react-provider.tsx index 15ec5b8e..02a103e4 100644 --- a/packages/canvas-engine/core/src/react/playground-react-provider.tsx +++ b/packages/canvas-engine/core/src/react/playground-react-provider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo, useImperativeHandle, forwardRef, useRef, useEffect } from 'react'; import { type interfaces } from 'inversify'; diff --git a/packages/canvas-engine/core/src/react/playground-react-renderer.tsx b/packages/canvas-engine/core/src/react/playground-react-renderer.tsx index fac041b9..189af102 100644 --- a/packages/canvas-engine/core/src/react/playground-react-renderer.tsx +++ b/packages/canvas-engine/core/src/react/playground-react-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import ReactDOM from 'react-dom'; import React, { useEffect, useRef } from 'react'; diff --git a/packages/canvas-engine/core/src/services/clipboard-service.ts b/packages/canvas-engine/core/src/services/clipboard-service.ts index 396983f7..adfe2094 100644 --- a/packages/canvas-engine/core/src/services/clipboard-service.ts +++ b/packages/canvas-engine/core/src/services/clipboard-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { Emitter, type Event, type MaybePromise } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/services/context-menu-service.ts b/packages/canvas-engine/core/src/services/context-menu-service.ts index 569c39c8..baef8272 100644 --- a/packages/canvas-engine/core/src/services/context-menu-service.ts +++ b/packages/canvas-engine/core/src/services/context-menu-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; /** diff --git a/packages/canvas-engine/core/src/services/index.ts b/packages/canvas-engine/core/src/services/index.ts index 63a56a84..eefe3416 100644 --- a/packages/canvas-engine/core/src/services/index.ts +++ b/packages/canvas-engine/core/src/services/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './selection-service'; export * from './storage-service'; export * from './clipboard-service'; diff --git a/packages/canvas-engine/core/src/services/logger-service.ts b/packages/canvas-engine/core/src/services/logger-service.ts index 564aa773..ccb1e7e1 100644 --- a/packages/canvas-engine/core/src/services/logger-service.ts +++ b/packages/canvas-engine/core/src/services/logger-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { type Disposable, Emitter, type Event } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/services/selection-service.ts b/packages/canvas-engine/core/src/services/selection-service.ts index 9a01c4b1..57a574e5 100644 --- a/packages/canvas-engine/core/src/services/selection-service.ts +++ b/packages/canvas-engine/core/src/services/selection-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { Compare, type Disposable, Emitter, type Event } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/core/src/services/storage-service.ts b/packages/canvas-engine/core/src/services/storage-service.ts index 5bc18f70..bdfbfb29 100644 --- a/packages/canvas-engine/core/src/services/storage-service.ts +++ b/packages/canvas-engine/core/src/services/storage-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, postConstruct } from 'inversify'; export const StorageService = Symbol('StorageService'); diff --git a/packages/canvas-engine/core/vitest.config.ts b/packages/canvas-engine/core/vitest.config.ts index d5794096..1de26d06 100644 --- a/packages/canvas-engine/core/vitest.config.ts +++ b/packages/canvas-engine/core/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/canvas-engine/core/vitest.setup.ts b/packages/canvas-engine/core/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/canvas-engine/core/vitest.setup.ts +++ b/packages/canvas-engine/core/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/canvas-engine/document/.eslintrc.js b/packages/canvas-engine/document/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/canvas-engine/document/.eslintrc.js +++ b/packages/canvas-engine/document/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/canvas-engine/document/__tests__/datas/flow-node-render-data.spec.ts b/packages/canvas-engine/document/__tests__/datas/flow-node-render-data.spec.ts index 0266317d..e00c6952 100644 --- a/packages/canvas-engine/document/__tests__/datas/flow-node-render-data.spec.ts +++ b/packages/canvas-engine/document/__tests__/datas/flow-node-render-data.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { baseMock } from '../flow.mock'; diff --git a/packages/canvas-engine/document/__tests__/datas/flow-node-transition-data.spec.ts b/packages/canvas-engine/document/__tests__/datas/flow-node-transition-data.spec.ts index 1b36fb18..cd8261f2 100644 --- a/packages/canvas-engine/document/__tests__/datas/flow-node-transition-data.spec.ts +++ b/packages/canvas-engine/document/__tests__/datas/flow-node-transition-data.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { baseMockAddBranch } from '../flow.mock'; diff --git a/packages/canvas-engine/document/__tests__/flow-document-container.mock.ts b/packages/canvas-engine/document/__tests__/flow-document-container.mock.ts index e95e9405..1be27ed2 100644 --- a/packages/canvas-engine/document/__tests__/flow-document-container.mock.ts +++ b/packages/canvas-engine/document/__tests__/flow-document-container.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { decorate, injectable, Container, type interfaces } from 'inversify'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/__tests__/flow-document-transformer.test.ts b/packages/canvas-engine/document/__tests__/flow-document-transformer.test.ts index af5fc598..de7bd1f6 100644 --- a/packages/canvas-engine/document/__tests__/flow-document-transformer.test.ts +++ b/packages/canvas-engine/document/__tests__/flow-document-transformer.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { TransformData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/__tests__/flow-document.test.ts b/packages/canvas-engine/document/__tests__/flow-document.test.ts index f1abf8f8..d3f49bc6 100644 --- a/packages/canvas-engine/document/__tests__/flow-document.test.ts +++ b/packages/canvas-engine/document/__tests__/flow-document.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { type FlowDocumentJSON, type FlowNodeJSON } from '../src/typings'; diff --git a/packages/canvas-engine/document/__tests__/flow-node-entity.spec.ts b/packages/canvas-engine/document/__tests__/flow-node-entity.spec.ts index 7db4f791..25d4afc3 100644 --- a/packages/canvas-engine/document/__tests__/flow-node-entity.spec.ts +++ b/packages/canvas-engine/document/__tests__/flow-node-entity.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { TransformData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/__tests__/flow-node-registry.spec.ts b/packages/canvas-engine/document/__tests__/flow-node-registry.spec.ts index 2be9dbc1..763ef479 100644 --- a/packages/canvas-engine/document/__tests__/flow-node-registry.spec.ts +++ b/packages/canvas-engine/document/__tests__/flow-node-registry.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { createDocumentContainer } from './flow-document-container.mock'; diff --git a/packages/canvas-engine/document/__tests__/flow-render-tree.spec.ts b/packages/canvas-engine/document/__tests__/flow-render-tree.spec.ts index 21bb7f89..a8477a04 100644 --- a/packages/canvas-engine/document/__tests__/flow-render-tree.spec.ts +++ b/packages/canvas-engine/document/__tests__/flow-render-tree.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; // import { FlowDocumentConfigEnum } from '../src/typings'; diff --git a/packages/canvas-engine/document/__tests__/flow-virtual-tree.spec.ts b/packages/canvas-engine/document/__tests__/flow-virtual-tree.spec.ts index 39ce9e52..af2ea02f 100644 --- a/packages/canvas-engine/document/__tests__/flow-virtual-tree.spec.ts +++ b/packages/canvas-engine/document/__tests__/flow-virtual-tree.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { FlowVirtualTree } from '../src/flow-virtual-tree'; diff --git a/packages/canvas-engine/document/__tests__/flow.mock.ts b/packages/canvas-engine/document/__tests__/flow.mock.ts index 15b3080c..b7183e1d 100644 --- a/packages/canvas-engine/document/__tests__/flow.mock.ts +++ b/packages/canvas-engine/document/__tests__/flow.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowDocumentJSON } from '../src'; export const baseMock: FlowDocumentJSON = { diff --git a/packages/canvas-engine/document/__tests__/services/flow-operation-base-service.test.ts b/packages/canvas-engine/document/__tests__/services/flow-operation-base-service.test.ts index 45cc1e33..893f2467 100644 --- a/packages/canvas-engine/document/__tests__/services/flow-operation-base-service.test.ts +++ b/packages/canvas-engine/document/__tests__/services/flow-operation-base-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it, vi } from 'vitest'; import { baseMockAddNode, baseMockAddBranch } from '../flow.mock'; diff --git a/packages/canvas-engine/document/src/datas/flow-node-render-data.ts b/packages/canvas-engine/document/src/datas/flow-node-render-data.ts index 93753e9b..9ac44ada 100644 --- a/packages/canvas-engine/document/src/datas/flow-node-render-data.ts +++ b/packages/canvas-engine/document/src/datas/flow-node-render-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Compare, Disposable, domUtils, Emitter } from '@flowgram.ai/utils'; import { EntityData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/src/datas/flow-node-transform-data.ts b/packages/canvas-engine/document/src/datas/flow-node-transform-data.ts index 12e0115a..36987143 100644 --- a/packages/canvas-engine/document/src/datas/flow-node-transform-data.ts +++ b/packages/canvas-engine/document/src/datas/flow-node-transform-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable, type IPoint, Rectangle } from '@flowgram.ai/utils'; import { Bounds, diff --git a/packages/canvas-engine/document/src/datas/flow-node-transition-data.ts b/packages/canvas-engine/document/src/datas/flow-node-transition-data.ts index 79b27e3e..65851581 100644 --- a/packages/canvas-engine/document/src/datas/flow-node-transition-data.ts +++ b/packages/canvas-engine/document/src/datas/flow-node-transition-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Point } from '@flowgram.ai/utils'; import { EntityData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/src/datas/index.ts b/packages/canvas-engine/document/src/datas/index.ts index c8d32a65..5a69ebfe 100644 --- a/packages/canvas-engine/document/src/datas/index.ts +++ b/packages/canvas-engine/document/src/datas/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './flow-node-transform-data'; export * from './flow-node-transition-data'; export * from './flow-node-render-data'; diff --git a/packages/canvas-engine/document/src/entities/flow-document-transformer-entity.ts b/packages/canvas-engine/document/src/entities/flow-document-transformer-entity.ts index 53fe0c61..74950c28 100644 --- a/packages/canvas-engine/document/src/entities/flow-document-transformer-entity.ts +++ b/packages/canvas-engine/document/src/entities/flow-document-transformer-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Emitter } from '@flowgram.ai/utils'; import { ConfigEntity, type EntityOpts } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/src/entities/flow-node-entity.ts b/packages/canvas-engine/document/src/entities/flow-node-entity.ts index e4e63dda..c2df1fad 100644 --- a/packages/canvas-engine/document/src/entities/flow-node-entity.ts +++ b/packages/canvas-engine/document/src/entities/flow-node-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Event, type Rectangle } from '@flowgram.ai/utils'; import { Entity, type EntityOpts } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/src/entities/flow-renderer-state-entity.ts b/packages/canvas-engine/document/src/entities/flow-renderer-state-entity.ts index 899fa63f..d6a6b550 100644 --- a/packages/canvas-engine/document/src/entities/flow-renderer-state-entity.ts +++ b/packages/canvas-engine/document/src/entities/flow-renderer-state-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { debounce } from 'lodash'; import { ConfigEntity, type EntityOpts } from '@flowgram.ai/core'; import { type Disposable } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/document/src/entities/index.ts b/packages/canvas-engine/document/src/entities/index.ts index 75223ecb..b42a4ac9 100644 --- a/packages/canvas-engine/document/src/entities/index.ts +++ b/packages/canvas-engine/document/src/entities/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './flow-node-entity'; export * from './flow-document-transformer-entity'; export * from './flow-renderer-state-entity'; diff --git a/packages/canvas-engine/document/src/flow-document-config.ts b/packages/canvas-engine/document/src/flow-document-config.ts index 1f17ebc9..65debf71 100644 --- a/packages/canvas-engine/document/src/flow-document-config.ts +++ b/packages/canvas-engine/document/src/flow-document-config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, optional } from 'inversify'; import { Emitter } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/document/src/flow-document-container-module.ts b/packages/canvas-engine/document/src/flow-document-container-module.ts index 2b3745db..b4f9c0a1 100644 --- a/packages/canvas-engine/document/src/flow-document-container-module.ts +++ b/packages/canvas-engine/document/src/flow-document-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { FlowOperationBaseService } from './typings/flow-operation'; diff --git a/packages/canvas-engine/document/src/flow-document-contribution.ts b/packages/canvas-engine/document/src/flow-document-contribution.ts index 3273d70f..f6749f74 100644 --- a/packages/canvas-engine/document/src/flow-document-contribution.ts +++ b/packages/canvas-engine/document/src/flow-document-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowDocument } from './flow-document'; export const FlowDocumentContribution = Symbol('FlowDocumentContribution'); diff --git a/packages/canvas-engine/document/src/flow-document-options.ts b/packages/canvas-engine/document/src/flow-document-options.ts index a9263235..d8483d3a 100644 --- a/packages/canvas-engine/document/src/flow-document-options.ts +++ b/packages/canvas-engine/document/src/flow-document-options.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeJSON, DefaultSpacingKey, diff --git a/packages/canvas-engine/document/src/flow-document.ts b/packages/canvas-engine/document/src/flow-document.ts index 5922c991..021f17a3 100644 --- a/packages/canvas-engine/document/src/flow-document.ts +++ b/packages/canvas-engine/document/src/flow-document.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { omit } from 'lodash'; import { inject, injectable, multiInject, optional, postConstruct } from 'inversify'; import { type Disposable, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/document/src/flow-render-tree.ts b/packages/canvas-engine/document/src/flow-render-tree.ts index 711a5cd1..c4d6e494 100644 --- a/packages/canvas-engine/document/src/flow-render-tree.ts +++ b/packages/canvas-engine/document/src/flow-render-tree.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentConfigEnum, FlowNodeBaseType, FlowNodeSplitType } from './typings'; import { FlowVirtualTree } from './flow-virtual-tree'; import type { FlowDocument } from './flow-document'; diff --git a/packages/canvas-engine/document/src/flow-virtual-tree.ts b/packages/canvas-engine/document/src/flow-virtual-tree.ts index 63f3949a..1576b565 100644 --- a/packages/canvas-engine/document/src/flow-virtual-tree.ts +++ b/packages/canvas-engine/document/src/flow-virtual-tree.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type Disposable, Emitter } from '@flowgram.ai/utils'; import { type FlowNodeType } from './typings'; diff --git a/packages/canvas-engine/document/src/index.ts b/packages/canvas-engine/document/src/index.ts index 87310230..d92603cc 100644 --- a/packages/canvas-engine/document/src/index.ts +++ b/packages/canvas-engine/document/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './typings'; export * from './entities'; export * from './datas'; diff --git a/packages/canvas-engine/document/src/layout/horizontal-fixed-layout.ts b/packages/canvas-engine/document/src/layout/horizontal-fixed-layout.ts index 00674ee6..2c909ffa 100644 --- a/packages/canvas-engine/document/src/layout/horizontal-fixed-layout.ts +++ b/packages/canvas-engine/document/src/layout/horizontal-fixed-layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject, multiInject, optional } from 'inversify'; import { IPoint, OriginSchema, PaddingSchema, ScrollSchema, SizeSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/document/src/layout/index.ts b/packages/canvas-engine/document/src/layout/index.ts index b37963e7..08452a99 100644 --- a/packages/canvas-engine/document/src/layout/index.ts +++ b/packages/canvas-engine/document/src/layout/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './vertical-fixed-layout'; export * from './horizontal-fixed-layout'; diff --git a/packages/canvas-engine/document/src/layout/vertical-fixed-layout.ts b/packages/canvas-engine/document/src/layout/vertical-fixed-layout.ts index 8189b37c..9789fc45 100644 --- a/packages/canvas-engine/document/src/layout/vertical-fixed-layout.ts +++ b/packages/canvas-engine/document/src/layout/vertical-fixed-layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject, multiInject, optional } from 'inversify'; import { IPoint, OriginSchema, PaddingSchema, ScrollSchema, SizeSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/document/src/services/flow-drag-service.ts b/packages/canvas-engine/document/src/services/flow-drag-service.ts index db74f8e5..021e792b 100644 --- a/packages/canvas-engine/document/src/services/flow-drag-service.ts +++ b/packages/canvas-engine/document/src/services/flow-drag-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { Emitter } from '@flowgram.ai/utils'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/src/services/flow-group-service/flow-group-controller.ts b/packages/canvas-engine/document/src/services/flow-group-service/flow-group-controller.ts index 116c5794..4c6eb02b 100644 --- a/packages/canvas-engine/document/src/services/flow-group-service/flow-group-controller.ts +++ b/packages/canvas-engine/document/src/services/flow-group-service/flow-group-controller.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Rectangle } from '@flowgram.ai/utils'; import { FlowNodeEntity } from '../../entities'; diff --git a/packages/canvas-engine/document/src/services/flow-group-service/flow-group-service.ts b/packages/canvas-engine/document/src/services/flow-group-service/flow-group-service.ts index e7d3ccb0..ca93e4c1 100644 --- a/packages/canvas-engine/document/src/services/flow-group-service/flow-group-service.ts +++ b/packages/canvas-engine/document/src/services/flow-group-service/flow-group-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { inject, injectable } from 'inversify'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/src/services/flow-group-service/flow-group-utils.ts b/packages/canvas-engine/document/src/services/flow-group-service/flow-group-utils.ts index dd80d1e4..1839f259 100644 --- a/packages/canvas-engine/document/src/services/flow-group-service/flow-group-utils.ts +++ b/packages/canvas-engine/document/src/services/flow-group-service/flow-group-utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType } from '../../typings'; import { FlowNodeEntity } from '../../entities'; import { FlowGroupController } from './flow-group-controller'; diff --git a/packages/canvas-engine/document/src/services/flow-group-service/index.ts b/packages/canvas-engine/document/src/services/flow-group-service/index.ts index 4f580e29..3d2d86ae 100644 --- a/packages/canvas-engine/document/src/services/flow-group-service/index.ts +++ b/packages/canvas-engine/document/src/services/flow-group-service/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FlowGroupController } from './flow-group-controller'; export { FlowGroupService } from './flow-group-service'; diff --git a/packages/canvas-engine/document/src/services/flow-operation-base-service.ts b/packages/canvas-engine/document/src/services/flow-operation-base-service.ts index d9986423..c9c5e309 100644 --- a/packages/canvas-engine/document/src/services/flow-operation-base-service.ts +++ b/packages/canvas-engine/document/src/services/flow-operation-base-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, postConstruct } from 'inversify'; import { DisposableCollection, Emitter } from '@flowgram.ai/utils'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/document/src/services/index.ts b/packages/canvas-engine/document/src/services/index.ts index abc0c18d..0113588a 100644 --- a/packages/canvas-engine/document/src/services/index.ts +++ b/packages/canvas-engine/document/src/services/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FlowDragService } from './flow-drag-service'; export { FlowOperationBaseServiceImpl } from './flow-operation-base-service'; export { FlowGroupService, FlowGroupController } from './flow-group-service'; diff --git a/packages/canvas-engine/document/src/typings/flow-group.ts b/packages/canvas-engine/document/src/typings/flow-group.ts index 4b367b78..112314a2 100644 --- a/packages/canvas-engine/document/src/typings/flow-group.ts +++ b/packages/canvas-engine/document/src/typings/flow-group.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface FlowGroupJSON { nodeIDs: string[]; } diff --git a/packages/canvas-engine/document/src/typings/flow-layout.ts b/packages/canvas-engine/document/src/typings/flow-layout.ts index 136ed84f..90342fec 100644 --- a/packages/canvas-engine/document/src/typings/flow-layout.ts +++ b/packages/canvas-engine/document/src/typings/flow-layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, PaddingSchema, ScrollSchema, SizeSchema } from '@flowgram.ai/utils'; import { type FlowNodeEntity } from '../entities'; diff --git a/packages/canvas-engine/document/src/typings/flow-node-register.ts b/packages/canvas-engine/document/src/typings/flow-node-register.ts index b7b70e19..1088033b 100644 --- a/packages/canvas-engine/document/src/typings/flow-node-register.ts +++ b/packages/canvas-engine/document/src/typings/flow-node-register.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type IPoint } from '@flowgram.ai/utils'; import { PaddingSchema } from '@flowgram.ai/utils'; import { PositionSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/document/src/typings/flow-operation.ts b/packages/canvas-engine/document/src/typings/flow-operation.ts index d549d3ae..ade2b7e5 100644 --- a/packages/canvas-engine/document/src/typings/flow-operation.ts +++ b/packages/canvas-engine/document/src/typings/flow-operation.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Event } from '@flowgram.ai/utils'; import { Disposable } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/document/src/typings/flow-transition.ts b/packages/canvas-engine/document/src/typings/flow-transition.ts index 58a0b32d..f46edc07 100644 --- a/packages/canvas-engine/document/src/typings/flow-transition.ts +++ b/packages/canvas-engine/document/src/typings/flow-transition.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type IPoint } from '@flowgram.ai/utils'; import { type FlowNodeEntity } from '../entities'; diff --git a/packages/canvas-engine/document/src/typings/flow.ts b/packages/canvas-engine/document/src/typings/flow.ts index e5989add..ec152494 100644 --- a/packages/canvas-engine/document/src/typings/flow.ts +++ b/packages/canvas-engine/document/src/typings/flow.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '../entities'; import { type FlowNodeMeta } from './flow-node-register'; diff --git a/packages/canvas-engine/document/src/typings/index.ts b/packages/canvas-engine/document/src/typings/index.ts index 9ca704aa..440cbbc7 100644 --- a/packages/canvas-engine/document/src/typings/index.ts +++ b/packages/canvas-engine/document/src/typings/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './flow'; export * from './flow-layout'; export * from './flow-transition'; diff --git a/packages/canvas-engine/document/src/utils/get-default-spacing.ts b/packages/canvas-engine/document/src/utils/get-default-spacing.ts index f39f93bd..b10d5846 100644 --- a/packages/canvas-engine/document/src/utils/get-default-spacing.ts +++ b/packages/canvas-engine/document/src/utils/get-default-spacing.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_SPACING } from '../typings'; import { FlowDocumentOptions } from '../flow-document-options'; import { FlowNodeEntity } from '../entities/flow-node-entity'; diff --git a/packages/canvas-engine/document/src/utils/index.ts b/packages/canvas-engine/document/src/utils/index.ts index c1a2756c..b17941c0 100644 --- a/packages/canvas-engine/document/src/utils/index.ts +++ b/packages/canvas-engine/document/src/utils/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { getDefaultSpacing } from './get-default-spacing'; diff --git a/packages/canvas-engine/document/vitest.config.ts b/packages/canvas-engine/document/vitest.config.ts index 4acfffd1..dc68baba 100644 --- a/packages/canvas-engine/document/vitest.config.ts +++ b/packages/canvas-engine/document/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/canvas-engine/document/vitest.setup.ts b/packages/canvas-engine/document/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/canvas-engine/document/vitest.setup.ts +++ b/packages/canvas-engine/document/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/canvas-engine/fixed-layout-core/.eslintrc.js b/packages/canvas-engine/fixed-layout-core/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/canvas-engine/fixed-layout-core/.eslintrc.js +++ b/packages/canvas-engine/fixed-layout-core/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/canvas-engine/fixed-layout-core/__tests__/flow-activities.mock.ts b/packages/canvas-engine/fixed-layout-core/__tests__/flow-activities.mock.ts index 4d0c85a3..08efc49f 100644 --- a/packages/canvas-engine/fixed-layout-core/__tests__/flow-activities.mock.ts +++ b/packages/canvas-engine/fixed-layout-core/__tests__/flow-activities.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Container, type interfaces } from 'inversify'; import { FlowDocumentContainerModule, diff --git a/packages/canvas-engine/fixed-layout-core/__tests__/flow-activities.spec.ts b/packages/canvas-engine/fixed-layout-core/__tests__/flow-activities.spec.ts index 863b56ad..bc566e6d 100644 --- a/packages/canvas-engine/fixed-layout-core/__tests__/flow-activities.spec.ts +++ b/packages/canvas-engine/fixed-layout-core/__tests__/flow-activities.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { DEFAULT_SPACING, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/block-icon.ts b/packages/canvas-engine/fixed-layout-core/src/activities/block-icon.ts index 2b0aaf13..691d1cf1 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/block-icon.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/block-icon.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Point } from '@flowgram.ai/utils'; import { DefaultSpacingKey, getDefaultSpacing } from '@flowgram.ai/document'; import { diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/block-order-icon.ts b/packages/canvas-engine/fixed-layout-core/src/activities/block-order-icon.ts index 6847db51..b66d9c2a 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/block-order-icon.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/block-order-icon.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Point } from '@flowgram.ai/utils'; import { DefaultSpacingKey, getDefaultSpacing } from '@flowgram.ai/document'; import { diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/block.ts b/packages/canvas-engine/fixed-layout-core/src/activities/block.ts index 95825007..fe1587dd 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/block.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/block.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_SPACING, FlowLayoutDefault, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/break.ts b/packages/canvas-engine/fixed-layout-core/src/activities/break.ts index 925c082a..e28ca7f1 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/break.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/break.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType, type FlowNodeRegistry } from '@flowgram.ai/document'; /** diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/dynamic-split.ts b/packages/canvas-engine/fixed-layout-core/src/activities/dynamic-split.ts index 80d10356..cf0320ce 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/dynamic-split.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/dynamic-split.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowLayoutDefault, type FlowNodeRegistry, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/empty.ts b/packages/canvas-engine/fixed-layout-core/src/activities/empty.ts index eca379f3..766ea00b 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/empty.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/empty.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType, type FlowNodeRegistry, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/end.ts b/packages/canvas-engine/fixed-layout-core/src/activities/end.ts index 2770788b..4a4ffbf8 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/end.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/end.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType, type FlowNodeRegistry } from '@flowgram.ai/document'; /** diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/index.ts b/packages/canvas-engine/fixed-layout-core/src/activities/index.ts index d9759936..f946f4a9 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/index.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './dynamic-split'; export * from './static-split'; export * from './block'; diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/inline-blocks.ts b/packages/canvas-engine/fixed-layout-core/src/activities/inline-blocks.ts index 6bd2ff56..811e2ec6 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/inline-blocks.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/inline-blocks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Point } from '@flowgram.ai/utils'; import { FlowRendererKey } from '@flowgram.ai/renderer'; import { diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/input.ts b/packages/canvas-engine/fixed-layout-core/src/activities/input.ts index ea3b4e40..382e33a7 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/input.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/input.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType, type FlowNodeRegistry, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/constants.ts b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/constants.ts index 46294a19..78cf5f10 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/constants.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ConstantKeys } from '@flowgram.ai/document'; export enum LoopTypeEnum { diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/index.ts b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/index.ts index 37ad012a..8defed0a 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/index.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './constants'; export * from './loop-left-empty-block'; export * from './loop-right-empty-block'; diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-empty-branch.ts b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-empty-branch.ts index 2b70a5ac..b9097c7e 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-empty-branch.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-empty-branch.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeRegistry, FlowTransitionLabelEnum } from '@flowgram.ai/document'; import { LoopSpacings, LoopTypeEnum } from './constants'; diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-inline-blocks.ts b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-inline-blocks.ts index e974147b..42c2c698 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-inline-blocks.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-inline-blocks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Point } from '@flowgram.ai/utils'; import { FlowTextKey } from '@flowgram.ai/renderer'; import { diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-left-empty-block.ts b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-left-empty-block.ts index 2e99fb87..3ae4a43b 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-left-empty-block.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-left-empty-block.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeRegistry } from '@flowgram.ai/document'; import { LoopSpacings, LoopTypeEnum } from './constants'; diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-right-empty-block.ts b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-right-empty-block.ts index 417a6009..c8608104 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-right-empty-block.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/loop-extends/loop-right-empty-block.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeRegistry } from '@flowgram.ai/document'; import { BlockRegistry } from '../block'; diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/loop.ts b/packages/canvas-engine/fixed-layout-core/src/activities/loop.ts index 3db897b6..c7940409 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/loop.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/loop.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Point } from '@flowgram.ai/utils'; import { FlowTextKey } from '@flowgram.ai/renderer'; import { diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/multi-inputs.ts b/packages/canvas-engine/fixed-layout-core/src/activities/multi-inputs.ts index 50fc049a..abf82463 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/multi-inputs.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/multi-inputs.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Point } from '@flowgram.ai/utils'; import { FlowRendererKey } from '@flowgram.ai/renderer'; import { diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/multi-outputs.ts b/packages/canvas-engine/fixed-layout-core/src/activities/multi-outputs.ts index d6812f21..041f97ac 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/multi-outputs.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/multi-outputs.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowLayoutDefault, type FlowNodeRegistry, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/output.ts b/packages/canvas-engine/fixed-layout-core/src/activities/output.ts index 9f74917e..8e128e31 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/output.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/output.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType, type FlowNodeRegistry } from '@flowgram.ai/document'; /** diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/root.ts b/packages/canvas-engine/fixed-layout-core/src/activities/root.ts index c40c7039..078395be 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/root.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/root.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_SPACING, FlowNodeBaseType, type FlowNodeRegistry } from '@flowgram.ai/document'; /** diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/simple-split.ts b/packages/canvas-engine/fixed-layout-core/src/activities/simple-split.ts index 7686f240..b191642f 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/simple-split.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/simple-split.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeRegistry, FlowNodeSplitType, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/start.ts b/packages/canvas-engine/fixed-layout-core/src/activities/start.ts index 0a0ab578..27e22f4f 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/start.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/start.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType, type FlowNodeRegistry } from '@flowgram.ai/document'; /** diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/static-split.ts b/packages/canvas-engine/fixed-layout-core/src/activities/static-split.ts index c90259c5..39cbfaa9 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/static-split.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/static-split.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType, type FlowNodeRegistry, FlowNodeSplitType } from '@flowgram.ai/document'; /** diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/catch-block.ts b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/catch-block.ts index 3d7646fd..c58fa4ca 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/catch-block.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/catch-block.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_SPACING, FlowNodeBaseType, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/catch-inline-blocks.ts b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/catch-inline-blocks.ts index b7654a6a..323d678c 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/catch-inline-blocks.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/catch-inline-blocks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowRendererKey } from '@flowgram.ai/renderer'; import { DEFAULT_SPACING, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/constants.ts b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/constants.ts index 9e008d72..98925092 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/constants.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * tryCatch 自定义类型 */ diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/index.ts b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/index.ts index 36143f47..a8bf6c62 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/index.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './constants'; export * from './catch-block'; export * from './catch-inline-blocks'; diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/main-inline-blocks.ts b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/main-inline-blocks.ts index f6f890a3..7d65cdce 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/main-inline-blocks.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/main-inline-blocks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowRendererKey, FlowTextKey } from '@flowgram.ai/renderer'; import { FlowNodeBaseType, diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/try-block.ts b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/try-block.ts index 9ae0778b..d8089189 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/try-block.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/try-block.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DEFAULT_SPACING, FlowNodeBaseType, type FlowNodeRegistry } from '@flowgram.ai/document'; import { TryCatchTypeEnum } from './constants'; diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/try-slot.ts b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/try-slot.ts index aadb00c0..4df850c3 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/try-slot.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch-extends/try-slot.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeRegistry, FlowTransitionLabelEnum } from '@flowgram.ai/document'; import { TryCatchTypeEnum } from './constants'; diff --git a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch.ts b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch.ts index 8fcba82b..372a8ca1 100644 --- a/packages/canvas-engine/fixed-layout-core/src/activities/try-catch.ts +++ b/packages/canvas-engine/fixed-layout-core/src/activities/try-catch.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowLayoutDefault, FlowNodeBaseType, diff --git a/packages/canvas-engine/fixed-layout-core/src/fixed-layout-container-module.ts b/packages/canvas-engine/fixed-layout-core/src/fixed-layout-container-module.ts index 27e45c23..d6ca2408 100644 --- a/packages/canvas-engine/fixed-layout-core/src/fixed-layout-container-module.ts +++ b/packages/canvas-engine/fixed-layout-core/src/fixed-layout-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { FlowRendererContribution } from '@flowgram.ai/renderer'; import { FlowDocumentContribution } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/fixed-layout-core/src/flow-registers.ts b/packages/canvas-engine/fixed-layout-core/src/flow-registers.ts index e6b563fe..79e5fae7 100644 --- a/packages/canvas-engine/fixed-layout-core/src/flow-registers.ts +++ b/packages/canvas-engine/fixed-layout-core/src/flow-registers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { FlowLabelsLayer, diff --git a/packages/canvas-engine/fixed-layout-core/src/index.ts b/packages/canvas-engine/fixed-layout-core/src/index.ts index bd374bfa..37c9a1b9 100644 --- a/packages/canvas-engine/fixed-layout-core/src/index.ts +++ b/packages/canvas-engine/fixed-layout-core/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './fixed-layout-container-module'; import { BlockIconRegistry, diff --git a/packages/canvas-engine/fixed-layout-core/vitest.config.ts b/packages/canvas-engine/fixed-layout-core/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/canvas-engine/fixed-layout-core/vitest.config.ts +++ b/packages/canvas-engine/fixed-layout-core/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/canvas-engine/fixed-layout-core/vitest.setup.ts b/packages/canvas-engine/fixed-layout-core/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/canvas-engine/fixed-layout-core/vitest.setup.ts +++ b/packages/canvas-engine/fixed-layout-core/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/canvas-engine/free-layout-core/.eslintrc.js b/packages/canvas-engine/free-layout-core/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/canvas-engine/free-layout-core/.eslintrc.js +++ b/packages/canvas-engine/free-layout-core/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-current-dom-node.test.ts b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-current-dom-node.test.ts index a6f996a7..f5503f13 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-current-dom-node.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-current-dom-node.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { renderHook } from '@testing-library/react-hooks'; import { createDocument, createHookWrapper } from '../mocks'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-current-entity.test.ts b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-current-entity.test.ts index 41e4ed0c..473403ba 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-current-entity.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-current-entity.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { renderHook } from '@testing-library/react-hooks'; import { createDocument, createHookWrapper } from '../mocks'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-node-render.test.tsx b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-node-render.test.tsx index b81b75eb..b1239e92 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-node-render.test.tsx +++ b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-node-render.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-playground-readonly-state.test.ts b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-playground-readonly-state.test.ts index 1ea2dadf..1da096e8 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-playground-readonly-state.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-playground-readonly-state.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { renderHook } from '@testing-library/react-hooks'; import { PlaygroundConfigEntity } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-workflow-document.test.ts b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-workflow-document.test.ts index 1e8051e5..99f6cf87 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/hooks/use-workflow-document.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/hooks/use-workflow-document.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { renderHook } from '@testing-library/react-hooks'; import { createDocument, createHookWrapper } from '../mocks'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/mocks/index.tsx b/packages/canvas-engine/free-layout-core/__tests__/mocks/index.tsx index d7dc09df..007dddee 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/mocks/index.tsx +++ b/packages/canvas-engine/free-layout-core/__tests__/mocks/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/service/workflow-drag-service.test.ts b/packages/canvas-engine/free-layout-core/__tests__/service/workflow-drag-service.test.ts index 4d65dde3..4ce4ff9b 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/service/workflow-drag-service.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/service/workflow-drag-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { fireEvent, waitFor } from '@testing-library/react'; import { IPoint } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/service/workflow-hover-service.test.ts b/packages/canvas-engine/free-layout-core/__tests__/service/workflow-hover-service.test.ts index 721d68d7..90ba405f 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/service/workflow-hover-service.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/service/workflow-hover-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi } from 'vitest'; import { interfaces } from 'inversify'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/service/workflow-select-service.test.ts b/packages/canvas-engine/free-layout-core/__tests__/service/workflow-select-service.test.ts index 9f24c6d6..3a35cd60 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/service/workflow-select-service.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/service/workflow-select-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi } from 'vitest'; import { interfaces } from 'inversify'; import { Playground, PositionData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/workflow-document.test.ts b/packages/canvas-engine/free-layout-core/__tests__/workflow-document.test.ts index ec1589d7..09dc8bc0 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/workflow-document.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/workflow-document.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi } from 'vitest'; import { interfaces } from 'inversify'; import { FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/free-layout-core/__tests__/workflow-lines-manager.test.ts b/packages/canvas-engine/free-layout-core/__tests__/workflow-lines-manager.test.ts index 60c0b686..0343f21b 100644 --- a/packages/canvas-engine/free-layout-core/__tests__/workflow-lines-manager.test.ts +++ b/packages/canvas-engine/free-layout-core/__tests__/workflow-lines-manager.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { diff --git a/packages/canvas-engine/free-layout-core/src/constants.ts b/packages/canvas-engine/free-layout-core/src/constants.ts index 6ef0a791..b8cc7848 100644 --- a/packages/canvas-engine/free-layout-core/src/constants.ts +++ b/packages/canvas-engine/free-layout-core/src/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum EditorCursorState { GRAB = 'GRAB', SELECT = 'SELECT', diff --git a/packages/canvas-engine/free-layout-core/src/entities/index.ts b/packages/canvas-engine/free-layout-core/src/entities/index.ts index 9d0ad23c..87f2809d 100644 --- a/packages/canvas-engine/free-layout-core/src/entities/index.ts +++ b/packages/canvas-engine/free-layout-core/src/entities/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './workflow-node-entity'; export * from './workflow-line-entity'; export * from './workflow-port-entity'; diff --git a/packages/canvas-engine/free-layout-core/src/entities/workflow-line-entity.ts b/packages/canvas-engine/free-layout-core/src/entities/workflow-line-entity.ts index 32e10328..8430a407 100644 --- a/packages/canvas-engine/free-layout-core/src/entities/workflow-line-entity.ts +++ b/packages/canvas-engine/free-layout-core/src/entities/workflow-line-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isEqual } from 'lodash-es'; import { domUtils, type IPoint, Rectangle } from '@flowgram.ai/utils'; import { Entity, type EntityOpts } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/entities/workflow-node-entity.ts b/packages/canvas-engine/free-layout-core/src/entities/workflow-node-entity.ts index 0fb66d28..0f0293ba 100644 --- a/packages/canvas-engine/free-layout-core/src/entities/workflow-node-entity.ts +++ b/packages/canvas-engine/free-layout-core/src/entities/workflow-node-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '@flowgram.ai/document'; export type WorkflowNodeEntity = FlowNodeEntity; diff --git a/packages/canvas-engine/free-layout-core/src/entities/workflow-port-entity.ts b/packages/canvas-engine/free-layout-core/src/entities/workflow-port-entity.ts index d52c39c3..c80df01d 100644 --- a/packages/canvas-engine/free-layout-core/src/entities/workflow-port-entity.ts +++ b/packages/canvas-engine/free-layout-core/src/entities/workflow-port-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type IPoint, Rectangle, Emitter } from '@flowgram.ai/utils'; import { FlowNodeTransformData } from '@flowgram.ai/document'; import { diff --git a/packages/canvas-engine/free-layout-core/src/entity-datas/index.ts b/packages/canvas-engine/free-layout-core/src/entity-datas/index.ts index ff8a1a61..7a707132 100644 --- a/packages/canvas-engine/free-layout-core/src/entity-datas/index.ts +++ b/packages/canvas-engine/free-layout-core/src/entity-datas/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './workflow-node-ports-data'; export * from './workflow-node-lines-data'; export * from './workflow-line-render-data'; diff --git a/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-line-render-data.ts b/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-line-render-data.ts index cacb4bf4..66cd778a 100644 --- a/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-line-render-data.ts +++ b/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-line-render-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Rectangle } from '@flowgram.ai/utils'; import { EntityData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-node-lines-data.ts b/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-node-lines-data.ts index 27dc54a5..882dc942 100644 --- a/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-node-lines-data.ts +++ b/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-node-lines-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable } from '@flowgram.ai/utils'; import { EntityData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-node-ports-data.ts b/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-node-ports-data.ts index 23275783..47f39d6c 100644 --- a/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-node-ports-data.ts +++ b/packages/canvas-engine/free-layout-core/src/entity-datas/workflow-node-ports-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isEqual } from 'lodash-es'; import { FlowNodeRenderData } from '@flowgram.ai/document'; import { EntityData, SizeData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/hooks/index.ts b/packages/canvas-engine/free-layout-core/src/hooks/index.ts index 2d627667..a577ddf3 100644 --- a/packages/canvas-engine/free-layout-core/src/hooks/index.ts +++ b/packages/canvas-engine/free-layout-core/src/hooks/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { useConfigEntity, useService, diff --git a/packages/canvas-engine/free-layout-core/src/hooks/typings.ts b/packages/canvas-engine/free-layout-core/src/hooks/typings.ts index f158f071..0daef00d 100644 --- a/packages/canvas-engine/free-layout-core/src/hooks/typings.ts +++ b/packages/canvas-engine/free-layout-core/src/hooks/typings.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type NodeFormProps } from '@flowgram.ai/node'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/free-layout-core/src/hooks/use-current-dom-node.ts b/packages/canvas-engine/free-layout-core/src/hooks/use-current-dom-node.ts index 52028d55..424c55f0 100644 --- a/packages/canvas-engine/free-layout-core/src/hooks/use-current-dom-node.ts +++ b/packages/canvas-engine/free-layout-core/src/hooks/use-current-dom-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRenderData } from '@flowgram.ai/document'; import { useEntityFromContext } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/hooks/use-current-entity.ts b/packages/canvas-engine/free-layout-core/src/hooks/use-current-entity.ts index cf016c6b..cec7ce69 100644 --- a/packages/canvas-engine/free-layout-core/src/hooks/use-current-entity.ts +++ b/packages/canvas-engine/free-layout-core/src/hooks/use-current-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEntityFromContext } from '@flowgram.ai/core'; import { type WorkflowNodeEntity } from '../entities'; diff --git a/packages/canvas-engine/free-layout-core/src/hooks/use-node-render-context.ts b/packages/canvas-engine/free-layout-core/src/hooks/use-node-render-context.ts index f4a36616..0c1ff771 100644 --- a/packages/canvas-engine/free-layout-core/src/hooks/use-node-render-context.ts +++ b/packages/canvas-engine/free-layout-core/src/hooks/use-node-render-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { NodeRenderReturnType } from './typings'; diff --git a/packages/canvas-engine/free-layout-core/src/hooks/use-node-render.tsx b/packages/canvas-engine/free-layout-core/src/hooks/use-node-render.tsx index 1ca0420a..a29f5fda 100644 --- a/packages/canvas-engine/free-layout-core/src/hooks/use-node-render.tsx +++ b/packages/canvas-engine/free-layout-core/src/hooks/use-node-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type React from 'react'; import { useCallback, useEffect, useRef, useState, useContext, useMemo } from 'react'; diff --git a/packages/canvas-engine/free-layout-core/src/hooks/use-playground-readonly-state.ts b/packages/canvas-engine/free-layout-core/src/hooks/use-playground-readonly-state.ts index 44a2484e..ad40f0c0 100644 --- a/packages/canvas-engine/free-layout-core/src/hooks/use-playground-readonly-state.ts +++ b/packages/canvas-engine/free-layout-core/src/hooks/use-playground-readonly-state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { usePlayground, useRefresh } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/hooks/use-workflow-document.ts b/packages/canvas-engine/free-layout-core/src/hooks/use-workflow-document.ts index 1d638db4..d02bd787 100644 --- a/packages/canvas-engine/free-layout-core/src/hooks/use-workflow-document.ts +++ b/packages/canvas-engine/free-layout-core/src/hooks/use-workflow-document.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useService } from '@flowgram.ai/core'; import { WorkflowDocument } from '../workflow-document'; diff --git a/packages/canvas-engine/free-layout-core/src/index.ts b/packages/canvas-engine/free-layout-core/src/index.ts index ccd26c2a..44ad8300 100644 --- a/packages/canvas-engine/free-layout-core/src/index.ts +++ b/packages/canvas-engine/free-layout-core/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './workflow-commands'; export * from './hooks'; export * from './utils'; diff --git a/packages/canvas-engine/free-layout-core/src/layout/free-layout.ts b/packages/canvas-engine/free-layout-core/src/layout/free-layout.ts index 7ef248e9..ea189c01 100644 --- a/packages/canvas-engine/free-layout-core/src/layout/free-layout.ts +++ b/packages/canvas-engine/free-layout-core/src/layout/free-layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { type IPoint, diff --git a/packages/canvas-engine/free-layout-core/src/layout/index.ts b/packages/canvas-engine/free-layout-core/src/layout/index.ts index c7bc8807..adbf6a00 100644 --- a/packages/canvas-engine/free-layout-core/src/layout/index.ts +++ b/packages/canvas-engine/free-layout-core/src/layout/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './free-layout'; diff --git a/packages/canvas-engine/free-layout-core/src/service/index.ts b/packages/canvas-engine/free-layout-core/src/service/index.ts index c321744e..fb0460b5 100644 --- a/packages/canvas-engine/free-layout-core/src/service/index.ts +++ b/packages/canvas-engine/free-layout-core/src/service/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './workflow-select-service'; export * from './workflow-hover-service'; export * from './workflow-drag-service'; diff --git a/packages/canvas-engine/free-layout-core/src/service/workflow-drag-service.ts b/packages/canvas-engine/free-layout-core/src/service/workflow-drag-service.ts index 21b8d5e7..64d95a14 100644 --- a/packages/canvas-engine/free-layout-core/src/service/workflow-drag-service.ts +++ b/packages/canvas-engine/free-layout-core/src/service/workflow-drag-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type React from 'react'; import { nanoid } from 'nanoid'; diff --git a/packages/canvas-engine/free-layout-core/src/service/workflow-hover-service.ts b/packages/canvas-engine/free-layout-core/src/service/workflow-hover-service.ts index 4388fccc..2c641834 100644 --- a/packages/canvas-engine/free-layout-core/src/service/workflow-hover-service.ts +++ b/packages/canvas-engine/free-layout-core/src/service/workflow-hover-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { Emitter, type PositionSchema } from '@flowgram.ai/utils'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/service/workflow-operation-base-service.ts b/packages/canvas-engine/free-layout-core/src/service/workflow-operation-base-service.ts index da442676..2e1251dc 100644 --- a/packages/canvas-engine/free-layout-core/src/service/workflow-operation-base-service.ts +++ b/packages/canvas-engine/free-layout-core/src/service/workflow-operation-base-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject } from 'inversify'; import { IPoint, Emitter } from '@flowgram.ai/utils'; import { FlowNodeEntityOrId, FlowOperationBaseServiceImpl } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/free-layout-core/src/service/workflow-reset-layout-service.ts b/packages/canvas-engine/free-layout-core/src/service/workflow-reset-layout-service.ts index e6cee6f6..ffc6c5d5 100644 --- a/packages/canvas-engine/free-layout-core/src/service/workflow-reset-layout-service.ts +++ b/packages/canvas-engine/free-layout-core/src/service/workflow-reset-layout-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, postConstruct } from 'inversify'; import { PlaygroundConfigEntity } from '@flowgram.ai/core'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/service/workflow-select-service.ts b/packages/canvas-engine/free-layout-core/src/service/workflow-select-service.ts index 0aed810f..fc5f9e22 100644 --- a/packages/canvas-engine/free-layout-core/src/service/workflow-select-service.ts +++ b/packages/canvas-engine/free-layout-core/src/service/workflow-select-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { type Entity, diff --git a/packages/canvas-engine/free-layout-core/src/typings/index.ts b/packages/canvas-engine/free-layout-core/src/typings/index.ts index b63d0813..cdcbca91 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/index.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './workflow-json'; export * from './workflow-edge'; export * from './workflow-node'; diff --git a/packages/canvas-engine/free-layout-core/src/typings/workflow-drag.ts b/packages/canvas-engine/free-layout-core/src/typings/workflow-drag.ts index 8f1887ae..ddce5e55 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/workflow-drag.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/workflow-drag.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type React from 'react'; import { type PositionSchema } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/free-layout-core/src/typings/workflow-edge.ts b/packages/canvas-engine/free-layout-core/src/typings/workflow-edge.ts index 07a6231b..c1a64758 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/workflow-edge.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/workflow-edge.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * 边数据 */ diff --git a/packages/canvas-engine/free-layout-core/src/typings/workflow-json.ts b/packages/canvas-engine/free-layout-core/src/typings/workflow-json.ts index 558e710f..db923d58 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/workflow-json.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/workflow-json.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type WorkflowLineEntity, type WorkflowNodeEntity } from '../entities'; import { type WorkflowNodeJSON } from './workflow-node'; import { type WorkflowEdgeJSON } from './workflow-edge'; diff --git a/packages/canvas-engine/free-layout-core/src/typings/workflow-line.ts b/packages/canvas-engine/free-layout-core/src/typings/workflow-line.ts index 7b2e2d7b..ef4420b3 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/workflow-line.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/workflow-line.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { Rectangle, IPoint } from '@flowgram.ai/utils'; import { type WorkflowLineEntity } from '../entities'; diff --git a/packages/canvas-engine/free-layout-core/src/typings/workflow-node.ts b/packages/canvas-engine/free-layout-core/src/typings/workflow-node.ts index 1ac5480b..848920d6 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/workflow-node.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/workflow-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IPoint } from '@flowgram.ai/utils'; import type { FlowNodeJSON, FlowNodeMeta } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/free-layout-core/src/typings/workflow-operation.ts b/packages/canvas-engine/free-layout-core/src/typings/workflow-operation.ts index a8ed1c25..26f1c1b8 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/workflow-operation.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/workflow-operation.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Event } from '@flowgram.ai/utils'; import { FlowNodeEntity, diff --git a/packages/canvas-engine/free-layout-core/src/typings/workflow-registry.ts b/packages/canvas-engine/free-layout-core/src/typings/workflow-registry.ts index 2f922bd1..bd54f594 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/workflow-registry.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/workflow-registry.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { FormMeta } from '@flowgram.ai/node'; import type { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core'; import type { FlowNodeRegistry } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/free-layout-core/src/typings/workflow-sub-canvas.ts b/packages/canvas-engine/free-layout-core/src/typings/workflow-sub-canvas.ts index 54de5701..a0c9ce9f 100644 --- a/packages/canvas-engine/free-layout-core/src/typings/workflow-sub-canvas.ts +++ b/packages/canvas-engine/free-layout-core/src/typings/workflow-sub-canvas.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowNodeEntity } from '../entities'; /** diff --git a/packages/canvas-engine/free-layout-core/src/utils/compose.ts b/packages/canvas-engine/free-layout-core/src/utils/compose.ts index 002f1264..2cb2414a 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/compose.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/compose.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { compose, composeAsync } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/free-layout-core/src/utils/fit-view.ts b/packages/canvas-engine/free-layout-core/src/utils/fit-view.ts index 61e38da5..c3bbd890 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/fit-view.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/fit-view.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type PlaygroundConfigEntity, TransformData } from '@flowgram.ai/core'; import { Rectangle } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/free-layout-core/src/utils/flow-node-form-data.ts b/packages/canvas-engine/free-layout-core/src/utils/flow-node-form-data.ts index 878d8c18..feb46e51 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/flow-node-form-data.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/flow-node-form-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeFormData } from '@flowgram.ai/form-core'; import { FlowNodeEntity, FlowNodeJSON } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/free-layout-core/src/utils/get-anti-overlap-position.ts b/packages/canvas-engine/free-layout-core/src/utils/get-anti-overlap-position.ts index ac2ade72..a57a0133 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/get-anti-overlap-position.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/get-anti-overlap-position.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { TransformData } from '@flowgram.ai/core'; import { type IPoint } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/free-layout-core/src/utils/get-url-params.ts b/packages/canvas-engine/free-layout-core/src/utils/get-url-params.ts index 4ba527cd..00497cc7 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/get-url-params.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/get-url-params.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function getUrlParams(): Record { return location.search .replace(/^\?/, '') diff --git a/packages/canvas-engine/free-layout-core/src/utils/index.ts b/packages/canvas-engine/free-layout-core/src/utils/index.ts index f2e56190..acdf6a2f 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/index.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { bindConfigEntity } from '@flowgram.ai/core'; export { delay } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/free-layout-core/src/utils/layout-to-positions.ts b/packages/canvas-engine/free-layout-core/src/utils/layout-to-positions.ts index 194bdf98..65fa4ff8 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/layout-to-positions.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/layout-to-positions.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type IPoint } from '@flowgram.ai/utils'; import { FlowNodeTransformData } from '@flowgram.ai/document'; import { TransformData, startTween } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/utils/nanoid.ts b/packages/canvas-engine/free-layout-core/src/utils/nanoid.ts index 1a679208..051364de 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/nanoid.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/nanoid.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid as nanoidOrigin } from 'nanoid'; export function nanoid(n?: number): string { diff --git a/packages/canvas-engine/free-layout-core/src/utils/simple-line.ts b/packages/canvas-engine/free-layout-core/src/utils/simple-line.ts index a58a9a3c..95ba6ab8 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/simple-line.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/simple-line.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Point, Rectangle } from '@flowgram.ai/utils'; import { WorkflowLineRenderContribution } from '../typings'; diff --git a/packages/canvas-engine/free-layout-core/src/utils/statics.ts b/packages/canvas-engine/free-layout-core/src/utils/statics.ts index 02f95459..0b4c1bf8 100644 --- a/packages/canvas-engine/free-layout-core/src/utils/statics.ts +++ b/packages/canvas-engine/free-layout-core/src/utils/statics.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Rectangle } from '@flowgram.ai/utils'; import { type WorkflowNodeEntity } from '../entities/workflow-node-entity'; diff --git a/packages/canvas-engine/free-layout-core/src/workflow-commands.ts b/packages/canvas-engine/free-layout-core/src/workflow-commands.ts index bc6ad4bf..ab319415 100644 --- a/packages/canvas-engine/free-layout-core/src/workflow-commands.ts +++ b/packages/canvas-engine/free-layout-core/src/workflow-commands.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum WorkflowCommands { DELETE_NODES = 'DELETE_NODES', COPY_NODES = 'COPY_NODES', diff --git a/packages/canvas-engine/free-layout-core/src/workflow-document-container-module.ts b/packages/canvas-engine/free-layout-core/src/workflow-document-container-module.ts index 06fdbeee..b875d0e0 100644 --- a/packages/canvas-engine/free-layout-core/src/workflow-document-container-module.ts +++ b/packages/canvas-engine/free-layout-core/src/workflow-document-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { bindContributions } from '@flowgram.ai/utils'; import { FlowDocument, FlowDocumentContribution } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/free-layout-core/src/workflow-document-contribution.ts b/packages/canvas-engine/free-layout-core/src/workflow-document-contribution.ts index 4dd8b4d6..8792658a 100644 --- a/packages/canvas-engine/free-layout-core/src/workflow-document-contribution.ts +++ b/packages/canvas-engine/free-layout-core/src/workflow-document-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from 'inversify'; import { type FlowDocumentContribution, diff --git a/packages/canvas-engine/free-layout-core/src/workflow-document-option.ts b/packages/canvas-engine/free-layout-core/src/workflow-document-option.ts index 0cb89a08..3150c465 100644 --- a/packages/canvas-engine/free-layout-core/src/workflow-document-option.ts +++ b/packages/canvas-engine/free-layout-core/src/workflow-document-option.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeErrorData } from '@flowgram.ai/form-core'; import { FlowDocumentOptions, FlowNodeTransformData, FlowNodeType } from '@flowgram.ai/document'; import { TransformData } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/free-layout-core/src/workflow-document.ts b/packages/canvas-engine/free-layout-core/src/workflow-document.ts index fb1add8d..c20e36b2 100644 --- a/packages/canvas-engine/free-layout-core/src/workflow-document.ts +++ b/packages/canvas-engine/free-layout-core/src/workflow-document.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { customAlphabet } from 'nanoid'; import { inject, injectable, optional, postConstruct } from 'inversify'; import { Emitter, type IPoint } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/free-layout-core/src/workflow-lines-manager.ts b/packages/canvas-engine/free-layout-core/src/workflow-lines-manager.ts index 6ce21691..b25af14a 100644 --- a/packages/canvas-engine/free-layout-core/src/workflow-lines-manager.ts +++ b/packages/canvas-engine/free-layout-core/src/workflow-lines-manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { last } from 'lodash-es'; import { inject, injectable } from 'inversify'; import { DisposableCollection, Emitter, type IPoint } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/free-layout-core/vitest.config.ts b/packages/canvas-engine/free-layout-core/vitest.config.ts index cff69775..81e60c80 100644 --- a/packages/canvas-engine/free-layout-core/vitest.config.ts +++ b/packages/canvas-engine/free-layout-core/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/canvas-engine/free-layout-core/vitest.setup.ts b/packages/canvas-engine/free-layout-core/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/canvas-engine/free-layout-core/vitest.setup.ts +++ b/packages/canvas-engine/free-layout-core/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/canvas-engine/renderer/.eslintrc.js b/packages/canvas-engine/renderer/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/canvas-engine/renderer/.eslintrc.js +++ b/packages/canvas-engine/renderer/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/canvas-engine/renderer/__mocks__/flow-document-container.mock.ts b/packages/canvas-engine/renderer/__mocks__/flow-document-container.mock.ts index 935d26aa..c2867e16 100644 --- a/packages/canvas-engine/renderer/__mocks__/flow-document-container.mock.ts +++ b/packages/canvas-engine/renderer/__mocks__/flow-document-container.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EntityManager } from '@flowgram.ai/core' import { FlowDocument, diff --git a/packages/canvas-engine/renderer/__mocks__/flow-drag-entity.ts b/packages/canvas-engine/renderer/__mocks__/flow-drag-entity.ts index f773fb02..55c58688 100644 --- a/packages/canvas-engine/renderer/__mocks__/flow-drag-entity.ts +++ b/packages/canvas-engine/renderer/__mocks__/flow-drag-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const NOT_SCROLL_EVENT = { clientX: 300, clientY: 300, diff --git a/packages/canvas-engine/renderer/__mocks__/flow-json.mock.ts b/packages/canvas-engine/renderer/__mocks__/flow-json.mock.ts index abc8f0ec..b4b141a1 100644 --- a/packages/canvas-engine/renderer/__mocks__/flow-json.mock.ts +++ b/packages/canvas-engine/renderer/__mocks__/flow-json.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/document' export const flowJson: FlowDocumentJSON = { diff --git a/packages/canvas-engine/renderer/__mocks__/flow-labels-mock-register.ts b/packages/canvas-engine/renderer/__mocks__/flow-labels-mock-register.ts index 76bd4fc0..2de1ee8f 100644 --- a/packages/canvas-engine/renderer/__mocks__/flow-labels-mock-register.ts +++ b/packages/canvas-engine/renderer/__mocks__/flow-labels-mock-register.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeRegistry, FlowTransitionLabelEnum, diff --git a/packages/canvas-engine/renderer/__mocks__/flow-mock-node-json.ts b/packages/canvas-engine/renderer/__mocks__/flow-mock-node-json.ts index 315aae13..7f5fc4ca 100644 --- a/packages/canvas-engine/renderer/__mocks__/flow-mock-node-json.ts +++ b/packages/canvas-engine/renderer/__mocks__/flow-mock-node-json.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const flowJson = { nodes: [ { diff --git a/packages/canvas-engine/renderer/__mocks__/flow-selected-nodes.mock.ts b/packages/canvas-engine/renderer/__mocks__/flow-selected-nodes.mock.ts index 0f2a65a8..ba2d682a 100644 --- a/packages/canvas-engine/renderer/__mocks__/flow-selected-nodes.mock.ts +++ b/packages/canvas-engine/renderer/__mocks__/flow-selected-nodes.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const FLOW_SELECTED_NODES = { nodes: [ { diff --git a/packages/canvas-engine/renderer/__mocks__/mock-lines.ts b/packages/canvas-engine/renderer/__mocks__/mock-lines.ts index b6e40fe7..42ef0c05 100644 --- a/packages/canvas-engine/renderer/__mocks__/mock-lines.ts +++ b/packages/canvas-engine/renderer/__mocks__/mock-lines.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowTransitionLineEnum } from "@flowgram.ai/document" export const mockDivergeLine1 = { diff --git a/packages/canvas-engine/renderer/__mocks__/renderer.mock.ts b/packages/canvas-engine/renderer/__mocks__/renderer.mock.ts index 7add4e7a..f2d41a5c 100644 --- a/packages/canvas-engine/renderer/__mocks__/renderer.mock.ts +++ b/packages/canvas-engine/renderer/__mocks__/renderer.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EntityManager, PlaygroundConfigEntity, PlaygroundContainerModule } from '@flowgram.ai/core' import { Container } from 'inversify' diff --git a/packages/canvas-engine/renderer/__mocks__/setup-file.ts b/packages/canvas-engine/renderer/__mocks__/setup-file.ts index 3f425aaf..48577cdb 100644 --- a/packages/canvas-engine/renderer/__mocks__/setup-file.ts +++ b/packages/canvas-engine/renderer/__mocks__/setup-file.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata' diff --git a/packages/canvas-engine/renderer/__tests__/components/Adder.test.tsx b/packages/canvas-engine/renderer/__tests__/components/Adder.test.tsx index c5a71a2e..6bce65d8 100644 --- a/packages/canvas-engine/renderer/__tests__/components/Adder.test.tsx +++ b/packages/canvas-engine/renderer/__tests__/components/Adder.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as React from 'react'; import { vi, describe, test, expect } from 'vitest'; diff --git a/packages/canvas-engine/renderer/__tests__/components/rounded-turning-line.test.tsx b/packages/canvas-engine/renderer/__tests__/components/rounded-turning-line.test.tsx index 091b78e7..a9bf5cc7 100644 --- a/packages/canvas-engine/renderer/__tests__/components/rounded-turning-line.test.tsx +++ b/packages/canvas-engine/renderer/__tests__/components/rounded-turning-line.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as React from 'react'; import { describe, test, expect, vi } from 'vitest'; diff --git a/packages/canvas-engine/renderer/__tests__/entities/flow-drag-entities.test.ts b/packages/canvas-engine/renderer/__tests__/entities/flow-drag-entities.test.ts index 40d3adbe..a32885f4 100644 --- a/packages/canvas-engine/renderer/__tests__/entities/flow-drag-entities.test.ts +++ b/packages/canvas-engine/renderer/__tests__/entities/flow-drag-entities.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { Rectangle } from '@flowgram.ai/utils'; import { diff --git a/packages/canvas-engine/renderer/__tests__/entities/flow-select-config-entity.test.ts b/packages/canvas-engine/renderer/__tests__/entities/flow-select-config-entity.test.ts index 028a567f..02bb4531 100644 --- a/packages/canvas-engine/renderer/__tests__/entities/flow-select-config-entity.test.ts +++ b/packages/canvas-engine/renderer/__tests__/entities/flow-select-config-entity.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Rectangle } from '@flowgram.ai/utils'; import { FlowDocument, FlowNodeTransformData } from '@flowgram.ai/document'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/renderer/__tests__/flow-renderer.tsx b/packages/canvas-engine/renderer/__tests__/flow-renderer.tsx index e69de29b..77723d8d 100644 --- a/packages/canvas-engine/renderer/__tests__/flow-renderer.tsx +++ b/packages/canvas-engine/renderer/__tests__/flow-renderer.tsx @@ -0,0 +1,5 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + diff --git a/packages/canvas-engine/renderer/__tests__/layers/flow-drag-layer.test.ts b/packages/canvas-engine/renderer/__tests__/layers/flow-drag-layer.test.ts index 686882e1..55012f36 100644 --- a/packages/canvas-engine/renderer/__tests__/layers/flow-drag-layer.test.ts +++ b/packages/canvas-engine/renderer/__tests__/layers/flow-drag-layer.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { Container, decorate, injectable, type interfaces } from 'inversify'; import { diff --git a/packages/canvas-engine/renderer/__tests__/layers/flow-label-layer.test.tsx b/packages/canvas-engine/renderer/__tests__/layers/flow-label-layer.test.tsx index 57017194..5131b230 100644 --- a/packages/canvas-engine/renderer/__tests__/layers/flow-label-layer.test.tsx +++ b/packages/canvas-engine/renderer/__tests__/layers/flow-label-layer.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { beforeEach, describe, expect, it, vi } from 'vitest'; diff --git a/packages/canvas-engine/renderer/__tests__/layers/flow-lines-layer.test.ts b/packages/canvas-engine/renderer/__tests__/layers/flow-lines-layer.test.ts index 74ab53d2..758befc2 100644 --- a/packages/canvas-engine/renderer/__tests__/layers/flow-lines-layer.test.ts +++ b/packages/canvas-engine/renderer/__tests__/layers/flow-lines-layer.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it, vi } from 'vitest'; import { Container, decorate, injectable, type interfaces } from 'inversify'; import { diff --git a/packages/canvas-engine/renderer/__tests__/layers/flow-selector-box-layer.test.tsx b/packages/canvas-engine/renderer/__tests__/layers/flow-selector-box-layer.test.tsx index 70b2e9d9..173c6ff0 100644 --- a/packages/canvas-engine/renderer/__tests__/layers/flow-selector-box-layer.test.tsx +++ b/packages/canvas-engine/renderer/__tests__/layers/flow-selector-box-layer.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { Container, decorate, injectable, type interfaces } from 'inversify'; import { diff --git a/packages/canvas-engine/renderer/__tests__/layers/flow-transform-layer.test.tsx b/packages/canvas-engine/renderer/__tests__/layers/flow-transform-layer.test.tsx index f8302fe0..c3752ad0 100644 --- a/packages/canvas-engine/renderer/__tests__/layers/flow-transform-layer.test.tsx +++ b/packages/canvas-engine/renderer/__tests__/layers/flow-transform-layer.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it, vi } from 'vitest'; import { Container, decorate, injectable, type interfaces } from 'inversify'; import { diff --git a/packages/canvas-engine/renderer/__tests__/utils/element.test.ts b/packages/canvas-engine/renderer/__tests__/utils/element.test.ts index e3fdb823..8876cc78 100644 --- a/packages/canvas-engine/renderer/__tests__/utils/element.test.ts +++ b/packages/canvas-engine/renderer/__tests__/utils/element.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi, describe, expect, it } from 'vitest'; import { isHidden, isRectInit } from '../../src/utils/element'; diff --git a/packages/canvas-engine/renderer/__tests__/utils/find-selected-nodes.test.ts b/packages/canvas-engine/renderer/__tests__/utils/find-selected-nodes.test.ts index 9718ccf0..61474e57 100644 --- a/packages/canvas-engine/renderer/__tests__/utils/find-selected-nodes.test.ts +++ b/packages/canvas-engine/renderer/__tests__/utils/find-selected-nodes.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowDocument } from '@flowgram.ai/document'; import { findSelectedNodes } from '../../src/utils/find-selected-nodes'; diff --git a/packages/canvas-engine/renderer/__tests__/utils/get-vertices.test.ts b/packages/canvas-engine/renderer/__tests__/utils/get-vertices.test.ts index cd222a8e..c3692a7c 100644 --- a/packages/canvas-engine/renderer/__tests__/utils/get-vertices.test.ts +++ b/packages/canvas-engine/renderer/__tests__/utils/get-vertices.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { calcEllipseY, getHorizontalVertices, getVertices } from '../../src/components/utils'; diff --git a/packages/canvas-engine/renderer/__tests__/utils/scroll-limit.test.ts b/packages/canvas-engine/renderer/__tests__/utils/scroll-limit.test.ts index 6f3beeff..bc3ef546 100644 --- a/packages/canvas-engine/renderer/__tests__/utils/scroll-limit.test.ts +++ b/packages/canvas-engine/renderer/__tests__/utils/scroll-limit.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Rectangle } from '@flowgram.ai/utils'; import { scrollLimit } from '../../src/utils/scroll-limit'; diff --git a/packages/canvas-engine/renderer/index.module.less b/packages/canvas-engine/renderer/index.module.less index a88fea23..aeb41748 100644 --- a/packages/canvas-engine/renderer/index.module.less +++ b/packages/canvas-engine/renderer/index.module.less @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + :root { --g-selection-background: #336df4; --g-editor-background: #f2f3f5; diff --git a/packages/canvas-engine/renderer/src/components/Adder.tsx b/packages/canvas-engine/renderer/src/components/Adder.tsx index 89ea26b3..45edae71 100644 --- a/packages/canvas-engine/renderer/src/components/Adder.tsx +++ b/packages/canvas-engine/renderer/src/components/Adder.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback, useState } from 'react'; import { diff --git a/packages/canvas-engine/renderer/src/components/BranchDraggableRenderer.tsx b/packages/canvas-engine/renderer/src/components/BranchDraggableRenderer.tsx index 58d05db7..8a4115bd 100644 --- a/packages/canvas-engine/renderer/src/components/BranchDraggableRenderer.tsx +++ b/packages/canvas-engine/renderer/src/components/BranchDraggableRenderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { diff --git a/packages/canvas-engine/renderer/src/components/Collapse.tsx b/packages/canvas-engine/renderer/src/components/Collapse.tsx index 0d6cfccb..cd8b7fdd 100644 --- a/packages/canvas-engine/renderer/src/components/Collapse.tsx +++ b/packages/canvas-engine/renderer/src/components/Collapse.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState, useCallback } from 'react'; import { diff --git a/packages/canvas-engine/renderer/src/components/CollapseAdder.tsx b/packages/canvas-engine/renderer/src/components/CollapseAdder.tsx index 2e87413c..8c9350f4 100644 --- a/packages/canvas-engine/renderer/src/components/CollapseAdder.tsx +++ b/packages/canvas-engine/renderer/src/components/CollapseAdder.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState, useCallback } from 'react'; import { diff --git a/packages/canvas-engine/renderer/src/components/CustomLine.tsx b/packages/canvas-engine/renderer/src/components/CustomLine.tsx index 33b74970..bc479604 100644 --- a/packages/canvas-engine/renderer/src/components/CustomLine.tsx +++ b/packages/canvas-engine/renderer/src/components/CustomLine.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import type { FlowTransitionLine } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/renderer/src/components/LabelsRenderer.tsx b/packages/canvas-engine/renderer/src/components/LabelsRenderer.tsx index dd3f6ccc..2c04ace4 100644 --- a/packages/canvas-engine/renderer/src/components/LabelsRenderer.tsx +++ b/packages/canvas-engine/renderer/src/components/LabelsRenderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { type IPoint, Rectangle } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/renderer/src/components/LinesRenderer.tsx b/packages/canvas-engine/renderer/src/components/LinesRenderer.tsx index 66715777..7b658ed4 100644 --- a/packages/canvas-engine/renderer/src/components/LinesRenderer.tsx +++ b/packages/canvas-engine/renderer/src/components/LinesRenderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { Rectangle } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/renderer/src/components/MarkerActivatedArrow.tsx b/packages/canvas-engine/renderer/src/components/MarkerActivatedArrow.tsx index 1ef3320c..53ef3146 100644 --- a/packages/canvas-engine/renderer/src/components/MarkerActivatedArrow.tsx +++ b/packages/canvas-engine/renderer/src/components/MarkerActivatedArrow.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { useBaseColor } from '../hooks/use-base-color'; diff --git a/packages/canvas-engine/renderer/src/components/MarkerArrow.tsx b/packages/canvas-engine/renderer/src/components/MarkerArrow.tsx index 7d7ea6e6..d71a204d 100644 --- a/packages/canvas-engine/renderer/src/components/MarkerArrow.tsx +++ b/packages/canvas-engine/renderer/src/components/MarkerArrow.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { useBaseColor } from '../hooks/use-base-color'; diff --git a/packages/canvas-engine/renderer/src/components/RoundedTurningLine.tsx b/packages/canvas-engine/renderer/src/components/RoundedTurningLine.tsx index 0d961803..dace2a7f 100644 --- a/packages/canvas-engine/renderer/src/components/RoundedTurningLine.tsx +++ b/packages/canvas-engine/renderer/src/components/RoundedTurningLine.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { isNil } from 'lodash'; diff --git a/packages/canvas-engine/renderer/src/components/StraightLine.tsx b/packages/canvas-engine/renderer/src/components/StraightLine.tsx index e7375ee0..c480ca57 100644 --- a/packages/canvas-engine/renderer/src/components/StraightLine.tsx +++ b/packages/canvas-engine/renderer/src/components/StraightLine.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import type { FlowTransitionLine } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/renderer/src/components/utils.tsx b/packages/canvas-engine/renderer/src/components/utils.tsx index 09dc6015..2719799a 100644 --- a/packages/canvas-engine/renderer/src/components/utils.tsx +++ b/packages/canvas-engine/renderer/src/components/utils.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type React from 'react'; import { diff --git a/packages/canvas-engine/renderer/src/entities/flow-drag-entity.tsx b/packages/canvas-engine/renderer/src/entities/flow-drag-entity.tsx index 10681d29..a411eac4 100644 --- a/packages/canvas-engine/renderer/src/entities/flow-drag-entity.tsx +++ b/packages/canvas-engine/renderer/src/entities/flow-drag-entity.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeTransitionData, FlowTransitionLabelEnum, diff --git a/packages/canvas-engine/renderer/src/entities/flow-select-config-entity.tsx b/packages/canvas-engine/renderer/src/entities/flow-select-config-entity.tsx index 81260ca5..080963b7 100644 --- a/packages/canvas-engine/renderer/src/entities/flow-select-config-entity.tsx +++ b/packages/canvas-engine/renderer/src/entities/flow-select-config-entity.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeEntity, FlowNodeRenderData, diff --git a/packages/canvas-engine/renderer/src/entities/index.ts b/packages/canvas-engine/renderer/src/entities/index.ts index 8f9d1b08..9c012c53 100644 --- a/packages/canvas-engine/renderer/src/entities/index.ts +++ b/packages/canvas-engine/renderer/src/entities/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './flow-drag-entity'; export * from './flow-select-config-entity'; export * from './selector-box-config-entity'; diff --git a/packages/canvas-engine/renderer/src/entities/selector-box-config-entity.ts b/packages/canvas-engine/renderer/src/entities/selector-box-config-entity.ts index 20292210..f4a0f745 100644 --- a/packages/canvas-engine/renderer/src/entities/selector-box-config-entity.ts +++ b/packages/canvas-engine/renderer/src/entities/selector-box-config-entity.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PositionSchema, SizeSchema, diff --git a/packages/canvas-engine/renderer/src/flow-renderer-container-module.ts b/packages/canvas-engine/renderer/src/flow-renderer-container-module.ts index db70a34e..77d94fe1 100644 --- a/packages/canvas-engine/renderer/src/flow-renderer-container-module.ts +++ b/packages/canvas-engine/renderer/src/flow-renderer-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { FlowRendererResizeObserver } from './flow-renderer-resize-observer'; diff --git a/packages/canvas-engine/renderer/src/flow-renderer-contribution.ts b/packages/canvas-engine/renderer/src/flow-renderer-contribution.ts index e81fcc2c..5c494e82 100644 --- a/packages/canvas-engine/renderer/src/flow-renderer-contribution.ts +++ b/packages/canvas-engine/renderer/src/flow-renderer-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { FlowRendererRegistry } from './flow-renderer-registry'; export const FlowRendererContribution = Symbol('FlowRendererContribution'); diff --git a/packages/canvas-engine/renderer/src/flow-renderer-registry.ts b/packages/canvas-engine/renderer/src/flow-renderer-registry.ts index 6db0d5e2..220fc6a7 100644 --- a/packages/canvas-engine/renderer/src/flow-renderer-registry.ts +++ b/packages/canvas-engine/renderer/src/flow-renderer-registry.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, multiInject, optional } from 'inversify'; import { I18n } from '@flowgram.ai/i18n'; import { type Layer, type LayerRegistry, PipelineRegistry } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/renderer/src/flow-renderer-resize-observer.ts b/packages/canvas-engine/renderer/src/flow-renderer-resize-observer.ts index 0e82991a..8353842e 100644 --- a/packages/canvas-engine/renderer/src/flow-renderer-resize-observer.ts +++ b/packages/canvas-engine/renderer/src/flow-renderer-resize-observer.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { type FlowNodeTransformData } from '@flowgram.ai/document'; import { Disposable } from '@flowgram.ai/utils'; diff --git a/packages/canvas-engine/renderer/src/hooks/use-base-color.ts b/packages/canvas-engine/renderer/src/hooks/use-base-color.ts index a77640f7..8e9868f6 100644 --- a/packages/canvas-engine/renderer/src/hooks/use-base-color.ts +++ b/packages/canvas-engine/renderer/src/hooks/use-base-color.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ConstantKeys, FlowDocumentOptions } from '@flowgram.ai/document'; import { useService } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/renderer/src/index.ts b/packages/canvas-engine/renderer/src/index.ts index 21f98b38..01edc0d0 100644 --- a/packages/canvas-engine/renderer/src/index.ts +++ b/packages/canvas-engine/renderer/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './entities'; export * from './layers'; export * from './flow-renderer-contribution'; diff --git a/packages/canvas-engine/renderer/src/layers/flow-context-menu-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-context-menu-layer.tsx index 80132eba..23429e02 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-context-menu-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-context-menu-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { inject, injectable } from 'inversify'; diff --git a/packages/canvas-engine/renderer/src/layers/flow-debug-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-debug-layer.tsx index 2c6da130..d8fceb7a 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-debug-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-debug-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { domUtils } from '@flowgram.ai/utils'; import { diff --git a/packages/canvas-engine/renderer/src/layers/flow-drag-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-drag-layer.tsx index 028ebf7a..31347f86 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-drag-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-drag-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { inject, injectable } from 'inversify'; diff --git a/packages/canvas-engine/renderer/src/layers/flow-labels-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-labels-layer.tsx index 136f3068..974f3555 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-labels-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-labels-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { throttle } from 'lodash'; diff --git a/packages/canvas-engine/renderer/src/layers/flow-lines-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-lines-layer.tsx index 9a6ddb2f..20d16cb2 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-lines-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-lines-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { groupBy, throttle } from 'lodash'; diff --git a/packages/canvas-engine/renderer/src/layers/flow-nodes-content-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-nodes-content-layer.tsx index 01397110..e6c0d889 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-nodes-content-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-nodes-content-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import ReactDOM from 'react-dom'; import React from 'react'; diff --git a/packages/canvas-engine/renderer/src/layers/flow-nodes-transform-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-nodes-transform-layer.tsx index baea6d54..b4c0812e 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-nodes-transform-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-nodes-transform-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { Cache, type Disposable, domUtils } from '@flowgram.ai/utils'; import { diff --git a/packages/canvas-engine/renderer/src/layers/flow-scroll-bar-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-scroll-bar-layer.tsx index 50f722d8..8b4d5dff 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-scroll-bar-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-scroll-bar-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, optional } from 'inversify'; import { FlowDocument, FlowNodeTransformData } from '@flowgram.ai/document'; import { diff --git a/packages/canvas-engine/renderer/src/layers/flow-scroll-limit-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-scroll-limit-layer.tsx index 92da1375..002b5305 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-scroll-limit-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-scroll-limit-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { FlowDocument, FlowNodeTransformData } from '@flowgram.ai/document'; import { Layer } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/renderer/src/layers/flow-selector-bounds-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-selector-bounds-layer.tsx index 0a9efe63..8ba0d603 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-selector-bounds-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-selector-bounds-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { inject, injectable } from 'inversify'; diff --git a/packages/canvas-engine/renderer/src/layers/flow-selector-box-layer.tsx b/packages/canvas-engine/renderer/src/layers/flow-selector-box-layer.tsx index 92e37a26..9713e673 100644 --- a/packages/canvas-engine/renderer/src/layers/flow-selector-box-layer.tsx +++ b/packages/canvas-engine/renderer/src/layers/flow-selector-box-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { domUtils, PositionSchema } from '@flowgram.ai/utils'; import { FlowDocument, FlowNodeEntity, FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/renderer/src/layers/index.ts b/packages/canvas-engine/renderer/src/layers/index.ts index 13fb4f83..71a7ff30 100644 --- a/packages/canvas-engine/renderer/src/layers/index.ts +++ b/packages/canvas-engine/renderer/src/layers/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './flow-nodes-transform-layer'; export * from './flow-nodes-content-layer'; export * from './flow-lines-layer'; diff --git a/packages/canvas-engine/renderer/src/utils/element.ts b/packages/canvas-engine/renderer/src/utils/element.ts index f2bafc01..6abfeed8 100644 --- a/packages/canvas-engine/renderer/src/utils/element.ts +++ b/packages/canvas-engine/renderer/src/utils/element.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash'; export const isHidden = (dom?: HTMLElement) => { if (!dom || isNil(dom?.offsetParent)) { diff --git a/packages/canvas-engine/renderer/src/utils/find-selected-nodes.ts b/packages/canvas-engine/renderer/src/utils/find-selected-nodes.ts index 94c04185..904b7e03 100644 --- a/packages/canvas-engine/renderer/src/utils/find-selected-nodes.ts +++ b/packages/canvas-engine/renderer/src/utils/find-selected-nodes.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { uniq } from 'lodash'; import { type FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/canvas-engine/renderer/src/utils/index.ts b/packages/canvas-engine/renderer/src/utils/index.ts index 7fc94f9e..110adddd 100644 --- a/packages/canvas-engine/renderer/src/utils/index.ts +++ b/packages/canvas-engine/renderer/src/utils/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './scroll-limit'; export * from './scroll-bar-events'; diff --git a/packages/canvas-engine/renderer/src/utils/scroll-bar-events.tsx b/packages/canvas-engine/renderer/src/utils/scroll-bar-events.tsx index 6befbf67..189ffea0 100644 --- a/packages/canvas-engine/renderer/src/utils/scroll-bar-events.tsx +++ b/packages/canvas-engine/renderer/src/utils/scroll-bar-events.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * 滚动条点击事件监听 */ diff --git a/packages/canvas-engine/renderer/src/utils/scroll-limit.ts b/packages/canvas-engine/renderer/src/utils/scroll-limit.ts index ff035dca..fffa8c0f 100644 --- a/packages/canvas-engine/renderer/src/utils/scroll-limit.ts +++ b/packages/canvas-engine/renderer/src/utils/scroll-limit.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Rectangle } from '@flowgram.ai/utils'; import { type PlaygroundConfigEntity } from '@flowgram.ai/core'; diff --git a/packages/canvas-engine/renderer/vitest.config.ts b/packages/canvas-engine/renderer/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/canvas-engine/renderer/vitest.config.ts +++ b/packages/canvas-engine/renderer/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/canvas-engine/renderer/vitest.setup.ts b/packages/canvas-engine/renderer/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/canvas-engine/renderer/vitest.setup.ts +++ b/packages/canvas-engine/renderer/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/client/editor/.eslintrc.js b/packages/client/editor/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/client/editor/.eslintrc.js +++ b/packages/client/editor/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/client/editor/src/clients/flow-editor-client-plugins.ts b/packages/client/editor/src/clients/flow-editor-client-plugins.ts index ea45651d..eccd945e 100644 --- a/packages/client/editor/src/clients/flow-editor-client-plugins.ts +++ b/packages/client/editor/src/clients/flow-editor-client-plugins.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { createNodeClientPlugins } from './node-client/create-node-client-plugins'; diff --git a/packages/client/editor/src/clients/flow-editor-client.ts b/packages/client/editor/src/clients/flow-editor-client.ts index 695b6115..b9d19e8d 100644 --- a/packages/client/editor/src/clients/flow-editor-client.ts +++ b/packages/client/editor/src/clients/flow-editor-client.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from 'inversify'; import { type FormItem } from '@flowgram.ai/form-core'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/client/editor/src/clients/index.ts b/packages/client/editor/src/clients/index.ts index 1e31ddfc..55ff5ff2 100644 --- a/packages/client/editor/src/clients/index.ts +++ b/packages/client/editor/src/clients/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './node-client'; export * from './flow-editor-client'; export * from './flow-editor-client-plugins'; diff --git a/packages/client/editor/src/clients/node-client/create-node-client-plugins.ts b/packages/client/editor/src/clients/node-client/create-node-client-plugins.ts index 3058d4c5..beb06792 100644 --- a/packages/client/editor/src/clients/node-client/create-node-client-plugins.ts +++ b/packages/client/editor/src/clients/node-client/create-node-client-plugins.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { NodeFocusService } from './node-focus-service'; diff --git a/packages/client/editor/src/clients/node-client/highlight/constants.ts b/packages/client/editor/src/clients/node-client/highlight/constants.ts index 6f296276..441465ed 100644 --- a/packages/client/editor/src/clients/node-client/highlight/constants.ts +++ b/packages/client/editor/src/clients/node-client/highlight/constants.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const DEFAULT_HIGHLIGHT_COLOR = 'rgba(238, 245, 40, 0.5)'; export const DEFAULT_HIGHLIGHT_PADDING = 0; diff --git a/packages/client/editor/src/clients/node-client/highlight/create-node-highlight-plugin.ts b/packages/client/editor/src/clients/node-client/highlight/create-node-highlight-plugin.ts index ff203dc2..d504e342 100644 --- a/packages/client/editor/src/clients/node-client/highlight/create-node-highlight-plugin.ts +++ b/packages/client/editor/src/clients/node-client/highlight/create-node-highlight-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { createHighlightStyle, removeHighlightStyle } from './highlight-style'; diff --git a/packages/client/editor/src/clients/node-client/highlight/highlight-form-item.ts b/packages/client/editor/src/clients/node-client/highlight/highlight-form-item.ts index da92b9b3..3dbb20bc 100644 --- a/packages/client/editor/src/clients/node-client/highlight/highlight-form-item.ts +++ b/packages/client/editor/src/clients/node-client/highlight/highlight-form-item.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItem } from '@flowgram.ai/form-core'; import { FlowNodeRenderData } from '@flowgram.ai/document'; diff --git a/packages/client/editor/src/clients/node-client/highlight/highlight-style.ts b/packages/client/editor/src/clients/node-client/highlight/highlight-style.ts index 792cbcc8..548ec616 100644 --- a/packages/client/editor/src/clients/node-client/highlight/highlight-style.ts +++ b/packages/client/editor/src/clients/node-client/highlight/highlight-style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const HIGHLIGHT_CLASSNAME = 'flowide-highlight'; const styleText = ` diff --git a/packages/client/editor/src/clients/node-client/highlight/index.ts b/packages/client/editor/src/clients/node-client/highlight/index.ts index b6764143..82c710e9 100644 --- a/packages/client/editor/src/clients/node-client/highlight/index.ts +++ b/packages/client/editor/src/clients/node-client/highlight/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { highlightFormItem, HighLightOptions } from './highlight-form-item'; export { useHighlight } from './use-highlight'; diff --git a/packages/client/editor/src/clients/node-client/highlight/use-highlight.ts b/packages/client/editor/src/clients/node-client/highlight/use-highlight.ts index 9c8b8872..4e482d6e 100644 --- a/packages/client/editor/src/clients/node-client/highlight/use-highlight.ts +++ b/packages/client/editor/src/clients/node-client/highlight/use-highlight.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useRef } from 'react'; import { FormModel } from '@flowgram.ai/form-core'; diff --git a/packages/client/editor/src/clients/node-client/index.ts b/packages/client/editor/src/clients/node-client/index.ts index 14407f0d..5bd9c12f 100644 --- a/packages/client/editor/src/clients/node-client/index.ts +++ b/packages/client/editor/src/clients/node-client/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './highlight'; export * from './node-client'; export * from './node-focus-service'; diff --git a/packages/client/editor/src/clients/node-client/node-client.ts b/packages/client/editor/src/clients/node-client/node-client.ts index 13fa3c70..55c09ddc 100644 --- a/packages/client/editor/src/clients/node-client/node-client.ts +++ b/packages/client/editor/src/clients/node-client/node-client.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from 'inversify'; import { NodeFocusService } from './node-focus-service'; diff --git a/packages/client/editor/src/clients/node-client/node-focus-service.ts b/packages/client/editor/src/clients/node-client/node-focus-service.ts index 1e80f6c3..bfedbbcd 100644 --- a/packages/client/editor/src/clients/node-client/node-focus-service.ts +++ b/packages/client/editor/src/clients/node-client/node-focus-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from 'inversify'; import { type FormItem } from '@flowgram.ai/form-core'; import { Playground, PlaygroundConfigRevealOpts } from '@flowgram.ai/core'; diff --git a/packages/client/editor/src/components/editor-provider.tsx b/packages/client/editor/src/components/editor-provider.tsx index e4b2be90..6b7df025 100644 --- a/packages/client/editor/src/components/editor-provider.tsx +++ b/packages/client/editor/src/components/editor-provider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo, useCallback } from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/client/editor/src/components/editor-renderer.tsx b/packages/client/editor/src/components/editor-renderer.tsx index b6d8fbb6..e97f97f8 100644 --- a/packages/client/editor/src/components/editor-renderer.tsx +++ b/packages/client/editor/src/components/editor-renderer.tsx @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { PlaygroundReactRenderer as EditorRenderer } from '@flowgram.ai/core'; diff --git a/packages/client/editor/src/components/editor.tsx b/packages/client/editor/src/components/editor.tsx index 9cf078dc..483b6250 100644 --- a/packages/client/editor/src/components/editor.tsx +++ b/packages/client/editor/src/components/editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { EditorProps } from '../preset'; diff --git a/packages/client/editor/src/components/index.ts b/packages/client/editor/src/components/index.ts index e038206c..29ed4bff 100644 --- a/packages/client/editor/src/components/index.ts +++ b/packages/client/editor/src/components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './editor-provider'; export * from './editor-renderer'; export * from './editor'; diff --git a/packages/client/editor/src/hooks/index.ts b/packages/client/editor/src/hooks/index.ts index 3d0b50da..76d5a0f6 100644 --- a/packages/client/editor/src/hooks/index.ts +++ b/packages/client/editor/src/hooks/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './use-flow-editor'; diff --git a/packages/client/editor/src/hooks/use-flow-editor.ts b/packages/client/editor/src/hooks/use-flow-editor.ts index cba42987..4e4034d7 100644 --- a/packages/client/editor/src/hooks/use-flow-editor.ts +++ b/packages/client/editor/src/hooks/use-flow-editor.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useService } from '@flowgram.ai/core'; import { FlowEditorClient } from '../clients'; diff --git a/packages/client/editor/src/index.ts b/packages/client/editor/src/index.ts index 542a4383..da838a43 100644 --- a/packages/client/editor/src/index.ts +++ b/packages/client/editor/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; import { FormModelV2 } from '@flowgram.ai/node'; diff --git a/packages/client/editor/src/preset/editor-default-preset.ts b/packages/client/editor/src/preset/editor-default-preset.ts index 6f89c714..1c8ddff2 100644 --- a/packages/client/editor/src/preset/editor-default-preset.ts +++ b/packages/client/editor/src/preset/editor-default-preset.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { FlowRendererContainerModule, FlowRendererRegistry } from '@flowgram.ai/renderer'; import { createReduxDevToolPlugin } from '@flowgram.ai/redux-devtool-plugin'; diff --git a/packages/client/editor/src/preset/editor-props.ts b/packages/client/editor/src/preset/editor-props.ts index c6b47a98..4210943d 100644 --- a/packages/client/editor/src/preset/editor-props.ts +++ b/packages/client/editor/src/preset/editor-props.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { VariablePluginOptions } from '@flowgram.ai/variable-plugin'; import { ReduxDevToolPluginOptions } from '@flowgram.ai/redux-devtool-plugin'; import { PlaygroundReactProps, SelectionService } from '@flowgram.ai/playground-react'; diff --git a/packages/client/editor/src/preset/index.ts b/packages/client/editor/src/preset/index.ts index d25b8507..560d4fc6 100644 --- a/packages/client/editor/src/preset/index.ts +++ b/packages/client/editor/src/preset/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './editor-props'; export * from './editor-default-preset'; diff --git a/packages/client/editor/src/utils/compose.ts b/packages/client/editor/src/utils/compose.ts index 819ac44c..877c5904 100644 --- a/packages/client/editor/src/utils/compose.ts +++ b/packages/client/editor/src/utils/compose.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '@flowgram.ai/document'; export type ComposeListItem = (node: FlowNodeEntity, data: T[]) => T[]; diff --git a/packages/client/editor/vitest.config.ts b/packages/client/editor/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/client/editor/vitest.config.ts +++ b/packages/client/editor/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/client/editor/vitest.setup.ts b/packages/client/editor/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/client/editor/vitest.setup.ts +++ b/packages/client/editor/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/client/fixed-layout-editor/.eslintrc.js b/packages/client/fixed-layout-editor/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/client/fixed-layout-editor/.eslintrc.js +++ b/packages/client/fixed-layout-editor/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/client/fixed-layout-editor/__mocks__/flow.mock.ts b/packages/client/fixed-layout-editor/__mocks__/flow.mock.ts index d286ff1d..fb6f50f3 100644 --- a/packages/client/fixed-layout-editor/__mocks__/flow.mock.ts +++ b/packages/client/fixed-layout-editor/__mocks__/flow.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '../src'; export const emptyMock: FlowDocumentJSON = { diff --git a/packages/client/fixed-layout-editor/__mocks__/form.mock.tsx b/packages/client/fixed-layout-editor/__mocks__/form.mock.tsx index bf1364e7..2828263b 100644 --- a/packages/client/fixed-layout-editor/__mocks__/form.mock.tsx +++ b/packages/client/fixed-layout-editor/__mocks__/form.mock.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import {Field, FieldRenderProps, FormMeta, FormRenderProps} from "@flowgram.ai/editor"; diff --git a/packages/client/fixed-layout-editor/__tests__/create-container.ts b/packages/client/fixed-layout-editor/__tests__/create-container.ts index b0327707..f6b5d46b 100644 --- a/packages/client/fixed-layout-editor/__tests__/create-container.ts +++ b/packages/client/fixed-layout-editor/__tests__/create-container.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { HistoryService } from '@flowgram.ai/fixed-history-plugin'; import { diff --git a/packages/client/fixed-layout-editor/__tests__/fixed-layout-preset.test.ts b/packages/client/fixed-layout-editor/__tests__/fixed-layout-preset.test.ts index f39d105f..e2aa63f1 100644 --- a/packages/client/fixed-layout-editor/__tests__/fixed-layout-preset.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/fixed-layout-preset.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { FlowDocument, FlowNodeFormData } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/flow-operation-service.test.ts b/packages/client/fixed-layout-editor/__tests__/services/flow-operation-service.test.ts index fcc94d7d..5f5e9c22 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/flow-operation-service.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/flow-operation-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach, vi } from 'vitest'; import { FlowDocument, FlowNodeEntity } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-block.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-block.test.ts index e1dbeb6b..e8516e06 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-block.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-block.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { FlowNodeEntity } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-from-node.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-from-node.test.ts index e12d2250..6f1d6ddb 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-from-node.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-from-node.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { FlowNodeEntity } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-node.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-node.test.ts index b5d9390d..c9c5f082 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-node.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/add-node.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { FlowNodeEntity } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/apply.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/apply.test.ts index 2d16a432..fc784dcc 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/apply.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/apply.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect } from 'vitest'; import { FlowNodeEntity, OperationType } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/create-group.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/create-group.test.ts index e5ab9fdf..a3325245 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/create-group.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/create-group.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { FlowNodeEntity } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/delete-node.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/delete-node.test.ts index 44d44470..c6349d46 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/delete-node.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/delete-node.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { FlowNodeEntity } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/delete-nodes.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/delete-nodes.test.ts index 642449db..40e1b628 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/delete-nodes.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/delete-nodes.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { getNodeChildrenIds } from '../../utils'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/move-node.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/move-node.test.ts index 4d3fd324..53b78050 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/move-node.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/move-node.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { FlowNodeEntity } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/set-form-value.test.tsx b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/set-form-value.test.tsx index 738d4507..80ddc29d 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/set-form-value.test.tsx +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/set-form-value.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, it, expect } from 'vitest'; import { FlowNodeFormData, FormModelV2 } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/transact.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/transact.test.ts index 69d10d01..f4463c83 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/transact.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/transact.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, it, expect } from 'vitest'; import { createHistoryContainer } from '../../create-container'; diff --git a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/ungroup.test.ts b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/ungroup.test.ts index b7a23610..876e9530 100644 --- a/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/ungroup.test.ts +++ b/packages/client/fixed-layout-editor/__tests__/services/history-operation-service/ungroup.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { FlowNodeEntity } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/__tests__/utils.ts b/packages/client/fixed-layout-editor/__tests__/utils.ts index cfd18dee..8af985bf 100644 --- a/packages/client/fixed-layout-editor/__tests__/utils.ts +++ b/packages/client/fixed-layout-editor/__tests__/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocument, FlowNodeEntity } from '@flowgram.ai/editor'; export function getNodeChildrenIds(node: FlowNodeEntity | undefined, isBranch: boolean = false) { diff --git a/packages/client/fixed-layout-editor/index.css b/packages/client/fixed-layout-editor/index.css index a6220d35..c6c8a48b 100644 --- a/packages/client/fixed-layout-editor/index.css +++ b/packages/client/fixed-layout-editor/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + :root { --g-selection-background: #4d53e8; --g-editor-background: #f2f3f5; diff --git a/packages/client/fixed-layout-editor/src/components/fixed-layout-editor-provider.tsx b/packages/client/fixed-layout-editor/src/components/fixed-layout-editor-provider.tsx index 7ad3b1fa..ef9eaaa8 100644 --- a/packages/client/fixed-layout-editor/src/components/fixed-layout-editor-provider.tsx +++ b/packages/client/fixed-layout-editor/src/components/fixed-layout-editor-provider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo, useCallback, forwardRef } from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/client/fixed-layout-editor/src/components/fixed-layout-editor.tsx b/packages/client/fixed-layout-editor/src/components/fixed-layout-editor.tsx index 4f276f0e..4844f7f0 100644 --- a/packages/client/fixed-layout-editor/src/components/fixed-layout-editor.tsx +++ b/packages/client/fixed-layout-editor/src/components/fixed-layout-editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { forwardRef } from 'react'; import { EditorRenderer } from '@flowgram.ai/editor'; diff --git a/packages/client/fixed-layout-editor/src/components/index.ts b/packages/client/fixed-layout-editor/src/components/index.ts index f149e5a7..35bec57b 100644 --- a/packages/client/fixed-layout-editor/src/components/index.ts +++ b/packages/client/fixed-layout-editor/src/components/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './fixed-layout-editor-provider'; export * from './fixed-layout-editor'; diff --git a/packages/client/fixed-layout-editor/src/hooks/use-client-context.ts b/packages/client/fixed-layout-editor/src/hooks/use-client-context.ts index 476a913a..fd4c1e36 100644 --- a/packages/client/fixed-layout-editor/src/hooks/use-client-context.ts +++ b/packages/client/fixed-layout-editor/src/hooks/use-client-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useService, PluginContext } from '@flowgram.ai/editor'; import { FixedLayoutPluginContext } from '../preset'; diff --git a/packages/client/fixed-layout-editor/src/hooks/use-node-render.tsx b/packages/client/fixed-layout-editor/src/hooks/use-node-render.tsx index ac749e3c..6bc3f9a6 100644 --- a/packages/client/fixed-layout-editor/src/hooks/use-node-render.tsx +++ b/packages/client/fixed-layout-editor/src/hooks/use-node-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback, useEffect, useContext, useMemo, useRef, useState } from 'react'; import { useObserve } from '@flowgram.ai/reactive'; diff --git a/packages/client/fixed-layout-editor/src/hooks/use-playground-tools.ts b/packages/client/fixed-layout-editor/src/hooks/use-playground-tools.ts index eee50acf..2cc4d704 100644 --- a/packages/client/fixed-layout-editor/src/hooks/use-playground-tools.ts +++ b/packages/client/fixed-layout-editor/src/hooks/use-playground-tools.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useEffect, useState } from 'react'; import { DisposableCollection } from '@flowgram.ai/utils'; diff --git a/packages/client/fixed-layout-editor/src/index.ts b/packages/client/fixed-layout-editor/src/index.ts index 4bc4f33e..886c3a83 100644 --- a/packages/client/fixed-layout-editor/src/index.ts +++ b/packages/client/fixed-layout-editor/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; /* 核心模块导出 */ diff --git a/packages/client/fixed-layout-editor/src/plugins/create-operation-plugin.ts b/packages/client/fixed-layout-editor/src/plugins/create-operation-plugin.ts index 0200f3d0..953f090d 100644 --- a/packages/client/fixed-layout-editor/src/plugins/create-operation-plugin.ts +++ b/packages/client/fixed-layout-editor/src/plugins/create-operation-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { FlowOperationService } from '../types'; diff --git a/packages/client/fixed-layout-editor/src/preset/fixed-layout-preset.ts b/packages/client/fixed-layout-editor/src/preset/fixed-layout-preset.ts index 712a32fc..9b39e027 100644 --- a/packages/client/fixed-layout-editor/src/preset/fixed-layout-preset.ts +++ b/packages/client/fixed-layout-editor/src/preset/fixed-layout-preset.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createSelectBoxPlugin } from '@flowgram.ai/select-box-plugin'; import { FixedLayoutContainerModule } from '@flowgram.ai/fixed-layout-core'; import { FixedHistoryService, createFixedHistoryPlugin } from '@flowgram.ai/fixed-history-plugin'; diff --git a/packages/client/fixed-layout-editor/src/preset/fixed-layout-props.ts b/packages/client/fixed-layout-editor/src/preset/fixed-layout-props.ts index 413e4f2d..10f56f2c 100644 --- a/packages/client/fixed-layout-editor/src/preset/fixed-layout-props.ts +++ b/packages/client/fixed-layout-editor/src/preset/fixed-layout-props.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { SelectBoxPluginOptions } from '@flowgram.ai/select-box-plugin'; import { FixedHistoryPluginOptions, HistoryService } from '@flowgram.ai/fixed-history-plugin'; import { type FixDragPluginOptions } from '@flowgram.ai/fixed-drag-plugin'; diff --git a/packages/client/fixed-layout-editor/src/preset/index.ts b/packages/client/fixed-layout-editor/src/preset/index.ts index 9a6fe4b6..7363cead 100644 --- a/packages/client/fixed-layout-editor/src/preset/index.ts +++ b/packages/client/fixed-layout-editor/src/preset/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './fixed-layout-props'; export * from './fixed-layout-preset'; diff --git a/packages/client/fixed-layout-editor/src/preset/node-serialize.ts b/packages/client/fixed-layout-editor/src/preset/node-serialize.ts index 643dcf73..ef60f454 100644 --- a/packages/client/fixed-layout-editor/src/preset/node-serialize.ts +++ b/packages/client/fixed-layout-editor/src/preset/node-serialize.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, FlowNodeJSON, FlowNodeFormData } from '@flowgram.ai/editor'; import { FixedLayoutProps } from './fixed-layout-props'; diff --git a/packages/client/fixed-layout-editor/src/services/flow-operation-service.ts b/packages/client/fixed-layout-editor/src/services/flow-operation-service.ts index ba9a638c..5fadcdff 100644 --- a/packages/client/fixed-layout-editor/src/services/flow-operation-service.ts +++ b/packages/client/fixed-layout-editor/src/services/flow-operation-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { FlowGroupService, diff --git a/packages/client/fixed-layout-editor/src/services/history-operation-service.ts b/packages/client/fixed-layout-editor/src/services/history-operation-service.ts index 92ac10bf..1060f44b 100644 --- a/packages/client/fixed-layout-editor/src/services/history-operation-service.ts +++ b/packages/client/fixed-layout-editor/src/services/history-operation-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, postConstruct } from 'inversify'; import { HistoryService } from '@flowgram.ai/history'; import { FixedHistoryService } from '@flowgram.ai/fixed-history-plugin'; diff --git a/packages/client/fixed-layout-editor/src/types.ts b/packages/client/fixed-layout-editor/src/types.ts index a9e7af02..82f33bc7 100644 --- a/packages/client/fixed-layout-editor/src/types.ts +++ b/packages/client/fixed-layout-editor/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, FlowNodeEntityOrId, diff --git a/packages/client/fixed-layout-editor/src/utils/fit-view.ts b/packages/client/fixed-layout-editor/src/utils/fit-view.ts index 779da64a..6fbe0c3d 100644 --- a/packages/client/fixed-layout-editor/src/utils/fit-view.ts +++ b/packages/client/fixed-layout-editor/src/utils/fit-view.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowDocument, type PlaygroundConfigEntity, diff --git a/packages/client/fixed-layout-editor/src/utils/index.ts b/packages/client/fixed-layout-editor/src/utils/index.ts index 08820f57..c19a7af9 100644 --- a/packages/client/fixed-layout-editor/src/utils/index.ts +++ b/packages/client/fixed-layout-editor/src/utils/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { fitView } from './fit-view'; diff --git a/packages/client/fixed-layout-editor/vitest.config.ts b/packages/client/fixed-layout-editor/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/client/fixed-layout-editor/vitest.config.ts +++ b/packages/client/fixed-layout-editor/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/client/fixed-layout-editor/vitest.setup.ts b/packages/client/fixed-layout-editor/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/client/fixed-layout-editor/vitest.setup.ts +++ b/packages/client/fixed-layout-editor/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/client/free-layout-editor/.eslintrc.js b/packages/client/free-layout-editor/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/client/free-layout-editor/.eslintrc.js +++ b/packages/client/free-layout-editor/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/client/free-layout-editor/__mocks__/flow.mocks.ts b/packages/client/free-layout-editor/__mocks__/flow.mocks.ts index dad13175..e0a20baa 100644 --- a/packages/client/free-layout-editor/__mocks__/flow.mocks.ts +++ b/packages/client/free-layout-editor/__mocks__/flow.mocks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowJSON } from '@flowgram.ai/free-layout-core'; export const mockJSON: WorkflowJSON = { diff --git a/packages/client/free-layout-editor/__tests__/create-editor.ts b/packages/client/free-layout-editor/__tests__/create-editor.ts index 55936504..9729a051 100644 --- a/packages/client/free-layout-editor/__tests__/create-editor.ts +++ b/packages/client/free-layout-editor/__tests__/create-editor.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { createPlaygroundContainer, diff --git a/packages/client/free-layout-editor/__tests__/free-layout-preset.test.ts b/packages/client/free-layout-editor/__tests__/free-layout-preset.test.ts index deffd176..c0657f7e 100644 --- a/packages/client/free-layout-editor/__tests__/free-layout-preset.test.ts +++ b/packages/client/free-layout-editor/__tests__/free-layout-preset.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect } from 'vitest'; import { FlowDocument, FlowNodeFormData } from '@flowgram.ai/editor'; diff --git a/packages/client/free-layout-editor/__tests__/use-playground-tools.test.ts b/packages/client/free-layout-editor/__tests__/use-playground-tools.test.ts index c2609ddd..9bef9b7c 100644 --- a/packages/client/free-layout-editor/__tests__/use-playground-tools.test.ts +++ b/packages/client/free-layout-editor/__tests__/use-playground-tools.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { interfaces } from 'inversify'; import { renderHook } from '@testing-library/react-hooks'; diff --git a/packages/client/free-layout-editor/__tests__/utils.mock.tsx b/packages/client/free-layout-editor/__tests__/utils.mock.tsx index 418e407a..3a76fdb6 100644 --- a/packages/client/free-layout-editor/__tests__/utils.mock.tsx +++ b/packages/client/free-layout-editor/__tests__/utils.mock.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { ContainerModule, interfaces } from 'inversify'; diff --git a/packages/client/free-layout-editor/index.css b/packages/client/free-layout-editor/index.css index 3507ef69..76f9e211 100644 --- a/packages/client/free-layout-editor/index.css +++ b/packages/client/free-layout-editor/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + :root { --g-selection-background: #4d53e8; --g-editor-background: #f2f3f5; diff --git a/packages/client/free-layout-editor/src/components/free-layout-editor-provider.tsx b/packages/client/free-layout-editor/src/components/free-layout-editor-provider.tsx index 77d86d77..11db437d 100644 --- a/packages/client/free-layout-editor/src/components/free-layout-editor-provider.tsx +++ b/packages/client/free-layout-editor/src/components/free-layout-editor-provider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo, useCallback, forwardRef } from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/client/free-layout-editor/src/components/free-layout-editor.tsx b/packages/client/free-layout-editor/src/components/free-layout-editor.tsx index ec9e2019..815c7f31 100644 --- a/packages/client/free-layout-editor/src/components/free-layout-editor.tsx +++ b/packages/client/free-layout-editor/src/components/free-layout-editor.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { forwardRef } from 'react'; import { EditorRenderer } from '@flowgram.ai/editor'; diff --git a/packages/client/free-layout-editor/src/components/index.ts b/packages/client/free-layout-editor/src/components/index.ts index 6d0f78cb..a68a5d5c 100644 --- a/packages/client/free-layout-editor/src/components/index.ts +++ b/packages/client/free-layout-editor/src/components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './free-layout-editor-provider'; export * from './workflow-node-renderer'; export * from './free-layout-editor'; diff --git a/packages/client/free-layout-editor/src/components/workflow-node-renderer.tsx b/packages/client/free-layout-editor/src/components/workflow-node-renderer.tsx index 89c43444..77b24618 100644 --- a/packages/client/free-layout-editor/src/components/workflow-node-renderer.tsx +++ b/packages/client/free-layout-editor/src/components/workflow-node-renderer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import clx from 'clsx'; diff --git a/packages/client/free-layout-editor/src/hooks/index.ts b/packages/client/free-layout-editor/src/hooks/index.ts index 7a74ccd1..432462a7 100644 --- a/packages/client/free-layout-editor/src/hooks/index.ts +++ b/packages/client/free-layout-editor/src/hooks/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { useAutoLayout } from './use-auto-layout'; export { useClientContext } from './use-client-context'; export { PlaygroundTools, usePlaygroundTools } from './use-playground-tools'; diff --git a/packages/client/free-layout-editor/src/hooks/use-auto-layout.ts b/packages/client/free-layout-editor/src/hooks/use-auto-layout.ts index 52a703cd..e40a1812 100644 --- a/packages/client/free-layout-editor/src/hooks/use-auto-layout.ts +++ b/packages/client/free-layout-editor/src/hooks/use-auto-layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback } from 'react'; import { PositionSchema } from '@flowgram.ai/utils'; diff --git a/packages/client/free-layout-editor/src/hooks/use-client-context.ts b/packages/client/free-layout-editor/src/hooks/use-client-context.ts index 1ffd30eb..cc3766b8 100644 --- a/packages/client/free-layout-editor/src/hooks/use-client-context.ts +++ b/packages/client/free-layout-editor/src/hooks/use-client-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useService, PluginContext } from '@flowgram.ai/editor'; import { FreeLayoutPluginContext } from '../preset'; diff --git a/packages/client/free-layout-editor/src/hooks/use-playground-tools.ts b/packages/client/free-layout-editor/src/hooks/use-playground-tools.ts index 813f31ef..05ffe595 100644 --- a/packages/client/free-layout-editor/src/hooks/use-playground-tools.ts +++ b/packages/client/free-layout-editor/src/hooks/use-playground-tools.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable no-cond-assign */ import { useCallback, useEffect, useState } from 'react'; diff --git a/packages/client/free-layout-editor/src/index.ts b/packages/client/free-layout-editor/src/index.ts index 5e8747dd..bd74b8ac 100644 --- a/packages/client/free-layout-editor/src/index.ts +++ b/packages/client/free-layout-editor/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; /* 核心 模块导出 */ diff --git a/packages/client/free-layout-editor/src/preset/free-layout-preset.ts b/packages/client/free-layout-editor/src/preset/free-layout-preset.ts index f193871a..cb26d8d4 100644 --- a/packages/client/free-layout-editor/src/preset/free-layout-preset.ts +++ b/packages/client/free-layout-editor/src/preset/free-layout-preset.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createSelectBoxPlugin } from '@flowgram.ai/select-box-plugin'; import { createFreeStackPlugin, StackingContextManager } from '@flowgram.ai/free-stack-plugin'; import { createFreeLinesPlugin } from '@flowgram.ai/free-lines-plugin'; diff --git a/packages/client/free-layout-editor/src/preset/free-layout-props.ts b/packages/client/free-layout-editor/src/preset/free-layout-props.ts index a23aeb1a..3dc3c5ff 100644 --- a/packages/client/free-layout-editor/src/preset/free-layout-props.ts +++ b/packages/client/free-layout-editor/src/preset/free-layout-props.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { SelectBoxPluginOptions } from '@flowgram.ai/select-box-plugin'; import { HistoryService } from '@flowgram.ai/history'; import { diff --git a/packages/client/free-layout-editor/src/preset/index.ts b/packages/client/free-layout-editor/src/preset/index.ts index 3b17335f..55e5f162 100644 --- a/packages/client/free-layout-editor/src/preset/index.ts +++ b/packages/client/free-layout-editor/src/preset/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './free-layout-preset'; export * from './free-layout-props'; diff --git a/packages/client/free-layout-editor/src/preset/node-serialize.ts b/packages/client/free-layout-editor/src/preset/node-serialize.ts index 541d08c9..f84996fd 100644 --- a/packages/client/free-layout-editor/src/preset/node-serialize.ts +++ b/packages/client/free-layout-editor/src/preset/node-serialize.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowContentChangeType, WorkflowDocument, diff --git a/packages/client/free-layout-editor/vitest.config.ts b/packages/client/free-layout-editor/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/client/free-layout-editor/vitest.config.ts +++ b/packages/client/free-layout-editor/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/client/free-layout-editor/vitest.setup.ts b/packages/client/free-layout-editor/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/client/free-layout-editor/vitest.setup.ts +++ b/packages/client/free-layout-editor/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/client/playground-react/.eslintrc.js b/packages/client/playground-react/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/client/playground-react/.eslintrc.js +++ b/packages/client/playground-react/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/client/playground-react/index.css b/packages/client/playground-react/index.css index 1fb72525..0f649cf1 100644 --- a/packages/client/playground-react/index.css +++ b/packages/client/playground-react/index.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + :root { --g-selection-background: #4d53e8; --g-editor-background: #f2f3f5; diff --git a/packages/client/playground-react/src/components/index.ts b/packages/client/playground-react/src/components/index.ts index 9125a73f..25acc8bd 100644 --- a/packages/client/playground-react/src/components/index.ts +++ b/packages/client/playground-react/src/components/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { PlaygroundReact, PlaygroundRef } from './playground-react'; export { PlaygroundReactContent, PlaygroundReactContentProps } from './playground-react-content'; diff --git a/packages/client/playground-react/src/components/playground-react-content.tsx b/packages/client/playground-react/src/components/playground-react-content.tsx index 4aeb843a..03728d98 100644 --- a/packages/client/playground-react/src/components/playground-react-content.tsx +++ b/packages/client/playground-react/src/components/playground-react-content.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { usePlayground } from '@flowgram.ai/core'; diff --git a/packages/client/playground-react/src/components/playground-react.tsx b/packages/client/playground-react/src/components/playground-react.tsx index 815c4db2..db1472bb 100644 --- a/packages/client/playground-react/src/components/playground-react.tsx +++ b/packages/client/playground-react/src/components/playground-react.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo, forwardRef } from 'react'; import { diff --git a/packages/client/playground-react/src/hooks/index.ts b/packages/client/playground-react/src/hooks/index.ts index 0ed42060..280dc04a 100644 --- a/packages/client/playground-react/src/hooks/index.ts +++ b/packages/client/playground-react/src/hooks/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { usePlaygroundTools } from './use-playground-tools'; diff --git a/packages/client/playground-react/src/hooks/use-playground-tools.ts b/packages/client/playground-react/src/hooks/use-playground-tools.ts index caf0ce4b..03980c4e 100644 --- a/packages/client/playground-react/src/hooks/use-playground-tools.ts +++ b/packages/client/playground-react/src/hooks/use-playground-tools.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useEffect, useState } from 'react'; import { DisposableCollection } from '@flowgram.ai/utils'; diff --git a/packages/client/playground-react/src/index.ts b/packages/client/playground-react/src/index.ts index 781f769d..0ae18019 100644 --- a/packages/client/playground-react/src/index.ts +++ b/packages/client/playground-react/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; /* 核心 模块导出 */ diff --git a/packages/client/playground-react/src/layers/playground-content-layer.tsx b/packages/client/playground-react/src/layers/playground-content-layer.tsx index a2dcd6c3..5f58001e 100644 --- a/packages/client/playground-react/src/layers/playground-content-layer.tsx +++ b/packages/client/playground-react/src/layers/playground-content-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { injectable } from 'inversify'; diff --git a/packages/client/playground-react/src/preset/index.ts b/packages/client/playground-react/src/preset/index.ts index 9f974c45..92a1c01c 100644 --- a/packages/client/playground-react/src/preset/index.ts +++ b/packages/client/playground-react/src/preset/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { PlaygroundReactProps } from './playground-react-props'; export { createPlaygroundReactPreset } from './playground-react-preset'; diff --git a/packages/client/playground-react/src/preset/playground-react-preset.ts b/packages/client/playground-react/src/preset/playground-react-preset.ts index 45157657..fbd98490 100644 --- a/packages/client/playground-react/src/preset/playground-react-preset.ts +++ b/packages/client/playground-react/src/preset/playground-react-preset.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createShortcutsPlugin } from '@flowgram.ai/shortcuts-plugin'; import { PluginContext, diff --git a/packages/client/playground-react/src/preset/playground-react-props.ts b/packages/client/playground-react/src/preset/playground-react-props.ts index c0cbd165..f8aeb692 100644 --- a/packages/client/playground-react/src/preset/playground-react-props.ts +++ b/packages/client/playground-react/src/preset/playground-react-props.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { interfaces } from 'inversify'; diff --git a/packages/client/playground-react/vitest.config.ts b/packages/client/playground-react/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/client/playground-react/vitest.config.ts +++ b/packages/client/playground-react/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/client/playground-react/vitest.setup.ts b/packages/client/playground-react/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/client/playground-react/vitest.setup.ts +++ b/packages/client/playground-react/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/common/command/.eslintrc.js b/packages/common/command/.eslintrc.js index d9b1e2d4..385612fd 100644 --- a/packages/common/command/.eslintrc.js +++ b/packages/common/command/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/common/command/src/command-container-module.ts b/packages/common/command/src/command-container-module.ts index e819ba29..161d1322 100644 --- a/packages/common/command/src/command-container-module.ts +++ b/packages/common/command/src/command-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { bindContributionProvider } from '@flowgram.ai/utils'; diff --git a/packages/common/command/src/command-service.ts b/packages/common/command/src/command-service.ts index 1bdadec4..7c3a420c 100644 --- a/packages/common/command/src/command-service.ts +++ b/packages/common/command/src/command-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type Disposable, type Event } from '@flowgram.ai/utils'; import { type CommandEvent } from './command'; diff --git a/packages/common/command/src/command.ts b/packages/common/command/src/command.ts index 06200434..bdff1050 100644 --- a/packages/common/command/src/command.ts +++ b/packages/common/command/src/command.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, multiInject, optional } from 'inversify'; import { Disposable, DisposableCollection, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/common/command/src/index.ts b/packages/common/command/src/index.ts index 61d231b2..36b717da 100644 --- a/packages/common/command/src/index.ts +++ b/packages/common/command/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { CommandContribution, type CommandHandler, diff --git a/packages/common/command/vitest.config.ts b/packages/common/command/vitest.config.ts index 20be509e..67818bf4 100644 --- a/packages/common/command/vitest.config.ts +++ b/packages/common/command/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { defineConfig } from 'vitest/config'; export default defineConfig({ diff --git a/packages/common/command/vitest.setup.ts b/packages/common/command/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/common/command/vitest.setup.ts +++ b/packages/common/command/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/common/history-storage/.eslintrc.js b/packages/common/history-storage/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/common/history-storage/.eslintrc.js +++ b/packages/common/history-storage/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/common/history-storage/src/__mocks__/index.ts b/packages/common/history-storage/src/__mocks__/index.ts index 7fb88aa1..1c750a7f 100644 --- a/packages/common/history-storage/src/__mocks__/index.ts +++ b/packages/common/history-storage/src/__mocks__/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const MOCK_RESOURCE_URI1 = 'resource-uri1' export const MOCK_RESOURCE_URI2 = 'resource-uri2' diff --git a/packages/common/history-storage/src/__tests__/history-database.test.ts b/packages/common/history-storage/src/__tests__/history-database.test.ts index a3148177..2f6d6c86 100644 --- a/packages/common/history-storage/src/__tests__/history-database.test.ts +++ b/packages/common/history-storage/src/__tests__/history-database.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, beforeEach } from 'vitest'; import { cloneDeep, omit } from 'lodash'; diff --git a/packages/common/history-storage/src/create-history-storage-plugin.ts b/packages/common/history-storage/src/create-history-storage-plugin.ts index 66d6c273..a38946e0 100644 --- a/packages/common/history-storage/src/create-history-storage-plugin.ts +++ b/packages/common/history-storage/src/create-history-storage-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { HistoryStoragePluginOptions } from './types'; diff --git a/packages/common/history-storage/src/history-database.ts b/packages/common/history-storage/src/history-database.ts index 0568d0a2..da0cbce8 100644 --- a/packages/common/history-storage/src/history-database.ts +++ b/packages/common/history-storage/src/history-database.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import Dexie, { type Table } from 'dexie'; import { HistoryOperationRecord, HistoryRecord } from './types'; diff --git a/packages/common/history-storage/src/history-storage-container-module.ts b/packages/common/history-storage/src/history-storage-container-module.ts index dc10260f..2bd40d15 100644 --- a/packages/common/history-storage/src/history-storage-container-module.ts +++ b/packages/common/history-storage/src/history-storage-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { HistoryStorageManager } from './history-storage-manager'; diff --git a/packages/common/history-storage/src/history-storage-manager.ts b/packages/common/history-storage/src/history-storage-manager.ts index dafd9b1a..f94ea048 100644 --- a/packages/common/history-storage/src/history-storage-manager.ts +++ b/packages/common/history-storage/src/history-storage-manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { DisposableCollection } from '@flowgram.ai/utils'; import { diff --git a/packages/common/history-storage/src/index.ts b/packages/common/history-storage/src/index.ts index 4c7d4793..b98890b8 100644 --- a/packages/common/history-storage/src/index.ts +++ b/packages/common/history-storage/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-history-storage-plugin'; export * from './use-storage-hisotry-items'; export * from './types'; diff --git a/packages/common/history-storage/src/types.ts b/packages/common/history-storage/src/types.ts index f1dddf5a..28094d21 100644 --- a/packages/common/history-storage/src/types.ts +++ b/packages/common/history-storage/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface HistoryRecord { /** * 自增id diff --git a/packages/common/history-storage/src/use-storage-hisotry-items.tsx b/packages/common/history-storage/src/use-storage-hisotry-items.tsx index 18a7317d..c4d55236 100644 --- a/packages/common/history-storage/src/use-storage-hisotry-items.tsx +++ b/packages/common/history-storage/src/use-storage-hisotry-items.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { groupBy } from 'lodash'; import { useLiveQuery } from 'dexie-react-hooks'; import { HistoryItem, HistoryOperation, HistoryStack } from '@flowgram.ai/history'; diff --git a/packages/common/history-storage/vitest.config.ts b/packages/common/history-storage/vitest.config.ts index f88d7033..daf697e6 100644 --- a/packages/common/history-storage/vitest.config.ts +++ b/packages/common/history-storage/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/common/history-storage/vitest.setup.ts b/packages/common/history-storage/vitest.setup.ts index b4778ba8..57d10b19 100644 --- a/packages/common/history-storage/vitest.setup.ts +++ b/packages/common/history-storage/vitest.setup.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; import 'fake-indexeddb/auto'; diff --git a/packages/common/history/.eslintrc.js b/packages/common/history/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/common/history/.eslintrc.js +++ b/packages/common/history/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/common/history/__mocks__/editor.mock.ts b/packages/common/history/__mocks__/editor.mock.ts index 9cd43906..6ce81fa1 100644 --- a/packages/common/history/__mocks__/editor.mock.ts +++ b/packages/common/history/__mocks__/editor.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { decorate, inject, injectable, postConstruct } from 'inversify'; import { diff --git a/packages/common/history/__mocks__/history-container.mock.ts b/packages/common/history/__mocks__/history-container.mock.ts index 48fd6495..c20fe03b 100644 --- a/packages/common/history/__mocks__/history-container.mock.ts +++ b/packages/common/history/__mocks__/history-container.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Container, ContainerModule, type interfaces } from 'inversify'; import { bindContributions } from '@flowgram.ai/utils'; import { EditorRegister, Editor } from './editor.mock' diff --git a/packages/common/history/__tests__/history-manager.test.ts b/packages/common/history/__tests__/history-manager.test.ts index 7be850dc..2710b82a 100644 --- a/packages/common/history/__tests__/history-manager.test.ts +++ b/packages/common/history/__tests__/history-manager.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach, vi } from 'vitest'; import { Container, interfaces } from 'inversify'; diff --git a/packages/common/history/__tests__/history-service.test.ts b/packages/common/history/__tests__/history-service.test.ts index 6b4ebfb2..6ad8faf5 100644 --- a/packages/common/history/__tests__/history-service.test.ts +++ b/packages/common/history/__tests__/history-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach, vi } from 'vitest'; import { omit } from 'lodash'; diff --git a/packages/common/history/__tests__/operation-registry.test.ts b/packages/common/history/__tests__/operation-registry.test.ts index 559062b3..78611c07 100644 --- a/packages/common/history/__tests__/operation-registry.test.ts +++ b/packages/common/history/__tests__/operation-registry.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach } from 'vitest'; import { OperationRegistry, Operation } from '../src'; diff --git a/packages/common/history/__tests__/operation-service.test.ts b/packages/common/history/__tests__/operation-service.test.ts index 700fdcbb..5aecd570 100644 --- a/packages/common/history/__tests__/operation-service.test.ts +++ b/packages/common/history/__tests__/operation-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach, vi } from 'vitest'; import { OperationRegistry, Operation, OperationService } from '../src'; diff --git a/packages/common/history/__tests__/undo-redo-service.test.ts b/packages/common/history/__tests__/undo-redo-service.test.ts index 77973f27..6131ab10 100644 --- a/packages/common/history/__tests__/undo-redo-service.test.ts +++ b/packages/common/history/__tests__/undo-redo-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect, beforeEach, vi } from 'vitest'; import { diff --git a/packages/common/history/src/create-history-plugin.ts b/packages/common/history/src/create-history-plugin.ts index f93f1fd6..be54eb14 100644 --- a/packages/common/history/src/create-history-plugin.ts +++ b/packages/common/history/src/create-history-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator, PluginContext } from '@flowgram.ai/core'; import { Operation, OperationService } from './operation'; diff --git a/packages/common/history/src/history-config.ts b/packages/common/history/src/history-config.ts index 6168d098..c09ffc89 100644 --- a/packages/common/history/src/history-config.ts +++ b/packages/common/history/src/history-config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { injectable } from 'inversify'; diff --git a/packages/common/history/src/history-container-module.ts b/packages/common/history/src/history-container-module.ts index d6410565..ee20cd85 100644 --- a/packages/common/history/src/history-container-module.ts +++ b/packages/common/history/src/history-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { OperationRegistry, OperationService } from './operation'; diff --git a/packages/common/history/src/history-context.ts b/packages/common/history/src/history-context.ts index 461b89d6..514cf75e 100644 --- a/packages/common/history/src/history-context.ts +++ b/packages/common/history/src/history-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; @injectable() diff --git a/packages/common/history/src/history/history-manager.ts b/packages/common/history/src/history/history-manager.ts index 284a33d2..37c258d3 100644 --- a/packages/common/history/src/history/history-manager.ts +++ b/packages/common/history/src/history/history-manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { type Disposable, DisposableCollection } from '@flowgram.ai/utils'; diff --git a/packages/common/history/src/history/history-service.ts b/packages/common/history/src/history/history-service.ts index c52b64b5..8ee78746 100644 --- a/packages/common/history/src/history/history-service.ts +++ b/packages/common/history/src/history/history-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { pick } from 'lodash'; import { injectable, inject, postConstruct } from 'inversify'; import { DisposableCollection, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/common/history/src/history/history-stack.ts b/packages/common/history/src/history/history-stack.ts index d554ce10..a176557d 100644 --- a/packages/common/history/src/history/history-stack.ts +++ b/packages/common/history/src/history/history-stack.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { cloneDeep } from 'lodash'; import { injectable, inject } from 'inversify'; import { DisposableCollection, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/common/history/src/history/index.ts b/packages/common/history/src/history/index.ts index 1501e6f2..981f6481 100644 --- a/packages/common/history/src/history/index.ts +++ b/packages/common/history/src/history/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './undo-redo-service'; export * from './types'; export * from './history-service'; diff --git a/packages/common/history/src/history/stack-operation.ts b/packages/common/history/src/history/stack-operation.ts index 9e3eda54..8cf76bd6 100644 --- a/packages/common/history/src/history/stack-operation.ts +++ b/packages/common/history/src/history/stack-operation.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { cloneDeep } from 'lodash'; import { DisposableCollection } from '@flowgram.ai/utils'; diff --git a/packages/common/history/src/history/types.ts b/packages/common/history/src/history/types.ts index 4bae72df..f575d79f 100644 --- a/packages/common/history/src/history/types.ts +++ b/packages/common/history/src/history/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable } from '@flowgram.ai/utils'; import { HistoryOperation, Operation } from '../operation'; diff --git a/packages/common/history/src/history/undo-redo-service.ts b/packages/common/history/src/history/undo-redo-service.ts index 5f1b4d8a..bb069c5e 100644 --- a/packages/common/history/src/history/undo-redo-service.ts +++ b/packages/common/history/src/history/undo-redo-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { Emitter, DisposableCollection } from '@flowgram.ai/utils'; diff --git a/packages/common/history/src/index.ts b/packages/common/history/src/index.ts index d09a3d19..ad148641 100644 --- a/packages/common/history/src/index.ts +++ b/packages/common/history/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './operation'; export * from './history'; export * from './history-container-module'; diff --git a/packages/common/history/src/operation/index.ts b/packages/common/history/src/operation/index.ts index 5891790b..e0568666 100644 --- a/packages/common/history/src/operation/index.ts +++ b/packages/common/history/src/operation/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './operation-contribution'; export * from './operation-registry'; export * from './operation-service'; diff --git a/packages/common/history/src/operation/operation-contribution.ts b/packages/common/history/src/operation/operation-contribution.ts index 47eeb30f..390823b3 100644 --- a/packages/common/history/src/operation/operation-contribution.ts +++ b/packages/common/history/src/operation/operation-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { OperationRegistry } from './operation-registry'; export const OperationContribution = Symbol('OperationContribution'); diff --git a/packages/common/history/src/operation/operation-registry.ts b/packages/common/history/src/operation/operation-registry.ts index 24dbd11e..7b02f71d 100644 --- a/packages/common/history/src/operation/operation-registry.ts +++ b/packages/common/history/src/operation/operation-registry.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, multiInject, optional, postConstruct } from 'inversify'; import { Disposable, DisposableCollection } from '@flowgram.ai/utils'; diff --git a/packages/common/history/src/operation/operation-service.ts b/packages/common/history/src/operation/operation-service.ts index bd6dbcdd..9d42d109 100644 --- a/packages/common/history/src/operation/operation-service.ts +++ b/packages/common/history/src/operation/operation-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject, postConstruct } from 'inversify'; import { DisposableCollection, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/common/history/src/operation/types.ts b/packages/common/history/src/operation/types.ts index 8694d8fc..0a39aad2 100644 --- a/packages/common/history/src/operation/types.ts +++ b/packages/common/history/src/operation/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { StackOperation } from '../history'; /** diff --git a/packages/common/history/vitest.config.ts b/packages/common/history/vitest.config.ts index f88d7033..daf697e6 100644 --- a/packages/common/history/vitest.config.ts +++ b/packages/common/history/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/common/history/vitest.setup.ts b/packages/common/history/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/common/history/vitest.setup.ts +++ b/packages/common/history/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/common/i18n/.eslintrc.js b/packages/common/i18n/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/common/i18n/.eslintrc.js +++ b/packages/common/i18n/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/common/i18n/__tests__/i18n.test.ts b/packages/common/i18n/__tests__/i18n.test.ts index e9c58d3f..4e487619 100644 --- a/packages/common/i18n/__tests__/i18n.test.ts +++ b/packages/common/i18n/__tests__/i18n.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect } from 'vitest'; import { I18n } from '../src'; diff --git a/packages/common/i18n/src/i18n/en-US.ts b/packages/common/i18n/src/i18n/en-US.ts index 7a766d12..119e89b9 100644 --- a/packages/common/i18n/src/i18n/en-US.ts +++ b/packages/common/i18n/src/i18n/en-US.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export default { languageId: 'en-US', languageName: 'English', diff --git a/packages/common/i18n/src/i18n/zh-CN.ts b/packages/common/i18n/src/i18n/zh-CN.ts index 2b1b23ea..a684a1cf 100644 --- a/packages/common/i18n/src/i18n/zh-CN.ts +++ b/packages/common/i18n/src/i18n/zh-CN.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export default { languageId: 'zh-CN', languageName: 'Chinese', diff --git a/packages/common/i18n/src/index.ts b/packages/common/i18n/src/index.ts index 10d3e8c4..e67c4ded 100644 --- a/packages/common/i18n/src/index.ts +++ b/packages/common/i18n/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { I18n as I18nStore } from 'i18n-js'; import { Emitter } from '@flowgram.ai/utils'; diff --git a/packages/common/i18n/vitest.config.ts b/packages/common/i18n/vitest.config.ts index 03207394..f79526c4 100644 --- a/packages/common/i18n/vitest.config.ts +++ b/packages/common/i18n/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { defineConfig } from 'vitest/config'; export default defineConfig({ diff --git a/packages/common/reactive/.eslintrc.js b/packages/common/reactive/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/common/reactive/.eslintrc.js +++ b/packages/common/reactive/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/common/reactive/__tests__/hooks.test.tsx b/packages/common/reactive/__tests__/hooks.test.tsx index a941e7ba..08f2cb4d 100644 --- a/packages/common/reactive/__tests__/hooks.test.tsx +++ b/packages/common/reactive/__tests__/hooks.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as React from 'react'; import { describe, it, expect, afterEach } from 'vitest'; diff --git a/packages/common/reactive/__tests__/observe.test.tsx b/packages/common/reactive/__tests__/observe.test.tsx index fa877e3f..e012799f 100644 --- a/packages/common/reactive/__tests__/observe.test.tsx +++ b/packages/common/reactive/__tests__/observe.test.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as React from 'react'; import { describe, it, expect, afterEach } from 'vitest'; diff --git a/packages/common/reactive/__tests__/reactive-base-state.test.ts b/packages/common/reactive/__tests__/reactive-base-state.test.ts index f2fdaba7..bee56b4e 100644 --- a/packages/common/reactive/__tests__/reactive-base-state.test.ts +++ b/packages/common/reactive/__tests__/reactive-base-state.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect } from 'vitest'; import { ReactiveBaseState, Tracker } from '../src'; diff --git a/packages/common/reactive/__tests__/reactive-state.test.ts b/packages/common/reactive/__tests__/reactive-state.test.ts index cda16aab..acde20b8 100644 --- a/packages/common/reactive/__tests__/reactive-state.test.ts +++ b/packages/common/reactive/__tests__/reactive-state.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, it, expect } from 'vitest'; import { ReactiveState, Tracker } from '../src'; diff --git a/packages/common/reactive/__tests__/tracker.test.ts b/packages/common/reactive/__tests__/tracker.test.ts index 1b920c7c..36aff398 100644 --- a/packages/common/reactive/__tests__/tracker.test.ts +++ b/packages/common/reactive/__tests__/tracker.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { test, expect, describe } from 'vitest'; import { Tracker } from '../src'; diff --git a/packages/common/reactive/src/core/reactive-base-state.ts b/packages/common/reactive/src/core/reactive-base-state.ts index a08b28c9..266502ee 100644 --- a/packages/common/reactive/src/core/reactive-base-state.ts +++ b/packages/common/reactive/src/core/reactive-base-state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Tracker } from './tracker'; type IStateEqual = (a: any, b: any) => boolean; diff --git a/packages/common/reactive/src/core/reactive-state.ts b/packages/common/reactive/src/core/reactive-state.ts index 69cfe534..7a2eb0e3 100644 --- a/packages/common/reactive/src/core/reactive-state.ts +++ b/packages/common/reactive/src/core/reactive-state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Tracker } from './tracker'; import Dependency = Tracker.Dependency; diff --git a/packages/common/reactive/src/core/tracker.ts b/packages/common/reactive/src/core/tracker.ts index ecc41925..e2fa1e56 100644 --- a/packages/common/reactive/src/core/tracker.ts +++ b/packages/common/reactive/src/core/tracker.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * Fork from: https://github.com/meteor/meteor/blob/devel/packages/tracker/tracker.js */ diff --git a/packages/common/reactive/src/hooks/use-observe.ts b/packages/common/reactive/src/hooks/use-observe.ts index 6453d148..721bc313 100644 --- a/packages/common/reactive/src/hooks/use-observe.ts +++ b/packages/common/reactive/src/hooks/use-observe.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useEffect, useMemo } from 'react'; import { useRefresh } from '@flowgram.ai/utils'; diff --git a/packages/common/reactive/src/hooks/use-reactive-state.ts b/packages/common/reactive/src/hooks/use-reactive-state.ts index 27e5a8c8..7caaaadb 100644 --- a/packages/common/reactive/src/hooks/use-reactive-state.ts +++ b/packages/common/reactive/src/hooks/use-reactive-state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { ReactiveState } from '../core/reactive-state'; diff --git a/packages/common/reactive/src/hooks/use-readonly-reactive-state.ts b/packages/common/reactive/src/hooks/use-readonly-reactive-state.ts index dd731558..315805fe 100644 --- a/packages/common/reactive/src/hooks/use-readonly-reactive-state.ts +++ b/packages/common/reactive/src/hooks/use-readonly-reactive-state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ReactiveState } from '../core/reactive-state'; import { useObserve } from './use-observe'; diff --git a/packages/common/reactive/src/index.ts b/packages/common/reactive/src/index.ts index fd932ca3..1079decd 100644 --- a/packages/common/reactive/src/index.ts +++ b/packages/common/reactive/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Tracker } from './core/tracker'; export { Tracker } from './core/tracker'; diff --git a/packages/common/reactive/src/react/observe.tsx b/packages/common/reactive/src/react/observe.tsx index a9439046..2537877f 100644 --- a/packages/common/reactive/src/react/observe.tsx +++ b/packages/common/reactive/src/react/observe.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useRef, useEffect } from 'react'; import { useRefresh } from '@flowgram.ai/utils'; diff --git a/packages/common/reactive/src/utils/create-proxy.ts b/packages/common/reactive/src/utils/create-proxy.ts index e5bf5489..ea9db827 100644 --- a/packages/common/reactive/src/utils/create-proxy.ts +++ b/packages/common/reactive/src/utils/create-proxy.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + interface ProxyOptions { get?: (target: V, key: string) => any; set?: (target: V, key: string, newValue: any) => boolean; diff --git a/packages/common/reactive/vitest.config.ts b/packages/common/reactive/vitest.config.ts index 20be509e..67818bf4 100644 --- a/packages/common/reactive/vitest.config.ts +++ b/packages/common/reactive/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { defineConfig } from 'vitest/config'; export default defineConfig({ diff --git a/packages/common/utils/.eslintrc.js b/packages/common/utils/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/common/utils/.eslintrc.js +++ b/packages/common/utils/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/common/utils/src/add-event-listener.ts b/packages/common/utils/src/add-event-listener.ts index ba44d1b5..999222a4 100644 --- a/packages/common/utils/src/add-event-listener.ts +++ b/packages/common/utils/src/add-event-listener.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable } from './disposable'; type EventListener = ( this: HTMLElement, diff --git a/packages/common/utils/src/array.spec.ts b/packages/common/utils/src/array.spec.ts index 2ade3d41..3deee670 100644 --- a/packages/common/utils/src/array.spec.ts +++ b/packages/common/utils/src/array.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { arrayToSet, arrayUnion, iterToArray } from './array'; diff --git a/packages/common/utils/src/array.ts b/packages/common/utils/src/array.ts index 0d4eed90..fc63e1a1 100644 --- a/packages/common/utils/src/array.ts +++ b/packages/common/utils/src/array.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function iterToArray(iter: IterableIterator): T[] { const result = []; for (const v of iter) { diff --git a/packages/common/utils/src/cache.spec.ts b/packages/common/utils/src/cache.spec.ts index d3dca566..8939c9da 100644 --- a/packages/common/utils/src/cache.spec.ts +++ b/packages/common/utils/src/cache.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * @jest-environment jsdom */ diff --git a/packages/common/utils/src/cache.ts b/packages/common/utils/src/cache.ts index 1808e6a6..3cf83060 100644 --- a/packages/common/utils/src/cache.ts +++ b/packages/common/utils/src/cache.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type Disposable } from './disposable'; import { Compare } from './compare'; diff --git a/packages/common/utils/src/cancellation.spec.ts b/packages/common/utils/src/cancellation.spec.ts index bfb06f8e..ee8dd333 100644 --- a/packages/common/utils/src/cancellation.spec.ts +++ b/packages/common/utils/src/cancellation.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { diff --git a/packages/common/utils/src/cancellation.ts b/packages/common/utils/src/cancellation.ts index a957f062..e11ec2e6 100644 --- a/packages/common/utils/src/cancellation.ts +++ b/packages/common/utils/src/cancellation.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation and others. All rights reserved. * Licensed under the MIT License. See https://github.com/Microsoft/vscode/blob/master/LICENSE.txt for license information. diff --git a/packages/common/utils/src/compare.spec.ts b/packages/common/utils/src/compare.spec.ts index 848c3b79..2031f672 100644 --- a/packages/common/utils/src/compare.spec.ts +++ b/packages/common/utils/src/compare.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { Compare } from './compare'; diff --git a/packages/common/utils/src/compare.ts b/packages/common/utils/src/compare.ts index 9bd47220..a65f29ab 100644 --- a/packages/common/utils/src/compare.ts +++ b/packages/common/utils/src/compare.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export namespace Compare { /** * 比较,默认浅比较 diff --git a/packages/common/utils/src/compose.ts b/packages/common/utils/src/compose.ts index f97438a4..2f371bd7 100644 --- a/packages/common/utils/src/compose.ts +++ b/packages/common/utils/src/compose.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { MaybePromise } from './'; type FuncMaybePromise = (d: D, ...others: any[]) => MaybePromise; diff --git a/packages/common/utils/src/contribution-provider.ts b/packages/common/utils/src/contribution-provider.ts index 9a1cdd3e..186020d6 100644 --- a/packages/common/utils/src/contribution-provider.ts +++ b/packages/common/utils/src/contribution-provider.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type interfaces } from 'inversify'; export const ContributionProvider = Symbol('ContributionProvider'); diff --git a/packages/common/utils/src/decoration-style.ts b/packages/common/utils/src/decoration-style.ts index c73c75df..a5601440 100644 --- a/packages/common/utils/src/decoration-style.ts +++ b/packages/common/utils/src/decoration-style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + function createStyleElement( styleId: string, container: HTMLElement = document.head, diff --git a/packages/common/utils/src/disposable-collection.ts b/packages/common/utils/src/disposable-collection.ts index 6870fe75..ddc50e10 100644 --- a/packages/common/utils/src/disposable-collection.ts +++ b/packages/common/utils/src/disposable-collection.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Emitter, Event } from './event'; import { Disposable } from './disposable'; diff --git a/packages/common/utils/src/disposable.spec.ts b/packages/common/utils/src/disposable.spec.ts index fae2793c..9e747089 100644 --- a/packages/common/utils/src/disposable.spec.ts +++ b/packages/common/utils/src/disposable.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { DisposableCollection, DisposableImpl } from './disposable-collection'; diff --git a/packages/common/utils/src/disposable.ts b/packages/common/utils/src/disposable.ts index 11c3ec96..24ca4bd1 100644 --- a/packages/common/utils/src/disposable.ts +++ b/packages/common/utils/src/disposable.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * An object that performs a cleanup operation when `.dispose()` is called. * diff --git a/packages/common/utils/src/dom-utils.spec.ts b/packages/common/utils/src/dom-utils.spec.ts index ff702b08..8da9779a 100644 --- a/packages/common/utils/src/dom-utils.spec.ts +++ b/packages/common/utils/src/dom-utils.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { domUtils as u } from './dom-utils'; diff --git a/packages/common/utils/src/dom-utils.ts b/packages/common/utils/src/dom-utils.ts index ed189309..9acbab63 100644 --- a/packages/common/utils/src/dom-utils.ts +++ b/packages/common/utils/src/dom-utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import clx from 'clsx'; import { each } from './objects'; diff --git a/packages/common/utils/src/event.spec.ts b/packages/common/utils/src/event.spec.ts index 6085be8d..bf40e81e 100644 --- a/packages/common/utils/src/event.spec.ts +++ b/packages/common/utils/src/event.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { Emitter, Event } from './event'; diff --git a/packages/common/utils/src/event.ts b/packages/common/utils/src/event.ts index 191fd318..e7bd022a 100644 --- a/packages/common/utils/src/event.ts +++ b/packages/common/utils/src/event.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { NOOP } from './objects'; import { Disposable } from './disposable'; diff --git a/packages/common/utils/src/hooks/use-refresh.spec.tsx b/packages/common/utils/src/hooks/use-refresh.spec.tsx index f33b8ee3..e4736578 100644 --- a/packages/common/utils/src/hooks/use-refresh.spec.tsx +++ b/packages/common/utils/src/hooks/use-refresh.spec.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { render } from '@testing-library/react'; diff --git a/packages/common/utils/src/hooks/use-refresh.ts b/packages/common/utils/src/hooks/use-refresh.ts index a70f13d8..fc97dcb4 100644 --- a/packages/common/utils/src/hooks/use-refresh.ts +++ b/packages/common/utils/src/hooks/use-refresh.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useState } from 'react'; export function useRefresh(defaultValue?: any): (v?: any) => void { diff --git a/packages/common/utils/src/id.spec.ts b/packages/common/utils/src/id.spec.ts index 82d8af35..22a6fbda 100644 --- a/packages/common/utils/src/id.spec.ts +++ b/packages/common/utils/src/id.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { generateLocalId, _setIdx } from './id'; diff --git a/packages/common/utils/src/id.ts b/packages/common/utils/src/id.ts index 36677b0f..585d5c8f 100644 --- a/packages/common/utils/src/id.ts +++ b/packages/common/utils/src/id.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + let _idx = 0; export type LocalId = number; diff --git a/packages/common/utils/src/index.spec.ts b/packages/common/utils/src/index.spec.ts index 15a2502c..381ee26d 100644 --- a/packages/common/utils/src/index.spec.ts +++ b/packages/common/utils/src/index.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { Point } from './index'; diff --git a/packages/common/utils/src/index.ts b/packages/common/utils/src/index.ts index d5f171a3..eb903a26 100644 --- a/packages/common/utils/src/index.ts +++ b/packages/common/utils/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './math/index'; export * from './objects'; export * from './types'; diff --git a/packages/common/utils/src/inversify-utils.ts b/packages/common/utils/src/inversify-utils.ts index 2872374d..d7f8b7d3 100644 --- a/packages/common/utils/src/inversify-utils.ts +++ b/packages/common/utils/src/inversify-utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type interfaces } from 'inversify'; export function bindContributions(bind: interfaces.Bind, target: any, contribs: any[]) { diff --git a/packages/common/utils/src/logger.spec.ts b/packages/common/utils/src/logger.spec.ts index 818f5caa..11f37a76 100644 --- a/packages/common/utils/src/logger.spec.ts +++ b/packages/common/utils/src/logger.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { logger } from './logger'; diff --git a/packages/common/utils/src/logger.ts b/packages/common/utils/src/logger.ts index 7f212f52..c043a63d 100644 --- a/packages/common/utils/src/logger.ts +++ b/packages/common/utils/src/logger.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + class Logger { isDevEnv() { return process.env.NODE_ENV === 'development'; diff --git a/packages/common/utils/src/math/IPoint.spec.ts b/packages/common/utils/src/math/IPoint.spec.ts index 44c15b3c..e49748de 100644 --- a/packages/common/utils/src/math/IPoint.spec.ts +++ b/packages/common/utils/src/math/IPoint.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import { type IPoint } from './IPoint' import { describe, test } from 'vitest'; diff --git a/packages/common/utils/src/math/IPoint.ts b/packages/common/utils/src/math/IPoint.ts index e4f75f43..ce0f04c7 100644 --- a/packages/common/utils/src/math/IPoint.ts +++ b/packages/common/utils/src/math/IPoint.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * Common interface for points. Both Point and ObservablePoint implement it */ diff --git a/packages/common/utils/src/math/Matrix.spec.ts b/packages/common/utils/src/math/Matrix.spec.ts index f070e970..e39117fd 100644 --- a/packages/common/utils/src/math/Matrix.spec.ts +++ b/packages/common/utils/src/math/Matrix.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // nolint: cyclo_complexity,method_line import { describe, test, expect, it } from 'vitest'; diff --git a/packages/common/utils/src/math/Matrix.ts b/packages/common/utils/src/math/Matrix.ts index 1b281954..91fe79a8 100644 --- a/packages/common/utils/src/math/Matrix.ts +++ b/packages/common/utils/src/math/Matrix.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable prefer-destructuring */ import type { Transform } from './Transform'; import type { IPoint } from './IPoint'; diff --git a/packages/common/utils/src/math/ObservablePoint.spec.ts b/packages/common/utils/src/math/ObservablePoint.spec.ts index 45519e02..07c8beca 100644 --- a/packages/common/utils/src/math/ObservablePoint.spec.ts +++ b/packages/common/utils/src/math/ObservablePoint.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * @see https://github.com/pixijs/pixijs/blob/dev/packages/math/test/ObservablePoint.tests.ts */ diff --git a/packages/common/utils/src/math/ObservablePoint.ts b/packages/common/utils/src/math/ObservablePoint.ts index 430b870d..f29b2694 100644 --- a/packages/common/utils/src/math/ObservablePoint.ts +++ b/packages/common/utils/src/math/ObservablePoint.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IPoint } from './IPoint'; /** diff --git a/packages/common/utils/src/math/Point.spec.ts b/packages/common/utils/src/math/Point.spec.ts index 2848e1de..42b386a2 100644 --- a/packages/common/utils/src/math/Point.spec.ts +++ b/packages/common/utils/src/math/Point.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { Point } from './Point'; diff --git a/packages/common/utils/src/math/Point.ts b/packages/common/utils/src/math/Point.ts index c7fba482..6ceda8f3 100644 --- a/packages/common/utils/src/math/Point.ts +++ b/packages/common/utils/src/math/Point.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IPoint } from './IPoint'; /** diff --git a/packages/common/utils/src/math/Transform.spec.ts b/packages/common/utils/src/math/Transform.spec.ts index 2763bc84..ac7ec347 100644 --- a/packages/common/utils/src/math/Transform.spec.ts +++ b/packages/common/utils/src/math/Transform.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * @see https://github.com/pixijs/pixijs/blob/dev/packages/math/test/Transform.tests.ts */ diff --git a/packages/common/utils/src/math/Transform.ts b/packages/common/utils/src/math/Transform.ts index e4c2d4ef..a2f15fe2 100644 --- a/packages/common/utils/src/math/Transform.ts +++ b/packages/common/utils/src/math/Transform.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ObservablePoint } from './ObservablePoint'; import { Matrix } from './Matrix'; diff --git a/packages/common/utils/src/math/Vector2.spec.ts b/packages/common/utils/src/math/Vector2.spec.ts index b2c13ab7..6f9f91a1 100644 --- a/packages/common/utils/src/math/Vector2.spec.ts +++ b/packages/common/utils/src/math/Vector2.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { Vector2 } from './Vector2'; diff --git a/packages/common/utils/src/math/Vector2.ts b/packages/common/utils/src/math/Vector2.ts index 2ec7e41a..a2ba38af 100644 --- a/packages/common/utils/src/math/Vector2.ts +++ b/packages/common/utils/src/math/Vector2.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export class Vector2 { constructor(public x = 0, public y = 0) {} diff --git a/packages/common/utils/src/math/angle.spec.ts b/packages/common/utils/src/math/angle.spec.ts index 67ba316a..a68b3692 100644 --- a/packages/common/utils/src/math/angle.spec.ts +++ b/packages/common/utils/src/math/angle.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { PI } from './const'; diff --git a/packages/common/utils/src/math/angle.ts b/packages/common/utils/src/math/angle.ts index 950a8721..7c6f72e9 100644 --- a/packages/common/utils/src/math/angle.ts +++ b/packages/common/utils/src/math/angle.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { wrap as mathWrap } from './wrap'; import { type IPoint } from './IPoint'; diff --git a/packages/common/utils/src/math/const.spec.ts b/packages/common/utils/src/math/const.spec.ts index 30fb87ab..81f6f240 100644 --- a/packages/common/utils/src/math/const.spec.ts +++ b/packages/common/utils/src/math/const.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { DEG_TO_RAD, PI, PI_2, RAD_TO_DEG, SHAPES } from './const'; diff --git a/packages/common/utils/src/math/const.ts b/packages/common/utils/src/math/const.ts index 1cad65ff..16d6cbbf 100644 --- a/packages/common/utils/src/math/const.ts +++ b/packages/common/utils/src/math/const.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const { PI } = Math; /** Two Pi. */ diff --git a/packages/common/utils/src/math/index.spec.ts b/packages/common/utils/src/math/index.spec.ts index 86113473..1ec13244 100644 --- a/packages/common/utils/src/math/index.spec.ts +++ b/packages/common/utils/src/math/index.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { Point } from './index'; diff --git a/packages/common/utils/src/math/index.ts b/packages/common/utils/src/math/index.ts index 5f56eebb..c533afdb 100644 --- a/packages/common/utils/src/math/index.ts +++ b/packages/common/utils/src/math/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './shapes'; export * from './Matrix'; export * from './Point'; diff --git a/packages/common/utils/src/math/shapes/Circle.spec.ts b/packages/common/utils/src/math/shapes/Circle.spec.ts index fef3836f..cdca9256 100644 --- a/packages/common/utils/src/math/shapes/Circle.spec.ts +++ b/packages/common/utils/src/math/shapes/Circle.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { Rectangle } from './Rectangle'; diff --git a/packages/common/utils/src/math/shapes/Circle.ts b/packages/common/utils/src/math/shapes/Circle.ts index 1d6c18be..bf22df62 100644 --- a/packages/common/utils/src/math/shapes/Circle.ts +++ b/packages/common/utils/src/math/shapes/Circle.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { SHAPES } from '../const'; import { Rectangle } from './Rectangle'; diff --git a/packages/common/utils/src/math/shapes/Rectangle.spec.ts b/packages/common/utils/src/math/shapes/Rectangle.spec.ts index cfa0b79c..b51693f8 100644 --- a/packages/common/utils/src/math/shapes/Rectangle.spec.ts +++ b/packages/common/utils/src/math/shapes/Rectangle.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // nolint: cyclo_complexity,method_line import { describe, test, expect } from 'vitest'; diff --git a/packages/common/utils/src/math/shapes/Rectangle.ts b/packages/common/utils/src/math/shapes/Rectangle.ts index 5365324b..faa10b65 100644 --- a/packages/common/utils/src/math/shapes/Rectangle.ts +++ b/packages/common/utils/src/math/shapes/Rectangle.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Vector2 } from '../Vector2'; import { Point } from '../Point'; import { type IPoint } from '../IPoint'; diff --git a/packages/common/utils/src/math/shapes/index.spec.ts b/packages/common/utils/src/math/shapes/index.spec.ts index 09da790d..ca87abe3 100644 --- a/packages/common/utils/src/math/shapes/index.spec.ts +++ b/packages/common/utils/src/math/shapes/index.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { Circle } from './index'; diff --git a/packages/common/utils/src/math/shapes/index.ts b/packages/common/utils/src/math/shapes/index.ts index 89b49bc5..69619313 100644 --- a/packages/common/utils/src/math/shapes/index.ts +++ b/packages/common/utils/src/math/shapes/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './Circle'; export * from './Rectangle'; diff --git a/packages/common/utils/src/math/wrap.spec.ts b/packages/common/utils/src/math/wrap.spec.ts index 9727447b..3aa266f7 100644 --- a/packages/common/utils/src/math/wrap.spec.ts +++ b/packages/common/utils/src/math/wrap.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { wrap } from './wrap'; diff --git a/packages/common/utils/src/math/wrap.ts b/packages/common/utils/src/math/wrap.ts index 1276997c..d7248eca 100644 --- a/packages/common/utils/src/math/wrap.ts +++ b/packages/common/utils/src/math/wrap.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * Wrap the given `value` between `min` and `max`. * value ∈ [min, max) diff --git a/packages/common/utils/src/objects.spec.ts b/packages/common/utils/src/objects.spec.ts index c3b8b0ea..377b1982 100644 --- a/packages/common/utils/src/objects.spec.ts +++ b/packages/common/utils/src/objects.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { diff --git a/packages/common/utils/src/objects.ts b/packages/common/utils/src/objects.ts index 1be55b5e..d35ddeb6 100644 --- a/packages/common/utils/src/objects.ts +++ b/packages/common/utils/src/objects.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { keys } = Object; export function deepFreeze(obj: T): T { if (!obj || typeof obj !== 'object') { diff --git a/packages/common/utils/src/promise-util.spec.ts b/packages/common/utils/src/promise-util.spec.ts index 581a8a5d..59f05df8 100644 --- a/packages/common/utils/src/promise-util.spec.ts +++ b/packages/common/utils/src/promise-util.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { PromisePool, type PromiseTask, retry, delay } from './promise-util'; diff --git a/packages/common/utils/src/promise-util.ts b/packages/common/utils/src/promise-util.ts index ede62d88..d7573019 100644 --- a/packages/common/utils/src/promise-util.ts +++ b/packages/common/utils/src/promise-util.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { CancellationToken, cancelled } from './cancellation'; /** diff --git a/packages/common/utils/src/request-with-memo.spec.ts b/packages/common/utils/src/request-with-memo.spec.ts index 592539fd..663698d1 100644 --- a/packages/common/utils/src/request-with-memo.spec.ts +++ b/packages/common/utils/src/request-with-memo.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi, describe, test, expect } from 'vitest'; import { clearRequestCache, requestWithMemo } from './request-with-memo'; diff --git a/packages/common/utils/src/request-with-memo.ts b/packages/common/utils/src/request-with-memo.ts index 207bdd28..0e4e4e90 100644 --- a/packages/common/utils/src/request-with-memo.ts +++ b/packages/common/utils/src/request-with-memo.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + type RequestFn = (...args: any[]) => Promise; /** diff --git a/packages/common/utils/src/schema/index.spec.ts b/packages/common/utils/src/schema/index.spec.ts index bd5f87de..d47db20b 100644 --- a/packages/common/utils/src/schema/index.spec.ts +++ b/packages/common/utils/src/schema/index.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { Schema } from './index'; diff --git a/packages/common/utils/src/schema/index.ts b/packages/common/utils/src/schema/index.ts index 59a41c7b..dc230ba6 100644 --- a/packages/common/utils/src/schema/index.ts +++ b/packages/common/utils/src/schema/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './schema'; export * from './schema-transform'; export * from './schema-base'; diff --git a/packages/common/utils/src/schema/schema-base.ts b/packages/common/utils/src/schema/schema-base.ts index 8cb48e89..b4a9e676 100644 --- a/packages/common/utils/src/schema/schema-base.ts +++ b/packages/common/utils/src/schema/schema-base.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type PositionSchema, type SizeSchema } from './schema-transform'; import { type SchemaDecoration } from './schema'; diff --git a/packages/common/utils/src/schema/schema-transform.ts b/packages/common/utils/src/schema/schema-transform.ts index 71a96b30..eacda21e 100644 --- a/packages/common/utils/src/schema/schema-transform.ts +++ b/packages/common/utils/src/schema/schema-transform.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Schema, type SchemaDecoration } from './schema'; export interface PositionSchema { diff --git a/packages/common/utils/src/schema/schema.spec.ts b/packages/common/utils/src/schema/schema.spec.ts index 35bf2fef..c6f6b772 100644 --- a/packages/common/utils/src/schema/schema.spec.ts +++ b/packages/common/utils/src/schema/schema.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // nolint: cyclo_complexity,method_line import { describe, test, expect } from 'vitest'; diff --git a/packages/common/utils/src/schema/schema.ts b/packages/common/utils/src/schema/schema.ts index e49fc10b..a36ff01d 100644 --- a/packages/common/utils/src/schema/schema.ts +++ b/packages/common/utils/src/schema/schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { mapValues } from '../objects'; export type SchemaType = diff --git a/packages/common/utils/src/types.spec.ts b/packages/common/utils/src/types.spec.ts index 7dcd1d92..c90e4ca5 100644 --- a/packages/common/utils/src/types.spec.ts +++ b/packages/common/utils/src/types.spec.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, test, expect } from 'vitest'; import { isNumber, isFunction, isString, getTag } from './types'; diff --git a/packages/common/utils/src/types.ts b/packages/common/utils/src/types.ts index 38bf63e8..b9390b3d 100644 --- a/packages/common/utils/src/types.ts +++ b/packages/common/utils/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface AsClass { new (...args: any[]): T; } diff --git a/packages/common/utils/vitest.config.ts b/packages/common/utils/vitest.config.ts index 20be509e..67818bf4 100644 --- a/packages/common/utils/vitest.config.ts +++ b/packages/common/utils/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { defineConfig } from 'vitest/config'; export default defineConfig({ diff --git a/packages/materials/fixed-semi-materials/.eslintrc.js b/packages/materials/fixed-semi-materials/.eslintrc.js index 25f01523..8f1c6336 100644 --- a/packages/materials/fixed-semi-materials/.eslintrc.js +++ b/packages/materials/fixed-semi-materials/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/materials/fixed-semi-materials/src/assets/ellipsis.tsx b/packages/materials/fixed-semi-materials/src/assets/ellipsis.tsx index 3c8a8c7a..49de4c06 100644 --- a/packages/materials/fixed-semi-materials/src/assets/ellipsis.tsx +++ b/packages/materials/fixed-semi-materials/src/assets/ellipsis.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export function Ellipse() { diff --git a/packages/materials/fixed-semi-materials/src/assets/icons.tsx b/packages/materials/fixed-semi-materials/src/assets/icons.tsx index a4724cb5..c89c8c48 100644 --- a/packages/materials/fixed-semi-materials/src/assets/icons.tsx +++ b/packages/materials/fixed-semi-materials/src/assets/icons.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export function IconStyleBorder(props: any) { diff --git a/packages/materials/fixed-semi-materials/src/assets/index.ts b/packages/materials/fixed-semi-materials/src/assets/index.ts index 5c9f6573..dcbc5135 100644 --- a/packages/materials/fixed-semi-materials/src/assets/index.ts +++ b/packages/materials/fixed-semi-materials/src/assets/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Ellipse } from './ellipsis'; export { Arrow, diff --git a/packages/materials/fixed-semi-materials/src/components/adder/index.tsx b/packages/materials/fixed-semi-materials/src/components/adder/index.tsx index b8dd04dc..ed62bc88 100644 --- a/packages/materials/fixed-semi-materials/src/components/adder/index.tsx +++ b/packages/materials/fixed-semi-materials/src/components/adder/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState } from 'react'; import { nanoid } from 'nanoid'; diff --git a/packages/materials/fixed-semi-materials/src/components/adder/styles.tsx b/packages/materials/fixed-semi-materials/src/components/adder/styles.tsx index e00aea05..9120ad0e 100644 --- a/packages/materials/fixed-semi-materials/src/components/adder/styles.tsx +++ b/packages/materials/fixed-semi-materials/src/components/adder/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { IconPlusCircle } from '@douyinfe/semi-icons'; diff --git a/packages/materials/fixed-semi-materials/src/components/branch-adder/index.tsx b/packages/materials/fixed-semi-materials/src/components/branch-adder/index.tsx index 7a70403f..28fef80d 100644 --- a/packages/materials/fixed-semi-materials/src/components/branch-adder/index.tsx +++ b/packages/materials/fixed-semi-materials/src/components/branch-adder/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { nanoid } from 'nanoid'; diff --git a/packages/materials/fixed-semi-materials/src/components/branch-adder/styles.tsx b/packages/materials/fixed-semi-materials/src/components/branch-adder/styles.tsx index 7d8546ba..c50d4cd5 100644 --- a/packages/materials/fixed-semi-materials/src/components/branch-adder/styles.tsx +++ b/packages/materials/fixed-semi-materials/src/components/branch-adder/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Container = styled.div<{ activated?: boolean; isVertical: boolean }>` diff --git a/packages/materials/fixed-semi-materials/src/components/collapse/index.tsx b/packages/materials/fixed-semi-materials/src/components/collapse/index.tsx index 148b9537..1f4d8592 100644 --- a/packages/materials/fixed-semi-materials/src/components/collapse/index.tsx +++ b/packages/materials/fixed-semi-materials/src/components/collapse/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { diff --git a/packages/materials/fixed-semi-materials/src/components/collapse/styles.tsx b/packages/materials/fixed-semi-materials/src/components/collapse/styles.tsx index fce1e0f9..45afb6d8 100644 --- a/packages/materials/fixed-semi-materials/src/components/collapse/styles.tsx +++ b/packages/materials/fixed-semi-materials/src/components/collapse/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const Container = styled.div<{ diff --git a/packages/materials/fixed-semi-materials/src/components/constants.tsx b/packages/materials/fixed-semi-materials/src/components/constants.tsx index 20a12044..94895c69 100644 --- a/packages/materials/fixed-semi-materials/src/components/constants.tsx +++ b/packages/materials/fixed-semi-materials/src/components/constants.tsx @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const primary = 'hsl(252 62% 54.9%)'; export const primaryOpacity09 = 'hsl(252deg 62% 55% / 9%)'; diff --git a/packages/materials/fixed-semi-materials/src/components/drag-highlight-adder/index.tsx b/packages/materials/fixed-semi-materials/src/components/drag-highlight-adder/index.tsx index c1ef1ffd..3fe30b9c 100644 --- a/packages/materials/fixed-semi-materials/src/components/drag-highlight-adder/index.tsx +++ b/packages/materials/fixed-semi-materials/src/components/drag-highlight-adder/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { min } from 'lodash'; diff --git a/packages/materials/fixed-semi-materials/src/components/drag-highlight-adder/styles.tsx b/packages/materials/fixed-semi-materials/src/components/drag-highlight-adder/styles.tsx index a3698c5d..c835ae38 100644 --- a/packages/materials/fixed-semi-materials/src/components/drag-highlight-adder/styles.tsx +++ b/packages/materials/fixed-semi-materials/src/components/drag-highlight-adder/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const UILineContainer = styled.div` diff --git a/packages/materials/fixed-semi-materials/src/components/drag-node/index.tsx b/packages/materials/fixed-semi-materials/src/components/drag-node/index.tsx index 7d9ad7bb..616c6e3a 100644 --- a/packages/materials/fixed-semi-materials/src/components/drag-node/index.tsx +++ b/packages/materials/fixed-semi-materials/src/components/drag-node/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import type { FlowNodeEntity } from '@flowgram.ai/fixed-layout-editor'; diff --git a/packages/materials/fixed-semi-materials/src/components/drag-node/styles.tsx b/packages/materials/fixed-semi-materials/src/components/drag-node/styles.tsx index f13808e1..1d369056 100644 --- a/packages/materials/fixed-semi-materials/src/components/drag-node/styles.tsx +++ b/packages/materials/fixed-semi-materials/src/components/drag-node/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { primary, primaryOpacity09 } from '../constants'; diff --git a/packages/materials/fixed-semi-materials/src/components/dragging-adder/index.tsx b/packages/materials/fixed-semi-materials/src/components/dragging-adder/index.tsx index 607f8b52..97a9208d 100644 --- a/packages/materials/fixed-semi-materials/src/components/dragging-adder/index.tsx +++ b/packages/materials/fixed-semi-materials/src/components/dragging-adder/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { FlowDragLayer, usePlayground } from '@flowgram.ai/fixed-layout-editor'; diff --git a/packages/materials/fixed-semi-materials/src/components/dragging-adder/styles.tsx b/packages/materials/fixed-semi-materials/src/components/dragging-adder/styles.tsx index 4d77261e..33170d39 100644 --- a/packages/materials/fixed-semi-materials/src/components/dragging-adder/styles.tsx +++ b/packages/materials/fixed-semi-materials/src/components/dragging-adder/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const UIDragNodeContainer = styled.div` diff --git a/packages/materials/fixed-semi-materials/src/components/index.tsx b/packages/materials/fixed-semi-materials/src/components/index.tsx index 9d735cb9..3d869b43 100644 --- a/packages/materials/fixed-semi-materials/src/components/index.tsx +++ b/packages/materials/fixed-semi-materials/src/components/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowRendererKey } from '@flowgram.ai/fixed-layout-editor'; import { Ellipse } from '../assets'; diff --git a/packages/materials/fixed-semi-materials/src/components/metadata.tsx b/packages/materials/fixed-semi-materials/src/components/metadata.tsx index b384b47d..9ba65147 100644 --- a/packages/materials/fixed-semi-materials/src/components/metadata.tsx +++ b/packages/materials/fixed-semi-materials/src/components/metadata.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { nanoid } from 'nanoid'; diff --git a/packages/materials/fixed-semi-materials/src/components/nodes/index.tsx b/packages/materials/fixed-semi-materials/src/components/nodes/index.tsx index 7d317646..344f3df8 100644 --- a/packages/materials/fixed-semi-materials/src/components/nodes/index.tsx +++ b/packages/materials/fixed-semi-materials/src/components/nodes/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import metadata from '../metadata'; diff --git a/packages/materials/fixed-semi-materials/src/components/nodes/styles.tsx b/packages/materials/fixed-semi-materials/src/components/nodes/styles.tsx index fa8b364a..69d2eaeb 100644 --- a/packages/materials/fixed-semi-materials/src/components/nodes/styles.tsx +++ b/packages/materials/fixed-semi-materials/src/components/nodes/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { primary, primaryOpacity09 } from '../constants'; diff --git a/packages/materials/fixed-semi-materials/src/components/tools.tsx b/packages/materials/fixed-semi-materials/src/components/tools.tsx index b29e3cc8..d3ac56e8 100644 --- a/packages/materials/fixed-semi-materials/src/components/tools.tsx +++ b/packages/materials/fixed-semi-materials/src/components/tools.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { usePlaygroundTools } from '@flowgram.ai/fixed-layout-editor'; diff --git a/packages/materials/fixed-semi-materials/src/components/try-catch-collapse.tsx b/packages/materials/fixed-semi-materials/src/components/try-catch-collapse.tsx index e299f59f..e7b5a5d4 100644 --- a/packages/materials/fixed-semi-materials/src/components/try-catch-collapse.tsx +++ b/packages/materials/fixed-semi-materials/src/components/try-catch-collapse.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useState } from 'react'; import { diff --git a/packages/materials/fixed-semi-materials/src/index.ts b/packages/materials/fixed-semi-materials/src/index.ts index 482028de..aaef7a2c 100644 --- a/packages/materials/fixed-semi-materials/src/index.ts +++ b/packages/materials/fixed-semi-materials/src/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { defaultFixedSemiMaterials } from './components'; export { PlaygroundTools } from './components/tools'; diff --git a/packages/materials/fixed-semi-materials/vitest.config.ts b/packages/materials/fixed-semi-materials/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/materials/fixed-semi-materials/vitest.config.ts +++ b/packages/materials/fixed-semi-materials/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/materials/fixed-semi-materials/vitest.setup.ts b/packages/materials/fixed-semi-materials/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/materials/fixed-semi-materials/vitest.setup.ts +++ b/packages/materials/fixed-semi-materials/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/materials/form-antd-materials/.eslintrc.cjs b/packages/materials/form-antd-materials/.eslintrc.cjs index 25f01523..8f1c6336 100644 --- a/packages/materials/form-antd-materials/.eslintrc.cjs +++ b/packages/materials/form-antd-materials/.eslintrc.cjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/materials/form-antd-materials/src/components/batch-variable-selector/index.tsx b/packages/materials/form-antd-materials/src/components/batch-variable-selector/index.tsx index 308e1f90..c6b3fa60 100644 --- a/packages/materials/form-antd-materials/src/components/batch-variable-selector/index.tsx +++ b/packages/materials/form-antd-materials/src/components/batch-variable-selector/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { PrivateScopeProvider } from '@flowgram.ai/editor'; diff --git a/packages/materials/form-antd-materials/src/components/condition-row/constants.ts b/packages/materials/form-antd-materials/src/components/condition-row/constants.ts index 02e86224..8b0d6ed3 100644 --- a/packages/materials/form-antd-materials/src/components/condition-row/constants.ts +++ b/packages/materials/form-antd-materials/src/components/condition-row/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IRules, Op, OpConfigs } from './types'; export const rules: IRules = { diff --git a/packages/materials/form-antd-materials/src/components/condition-row/hooks/styles.tsx b/packages/materials/form-antd-materials/src/components/condition-row/hooks/styles.tsx index a76c34bc..6a558311 100644 --- a/packages/materials/form-antd-materials/src/components/condition-row/hooks/styles.tsx +++ b/packages/materials/form-antd-materials/src/components/condition-row/hooks/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import type { SelectProps } from 'antd/es/select'; import { Select } from 'antd'; diff --git a/packages/materials/form-antd-materials/src/components/condition-row/hooks/useOp.tsx b/packages/materials/form-antd-materials/src/components/condition-row/hooks/useOp.tsx index 46ba5537..fed09443 100644 --- a/packages/materials/form-antd-materials/src/components/condition-row/hooks/useOp.tsx +++ b/packages/materials/form-antd-materials/src/components/condition-row/hooks/useOp.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { theme } from 'antd'; diff --git a/packages/materials/form-antd-materials/src/components/condition-row/hooks/useRule.ts b/packages/materials/form-antd-materials/src/components/condition-row/hooks/useRule.ts index 9fb86f35..88825afd 100644 --- a/packages/materials/form-antd-materials/src/components/condition-row/hooks/useRule.ts +++ b/packages/materials/form-antd-materials/src/components/condition-row/hooks/useRule.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import { useMemo } from 'react'; diff --git a/packages/materials/form-antd-materials/src/components/condition-row/index.tsx b/packages/materials/form-antd-materials/src/components/condition-row/index.tsx index 26e5b0fe..75a9a42e 100644 --- a/packages/materials/form-antd-materials/src/components/condition-row/index.tsx +++ b/packages/materials/form-antd-materials/src/components/condition-row/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import React, { useMemo } from 'react'; diff --git a/packages/materials/form-antd-materials/src/components/condition-row/styles.tsx b/packages/materials/form-antd-materials/src/components/condition-row/styles.tsx index 308eef7b..d33b79f9 100644 --- a/packages/materials/form-antd-materials/src/components/condition-row/styles.tsx +++ b/packages/materials/form-antd-materials/src/components/condition-row/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const UIContainer = styled.div` diff --git a/packages/materials/form-antd-materials/src/components/condition-row/types.ts b/packages/materials/form-antd-materials/src/components/condition-row/types.ts index a7a83429..ba54be27 100644 --- a/packages/materials/form-antd-materials/src/components/condition-row/types.ts +++ b/packages/materials/form-antd-materials/src/components/condition-row/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IFlowConstantRefValue, IFlowRefValue, JsonSchemaBasicType } from '../../typings'; export enum Op { diff --git a/packages/materials/form-antd-materials/src/components/constant-input/index.tsx b/packages/materials/form-antd-materials/src/components/constant-input/index.tsx index e395b569..8d981985 100644 --- a/packages/materials/form-antd-materials/src/components/constant-input/index.tsx +++ b/packages/materials/form-antd-materials/src/components/constant-input/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable react/prop-types */ import React, { useMemo } from 'react'; diff --git a/packages/materials/form-antd-materials/src/components/constant-input/styles.tsx b/packages/materials/form-antd-materials/src/components/constant-input/styles.tsx index 2957eb73..10d10ffa 100644 --- a/packages/materials/form-antd-materials/src/components/constant-input/styles.tsx +++ b/packages/materials/form-antd-materials/src/components/constant-input/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import type { SelectProps } from 'antd/es/select'; import type { InputNumberProps } from 'antd/es/input-number'; diff --git a/packages/materials/form-antd-materials/src/components/constant-input/types.ts b/packages/materials/form-antd-materials/src/components/constant-input/types.ts index a1548afb..1b14dbda 100644 --- a/packages/materials/form-antd-materials/src/components/constant-input/types.ts +++ b/packages/materials/form-antd-materials/src/components/constant-input/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IJsonSchema } from '../../typings'; export interface Strategy { diff --git a/packages/materials/form-antd-materials/src/components/dynamic-value-input/index.tsx b/packages/materials/form-antd-materials/src/components/dynamic-value-input/index.tsx index fc1c6d90..80978ca4 100644 --- a/packages/materials/form-antd-materials/src/components/dynamic-value-input/index.tsx +++ b/packages/materials/form-antd-materials/src/components/dynamic-value-input/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { theme } from 'antd'; diff --git a/packages/materials/form-antd-materials/src/components/dynamic-value-input/styles.tsx b/packages/materials/form-antd-materials/src/components/dynamic-value-input/styles.tsx index 3129a88b..36b1d5bc 100644 --- a/packages/materials/form-antd-materials/src/components/dynamic-value-input/styles.tsx +++ b/packages/materials/form-antd-materials/src/components/dynamic-value-input/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const UIContainer = styled.div` diff --git a/packages/materials/form-antd-materials/src/components/index.ts b/packages/materials/form-antd-materials/src/components/index.ts index 019f2934..04fd5e3f 100644 --- a/packages/materials/form-antd-materials/src/components/index.ts +++ b/packages/materials/form-antd-materials/src/components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './variable-selector'; export * from './type-selector'; export * from './json-schema-editor'; diff --git a/packages/materials/form-antd-materials/src/components/json-schema-editor/components/blur-input.tsx b/packages/materials/form-antd-materials/src/components/json-schema-editor/components/blur-input.tsx index 939bf80f..5a5a3a60 100644 --- a/packages/materials/form-antd-materials/src/components/json-schema-editor/components/blur-input.tsx +++ b/packages/materials/form-antd-materials/src/components/json-schema-editor/components/blur-input.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useEffect, useState } from 'react'; import { Input, InputProps } from 'antd'; diff --git a/packages/materials/form-antd-materials/src/components/json-schema-editor/default-value.tsx b/packages/materials/form-antd-materials/src/components/json-schema-editor/default-value.tsx index ae833591..481627bb 100644 --- a/packages/materials/form-antd-materials/src/components/json-schema-editor/default-value.tsx +++ b/packages/materials/form-antd-materials/src/components/json-schema-editor/default-value.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback, useRef, useState } from 'react'; import { Button, Tooltip, theme } from 'antd'; diff --git a/packages/materials/form-antd-materials/src/components/json-schema-editor/hooks.tsx b/packages/materials/form-antd-materials/src/components/json-schema-editor/hooks.tsx index 6f43b540..2004b56f 100644 --- a/packages/materials/form-antd-materials/src/components/json-schema-editor/hooks.tsx +++ b/packages/materials/form-antd-materials/src/components/json-schema-editor/hooks.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useMemo, useRef, useState } from 'react'; import { IJsonSchema } from '../../typings'; diff --git a/packages/materials/form-antd-materials/src/components/json-schema-editor/index.tsx b/packages/materials/form-antd-materials/src/components/json-schema-editor/index.tsx index 11b76fb3..aa085072 100644 --- a/packages/materials/form-antd-materials/src/components/json-schema-editor/index.tsx +++ b/packages/materials/form-antd-materials/src/components/json-schema-editor/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo, useState } from 'react'; import { Button, Checkbox } from 'antd'; diff --git a/packages/materials/form-antd-materials/src/components/json-schema-editor/styles.tsx b/packages/materials/form-antd-materials/src/components/json-schema-editor/styles.tsx index f3c10176..25356c6a 100644 --- a/packages/materials/form-antd-materials/src/components/json-schema-editor/styles.tsx +++ b/packages/materials/form-antd-materials/src/components/json-schema-editor/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import styled, { css } from 'styled-components'; diff --git a/packages/materials/form-antd-materials/src/components/json-schema-editor/types.ts b/packages/materials/form-antd-materials/src/components/json-schema-editor/types.ts index 17976bdb..cde1eba6 100644 --- a/packages/materials/form-antd-materials/src/components/json-schema-editor/types.ts +++ b/packages/materials/form-antd-materials/src/components/json-schema-editor/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IJsonSchema } from '../../typings'; export interface PropertyValueType extends IJsonSchema { diff --git a/packages/materials/form-antd-materials/src/components/json-schema-editor/utils.ts b/packages/materials/form-antd-materials/src/components/json-schema-editor/utils.ts index a5dab196..d21c7cc7 100644 --- a/packages/materials/form-antd-materials/src/components/json-schema-editor/utils.ts +++ b/packages/materials/form-antd-materials/src/components/json-schema-editor/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * Return the corresponding string description according to the type of the input value.根据输入值的类型返回对应的字符串描述。 * @param value - 需要判断类型的值。The value whose type needs to be judged. diff --git a/packages/materials/form-antd-materials/src/components/type-selector/constants.tsx b/packages/materials/form-antd-materials/src/components/type-selector/constants.tsx index 0bcec143..37999a4b 100644 --- a/packages/materials/form-antd-materials/src/components/type-selector/constants.tsx +++ b/packages/materials/form-antd-materials/src/components/type-selector/constants.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { SvgIcon } from '../../utils'; diff --git a/packages/materials/form-antd-materials/src/components/type-selector/index.tsx b/packages/materials/form-antd-materials/src/components/type-selector/index.tsx index 3c6f3816..239847fe 100644 --- a/packages/materials/form-antd-materials/src/components/type-selector/index.tsx +++ b/packages/materials/form-antd-materials/src/components/type-selector/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { Cascader } from 'antd'; diff --git a/packages/materials/form-antd-materials/src/components/variable-selector/index.tsx b/packages/materials/form-antd-materials/src/components/variable-selector/index.tsx index 84074fd5..59470555 100644 --- a/packages/materials/form-antd-materials/src/components/variable-selector/index.tsx +++ b/packages/materials/form-antd-materials/src/components/variable-selector/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use client'; import React from 'react'; diff --git a/packages/materials/form-antd-materials/src/components/variable-selector/styles.tsx b/packages/materials/form-antd-materials/src/components/variable-selector/styles.tsx index 8fdd4764..0c2d0549 100644 --- a/packages/materials/form-antd-materials/src/components/variable-selector/styles.tsx +++ b/packages/materials/form-antd-materials/src/components/variable-selector/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import type { TreeSelectProps } from 'antd/es/tree-select'; import { Tag, TreeSelect } from 'antd'; diff --git a/packages/materials/form-antd-materials/src/components/variable-selector/types.ts b/packages/materials/form-antd-materials/src/components/variable-selector/types.ts index bf655319..8e3ebe40 100644 --- a/packages/materials/form-antd-materials/src/components/variable-selector/types.ts +++ b/packages/materials/form-antd-materials/src/components/variable-selector/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { ReactElement } from 'react'; export interface TreeNodeData { diff --git a/packages/materials/form-antd-materials/src/components/variable-selector/use-variable-tree.tsx b/packages/materials/form-antd-materials/src/components/variable-selector/use-variable-tree.tsx index f2717c82..e576a79b 100644 --- a/packages/materials/form-antd-materials/src/components/variable-selector/use-variable-tree.tsx +++ b/packages/materials/form-antd-materials/src/components/variable-selector/use-variable-tree.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback } from 'react'; import { ASTMatch, BaseVariableField, useScopeAvailable } from '@flowgram.ai/editor'; diff --git a/packages/materials/form-antd-materials/src/effects/auto-rename-ref/index.ts b/packages/materials/form-antd-materials/src/effects/auto-rename-ref/index.ts index 9677fc27..d5bfb9e2 100644 --- a/packages/materials/form-antd-materials/src/effects/auto-rename-ref/index.ts +++ b/packages/materials/form-antd-materials/src/effects/auto-rename-ref/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isArray, isObject } from 'lodash'; import { DataEvent, diff --git a/packages/materials/form-antd-materials/src/effects/index.ts b/packages/materials/form-antd-materials/src/effects/index.ts index efaf3d89..42729b9b 100644 --- a/packages/materials/form-antd-materials/src/effects/index.ts +++ b/packages/materials/form-antd-materials/src/effects/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './provide-batch-input'; export * from './provide-batch-outputs'; export * from './auto-rename-ref'; diff --git a/packages/materials/form-antd-materials/src/effects/provide-batch-input/index.ts b/packages/materials/form-antd-materials/src/effects/provide-batch-input/index.ts index a8dff42d..c09dcbc4 100644 --- a/packages/materials/form-antd-materials/src/effects/provide-batch-input/index.ts +++ b/packages/materials/form-antd-materials/src/effects/provide-batch-input/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTFactory, EffectOptions, diff --git a/packages/materials/form-antd-materials/src/effects/provide-batch-outputs/index.ts b/packages/materials/form-antd-materials/src/effects/provide-batch-outputs/index.ts index c392cd4d..64c22627 100644 --- a/packages/materials/form-antd-materials/src/effects/provide-batch-outputs/index.ts +++ b/packages/materials/form-antd-materials/src/effects/provide-batch-outputs/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTFactory, EffectOptions, diff --git a/packages/materials/form-antd-materials/src/index.ts b/packages/materials/form-antd-materials/src/index.ts index ef5b7a92..a29ed428 100644 --- a/packages/materials/form-antd-materials/src/index.ts +++ b/packages/materials/form-antd-materials/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './components'; export * from './effects'; export * from './utils'; diff --git a/packages/materials/form-antd-materials/src/typings/flow-value/index.ts b/packages/materials/form-antd-materials/src/typings/flow-value/index.ts index 6627f3fe..ebafeb6c 100644 --- a/packages/materials/form-antd-materials/src/typings/flow-value/index.ts +++ b/packages/materials/form-antd-materials/src/typings/flow-value/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface IFlowConstantValue { type: 'constant'; content?: string | number | boolean; diff --git a/packages/materials/form-antd-materials/src/typings/index.ts b/packages/materials/form-antd-materials/src/typings/index.ts index ac5f2fc7..1dfee47f 100644 --- a/packages/materials/form-antd-materials/src/typings/index.ts +++ b/packages/materials/form-antd-materials/src/typings/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './flow-value'; export * from './json-schema'; diff --git a/packages/materials/form-antd-materials/src/typings/json-schema/index.ts b/packages/materials/form-antd-materials/src/typings/json-schema/index.ts index 8709b47c..2772dca0 100644 --- a/packages/materials/form-antd-materials/src/typings/json-schema/index.ts +++ b/packages/materials/form-antd-materials/src/typings/json-schema/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type JsonSchemaBasicType = | 'boolean' | 'string' diff --git a/packages/materials/form-antd-materials/src/utils/format-legacy-refs/index.ts b/packages/materials/form-antd-materials/src/utils/format-legacy-refs/index.ts index 0bacdc7e..dcc0c269 100644 --- a/packages/materials/form-antd-materials/src/utils/format-legacy-refs/index.ts +++ b/packages/materials/form-antd-materials/src/utils/format-legacy-refs/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isObject } from 'lodash'; interface LegacyFlowRefValueSchema { diff --git a/packages/materials/form-antd-materials/src/utils/index.ts b/packages/materials/form-antd-materials/src/utils/index.ts index 7c50de92..9809d463 100644 --- a/packages/materials/form-antd-materials/src/utils/index.ts +++ b/packages/materials/form-antd-materials/src/utils/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './format-legacy-refs'; export * from './json-schema'; export * from './svg-icon'; diff --git a/packages/materials/form-antd-materials/src/utils/json-schema/index.ts b/packages/materials/form-antd-materials/src/utils/json-schema/index.ts index c7f1e8e2..208d8c0e 100644 --- a/packages/materials/form-antd-materials/src/utils/json-schema/index.ts +++ b/packages/materials/form-antd-materials/src/utils/json-schema/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { get } from 'lodash'; import { ASTFactory, ASTKind, ASTMatch, ASTNode, ASTNodeJSON, BaseType } from '@flowgram.ai/editor'; diff --git a/packages/materials/form-antd-materials/src/utils/svg-icon/index.tsx b/packages/materials/form-antd-materials/src/utils/svg-icon/index.tsx index 88360180..79ece7f5 100644 --- a/packages/materials/form-antd-materials/src/utils/svg-icon/index.tsx +++ b/packages/materials/form-antd-materials/src/utils/svg-icon/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export function SvgIcon(props: { diff --git a/packages/materials/form-antd-materials/vitest.config.ts b/packages/materials/form-antd-materials/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/materials/form-antd-materials/vitest.config.ts +++ b/packages/materials/form-antd-materials/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/materials/form-antd-materials/vitest.setup.ts b/packages/materials/form-antd-materials/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/materials/form-antd-materials/vitest.setup.ts +++ b/packages/materials/form-antd-materials/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/materials/form-materials/.eslintrc.cjs b/packages/materials/form-materials/.eslintrc.cjs index 25f01523..8f1c6336 100644 --- a/packages/materials/form-materials/.eslintrc.cjs +++ b/packages/materials/form-materials/.eslintrc.cjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/materials/form-materials/bin/materials.ts b/packages/materials/form-materials/bin/materials.ts index 783a8c9d..563e8e53 100644 --- a/packages/materials/form-materials/bin/materials.ts +++ b/packages/materials/form-materials/bin/materials.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { fileURLToPath } from 'url'; import path from 'path'; import fs from 'fs'; diff --git a/packages/materials/form-materials/bin/project.ts b/packages/materials/form-materials/bin/project.ts index c9eccbb1..09187d0f 100644 --- a/packages/materials/form-materials/bin/project.ts +++ b/packages/materials/form-materials/bin/project.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import path from 'path'; import fs from 'fs'; import { execSync } from 'child_process'; diff --git a/packages/materials/form-materials/src/components/batch-outputs/index.tsx b/packages/materials/form-materials/src/components/batch-outputs/index.tsx index f2791a32..56a0b549 100644 --- a/packages/materials/form-materials/src/components/batch-outputs/index.tsx +++ b/packages/materials/form-materials/src/components/batch-outputs/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { Button, Input } from '@douyinfe/semi-ui'; diff --git a/packages/materials/form-materials/src/components/batch-outputs/styles.tsx b/packages/materials/form-materials/src/components/batch-outputs/styles.tsx index 07b5595e..b0d59d04 100644 --- a/packages/materials/form-materials/src/components/batch-outputs/styles.tsx +++ b/packages/materials/form-materials/src/components/batch-outputs/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const UIRows = styled.div` diff --git a/packages/materials/form-materials/src/components/batch-outputs/types.ts b/packages/materials/form-materials/src/components/batch-outputs/types.ts index d39c904a..82157e82 100644 --- a/packages/materials/form-materials/src/components/batch-outputs/types.ts +++ b/packages/materials/form-materials/src/components/batch-outputs/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IFlowRefValue } from '../../typings'; export type ValueType = Record; diff --git a/packages/materials/form-materials/src/components/batch-outputs/use-list.ts b/packages/materials/form-materials/src/components/batch-outputs/use-list.ts index 541a3a1a..d0beac0b 100644 --- a/packages/materials/form-materials/src/components/batch-outputs/use-list.ts +++ b/packages/materials/form-materials/src/components/batch-outputs/use-list.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState } from 'react'; import { difference } from 'lodash'; diff --git a/packages/materials/form-materials/src/components/batch-variable-selector/index.tsx b/packages/materials/form-materials/src/components/batch-variable-selector/index.tsx index 308e1f90..c6b3fa60 100644 --- a/packages/materials/form-materials/src/components/batch-variable-selector/index.tsx +++ b/packages/materials/form-materials/src/components/batch-variable-selector/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { PrivateScopeProvider } from '@flowgram.ai/editor'; diff --git a/packages/materials/form-materials/src/components/condition-row/constants.ts b/packages/materials/form-materials/src/components/condition-row/constants.ts index 02e86224..8b0d6ed3 100644 --- a/packages/materials/form-materials/src/components/condition-row/constants.ts +++ b/packages/materials/form-materials/src/components/condition-row/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IRules, Op, OpConfigs } from './types'; export const rules: IRules = { diff --git a/packages/materials/form-materials/src/components/condition-row/hooks/useOp.tsx b/packages/materials/form-materials/src/components/condition-row/hooks/useOp.tsx index 81d7530b..88c223dd 100644 --- a/packages/materials/form-materials/src/components/condition-row/hooks/useOp.tsx +++ b/packages/materials/form-materials/src/components/condition-row/hooks/useOp.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { Button, Select } from '@douyinfe/semi-ui'; diff --git a/packages/materials/form-materials/src/components/condition-row/hooks/useRule.ts b/packages/materials/form-materials/src/components/condition-row/hooks/useRule.ts index 9c6af731..7e56da93 100644 --- a/packages/materials/form-materials/src/components/condition-row/hooks/useRule.ts +++ b/packages/materials/form-materials/src/components/condition-row/hooks/useRule.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { useScopeAvailable } from '@flowgram.ai/editor'; diff --git a/packages/materials/form-materials/src/components/condition-row/index.tsx b/packages/materials/form-materials/src/components/condition-row/index.tsx index c312fd9c..dd17455e 100644 --- a/packages/materials/form-materials/src/components/condition-row/index.tsx +++ b/packages/materials/form-materials/src/components/condition-row/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { Input } from '@douyinfe/semi-ui'; diff --git a/packages/materials/form-materials/src/components/condition-row/styles.tsx b/packages/materials/form-materials/src/components/condition-row/styles.tsx index 308eef7b..d33b79f9 100644 --- a/packages/materials/form-materials/src/components/condition-row/styles.tsx +++ b/packages/materials/form-materials/src/components/condition-row/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const UIContainer = styled.div` diff --git a/packages/materials/form-materials/src/components/condition-row/types.ts b/packages/materials/form-materials/src/components/condition-row/types.ts index a7a83429..ba54be27 100644 --- a/packages/materials/form-materials/src/components/condition-row/types.ts +++ b/packages/materials/form-materials/src/components/condition-row/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IFlowConstantRefValue, IFlowRefValue, JsonSchemaBasicType } from '../../typings'; export enum Op { diff --git a/packages/materials/form-materials/src/components/constant-input/index.tsx b/packages/materials/form-materials/src/components/constant-input/index.tsx index a4fa6fa0..1861ef16 100644 --- a/packages/materials/form-materials/src/components/constant-input/index.tsx +++ b/packages/materials/form-materials/src/components/constant-input/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable react/prop-types */ import React, { useMemo } from 'react'; diff --git a/packages/materials/form-materials/src/components/constant-input/types.ts b/packages/materials/form-materials/src/components/constant-input/types.ts index a1548afb..1b14dbda 100644 --- a/packages/materials/form-materials/src/components/constant-input/types.ts +++ b/packages/materials/form-materials/src/components/constant-input/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IJsonSchema } from '../../typings'; export interface Strategy { diff --git a/packages/materials/form-materials/src/components/dynamic-value-input/index.tsx b/packages/materials/form-materials/src/components/dynamic-value-input/index.tsx index 3d7f62c6..d7622ce5 100644 --- a/packages/materials/form-materials/src/components/dynamic-value-input/index.tsx +++ b/packages/materials/form-materials/src/components/dynamic-value-input/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { IconButton } from '@douyinfe/semi-ui'; diff --git a/packages/materials/form-materials/src/components/dynamic-value-input/styles.tsx b/packages/materials/form-materials/src/components/dynamic-value-input/styles.tsx index 82dfee0b..de70ee19 100644 --- a/packages/materials/form-materials/src/components/dynamic-value-input/styles.tsx +++ b/packages/materials/form-materials/src/components/dynamic-value-input/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const UIContainer = styled.div` diff --git a/packages/materials/form-materials/src/components/index.ts b/packages/materials/form-materials/src/components/index.ts index 036087d7..3750f8e8 100644 --- a/packages/materials/form-materials/src/components/index.ts +++ b/packages/materials/form-materials/src/components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './variable-selector'; export * from './type-selector'; export * from './json-schema-editor'; diff --git a/packages/materials/form-materials/src/components/json-schema-editor/components/blur-input.tsx b/packages/materials/form-materials/src/components/json-schema-editor/components/blur-input.tsx index 71eb932a..a77e12cf 100644 --- a/packages/materials/form-materials/src/components/json-schema-editor/components/blur-input.tsx +++ b/packages/materials/form-materials/src/components/json-schema-editor/components/blur-input.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useEffect, useState } from 'react'; import Input, { InputProps } from '@douyinfe/semi-ui/lib/es/input'; diff --git a/packages/materials/form-materials/src/components/json-schema-editor/default-value.tsx b/packages/materials/form-materials/src/components/json-schema-editor/default-value.tsx index d244f4bf..c78590ed 100644 --- a/packages/materials/form-materials/src/components/json-schema-editor/default-value.tsx +++ b/packages/materials/form-materials/src/components/json-schema-editor/default-value.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useRef, useState, useCallback } from 'react'; import { IconButton, JsonViewer, Tooltip } from '@douyinfe/semi-ui'; diff --git a/packages/materials/form-materials/src/components/json-schema-editor/hooks.tsx b/packages/materials/form-materials/src/components/json-schema-editor/hooks.tsx index 32e65229..4d8db4d4 100644 --- a/packages/materials/form-materials/src/components/json-schema-editor/hooks.tsx +++ b/packages/materials/form-materials/src/components/json-schema-editor/hooks.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useMemo, useRef, useState } from 'react'; import { IJsonSchema } from '../../typings'; diff --git a/packages/materials/form-materials/src/components/json-schema-editor/index.tsx b/packages/materials/form-materials/src/components/json-schema-editor/index.tsx index 6d156c7c..1efba7ff 100644 --- a/packages/materials/form-materials/src/components/json-schema-editor/index.tsx +++ b/packages/materials/form-materials/src/components/json-schema-editor/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo, useState } from 'react'; import { Button, Checkbox, IconButton } from '@douyinfe/semi-ui'; diff --git a/packages/materials/form-materials/src/components/json-schema-editor/styles.tsx b/packages/materials/form-materials/src/components/json-schema-editor/styles.tsx index 1797d3fa..b127d924 100644 --- a/packages/materials/form-materials/src/components/json-schema-editor/styles.tsx +++ b/packages/materials/form-materials/src/components/json-schema-editor/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import styled, { css } from 'styled-components'; diff --git a/packages/materials/form-materials/src/components/json-schema-editor/types.ts b/packages/materials/form-materials/src/components/json-schema-editor/types.ts index 17976bdb..cde1eba6 100644 --- a/packages/materials/form-materials/src/components/json-schema-editor/types.ts +++ b/packages/materials/form-materials/src/components/json-schema-editor/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IJsonSchema } from '../../typings'; export interface PropertyValueType extends IJsonSchema { diff --git a/packages/materials/form-materials/src/components/json-schema-editor/utils.ts b/packages/materials/form-materials/src/components/json-schema-editor/utils.ts index a5dab196..d21c7cc7 100644 --- a/packages/materials/form-materials/src/components/json-schema-editor/utils.ts +++ b/packages/materials/form-materials/src/components/json-schema-editor/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * Return the corresponding string description according to the type of the input value.根据输入值的类型返回对应的字符串描述。 * @param value - 需要判断类型的值。The value whose type needs to be judged. diff --git a/packages/materials/form-materials/src/components/type-selector/constants.tsx b/packages/materials/form-materials/src/components/type-selector/constants.tsx index ee7e0baa..a543e811 100644 --- a/packages/materials/form-materials/src/components/type-selector/constants.tsx +++ b/packages/materials/form-materials/src/components/type-selector/constants.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { CascaderData } from '@douyinfe/semi-ui/lib/es/cascader'; diff --git a/packages/materials/form-materials/src/components/type-selector/index.tsx b/packages/materials/form-materials/src/components/type-selector/index.tsx index ba680c54..eff7a257 100644 --- a/packages/materials/form-materials/src/components/type-selector/index.tsx +++ b/packages/materials/form-materials/src/components/type-selector/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { Button, Cascader } from '@douyinfe/semi-ui'; diff --git a/packages/materials/form-materials/src/components/variable-selector/index.tsx b/packages/materials/form-materials/src/components/variable-selector/index.tsx index 9ea56e13..16ab8e33 100644 --- a/packages/materials/form-materials/src/components/variable-selector/index.tsx +++ b/packages/materials/form-materials/src/components/variable-selector/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { TriggerRenderProps } from '@douyinfe/semi-ui/lib/es/treeSelect'; diff --git a/packages/materials/form-materials/src/components/variable-selector/styles.tsx b/packages/materials/form-materials/src/components/variable-selector/styles.tsx index 72634e5b..870d1525 100644 --- a/packages/materials/form-materials/src/components/variable-selector/styles.tsx +++ b/packages/materials/form-materials/src/components/variable-selector/styles.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; import { Tag, TreeSelect } from '@douyinfe/semi-ui'; diff --git a/packages/materials/form-materials/src/components/variable-selector/use-variable-tree.tsx b/packages/materials/form-materials/src/components/variable-selector/use-variable-tree.tsx index cd09e333..caac4979 100644 --- a/packages/materials/form-materials/src/components/variable-selector/use-variable-tree.tsx +++ b/packages/materials/form-materials/src/components/variable-selector/use-variable-tree.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback } from 'react'; import { ASTMatch, BaseVariableField, useAvailableVariables } from '@flowgram.ai/editor'; diff --git a/packages/materials/form-materials/src/effects/auto-rename-ref/index.ts b/packages/materials/form-materials/src/effects/auto-rename-ref/index.ts index 9677fc27..d5bfb9e2 100644 --- a/packages/materials/form-materials/src/effects/auto-rename-ref/index.ts +++ b/packages/materials/form-materials/src/effects/auto-rename-ref/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isArray, isObject } from 'lodash'; import { DataEvent, diff --git a/packages/materials/form-materials/src/effects/index.ts b/packages/materials/form-materials/src/effects/index.ts index e06d3d1c..0c23c92d 100644 --- a/packages/materials/form-materials/src/effects/index.ts +++ b/packages/materials/form-materials/src/effects/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './provide-batch-input'; export * from './provide-batch-outputs'; export * from './auto-rename-ref'; diff --git a/packages/materials/form-materials/src/effects/provide-batch-input/index.ts b/packages/materials/form-materials/src/effects/provide-batch-input/index.ts index a8dff42d..c09dcbc4 100644 --- a/packages/materials/form-materials/src/effects/provide-batch-input/index.ts +++ b/packages/materials/form-materials/src/effects/provide-batch-input/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTFactory, EffectOptions, diff --git a/packages/materials/form-materials/src/effects/provide-batch-outputs/index.ts b/packages/materials/form-materials/src/effects/provide-batch-outputs/index.ts index 24f7d1b9..f91e71ef 100644 --- a/packages/materials/form-materials/src/effects/provide-batch-outputs/index.ts +++ b/packages/materials/form-materials/src/effects/provide-batch-outputs/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTFactory, EffectOptions, diff --git a/packages/materials/form-materials/src/effects/provide-json-schema-outputs/index.ts b/packages/materials/form-materials/src/effects/provide-json-schema-outputs/index.ts index 824eca68..dc434231 100644 --- a/packages/materials/form-materials/src/effects/provide-json-schema-outputs/index.ts +++ b/packages/materials/form-materials/src/effects/provide-json-schema-outputs/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTFactory, EffectOptions, diff --git a/packages/materials/form-materials/src/effects/sync-variable-title/index.ts b/packages/materials/form-materials/src/effects/sync-variable-title/index.ts index 1e40ff88..32c613b2 100644 --- a/packages/materials/form-materials/src/effects/sync-variable-title/index.ts +++ b/packages/materials/form-materials/src/effects/sync-variable-title/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DataEvent, Effect, diff --git a/packages/materials/form-materials/src/form-plugins/batch-outputs-plugin/index.ts b/packages/materials/form-materials/src/form-plugins/batch-outputs-plugin/index.ts index 75a00e19..ede05675 100644 --- a/packages/materials/form-materials/src/form-plugins/batch-outputs-plugin/index.ts +++ b/packages/materials/form-materials/src/form-plugins/batch-outputs-plugin/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTFactory, createEffectFromVariableProvider, diff --git a/packages/materials/form-materials/src/form-plugins/index.ts b/packages/materials/form-materials/src/form-plugins/index.ts index 661d5188..f1a091b1 100644 --- a/packages/materials/form-materials/src/form-plugins/index.ts +++ b/packages/materials/form-materials/src/form-plugins/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createBatchOutputsFormPlugin } from './batch-outputs-plugin'; diff --git a/packages/materials/form-materials/src/index.ts b/packages/materials/form-materials/src/index.ts index d1ea22af..d4749693 100644 --- a/packages/materials/form-materials/src/index.ts +++ b/packages/materials/form-materials/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './components'; export * from './effects'; export * from './utils'; diff --git a/packages/materials/form-materials/src/typings/flow-value/index.ts b/packages/materials/form-materials/src/typings/flow-value/index.ts index 6627f3fe..ebafeb6c 100644 --- a/packages/materials/form-materials/src/typings/flow-value/index.ts +++ b/packages/materials/form-materials/src/typings/flow-value/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface IFlowConstantValue { type: 'constant'; content?: string | number | boolean; diff --git a/packages/materials/form-materials/src/typings/index.ts b/packages/materials/form-materials/src/typings/index.ts index ac5f2fc7..1dfee47f 100644 --- a/packages/materials/form-materials/src/typings/index.ts +++ b/packages/materials/form-materials/src/typings/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './flow-value'; export * from './json-schema'; diff --git a/packages/materials/form-materials/src/typings/json-schema/index.ts b/packages/materials/form-materials/src/typings/json-schema/index.ts index 8709b47c..2772dca0 100644 --- a/packages/materials/form-materials/src/typings/json-schema/index.ts +++ b/packages/materials/form-materials/src/typings/json-schema/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type JsonSchemaBasicType = | 'boolean' | 'string' diff --git a/packages/materials/form-materials/src/utils/format-legacy-refs/index.ts b/packages/materials/form-materials/src/utils/format-legacy-refs/index.ts index 0bacdc7e..dcc0c269 100644 --- a/packages/materials/form-materials/src/utils/format-legacy-refs/index.ts +++ b/packages/materials/form-materials/src/utils/format-legacy-refs/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isObject } from 'lodash'; interface LegacyFlowRefValueSchema { diff --git a/packages/materials/form-materials/src/utils/index.ts b/packages/materials/form-materials/src/utils/index.ts index ab3c8871..6b7c743b 100644 --- a/packages/materials/form-materials/src/utils/index.ts +++ b/packages/materials/form-materials/src/utils/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './format-legacy-refs'; export * from './json-schema'; diff --git a/packages/materials/form-materials/src/utils/json-schema/index.ts b/packages/materials/form-materials/src/utils/json-schema/index.ts index 657e799f..61c23310 100644 --- a/packages/materials/form-materials/src/utils/json-schema/index.ts +++ b/packages/materials/form-materials/src/utils/json-schema/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { get } from 'lodash'; import { ASTFactory, ASTKind, ASTMatch, ASTNode, ASTNodeJSON, BaseType } from '@flowgram.ai/editor'; diff --git a/packages/materials/form-materials/vitest.config.ts b/packages/materials/form-materials/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/materials/form-materials/vitest.config.ts +++ b/packages/materials/form-materials/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/materials/form-materials/vitest.setup.ts b/packages/materials/form-materials/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/materials/form-materials/vitest.setup.ts +++ b/packages/materials/form-materials/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/node-engine/form-core/.eslintrc.js b/packages/node-engine/form-core/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/node-engine/form-core/.eslintrc.js +++ b/packages/node-engine/form-core/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/node-engine/form-core/__tests__/form-path-service.test.ts b/packages/node-engine/form-core/__tests__/form-path-service.test.ts index 31d485b5..0e4b4fe8 100644 --- a/packages/node-engine/form-core/__tests__/form-path-service.test.ts +++ b/packages/node-engine/form-core/__tests__/form-path-service.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { FormPathService } from '../src/form/services/form-path-service'; diff --git a/packages/node-engine/form-core/__tests__/form.test.ts b/packages/node-engine/form-core/__tests__/form.test.ts index 73bb60a9..9f632cfe 100644 --- a/packages/node-engine/form-core/__tests__/form.test.ts +++ b/packages/node-engine/form-core/__tests__/form.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; describe('form test', () => { diff --git a/packages/node-engine/form-core/src/client/create-node-container-modules.ts b/packages/node-engine/form-core/src/client/create-node-container-modules.ts index 5c4f5cea..548c286a 100644 --- a/packages/node-engine/form-core/src/client/create-node-container-modules.ts +++ b/packages/node-engine/form-core/src/client/create-node-container-modules.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { NodeContainerModule } from '../node/node-container-module'; import { FormCoreContainerModule } from '../form'; import { ErrorContainerModule } from '../error'; diff --git a/packages/node-engine/form-core/src/client/create-node-entity-datas.ts b/packages/node-engine/form-core/src/client/create-node-entity-datas.ts index c8c1f811..75bb8130 100644 --- a/packages/node-engine/form-core/src/client/create-node-entity-datas.ts +++ b/packages/node-engine/form-core/src/client/create-node-entity-datas.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EntityDataRegistry } from '@flowgram.ai/core'; import { FlowNodeFormData } from '../form'; diff --git a/packages/node-engine/form-core/src/client/index.ts b/packages/node-engine/form-core/src/client/index.ts index 87da2ee2..5c4bdaa3 100644 --- a/packages/node-engine/form-core/src/client/index.ts +++ b/packages/node-engine/form-core/src/client/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-node-container-modules'; export * from './node-render'; export * from './node-material-client'; diff --git a/packages/node-engine/form-core/src/client/node-material-client.ts b/packages/node-engine/form-core/src/client/node-material-client.ts index 256173d7..c6ca3c32 100644 --- a/packages/node-engine/form-core/src/client/node-material-client.ts +++ b/packages/node-engine/form-core/src/client/node-material-client.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { MATERIAL_KEY } from '../node/core-materials'; import { NodeManager, NodePlaceholderRender, Render } from '../node'; diff --git a/packages/node-engine/form-core/src/client/node-render.tsx b/packages/node-engine/form-core/src/client/node-render.tsx index 028da896..6ee5ed78 100644 --- a/packages/node-engine/form-core/src/client/node-render.tsx +++ b/packages/node-engine/form-core/src/client/node-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { memo, useCallback, useEffect } from 'react'; import { PlaygroundContext, useRefresh, useService, PluginContext } from '@flowgram.ai/core'; diff --git a/packages/node-engine/form-core/src/error/client.ts b/packages/node-engine/form-core/src/error/client.ts index f3c994f0..e6081685 100644 --- a/packages/node-engine/form-core/src/error/client.ts +++ b/packages/node-engine/form-core/src/error/client.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '@flowgram.ai/document'; import { FlowNodeErrorData } from './flow-node-error-data'; diff --git a/packages/node-engine/form-core/src/error/error-container-module.ts b/packages/node-engine/form-core/src/error/error-container-module.ts index 63a7dd2b..3f6fe82d 100644 --- a/packages/node-engine/form-core/src/error/error-container-module.ts +++ b/packages/node-engine/form-core/src/error/error-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { bindContributions } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form-core/src/error/error-node-contribution.ts b/packages/node-engine/form-core/src/error/error-node-contribution.ts index 3e830d3f..9e6645f1 100644 --- a/packages/node-engine/form-core/src/error/error-node-contribution.ts +++ b/packages/node-engine/form-core/src/error/error-node-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { NodeContribution } from '../node'; diff --git a/packages/node-engine/form-core/src/error/flow-node-error-data.ts b/packages/node-engine/form-core/src/error/flow-node-error-data.ts index 4f9eed0d..7e5d3263 100644 --- a/packages/node-engine/form-core/src/error/flow-node-error-data.ts +++ b/packages/node-engine/form-core/src/error/flow-node-error-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EntityData } from '@flowgram.ai/core'; export interface ErrorData { diff --git a/packages/node-engine/form-core/src/error/index.ts b/packages/node-engine/form-core/src/error/index.ts index 4fcda844..830ba11c 100644 --- a/packages/node-engine/form-core/src/error/index.ts +++ b/packages/node-engine/form-core/src/error/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './flow-node-error-data'; export * from './types'; export * from './error-container-module'; diff --git a/packages/node-engine/form-core/src/error/renders/default-error-render.tsx b/packages/node-engine/form-core/src/error/renders/default-error-render.tsx index b963be06..bc8d5e0c 100644 --- a/packages/node-engine/form-core/src/error/renders/default-error-render.tsx +++ b/packages/node-engine/form-core/src/error/renders/default-error-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { NodeErrorRenderProps } from '../types'; diff --git a/packages/node-engine/form-core/src/error/renders/error-render.tsx b/packages/node-engine/form-core/src/error/renders/error-render.tsx index 8ab0f9fe..34ef097f 100644 --- a/packages/node-engine/form-core/src/error/renders/error-render.tsx +++ b/packages/node-engine/form-core/src/error/renders/error-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useCallback, useEffect } from 'react'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/node-engine/form-core/src/error/renders/index.ts b/packages/node-engine/form-core/src/error/renders/index.ts index 30682faf..66dc91dc 100644 --- a/packages/node-engine/form-core/src/error/renders/index.ts +++ b/packages/node-engine/form-core/src/error/renders/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './error-render'; diff --git a/packages/node-engine/form-core/src/error/types.ts b/packages/node-engine/form-core/src/error/types.ts index 4a9becb7..14cd6664 100644 --- a/packages/node-engine/form-core/src/error/types.ts +++ b/packages/node-engine/form-core/src/error/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { NodeContext, Render } from '../node'; export interface NodeErrorRenderProps { diff --git a/packages/node-engine/form-core/src/form/abilities/decorator-ability/decorator-ability.ts b/packages/node-engine/form-core/src/form/abilities/decorator-ability/decorator-ability.ts index 3aaab418..b230f692 100644 --- a/packages/node-engine/form-core/src/form/abilities/decorator-ability/decorator-ability.ts +++ b/packages/node-engine/form-core/src/form/abilities/decorator-ability/decorator-ability.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemAbility } from '../../models/form-item-ability'; export class DecoratorAbility implements FormItemAbility { diff --git a/packages/node-engine/form-core/src/form/abilities/decorator-ability/index.ts b/packages/node-engine/form-core/src/form/abilities/decorator-ability/index.ts index 55e6f935..95596c02 100644 --- a/packages/node-engine/form-core/src/form/abilities/decorator-ability/index.ts +++ b/packages/node-engine/form-core/src/form/abilities/decorator-ability/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './decorator-ability'; export * from './types'; diff --git a/packages/node-engine/form-core/src/form/abilities/decorator-ability/types.ts b/packages/node-engine/form-core/src/form/abilities/decorator-ability/types.ts index 62d2318b..38255494 100644 --- a/packages/node-engine/form-core/src/form/abilities/decorator-ability/types.ts +++ b/packages/node-engine/form-core/src/form/abilities/decorator-ability/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemContext, FormItemFeedback } from '../../types'; import { SetterOrDecoratorContext } from '../../abilities/setter-ability'; diff --git a/packages/node-engine/form-core/src/form/abilities/default-ability/default-ability.ts b/packages/node-engine/form-core/src/form/abilities/default-ability/default-ability.ts index 09e61c05..e0b9addd 100644 --- a/packages/node-engine/form-core/src/form/abilities/default-ability/default-ability.ts +++ b/packages/node-engine/form-core/src/form/abilities/default-ability/default-ability.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemAbility } from '../../models/form-item-ability'; export class DefaultAbility implements FormItemAbility { diff --git a/packages/node-engine/form-core/src/form/abilities/default-ability/index.ts b/packages/node-engine/form-core/src/form/abilities/default-ability/index.ts index 8aa748e6..3506c10a 100644 --- a/packages/node-engine/form-core/src/form/abilities/default-ability/index.ts +++ b/packages/node-engine/form-core/src/form/abilities/default-ability/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './default-ability'; export * from './types'; diff --git a/packages/node-engine/form-core/src/form/abilities/default-ability/types.ts b/packages/node-engine/form-core/src/form/abilities/default-ability/types.ts index 7833e001..8a91aaf8 100644 --- a/packages/node-engine/form-core/src/form/abilities/default-ability/types.ts +++ b/packages/node-engine/form-core/src/form/abilities/default-ability/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemContext, FormItemMaterialContext } from '../..'; export interface GetDefaultValueProps extends FormItemContext { diff --git a/packages/node-engine/form-core/src/form/abilities/effect-ability/effect-ability.ts b/packages/node-engine/form-core/src/form/abilities/effect-ability/effect-ability.ts index b89e1355..134709e7 100644 --- a/packages/node-engine/form-core/src/form/abilities/effect-ability/effect-ability.ts +++ b/packages/node-engine/form-core/src/form/abilities/effect-ability/effect-ability.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemAbility } from '../../models/form-item-ability'; export class EffectAbility implements FormItemAbility { diff --git a/packages/node-engine/form-core/src/form/abilities/effect-ability/index.ts b/packages/node-engine/form-core/src/form/abilities/effect-ability/index.ts index 75c6efc0..44561afd 100644 --- a/packages/node-engine/form-core/src/form/abilities/effect-ability/index.ts +++ b/packages/node-engine/form-core/src/form/abilities/effect-ability/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './effect-ability'; export * from './types'; diff --git a/packages/node-engine/form-core/src/form/abilities/effect-ability/types.ts b/packages/node-engine/form-core/src/form/abilities/effect-ability/types.ts index 586ca6db..9ffee1ed 100644 --- a/packages/node-engine/form-core/src/form/abilities/effect-ability/types.ts +++ b/packages/node-engine/form-core/src/form/abilities/effect-ability/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemContext, FormItemEventName } from '../../types'; import { type FormItemMaterialContext } from '../../models/form-item-material-context'; diff --git a/packages/node-engine/form-core/src/form/abilities/index.ts b/packages/node-engine/form-core/src/form/abilities/index.ts index 422e917b..4cb5cf8f 100644 --- a/packages/node-engine/form-core/src/form/abilities/index.ts +++ b/packages/node-engine/form-core/src/form/abilities/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './setter-ability'; export * from './decorator-ability'; export * from './visibility-ability'; diff --git a/packages/node-engine/form-core/src/form/abilities/setter-ability/index.ts b/packages/node-engine/form-core/src/form/abilities/setter-ability/index.ts index d35e6acb..f37cf02d 100644 --- a/packages/node-engine/form-core/src/form/abilities/setter-ability/index.ts +++ b/packages/node-engine/form-core/src/form/abilities/setter-ability/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './setter-ability'; export * from './types'; diff --git a/packages/node-engine/form-core/src/form/abilities/setter-ability/setter-ability.ts b/packages/node-engine/form-core/src/form/abilities/setter-ability/setter-ability.ts index a5e0e4a2..4676aaaf 100644 --- a/packages/node-engine/form-core/src/form/abilities/setter-ability/setter-ability.ts +++ b/packages/node-engine/form-core/src/form/abilities/setter-ability/setter-ability.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemAbility } from '../../models/form-item-ability'; export class SetterAbility implements FormItemAbility { diff --git a/packages/node-engine/form-core/src/form/abilities/setter-ability/types.ts b/packages/node-engine/form-core/src/form/abilities/setter-ability/types.ts index 213a1f5a..9d113f09 100644 --- a/packages/node-engine/form-core/src/form/abilities/setter-ability/types.ts +++ b/packages/node-engine/form-core/src/form/abilities/setter-ability/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { FormItemContext, FormItemFeedback } from '../../types'; diff --git a/packages/node-engine/form-core/src/form/abilities/validation-ability/form-validate.types.ts b/packages/node-engine/form-core/src/form/abilities/validation-ability/form-validate.types.ts index 98c94b2d..ea7e1246 100644 --- a/packages/node-engine/form-core/src/form/abilities/validation-ability/form-validate.types.ts +++ b/packages/node-engine/form-core/src/form/abilities/validation-ability/form-validate.types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // export type ValidatorFormats = // | 'url' // | 'email' diff --git a/packages/node-engine/form-core/src/form/abilities/validation-ability/index.ts b/packages/node-engine/form-core/src/form/abilities/validation-ability/index.ts index e78b4117..469452b1 100644 --- a/packages/node-engine/form-core/src/form/abilities/validation-ability/index.ts +++ b/packages/node-engine/form-core/src/form/abilities/validation-ability/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './validation-ability'; export * from './types'; diff --git a/packages/node-engine/form-core/src/form/abilities/validation-ability/types.ts b/packages/node-engine/form-core/src/form/abilities/validation-ability/types.ts index 1cd2b6b8..5848febe 100644 --- a/packages/node-engine/form-core/src/form/abilities/validation-ability/types.ts +++ b/packages/node-engine/form-core/src/form/abilities/validation-ability/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemMaterialContext } from '../../models'; // 这里参照了rehaje 的validator function 返回格式 diff --git a/packages/node-engine/form-core/src/form/abilities/validation-ability/validation-ability.ts b/packages/node-engine/form-core/src/form/abilities/validation-ability/validation-ability.ts index d5faa532..5c1f4305 100644 --- a/packages/node-engine/form-core/src/form/abilities/validation-ability/validation-ability.ts +++ b/packages/node-engine/form-core/src/form/abilities/validation-ability/validation-ability.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemAbility } from '../../models/form-item-ability'; export class ValidationAbility implements FormItemAbility { diff --git a/packages/node-engine/form-core/src/form/abilities/visibility-ability/index.ts b/packages/node-engine/form-core/src/form/abilities/visibility-ability/index.ts index e37fcbe9..892883eb 100644 --- a/packages/node-engine/form-core/src/form/abilities/visibility-ability/index.ts +++ b/packages/node-engine/form-core/src/form/abilities/visibility-ability/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './visibility-ability'; diff --git a/packages/node-engine/form-core/src/form/abilities/visibility-ability/visibility-ability.ts b/packages/node-engine/form-core/src/form/abilities/visibility-ability/visibility-ability.ts index f9fe993c..708c13c2 100644 --- a/packages/node-engine/form-core/src/form/abilities/visibility-ability/visibility-ability.ts +++ b/packages/node-engine/form-core/src/form/abilities/visibility-ability/visibility-ability.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormItemAbility } from '../../models/form-item-ability'; export interface VisibilityAbilityOptions { diff --git a/packages/node-engine/form-core/src/form/client/index.ts b/packages/node-engine/form-core/src/form/client/index.ts index eb2dab90..08f6b732 100644 --- a/packages/node-engine/form-core/src/form/client/index.ts +++ b/packages/node-engine/form-core/src/form/client/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '@flowgram.ai/document'; import { FlowNodeFormData } from '../flow-node-form-data'; diff --git a/packages/node-engine/form-core/src/form/flow-node-form-data.ts b/packages/node-engine/form-core/src/form/flow-node-form-data.ts index ed22382e..c6702a8c 100644 --- a/packages/node-engine/form-core/src/form/flow-node-form-data.ts +++ b/packages/node-engine/form-core/src/form/flow-node-form-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Disposable, Emitter } from '@flowgram.ai/utils'; import { FlowNodeEntity } from '@flowgram.ai/document'; import { EntityData } from '@flowgram.ai/core'; diff --git a/packages/node-engine/form-core/src/form/form-contribution.ts b/packages/node-engine/form-core/src/form/form-contribution.ts index 58093141..81214581 100644 --- a/packages/node-engine/form-core/src/form/form-contribution.ts +++ b/packages/node-engine/form-core/src/form/form-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FormManager } from './services/form-manager'; export const FormContribution = Symbol('FormContribution'); diff --git a/packages/node-engine/form-core/src/form/form-core-container-module.ts b/packages/node-engine/form-core/src/form/form-core-container-module.ts index 560303a0..3eb16d9b 100644 --- a/packages/node-engine/form-core/src/form/form-core-container-module.ts +++ b/packages/node-engine/form-core/src/form/form-core-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { bindContributions } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form-core/src/form/form-node-contribution.ts b/packages/node-engine/form-core/src/form/form-node-contribution.ts index 7ef01df2..325004bd 100644 --- a/packages/node-engine/form-core/src/form/form-node-contribution.ts +++ b/packages/node-engine/form-core/src/form/form-node-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { NodeContribution, NodeManager, PLUGIN_KEY } from '../node'; diff --git a/packages/node-engine/form-core/src/form/form-render.tsx b/packages/node-engine/form-core/src/form/form-render.tsx index cbecbe99..13390f60 100644 --- a/packages/node-engine/form-core/src/form/form-render.tsx +++ b/packages/node-engine/form-core/src/form/form-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useEffect } from 'react'; import { useRefresh } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form-core/src/form/index.ts b/packages/node-engine/form-core/src/form/index.ts index 6be5e5a3..9180f250 100644 --- a/packages/node-engine/form-core/src/form/index.ts +++ b/packages/node-engine/form-core/src/form/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './form-core-container-module'; export * from './form-contribution'; export * from './services'; diff --git a/packages/node-engine/form-core/src/form/models/form-ability-extension-registry.ts b/packages/node-engine/form-core/src/form/models/form-ability-extension-registry.ts index e55d8082..eb0e01e7 100644 --- a/packages/node-engine/form-core/src/form/models/form-ability-extension-registry.ts +++ b/packages/node-engine/form-core/src/form/models/form-ability-extension-registry.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; export interface Extension { diff --git a/packages/node-engine/form-core/src/form/models/form-item-ability.ts b/packages/node-engine/form-core/src/form/models/form-item-ability.ts index 3815b022..0984d130 100644 --- a/packages/node-engine/form-core/src/form/models/form-item-ability.ts +++ b/packages/node-engine/form-core/src/form/models/form-item-ability.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface FormItemAbility { type: string; /** diff --git a/packages/node-engine/form-core/src/form/models/form-item-material-context.ts b/packages/node-engine/form-core/src/form/models/form-item-material-context.ts index caef39b9..96b8d735 100644 --- a/packages/node-engine/form-core/src/form/models/form-item-material-context.ts +++ b/packages/node-engine/form-core/src/form/models/form-item-material-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeEntity } from '@flowgram.ai/document'; import { PlaygroundContext } from '@flowgram.ai/core'; diff --git a/packages/node-engine/form-core/src/form/models/form-item.ts b/packages/node-engine/form-core/src/form/models/form-item.ts index b961012e..ae3aa71c 100644 --- a/packages/node-engine/form-core/src/form/models/form-item.ts +++ b/packages/node-engine/form-core/src/form/models/form-item.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DisposableCollection, Emitter } from '@flowgram.ai/utils'; import { FormItemDomRef, type IFormItemMeta } from '..'; diff --git a/packages/node-engine/form-core/src/form/models/form-meta.ts b/packages/node-engine/form-core/src/form/models/form-meta.ts index a735ab1c..09200b12 100644 --- a/packages/node-engine/form-core/src/form/models/form-meta.ts +++ b/packages/node-engine/form-core/src/form/models/form-meta.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type IFormItemMeta, type IFormMeta, type IFormMetaOptions } from '../types'; import { FormPathService } from '../services'; diff --git a/packages/node-engine/form-core/src/form/models/form-model.ts b/packages/node-engine/form-core/src/form/models/form-model.ts index ed086823..c088790d 100644 --- a/packages/node-engine/form-core/src/form/models/form-model.ts +++ b/packages/node-engine/form-core/src/form/models/form-model.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { DisposableCollection, Event, MaybePromise } from '@flowgram.ai/utils'; import { type FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/node-engine/form-core/src/form/models/index.ts b/packages/node-engine/form-core/src/form/models/index.ts index 68bcf2af..6f08a856 100644 --- a/packages/node-engine/form-core/src/form/models/index.ts +++ b/packages/node-engine/form-core/src/form/models/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './form-model'; export * from './form-item'; export * from './form-meta'; diff --git a/packages/node-engine/form-core/src/form/services/form-context-maker.ts b/packages/node-engine/form-core/src/form/services/form-context-maker.ts index 04b7f3f0..5fe421ac 100644 --- a/packages/node-engine/form-core/src/form/services/form-context-maker.ts +++ b/packages/node-engine/form-core/src/form/services/form-context-maker.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { injectPlaygroundContext, PlaygroundContext } from '@flowgram.ai/core'; diff --git a/packages/node-engine/form-core/src/form/services/form-manager.ts b/packages/node-engine/form-core/src/form/services/form-manager.ts index 617a1723..a4a39b95 100644 --- a/packages/node-engine/form-core/src/form/services/form-manager.ts +++ b/packages/node-engine/form-core/src/form/services/form-manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { mapValues } from 'lodash'; import { inject, injectable, multiInject, optional, postConstruct } from 'inversify'; import { Emitter } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form-core/src/form/services/form-path-service.ts b/packages/node-engine/form-core/src/form/services/form-path-service.ts index 76448b2d..4b2a4c38 100644 --- a/packages/node-engine/form-core/src/form/services/form-path-service.ts +++ b/packages/node-engine/form-core/src/form/services/form-path-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; @injectable() diff --git a/packages/node-engine/form-core/src/form/services/index.ts b/packages/node-engine/form-core/src/form/services/index.ts index 215b0368..e469b631 100644 --- a/packages/node-engine/form-core/src/form/services/index.ts +++ b/packages/node-engine/form-core/src/form/services/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './form-path-service'; export * from './form-manager'; export * from './form-context-maker'; diff --git a/packages/node-engine/form-core/src/form/types/form-ability.types.ts b/packages/node-engine/form-core/src/form/types/form-ability.types.ts index 073b88dd..ca610068 100644 --- a/packages/node-engine/form-core/src/form/types/form-ability.types.ts +++ b/packages/node-engine/form-core/src/form/types/form-ability.types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '@flowgram.ai/document'; import { PlaygroundContext } from '@flowgram.ai/core'; import { MaybePromise } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form-core/src/form/types/form-meta.types.ts b/packages/node-engine/form-core/src/form/types/form-meta.types.ts index a0541b00..2f1dbbc5 100644 --- a/packages/node-engine/form-core/src/form/types/form-meta.types.ts +++ b/packages/node-engine/form-core/src/form/types/form-meta.types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { MaybePromise } from '@flowgram.ai/utils'; import { FlowNodeEntity } from '@flowgram.ai/document'; import { PlaygroundContext } from '@flowgram.ai/core'; diff --git a/packages/node-engine/form-core/src/form/types/form-model.types.ts b/packages/node-engine/form-core/src/form/types/form-model.types.ts index 4bd10b7a..0f03396d 100644 --- a/packages/node-engine/form-core/src/form/types/form-model.types.ts +++ b/packages/node-engine/form-core/src/form/types/form-model.types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface IFormItem { value: T; } diff --git a/packages/node-engine/form-core/src/form/types/index.ts b/packages/node-engine/form-core/src/form/types/index.ts index 72ca04fa..ac207078 100644 --- a/packages/node-engine/form-core/src/form/types/index.ts +++ b/packages/node-engine/form-core/src/form/types/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './form-model.types'; export * from './form-meta.types'; export * from './form-ability.types'; diff --git a/packages/node-engine/form-core/src/index.ts b/packages/node-engine/form-core/src/index.ts index 97613cb0..24b22e2c 100644 --- a/packages/node-engine/form-core/src/index.ts +++ b/packages/node-engine/form-core/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './node'; export * from './error'; export * from './form'; diff --git a/packages/node-engine/form-core/src/node-react/context/index.ts b/packages/node-engine/form-core/src/node-react/context/index.ts index 3ac811c3..1e5eb440 100644 --- a/packages/node-engine/form-core/src/node-react/context/index.ts +++ b/packages/node-engine/form-core/src/node-react/context/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './node-engine-react-context'; diff --git a/packages/node-engine/form-core/src/node-react/context/node-engine-react-context.ts b/packages/node-engine/form-core/src/node-react/context/node-engine-react-context.ts index f700e6da..cfd8778f 100644 --- a/packages/node-engine/form-core/src/node-react/context/node-engine-react-context.ts +++ b/packages/node-engine/form-core/src/node-react/context/node-engine-react-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { INodeEngineContext, NodeEngineContext } from '../../node'; diff --git a/packages/node-engine/form-core/src/node-react/hooks/index.ts b/packages/node-engine/form-core/src/node-react/hooks/index.ts index a1a7a92b..6cdd22f0 100644 --- a/packages/node-engine/form-core/src/node-react/hooks/index.ts +++ b/packages/node-engine/form-core/src/node-react/hooks/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './use-node-engine-context'; export * from './use-form-Item'; diff --git a/packages/node-engine/form-core/src/node-react/hooks/use-form-Item.ts b/packages/node-engine/form-core/src/node-react/hooks/use-form-Item.ts index d92a863a..7678ae8f 100644 --- a/packages/node-engine/form-core/src/node-react/hooks/use-form-Item.ts +++ b/packages/node-engine/form-core/src/node-react/hooks/use-form-Item.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/node-engine/form-core/src/node-react/hooks/use-node-engine-context.ts b/packages/node-engine/form-core/src/node-react/hooks/use-node-engine-context.ts index 1152eed4..f81d86cf 100644 --- a/packages/node-engine/form-core/src/node-react/hooks/use-node-engine-context.ts +++ b/packages/node-engine/form-core/src/node-react/hooks/use-node-engine-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { useService, useRefresh } from '@flowgram.ai/core'; diff --git a/packages/node-engine/form-core/src/node-react/index.ts b/packages/node-engine/form-core/src/node-react/index.ts index b98a57f6..56c28a68 100644 --- a/packages/node-engine/form-core/src/node-react/index.ts +++ b/packages/node-engine/form-core/src/node-react/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './hooks'; export * from './context'; diff --git a/packages/node-engine/form-core/src/node/core-materials.ts b/packages/node-engine/form-core/src/node/core-materials.ts index cfc85d56..06299884 100644 --- a/packages/node-engine/form-core/src/node/core-materials.ts +++ b/packages/node-engine/form-core/src/node/core-materials.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const MATERIAL_KEY = { NODE_ERROR_RENDER: 'node_error_render', NODE_PLACEHOLDER_RENDER: 'node_placeholder_render', diff --git a/packages/node-engine/form-core/src/node/core-plugins.ts b/packages/node-engine/form-core/src/node/core-plugins.ts index a845740c..a30ebd30 100644 --- a/packages/node-engine/form-core/src/node/core-plugins.ts +++ b/packages/node-engine/form-core/src/node/core-plugins.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const PLUGIN_KEY = { FORM: 'Plugin_Form', ERROR: 'Plugin_Error', diff --git a/packages/node-engine/form-core/src/node/index.ts b/packages/node-engine/form-core/src/node/index.ts index df934ba2..2e153f8a 100644 --- a/packages/node-engine/form-core/src/node/index.ts +++ b/packages/node-engine/form-core/src/node/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { NodeContribution } from './node-contribution'; export * from './node-container-module'; export * from './node-manager'; diff --git a/packages/node-engine/form-core/src/node/node-container-module.ts b/packages/node-engine/form-core/src/node/node-container-module.ts index 7cd2f56c..4381ee7f 100644 --- a/packages/node-engine/form-core/src/node/node-container-module.ts +++ b/packages/node-engine/form-core/src/node/node-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { NodeManager } from './node-manager'; diff --git a/packages/node-engine/form-core/src/node/node-contribution.ts b/packages/node-engine/form-core/src/node/node-contribution.ts index 7aec3b86..69d050de 100644 --- a/packages/node-engine/form-core/src/node/node-contribution.ts +++ b/packages/node-engine/form-core/src/node/node-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type NodeManager } from './node-manager'; export const NodeContribution = Symbol('NodeContribution'); diff --git a/packages/node-engine/form-core/src/node/node-engine-context.ts b/packages/node-engine/form-core/src/node/node-engine-context.ts index 3e40b2ab..fc20c56b 100644 --- a/packages/node-engine/form-core/src/node/node-engine-context.ts +++ b/packages/node-engine/form-core/src/node/node-engine-context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { Emitter } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form-core/src/node/node-engine.ts b/packages/node-engine/form-core/src/node/node-engine.ts index 6b64afd6..a6a3ebc5 100644 --- a/packages/node-engine/form-core/src/node/node-engine.ts +++ b/packages/node-engine/form-core/src/node/node-engine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from 'inversify'; import { NodeManager } from './node-manager'; diff --git a/packages/node-engine/form-core/src/node/node-manager.ts b/packages/node-engine/form-core/src/node/node-manager.ts index 30596464..ba99e3eb 100644 --- a/packages/node-engine/form-core/src/node/node-manager.ts +++ b/packages/node-engine/form-core/src/node/node-manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { flow } from 'lodash'; import { injectable, multiInject, optional, postConstruct } from 'inversify'; diff --git a/packages/node-engine/form-core/src/node/types.ts b/packages/node-engine/form-core/src/node/types.ts index e71e4e45..0b7a4c15 100644 --- a/packages/node-engine/form-core/src/node/types.ts +++ b/packages/node-engine/form-core/src/node/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/node-engine/form-core/vitest.config.ts b/packages/node-engine/form-core/vitest.config.ts index 4acfffd1..dc68baba 100644 --- a/packages/node-engine/form-core/vitest.config.ts +++ b/packages/node-engine/form-core/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/node-engine/form-core/vitest.setup.ts b/packages/node-engine/form-core/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/node-engine/form-core/vitest.setup.ts +++ b/packages/node-engine/form-core/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/node-engine/form/.eslintrc.js b/packages/node-engine/form/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/node-engine/form/.eslintrc.js +++ b/packages/node-engine/form/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/node-engine/form/__tests__/create-form.test.ts b/packages/node-engine/form/__tests__/create-form.test.ts index 2b966723..3edd646b 100644 --- a/packages/node-engine/form/__tests__/create-form.test.ts +++ b/packages/node-engine/form/__tests__/create-form.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { createForm } from '@/core/create-form'; diff --git a/packages/node-engine/form/__tests__/field-array-model.test.ts b/packages/node-engine/form/__tests__/field-array-model.test.ts index 2ca54749..80249e00 100644 --- a/packages/node-engine/form/__tests__/field-array-model.test.ts +++ b/packages/node-engine/form/__tests__/field-array-model.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it, vi } from 'vitest'; import { Errors, ValidateTrigger, Warnings } from '@/types'; diff --git a/packages/node-engine/form/__tests__/field-model.test.ts b/packages/node-engine/form/__tests__/field-model.test.ts index 66a6d2de..beaf1293 100644 --- a/packages/node-engine/form/__tests__/field-model.test.ts +++ b/packages/node-engine/form/__tests__/field-model.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it, vi } from 'vitest'; import { Errors, FeedbackLevel, ValidateTrigger } from '@/types'; diff --git a/packages/node-engine/form/__tests__/form-model.test.ts b/packages/node-engine/form/__tests__/form-model.test.ts index f4cc6860..7be4fdaa 100644 --- a/packages/node-engine/form/__tests__/form-model.test.ts +++ b/packages/node-engine/form/__tests__/form-model.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it, vi } from 'vitest'; import { ValidateTrigger } from '@/types'; diff --git a/packages/node-engine/form/__tests__/glob.test.ts b/packages/node-engine/form/__tests__/glob.test.ts index a1529de3..15a91fce 100644 --- a/packages/node-engine/form/__tests__/glob.test.ts +++ b/packages/node-engine/form/__tests__/glob.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // test src/glob.ts import { describe, expect, it } from 'vitest'; diff --git a/packages/node-engine/form/__tests__/object.test.ts b/packages/node-engine/form/__tests__/object.test.ts index 8f8539a2..076215bf 100644 --- a/packages/node-engine/form/__tests__/object.test.ts +++ b/packages/node-engine/form/__tests__/object.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { getIn, isEmptyArray, isNaN, isPromise, shallowSetIn } from '../src/utils'; diff --git a/packages/node-engine/form/__tests__/path.test.ts b/packages/node-engine/form/__tests__/path.test.ts index 3d0fbeb2..6e8912ed 100644 --- a/packages/node-engine/form/__tests__/path.test.ts +++ b/packages/node-engine/form/__tests__/path.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { Path } from '../src/core/path'; diff --git a/packages/node-engine/form/__tests__/utils.test.ts b/packages/node-engine/form/__tests__/utils.test.ts index ca6bcaf6..f3d15897 100644 --- a/packages/node-engine/form/__tests__/utils.test.ts +++ b/packages/node-engine/form/__tests__/utils.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { Errors } from '@/types'; diff --git a/packages/node-engine/form/__tests__/validate.test.ts b/packages/node-engine/form/__tests__/validate.test.ts index b1230d33..cfb86faa 100644 --- a/packages/node-engine/form/__tests__/validate.test.ts +++ b/packages/node-engine/form/__tests__/validate.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { hasError } from '../src/utils/validate'; diff --git a/packages/node-engine/form/src/constants.ts b/packages/node-engine/form/src/constants.ts index 832618a9..ac135c8c 100644 --- a/packages/node-engine/form/src/constants.ts +++ b/packages/node-engine/form/src/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FieldModelState } from './types/field'; import { FormModelState } from './types'; diff --git a/packages/node-engine/form/src/core/create-form.ts b/packages/node-engine/form/src/core/create-form.ts index b243799e..6e2b2885 100644 --- a/packages/node-engine/form/src/core/create-form.ts +++ b/packages/node-engine/form/src/core/create-form.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { CreateFormReturn, FormOptions } from '../types/form'; import { Field, FieldArray, FieldName, FieldValue } from '../types'; import { toForm } from './to-form'; diff --git a/packages/node-engine/form/src/core/field-array-model.ts b/packages/node-engine/form/src/core/field-array-model.ts index 4caa71f7..8a6dc425 100644 --- a/packages/node-engine/form/src/core/field-array-model.ts +++ b/packages/node-engine/form/src/core/field-array-model.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Emitter } from '@flowgram.ai/utils'; import { FieldValue } from '../types'; diff --git a/packages/node-engine/form/src/core/field-model.ts b/packages/node-engine/form/src/core/field-model.ts index f1dbd7c8..8518a607 100644 --- a/packages/node-engine/form/src/core/field-model.ts +++ b/packages/node-engine/form/src/core/field-model.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { get, groupBy, some } from 'lodash'; import { Disposable, DisposableCollection, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form/src/core/form-model.ts b/packages/node-engine/form/src/core/form-model.ts index 3b332857..867b4e4b 100644 --- a/packages/node-engine/form/src/core/form-model.ts +++ b/packages/node-engine/form/src/core/form-model.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { flatten, get } from 'lodash'; import { deepEqual } from 'fast-equals'; import { Disposable, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form/src/core/index.ts b/packages/node-engine/form/src/core/index.ts index a978681c..ace4dfd8 100644 --- a/packages/node-engine/form/src/core/index.ts +++ b/packages/node-engine/form/src/core/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FormModel } from './form-model'; export { createForm, type CreateFormOptions } from './create-form'; export { FieldModel } from './field-model'; diff --git a/packages/node-engine/form/src/core/path.ts b/packages/node-engine/form/src/core/path.ts index 21c5adf1..9659a29e 100644 --- a/packages/node-engine/form/src/core/path.ts +++ b/packages/node-engine/form/src/core/path.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { toPath } from 'lodash'; export class Path { diff --git a/packages/node-engine/form/src/core/store.ts b/packages/node-engine/form/src/core/store.ts index 545ffe16..590bb025 100644 --- a/packages/node-engine/form/src/core/store.ts +++ b/packages/node-engine/form/src/core/store.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { get, clone, cloneDeep } from 'lodash'; import { shallowSetIn } from '../utils'; diff --git a/packages/node-engine/form/src/core/to-field-array.ts b/packages/node-engine/form/src/core/to-field-array.ts index 38877cec..deba9028 100644 --- a/packages/node-engine/form/src/core/to-field-array.ts +++ b/packages/node-engine/form/src/core/to-field-array.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Field, FieldArray } from '../types/field'; import { toField } from './to-field'; import { FieldArrayModel } from './field-array-model'; diff --git a/packages/node-engine/form/src/core/to-field.ts b/packages/node-engine/form/src/core/to-field.ts index 708c49fc..5a86f097 100644 --- a/packages/node-engine/form/src/core/to-field.ts +++ b/packages/node-engine/form/src/core/to-field.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as React from 'react'; import { isCheckBoxEvent, isReactChangeEvent } from '../utils'; diff --git a/packages/node-engine/form/src/core/to-form.ts b/packages/node-engine/form/src/core/to-form.ts index a86f5e93..a3e1ff32 100644 --- a/packages/node-engine/form/src/core/to-form.ts +++ b/packages/node-engine/form/src/core/to-form.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Form, FormModelState, FormState } from '../types/form'; import { FieldName, FieldValue } from '../types/field'; import { FormModel } from './form-model'; diff --git a/packages/node-engine/form/src/core/utils.ts b/packages/node-engine/form/src/core/utils.ts index f8cb1cce..9f206751 100644 --- a/packages/node-engine/form/src/core/utils.ts +++ b/packages/node-engine/form/src/core/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isEmpty, isEqual } from 'lodash'; import { Glob } from '../utils'; diff --git a/packages/node-engine/form/src/index.ts b/packages/node-engine/form/src/index.ts index 7dc6d78c..c622c489 100644 --- a/packages/node-engine/form/src/index.ts +++ b/packages/node-engine/form/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './react'; export type { FormRenderProps, diff --git a/packages/node-engine/form/src/react/context.ts b/packages/node-engine/form/src/react/context.ts index 7244ac7c..98b698cd 100644 --- a/packages/node-engine/form/src/react/context.ts +++ b/packages/node-engine/form/src/react/context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export const FormModelContext = React.createContext({}); diff --git a/packages/node-engine/form/src/react/field-array.tsx b/packages/node-engine/form/src/react/field-array.tsx index ee036566..a3d27f29 100644 --- a/packages/node-engine/form/src/react/field-array.tsx +++ b/packages/node-engine/form/src/react/field-array.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as React from 'react'; import { isFunction } from 'lodash'; diff --git a/packages/node-engine/form/src/react/field.tsx b/packages/node-engine/form/src/react/field.tsx index 9f69beae..430e0959 100644 --- a/packages/node-engine/form/src/react/field.tsx +++ b/packages/node-engine/form/src/react/field.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as React from 'react'; import { isFunction } from 'lodash'; diff --git a/packages/node-engine/form/src/react/form.tsx b/packages/node-engine/form/src/react/form.tsx index 886f5e2d..c17ff5b6 100644 --- a/packages/node-engine/form/src/react/form.tsx +++ b/packages/node-engine/form/src/react/form.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { Children, useEffect, useMemo } from 'react'; import { isFunction } from 'lodash'; diff --git a/packages/node-engine/form/src/react/index.ts b/packages/node-engine/form/src/react/index.ts index f5419cfd..498999fd 100644 --- a/packages/node-engine/form/src/react/index.ts +++ b/packages/node-engine/form/src/react/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './field'; export * from './form'; export * from './use-form'; diff --git a/packages/node-engine/form/src/react/use-current-field-state.ts b/packages/node-engine/form/src/react/use-current-field-state.ts index 59f9b643..153fbaf9 100644 --- a/packages/node-engine/form/src/react/use-current-field-state.ts +++ b/packages/node-engine/form/src/react/use-current-field-state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext, useMemo } from 'react'; import { useReadonlyReactiveState } from '@flowgram.ai/reactive'; diff --git a/packages/node-engine/form/src/react/use-current-field.ts b/packages/node-engine/form/src/react/use-current-field.ts index 3f94d77d..9d027696 100644 --- a/packages/node-engine/form/src/react/use-current-field.ts +++ b/packages/node-engine/form/src/react/use-current-field.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext } from 'react'; import { Field, FieldArray, FieldValue } from '../types'; diff --git a/packages/node-engine/form/src/react/use-field-validate.ts b/packages/node-engine/form/src/react/use-field-validate.ts index e57361e4..360e528b 100644 --- a/packages/node-engine/form/src/react/use-field-validate.ts +++ b/packages/node-engine/form/src/react/use-field-validate.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useContext } from 'react'; import { FieldName } from '../types'; diff --git a/packages/node-engine/form/src/react/use-field.ts b/packages/node-engine/form/src/react/use-field.ts index 81b6d30f..3d569805 100644 --- a/packages/node-engine/form/src/react/use-field.ts +++ b/packages/node-engine/form/src/react/use-field.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext, useEffect } from 'react'; import { Disposable, useRefresh } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form/src/react/use-form-state.ts b/packages/node-engine/form/src/react/use-form-state.ts index 62fbffc4..c7d614a0 100644 --- a/packages/node-engine/form/src/react/use-form-state.ts +++ b/packages/node-engine/form/src/react/use-form-state.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useObserve } from '@flowgram.ai/reactive'; import { Form, FormControl, FormState } from '../types'; diff --git a/packages/node-engine/form/src/react/use-form.ts b/packages/node-engine/form/src/react/use-form.ts index 8997937c..b4ea95c3 100644 --- a/packages/node-engine/form/src/react/use-form.ts +++ b/packages/node-engine/form/src/react/use-form.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Form } from '../types'; import { toForm } from '../core/to-form'; import { useFormModel } from './utils'; diff --git a/packages/node-engine/form/src/react/use-watch.ts b/packages/node-engine/form/src/react/use-watch.ts index 293f3116..f17037c2 100644 --- a/packages/node-engine/form/src/react/use-watch.ts +++ b/packages/node-engine/form/src/react/use-watch.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { useRefresh } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/form/src/react/utils.ts b/packages/node-engine/form/src/react/utils.ts index d7bfb7f8..d7edc62e 100644 --- a/packages/node-engine/form/src/react/utils.ts +++ b/packages/node-engine/form/src/react/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useContext } from 'react'; import { FormModel } from '../core/form-model'; diff --git a/packages/node-engine/form/src/types/common.ts b/packages/node-engine/form/src/types/common.ts index 8c69eb36..5a8a6129 100644 --- a/packages/node-engine/form/src/types/common.ts +++ b/packages/node-engine/form/src/types/common.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type Context = any; diff --git a/packages/node-engine/form/src/types/field.ts b/packages/node-engine/form/src/types/field.ts index 6f2bb317..b5c45092 100644 --- a/packages/node-engine/form/src/types/field.ts +++ b/packages/node-engine/form/src/types/field.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { Errors, FieldError, FieldWarning, Warnings } from './validate'; diff --git a/packages/node-engine/form/src/types/form.ts b/packages/node-engine/form/src/types/form.ts index 5aeae3f2..c81cb7fd 100644 --- a/packages/node-engine/form/src/types/form.ts +++ b/packages/node-engine/form/src/types/form.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormModel } from '../core/form-model'; import { Errors, FormValidateReturn, Validate, ValidateTrigger, Warnings } from './validate'; import { Field, FieldArray, FieldName, FieldValue } from './field'; diff --git a/packages/node-engine/form/src/types/index.ts b/packages/node-engine/form/src/types/index.ts index fa7753b1..06b16da0 100644 --- a/packages/node-engine/form/src/types/index.ts +++ b/packages/node-engine/form/src/types/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './field'; export * from './form'; export * from './validate'; diff --git a/packages/node-engine/form/src/types/validate.ts b/packages/node-engine/form/src/types/validate.ts index 8af665f6..dba07818 100644 --- a/packages/node-engine/form/src/types/validate.ts +++ b/packages/node-engine/form/src/types/validate.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { MaybePromise } from '@flowgram.ai/utils'; import { FieldName } from './field'; diff --git a/packages/node-engine/form/src/utils/dom.ts b/packages/node-engine/form/src/utils/dom.ts index da1f3f21..992c1290 100644 --- a/packages/node-engine/form/src/utils/dom.ts +++ b/packages/node-engine/form/src/utils/dom.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export function isReactChangeEvent(e: unknown): e is React.ChangeEvent { return ( typeof e === 'object' && diff --git a/packages/node-engine/form/src/utils/event.ts b/packages/node-engine/form/src/utils/event.ts index 5b615e61..b14b0331 100644 --- a/packages/node-engine/form/src/utils/event.ts +++ b/packages/node-engine/form/src/utils/event.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Emitter } from '@flowgram.ai/utils'; interface Payload { diff --git a/packages/node-engine/form/src/utils/glob.ts b/packages/node-engine/form/src/utils/glob.ts index b1c73d3f..4c6bbd89 100644 --- a/packages/node-engine/form/src/utils/glob.ts +++ b/packages/node-engine/form/src/utils/glob.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { flatten, get, isArray, isObject } from 'lodash'; export namespace Glob { diff --git a/packages/node-engine/form/src/utils/index.ts b/packages/node-engine/form/src/utils/index.ts index e090265b..7fdd166e 100644 --- a/packages/node-engine/form/src/utils/index.ts +++ b/packages/node-engine/form/src/utils/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './object'; export * from './dom'; export * from './glob'; diff --git a/packages/node-engine/form/src/utils/object.ts b/packages/node-engine/form/src/utils/object.ts index 5a76bbcb..bf09bbed 100644 --- a/packages/node-engine/form/src/utils/object.ts +++ b/packages/node-engine/form/src/utils/object.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { clone, toPath } from 'lodash'; /** diff --git a/packages/node-engine/form/src/utils/validate.ts b/packages/node-engine/form/src/utils/validate.ts index dd25a5f2..00a62a28 100644 --- a/packages/node-engine/form/src/utils/validate.ts +++ b/packages/node-engine/form/src/utils/validate.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Errors, Feedback, diff --git a/packages/node-engine/form/vitest.config.ts b/packages/node-engine/form/vitest.config.ts index 2dfa4cba..1e1f86f3 100644 --- a/packages/node-engine/form/vitest.config.ts +++ b/packages/node-engine/form/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/node-engine/node/.eslintrc.js b/packages/node-engine/node/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/node-engine/node/.eslintrc.js +++ b/packages/node-engine/node/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/node-engine/node/__tests__/form-model-v2.test.ts b/packages/node-engine/node/__tests__/form-model-v2.test.ts index ab61bd70..2d6a744d 100644 --- a/packages/node-engine/node/__tests__/form-model-v2.test.ts +++ b/packages/node-engine/node/__tests__/form-model-v2.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it, vi } from 'vitest'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/node-engine/node/__tests__/glob.test.ts b/packages/node-engine/node/__tests__/glob.test.ts index 6f5cd00a..71e00b2c 100644 --- a/packages/node-engine/node/__tests__/glob.test.ts +++ b/packages/node-engine/node/__tests__/glob.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // test src/glob.ts import { describe, expect, it } from 'vitest'; diff --git a/packages/node-engine/node/src/form-model-v2.ts b/packages/node-engine/node/src/form-model-v2.ts index 42bbd9b0..784a6da2 100644 --- a/packages/node-engine/node/src/form-model-v2.ts +++ b/packages/node-engine/node/src/form-model-v2.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { get, groupBy, isEmpty, mapKeys } from 'lodash'; import { Disposable, DisposableCollection, Emitter } from '@flowgram.ai/utils'; import { diff --git a/packages/node-engine/node/src/form-plugin.ts b/packages/node-engine/node/src/form-plugin.ts index 97155639..a0d31cc5 100644 --- a/packages/node-engine/node/src/form-plugin.ts +++ b/packages/node-engine/node/src/form-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { nanoid } from 'nanoid'; import { Disposable } from '@flowgram.ai/utils'; import { type NodeFormContext } from '@flowgram.ai/form-core'; diff --git a/packages/node-engine/node/src/form-render.tsx b/packages/node-engine/node/src/form-render.tsx index 77579885..0b558563 100644 --- a/packages/node-engine/node/src/form-render.tsx +++ b/packages/node-engine/node/src/form-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { Form } from '@flowgram.ai/form'; diff --git a/packages/node-engine/node/src/get-node-form.tsx b/packages/node-engine/node/src/get-node-form.tsx index 625c419e..ea13c025 100644 --- a/packages/node-engine/node/src/get-node-form.tsx +++ b/packages/node-engine/node/src/get-node-form.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { Disposable, Event } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/node/src/helpers.ts b/packages/node-engine/node/src/helpers.ts index 59040322..12cc7ca4 100644 --- a/packages/node-engine/node/src/helpers.ts +++ b/packages/node-engine/node/src/helpers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeFormData } from '@flowgram.ai/form-core'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/node-engine/node/src/hooks.ts b/packages/node-engine/node/src/hooks.ts index 7f5560ff..ca450fe5 100644 --- a/packages/node-engine/node/src/hooks.ts +++ b/packages/node-engine/node/src/hooks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { useRefresh } from '@flowgram.ai/utils'; diff --git a/packages/node-engine/node/src/index.ts b/packages/node-engine/node/src/index.ts index 5a9ded88..eb1e077a 100644 --- a/packages/node-engine/node/src/index.ts +++ b/packages/node-engine/node/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './types'; export * from './form-model-v2'; export { isFormV2, createEffectOptions } from './helpers'; diff --git a/packages/node-engine/node/src/types.ts b/packages/node-engine/node/src/types.ts index 0b0ec1fb..bc9ee000 100644 --- a/packages/node-engine/node/src/types.ts +++ b/packages/node-engine/node/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import * as React from 'react'; import { FormModel, IFormMeta, NodeFormContext } from '@flowgram.ai/form-core'; diff --git a/packages/node-engine/node/src/utils.ts b/packages/node-engine/node/src/utils.ts index f9627351..dfa9a6d3 100644 --- a/packages/node-engine/node/src/utils.ts +++ b/packages/node-engine/node/src/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { find, mergeWith } from 'lodash'; import { FormFeedback, FormPathService } from '@flowgram.ai/form-core'; import { FormValidateReturn } from '@flowgram.ai/form/src/types'; diff --git a/packages/node-engine/node/vitest.config.ts b/packages/node-engine/node/vitest.config.ts index 825df305..7efcd383 100644 --- a/packages/node-engine/node/vitest.config.ts +++ b/packages/node-engine/node/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import {defineConfig} from 'vitest/config'; diff --git a/packages/node-engine/node/vitest.setup.ts b/packages/node-engine/node/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/node-engine/node/vitest.setup.ts +++ b/packages/node-engine/node/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/background-plugin/.eslintrc.js b/packages/plugins/background-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/background-plugin/.eslintrc.js +++ b/packages/plugins/background-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/background-plugin/src/background-layer.tsx b/packages/plugins/background-plugin/src/background-layer.tsx index 482105c6..682d7c45 100644 --- a/packages/plugins/background-plugin/src/background-layer.tsx +++ b/packages/plugins/background-plugin/src/background-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { domUtils } from '@flowgram.ai/utils'; import { Layer, observeEntity, PlaygroundConfigEntity, SCALE_WIDTH } from '@flowgram.ai/core'; diff --git a/packages/plugins/background-plugin/src/create-background-plugin.ts b/packages/plugins/background-plugin/src/create-background-plugin.ts index 6e126fde..1b951239 100644 --- a/packages/plugins/background-plugin/src/create-background-plugin.ts +++ b/packages/plugins/background-plugin/src/create-background-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { BackgroundConfig, BackgroundLayer, BackgroundLayerOptions } from './background-layer'; diff --git a/packages/plugins/background-plugin/src/index.ts b/packages/plugins/background-plugin/src/index.ts index 93609c28..84f754ce 100644 --- a/packages/plugins/background-plugin/src/index.ts +++ b/packages/plugins/background-plugin/src/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './background-layer'; export * from './create-background-plugin'; diff --git a/packages/plugins/background-plugin/vitest.config.ts b/packages/plugins/background-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/background-plugin/vitest.config.ts +++ b/packages/plugins/background-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/background-plugin/vitest.setup.ts b/packages/plugins/background-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/background-plugin/vitest.setup.ts +++ b/packages/plugins/background-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/fixed-drag-plugin/.eslintrc.js b/packages/plugins/fixed-drag-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/fixed-drag-plugin/.eslintrc.js +++ b/packages/plugins/fixed-drag-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/fixed-drag-plugin/src/create-fixed-drag-plugin.ts b/packages/plugins/fixed-drag-plugin/src/create-fixed-drag-plugin.ts index b0a1a573..1b8974a8 100644 --- a/packages/plugins/fixed-drag-plugin/src/create-fixed-drag-plugin.ts +++ b/packages/plugins/fixed-drag-plugin/src/create-fixed-drag-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDragLayer } from '@flowgram.ai/renderer'; import { FlowNodeEntity } from '@flowgram.ai/document'; import { definePluginCreator, PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/fixed-drag-plugin/src/hooks/use-start-drag-node.ts b/packages/plugins/fixed-drag-plugin/src/hooks/use-start-drag-node.ts index d8d54053..60a22bef 100644 --- a/packages/plugins/fixed-drag-plugin/src/hooks/use-start-drag-node.ts +++ b/packages/plugins/fixed-drag-plugin/src/hooks/use-start-drag-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useMemo } from 'react'; import { FlowDragLayer } from '@flowgram.ai/renderer'; diff --git a/packages/plugins/fixed-drag-plugin/src/index.ts b/packages/plugins/fixed-drag-plugin/src/index.ts index 7347e382..bc687968 100644 --- a/packages/plugins/fixed-drag-plugin/src/index.ts +++ b/packages/plugins/fixed-drag-plugin/src/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-fixed-drag-plugin'; export { useStartDragNode } from './hooks/use-start-drag-node'; diff --git a/packages/plugins/fixed-drag-plugin/vitest.config.ts b/packages/plugins/fixed-drag-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/fixed-drag-plugin/vitest.config.ts +++ b/packages/plugins/fixed-drag-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/fixed-drag-plugin/vitest.setup.ts b/packages/plugins/fixed-drag-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/fixed-drag-plugin/vitest.setup.ts +++ b/packages/plugins/fixed-drag-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/fixed-history-plugin/.eslintrc.js b/packages/plugins/fixed-history-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/fixed-history-plugin/.eslintrc.js +++ b/packages/plugins/fixed-history-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/fixed-history-plugin/src/create-fixed-history-plugin.ts b/packages/plugins/fixed-history-plugin/src/create-fixed-history-plugin.ts index 7d0a5842..6b7e3612 100644 --- a/packages/plugins/fixed-history-plugin/src/create-fixed-history-plugin.ts +++ b/packages/plugins/fixed-history-plugin/src/create-fixed-history-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isEqual } from 'lodash'; import { interfaces } from 'inversify'; import { FlowNodeFormData } from '@flowgram.ai/form-core'; diff --git a/packages/plugins/fixed-history-plugin/src/fixed-history-config.ts b/packages/plugins/fixed-history-plugin/src/fixed-history-config.ts index fa272e58..23829ef9 100644 --- a/packages/plugins/fixed-history-plugin/src/fixed-history-config.ts +++ b/packages/plugins/fixed-history-plugin/src/fixed-history-config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { FlowNodeEntity } from '@flowgram.ai/document'; import { FlowNodeJSON } from '@flowgram.ai/document'; diff --git a/packages/plugins/fixed-history-plugin/src/fixed-history-registers.ts b/packages/plugins/fixed-history-plugin/src/fixed-history-registers.ts index 42d9ede7..a95afd88 100644 --- a/packages/plugins/fixed-history-plugin/src/fixed-history-registers.ts +++ b/packages/plugins/fixed-history-plugin/src/fixed-history-registers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { OperationContribution, OperationRegistry } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/index.ts b/packages/plugins/fixed-history-plugin/src/index.ts index d3617859..4ec45316 100644 --- a/packages/plugins/fixed-history-plugin/src/index.ts +++ b/packages/plugins/fixed-history-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createFixedHistoryPlugin } from './create-fixed-history-plugin'; export * from './types'; export * from './services'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/add-block.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/add-block.ts index 7b6f1c4f..63ebce49 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/add-block.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/add-block.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { AddOrDeleteBlockValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/add-child-node.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/add-child-node.ts index 84359ed2..b126f66c 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/add-child-node.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/add-child-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, OperationType } from '@flowgram.ai/document'; import { AddOrDeleteChildNodeValue } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/add-from-node.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/add-from-node.ts index 6001b593..ea8c8b50 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/add-from-node.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/add-from-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type AddOrDeleteFromNodeOperationValue, type FlowNodeEntity, diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/add-node.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/add-node.ts index 69722327..9240ed5f 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/add-node.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/add-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, FlowOperationBaseService, OperationType } from '@flowgram.ai/document'; import { AddOrDeleteNodeValue } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/add-nodes.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/add-nodes.ts index 60fe2aff..02966086 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/add-nodes.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/add-nodes.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { AddOrDeleteNodesOperationValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/base.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/base.ts index a38255d6..ff8e3950 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/base.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/base.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowOperation, FlowOperationBaseService } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/change-node.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/change-node.ts index 51f78832..daa9cc49 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/change-node.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/change-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ChangeNodeOperationValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/create-group.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/create-group.ts index 11ed0084..3f3a4c0b 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/create-group.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/create-group.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createOrUngroupValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-block.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-block.ts index 457ab790..813f618d 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-block.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-block.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { AddOrDeleteBlockValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-child-node.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-child-node.ts index 79d8d7b6..35b47bb4 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-child-node.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-child-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity, OperationType } from '@flowgram.ai/document'; import { AddOrDeleteChildNodeValue } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-from-node.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-from-node.ts index 6cc5ac58..99b547d7 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-from-node.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-from-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { AddOrDeleteFromNodeOperationValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-node.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-node.ts index c16e7822..35dd4725 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-node.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowOperationBaseService, OperationType } from '@flowgram.ai/document'; import { AddOrDeleteNodeValue } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-nodes.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-nodes.ts index 9dae08ae..52cdaef1 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/delete-nodes.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/delete-nodes.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { AddOrDeleteNodesOperationValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/index.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/index.ts index c167d00e..14e2b640 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/index.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './add-from-node'; import { ungroupOperationMeta } from './ungroup'; import { moveNodesOperationMeta } from './move-nodes'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/move-block.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/move-block.ts index eb9c131e..2aa48b6b 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/move-block.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/move-block.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { MoveBlockOperationValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/move-child-nodes.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/move-child-nodes.ts index 74b35046..1c87a384 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/move-child-nodes.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/move-child-nodes.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { MoveChildNodesOperationValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/move-nodes.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/move-nodes.ts index 695a8ebc..0d0888a3 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/move-nodes.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/move-nodes.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { MoveNodesOperationValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/operation-metas/ungroup.ts b/packages/plugins/fixed-history-plugin/src/operation-metas/ungroup.ts index fff84789..f4db8aee 100644 --- a/packages/plugins/fixed-history-plugin/src/operation-metas/ungroup.ts +++ b/packages/plugins/fixed-history-plugin/src/operation-metas/ungroup.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createOrUngroupValue, OperationType } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; import { OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/services/fixed-history-form-data-service.ts b/packages/plugins/fixed-history-plugin/src/services/fixed-history-form-data-service.ts index 88bc734a..6b1576f3 100644 --- a/packages/plugins/fixed-history-plugin/src/services/fixed-history-form-data-service.ts +++ b/packages/plugins/fixed-history-plugin/src/services/fixed-history-form-data-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { cloneDeep } from 'lodash'; import { inject, injectable } from 'inversify'; import { FlowNodeFormData, FormModel } from '@flowgram.ai/form-core'; diff --git a/packages/plugins/fixed-history-plugin/src/services/fixed-history-operation-service.ts b/packages/plugins/fixed-history-plugin/src/services/fixed-history-operation-service.ts index 4693a95c..7cd049da 100644 --- a/packages/plugins/fixed-history-plugin/src/services/fixed-history-operation-service.ts +++ b/packages/plugins/fixed-history-plugin/src/services/fixed-history-operation-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { FlowOperation, FlowOperationBaseServiceImpl } from '@flowgram.ai/document'; import { HistoryService } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/services/fixed-history-service.ts b/packages/plugins/fixed-history-plugin/src/services/fixed-history-service.ts index 13a768de..535723c6 100644 --- a/packages/plugins/fixed-history-plugin/src/services/fixed-history-service.ts +++ b/packages/plugins/fixed-history-plugin/src/services/fixed-history-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from 'inversify'; import { HistoryService, Operation } from '@flowgram.ai/history'; import { OperationRegistry } from '@flowgram.ai/history'; diff --git a/packages/plugins/fixed-history-plugin/src/services/index.ts b/packages/plugins/fixed-history-plugin/src/services/index.ts index 0174abc4..7ea91f16 100644 --- a/packages/plugins/fixed-history-plugin/src/services/index.ts +++ b/packages/plugins/fixed-history-plugin/src/services/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FixedHistoryOperationService } from './fixed-history-operation-service'; export { FixedHistoryService } from './fixed-history-service'; export { FixedHistoryFormDataService } from './fixed-history-form-data-service'; diff --git a/packages/plugins/fixed-history-plugin/src/types.ts b/packages/plugins/fixed-history-plugin/src/types.ts index 66b0b0f8..33673caf 100644 --- a/packages/plugins/fixed-history-plugin/src/types.ts +++ b/packages/plugins/fixed-history-plugin/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { HistoryPluginOptions, OperationMeta } from '@flowgram.ai/history'; import { FlowNodeEntity, FlowNodeJSON } from '@flowgram.ai/document'; import { PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/fixed-history-plugin/vitest.config.ts b/packages/plugins/fixed-history-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/fixed-history-plugin/vitest.config.ts +++ b/packages/plugins/fixed-history-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/fixed-history-plugin/vitest.setup.ts b/packages/plugins/fixed-history-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/fixed-history-plugin/vitest.setup.ts +++ b/packages/plugins/fixed-history-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/fixed-reactor-plugin/.eslintrc.js b/packages/plugins/fixed-reactor-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/fixed-reactor-plugin/.eslintrc.js +++ b/packages/plugins/fixed-reactor-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/fixed-reactor-plugin/src/constants.ts b/packages/plugins/fixed-reactor-plugin/src/constants.ts index 75a5e86f..1aec098b 100644 --- a/packages/plugins/fixed-reactor-plugin/src/constants.ts +++ b/packages/plugins/fixed-reactor-plugin/src/constants.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const RENDER_REACTOR_PORT_KEY = 'render-reactor-port'; export const RENDER_REACTOR_COLLAPSE_KEY = 'render-reactor-collapse'; diff --git a/packages/plugins/fixed-reactor-plugin/src/create-fixed-reactor-plugin.ts b/packages/plugins/fixed-reactor-plugin/src/create-fixed-reactor-plugin.ts index 2e828d81..e6a594f1 100644 --- a/packages/plugins/fixed-reactor-plugin/src/create-fixed-reactor-plugin.ts +++ b/packages/plugins/fixed-reactor-plugin/src/create-fixed-reactor-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { bindContributions } from '@flowgram.ai/utils'; diff --git a/packages/plugins/fixed-reactor-plugin/src/extends/reactor-icon.ts b/packages/plugins/fixed-reactor-plugin/src/extends/reactor-icon.ts index 51ce3d8c..52f8896a 100644 --- a/packages/plugins/fixed-reactor-plugin/src/extends/reactor-icon.ts +++ b/packages/plugins/fixed-reactor-plugin/src/extends/reactor-icon.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry, FlowNodeBaseType } from '@flowgram.ai/document'; import { drawCollapseLabel, drawCollapseLine } from '../utils/transition'; diff --git a/packages/plugins/fixed-reactor-plugin/src/extends/reactor-inline-blocks.ts b/packages/plugins/fixed-reactor-plugin/src/extends/reactor-inline-blocks.ts index 9cd085aa..60a0f1b9 100644 --- a/packages/plugins/fixed-reactor-plugin/src/extends/reactor-inline-blocks.ts +++ b/packages/plugins/fixed-reactor-plugin/src/extends/reactor-inline-blocks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry, FlowNodeBaseType } from '@flowgram.ai/document'; import { FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/plugins/fixed-reactor-plugin/src/extends/reactor-port.ts b/packages/plugins/fixed-reactor-plugin/src/extends/reactor-port.ts index 15ad525b..a9ddb3df 100644 --- a/packages/plugins/fixed-reactor-plugin/src/extends/reactor-port.ts +++ b/packages/plugins/fixed-reactor-plugin/src/extends/reactor-port.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { mean } from 'lodash'; import { FlowNodeRegistry, diff --git a/packages/plugins/fixed-reactor-plugin/src/index.ts b/packages/plugins/fixed-reactor-plugin/src/index.ts index 2ce85073..b23e42e9 100644 --- a/packages/plugins/fixed-reactor-plugin/src/index.ts +++ b/packages/plugins/fixed-reactor-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { RENDER_REACTOR_PORT_KEY, RENDER_REACTOR_COLLAPSE_KEY } from './constants'; export * from './typings'; export { createReactorFromJSON } from './utils/create'; diff --git a/packages/plugins/fixed-reactor-plugin/src/layout/reactor-shrink-layout.ts b/packages/plugins/fixed-reactor-plugin/src/layout/reactor-shrink-layout.ts index e2224956..a23b6ff5 100644 --- a/packages/plugins/fixed-reactor-plugin/src/layout/reactor-shrink-layout.ts +++ b/packages/plugins/fixed-reactor-plugin/src/layout/reactor-shrink-layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { FlowLayout, diff --git a/packages/plugins/fixed-reactor-plugin/src/reactor-node.ts b/packages/plugins/fixed-reactor-plugin/src/reactor-node.ts index 781f53d4..041439a0 100644 --- a/packages/plugins/fixed-reactor-plugin/src/reactor-node.ts +++ b/packages/plugins/fixed-reactor-plugin/src/reactor-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeRegistry } from '@flowgram.ai/document'; import { diff --git a/packages/plugins/fixed-reactor-plugin/src/typings.ts b/packages/plugins/fixed-reactor-plugin/src/typings.ts index a491301e..2e784a67 100644 --- a/packages/plugins/fixed-reactor-plugin/src/typings.ts +++ b/packages/plugins/fixed-reactor-plugin/src/typings.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum ReactorNodeType { Reactor = 'reactor', ReactorInlineBlocks = 'reactorInlineBlocks', diff --git a/packages/plugins/fixed-reactor-plugin/src/utils/create.ts b/packages/plugins/fixed-reactor-plugin/src/utils/create.ts index 77dcf535..3d0e3d9c 100644 --- a/packages/plugins/fixed-reactor-plugin/src/utils/create.ts +++ b/packages/plugins/fixed-reactor-plugin/src/utils/create.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeBaseType } from '@flowgram.ai/document'; import { type FlowNodeEntity } from '@flowgram.ai/document'; import { FlowNodeJSON } from '@flowgram.ai/document'; diff --git a/packages/plugins/fixed-reactor-plugin/src/utils/layout.ts b/packages/plugins/fixed-reactor-plugin/src/utils/layout.ts index 1f1692ab..f76d6f94 100644 --- a/packages/plugins/fixed-reactor-plugin/src/utils/layout.ts +++ b/packages/plugins/fixed-reactor-plugin/src/utils/layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { mean } from 'lodash'; import { FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/plugins/fixed-reactor-plugin/src/utils/node.ts b/packages/plugins/fixed-reactor-plugin/src/utils/node.ts index 518b7eb6..a4b6ce62 100644 --- a/packages/plugins/fixed-reactor-plugin/src/utils/node.ts +++ b/packages/plugins/fixed-reactor-plugin/src/utils/node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '@flowgram.ai/document'; import { FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/plugins/fixed-reactor-plugin/src/utils/transition.ts b/packages/plugins/fixed-reactor-plugin/src/utils/transition.ts index 8e1a0903..41ccb609 100644 --- a/packages/plugins/fixed-reactor-plugin/src/utils/transition.ts +++ b/packages/plugins/fixed-reactor-plugin/src/utils/transition.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type FlowNodeTransitionData, FlowTransitionLineEnum, diff --git a/packages/plugins/fixed-reactor-plugin/vitest.config.ts b/packages/plugins/fixed-reactor-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/fixed-reactor-plugin/vitest.config.ts +++ b/packages/plugins/fixed-reactor-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-auto-layout-plugin/.eslintrc.js b/packages/plugins/free-auto-layout-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-auto-layout-plugin/.eslintrc.js +++ b/packages/plugins/free-auto-layout-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-auto-layout-plugin/src/create-auto-layout-plugin.tsx b/packages/plugins/free-auto-layout-plugin/src/create-auto-layout-plugin.tsx index 76983df5..f1c81bd5 100644 --- a/packages/plugins/free-auto-layout-plugin/src/create-auto-layout-plugin.tsx +++ b/packages/plugins/free-auto-layout-plugin/src/create-auto-layout-plugin.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { AutoLayoutOptions } from './type'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/acyclic.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/acyclic.ts index 2d7199b6..a92167b8 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/acyclic.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/acyclic.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { LayoutGraph } from './graph'; /** diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/graph.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/graph.ts index d034fb15..3b77cc4a 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/graph.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/graph.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowLineEntity, WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import { TransformData } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/index.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/index.ts index 05b082f0..9a90ada9 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/index.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './acyclic'; export * from './rank'; export * from './order'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/layout.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/layout.ts index 96df5b05..d3c37f53 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/layout.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowLineEntity, WorkflowNodeEntity, diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/order.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/order.ts index 0251e8a2..41fc67fb 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/order.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/order.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { LayoutGraph } from './graph'; // 辅助函数:获取图中的最大rank diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/feasible-tree.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/feasible-tree.ts index dd3c6d21..80c0940d 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/feasible-tree.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/feasible-tree.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { LayoutEdge } from '../type'; import { LayoutGraph } from '../graph'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/index.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/index.ts index a71143ce..fd683d39 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/index.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { feasibleTree } from './feasible-tree'; export { longestPath } from './longest-path'; export { networkSimplex } from './network-simplex'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/longest-path.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/longest-path.ts index 731c6381..90a9f973 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/longest-path.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/longest-path.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { LayoutGraph } from '../graph'; /** diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/network-simplex.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/network-simplex.ts index bc3bf720..24531060 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/network-simplex.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/network-simplex.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { LayoutEdge, LayoutNode } from '../type'; import { LayoutGraph } from '../graph'; import { longestPath } from './longest-path'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/normalize-ranks.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/normalize-ranks.ts index 8f17b374..dcacb839 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/normalize-ranks.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/rank/normalize-ranks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { LayoutGraph } from '../graph'; export const normalizeRanks = (graph: LayoutGraph): LayoutGraph => { diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/type.ts b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/type.ts index cdad40c2..c4b4c0a0 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-layout/type.ts +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-layout/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; export interface LayoutNode { diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/acyclic.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/acyclic.js index 64e943d3..87e7ee4f 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/acyclic.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/acyclic.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import greedyFAS from './greedy-fas'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/add-border-segments.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/add-border-segments.js index 61f52047..3e26bf7b 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/add-border-segments.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/add-border-segments.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { util } from './util'; export { addBorderSegments }; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/coordinate-system.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/coordinate-system.js index 09ec2bd5..9f598f3c 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/coordinate-system.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/coordinate-system.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; export const coordinateSystem = { diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/data/list.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/data/list.js index cb061130..f15d40d8 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/data/list.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/data/list.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* * Simple doubly linked list implementation derived from Cormen, et al., * "Introduction to Algorithms". diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/debug.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/debug.js index 07da0ff4..a43a2970 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/debug.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/debug.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { util } from './util'; import { Graph } from '@dagrejs/graphlib'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/greedy-fas.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/greedy-fas.js index 7911b6b6..6f27d4e2 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/greedy-fas.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/greedy-fas.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Graph } from '@dagrejs/graphlib'; import List from './data/list'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/index.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/index.js index 51c20729..5c0ab948 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/index.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/index.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; /** diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/layout.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/layout.js index 83170354..4ae5971e 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/layout.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/layout.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import acyclic from './acyclic'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/nesting-graph.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/nesting-graph.js index e60992cf..5747caa5 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/nesting-graph.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/nesting-graph.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { util } from './util'; export const nestingGraph = { diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/normalize.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/normalize.js index ac609a45..5f11239a 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/normalize.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/normalize.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import { util } from './util'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/add-subgraph-constraints.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/add-subgraph-constraints.js index 457438e5..775d2ccb 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/add-subgraph-constraints.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/add-subgraph-constraints.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { addSubgraphConstraints }; export default addSubgraphConstraints; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/barycenter.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/barycenter.js index b7658080..a10cda1e 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/barycenter.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/barycenter.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { barycenter }; export default barycenter; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/build-layer-graph.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/build-layer-graph.js index 2819592d..22a1d13a 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/build-layer-graph.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/build-layer-graph.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Graph } from '@dagrejs/graphlib'; import { util } from '../util'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/cross-count.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/cross-count.js index c6dbf813..eae9d049 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/cross-count.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/cross-count.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import { zipObject } from '../util'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/index.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/index.js index 902b05b2..40b9336e 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/index.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/index.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import initOrder from './init-order'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/init-order.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/init-order.js index de708bec..7821b265 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/init-order.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/init-order.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import { util } from '../util'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/resolve-conflicts.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/resolve-conflicts.js index 5f8694e6..a84e07b4 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/resolve-conflicts.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/resolve-conflicts.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import util from '../util'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/sort-subgraph.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/sort-subgraph.js index 9adb830d..70b8b04c 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/sort-subgraph.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/sort-subgraph.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import barycenter from './barycenter'; import resolveConflicts from './resolve-conflicts'; import sort from './sort'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/sort.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/sort.js index 8acf474e..b3664661 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/sort.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/order/sort.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import util from '../util'; export { sort }; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/parent-dummy-chains.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/parent-dummy-chains.js index 44a4816c..fce17a5c 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/parent-dummy-chains.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/parent-dummy-chains.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { parentDummyChains }; export default parentDummyChains; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/position/bk.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/position/bk.js index 8d1e0564..757227f5 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/position/bk.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/position/bk.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import { Graph } from '@dagrejs/graphlib'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/position/index.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/position/index.js index 7a2f8067..e2c16cea 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/position/index.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/position/index.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import util from '../util'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/feasible-tree.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/feasible-tree.js index c6337a9c..0073df7f 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/feasible-tree.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/feasible-tree.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import { Graph } from '@dagrejs/graphlib'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/index.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/index.js index ac18df4d..03835b92 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/index.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/index.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import rankUtil from './util'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/network-simplex.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/network-simplex.js index 25bcb3e4..32b39060 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/network-simplex.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/network-simplex.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import { alg } from '@dagrejs/graphlib'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/util.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/util.js index 0536e803..defc37b9 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/util.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/rank/util.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + 'use strict'; import { applyWithChunking } from '../util'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/util.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/util.js index cb1b5d30..7f104d77 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/util.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/util.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint "no-console": off */ 'use strict'; diff --git a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/version.js b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/version.js index 7f31a79c..de8e551f 100644 --- a/packages/plugins/free-auto-layout-plugin/src/dagre-lib/version.js +++ b/packages/plugins/free-auto-layout-plugin/src/dagre-lib/version.js @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export default '1.1.5-pre'; diff --git a/packages/plugins/free-auto-layout-plugin/src/index.ts b/packages/plugins/free-auto-layout-plugin/src/index.ts index 2d61a91f..84f5948b 100644 --- a/packages/plugins/free-auto-layout-plugin/src/index.ts +++ b/packages/plugins/free-auto-layout-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { dagreLib } from './dagre-lib'; export { createFreeAutoLayoutPlugin } from './create-auto-layout-plugin'; export { AutoLayoutService } from './services'; diff --git a/packages/plugins/free-auto-layout-plugin/src/layout/constant.ts b/packages/plugins/free-auto-layout-plugin/src/layout/constant.ts index d618df49..6e616239 100644 --- a/packages/plugins/free-auto-layout-plugin/src/layout/constant.ts +++ b/packages/plugins/free-auto-layout-plugin/src/layout/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { LayoutConfig } from './type'; export const DefaultLayoutConfig: LayoutConfig = { diff --git a/packages/plugins/free-auto-layout-plugin/src/layout/dagre.ts b/packages/plugins/free-auto-layout-plugin/src/layout/dagre.ts index 52f90927..081a21c8 100644 --- a/packages/plugins/free-auto-layout-plugin/src/layout/dagre.ts +++ b/packages/plugins/free-auto-layout-plugin/src/layout/dagre.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeTransformData } from '@flowgram.ai/document'; import { Graph as DagreGraph } from '@dagrejs/graphlib'; diff --git a/packages/plugins/free-auto-layout-plugin/src/layout/index.ts b/packages/plugins/free-auto-layout-plugin/src/layout/index.ts index 31b5e40e..7957d2e9 100644 --- a/packages/plugins/free-auto-layout-plugin/src/layout/index.ts +++ b/packages/plugins/free-auto-layout-plugin/src/layout/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { Layout } from './layout'; export type { LayoutNode, LayoutEdge, GetFollowNode, LayoutOptions } from './type'; export type { LayoutStore } from './store'; diff --git a/packages/plugins/free-auto-layout-plugin/src/layout/layout.ts b/packages/plugins/free-auto-layout-plugin/src/layout/layout.ts index a5efaca6..fe82bf3f 100644 --- a/packages/plugins/free-auto-layout-plugin/src/layout/layout.ts +++ b/packages/plugins/free-auto-layout-plugin/src/layout/layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { GetFollowNode, LayoutConfig, LayoutOptions, LayoutParams } from './type'; import { LayoutStore } from './store'; import { LayoutPosition } from './position'; diff --git a/packages/plugins/free-auto-layout-plugin/src/layout/position.ts b/packages/plugins/free-auto-layout-plugin/src/layout/position.ts index 9ec43d3c..1ef94e81 100644 --- a/packages/plugins/free-auto-layout-plugin/src/layout/position.ts +++ b/packages/plugins/free-auto-layout-plugin/src/layout/position.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowDocument } from '@flowgram.ai/free-layout-core'; import { PositionSchema, startTween, TransformData } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-auto-layout-plugin/src/layout/store.ts b/packages/plugins/free-auto-layout-plugin/src/layout/store.ts index 393cb4d7..357ee615 100644 --- a/packages/plugins/free-auto-layout-plugin/src/layout/store.ts +++ b/packages/plugins/free-auto-layout-plugin/src/layout/store.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowLineEntity, WorkflowNodeEntity, diff --git a/packages/plugins/free-auto-layout-plugin/src/layout/type.ts b/packages/plugins/free-auto-layout-plugin/src/layout/type.ts index f97bb93b..0818c469 100644 --- a/packages/plugins/free-auto-layout-plugin/src/layout/type.ts +++ b/packages/plugins/free-auto-layout-plugin/src/layout/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowLineEntity, WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import { LayoutStore } from './store'; diff --git a/packages/plugins/free-auto-layout-plugin/src/services.ts b/packages/plugins/free-auto-layout-plugin/src/services.ts index e3abc29d..24d51175 100644 --- a/packages/plugins/free-auto-layout-plugin/src/services.ts +++ b/packages/plugins/free-auto-layout-plugin/src/services.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { WorkflowDocument, diff --git a/packages/plugins/free-auto-layout-plugin/src/type.ts b/packages/plugins/free-auto-layout-plugin/src/type.ts index 6ec305d5..1a11a36a 100644 --- a/packages/plugins/free-auto-layout-plugin/src/type.ts +++ b/packages/plugins/free-auto-layout-plugin/src/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { LayoutConfig } from './layout/type'; export interface AutoLayoutOptions { diff --git a/packages/plugins/free-auto-layout-plugin/vitest.config.ts b/packages/plugins/free-auto-layout-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-auto-layout-plugin/vitest.config.ts +++ b/packages/plugins/free-auto-layout-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-auto-layout-plugin/vitest.setup.ts b/packages/plugins/free-auto-layout-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-auto-layout-plugin/vitest.setup.ts +++ b/packages/plugins/free-auto-layout-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/free-container-plugin/.eslintrc.js b/packages/plugins/free-container-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-container-plugin/.eslintrc.js +++ b/packages/plugins/free-container-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-container-plugin/src/index.ts b/packages/plugins/free-container-plugin/src/index.ts index def35a9c..27623a32 100644 --- a/packages/plugins/free-container-plugin/src/index.ts +++ b/packages/plugins/free-container-plugin/src/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './node-into-container'; export * from './sub-canvas'; diff --git a/packages/plugins/free-container-plugin/src/node-into-container/constant.ts b/packages/plugins/free-container-plugin/src/node-into-container/constant.ts index b834f121..68f653b8 100644 --- a/packages/plugins/free-container-plugin/src/node-into-container/constant.ts +++ b/packages/plugins/free-container-plugin/src/node-into-container/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum NodeIntoContainerType { In = 'in', Out = 'out', diff --git a/packages/plugins/free-container-plugin/src/node-into-container/index.ts b/packages/plugins/free-container-plugin/src/node-into-container/index.ts index 941e23e8..d6ec220a 100644 --- a/packages/plugins/free-container-plugin/src/node-into-container/index.ts +++ b/packages/plugins/free-container-plugin/src/node-into-container/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { NodeIntoContainerType } from './constant'; export { NodeIntoContainerService } from './service'; export { diff --git a/packages/plugins/free-container-plugin/src/node-into-container/plugin.tsx b/packages/plugins/free-container-plugin/src/node-into-container/plugin.tsx index 0068735a..b8839481 100644 --- a/packages/plugins/free-container-plugin/src/node-into-container/plugin.tsx +++ b/packages/plugins/free-container-plugin/src/node-into-container/plugin.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import type { WorkflowContainerPluginOptions } from './type'; diff --git a/packages/plugins/free-container-plugin/src/node-into-container/service.ts b/packages/plugins/free-container-plugin/src/node-into-container/service.ts index ef5d5c33..223a7467 100644 --- a/packages/plugins/free-container-plugin/src/node-into-container/service.ts +++ b/packages/plugins/free-container-plugin/src/node-into-container/service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/no-non-null-assertion -- no need */ import { throttle } from 'lodash'; import { inject, injectable } from 'inversify'; diff --git a/packages/plugins/free-container-plugin/src/node-into-container/type.ts b/packages/plugins/free-container-plugin/src/node-into-container/type.ts index bd693ec4..22aa5cd6 100644 --- a/packages/plugins/free-container-plugin/src/node-into-container/type.ts +++ b/packages/plugins/free-container-plugin/src/node-into-container/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import type { FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/background/index.tsx b/packages/plugins/free-container-plugin/src/sub-canvas/components/background/index.tsx index bb395270..9181464f 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/background/index.tsx +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/background/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { type FC } from 'react'; import { useCurrentEntity } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/background/style.ts b/packages/plugins/free-container-plugin/src/sub-canvas/components/background/style.ts index 50a40e18..ecdea9c7 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/background/style.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/background/style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const SubCanvasBackgroundStyle = styled.div` diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/border/index.tsx b/packages/plugins/free-container-plugin/src/sub-canvas/components/border/index.tsx index 8bc5a982..6915f81e 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/border/index.tsx +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/border/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { CSSProperties, ReactNode, type FC } from 'react'; import { SubCanvasBorderStyle } from './style'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/border/style.ts b/packages/plugins/free-container-plugin/src/sub-canvas/components/border/style.ts index 7f4b5f58..354fda59 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/border/style.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/border/style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const SubCanvasBorderStyle = styled.div` diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/index.ts b/packages/plugins/free-container-plugin/src/sub-canvas/components/index.ts index fb5fd564..401ca9a6 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/index.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { SubCanvasBackground } from './background'; export { SubCanvasBorder } from './border'; export { SubCanvasRender } from './render'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/render/index.tsx b/packages/plugins/free-container-plugin/src/sub-canvas/components/render/index.tsx index e7e08d76..cedaae27 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/render/index.tsx +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/render/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { CSSProperties, type FC } from 'react'; import { SubCanvasRenderStyle } from './style'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/render/style.ts b/packages/plugins/free-container-plugin/src/sub-canvas/components/render/style.ts index 4031a7d0..fd3ab11c 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/render/style.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/render/style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const SubCanvasRenderStyle = styled.div` diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/global-store.ts b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/global-store.ts index 8e4783fd..6c993241 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/global-store.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/global-store.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention -- no need */ const STORAGE_KEY = 'workflow-move-into-sub-canvas-tip-visible'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/icon-close.tsx b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/icon-close.tsx index 3f1d4d5d..4a14b212 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/icon-close.tsx +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/icon-close.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; export const IconClose = () => ( diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/index.tsx b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/index.tsx index 676a7bf3..dee164a3 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/index.tsx +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { I18n } from '@flowgram.ai/i18n'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/is-mac-os.ts b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/is-mac-os.ts index d0bb76ae..d68cf994 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/is-mac-os.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/is-mac-os.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const isMacOS = /(Macintosh|MacIntel|MacPPC|Mac68K|iPad)/.test(navigator.userAgent); diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/style.ts b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/style.ts index e4c1f926..a0a1a846 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/style.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const SubCanvasTipsStyle = styled.div` diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/use-control.ts b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/use-control.ts index 5651fbb1..758d3727 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/use-control.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/components/tips/use-control.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useEffect, useState } from 'react'; import { useCurrentEntity } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/hooks/index.ts b/packages/plugins/free-container-plugin/src/sub-canvas/hooks/index.ts index 9fe17f7f..a89ced59 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/hooks/index.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/hooks/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { NodeSize, useNodeSize } from './use-node-size'; export { useSyncNodeRenderSize } from './use-sync-node-render-size'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/hooks/use-node-size.ts b/packages/plugins/free-container-plugin/src/sub-canvas/hooks/use-node-size.ts index fe525830..5aaeb18c 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/hooks/use-node-size.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/hooks/use-node-size.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useState, useEffect } from 'react'; import { diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/hooks/use-sync-node-render-size.ts b/packages/plugins/free-container-plugin/src/sub-canvas/hooks/use-sync-node-render-size.ts index e08fff1a..72cce003 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/hooks/use-sync-node-render-size.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/hooks/use-sync-node-render-size.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useLayoutEffect } from 'react'; import { useCurrentEntity } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-container-plugin/src/sub-canvas/index.ts b/packages/plugins/free-container-plugin/src/sub-canvas/index.ts index 9330290d..75312328 100644 --- a/packages/plugins/free-container-plugin/src/sub-canvas/index.ts +++ b/packages/plugins/free-container-plugin/src/sub-canvas/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './hooks'; export * from './components'; diff --git a/packages/plugins/free-container-plugin/vitest.config.ts b/packages/plugins/free-container-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-container-plugin/vitest.config.ts +++ b/packages/plugins/free-container-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-container-plugin/vitest.setup.ts b/packages/plugins/free-container-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-container-plugin/vitest.setup.ts +++ b/packages/plugins/free-container-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/free-group-plugin/.eslintrc.js b/packages/plugins/free-group-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-group-plugin/.eslintrc.js +++ b/packages/plugins/free-group-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-group-plugin/src/constant.ts b/packages/plugins/free-group-plugin/src/constant.ts index 54652f05..a88b2f83 100644 --- a/packages/plugins/free-group-plugin/src/constant.ts +++ b/packages/plugins/free-group-plugin/src/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum WorkflowGroupCommand { Group = 'group', Ungroup = 'ungroup', diff --git a/packages/plugins/free-group-plugin/src/create-free-group-plugin.tsx b/packages/plugins/free-group-plugin/src/create-free-group-plugin.tsx index 2094fe7f..cc7f983a 100644 --- a/packages/plugins/free-group-plugin/src/create-free-group-plugin.tsx +++ b/packages/plugins/free-group-plugin/src/create-free-group-plugin.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ShortcutsRegistry } from '@flowgram.ai/shortcuts-plugin'; import { FlowRendererRegistry } from '@flowgram.ai/renderer'; import { WorkflowDocument } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-group-plugin/src/group-node.tsx b/packages/plugins/free-group-plugin/src/group-node.tsx index ed5db57a..63b2fe90 100644 --- a/packages/plugins/free-group-plugin/src/group-node.tsx +++ b/packages/plugins/free-group-plugin/src/group-node.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PositionSchema } from '@flowgram.ai/utils'; import { WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import { FlowNodeRegistry, FlowNodeBaseType, FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-group-plugin/src/index.ts b/packages/plugins/free-group-plugin/src/index.ts index 77f9a7ce..bfa99bb5 100644 --- a/packages/plugins/free-group-plugin/src/index.ts +++ b/packages/plugins/free-group-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createFreeGroupPlugin } from './create-free-group-plugin'; export { WorkflowGroupService } from './workflow-group-service'; export { WorkflowGroupCommand } from './constant'; diff --git a/packages/plugins/free-group-plugin/src/shortcuts/group.ts b/packages/plugins/free-group-plugin/src/shortcuts/group.ts index e63d02b6..7f2c7e21 100644 --- a/packages/plugins/free-group-plugin/src/shortcuts/group.ts +++ b/packages/plugins/free-group-plugin/src/shortcuts/group.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ShortcutsHandler } from '@flowgram.ai/shortcuts-plugin'; import { WorkflowSelectService } from '@flowgram.ai/free-layout-core'; import { PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-group-plugin/src/shortcuts/index.ts b/packages/plugins/free-group-plugin/src/shortcuts/index.ts index b178eda5..abbf89b1 100644 --- a/packages/plugins/free-group-plugin/src/shortcuts/index.ts +++ b/packages/plugins/free-group-plugin/src/shortcuts/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { GroupShortcut } from './group'; export { UngroupShortcut } from './ungroup'; diff --git a/packages/plugins/free-group-plugin/src/shortcuts/ungroup.ts b/packages/plugins/free-group-plugin/src/shortcuts/ungroup.ts index 8d7d1e12..2ac20738 100644 --- a/packages/plugins/free-group-plugin/src/shortcuts/ungroup.ts +++ b/packages/plugins/free-group-plugin/src/shortcuts/ungroup.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ShortcutsHandler } from '@flowgram.ai/shortcuts-plugin'; import { WorkflowSelectService, WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import { FlowNodeBaseType } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-group-plugin/src/type.ts b/packages/plugins/free-group-plugin/src/type.ts index fadb3e8d..a4247d45 100644 --- a/packages/plugins/free-group-plugin/src/type.ts +++ b/packages/plugins/free-group-plugin/src/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC } from 'react'; import { WorkflowNodeEntity, WorkflowNodeJSON } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-group-plugin/src/utils.ts b/packages/plugins/free-group-plugin/src/utils.ts index 1f1572ce..2f83031f 100644 --- a/packages/plugins/free-group-plugin/src/utils.ts +++ b/packages/plugins/free-group-plugin/src/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import { FlowNodeBaseType } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-group-plugin/src/workflow-group-service.ts b/packages/plugins/free-group-plugin/src/workflow-group-service.ts index 47bfd601..77adf227 100644 --- a/packages/plugins/free-group-plugin/src/workflow-group-service.ts +++ b/packages/plugins/free-group-plugin/src/workflow-group-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, inject } from 'inversify'; import { DisposableCollection, Disposable } from '@flowgram.ai/utils'; import { diff --git a/packages/plugins/free-group-plugin/vitest.config.ts b/packages/plugins/free-group-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-group-plugin/vitest.config.ts +++ b/packages/plugins/free-group-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-group-plugin/vitest.setup.ts b/packages/plugins/free-group-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-group-plugin/vitest.setup.ts +++ b/packages/plugins/free-group-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/free-history-plugin/.eslintrc.js b/packages/plugins/free-history-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-history-plugin/.eslintrc.js +++ b/packages/plugins/free-history-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-history-plugin/src/changes/add-line-change.ts b/packages/plugins/free-history-plugin/src/changes/add-line-change.ts index dc4a6bad..2ab9d952 100644 --- a/packages/plugins/free-history-plugin/src/changes/add-line-change.ts +++ b/packages/plugins/free-history-plugin/src/changes/add-line-change.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type WorkflowLineEntity } from '@flowgram.ai/free-layout-core'; import { WorkflowContentChangeType } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-history-plugin/src/changes/add-node-change.ts b/packages/plugins/free-history-plugin/src/changes/add-node-change.ts index 1d15495b..1dd4a693 100644 --- a/packages/plugins/free-history-plugin/src/changes/add-node-change.ts +++ b/packages/plugins/free-history-plugin/src/changes/add-node-change.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowDocument, type WorkflowNodeJSON } from '@flowgram.ai/free-layout-core'; import { WorkflowContentChangeType } from '@flowgram.ai/free-layout-core'; import { type FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-history-plugin/src/changes/delete-line-change.ts b/packages/plugins/free-history-plugin/src/changes/delete-line-change.ts index 096a11f7..11dc21af 100644 --- a/packages/plugins/free-history-plugin/src/changes/delete-line-change.ts +++ b/packages/plugins/free-history-plugin/src/changes/delete-line-change.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type WorkflowLineEntity } from '@flowgram.ai/free-layout-core'; import { WorkflowContentChangeType } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-history-plugin/src/changes/delete-node-change.ts b/packages/plugins/free-history-plugin/src/changes/delete-node-change.ts index d0e58fce..4a9e04c1 100644 --- a/packages/plugins/free-history-plugin/src/changes/delete-node-change.ts +++ b/packages/plugins/free-history-plugin/src/changes/delete-node-change.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowContentChangeType } from '@flowgram.ai/free-layout-core'; import { type FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-history-plugin/src/changes/index.ts b/packages/plugins/free-history-plugin/src/changes/index.ts index 77c18d36..c4b9f000 100644 --- a/packages/plugins/free-history-plugin/src/changes/index.ts +++ b/packages/plugins/free-history-plugin/src/changes/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { deleteNodeChange } from './delete-node-change'; import { deleteLineChange } from './delete-line-change'; import { addNodeChange } from './add-node-change'; diff --git a/packages/plugins/free-history-plugin/src/create-free-history-plugin.ts b/packages/plugins/free-history-plugin/src/create-free-history-plugin.ts index 6a4b6db5..79a9ffd1 100644 --- a/packages/plugins/free-history-plugin/src/create-free-history-plugin.ts +++ b/packages/plugins/free-history-plugin/src/create-free-history-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { bindContributions, definePluginCreator } from '@flowgram.ai/core'; import { HistoryContainerModule, OperationContribution } from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/src/free-history-config.ts b/packages/plugins/free-history-plugin/src/free-history-config.ts index ddc28b9d..3b131bf7 100644 --- a/packages/plugins/free-history-plugin/src/free-history-config.ts +++ b/packages/plugins/free-history-plugin/src/free-history-config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { type FlowNodeEntity, type FlowNodeJSON } from '@flowgram.ai/document'; import { type PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-history-plugin/src/free-history-manager.ts b/packages/plugins/free-history-plugin/src/free-history-manager.ts index 0fa5f702..b1139e5e 100644 --- a/packages/plugins/free-history-plugin/src/free-history-manager.ts +++ b/packages/plugins/free-history-plugin/src/free-history-manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention */ import { cloneDeep } from 'lodash'; import { injectable, inject, optional } from 'inversify'; diff --git a/packages/plugins/free-history-plugin/src/free-history-registers.ts b/packages/plugins/free-history-plugin/src/free-history-registers.ts index c08e0ba4..303702a3 100644 --- a/packages/plugins/free-history-plugin/src/free-history-registers.ts +++ b/packages/plugins/free-history-plugin/src/free-history-registers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { type OperationContribution, type OperationRegistry } from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/src/handlers/change-content-handler.ts b/packages/plugins/free-history-plugin/src/handlers/change-content-handler.ts index 43001e6a..8721125a 100644 --- a/packages/plugins/free-history-plugin/src/handlers/change-content-handler.ts +++ b/packages/plugins/free-history-plugin/src/handlers/change-content-handler.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention */ import { injectable, inject } from 'inversify'; import { HistoryService, Operation } from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/src/handlers/change-node-data-handler.ts b/packages/plugins/free-history-plugin/src/handlers/change-node-data-handler.ts index 566e4668..bf455566 100644 --- a/packages/plugins/free-history-plugin/src/handlers/change-node-data-handler.ts +++ b/packages/plugins/free-history-plugin/src/handlers/change-node-data-handler.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention */ import { cloneDeep, get, isEqual, set } from 'lodash'; import { injectable, inject } from 'inversify'; diff --git a/packages/plugins/free-history-plugin/src/handlers/drag-nodes-handler.ts b/packages/plugins/free-history-plugin/src/handlers/drag-nodes-handler.ts index 7ea10b75..ef49258a 100644 --- a/packages/plugins/free-history-plugin/src/handlers/drag-nodes-handler.ts +++ b/packages/plugins/free-history-plugin/src/handlers/drag-nodes-handler.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention */ import { injectable, inject } from 'inversify'; import { HistoryService } from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/src/history-entity-manager.ts b/packages/plugins/free-history-plugin/src/history-entity-manager.ts index 61418d23..6ffac10c 100644 --- a/packages/plugins/free-history-plugin/src/history-entity-manager.ts +++ b/packages/plugins/free-history-plugin/src/history-entity-manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention */ import { cloneDeep, isEqual } from 'lodash'; import { injectable } from 'inversify'; diff --git a/packages/plugins/free-history-plugin/src/hooks/index.ts b/packages/plugins/free-history-plugin/src/hooks/index.ts index 37ac73f6..993b78ef 100644 --- a/packages/plugins/free-history-plugin/src/hooks/index.ts +++ b/packages/plugins/free-history-plugin/src/hooks/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './use-undo-redo'; diff --git a/packages/plugins/free-history-plugin/src/hooks/use-undo-redo.tsx b/packages/plugins/free-history-plugin/src/hooks/use-undo-redo.tsx index d2f19051..55805b12 100644 --- a/packages/plugins/free-history-plugin/src/hooks/use-undo-redo.tsx +++ b/packages/plugins/free-history-plugin/src/hooks/use-undo-redo.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useState } from 'react'; import { useService } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-history-plugin/src/index.ts b/packages/plugins/free-history-plugin/src/index.ts index 4d0f02c7..18d88114 100644 --- a/packages/plugins/free-history-plugin/src/index.ts +++ b/packages/plugins/free-history-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-free-history-plugin'; export * from './types'; export * from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/add-line.ts b/packages/plugins/free-history-plugin/src/operation-metas/add-line.ts index 070a8e47..6475d640 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/add-line.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/add-line.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type PluginContext } from '@flowgram.ai/core'; import { WorkflowLinesManager } from '@flowgram.ai/free-layout-core'; import { type OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/add-node.ts b/packages/plugins/free-history-plugin/src/operation-metas/add-node.ts index 27208493..1a28a067 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/add-node.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/add-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { cloneDeep } from 'lodash'; import { type PluginContext } from '@flowgram.ai/core'; import { WorkflowDocument, type WorkflowNodeJSON } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/base.ts b/packages/plugins/free-history-plugin/src/operation-metas/base.ts index f130d321..fa177415 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/base.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/base.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type OperationMeta } from '@flowgram.ai/history'; export const baseOperationMeta: Partial = { diff --git a/packages/plugins/free-history-plugin/src/operation-metas/change-node-data.ts b/packages/plugins/free-history-plugin/src/operation-metas/change-node-data.ts index d4af9ebe..3f2b6456 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/change-node-data.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/change-node-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeFormData } from '@flowgram.ai/form-core'; import { type PluginContext } from '@flowgram.ai/core'; import { WorkflowDocument } from '@flowgram.ai/free-layout-core'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/delete-line.ts b/packages/plugins/free-history-plugin/src/operation-metas/delete-line.ts index 32c2a7b4..4ce36947 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/delete-line.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/delete-line.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type OperationMeta } from '@flowgram.ai/history'; import { WorkflowDocument } from '@flowgram.ai/free-layout-core'; import { type PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/delete-node.ts b/packages/plugins/free-history-plugin/src/operation-metas/delete-node.ts index f36cddc0..95c3b9fd 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/delete-node.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/delete-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type PluginContext } from '@flowgram.ai/core'; import { WorkflowDocument } from '@flowgram.ai/free-layout-core'; import { type OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/drag-nodes.ts b/packages/plugins/free-history-plugin/src/operation-metas/drag-nodes.ts index 9c059ec9..a516e2d0 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/drag-nodes.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/drag-nodes.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type OperationMeta } from '@flowgram.ai/history'; import { WorkflowDocument } from '@flowgram.ai/free-layout-core'; import { type PluginContext, TransformData } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/index.ts b/packages/plugins/free-history-plugin/src/operation-metas/index.ts index 62f96f1c..0a594d2d 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/index.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { resetLayoutOperationMeta } from './reset-layout'; import { moveChildNodesOperationMeta } from './move-child-nodes'; import { dragNodesOperationMeta } from './drag-nodes'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/move-child-nodes.ts b/packages/plugins/free-history-plugin/src/operation-metas/move-child-nodes.ts index f5f19854..ddfc06e7 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/move-child-nodes.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/move-child-nodes.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { OperationMeta } from '@flowgram.ai/history'; import { WorkflowDocument } from '@flowgram.ai/free-layout-core'; import { MoveChildNodesOperationValue, OperationType } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-history-plugin/src/operation-metas/reset-layout.ts b/packages/plugins/free-history-plugin/src/operation-metas/reset-layout.ts index c29f2fea..435d8b8c 100644 --- a/packages/plugins/free-history-plugin/src/operation-metas/reset-layout.ts +++ b/packages/plugins/free-history-plugin/src/operation-metas/reset-layout.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type PluginContext } from '@flowgram.ai/core'; import { WorkflowResetLayoutService } from '@flowgram.ai/free-layout-core'; import { type OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/src/types.ts b/packages/plugins/free-history-plugin/src/types.ts index b6f02ed1..7c652068 100644 --- a/packages/plugins/free-history-plugin/src/types.ts +++ b/packages/plugins/free-history-plugin/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable @typescript-eslint/naming-convention */ import { type IPoint } from '@flowgram.ai/utils'; import { type Operation, type OperationMeta } from '@flowgram.ai/history'; diff --git a/packages/plugins/free-history-plugin/vitest.config.ts b/packages/plugins/free-history-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-history-plugin/vitest.config.ts +++ b/packages/plugins/free-history-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-history-plugin/vitest.setup.ts b/packages/plugins/free-history-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-history-plugin/vitest.setup.ts +++ b/packages/plugins/free-history-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/free-hover-plugin/.eslintrc.js b/packages/plugins/free-hover-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-hover-plugin/.eslintrc.js +++ b/packages/plugins/free-hover-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-hover-plugin/src/create-free-hover-plugin.ts b/packages/plugins/free-hover-plugin/src/create-free-hover-plugin.ts index 66d92d42..c25fa12e 100644 --- a/packages/plugins/free-hover-plugin/src/create-free-hover-plugin.ts +++ b/packages/plugins/free-hover-plugin/src/create-free-hover-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { HoverLayer } from './hover-layer'; diff --git a/packages/plugins/free-hover-plugin/src/hover-layer.tsx b/packages/plugins/free-hover-plugin/src/hover-layer.tsx index 1444c938..3bc91611 100644 --- a/packages/plugins/free-hover-plugin/src/hover-layer.tsx +++ b/packages/plugins/free-hover-plugin/src/hover-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable complexity */ import { inject, injectable } from 'inversify'; import { type IPoint } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-hover-plugin/src/index.ts b/packages/plugins/free-hover-plugin/src/index.ts index 8337520c..39651f23 100644 --- a/packages/plugins/free-hover-plugin/src/index.ts +++ b/packages/plugins/free-hover-plugin/src/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-free-hover-plugin'; diff --git a/packages/plugins/free-hover-plugin/src/selection-utils.ts b/packages/plugins/free-hover-plugin/src/selection-utils.ts index 2e46d014..cbcf27f5 100644 --- a/packages/plugins/free-hover-plugin/src/selection-utils.ts +++ b/packages/plugins/free-hover-plugin/src/selection-utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Rectangle } from '@flowgram.ai/utils'; import { WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import { FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-hover-plugin/vitest.config.ts b/packages/plugins/free-hover-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-hover-plugin/vitest.config.ts +++ b/packages/plugins/free-hover-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-hover-plugin/vitest.setup.ts b/packages/plugins/free-hover-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-hover-plugin/vitest.setup.ts +++ b/packages/plugins/free-hover-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/free-lines-plugin/.eslintrc.js b/packages/plugins/free-lines-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-lines-plugin/.eslintrc.js +++ b/packages/plugins/free-lines-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-lines-plugin/src/components/index.ts b/packages/plugins/free-lines-plugin/src/components/index.ts index 58ef7a2f..d3d0e723 100644 --- a/packages/plugins/free-lines-plugin/src/components/index.ts +++ b/packages/plugins/free-lines-plugin/src/components/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowPortRenderProps, WorkflowPortRender } from './workflow-port-render'; export { WorkflowLineRender } from './workflow-line-render'; diff --git a/packages/plugins/free-lines-plugin/src/components/workflow-line-render/arrow.tsx b/packages/plugins/free-lines-plugin/src/components/workflow-line-render/arrow.tsx index 99b43a44..a19f15b8 100644 --- a/packages/plugins/free-lines-plugin/src/components/workflow-line-render/arrow.tsx +++ b/packages/plugins/free-lines-plugin/src/components/workflow-line-render/arrow.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { type ArrowRendererProps } from '../../types/arrow-renderer'; diff --git a/packages/plugins/free-lines-plugin/src/components/workflow-line-render/index.style.ts b/packages/plugins/free-lines-plugin/src/components/workflow-line-render/index.style.ts index 993d8614..17bca22f 100644 --- a/packages/plugins/free-lines-plugin/src/components/workflow-line-render/index.style.ts +++ b/packages/plugins/free-lines-plugin/src/components/workflow-line-render/index.style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; // 添加一个固定类名,用于选中该节点 diff --git a/packages/plugins/free-lines-plugin/src/components/workflow-line-render/index.tsx b/packages/plugins/free-lines-plugin/src/components/workflow-line-render/index.tsx index 7191bfbf..45e58021 100644 --- a/packages/plugins/free-lines-plugin/src/components/workflow-line-render/index.tsx +++ b/packages/plugins/free-lines-plugin/src/components/workflow-line-render/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { memo } from 'react'; import { LineSVG } from './line-svg'; diff --git a/packages/plugins/free-lines-plugin/src/components/workflow-line-render/line-svg.tsx b/packages/plugins/free-lines-plugin/src/components/workflow-line-render/line-svg.tsx index 862cc807..3e758ccf 100644 --- a/packages/plugins/free-lines-plugin/src/components/workflow-line-render/line-svg.tsx +++ b/packages/plugins/free-lines-plugin/src/components/workflow-line-render/line-svg.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import clsx from 'clsx'; diff --git a/packages/plugins/free-lines-plugin/src/components/workflow-port-render/cross-hair.tsx b/packages/plugins/free-lines-plugin/src/components/workflow-port-render/cross-hair.tsx index 1d2f2221..f15e6d7d 100644 --- a/packages/plugins/free-lines-plugin/src/components/workflow-port-render/cross-hair.tsx +++ b/packages/plugins/free-lines-plugin/src/components/workflow-port-render/cross-hair.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; // demo 环境自绘 cross-hair,正式环境使用 IconAdd diff --git a/packages/plugins/free-lines-plugin/src/components/workflow-port-render/index.tsx b/packages/plugins/free-lines-plugin/src/components/workflow-port-render/index.tsx index b0b0f014..937cebbb 100644 --- a/packages/plugins/free-lines-plugin/src/components/workflow-port-render/index.tsx +++ b/packages/plugins/free-lines-plugin/src/components/workflow-port-render/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import ReactDOM from 'react-dom'; import React, { useEffect, useState } from 'react'; diff --git a/packages/plugins/free-lines-plugin/src/components/workflow-port-render/style.ts b/packages/plugins/free-lines-plugin/src/components/workflow-port-render/style.ts index fe153509..57ef8e56 100644 --- a/packages/plugins/free-lines-plugin/src/components/workflow-port-render/style.ts +++ b/packages/plugins/free-lines-plugin/src/components/workflow-port-render/style.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import styled from 'styled-components'; export const WorkflowPointStyle = styled.div` diff --git a/packages/plugins/free-lines-plugin/src/constants/lines.ts b/packages/plugins/free-lines-plugin/src/constants/lines.ts index b6f85968..26c09d7f 100644 --- a/packages/plugins/free-lines-plugin/src/constants/lines.ts +++ b/packages/plugins/free-lines-plugin/src/constants/lines.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // 箭头宽度 export const LINE_OFFSET = 6; diff --git a/packages/plugins/free-lines-plugin/src/constants/points.ts b/packages/plugins/free-lines-plugin/src/constants/points.ts index fc42c8de..5fe884ab 100644 --- a/packages/plugins/free-lines-plugin/src/constants/points.ts +++ b/packages/plugins/free-lines-plugin/src/constants/points.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // 连接点半径 export const STROKE_WIDTH_SLECTED = 3; diff --git a/packages/plugins/free-lines-plugin/src/contributions/arc/index.ts b/packages/plugins/free-lines-plugin/src/contributions/arc/index.ts index 7cde51d0..1915fcc7 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/arc/index.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/arc/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Point, Rectangle } from '@flowgram.ai/utils'; import { POINT_RADIUS, diff --git a/packages/plugins/free-lines-plugin/src/contributions/bezier/bezier-controls.test.ts b/packages/plugins/free-lines-plugin/src/contributions/bezier/bezier-controls.test.ts index ffed8f85..a629e3cf 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/bezier/bezier-controls.test.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/bezier/bezier-controls.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { IPoint } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-lines-plugin/src/contributions/bezier/bezier-controls.ts b/packages/plugins/free-lines-plugin/src/contributions/bezier/bezier-controls.ts index bba0d917..14327579 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/bezier/bezier-controls.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/bezier/bezier-controls.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type IPoint, Rectangle } from '@flowgram.ai/utils'; export enum BezierControlType { diff --git a/packages/plugins/free-lines-plugin/src/contributions/bezier/index.ts b/packages/plugins/free-lines-plugin/src/contributions/bezier/index.ts index 3b7593d2..6fb07d54 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/bezier/index.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/bezier/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { BezierControlType, getBezierHorizontalControlPoints, diff --git a/packages/plugins/free-lines-plugin/src/contributions/fold/fold-line.ts b/packages/plugins/free-lines-plugin/src/contributions/fold/fold-line.ts index 9a88f29e..d0c47f09 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/fold/fold-line.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/fold/fold-line.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type IPoint, Point, Rectangle } from '@flowgram.ai/utils'; /** diff --git a/packages/plugins/free-lines-plugin/src/contributions/fold/index.ts b/packages/plugins/free-lines-plugin/src/contributions/fold/index.ts index 659a6ad4..c0b33245 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/fold/index.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/fold/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Rectangle } from '@flowgram.ai/utils'; import { POINT_RADIUS, diff --git a/packages/plugins/free-lines-plugin/src/contributions/index.ts b/packages/plugins/free-lines-plugin/src/contributions/index.ts index b18af2e0..35df478f 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/index.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './bezier'; export * from './fold'; export * from './straight'; diff --git a/packages/plugins/free-lines-plugin/src/contributions/manhattan/index.ts b/packages/plugins/free-lines-plugin/src/contributions/manhattan/index.ts index d669d1b1..f4e93bcb 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/manhattan/index.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/manhattan/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Point, Rectangle } from '@flowgram.ai/utils'; import { POINT_RADIUS, diff --git a/packages/plugins/free-lines-plugin/src/contributions/straight/index.ts b/packages/plugins/free-lines-plugin/src/contributions/straight/index.ts index 5c95033f..3c7db619 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/straight/index.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/straight/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Point, Rectangle } from '@flowgram.ai/utils'; import { POINT_RADIUS, diff --git a/packages/plugins/free-lines-plugin/src/contributions/straight/point-on-line.ts b/packages/plugins/free-lines-plugin/src/contributions/straight/point-on-line.ts index 46c2b97b..124410eb 100644 --- a/packages/plugins/free-lines-plugin/src/contributions/straight/point-on-line.ts +++ b/packages/plugins/free-lines-plugin/src/contributions/straight/point-on-line.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Rectangle } from '@flowgram.ai/utils'; export interface StraightData { diff --git a/packages/plugins/free-lines-plugin/src/create-free-lines-plugin.ts b/packages/plugins/free-lines-plugin/src/create-free-lines-plugin.ts index 5a049b7f..d9517321 100644 --- a/packages/plugins/free-lines-plugin/src/create-free-lines-plugin.ts +++ b/packages/plugins/free-lines-plugin/src/create-free-lines-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowLinesManager } from '@flowgram.ai/free-layout-core'; import { definePluginCreator, PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-lines-plugin/src/index.ts b/packages/plugins/free-lines-plugin/src/index.ts index dce2c27b..fed252f0 100644 --- a/packages/plugins/free-lines-plugin/src/index.ts +++ b/packages/plugins/free-lines-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './components/workflow-port-render'; export * from './constants/lines'; export * from './create-free-lines-plugin'; diff --git a/packages/plugins/free-lines-plugin/src/layer/index.ts b/packages/plugins/free-lines-plugin/src/layer/index.ts index 8a8281e5..6e0d88b2 100644 --- a/packages/plugins/free-lines-plugin/src/layer/index.ts +++ b/packages/plugins/free-lines-plugin/src/layer/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowLinesLayer } from './workflow-lines-layer'; export { WorkflowLinesLayer as LinesLayer, WorkflowLinesLayer }; diff --git a/packages/plugins/free-lines-plugin/src/layer/workflow-lines-layer.tsx b/packages/plugins/free-lines-plugin/src/layer/workflow-lines-layer.tsx index 5df4a7ff..13e83744 100644 --- a/packages/plugins/free-lines-plugin/src/layer/workflow-lines-layer.tsx +++ b/packages/plugins/free-lines-plugin/src/layer/workflow-lines-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import ReactDOM from 'react-dom'; import React, { ReactNode, useLayoutEffect, useState } from 'react'; diff --git a/packages/plugins/free-lines-plugin/src/type.ts b/packages/plugins/free-lines-plugin/src/type.ts index 9edfdcf5..5a892ca0 100644 --- a/packages/plugins/free-lines-plugin/src/type.ts +++ b/packages/plugins/free-lines-plugin/src/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FC, ReactNode } from 'react'; import { type FlowRendererRegistry } from '@flowgram.ai/renderer'; diff --git a/packages/plugins/free-lines-plugin/src/types/arrow-renderer.ts b/packages/plugins/free-lines-plugin/src/types/arrow-renderer.ts index bbd334ef..1b911f86 100644 --- a/packages/plugins/free-lines-plugin/src/types/arrow-renderer.ts +++ b/packages/plugins/free-lines-plugin/src/types/arrow-renderer.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { type IPoint } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-lines-plugin/vitest.config.ts b/packages/plugins/free-lines-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-lines-plugin/vitest.config.ts +++ b/packages/plugins/free-lines-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-lines-plugin/vitest.setup.ts b/packages/plugins/free-lines-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-lines-plugin/vitest.setup.ts +++ b/packages/plugins/free-lines-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/free-node-panel-plugin/.eslintrc.js b/packages/plugins/free-node-panel-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-node-panel-plugin/.eslintrc.js +++ b/packages/plugins/free-node-panel-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-node-panel-plugin/src/component.tsx b/packages/plugins/free-node-panel-plugin/src/component.tsx index 23374282..9ed943a6 100644 --- a/packages/plugins/free-node-panel-plugin/src/component.tsx +++ b/packages/plugins/free-node-panel-plugin/src/component.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { FC, ReactNode, useEffect, useRef } from 'react'; import { PositionSchema } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-node-panel-plugin/src/create-plugin.ts b/packages/plugins/free-node-panel-plugin/src/create-plugin.ts index 2bfc2da0..aefd64ac 100644 --- a/packages/plugins/free-node-panel-plugin/src/create-plugin.ts +++ b/packages/plugins/free-node-panel-plugin/src/create-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator, type PluginBindConfig, type PluginContext } from '@flowgram.ai/core'; import { NodePanelPluginOptions } from './type'; diff --git a/packages/plugins/free-node-panel-plugin/src/index.ts b/packages/plugins/free-node-panel-plugin/src/index.ts index 15f2238c..9a8da081 100644 --- a/packages/plugins/free-node-panel-plugin/src/index.ts +++ b/packages/plugins/free-node-panel-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createFreeNodePanelPlugin } from './create-plugin'; export { WorkflowNodePanelService } from './service'; export type { diff --git a/packages/plugins/free-node-panel-plugin/src/layer.tsx b/packages/plugins/free-node-panel-plugin/src/layer.tsx index 554551f6..5495834c 100644 --- a/packages/plugins/free-node-panel-plugin/src/layer.tsx +++ b/packages/plugins/free-node-panel-plugin/src/layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable react/no-deprecated */ import React from 'react'; diff --git a/packages/plugins/free-node-panel-plugin/src/service.ts b/packages/plugins/free-node-panel-plugin/src/service.ts index 16367db1..b4676793 100644 --- a/packages/plugins/free-node-panel-plugin/src/service.ts +++ b/packages/plugins/free-node-panel-plugin/src/service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { DisposableCollection } from '@flowgram.ai/utils'; import type { PositionSchema } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-node-panel-plugin/src/type.ts b/packages/plugins/free-node-panel-plugin/src/type.ts index 0a153d3c..3bf47481 100644 --- a/packages/plugins/free-node-panel-plugin/src/type.ts +++ b/packages/plugins/free-node-panel-plugin/src/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type React from 'react'; import type { PositionSchema } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-node-panel-plugin/src/utils/adjust-node-position.ts b/packages/plugins/free-node-panel-plugin/src/utils/adjust-node-position.ts index 609f1270..0e392347 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/adjust-node-position.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/adjust-node-position.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PositionSchema } from '@flowgram.ai/utils'; import { WorkflowDocument, diff --git a/packages/plugins/free-node-panel-plugin/src/utils/build-line.ts b/packages/plugins/free-node-panel-plugin/src/utils/build-line.ts index 15e82bd3..b96230b9 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/build-line.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/build-line.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowLinesManager, WorkflowNodeEntity, diff --git a/packages/plugins/free-node-panel-plugin/src/utils/get-container-node.ts b/packages/plugins/free-node-panel-plugin/src/utils/get-container-node.ts index ec12393b..bdffba73 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/get-container-node.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/get-container-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeEntity, WorkflowPortEntity } from '@flowgram.ai/free-layout-core'; import { isContainer } from './is-container'; diff --git a/packages/plugins/free-node-panel-plugin/src/utils/get-port-box.ts b/packages/plugins/free-node-panel-plugin/src/utils/get-port-box.ts index 5d144098..f21a4176 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/get-port-box.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/get-port-box.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Rectangle } from '@flowgram.ai/utils'; import { WorkflowPortEntity } from '@flowgram.ai/free-layout-core'; import { FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-node-panel-plugin/src/utils/get-sub-nodes.ts b/packages/plugins/free-node-panel-plugin/src/utils/get-sub-nodes.ts index 5ad51add..63b59700 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/get-sub-nodes.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/get-sub-nodes.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeEntity, WorkflowLinesManager } from '@flowgram.ai/free-layout-core'; import { isContainer } from './is-container'; diff --git a/packages/plugins/free-node-panel-plugin/src/utils/greater-or-less.ts b/packages/plugins/free-node-panel-plugin/src/utils/greater-or-less.ts index b0a6e0ac..ddcb1c65 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/greater-or-less.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/greater-or-less.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /** * 检查 a 是否大于 b,考虑浮点数精度问题 * @param a 第一个数 diff --git a/packages/plugins/free-node-panel-plugin/src/utils/index.ts b/packages/plugins/free-node-panel-plugin/src/utils/index.ts index 037b90e3..0fad5ced 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/index.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IWaitNodeRender, waitNodeRender } from './wait-node-render'; import { updateSubSequentNodesPosition, diff --git a/packages/plugins/free-node-panel-plugin/src/utils/is-container.ts b/packages/plugins/free-node-panel-plugin/src/utils/is-container.ts index 126048ed..86f8c6c5 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/is-container.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/is-container.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeEntity, WorkflowNodeMeta } from '@flowgram.ai/free-layout-core'; /** 是否容器节点 */ diff --git a/packages/plugins/free-node-panel-plugin/src/utils/rect-distance.ts b/packages/plugins/free-node-panel-plugin/src/utils/rect-distance.ts index 6195afb6..df4c3a72 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/rect-distance.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/rect-distance.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Rectangle, IPoint } from '@flowgram.ai/utils'; export type IRectDistance = (rectA: Rectangle, rectB: Rectangle) => IPoint; diff --git a/packages/plugins/free-node-panel-plugin/src/utils/sub-nodes-auto-offset.ts b/packages/plugins/free-node-panel-plugin/src/utils/sub-nodes-auto-offset.ts index 750ca57c..cd24f322 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/sub-nodes-auto-offset.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/sub-nodes-auto-offset.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowDragService, WorkflowLinesManager, diff --git a/packages/plugins/free-node-panel-plugin/src/utils/sub-position-offset.ts b/packages/plugins/free-node-panel-plugin/src/utils/sub-position-offset.ts index 16faa758..59f6c85c 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/sub-position-offset.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/sub-position-offset.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, Rectangle } from '@flowgram.ai/utils'; import { WorkflowNodeEntity, WorkflowPortEntity } from '@flowgram.ai/free-layout-core'; import { FlowNodeTransformData } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-node-panel-plugin/src/utils/update-sub-nodes-position.ts b/packages/plugins/free-node-panel-plugin/src/utils/update-sub-nodes-position.ts index 16c2394a..19e4bf98 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/update-sub-nodes-position.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/update-sub-nodes-position.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, PositionSchema } from '@flowgram.ai/utils'; import { WorkflowNodeEntity, diff --git a/packages/plugins/free-node-panel-plugin/src/utils/wait-node-render.ts b/packages/plugins/free-node-panel-plugin/src/utils/wait-node-render.ts index c191a079..f3cac87e 100644 --- a/packages/plugins/free-node-panel-plugin/src/utils/wait-node-render.ts +++ b/packages/plugins/free-node-panel-plugin/src/utils/wait-node-render.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { delay } from '@flowgram.ai/free-layout-core'; export type IWaitNodeRender = () => Promise; diff --git a/packages/plugins/free-node-panel-plugin/vitest.config.ts b/packages/plugins/free-node-panel-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-node-panel-plugin/vitest.config.ts +++ b/packages/plugins/free-node-panel-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-node-panel-plugin/vitest.setup.ts b/packages/plugins/free-node-panel-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-node-panel-plugin/vitest.setup.ts +++ b/packages/plugins/free-node-panel-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/free-snap-plugin/.eslintrc.js b/packages/plugins/free-snap-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-snap-plugin/.eslintrc.js +++ b/packages/plugins/free-snap-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-snap-plugin/src/constant.ts b/packages/plugins/free-snap-plugin/src/constant.ts index f52ab02f..053d7e81 100644 --- a/packages/plugins/free-snap-plugin/src/constant.ts +++ b/packages/plugins/free-snap-plugin/src/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowSnapLayerOptions, WorkflowSnapServiceOptions } from './type'; export const SnapDefaultOptions: WorkflowSnapServiceOptions & WorkflowSnapLayerOptions = { diff --git a/packages/plugins/free-snap-plugin/src/create-plugin.ts b/packages/plugins/free-snap-plugin/src/create-plugin.ts index ce7c9da6..9b393eb7 100644 --- a/packages/plugins/free-snap-plugin/src/create-plugin.ts +++ b/packages/plugins/free-snap-plugin/src/create-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { diff --git a/packages/plugins/free-snap-plugin/src/index.ts b/packages/plugins/free-snap-plugin/src/index.ts index 26504538..35bd6658 100644 --- a/packages/plugins/free-snap-plugin/src/index.ts +++ b/packages/plugins/free-snap-plugin/src/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { createFreeSnapPlugin } from './create-plugin'; export { WorkflowSnapService } from './service'; diff --git a/packages/plugins/free-snap-plugin/src/layer.tsx b/packages/plugins/free-snap-plugin/src/layer.tsx index 89acf932..b7391b3e 100644 --- a/packages/plugins/free-snap-plugin/src/layer.tsx +++ b/packages/plugins/free-snap-plugin/src/layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { inject, injectable } from 'inversify'; diff --git a/packages/plugins/free-snap-plugin/src/service.ts b/packages/plugins/free-snap-plugin/src/service.ts index f1343f41..5be8298a 100644 --- a/packages/plugins/free-snap-plugin/src/service.ts +++ b/packages/plugins/free-snap-plugin/src/service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { Disposable, Emitter, Rectangle } from '@flowgram.ai/utils'; import { IPoint } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-snap-plugin/src/type.ts b/packages/plugins/free-snap-plugin/src/type.ts index 25059e47..0d6bc072 100644 --- a/packages/plugins/free-snap-plugin/src/type.ts +++ b/packages/plugins/free-snap-plugin/src/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import type { Rectangle } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-snap-plugin/src/utils.ts b/packages/plugins/free-snap-plugin/src/utils.ts index 5c36d43a..0e0fa6f2 100644 --- a/packages/plugins/free-snap-plugin/src/utils.ts +++ b/packages/plugins/free-snap-plugin/src/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Epsilon } from './constant'; /** 检查浮点数 a 是否等于 b */ diff --git a/packages/plugins/free-snap-plugin/vitest.config.ts b/packages/plugins/free-snap-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-snap-plugin/vitest.config.ts +++ b/packages/plugins/free-snap-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-snap-plugin/vitest.setup.ts b/packages/plugins/free-snap-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-snap-plugin/vitest.setup.ts +++ b/packages/plugins/free-snap-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/free-stack-plugin/.eslintrc.js b/packages/plugins/free-stack-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/free-stack-plugin/.eslintrc.js +++ b/packages/plugins/free-stack-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/free-stack-plugin/__tests__/computing.test.ts b/packages/plugins/free-stack-plugin/__tests__/computing.test.ts index fd3f0730..7cca2d58 100644 --- a/packages/plugins/free-stack-plugin/__tests__/computing.test.ts +++ b/packages/plugins/free-stack-plugin/__tests__/computing.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { it, expect, beforeEach, describe } from 'vitest'; import { interfaces } from 'inversify'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-stack-plugin/__tests__/manager.test.ts b/packages/plugins/free-stack-plugin/__tests__/manager.test.ts index daceeee8..1565e9d2 100644 --- a/packages/plugins/free-stack-plugin/__tests__/manager.test.ts +++ b/packages/plugins/free-stack-plugin/__tests__/manager.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { it, expect, beforeEach, describe, vi } from 'vitest'; import { debounce } from 'lodash'; import { interfaces } from 'inversify'; diff --git a/packages/plugins/free-stack-plugin/__tests__/type.mock.ts b/packages/plugins/free-stack-plugin/__tests__/type.mock.ts index 0f82c130..32b89bc9 100644 --- a/packages/plugins/free-stack-plugin/__tests__/type.mock.ts +++ b/packages/plugins/free-stack-plugin/__tests__/type.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { EntityManager, PipelineRegistry, PipelineRenderer } from '@flowgram.ai/core'; import type { WorkflowDocument, diff --git a/packages/plugins/free-stack-plugin/__tests__/utils.mock.ts b/packages/plugins/free-stack-plugin/__tests__/utils.mock.ts index c00eb5cc..7c4fb8fc 100644 --- a/packages/plugins/free-stack-plugin/__tests__/utils.mock.ts +++ b/packages/plugins/free-stack-plugin/__tests__/utils.mock.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { WorkflowJSON, diff --git a/packages/plugins/free-stack-plugin/src/constant.ts b/packages/plugins/free-stack-plugin/src/constant.ts index dbea7c9a..15e34723 100644 --- a/packages/plugins/free-stack-plugin/src/constant.ts +++ b/packages/plugins/free-stack-plugin/src/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum StackingItem { Line = 'line', Node = 'node', diff --git a/packages/plugins/free-stack-plugin/src/create-free-stack-plugin.ts b/packages/plugins/free-stack-plugin/src/create-free-stack-plugin.ts index e2e44f88..bba36c37 100644 --- a/packages/plugins/free-stack-plugin/src/create-free-stack-plugin.ts +++ b/packages/plugins/free-stack-plugin/src/create-free-stack-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { StackingContextManager } from './manager'; diff --git a/packages/plugins/free-stack-plugin/src/index.ts b/packages/plugins/free-stack-plugin/src/index.ts index 5111a667..7d4456d2 100644 --- a/packages/plugins/free-stack-plugin/src/index.ts +++ b/packages/plugins/free-stack-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-free-stack-plugin'; export * from './manager'; export * from './constant'; diff --git a/packages/plugins/free-stack-plugin/src/layers-computing.ts b/packages/plugins/free-stack-plugin/src/layers-computing.ts index 070853b4..0fe5d993 100644 --- a/packages/plugins/free-stack-plugin/src/layers-computing.ts +++ b/packages/plugins/free-stack-plugin/src/layers-computing.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowNodeEntity } from '@flowgram.ai/free-layout-core'; import type { WorkflowLineEntity } from '@flowgram.ai/free-layout-core'; import { FlowNodeRenderData } from '@flowgram.ai/document'; diff --git a/packages/plugins/free-stack-plugin/src/manager.ts b/packages/plugins/free-stack-plugin/src/manager.ts index 816a5e2c..a40a0dcd 100644 --- a/packages/plugins/free-stack-plugin/src/manager.ts +++ b/packages/plugins/free-stack-plugin/src/manager.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { debounce } from 'lodash'; import { inject, injectable } from 'inversify'; import { domUtils } from '@flowgram.ai/utils'; diff --git a/packages/plugins/free-stack-plugin/src/stacking-computing.ts b/packages/plugins/free-stack-plugin/src/stacking-computing.ts index aa4013ec..b4f085ed 100644 --- a/packages/plugins/free-stack-plugin/src/stacking-computing.ts +++ b/packages/plugins/free-stack-plugin/src/stacking-computing.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowLineEntity, WorkflowNodeEntity, diff --git a/packages/plugins/free-stack-plugin/src/type.ts b/packages/plugins/free-stack-plugin/src/type.ts index 986fc087..84693502 100644 --- a/packages/plugins/free-stack-plugin/src/type.ts +++ b/packages/plugins/free-stack-plugin/src/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowEntityHoverable } from '@flowgram.ai/free-layout-core'; import type { Entity } from '@flowgram.ai/core'; diff --git a/packages/plugins/free-stack-plugin/vitest.config.ts b/packages/plugins/free-stack-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/free-stack-plugin/vitest.config.ts +++ b/packages/plugins/free-stack-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/free-stack-plugin/vitest.setup.ts b/packages/plugins/free-stack-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/free-stack-plugin/vitest.setup.ts +++ b/packages/plugins/free-stack-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/group-plugin/.eslintrc.js b/packages/plugins/group-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/group-plugin/.eslintrc.js +++ b/packages/plugins/group-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/group-plugin/src/components/group-box.tsx b/packages/plugins/group-plugin/src/components/group-box.tsx index 4ce8beba..2b42ad0f 100644 --- a/packages/plugins/group-plugin/src/components/group-box.tsx +++ b/packages/plugins/group-plugin/src/components/group-box.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable react/prop-types */ import { useEffect, type CSSProperties } from 'react'; import React from 'react'; diff --git a/packages/plugins/group-plugin/src/components/group-render.tsx b/packages/plugins/group-plugin/src/components/group-render.tsx index 310fc7fc..580f4a9b 100644 --- a/packages/plugins/group-plugin/src/components/group-render.tsx +++ b/packages/plugins/group-plugin/src/components/group-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable react/prop-types */ import React, { useCallback, useEffect, useState } from 'react'; diff --git a/packages/plugins/group-plugin/src/components/hooks.ts b/packages/plugins/group-plugin/src/components/hooks.ts index b01cc8aa..675d2717 100644 --- a/packages/plugins/group-plugin/src/components/hooks.ts +++ b/packages/plugins/group-plugin/src/components/hooks.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect, useRef, useState } from 'react'; export const useHover = () => { diff --git a/packages/plugins/group-plugin/src/components/index.tsx b/packages/plugins/group-plugin/src/components/index.tsx index 49662ff7..51d3384e 100644 --- a/packages/plugins/group-plugin/src/components/index.tsx +++ b/packages/plugins/group-plugin/src/components/index.tsx @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { GroupRender } from './group-render'; export { GroupBox } from './group-box'; diff --git a/packages/plugins/group-plugin/src/constant.ts b/packages/plugins/group-plugin/src/constant.ts index b1634772..d85e3de1 100644 --- a/packages/plugins/group-plugin/src/constant.ts +++ b/packages/plugins/group-plugin/src/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum GroupRenderer { GroupRender = 'group_render', GroupBox = 'group_box', diff --git a/packages/plugins/group-plugin/src/create-group-plugin.tsx b/packages/plugins/group-plugin/src/create-group-plugin.tsx index 9745095c..2f67963b 100644 --- a/packages/plugins/group-plugin/src/create-group-plugin.tsx +++ b/packages/plugins/group-plugin/src/create-group-plugin.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator, PluginContext } from '@flowgram.ai/core'; import { CreateGroupPluginOptions } from './type'; diff --git a/packages/plugins/group-plugin/src/group-node-register.tsx b/packages/plugins/group-plugin/src/group-node-register.tsx index 84066698..c14caa0c 100644 --- a/packages/plugins/group-plugin/src/group-node-register.tsx +++ b/packages/plugins/group-plugin/src/group-node-register.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPoint, PaddingSchema, Point } from '@flowgram.ai/utils'; import { FlowGroupController, diff --git a/packages/plugins/group-plugin/src/groups-layer.tsx b/packages/plugins/group-plugin/src/groups-layer.tsx index a555fb34..edc32b32 100644 --- a/packages/plugins/group-plugin/src/groups-layer.tsx +++ b/packages/plugins/group-plugin/src/groups-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { inject, injectable } from 'inversify'; diff --git a/packages/plugins/group-plugin/src/index.ts b/packages/plugins/group-plugin/src/index.ts index 6ec53772..1d696ac2 100644 --- a/packages/plugins/group-plugin/src/index.ts +++ b/packages/plugins/group-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FlowGroupController } from '@flowgram.ai/document'; export * from './groups-layer'; export * from './create-group-plugin'; diff --git a/packages/plugins/group-plugin/src/registers/index.ts b/packages/plugins/group-plugin/src/registers/index.ts index 948cb315..7f4be1ab 100644 --- a/packages/plugins/group-plugin/src/registers/index.ts +++ b/packages/plugins/group-plugin/src/registers/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IGroupPluginRegister } from '../type'; import { GroupPluginRegister } from '../constant'; import { registerRender } from './register-render'; diff --git a/packages/plugins/group-plugin/src/registers/register-clean-groups.ts b/packages/plugins/group-plugin/src/registers/register-clean-groups.ts index 412982fd..1a6220ce 100644 --- a/packages/plugins/group-plugin/src/registers/register-clean-groups.ts +++ b/packages/plugins/group-plugin/src/registers/register-clean-groups.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocument } from '@flowgram.ai/document'; import { FlowGroupService } from '@flowgram.ai/document'; diff --git a/packages/plugins/group-plugin/src/registers/register-group-node.ts b/packages/plugins/group-plugin/src/registers/register-group-node.ts index d4812327..b907e749 100644 --- a/packages/plugins/group-plugin/src/registers/register-group-node.ts +++ b/packages/plugins/group-plugin/src/registers/register-group-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocument } from '@flowgram.ai/document'; import { IGroupPluginRegister } from '../type'; diff --git a/packages/plugins/group-plugin/src/registers/register-layer.ts b/packages/plugins/group-plugin/src/registers/register-layer.ts index 56660752..149d86bb 100644 --- a/packages/plugins/group-plugin/src/registers/register-layer.ts +++ b/packages/plugins/group-plugin/src/registers/register-layer.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IGroupPluginRegister } from '../type'; import { GroupsLayer } from '../groups-layer'; diff --git a/packages/plugins/group-plugin/src/registers/register-render.tsx b/packages/plugins/group-plugin/src/registers/register-render.tsx index 09de15b9..15459e72 100644 --- a/packages/plugins/group-plugin/src/registers/register-render.tsx +++ b/packages/plugins/group-plugin/src/registers/register-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { FC } from 'react'; import { FlowRendererRegistry } from '@flowgram.ai/renderer'; diff --git a/packages/plugins/group-plugin/src/type.ts b/packages/plugins/group-plugin/src/type.ts index 6115fcaf..ac4f0925 100644 --- a/packages/plugins/group-plugin/src/type.ts +++ b/packages/plugins/group-plugin/src/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { CSSProperties, FC } from 'react'; import type { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/plugins/group-plugin/vitest.config.ts b/packages/plugins/group-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/group-plugin/vitest.config.ts +++ b/packages/plugins/group-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/group-plugin/vitest.setup.ts b/packages/plugins/group-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/group-plugin/vitest.setup.ts +++ b/packages/plugins/group-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/history-node-plugin/.eslintrc.js b/packages/plugins/history-node-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/history-node-plugin/.eslintrc.js +++ b/packages/plugins/history-node-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/history-node-plugin/__tests__/create-container.ts b/packages/plugins/history-node-plugin/__tests__/create-container.ts index 484e1296..44690bbe 100644 --- a/packages/plugins/history-node-plugin/__tests__/create-container.ts +++ b/packages/plugins/history-node-plugin/__tests__/create-container.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormModel } from '@flowgram.ai/form'; import { FlowDocumentContainerModule } from '@flowgram.ai/document'; import { loadPlugins, Playground, PlaygroundMockTools } from '@flowgram.ai/core'; diff --git a/packages/plugins/history-node-plugin/__tests__/form.test.ts b/packages/plugins/history-node-plugin/__tests__/form.test.ts index b7658169..f1568419 100644 --- a/packages/plugins/history-node-plugin/__tests__/form.test.ts +++ b/packages/plugins/history-node-plugin/__tests__/form.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, it, expect, vi } from 'vitest'; import { FieldArrayModel, FormModel } from '@flowgram.ai/form'; import { HistoryService } from '@flowgram.ai/history'; diff --git a/packages/plugins/history-node-plugin/src/create-history-node-plugin.ts b/packages/plugins/history-node-plugin/src/create-history-node-plugin.ts index 9641f62e..4679ee4a 100644 --- a/packages/plugins/history-node-plugin/src/create-history-node-plugin.ts +++ b/packages/plugins/history-node-plugin/src/create-history-node-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocument } from '@flowgram.ai/document'; import { bindContributions, definePluginCreator } from '@flowgram.ai/core'; import { HistoryContainerModule, HistoryService, OperationContribution } from '@flowgram.ai/history'; diff --git a/packages/plugins/history-node-plugin/src/history-node-registers.ts b/packages/plugins/history-node-plugin/src/history-node-registers.ts index 8fe399c9..82863474 100644 --- a/packages/plugins/history-node-plugin/src/history-node-registers.ts +++ b/packages/plugins/history-node-plugin/src/history-node-registers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { type OperationContribution, type OperationRegistry } from '@flowgram.ai/history'; diff --git a/packages/plugins/history-node-plugin/src/index.ts b/packages/plugins/history-node-plugin/src/index.ts index 62f994f7..e64222e0 100644 --- a/packages/plugins/history-node-plugin/src/index.ts +++ b/packages/plugins/history-node-plugin/src/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-history-node-plugin'; diff --git a/packages/plugins/history-node-plugin/src/operation-metas/change-form-values.ts b/packages/plugins/history-node-plugin/src/operation-metas/change-form-values.ts index 2ee42a3b..1dc7f656 100644 --- a/packages/plugins/history-node-plugin/src/operation-metas/change-form-values.ts +++ b/packages/plugins/history-node-plugin/src/operation-metas/change-form-values.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type OperationMeta } from '@flowgram.ai/history'; import { FlowDocument } from '@flowgram.ai/document'; import { type PluginContext } from '@flowgram.ai/core'; diff --git a/packages/plugins/history-node-plugin/src/operation-metas/index.ts b/packages/plugins/history-node-plugin/src/operation-metas/index.ts index 267aee61..0b1d6e5a 100644 --- a/packages/plugins/history-node-plugin/src/operation-metas/index.ts +++ b/packages/plugins/history-node-plugin/src/operation-metas/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { OperationMeta } from '@flowgram.ai/history'; import { changeFormValueOperationMeta } from './change-form-values'; diff --git a/packages/plugins/history-node-plugin/src/types.ts b/packages/plugins/history-node-plugin/src/types.ts index 2a32aec0..04acbb93 100644 --- a/packages/plugins/history-node-plugin/src/types.ts +++ b/packages/plugins/history-node-plugin/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum NodeOperationType { changeFormValues = 'changeFormValues', } diff --git a/packages/plugins/history-node-plugin/src/utils/index.ts b/packages/plugins/history-node-plugin/src/utils/index.ts index 83bcad5a..528bd2ad 100644 --- a/packages/plugins/history-node-plugin/src/utils/index.ts +++ b/packages/plugins/history-node-plugin/src/utils/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { get } from 'lodash'; import { FormModelV2, isFormModelV2 } from '@flowgram.ai/node'; import { HistoryService, Operation } from '@flowgram.ai/history'; diff --git a/packages/plugins/history-node-plugin/vitest.config.ts b/packages/plugins/history-node-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/history-node-plugin/vitest.config.ts +++ b/packages/plugins/history-node-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/history-node-plugin/vitest.setup.ts b/packages/plugins/history-node-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/history-node-plugin/vitest.setup.ts +++ b/packages/plugins/history-node-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/i18n-plugin/.eslintrc.js b/packages/plugins/i18n-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/i18n-plugin/.eslintrc.js +++ b/packages/plugins/i18n-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/i18n-plugin/src/create-i18n-plugin.ts b/packages/plugins/i18n-plugin/src/create-i18n-plugin.ts index 266baf0a..983697f3 100644 --- a/packages/plugins/i18n-plugin/src/create-i18n-plugin.ts +++ b/packages/plugins/i18n-plugin/src/create-i18n-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { I18n, type I18nLanguage } from '@flowgram.ai/i18n'; import { definePluginCreator } from '@flowgram.ai/core'; diff --git a/packages/plugins/i18n-plugin/src/index.ts b/packages/plugins/i18n-plugin/src/index.ts index 30adb6c3..231ceac9 100644 --- a/packages/plugins/i18n-plugin/src/index.ts +++ b/packages/plugins/i18n-plugin/src/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { I18n, type I18nLanguage } from '@flowgram.ai/i18n'; export { createI18nPlugin, type I18nPluginOptions } from './create-i18n-plugin'; diff --git a/packages/plugins/i18n-plugin/vitest.config.ts b/packages/plugins/i18n-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/i18n-plugin/vitest.config.ts +++ b/packages/plugins/i18n-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/i18n-plugin/vitest.setup.ts b/packages/plugins/i18n-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/i18n-plugin/vitest.setup.ts +++ b/packages/plugins/i18n-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/materials-plugin/.eslintrc.js b/packages/plugins/materials-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/materials-plugin/.eslintrc.js +++ b/packages/plugins/materials-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/materials-plugin/src/create-materials-plugin.ts b/packages/plugins/materials-plugin/src/create-materials-plugin.ts index f7402b6d..c88a7d37 100644 --- a/packages/plugins/materials-plugin/src/create-materials-plugin.ts +++ b/packages/plugins/materials-plugin/src/create-materials-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { FlowRendererKey, FlowRendererRegistry } from '@flowgram.ai/renderer'; diff --git a/packages/plugins/materials-plugin/src/index.ts b/packages/plugins/materials-plugin/src/index.ts index c3717bc0..621376a8 100644 --- a/packages/plugins/materials-plugin/src/index.ts +++ b/packages/plugins/materials-plugin/src/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-materials-plugin'; diff --git a/packages/plugins/materials-plugin/vitest.config.ts b/packages/plugins/materials-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/materials-plugin/vitest.config.ts +++ b/packages/plugins/materials-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/materials-plugin/vitest.setup.ts b/packages/plugins/materials-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/materials-plugin/vitest.setup.ts +++ b/packages/plugins/materials-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/minimap-plugin/.eslintrc.js b/packages/plugins/minimap-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/minimap-plugin/.eslintrc.js +++ b/packages/plugins/minimap-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/minimap-plugin/src/component.tsx b/packages/plugins/minimap-plugin/src/component.tsx index b759fcc7..8bd48a8c 100644 --- a/packages/plugins/minimap-plugin/src/component.tsx +++ b/packages/plugins/minimap-plugin/src/component.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { CSSProperties, useEffect, useRef, useState } from 'react'; import { MinimapInactiveStyle } from './type'; diff --git a/packages/plugins/minimap-plugin/src/constant.ts b/packages/plugins/minimap-plugin/src/constant.ts index 66ce30de..96c9d3b0 100644 --- a/packages/plugins/minimap-plugin/src/constant.ts +++ b/packages/plugins/minimap-plugin/src/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { MinimapCanvasStyle, MinimapInactiveStyle, MinimapServiceOptions } from './type'; export const MinimapDefaultCanvasStyle: MinimapCanvasStyle = { diff --git a/packages/plugins/minimap-plugin/src/create-plugin.ts b/packages/plugins/minimap-plugin/src/create-plugin.ts index 4d640cfa..d6fd8059 100644 --- a/packages/plugins/minimap-plugin/src/create-plugin.ts +++ b/packages/plugins/minimap-plugin/src/create-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator, PluginContext } from '@flowgram.ai/core'; import { CreateMinimapPluginOptions } from './type'; diff --git a/packages/plugins/minimap-plugin/src/draw.ts b/packages/plugins/minimap-plugin/src/draw.ts index 9afd5d54..91a0ed4d 100644 --- a/packages/plugins/minimap-plugin/src/draw.ts +++ b/packages/plugins/minimap-plugin/src/draw.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IPoint, Rectangle } from '@flowgram.ai/utils'; export namespace MinimapDraw { diff --git a/packages/plugins/minimap-plugin/src/index.ts b/packages/plugins/minimap-plugin/src/index.ts index c19dd91e..6f610da3 100644 --- a/packages/plugins/minimap-plugin/src/index.ts +++ b/packages/plugins/minimap-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { MinimapRender } from './component'; export { MinimapDefaultCanvasStyle, diff --git a/packages/plugins/minimap-plugin/src/layer.tsx b/packages/plugins/minimap-plugin/src/layer.tsx index b2b09e1b..e6ce2ceb 100644 --- a/packages/plugins/minimap-plugin/src/layer.tsx +++ b/packages/plugins/minimap-plugin/src/layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { inject, injectable } from 'inversify'; diff --git a/packages/plugins/minimap-plugin/src/service.ts b/packages/plugins/minimap-plugin/src/service.ts index 84531739..b6559a53 100644 --- a/packages/plugins/minimap-plugin/src/service.ts +++ b/packages/plugins/minimap-plugin/src/service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { debounce } from 'lodash'; import { inject, injectable } from 'inversify'; import { Disposable, DisposableCollection, IPoint, Rectangle } from '@flowgram.ai/utils'; diff --git a/packages/plugins/minimap-plugin/src/type.ts b/packages/plugins/minimap-plugin/src/type.ts index b95d4a12..ba1fac8e 100644 --- a/packages/plugins/minimap-plugin/src/type.ts +++ b/packages/plugins/minimap-plugin/src/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { CSSProperties } from 'react'; import type { IPoint, Rectangle } from '@flowgram.ai/utils'; diff --git a/packages/plugins/minimap-plugin/vitest.config.ts b/packages/plugins/minimap-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/minimap-plugin/vitest.config.ts +++ b/packages/plugins/minimap-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/minimap-plugin/vitest.setup.ts b/packages/plugins/minimap-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/minimap-plugin/vitest.setup.ts +++ b/packages/plugins/minimap-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/node-core-plugin/.eslintrc.js b/packages/plugins/node-core-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/node-core-plugin/.eslintrc.js +++ b/packages/plugins/node-core-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/node-core-plugin/src/create-node-core-plugin.ts b/packages/plugins/node-core-plugin/src/create-node-core-plugin.ts index 8a1a405f..0b01f6a7 100644 --- a/packages/plugins/node-core-plugin/src/create-node-core-plugin.ts +++ b/packages/plugins/node-core-plugin/src/create-node-core-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FormModelV2 } from '@flowgram.ai/node'; import { createNodeContainerModules, diff --git a/packages/plugins/node-core-plugin/src/form-node-contribution.ts b/packages/plugins/node-core-plugin/src/form-node-contribution.ts index 7f14f24f..d5c57e5b 100644 --- a/packages/plugins/node-core-plugin/src/form-node-contribution.ts +++ b/packages/plugins/node-core-plugin/src/form-node-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable } from 'inversify'; import { NodeContribution, NodeManager, PLUGIN_KEY } from '@flowgram.ai/form-core'; diff --git a/packages/plugins/node-core-plugin/src/form-render.tsx b/packages/plugins/node-core-plugin/src/form-render.tsx index be879110..15962dba 100644 --- a/packages/plugins/node-core-plugin/src/form-render.tsx +++ b/packages/plugins/node-core-plugin/src/form-render.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { FlowNodeFormData, FormModel } from '@flowgram.ai/form-core'; diff --git a/packages/plugins/node-core-plugin/src/index.ts b/packages/plugins/node-core-plugin/src/index.ts index 5ee00510..226e6a39 100644 --- a/packages/plugins/node-core-plugin/src/index.ts +++ b/packages/plugins/node-core-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-node-core-plugin'; export * from './utils'; export * from './types'; diff --git a/packages/plugins/node-core-plugin/src/types.ts b/packages/plugins/node-core-plugin/src/types.ts index a638d2f7..c7ee6936 100644 --- a/packages/plugins/node-core-plugin/src/types.ts +++ b/packages/plugins/node-core-plugin/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DecoratorExtension, EffectExtension, diff --git a/packages/plugins/node-core-plugin/src/utils.ts b/packages/plugins/node-core-plugin/src/utils.ts index 96a0ac8e..3600d889 100644 --- a/packages/plugins/node-core-plugin/src/utils.ts +++ b/packages/plugins/node-core-plugin/src/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DecoratorAbility, DecoratorExtension, diff --git a/packages/plugins/node-core-plugin/vitest.config.ts b/packages/plugins/node-core-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/node-core-plugin/vitest.config.ts +++ b/packages/plugins/node-core-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/node-core-plugin/vitest.setup.ts b/packages/plugins/node-core-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/node-core-plugin/vitest.setup.ts +++ b/packages/plugins/node-core-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/node-variable-plugin/.eslintrc.js b/packages/plugins/node-variable-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/node-variable-plugin/.eslintrc.js +++ b/packages/plugins/node-variable-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/node-variable-plugin/src/components/PrivateScopeProvider.tsx b/packages/plugins/node-variable-plugin/src/components/PrivateScopeProvider.tsx index df4a109a..107a84dd 100644 --- a/packages/plugins/node-variable-plugin/src/components/PrivateScopeProvider.tsx +++ b/packages/plugins/node-variable-plugin/src/components/PrivateScopeProvider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { FlowNodeVariableData, type Scope, ScopeProvider } from '@flowgram.ai/variable-plugin'; diff --git a/packages/plugins/node-variable-plugin/src/components/PublicScopeProvider.tsx b/packages/plugins/node-variable-plugin/src/components/PublicScopeProvider.tsx index f80534ac..2a3c751d 100644 --- a/packages/plugins/node-variable-plugin/src/components/PublicScopeProvider.tsx +++ b/packages/plugins/node-variable-plugin/src/components/PublicScopeProvider.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React, { useMemo } from 'react'; import { FlowNodeVariableData, type Scope, ScopeProvider } from '@flowgram.ai/variable-plugin'; diff --git a/packages/plugins/node-variable-plugin/src/create-node-variable-plugin.ts b/packages/plugins/node-variable-plugin/src/create-node-variable-plugin.ts index 28f7aa28..4da744fe 100644 --- a/packages/plugins/node-variable-plugin/src/create-node-variable-plugin.ts +++ b/packages/plugins/node-variable-plugin/src/create-node-variable-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // import { FormManager } from '@flowgram.ai/form-core'; import { NodeManager } from '@flowgram.ai/form-core'; import { definePluginCreator } from '@flowgram.ai/core'; diff --git a/packages/plugins/node-variable-plugin/src/form-v2/create-provider-effect.ts b/packages/plugins/node-variable-plugin/src/form-v2/create-provider-effect.ts index 9a9c9cf7..4f5ca76c 100644 --- a/packages/plugins/node-variable-plugin/src/form-v2/create-provider-effect.ts +++ b/packages/plugins/node-variable-plugin/src/form-v2/create-provider-effect.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeVariableData, type Scope, ASTKind } from '@flowgram.ai/variable-plugin'; import { DataEvent, type Effect, type EffectOptions } from '@flowgram.ai/node'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/plugins/node-variable-plugin/src/form-v2/create-variable-provider-plugin.ts b/packages/plugins/node-variable-plugin/src/form-v2/create-variable-provider-plugin.ts index bb8c9e99..84eb8760 100644 --- a/packages/plugins/node-variable-plugin/src/form-v2/create-variable-provider-plugin.ts +++ b/packages/plugins/node-variable-plugin/src/form-v2/create-variable-provider-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DataEvent, defineFormPluginCreator } from '@flowgram.ai/node'; export const createVariableProviderPlugin = defineFormPluginCreator({ diff --git a/packages/plugins/node-variable-plugin/src/index.ts b/packages/plugins/node-variable-plugin/src/index.ts index ba3a9205..25b77421 100644 --- a/packages/plugins/node-variable-plugin/src/index.ts +++ b/packages/plugins/node-variable-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-node-variable-plugin'; export { VariableProviderAbilityOptions, diff --git a/packages/plugins/node-variable-plugin/src/types.ts b/packages/plugins/node-variable-plugin/src/types.ts index a76aeb4f..5a329f10 100644 --- a/packages/plugins/node-variable-plugin/src/types.ts +++ b/packages/plugins/node-variable-plugin/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Scope, type ASTNodeJSON, diff --git a/packages/plugins/node-variable-plugin/src/with-node-variables.tsx b/packages/plugins/node-variable-plugin/src/with-node-variables.tsx index f5be2271..4ffe3744 100644 --- a/packages/plugins/node-variable-plugin/src/with-node-variables.tsx +++ b/packages/plugins/node-variable-plugin/src/with-node-variables.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import React from 'react'; import { NodeRenderHoc, type NodeRenderProps } from '@flowgram.ai/form-core'; diff --git a/packages/plugins/node-variable-plugin/vitest.config.ts b/packages/plugins/node-variable-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/node-variable-plugin/vitest.config.ts +++ b/packages/plugins/node-variable-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/node-variable-plugin/vitest.setup.ts b/packages/plugins/node-variable-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/node-variable-plugin/vitest.setup.ts +++ b/packages/plugins/node-variable-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/redux-devtool-plugin/.eslintrc.js b/packages/plugins/redux-devtool-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/redux-devtool-plugin/.eslintrc.js +++ b/packages/plugins/redux-devtool-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/redux-devtool-plugin/src/connectors/base.ts b/packages/plugins/redux-devtool-plugin/src/connectors/base.ts index 2cdad62a..63a773ce 100644 --- a/packages/plugins/redux-devtool-plugin/src/connectors/base.ts +++ b/packages/plugins/redux-devtool-plugin/src/connectors/base.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, postConstruct } from 'inversify'; /** diff --git a/packages/plugins/redux-devtool-plugin/src/connectors/ecs-connector.ts b/packages/plugins/redux-devtool-plugin/src/connectors/ecs-connector.ts index 30505a3c..59d7b20c 100644 --- a/packages/plugins/redux-devtool-plugin/src/connectors/ecs-connector.ts +++ b/packages/plugins/redux-devtool-plugin/src/connectors/ecs-connector.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { EntityManager } from '@flowgram.ai/core'; diff --git a/packages/plugins/redux-devtool-plugin/src/connectors/index.ts b/packages/plugins/redux-devtool-plugin/src/connectors/index.ts index 811b480a..a99bbfa2 100644 --- a/packages/plugins/redux-devtool-plugin/src/connectors/index.ts +++ b/packages/plugins/redux-devtool-plugin/src/connectors/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { ECSConnector } from './ecs-connector'; export { VariableConnector } from './variable-connector'; diff --git a/packages/plugins/redux-devtool-plugin/src/connectors/variable-connector.ts b/packages/plugins/redux-devtool-plugin/src/connectors/variable-connector.ts index 7f27f4af..02688913 100644 --- a/packages/plugins/redux-devtool-plugin/src/connectors/variable-connector.ts +++ b/packages/plugins/redux-devtool-plugin/src/connectors/variable-connector.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { Scope, VariableEngine } from '@flowgram.ai/variable-core'; diff --git a/packages/plugins/redux-devtool-plugin/src/create-redux-devtool-plugin.ts b/packages/plugins/redux-devtool-plugin/src/create-redux-devtool-plugin.ts index cb817010..c99e0e98 100644 --- a/packages/plugins/redux-devtool-plugin/src/create-redux-devtool-plugin.ts +++ b/packages/plugins/redux-devtool-plugin/src/create-redux-devtool-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { definePluginCreator } from '@flowgram.ai/core'; import { ECSConnector, VariableConnector } from './connectors'; diff --git a/packages/plugins/redux-devtool-plugin/src/index.ts b/packages/plugins/redux-devtool-plugin/src/index.ts index 1b48733b..13f06af4 100644 --- a/packages/plugins/redux-devtool-plugin/src/index.ts +++ b/packages/plugins/redux-devtool-plugin/src/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-redux-devtool-plugin'; export * from './connectors/ecs-connector'; diff --git a/packages/plugins/redux-devtool-plugin/vitest.config.ts b/packages/plugins/redux-devtool-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/redux-devtool-plugin/vitest.config.ts +++ b/packages/plugins/redux-devtool-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/redux-devtool-plugin/vitest.setup.ts b/packages/plugins/redux-devtool-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/redux-devtool-plugin/vitest.setup.ts +++ b/packages/plugins/redux-devtool-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/select-box-plugin/.eslintrc.js b/packages/plugins/select-box-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/select-box-plugin/.eslintrc.js +++ b/packages/plugins/select-box-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/select-box-plugin/src/create-select-box-plugin.ts b/packages/plugins/select-box-plugin/src/create-select-box-plugin.ts index 04527f4f..41737a2b 100644 --- a/packages/plugins/select-box-plugin/src/create-select-box-plugin.ts +++ b/packages/plugins/select-box-plugin/src/create-select-box-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowSelectorBoundsLayer, FlowSelectorBoundsLayerOptions, diff --git a/packages/plugins/select-box-plugin/src/index.ts b/packages/plugins/select-box-plugin/src/index.ts index d68d40b5..c8f07e3b 100644 --- a/packages/plugins/select-box-plugin/src/index.ts +++ b/packages/plugins/select-box-plugin/src/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-select-box-plugin'; diff --git a/packages/plugins/select-box-plugin/vitest.config.ts b/packages/plugins/select-box-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/select-box-plugin/vitest.config.ts +++ b/packages/plugins/select-box-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/select-box-plugin/vitest.setup.ts b/packages/plugins/select-box-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/select-box-plugin/vitest.setup.ts +++ b/packages/plugins/select-box-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/shortcuts-plugin/.eslintrc.js b/packages/plugins/shortcuts-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/shortcuts-plugin/.eslintrc.js +++ b/packages/plugins/shortcuts-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/shortcuts-plugin/src/create-shortcuts-plugin.ts b/packages/plugins/shortcuts-plugin/src/create-shortcuts-plugin.ts index a2190e10..92a0e8e7 100644 --- a/packages/plugins/shortcuts-plugin/src/create-shortcuts-plugin.ts +++ b/packages/plugins/shortcuts-plugin/src/create-shortcuts-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { bindContributionProvider, definePluginCreator } from '@flowgram.ai/core'; import { ShortcutsRegistry, ShortcutsContribution } from './shortcuts-contribution'; diff --git a/packages/plugins/shortcuts-plugin/src/index.ts b/packages/plugins/shortcuts-plugin/src/index.ts index c7429cb9..d6030dae 100644 --- a/packages/plugins/shortcuts-plugin/src/index.ts +++ b/packages/plugins/shortcuts-plugin/src/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-shortcuts-plugin'; export * from './shortcuts-contribution'; diff --git a/packages/plugins/shortcuts-plugin/src/layers/index.ts b/packages/plugins/shortcuts-plugin/src/layers/index.ts index 2e1e14ad..295bb4db 100644 --- a/packages/plugins/shortcuts-plugin/src/layers/index.ts +++ b/packages/plugins/shortcuts-plugin/src/layers/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './shortcuts-layer'; diff --git a/packages/plugins/shortcuts-plugin/src/layers/shortcuts-layer.tsx b/packages/plugins/shortcuts-plugin/src/layers/shortcuts-layer.tsx index b1695b24..95101d62 100644 --- a/packages/plugins/shortcuts-plugin/src/layers/shortcuts-layer.tsx +++ b/packages/plugins/shortcuts-plugin/src/layers/shortcuts-layer.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { Layer, SelectionService, Command } from '@flowgram.ai/core'; diff --git a/packages/plugins/shortcuts-plugin/src/shortcuts-contribution.ts b/packages/plugins/shortcuts-plugin/src/shortcuts-contribution.ts index 469d746c..6572c93e 100644 --- a/packages/plugins/shortcuts-plugin/src/shortcuts-contribution.ts +++ b/packages/plugins/shortcuts-plugin/src/shortcuts-contribution.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, named, optional, postConstruct } from 'inversify'; import { Command, CommandRegistry, ContributionProvider } from '@flowgram.ai/core'; diff --git a/packages/plugins/shortcuts-plugin/src/shortcuts-utils.ts b/packages/plugins/shortcuts-plugin/src/shortcuts-utils.ts index 55588f7c..a667d3b4 100644 --- a/packages/plugins/shortcuts-plugin/src/shortcuts-utils.ts +++ b/packages/plugins/shortcuts-plugin/src/shortcuts-utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const isAppleDevice = /(mac|iphone|ipod|ipad)/i.test( typeof navigator !== 'undefined' ? navigator?.platform : '', ); diff --git a/packages/plugins/shortcuts-plugin/vitest.config.ts b/packages/plugins/shortcuts-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/shortcuts-plugin/vitest.config.ts +++ b/packages/plugins/shortcuts-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/shortcuts-plugin/vitest.setup.ts b/packages/plugins/shortcuts-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/shortcuts-plugin/vitest.setup.ts +++ b/packages/plugins/shortcuts-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/plugins/variable-plugin/.eslintrc.js b/packages/plugins/variable-plugin/.eslintrc.js index 3aef16ba..00266872 100644 --- a/packages/plugins/variable-plugin/.eslintrc.js +++ b/packages/plugins/variable-plugin/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/plugins/variable-plugin/src/create-variable-plugin.ts b/packages/plugins/variable-plugin/src/create-variable-plugin.ts index 6cda8af1..4a616cb0 100644 --- a/packages/plugins/variable-plugin/src/create-variable-plugin.ts +++ b/packages/plugins/variable-plugin/src/create-variable-plugin.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeVariableData, FreeLayoutScopeChain, diff --git a/packages/plugins/variable-plugin/src/index.ts b/packages/plugins/variable-plugin/src/index.ts index 96877c80..f51fc529 100644 --- a/packages/plugins/variable-plugin/src/index.ts +++ b/packages/plugins/variable-plugin/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './create-variable-plugin'; export * from '@flowgram.ai/variable-core'; export { diff --git a/packages/plugins/variable-plugin/vitest.config.ts b/packages/plugins/variable-plugin/vitest.config.ts index 97c9de9b..8aa05941 100644 --- a/packages/plugins/variable-plugin/vitest.config.ts +++ b/packages/plugins/variable-plugin/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/plugins/variable-plugin/vitest.setup.ts b/packages/plugins/variable-plugin/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/plugins/variable-plugin/vitest.setup.ts +++ b/packages/plugins/variable-plugin/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/runtime/interface/.eslintrc.cjs b/packages/runtime/interface/.eslintrc.cjs index b1ea5bf8..7adf4d5d 100644 --- a/packages/runtime/interface/.eslintrc.cjs +++ b/packages/runtime/interface/.eslintrc.cjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/runtime/interface/src/api/constant.ts b/packages/runtime/interface/src/api/constant.ts index 1db668e9..6cbe3956 100644 --- a/packages/runtime/interface/src/api/constant.ts +++ b/packages/runtime/interface/src/api/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum FlowGramAPIMethod { GET = 'GET', POST = 'POST', diff --git a/packages/runtime/interface/src/api/define.ts b/packages/runtime/interface/src/api/define.ts index b3e0e2c3..70dc7a7e 100644 --- a/packages/runtime/interface/src/api/define.ts +++ b/packages/runtime/interface/src/api/define.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ValidationDefine } from './validation'; import { FlowGramAPIDefines } from './type'; import { TaskRunDefine } from './task-run'; diff --git a/packages/runtime/interface/src/api/index.ts b/packages/runtime/interface/src/api/index.ts index ccc9c46b..6be7a87f 100644 --- a/packages/runtime/interface/src/api/index.ts +++ b/packages/runtime/interface/src/api/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './type'; export * from './define'; export * from './constant'; diff --git a/packages/runtime/interface/src/api/schema.ts b/packages/runtime/interface/src/api/schema.ts index 0b69d2bf..89a80d11 100644 --- a/packages/runtime/interface/src/api/schema.ts +++ b/packages/runtime/interface/src/api/schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import z from 'zod'; const WorkflowIOZodSchema = z.record(z.string(), z.any()); diff --git a/packages/runtime/interface/src/api/server-info/index.ts b/packages/runtime/interface/src/api/server-info/index.ts index c82ac51d..6c09d10a 100644 --- a/packages/runtime/interface/src/api/server-info/index.ts +++ b/packages/runtime/interface/src/api/server-info/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import z from 'zod'; import { type FlowGramAPIDefine } from '@api/type'; diff --git a/packages/runtime/interface/src/api/task-cancel/index.ts b/packages/runtime/interface/src/api/task-cancel/index.ts index dfe33493..2aecb820 100644 --- a/packages/runtime/interface/src/api/task-cancel/index.ts +++ b/packages/runtime/interface/src/api/task-cancel/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import z from 'zod'; import { FlowGramAPIDefine } from '@api/type'; diff --git a/packages/runtime/interface/src/api/task-report/index.ts b/packages/runtime/interface/src/api/task-report/index.ts index 428f7082..6f4abf9b 100644 --- a/packages/runtime/interface/src/api/task-report/index.ts +++ b/packages/runtime/interface/src/api/task-report/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import z from 'zod'; import { IReport } from '@runtime/index'; diff --git a/packages/runtime/interface/src/api/task-result/index.ts b/packages/runtime/interface/src/api/task-result/index.ts index 5d856909..bb6f1801 100644 --- a/packages/runtime/interface/src/api/task-result/index.ts +++ b/packages/runtime/interface/src/api/task-result/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import z from 'zod'; import { WorkflowOutputs } from '@runtime/index'; diff --git a/packages/runtime/interface/src/api/task-run/index.ts b/packages/runtime/interface/src/api/task-run/index.ts index b0c7a06c..44eb47b1 100644 --- a/packages/runtime/interface/src/api/task-run/index.ts +++ b/packages/runtime/interface/src/api/task-run/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import z from 'zod'; import { WorkflowInputs } from '@runtime/index'; diff --git a/packages/runtime/interface/src/api/type.ts b/packages/runtime/interface/src/api/type.ts index f7412422..8b4ab75d 100644 --- a/packages/runtime/interface/src/api/type.ts +++ b/packages/runtime/interface/src/api/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type z from 'zod'; import { FlowGramAPIMethod, FlowGramAPIModule, FlowGramAPIName } from './constant'; diff --git a/packages/runtime/interface/src/api/validation/index.ts b/packages/runtime/interface/src/api/validation/index.ts index 00fa4de2..b26a54e1 100644 --- a/packages/runtime/interface/src/api/validation/index.ts +++ b/packages/runtime/interface/src/api/validation/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import z from 'zod'; import { ValidationResult } from '@runtime/index'; diff --git a/packages/runtime/interface/src/client/index.ts b/packages/runtime/interface/src/client/index.ts index 6459084d..9b34c4f6 100644 --- a/packages/runtime/interface/src/client/index.ts +++ b/packages/runtime/interface/src/client/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { FlowGramAPIName, TaskCancelInput, diff --git a/packages/runtime/interface/src/index.ts b/packages/runtime/interface/src/index.ts index 2436056f..368132bb 100644 --- a/packages/runtime/interface/src/index.ts +++ b/packages/runtime/interface/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './api'; export * from './schema'; export * from './node'; diff --git a/packages/runtime/interface/src/node/constant.ts b/packages/runtime/interface/src/node/constant.ts index 5b10342d..9fe11f1e 100644 --- a/packages/runtime/interface/src/node/constant.ts +++ b/packages/runtime/interface/src/node/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum FlowGramNode { Root = 'root', Start = 'start', diff --git a/packages/runtime/interface/src/node/end/index.ts b/packages/runtime/interface/src/node/end/index.ts index d078fe2f..5a7b4d6d 100644 --- a/packages/runtime/interface/src/node/end/index.ts +++ b/packages/runtime/interface/src/node/end/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IFlowConstantRefValue } from '@schema/value'; import { WorkflowNodeSchema } from '@schema/node'; import { IJsonSchema } from '@schema/json-schema'; diff --git a/packages/runtime/interface/src/node/index.ts b/packages/runtime/interface/src/node/index.ts index d5377b2a..bea676c5 100644 --- a/packages/runtime/interface/src/node/index.ts +++ b/packages/runtime/interface/src/node/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FlowGramNode } from './constant'; export { EndNodeSchema } from './end'; export { LLMNodeSchema } from './llm'; diff --git a/packages/runtime/interface/src/node/llm/index.ts b/packages/runtime/interface/src/node/llm/index.ts index 3bf87f3d..9213e586 100644 --- a/packages/runtime/interface/src/node/llm/index.ts +++ b/packages/runtime/interface/src/node/llm/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IFlowConstantRefValue } from '@schema/value'; import { WorkflowNodeSchema } from '@schema/node'; import { IJsonSchema } from '@schema/json-schema'; diff --git a/packages/runtime/interface/src/node/start/index.ts b/packages/runtime/interface/src/node/start/index.ts index f0dc5b86..591ffb35 100644 --- a/packages/runtime/interface/src/node/start/index.ts +++ b/packages/runtime/interface/src/node/start/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeSchema } from '@schema/node'; import { IJsonSchema } from '@schema/json-schema'; import { FlowGramNode } from '@node/constant'; diff --git a/packages/runtime/interface/src/runtime/base/index.ts b/packages/runtime/interface/src/runtime/base/index.ts index e5f0222a..58a68660 100644 --- a/packages/runtime/interface/src/runtime/base/index.ts +++ b/packages/runtime/interface/src/runtime/base/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type { VOData } from './value-object'; export type { InvokeParams, WorkflowRuntimeInvoke } from './invoke'; export type { WorkflowInputs, WorkflowOutputs } from './inputs-outputs'; diff --git a/packages/runtime/interface/src/runtime/base/inputs-outputs.ts b/packages/runtime/interface/src/runtime/base/inputs-outputs.ts index a2b9cfda..ebf84ec4 100644 --- a/packages/runtime/interface/src/runtime/base/inputs-outputs.ts +++ b/packages/runtime/interface/src/runtime/base/inputs-outputs.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type WorkflowInputs = Record; export type WorkflowOutputs = Record; diff --git a/packages/runtime/interface/src/runtime/base/invoke.ts b/packages/runtime/interface/src/runtime/base/invoke.ts index da68cdd8..1843d924 100644 --- a/packages/runtime/interface/src/runtime/base/invoke.ts +++ b/packages/runtime/interface/src/runtime/base/invoke.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowSchema } from '@schema/index'; import { WorkflowInputs } from './inputs-outputs'; diff --git a/packages/runtime/interface/src/runtime/base/value-object.ts b/packages/runtime/interface/src/runtime/base/value-object.ts index cf5053a4..340b3c86 100644 --- a/packages/runtime/interface/src/runtime/base/value-object.ts +++ b/packages/runtime/interface/src/runtime/base/value-object.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type VOData = Omit; diff --git a/packages/runtime/interface/src/runtime/container/index.ts b/packages/runtime/interface/src/runtime/container/index.ts index 3bcb2e4b..7bfa5746 100644 --- a/packages/runtime/interface/src/runtime/container/index.ts +++ b/packages/runtime/interface/src/runtime/container/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type ContainerService = any; export interface IContainer { diff --git a/packages/runtime/interface/src/runtime/context/index.ts b/packages/runtime/interface/src/runtime/context/index.ts index 44ee0ea8..a5f97642 100644 --- a/packages/runtime/interface/src/runtime/context/index.ts +++ b/packages/runtime/interface/src/runtime/context/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IVariableStore } from '@runtime/variable'; import { IStatusCenter } from '@runtime/status'; import { ISnapshotCenter } from '@runtime/snapshot'; diff --git a/packages/runtime/interface/src/runtime/document/document.ts b/packages/runtime/interface/src/runtime/document/document.ts index 52ff19ed..ca1d10d2 100644 --- a/packages/runtime/interface/src/runtime/document/document.ts +++ b/packages/runtime/interface/src/runtime/document/document.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowSchema } from '@schema/index'; import { INode } from './node'; import { IEdge } from './edge'; diff --git a/packages/runtime/interface/src/runtime/document/edge.ts b/packages/runtime/interface/src/runtime/document/edge.ts index aaa0858e..b430df97 100644 --- a/packages/runtime/interface/src/runtime/document/edge.ts +++ b/packages/runtime/interface/src/runtime/document/edge.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IPort } from './port'; import { INode } from './node'; diff --git a/packages/runtime/interface/src/runtime/document/index.ts b/packages/runtime/interface/src/runtime/document/index.ts index 486ec297..615b5811 100644 --- a/packages/runtime/interface/src/runtime/document/index.ts +++ b/packages/runtime/interface/src/runtime/document/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type { IDocument } from './document'; export type { IEdge, CreateEdgeParams } from './edge'; export type { NodeDeclare as NodeVariable, INode, CreateNodeParams } from './node'; diff --git a/packages/runtime/interface/src/runtime/document/node.ts b/packages/runtime/interface/src/runtime/document/node.ts index db3a3c77..101ae1b1 100644 --- a/packages/runtime/interface/src/runtime/document/node.ts +++ b/packages/runtime/interface/src/runtime/document/node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IFlowConstantRefValue, IJsonSchema, PositionSchema } from '@schema/index'; import { FlowGramNode } from '@node/constant'; import { IPort } from './port'; diff --git a/packages/runtime/interface/src/runtime/document/port.ts b/packages/runtime/interface/src/runtime/document/port.ts index 099ea291..13dca9d2 100644 --- a/packages/runtime/interface/src/runtime/document/port.ts +++ b/packages/runtime/interface/src/runtime/document/port.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowPortType } from '@schema/index'; import { INode } from './node'; import { IEdge } from './edge'; diff --git a/packages/runtime/interface/src/runtime/engine/index.ts b/packages/runtime/interface/src/runtime/engine/index.ts index 7fa0c6da..72e323e4 100644 --- a/packages/runtime/interface/src/runtime/engine/index.ts +++ b/packages/runtime/interface/src/runtime/engine/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ITask } from '../task'; import { IExecutor } from '../executor'; import { INode } from '../document'; diff --git a/packages/runtime/interface/src/runtime/executor/executor.ts b/packages/runtime/interface/src/runtime/executor/executor.ts index 874d62b1..4d4e27dd 100644 --- a/packages/runtime/interface/src/runtime/executor/executor.ts +++ b/packages/runtime/interface/src/runtime/executor/executor.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ExecutionContext, ExecutionResult, INodeExecutor } from './node-executor'; export interface IExecutor { diff --git a/packages/runtime/interface/src/runtime/executor/index.ts b/packages/runtime/interface/src/runtime/executor/index.ts index 3830c4c9..0b05d84c 100644 --- a/packages/runtime/interface/src/runtime/executor/index.ts +++ b/packages/runtime/interface/src/runtime/executor/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { IExecutor } from './executor'; export type { ExecutionContext, diff --git a/packages/runtime/interface/src/runtime/executor/node-executor.ts b/packages/runtime/interface/src/runtime/executor/node-executor.ts index 0ade2c9c..73a99860 100644 --- a/packages/runtime/interface/src/runtime/executor/node-executor.ts +++ b/packages/runtime/interface/src/runtime/executor/node-executor.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowGramNode } from '@node/index'; import { INode } from '../document'; import { IContext } from '../context'; diff --git a/packages/runtime/interface/src/runtime/index.ts b/packages/runtime/interface/src/runtime/index.ts index 941163e8..a63e39ef 100644 --- a/packages/runtime/interface/src/runtime/index.ts +++ b/packages/runtime/interface/src/runtime/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './container'; export * from './base'; export * from './engine'; diff --git a/packages/runtime/interface/src/runtime/io-center/index.ts b/packages/runtime/interface/src/runtime/io-center/index.ts index 8de30c25..0f6c1df1 100644 --- a/packages/runtime/interface/src/runtime/io-center/index.ts +++ b/packages/runtime/interface/src/runtime/io-center/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowInputs, WorkflowOutputs } from '../base'; export interface IOData { diff --git a/packages/runtime/interface/src/runtime/reporter/index.ts b/packages/runtime/interface/src/runtime/reporter/index.ts index 30ad917f..e9089a31 100644 --- a/packages/runtime/interface/src/runtime/reporter/index.ts +++ b/packages/runtime/interface/src/runtime/reporter/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { StatusData, IStatusCenter } from '../status'; import { Snapshot, ISnapshotCenter } from '../snapshot'; import { WorkflowInputs, WorkflowOutputs } from '../base'; diff --git a/packages/runtime/interface/src/runtime/snapshot/index.ts b/packages/runtime/interface/src/runtime/snapshot/index.ts index 11970c14..0e26915e 100644 --- a/packages/runtime/interface/src/runtime/snapshot/index.ts +++ b/packages/runtime/interface/src/runtime/snapshot/index.ts @@ -1,2 +1,7 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export type { ISnapshot, Snapshot, SnapshotData } from './snapshot'; export type { ISnapshotCenter } from './snapshot-center'; diff --git a/packages/runtime/interface/src/runtime/snapshot/snapshot-center.ts b/packages/runtime/interface/src/runtime/snapshot/snapshot-center.ts index b98fe540..98f3d384 100644 --- a/packages/runtime/interface/src/runtime/snapshot/snapshot-center.ts +++ b/packages/runtime/interface/src/runtime/snapshot/snapshot-center.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ISnapshot, Snapshot, SnapshotData } from './snapshot'; export interface ISnapshotCenter { diff --git a/packages/runtime/interface/src/runtime/snapshot/snapshot.ts b/packages/runtime/interface/src/runtime/snapshot/snapshot.ts index 8392ddcc..9fcdb0ce 100644 --- a/packages/runtime/interface/src/runtime/snapshot/snapshot.ts +++ b/packages/runtime/interface/src/runtime/snapshot/snapshot.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowInputs, WorkflowOutputs } from '../base'; export interface SnapshotData { diff --git a/packages/runtime/interface/src/runtime/state/index.ts b/packages/runtime/interface/src/runtime/state/index.ts index be177b3e..819fe3f9 100644 --- a/packages/runtime/interface/src/runtime/state/index.ts +++ b/packages/runtime/interface/src/runtime/state/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IFlowConstantRefValue, IFlowRefValue, WorkflowVariableType } from '@schema/index'; import { IVariableParseResult, IVariableStore } from '../variable'; import { INode } from '../document'; diff --git a/packages/runtime/interface/src/runtime/status/index.ts b/packages/runtime/interface/src/runtime/status/index.ts index c79031d5..04e19a9f 100644 --- a/packages/runtime/interface/src/runtime/status/index.ts +++ b/packages/runtime/interface/src/runtime/status/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum WorkflowStatus { Pending = 'pending', Processing = 'processing', diff --git a/packages/runtime/interface/src/runtime/task/index.ts b/packages/runtime/interface/src/runtime/task/index.ts index 2edaefef..009802e3 100644 --- a/packages/runtime/interface/src/runtime/task/index.ts +++ b/packages/runtime/interface/src/runtime/task/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IContext } from '../context'; import { WorkflowOutputs } from '../base'; diff --git a/packages/runtime/interface/src/runtime/validation/index.ts b/packages/runtime/interface/src/runtime/validation/index.ts index e8c5ca42..6626329c 100644 --- a/packages/runtime/interface/src/runtime/validation/index.ts +++ b/packages/runtime/interface/src/runtime/validation/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowSchema } from '@schema/index'; export interface ValidationResult { diff --git a/packages/runtime/interface/src/runtime/variable/index.ts b/packages/runtime/interface/src/runtime/variable/index.ts index 2d4b821a..5977a309 100644 --- a/packages/runtime/interface/src/runtime/variable/index.ts +++ b/packages/runtime/interface/src/runtime/variable/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowVariableType } from '@schema/index'; interface VariableTypeInfo { diff --git a/packages/runtime/interface/src/schema/constant.ts b/packages/runtime/interface/src/schema/constant.ts index 329e9ab8..45f81b9a 100644 --- a/packages/runtime/interface/src/schema/constant.ts +++ b/packages/runtime/interface/src/schema/constant.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum WorkflowPortType { Input = 'input', Output = 'output', diff --git a/packages/runtime/interface/src/schema/edge.ts b/packages/runtime/interface/src/schema/edge.ts index 0fae12a3..33e4bc5d 100644 --- a/packages/runtime/interface/src/schema/edge.ts +++ b/packages/runtime/interface/src/schema/edge.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface WorkflowEdgeSchema { sourceNodeID: string; targetNodeID: string; diff --git a/packages/runtime/interface/src/schema/index.ts b/packages/runtime/interface/src/schema/index.ts index 5db4878a..bf3c6450 100644 --- a/packages/runtime/interface/src/schema/index.ts +++ b/packages/runtime/interface/src/schema/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowEdgeSchema } from './edge'; export { JsonSchemaBasicType, IJsonSchema, IBasicJsonSchema } from './json-schema'; export { WorkflowNodeMetaSchema } from './node-meta'; diff --git a/packages/runtime/interface/src/schema/json-schema.ts b/packages/runtime/interface/src/schema/json-schema.ts index 7626535e..b10078f7 100644 --- a/packages/runtime/interface/src/schema/json-schema.ts +++ b/packages/runtime/interface/src/schema/json-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // TODO copy packages/materials/form-materials/src/typings/json-schema/index.ts export type JsonSchemaBasicType = diff --git a/packages/runtime/interface/src/schema/node-meta.ts b/packages/runtime/interface/src/schema/node-meta.ts index 67241104..82ae6175 100644 --- a/packages/runtime/interface/src/schema/node-meta.ts +++ b/packages/runtime/interface/src/schema/node-meta.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { PositionSchema } from './xy'; export interface WorkflowNodeMetaSchema { diff --git a/packages/runtime/interface/src/schema/node.ts b/packages/runtime/interface/src/schema/node.ts index e17ba8f0..71b88cd9 100644 --- a/packages/runtime/interface/src/schema/node.ts +++ b/packages/runtime/interface/src/schema/node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { IFlowConstantRefValue } from './value'; import type { WorkflowNodeMetaSchema } from './node-meta'; import { IJsonSchema } from './json-schema'; diff --git a/packages/runtime/interface/src/schema/value.ts b/packages/runtime/interface/src/schema/value.ts index 406eb60a..ba4a1590 100644 --- a/packages/runtime/interface/src/schema/value.ts +++ b/packages/runtime/interface/src/schema/value.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + // TODO copy packages/materials/form-materials/src/typings/flow-value/index.ts export interface IFlowConstantValue { diff --git a/packages/runtime/interface/src/schema/workflow.ts b/packages/runtime/interface/src/schema/workflow.ts index 91846c9f..676469c1 100644 --- a/packages/runtime/interface/src/schema/workflow.ts +++ b/packages/runtime/interface/src/schema/workflow.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowNodeSchema } from './node'; import type { WorkflowEdgeSchema } from './edge'; diff --git a/packages/runtime/interface/src/schema/xy.ts b/packages/runtime/interface/src/schema/xy.ts index 7cbe86b1..3f7f2cf3 100644 --- a/packages/runtime/interface/src/schema/xy.ts +++ b/packages/runtime/interface/src/schema/xy.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export interface XYSchema { x: number; y: number; diff --git a/packages/runtime/js-core/.eslintrc.cjs b/packages/runtime/js-core/.eslintrc.cjs index b1ea5bf8..7adf4d5d 100644 --- a/packages/runtime/js-core/.eslintrc.cjs +++ b/packages/runtime/js-core/.eslintrc.cjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/runtime/js-core/src/api/index.ts b/packages/runtime/js-core/src/api/index.ts index 92551ddb..912e3c49 100644 --- a/packages/runtime/js-core/src/api/index.ts +++ b/packages/runtime/js-core/src/api/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowGramAPIName } from '@flowgram.ai/runtime-interface'; import { TaskRunAPI } from './task-run'; diff --git a/packages/runtime/js-core/src/api/task-cancel.ts b/packages/runtime/js-core/src/api/task-cancel.ts index 48fb31cc..3be400f5 100644 --- a/packages/runtime/js-core/src/api/task-cancel.ts +++ b/packages/runtime/js-core/src/api/task-cancel.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { TaskCancelInput, TaskCancelOutput } from '@flowgram.ai/runtime-interface'; import { WorkflowApplication } from '@application/workflow'; diff --git a/packages/runtime/js-core/src/api/task-report.ts b/packages/runtime/js-core/src/api/task-report.ts index ddc2477b..32c7e3f4 100644 --- a/packages/runtime/js-core/src/api/task-report.ts +++ b/packages/runtime/js-core/src/api/task-report.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable no-console */ import { TaskReportInput, diff --git a/packages/runtime/js-core/src/api/task-result.ts b/packages/runtime/js-core/src/api/task-result.ts index 250b9d83..8dc8f80a 100644 --- a/packages/runtime/js-core/src/api/task-result.ts +++ b/packages/runtime/js-core/src/api/task-result.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { TaskResultInput, TaskResultOutput } from '@flowgram.ai/runtime-interface'; import { WorkflowApplication } from '@application/workflow'; diff --git a/packages/runtime/js-core/src/api/task-run.ts b/packages/runtime/js-core/src/api/task-run.ts index 6f38661c..8b439041 100644 --- a/packages/runtime/js-core/src/api/task-run.ts +++ b/packages/runtime/js-core/src/api/task-run.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { TaskRunInput, TaskRunOutput } from '@flowgram.ai/runtime-interface'; import { WorkflowApplication } from '@application/workflow'; diff --git a/packages/runtime/js-core/src/application/index.ts b/packages/runtime/js-core/src/application/index.ts index 4c54593e..420fdaf4 100644 --- a/packages/runtime/js-core/src/application/index.ts +++ b/packages/runtime/js-core/src/application/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowApplication } from './workflow'; diff --git a/packages/runtime/js-core/src/application/workflow.ts b/packages/runtime/js-core/src/application/workflow.ts index 852bb58c..f13f86d0 100644 --- a/packages/runtime/js-core/src/application/workflow.ts +++ b/packages/runtime/js-core/src/application/workflow.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + /* eslint-disable no-console */ import { InvokeParams, diff --git a/packages/runtime/js-core/src/domain/__tests__/config.ts b/packages/runtime/js-core/src/domain/__tests__/config.ts index c15cd66b..c7d20be7 100644 --- a/packages/runtime/js-core/src/domain/__tests__/config.ts +++ b/packages/runtime/js-core/src/domain/__tests__/config.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const ENABLE_REAL_LLM = false; diff --git a/packages/runtime/js-core/src/domain/__tests__/executor/index.ts b/packages/runtime/js-core/src/domain/__tests__/executor/index.ts index 32d19fbc..dbe81815 100644 --- a/packages/runtime/js-core/src/domain/__tests__/executor/index.ts +++ b/packages/runtime/js-core/src/domain/__tests__/executor/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { INodeExecutorFactory } from '@flowgram.ai/runtime-interface'; import { StartExecutor } from '@nodes/start'; diff --git a/packages/runtime/js-core/src/domain/__tests__/executor/llm.ts b/packages/runtime/js-core/src/domain/__tests__/executor/llm.ts index a47f7772..bdc5e585 100644 --- a/packages/runtime/js-core/src/domain/__tests__/executor/llm.ts +++ b/packages/runtime/js-core/src/domain/__tests__/executor/llm.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ExecutionContext, ExecutionResult } from '@flowgram.ai/runtime-interface'; import { LLMExecutor, LLMExecutorInputs } from '@nodes/llm'; diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/basic-llm.test.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/basic-llm.test.ts index b552e323..70758333 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/basic-llm.test.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/basic-llm.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { IContainer, IEngine, IExecutor, WorkflowStatus } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/basic-llm.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/basic-llm.ts index 876a7ec9..010905a8 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/basic-llm.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/basic-llm.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowSchema } from '@flowgram.ai/runtime-interface'; export const basicLLMSchema: WorkflowSchema = { diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/basic.test.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/basic.test.ts index 69b1b894..633e197a 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/basic.test.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/basic.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { IContainer, IEngine, WorkflowStatus } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/basic.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/basic.ts index a79b596d..45ce2a1b 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/basic.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/basic.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { WorkflowSchema } from '@flowgram.ai/runtime-interface'; export const basicSchema: WorkflowSchema = { diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/branch.test.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/branch.test.ts index 70c49d8d..996dcd91 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/branch.test.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/branch.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { IContainer, IEngine, WorkflowStatus } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/branch.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/branch.ts index 75a5f636..0db28356 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/branch.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/branch.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowSchema } from '@flowgram.ai/runtime-interface'; export const branchSchema: WorkflowSchema = { diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/index.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/index.ts index 473e4809..e8d07a6a 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/index.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { twoLLMSchema } from './two-llm'; import { loopSchema } from './loop'; import { branchSchema } from './branch'; diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/loop.test.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/loop.test.ts index 07ab10c4..cdf478c8 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/loop.test.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/loop.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { IContainer, IEngine, WorkflowStatus } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/loop.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/loop.ts index bd16ea8a..1dad6339 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/loop.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/loop.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowSchema } from '@flowgram.ai/runtime-interface'; export const loopSchema: WorkflowSchema = { diff --git a/packages/runtime/js-core/src/domain/__tests__/schemas/two-llm.ts b/packages/runtime/js-core/src/domain/__tests__/schemas/two-llm.ts index f0bd6e17..61494b2a 100644 --- a/packages/runtime/js-core/src/domain/__tests__/schemas/two-llm.ts +++ b/packages/runtime/js-core/src/domain/__tests__/schemas/two-llm.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowSchema } from '@flowgram.ai/runtime-interface'; export const twoLLMSchema: WorkflowSchema = { diff --git a/packages/runtime/js-core/src/domain/__tests__/setup.ts b/packages/runtime/js-core/src/domain/__tests__/setup.ts index ad0b7168..308ddef4 100644 --- a/packages/runtime/js-core/src/domain/__tests__/setup.ts +++ b/packages/runtime/js-core/src/domain/__tests__/setup.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IExecutor } from '@flowgram.ai/runtime-interface'; import { MockLLMExecutor } from './executor/llm'; diff --git a/packages/runtime/js-core/src/domain/__tests__/utils/index.ts b/packages/runtime/js-core/src/domain/__tests__/utils/index.ts index 85797488..762f48a5 100644 --- a/packages/runtime/js-core/src/domain/__tests__/utils/index.ts +++ b/packages/runtime/js-core/src/domain/__tests__/utils/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { snapshotsToVOData } from './snapshot'; diff --git a/packages/runtime/js-core/src/domain/__tests__/utils/snapshot.ts b/packages/runtime/js-core/src/domain/__tests__/utils/snapshot.ts index 75ac2f33..2047c32c 100644 --- a/packages/runtime/js-core/src/domain/__tests__/utils/snapshot.ts +++ b/packages/runtime/js-core/src/domain/__tests__/utils/snapshot.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Snapshot, VOData } from '@flowgram.ai/runtime-interface'; export const snapshotsToVOData = (snapshots: Snapshot[]): VOData[] => diff --git a/packages/runtime/js-core/src/domain/container/index.test.ts b/packages/runtime/js-core/src/domain/container/index.test.ts index 79bd4857..3ecfa3b2 100644 --- a/packages/runtime/js-core/src/domain/container/index.test.ts +++ b/packages/runtime/js-core/src/domain/container/index.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { IEngine, IExecutor, IValidation } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/container/index.ts b/packages/runtime/js-core/src/domain/container/index.ts index 91f2dc2f..b78c3d67 100644 --- a/packages/runtime/js-core/src/domain/container/index.ts +++ b/packages/runtime/js-core/src/domain/container/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerService, IContainer, diff --git a/packages/runtime/js-core/src/domain/context/index.ts b/packages/runtime/js-core/src/domain/context/index.ts index d084214b..d6ce5fa3 100644 --- a/packages/runtime/js-core/src/domain/context/index.ts +++ b/packages/runtime/js-core/src/domain/context/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { InvokeParams, IContext, diff --git a/packages/runtime/js-core/src/domain/document/document/create-store.test.ts b/packages/runtime/js-core/src/domain/document/document/create-store.test.ts index b361faa0..95723c52 100644 --- a/packages/runtime/js-core/src/domain/document/document/create-store.test.ts +++ b/packages/runtime/js-core/src/domain/document/document/create-store.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { FlowGramNode, WorkflowPortType } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/document/document/create-store.ts b/packages/runtime/js-core/src/domain/document/document/create-store.ts index 68d7f07b..76ad41fe 100644 --- a/packages/runtime/js-core/src/domain/document/document/create-store.ts +++ b/packages/runtime/js-core/src/domain/document/document/create-store.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowGramNode, WorkflowPortType, diff --git a/packages/runtime/js-core/src/domain/document/document/flat-schema.test.ts b/packages/runtime/js-core/src/domain/document/document/flat-schema.test.ts index 1b235149..e6a867a2 100644 --- a/packages/runtime/js-core/src/domain/document/document/flat-schema.test.ts +++ b/packages/runtime/js-core/src/domain/document/document/flat-schema.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { FlowGramNode, WorkflowSchema } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/document/document/flat-schema.ts b/packages/runtime/js-core/src/domain/document/document/flat-schema.ts index 48e84b34..6e7891d4 100644 --- a/packages/runtime/js-core/src/domain/document/document/flat-schema.ts +++ b/packages/runtime/js-core/src/domain/document/document/flat-schema.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowNodeSchema, WorkflowSchema, FlowGramNode } from '@flowgram.ai/runtime-interface'; import { WorkflowRuntimeEdge } from '../entity'; diff --git a/packages/runtime/js-core/src/domain/document/document/index.test.ts b/packages/runtime/js-core/src/domain/document/document/index.test.ts index 240f4f8c..ee990393 100644 --- a/packages/runtime/js-core/src/domain/document/document/index.test.ts +++ b/packages/runtime/js-core/src/domain/document/document/index.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, it } from 'vitest'; import { TestSchemas } from '@workflow/__tests__/schemas'; diff --git a/packages/runtime/js-core/src/domain/document/document/index.ts b/packages/runtime/js-core/src/domain/document/document/index.ts index d8efb48a..c253ed27 100644 --- a/packages/runtime/js-core/src/domain/document/document/index.ts +++ b/packages/runtime/js-core/src/domain/document/document/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type WorkflowSchema, FlowGramNode, diff --git a/packages/runtime/js-core/src/domain/document/entity/edge/index.test.ts b/packages/runtime/js-core/src/domain/document/entity/edge/index.test.ts index 35fe88b2..dea98483 100644 --- a/packages/runtime/js-core/src/domain/document/entity/edge/index.test.ts +++ b/packages/runtime/js-core/src/domain/document/entity/edge/index.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { WorkflowEdgeSchema, CreateEdgeParams, INode, IPort } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/document/entity/edge/index.ts b/packages/runtime/js-core/src/domain/document/entity/edge/index.ts index d135403e..71861595 100644 --- a/packages/runtime/js-core/src/domain/document/entity/edge/index.ts +++ b/packages/runtime/js-core/src/domain/document/entity/edge/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowEdgeSchema, CreateEdgeParams, diff --git a/packages/runtime/js-core/src/domain/document/entity/index.ts b/packages/runtime/js-core/src/domain/document/entity/index.ts index e2556c36..b85e8398 100644 --- a/packages/runtime/js-core/src/domain/document/entity/index.ts +++ b/packages/runtime/js-core/src/domain/document/entity/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowRuntimeEdge } from './edge'; export { WorkflowRuntimeNode } from './node'; export { WorkflowRuntimePort } from './port'; diff --git a/packages/runtime/js-core/src/domain/document/entity/node/index.test.ts b/packages/runtime/js-core/src/domain/document/entity/node/index.test.ts index 61c98b7a..43e38767 100644 --- a/packages/runtime/js-core/src/domain/document/entity/node/index.test.ts +++ b/packages/runtime/js-core/src/domain/document/entity/node/index.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { FlowGramNode, diff --git a/packages/runtime/js-core/src/domain/document/entity/node/index.ts b/packages/runtime/js-core/src/domain/document/entity/node/index.ts index b2329c1e..f03fdaa9 100644 --- a/packages/runtime/js-core/src/domain/document/entity/node/index.ts +++ b/packages/runtime/js-core/src/domain/document/entity/node/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowGramNode, PositionSchema, diff --git a/packages/runtime/js-core/src/domain/document/entity/port/index.test.ts b/packages/runtime/js-core/src/domain/document/entity/port/index.test.ts index dec6b4ab..37838267 100644 --- a/packages/runtime/js-core/src/domain/document/entity/port/index.test.ts +++ b/packages/runtime/js-core/src/domain/document/entity/port/index.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { WorkflowPortType, CreatePortParams, IEdge, INode } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/document/entity/port/index.ts b/packages/runtime/js-core/src/domain/document/entity/port/index.ts index d3a23e97..48a62485 100644 --- a/packages/runtime/js-core/src/domain/document/entity/port/index.ts +++ b/packages/runtime/js-core/src/domain/document/entity/port/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowPortType, CreatePortParams, diff --git a/packages/runtime/js-core/src/domain/document/index.ts b/packages/runtime/js-core/src/domain/document/index.ts index a14cb15d..0c87693e 100644 --- a/packages/runtime/js-core/src/domain/document/index.ts +++ b/packages/runtime/js-core/src/domain/document/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowRuntimeDocument } from './document'; diff --git a/packages/runtime/js-core/src/domain/engine/index.test.ts b/packages/runtime/js-core/src/domain/engine/index.test.ts index dead56c8..5b4f1e57 100644 --- a/packages/runtime/js-core/src/domain/engine/index.test.ts +++ b/packages/runtime/js-core/src/domain/engine/index.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { TestSchemas } from '@workflow/__tests__/schemas'; diff --git a/packages/runtime/js-core/src/domain/engine/index.ts b/packages/runtime/js-core/src/domain/engine/index.ts index 0fce5c33..63dd3a89 100644 --- a/packages/runtime/js-core/src/domain/engine/index.ts +++ b/packages/runtime/js-core/src/domain/engine/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { EngineServices, IEngine, diff --git a/packages/runtime/js-core/src/domain/executor/index.ts b/packages/runtime/js-core/src/domain/executor/index.ts index e5c46518..0e0da06b 100644 --- a/packages/runtime/js-core/src/domain/executor/index.ts +++ b/packages/runtime/js-core/src/domain/executor/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowGramNode } from '@flowgram.ai/runtime-interface'; import { ExecutionContext, diff --git a/packages/runtime/js-core/src/domain/io-center/index.ts b/packages/runtime/js-core/src/domain/io-center/index.ts index 316f99d0..e5c0c3a1 100644 --- a/packages/runtime/js-core/src/domain/io-center/index.ts +++ b/packages/runtime/js-core/src/domain/io-center/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IIOCenter, IOData, WorkflowInputs, WorkflowOutputs } from '@flowgram.ai/runtime-interface'; export class WorkflowRuntimeIOCenter implements IIOCenter { diff --git a/packages/runtime/js-core/src/domain/report/index.ts b/packages/runtime/js-core/src/domain/report/index.ts index de1b3c42..8e0e5781 100644 --- a/packages/runtime/js-core/src/domain/report/index.ts +++ b/packages/runtime/js-core/src/domain/report/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowRuntimeReporter } from './reporter'; diff --git a/packages/runtime/js-core/src/domain/report/report-value-object/index.ts b/packages/runtime/js-core/src/domain/report/report-value-object/index.ts index 879faa52..731a2dca 100644 --- a/packages/runtime/js-core/src/domain/report/report-value-object/index.ts +++ b/packages/runtime/js-core/src/domain/report/report-value-object/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IReport, VOData } from '@flowgram.ai/runtime-interface'; import { uuid } from '@infra/utils'; diff --git a/packages/runtime/js-core/src/domain/report/reporter/index.ts b/packages/runtime/js-core/src/domain/report/reporter/index.ts index 5d901f42..4ee80514 100644 --- a/packages/runtime/js-core/src/domain/report/reporter/index.ts +++ b/packages/runtime/js-core/src/domain/report/reporter/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ISnapshotCenter, IReporter, diff --git a/packages/runtime/js-core/src/domain/snapshot/index.ts b/packages/runtime/js-core/src/domain/snapshot/index.ts index 2b8c57af..163585f2 100644 --- a/packages/runtime/js-core/src/domain/snapshot/index.ts +++ b/packages/runtime/js-core/src/domain/snapshot/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowRuntimeSnapshotCenter } from './snapshot-center'; diff --git a/packages/runtime/js-core/src/domain/snapshot/snapshot-center/index.ts b/packages/runtime/js-core/src/domain/snapshot/snapshot-center/index.ts index 43480bee..7be216d9 100644 --- a/packages/runtime/js-core/src/domain/snapshot/snapshot-center/index.ts +++ b/packages/runtime/js-core/src/domain/snapshot/snapshot-center/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Snapshot, ISnapshotCenter, SnapshotData, ISnapshot } from '@flowgram.ai/runtime-interface'; import { uuid } from '@infra/utils'; diff --git a/packages/runtime/js-core/src/domain/snapshot/snapshot-entity/index.ts b/packages/runtime/js-core/src/domain/snapshot/snapshot-entity/index.ts index f6d403c9..9d68a1c0 100644 --- a/packages/runtime/js-core/src/domain/snapshot/snapshot-entity/index.ts +++ b/packages/runtime/js-core/src/domain/snapshot/snapshot-entity/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ISnapshot, Snapshot, SnapshotData } from '@flowgram.ai/runtime-interface'; import { uuid } from '@infra/utils'; diff --git a/packages/runtime/js-core/src/domain/state/index.ts b/packages/runtime/js-core/src/domain/state/index.ts index 0b1af1dd..83281af3 100644 --- a/packages/runtime/js-core/src/domain/state/index.ts +++ b/packages/runtime/js-core/src/domain/state/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { IState, diff --git a/packages/runtime/js-core/src/domain/status/index.ts b/packages/runtime/js-core/src/domain/status/index.ts index c0db0c02..edb847f3 100644 --- a/packages/runtime/js-core/src/domain/status/index.ts +++ b/packages/runtime/js-core/src/domain/status/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowRuntimeStatusCenter } from './status-center'; diff --git a/packages/runtime/js-core/src/domain/status/status-center/index.ts b/packages/runtime/js-core/src/domain/status/status-center/index.ts index 3c9a693b..5cea275c 100644 --- a/packages/runtime/js-core/src/domain/status/status-center/index.ts +++ b/packages/runtime/js-core/src/domain/status/status-center/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IStatus, IStatusCenter, StatusData, WorkflowStatus } from '@flowgram.ai/runtime-interface'; import { WorkflowRuntimeStatus } from '../status-entity'; diff --git a/packages/runtime/js-core/src/domain/status/status-entity/index.ts b/packages/runtime/js-core/src/domain/status/status-entity/index.ts index 27edc535..162b3c77 100644 --- a/packages/runtime/js-core/src/domain/status/status-entity/index.ts +++ b/packages/runtime/js-core/src/domain/status/status-entity/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IStatus, StatusData, WorkflowStatus } from '@flowgram.ai/runtime-interface'; import { uuid } from '@infra/utils'; diff --git a/packages/runtime/js-core/src/domain/task/index.ts b/packages/runtime/js-core/src/domain/task/index.ts index de07a7f6..ef63815c 100644 --- a/packages/runtime/js-core/src/domain/task/index.ts +++ b/packages/runtime/js-core/src/domain/task/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IContext, ITask, diff --git a/packages/runtime/js-core/src/domain/validation/index.ts b/packages/runtime/js-core/src/domain/validation/index.ts index c3c64a79..ba4db4f9 100644 --- a/packages/runtime/js-core/src/domain/validation/index.ts +++ b/packages/runtime/js-core/src/domain/validation/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowSchema, IValidation, ValidationResult } from '@flowgram.ai/runtime-interface'; export class WorkflowRuntimeValidation implements IValidation { diff --git a/packages/runtime/js-core/src/domain/variable/index.ts b/packages/runtime/js-core/src/domain/variable/index.ts index da775ecb..e852998d 100644 --- a/packages/runtime/js-core/src/domain/variable/index.ts +++ b/packages/runtime/js-core/src/domain/variable/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { WorkflowRuntimeVariableStore } from './variable-store'; diff --git a/packages/runtime/js-core/src/domain/variable/variable-store/index.test.ts b/packages/runtime/js-core/src/domain/variable/variable-store/index.test.ts index 61b43405..3696d6be 100644 --- a/packages/runtime/js-core/src/domain/variable/variable-store/index.test.ts +++ b/packages/runtime/js-core/src/domain/variable/variable-store/index.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { beforeEach, describe, expect, it } from 'vitest'; import { IVariableStore, WorkflowVariableType } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/js-core/src/domain/variable/variable-store/index.ts b/packages/runtime/js-core/src/domain/variable/variable-store/index.ts index fa5064c9..0d24ac1a 100644 --- a/packages/runtime/js-core/src/domain/variable/variable-store/index.ts +++ b/packages/runtime/js-core/src/domain/variable/variable-store/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { get, set } from 'lodash-es'; import { WorkflowVariableType, diff --git a/packages/runtime/js-core/src/domain/variable/variable-value-object/index.ts b/packages/runtime/js-core/src/domain/variable/variable-value-object/index.ts index 33acd7e2..b425de58 100644 --- a/packages/runtime/js-core/src/domain/variable/variable-value-object/index.ts +++ b/packages/runtime/js-core/src/domain/variable/variable-value-object/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { IVariable, VOData } from '@flowgram.ai/runtime-interface'; import { uuid } from '@infra/utils'; diff --git a/packages/runtime/js-core/src/index.ts b/packages/runtime/js-core/src/index.ts index b1c13e73..ccca7ab4 100644 --- a/packages/runtime/js-core/src/index.ts +++ b/packages/runtime/js-core/src/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './api'; diff --git a/packages/runtime/js-core/src/infrastructure/index.ts b/packages/runtime/js-core/src/infrastructure/index.ts index 04bca77e..41becbe6 100644 --- a/packages/runtime/js-core/src/infrastructure/index.ts +++ b/packages/runtime/js-core/src/infrastructure/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export * from './utils'; diff --git a/packages/runtime/js-core/src/infrastructure/utils/delay.ts b/packages/runtime/js-core/src/infrastructure/utils/delay.ts index 4557adc6..bfa00cc9 100644 --- a/packages/runtime/js-core/src/infrastructure/utils/delay.ts +++ b/packages/runtime/js-core/src/infrastructure/utils/delay.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/packages/runtime/js-core/src/infrastructure/utils/index.ts b/packages/runtime/js-core/src/infrastructure/utils/index.ts index 1f176ec7..5b83c16d 100644 --- a/packages/runtime/js-core/src/infrastructure/utils/index.ts +++ b/packages/runtime/js-core/src/infrastructure/utils/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { delay } from './delay'; export { uuid } from './uuid'; export { WorkflowRuntimeType } from './runtime-type'; diff --git a/packages/runtime/js-core/src/infrastructure/utils/runtime-type.ts b/packages/runtime/js-core/src/infrastructure/utils/runtime-type.ts index 96e09668..b6ad7672 100644 --- a/packages/runtime/js-core/src/infrastructure/utils/runtime-type.ts +++ b/packages/runtime/js-core/src/infrastructure/utils/runtime-type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowVariableType } from '@flowgram.ai/runtime-interface'; export namespace WorkflowRuntimeType { diff --git a/packages/runtime/js-core/src/infrastructure/utils/uuid.ts b/packages/runtime/js-core/src/infrastructure/utils/uuid.ts index 8eb7c015..510aabc4 100644 --- a/packages/runtime/js-core/src/infrastructure/utils/uuid.ts +++ b/packages/runtime/js-core/src/infrastructure/utils/uuid.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { v4 } from 'uuid'; export const uuid = v4; diff --git a/packages/runtime/js-core/src/nodes/condition/handlers/array.ts b/packages/runtime/js-core/src/nodes/condition/handlers/array.ts index bb09b26a..ad4b3391 100644 --- a/packages/runtime/js-core/src/nodes/condition/handlers/array.ts +++ b/packages/runtime/js-core/src/nodes/condition/handlers/array.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ConditionHandler, ConditionOperation } from '../type'; diff --git a/packages/runtime/js-core/src/nodes/condition/handlers/boolean.ts b/packages/runtime/js-core/src/nodes/condition/handlers/boolean.ts index 01ddd1ee..83cca39a 100644 --- a/packages/runtime/js-core/src/nodes/condition/handlers/boolean.ts +++ b/packages/runtime/js-core/src/nodes/condition/handlers/boolean.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ConditionHandler, ConditionOperation } from '../type'; diff --git a/packages/runtime/js-core/src/nodes/condition/handlers/index.ts b/packages/runtime/js-core/src/nodes/condition/handlers/index.ts index 1467d955..dca65d10 100644 --- a/packages/runtime/js-core/src/nodes/condition/handlers/index.ts +++ b/packages/runtime/js-core/src/nodes/condition/handlers/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowVariableType } from '@flowgram.ai/runtime-interface'; import { ConditionHandlers } from '../type'; diff --git a/packages/runtime/js-core/src/nodes/condition/handlers/null.ts b/packages/runtime/js-core/src/nodes/condition/handlers/null.ts index ced17ef8..e501a7a0 100644 --- a/packages/runtime/js-core/src/nodes/condition/handlers/null.ts +++ b/packages/runtime/js-core/src/nodes/condition/handlers/null.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ConditionHandler, ConditionOperation } from '../type'; diff --git a/packages/runtime/js-core/src/nodes/condition/handlers/number.ts b/packages/runtime/js-core/src/nodes/condition/handlers/number.ts index 28697069..ecf284d2 100644 --- a/packages/runtime/js-core/src/nodes/condition/handlers/number.ts +++ b/packages/runtime/js-core/src/nodes/condition/handlers/number.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ConditionHandler, ConditionOperation } from '../type'; diff --git a/packages/runtime/js-core/src/nodes/condition/handlers/object.ts b/packages/runtime/js-core/src/nodes/condition/handlers/object.ts index e7fd7a83..c1bda20c 100644 --- a/packages/runtime/js-core/src/nodes/condition/handlers/object.ts +++ b/packages/runtime/js-core/src/nodes/condition/handlers/object.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ConditionHandler, ConditionOperation } from '../type'; diff --git a/packages/runtime/js-core/src/nodes/condition/handlers/string.ts b/packages/runtime/js-core/src/nodes/condition/handlers/string.ts index e5a78123..594d2363 100644 --- a/packages/runtime/js-core/src/nodes/condition/handlers/string.ts +++ b/packages/runtime/js-core/src/nodes/condition/handlers/string.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ConditionHandler, ConditionOperation } from '../type'; diff --git a/packages/runtime/js-core/src/nodes/condition/index.ts b/packages/runtime/js-core/src/nodes/condition/index.ts index 4be8156d..90cf0fca 100644 --- a/packages/runtime/js-core/src/nodes/condition/index.ts +++ b/packages/runtime/js-core/src/nodes/condition/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ExecutionContext, diff --git a/packages/runtime/js-core/src/nodes/condition/rules.ts b/packages/runtime/js-core/src/nodes/condition/rules.ts index 5c4740dc..6ef4fb33 100644 --- a/packages/runtime/js-core/src/nodes/condition/rules.ts +++ b/packages/runtime/js-core/src/nodes/condition/rules.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowVariableType } from '@flowgram.ai/runtime-interface'; import { ConditionOperation, ConditionRules } from './type'; diff --git a/packages/runtime/js-core/src/nodes/condition/type.ts b/packages/runtime/js-core/src/nodes/condition/type.ts index 22659830..1d2c6bab 100644 --- a/packages/runtime/js-core/src/nodes/condition/type.ts +++ b/packages/runtime/js-core/src/nodes/condition/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowVariableType, IFlowConstantRefValue, diff --git a/packages/runtime/js-core/src/nodes/end/index.ts b/packages/runtime/js-core/src/nodes/end/index.ts index c6ad6551..7ec6f025 100644 --- a/packages/runtime/js-core/src/nodes/end/index.ts +++ b/packages/runtime/js-core/src/nodes/end/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ExecutionContext, ExecutionResult, diff --git a/packages/runtime/js-core/src/nodes/index.ts b/packages/runtime/js-core/src/nodes/index.ts index c953671f..6a4318e7 100644 --- a/packages/runtime/js-core/src/nodes/index.ts +++ b/packages/runtime/js-core/src/nodes/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { INodeExecutorFactory } from '@flowgram.ai/runtime-interface'; import { StartExecutor } from './start'; diff --git a/packages/runtime/js-core/src/nodes/llm/index.ts b/packages/runtime/js-core/src/nodes/llm/index.ts index 4ce55d94..db8da639 100644 --- a/packages/runtime/js-core/src/nodes/llm/index.ts +++ b/packages/runtime/js-core/src/nodes/llm/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ChatOpenAI } from '@langchain/openai'; import { SystemMessage, HumanMessage, BaseMessageLike } from '@langchain/core/messages'; diff --git a/packages/runtime/js-core/src/nodes/loop/index.ts b/packages/runtime/js-core/src/nodes/loop/index.ts index 13f76752..fc9e6bc2 100644 --- a/packages/runtime/js-core/src/nodes/loop/index.ts +++ b/packages/runtime/js-core/src/nodes/loop/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { isNil } from 'lodash-es'; import { ExecutionContext, diff --git a/packages/runtime/js-core/src/nodes/start/index.ts b/packages/runtime/js-core/src/nodes/start/index.ts index b51de1d8..28adb5ad 100644 --- a/packages/runtime/js-core/src/nodes/start/index.ts +++ b/packages/runtime/js-core/src/nodes/start/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ExecutionContext, ExecutionResult, diff --git a/packages/runtime/js-core/vitest.config.ts b/packages/runtime/js-core/vitest.config.ts index e4e2c35b..a96df6fd 100644 --- a/packages/runtime/js-core/vitest.config.ts +++ b/packages/runtime/js-core/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { config } from "dotenv"; import path from 'path'; import { defineConfig } from 'vitest/config'; diff --git a/packages/runtime/nodejs/.eslintrc.cjs b/packages/runtime/nodejs/.eslintrc.cjs index 9c2f4ba5..c180e7ca 100644 --- a/packages/runtime/nodejs/.eslintrc.cjs +++ b/packages/runtime/nodejs/.eslintrc.cjs @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/runtime/nodejs/src/api/create-api.ts b/packages/runtime/nodejs/src/api/create-api.ts index 1c2abefc..473b7a5a 100644 --- a/packages/runtime/nodejs/src/api/create-api.ts +++ b/packages/runtime/nodejs/src/api/create-api.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import z from 'zod'; import { WorkflowRuntimeAPIs } from '@flowgram.ai/runtime-js'; import { FlowGramAPIMethod, FlowGramAPIName, FlowGramAPIs } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/nodejs/src/api/index.ts b/packages/runtime/nodejs/src/api/index.ts index ec640ef6..ffae37ad 100644 --- a/packages/runtime/nodejs/src/api/index.ts +++ b/packages/runtime/nodejs/src/api/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowGramAPINames } from '@flowgram.ai/runtime-interface'; import { APIRouter } from './type'; diff --git a/packages/runtime/nodejs/src/api/trpc.ts b/packages/runtime/nodejs/src/api/trpc.ts index 3a62ba7c..a21b0b40 100644 --- a/packages/runtime/nodejs/src/api/trpc.ts +++ b/packages/runtime/nodejs/src/api/trpc.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { OpenApiMeta } from 'trpc-openapi'; import { initTRPC } from '@trpc/server'; diff --git a/packages/runtime/nodejs/src/api/type.ts b/packages/runtime/nodejs/src/api/type.ts index 0f9aa56d..cd943a7b 100644 --- a/packages/runtime/nodejs/src/api/type.ts +++ b/packages/runtime/nodejs/src/api/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { BuildProcedure } from '@trpc/server'; import { FlowGramAPIDefine } from '@flowgram.ai/runtime-interface'; diff --git a/packages/runtime/nodejs/src/config/index.ts b/packages/runtime/nodejs/src/config/index.ts index 9e50faa2..71d651c9 100644 --- a/packages/runtime/nodejs/src/config/index.ts +++ b/packages/runtime/nodejs/src/config/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { ServerParams } from '@server/type'; export const ServerConfig: ServerParams = { diff --git a/packages/runtime/nodejs/src/index.ts b/packages/runtime/nodejs/src/index.ts index ce697545..56657d1a 100644 --- a/packages/runtime/nodejs/src/index.ts +++ b/packages/runtime/nodejs/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createServer } from '@server/index'; async function main() { diff --git a/packages/runtime/nodejs/src/server/context.ts b/packages/runtime/nodejs/src/server/context.ts index 20978063..d058e589 100644 --- a/packages/runtime/nodejs/src/server/context.ts +++ b/packages/runtime/nodejs/src/server/context.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import type { CreateFastifyContextOptions } from '@trpc/server/adapters/fastify'; export function createContext(ctx: CreateFastifyContextOptions) { diff --git a/packages/runtime/nodejs/src/server/docs.ts b/packages/runtime/nodejs/src/server/docs.ts index 3748b1b7..5a15f84f 100644 --- a/packages/runtime/nodejs/src/server/docs.ts +++ b/packages/runtime/nodejs/src/server/docs.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { generateOpenApiDocument } from 'trpc-openapi'; import { ServerConfig } from '@config/index'; diff --git a/packages/runtime/nodejs/src/server/index.ts b/packages/runtime/nodejs/src/server/index.ts index 3eba1b97..0e6721b8 100644 --- a/packages/runtime/nodejs/src/server/index.ts +++ b/packages/runtime/nodejs/src/server/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { fastifyTRPCOpenApiPlugin } from 'trpc-openapi'; import fastify from 'fastify'; import { fastifyTRPCPlugin } from '@trpc/server/adapters/fastify'; diff --git a/packages/runtime/nodejs/src/server/type.ts b/packages/runtime/nodejs/src/server/type.ts index c40f8cb8..142449bc 100644 --- a/packages/runtime/nodejs/src/server/type.ts +++ b/packages/runtime/nodejs/src/server/type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ServerInfoOutput } from '@flowgram.ai/runtime-interface'; export interface ServerParams extends Omit { diff --git a/packages/runtime/nodejs/vitest.config.ts b/packages/runtime/nodejs/vitest.config.ts index 1e8c3611..67ff2655 100644 --- a/packages/runtime/nodejs/vitest.config.ts +++ b/packages/runtime/nodejs/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { config } from "dotenv"; import path from 'path'; import { defineConfig } from 'vitest/config'; diff --git a/packages/variable-engine/variable-core/.eslintrc.js b/packages/variable-engine/variable-core/.eslintrc.js index a281f9e6..9bc818e5 100644 --- a/packages/variable-engine/variable-core/.eslintrc.js +++ b/packages/variable-engine/variable-core/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/variable-engine/variable-core/__mocks__/container.ts b/packages/variable-engine/variable-core/__mocks__/container.ts index 9d742d2a..9accbf51 100644 --- a/packages/variable-engine/variable-core/__mocks__/container.ts +++ b/packages/variable-engine/variable-core/__mocks__/container.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Container, ContainerModule, interfaces } from 'inversify'; import { ScopeChain, VariableContainerModule } from '../src'; import { MockScopeChain } from './mock-chain'; diff --git a/packages/variable-engine/variable-core/__mocks__/mock-chain.ts b/packages/variable-engine/variable-core/__mocks__/mock-chain.ts index a749eeba..50a71ee7 100644 --- a/packages/variable-engine/variable-core/__mocks__/mock-chain.ts +++ b/packages/variable-engine/variable-core/__mocks__/mock-chain.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ScopeChain, Scope } from '../src'; /** diff --git a/packages/variable-engine/variable-core/__mocks__/variables.ts b/packages/variable-engine/variable-core/__mocks__/variables.ts index 29308e81..866596d0 100644 --- a/packages/variable-engine/variable-core/__mocks__/variables.ts +++ b/packages/variable-engine/variable-core/__mocks__/variables.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind, ObjectJSON, VariableDeclarationListJSON } from '../src'; export const simpleVariableList = { diff --git a/packages/variable-engine/variable-core/__tests__/ast/ast-decorators.test.ts b/packages/variable-engine/variable-core/__tests__/ast/ast-decorators.test.ts index 0cd72f72..7f96720c 100644 --- a/packages/variable-engine/variable-core/__tests__/ast/ast-decorators.test.ts +++ b/packages/variable-engine/variable-core/__tests__/ast/ast-decorators.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { VariableEngine } from '../../src/variable-engine'; diff --git a/packages/variable-engine/variable-core/__tests__/ast/key-path-expression-v2.test.ts b/packages/variable-engine/variable-core/__tests__/ast/key-path-expression-v2.test.ts index dcbf39ea..26e514ec 100644 --- a/packages/variable-engine/variable-core/__tests__/ast/key-path-expression-v2.test.ts +++ b/packages/variable-engine/variable-core/__tests__/ast/key-path-expression-v2.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi, describe, test, expect } from 'vitest'; import { getParentFields } from '../../src/ast/utils/variable-field'; diff --git a/packages/variable-engine/variable-core/__tests__/ast/variable-declaration.test.ts b/packages/variable-engine/variable-core/__tests__/ast/variable-declaration.test.ts index c5f2c0a4..84fec092 100644 --- a/packages/variable-engine/variable-core/__tests__/ast/variable-declaration.test.ts +++ b/packages/variable-engine/variable-core/__tests__/ast/variable-declaration.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi, describe, test, expect } from 'vitest'; import { diff --git a/packages/variable-engine/variable-core/__tests__/ast/variable-match.test.ts b/packages/variable-engine/variable-core/__tests__/ast/variable-match.test.ts index 564de938..d625d5a3 100644 --- a/packages/variable-engine/variable-core/__tests__/ast/variable-match.test.ts +++ b/packages/variable-engine/variable-core/__tests__/ast/variable-match.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi, describe, test, expect } from 'vitest'; import { diff --git a/packages/variable-engine/variable-core/__tests__/ast/variable-throw-errors.test.ts b/packages/variable-engine/variable-core/__tests__/ast/variable-throw-errors.test.ts index c9591df1..76d3422e 100644 --- a/packages/variable-engine/variable-core/__tests__/ast/variable-throw-errors.test.ts +++ b/packages/variable-engine/variable-core/__tests__/ast/variable-throw-errors.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { VariableEngine } from '../../src/variable-engine'; diff --git a/packages/variable-engine/variable-core/__tests__/ast/variable-type-equal.test.ts b/packages/variable-engine/variable-core/__tests__/ast/variable-type-equal.test.ts index 82214d40..72054e8b 100644 --- a/packages/variable-engine/variable-core/__tests__/ast/variable-type-equal.test.ts +++ b/packages/variable-engine/variable-core/__tests__/ast/variable-type-equal.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { VariableEngine } from '../../src/variable-engine'; diff --git a/packages/variable-engine/variable-core/__tests__/ast/variable-with-initializer.test.ts b/packages/variable-engine/variable-core/__tests__/ast/variable-with-initializer.test.ts index 78878201..e9ef0b4e 100644 --- a/packages/variable-engine/variable-core/__tests__/ast/variable-with-initializer.test.ts +++ b/packages/variable-engine/variable-core/__tests__/ast/variable-with-initializer.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi, describe, test, expect } from 'vitest'; import { ASTKind, VariableEngine, VariableDeclaration, ASTFactory } from '../../src'; diff --git a/packages/variable-engine/variable-core/__tests__/case-run-down/blockwise-python-expression.test.ts b/packages/variable-engine/variable-core/__tests__/case-run-down/blockwise-python-expression.test.ts index b67fa675..c8a59f76 100644 --- a/packages/variable-engine/variable-core/__tests__/case-run-down/blockwise-python-expression.test.ts +++ b/packages/variable-engine/variable-core/__tests__/case-run-down/blockwise-python-expression.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { isEqual } from 'lodash'; import { Container, injectable } from 'inversify'; diff --git a/packages/variable-engine/variable-core/__tests__/case-run-down/variable-rename-listener.test.ts b/packages/variable-engine/variable-core/__tests__/case-run-down/variable-rename-listener.test.ts index 71e64242..814e0879 100644 --- a/packages/variable-engine/variable-core/__tests__/case-run-down/variable-rename-listener.test.ts +++ b/packages/variable-engine/variable-core/__tests__/case-run-down/variable-rename-listener.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi, describe, test, beforeEach, expect } from 'vitest'; import { cloneDeep } from 'lodash'; diff --git a/packages/variable-engine/variable-core/__tests__/scope/variable-engine.test.ts b/packages/variable-engine/variable-core/__tests__/scope/variable-engine.test.ts index 6b881e2d..d479580e 100644 --- a/packages/variable-engine/variable-core/__tests__/scope/variable-engine.test.ts +++ b/packages/variable-engine/variable-core/__tests__/scope/variable-engine.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { vi, describe, test, expect } from 'vitest'; import { VariableEngine } from '../../src'; diff --git a/packages/variable-engine/variable-core/src/ast/ast-node.ts b/packages/variable-engine/variable-core/src/ast/ast-node.ts index c738fc5a..fb61e85c 100644 --- a/packages/variable-engine/variable-core/src/ast/ast-node.ts +++ b/packages/variable-engine/variable-core/src/ast/ast-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { BehaviorSubject, animationFrameScheduler, diff --git a/packages/variable-engine/variable-core/src/ast/ast-registers.ts b/packages/variable-engine/variable-core/src/ast/ast-registers.ts index 45c562f9..05bad488 100644 --- a/packages/variable-engine/variable-core/src/ast/ast-registers.ts +++ b/packages/variable-engine/variable-core/src/ast/ast-registers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { omit } from 'lodash'; import { injectable } from 'inversify'; diff --git a/packages/variable-engine/variable-core/src/ast/common/data-node.ts b/packages/variable-engine/variable-core/src/ast/common/data-node.ts index b321a01d..88f9a80e 100644 --- a/packages/variable-engine/variable-core/src/ast/common/data-node.ts +++ b/packages/variable-engine/variable-core/src/ast/common/data-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { shallowEqual } from 'fast-equals'; import { ASTKind, ASTNodeJSON } from '../types'; diff --git a/packages/variable-engine/variable-core/src/ast/common/index.ts b/packages/variable-engine/variable-core/src/ast/common/index.ts index 2c8e9021..1a9e71af 100644 --- a/packages/variable-engine/variable-core/src/ast/common/index.ts +++ b/packages/variable-engine/variable-core/src/ast/common/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { DataNode } from './data-node'; export { ListNode, type ListNodeJSON } from './list-node'; export { MapNode, type MapNodeJSON } from './map-node'; diff --git a/packages/variable-engine/variable-core/src/ast/common/list-node.ts b/packages/variable-engine/variable-core/src/ast/common/list-node.ts index 1e1a4e0e..77bc129a 100644 --- a/packages/variable-engine/variable-core/src/ast/common/list-node.ts +++ b/packages/variable-engine/variable-core/src/ast/common/list-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind, ASTNodeJSON } from '../types'; import { ASTNode } from '../ast-node'; diff --git a/packages/variable-engine/variable-core/src/ast/common/map-node.ts b/packages/variable-engine/variable-core/src/ast/common/map-node.ts index cddd9b88..c6541546 100644 --- a/packages/variable-engine/variable-core/src/ast/common/map-node.ts +++ b/packages/variable-engine/variable-core/src/ast/common/map-node.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { updateChildNodeHelper } from '../utils/helpers'; import { ASTKind, ASTNodeJSON } from '../types'; import { ASTNode } from '../ast-node'; diff --git a/packages/variable-engine/variable-core/src/ast/declaration/base-variable-field.ts b/packages/variable-engine/variable-core/src/ast/declaration/base-variable-field.ts index 28961f01..33ca45eb 100644 --- a/packages/variable-engine/variable-core/src/ast/declaration/base-variable-field.ts +++ b/packages/variable-engine/variable-core/src/ast/declaration/base-variable-field.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { shallowEqual } from 'fast-equals'; import { getParentFields } from '../utils/variable-field'; diff --git a/packages/variable-engine/variable-core/src/ast/declaration/index.ts b/packages/variable-engine/variable-core/src/ast/declaration/index.ts index a26c9145..9469a15e 100644 --- a/packages/variable-engine/variable-core/src/ast/declaration/index.ts +++ b/packages/variable-engine/variable-core/src/ast/declaration/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { VariableDeclaration, type VariableDeclarationJSON } from './variable-declaration'; export { VariableDeclarationList, diff --git a/packages/variable-engine/variable-core/src/ast/declaration/property.ts b/packages/variable-engine/variable-core/src/ast/declaration/property.ts index 6d154e21..3df5033d 100644 --- a/packages/variable-engine/variable-core/src/ast/declaration/property.ts +++ b/packages/variable-engine/variable-core/src/ast/declaration/property.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind } from '../types'; import { BaseVariableField, BaseVariableFieldJSON } from './base-variable-field'; diff --git a/packages/variable-engine/variable-core/src/ast/declaration/variable-declaration-list.ts b/packages/variable-engine/variable-core/src/ast/declaration/variable-declaration-list.ts index 122d5189..22b10e51 100644 --- a/packages/variable-engine/variable-core/src/ast/declaration/variable-declaration-list.ts +++ b/packages/variable-engine/variable-core/src/ast/declaration/variable-declaration-list.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind, ASTNodeJSON } from '../types'; import { GlobalEventActionType } from '../types'; import { ASTNode } from '../ast-node'; diff --git a/packages/variable-engine/variable-core/src/ast/declaration/variable-declaration.ts b/packages/variable-engine/variable-core/src/ast/declaration/variable-declaration.ts index b7c25db3..df873054 100644 --- a/packages/variable-engine/variable-core/src/ast/declaration/variable-declaration.ts +++ b/packages/variable-engine/variable-core/src/ast/declaration/variable-declaration.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind, GlobalEventActionType, type CreateASTParams } from '../types'; import { ASTNode } from '../ast-node'; import { BaseVariableField, BaseVariableFieldJSON } from './base-variable-field'; diff --git a/packages/variable-engine/variable-core/src/ast/expression/base-expression.ts b/packages/variable-engine/variable-core/src/ast/expression/base-expression.ts index 7ceb8696..36cf0109 100644 --- a/packages/variable-engine/variable-core/src/ast/expression/base-expression.ts +++ b/packages/variable-engine/variable-core/src/ast/expression/base-expression.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type Observable, distinctUntilChanged, diff --git a/packages/variable-engine/variable-core/src/ast/expression/enumerate-expression.ts b/packages/variable-engine/variable-core/src/ast/expression/enumerate-expression.ts index 4a8641da..13725b3a 100644 --- a/packages/variable-engine/variable-core/src/ast/expression/enumerate-expression.ts +++ b/packages/variable-engine/variable-core/src/ast/expression/enumerate-expression.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind, ASTNodeJSON } from '../types'; import { ArrayType } from '../type/array'; import { BaseType } from '../type'; diff --git a/packages/variable-engine/variable-core/src/ast/expression/index.ts b/packages/variable-engine/variable-core/src/ast/expression/index.ts index 8f1ef075..550c0463 100644 --- a/packages/variable-engine/variable-core/src/ast/expression/index.ts +++ b/packages/variable-engine/variable-core/src/ast/expression/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { BaseExpression } from './base-expression'; export { KeyPathExpression, type KeyPathExpressionJSON } from './keypath-expression'; export { EnumerateExpression, type EnumerateExpressionJSON } from './enumerate-expression'; diff --git a/packages/variable-engine/variable-core/src/ast/expression/keypath-expression-v2.ts b/packages/variable-engine/variable-core/src/ast/expression/keypath-expression-v2.ts index 25c48242..124fd6ad 100644 --- a/packages/variable-engine/variable-core/src/ast/expression/keypath-expression-v2.ts +++ b/packages/variable-engine/variable-core/src/ast/expression/keypath-expression-v2.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { shallowEqual } from 'fast-equals'; import { checkRefCycle } from '../utils/expression'; diff --git a/packages/variable-engine/variable-core/src/ast/expression/keypath-expression.ts b/packages/variable-engine/variable-core/src/ast/expression/keypath-expression.ts index c89fe5aa..32b56686 100644 --- a/packages/variable-engine/variable-core/src/ast/expression/keypath-expression.ts +++ b/packages/variable-engine/variable-core/src/ast/expression/keypath-expression.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { shallowEqual } from 'fast-equals'; import { ASTNodeJSON, ASTKind, CreateASTParams } from '../types'; diff --git a/packages/variable-engine/variable-core/src/ast/expression/wrap-array-expression.ts b/packages/variable-engine/variable-core/src/ast/expression/wrap-array-expression.ts index 5fb3d863..862e42ea 100644 --- a/packages/variable-engine/variable-core/src/ast/expression/wrap-array-expression.ts +++ b/packages/variable-engine/variable-core/src/ast/expression/wrap-array-expression.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { postConstructAST } from '../utils/inversify'; import { ASTKind, ASTNodeJSON } from '../types'; import { BaseType } from '../type'; diff --git a/packages/variable-engine/variable-core/src/ast/factory.ts b/packages/variable-engine/variable-core/src/ast/factory.ts index 8fb73982..275f1073 100644 --- a/packages/variable-engine/variable-core/src/ast/factory.ts +++ b/packages/variable-engine/variable-core/src/ast/factory.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind, ASTNodeJSON } from './types'; import { MapJSON } from './type/map'; import { ArrayJSON } from './type/array'; diff --git a/packages/variable-engine/variable-core/src/ast/flags.ts b/packages/variable-engine/variable-core/src/ast/flags.ts index 4cbeb608..513038a2 100644 --- a/packages/variable-engine/variable-core/src/ast/flags.ts +++ b/packages/variable-engine/variable-core/src/ast/flags.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export enum ASTNodeFlags { None = 0, diff --git a/packages/variable-engine/variable-core/src/ast/index.ts b/packages/variable-engine/variable-core/src/ast/index.ts index d7cf9ecf..5e2f678e 100644 --- a/packages/variable-engine/variable-core/src/ast/index.ts +++ b/packages/variable-engine/variable-core/src/ast/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { type ASTNodeJSON, ASTKind, diff --git a/packages/variable-engine/variable-core/src/ast/match.ts b/packages/variable-engine/variable-core/src/ast/match.ts index 0a0f9dc2..41dc62e8 100644 --- a/packages/variable-engine/variable-core/src/ast/match.ts +++ b/packages/variable-engine/variable-core/src/ast/match.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind } from './types'; import { type StringType, diff --git a/packages/variable-engine/variable-core/src/ast/type/array.ts b/packages/variable-engine/variable-core/src/ast/type/array.ts index dbac28b0..8d674376 100644 --- a/packages/variable-engine/variable-core/src/ast/type/array.ts +++ b/packages/variable-engine/variable-core/src/ast/type/array.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { parseTypeJsonOrKind } from '../utils/helpers'; import { ASTKind, ASTNodeJSON, ASTNodeJSONOrKind } from '../types'; import { ASTNodeFlags } from '../flags'; diff --git a/packages/variable-engine/variable-core/src/ast/type/base-type.ts b/packages/variable-engine/variable-core/src/ast/type/base-type.ts index d328ffb2..6782996b 100644 --- a/packages/variable-engine/variable-core/src/ast/type/base-type.ts +++ b/packages/variable-engine/variable-core/src/ast/type/base-type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { parseTypeJsonOrKind } from '../utils/helpers'; import { ASTKind, ASTNodeJSON, ASTNodeJSONOrKind } from '../types'; import { ASTNodeFlags } from '../flags'; diff --git a/packages/variable-engine/variable-core/src/ast/type/boolean.ts b/packages/variable-engine/variable-core/src/ast/type/boolean.ts index f5387c40..1b01d8a1 100644 --- a/packages/variable-engine/variable-core/src/ast/type/boolean.ts +++ b/packages/variable-engine/variable-core/src/ast/type/boolean.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind } from '../types'; import { BaseType } from './base-type'; diff --git a/packages/variable-engine/variable-core/src/ast/type/custom-type.ts b/packages/variable-engine/variable-core/src/ast/type/custom-type.ts index fc175272..de0d1d84 100644 --- a/packages/variable-engine/variable-core/src/ast/type/custom-type.ts +++ b/packages/variable-engine/variable-core/src/ast/type/custom-type.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { parseTypeJsonOrKind } from '../utils/helpers'; import { ASTKind, ASTNodeJSONOrKind } from '../types'; import { type UnionJSON } from './union'; diff --git a/packages/variable-engine/variable-core/src/ast/type/index.ts b/packages/variable-engine/variable-core/src/ast/type/index.ts index 72fcfe84..f3efe261 100644 --- a/packages/variable-engine/variable-core/src/ast/type/index.ts +++ b/packages/variable-engine/variable-core/src/ast/type/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { StringType } from './string'; export { IntegerType } from './integer'; export { BooleanType } from './boolean'; diff --git a/packages/variable-engine/variable-core/src/ast/type/integer.ts b/packages/variable-engine/variable-core/src/ast/type/integer.ts index dbf4569b..0a95ee69 100644 --- a/packages/variable-engine/variable-core/src/ast/type/integer.ts +++ b/packages/variable-engine/variable-core/src/ast/type/integer.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind } from '../types'; import { ASTNodeFlags } from '../flags'; import { BaseType } from './base-type'; diff --git a/packages/variable-engine/variable-core/src/ast/type/map.ts b/packages/variable-engine/variable-core/src/ast/type/map.ts index 7829ab86..97de3f73 100644 --- a/packages/variable-engine/variable-core/src/ast/type/map.ts +++ b/packages/variable-engine/variable-core/src/ast/type/map.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { parseTypeJsonOrKind } from '../utils/helpers'; import { ASTKind, ASTNodeJSON, ASTNodeJSONOrKind } from '../types'; import { BaseType } from './base-type'; diff --git a/packages/variable-engine/variable-core/src/ast/type/number.ts b/packages/variable-engine/variable-core/src/ast/type/number.ts index 834fcadd..e457c7c6 100644 --- a/packages/variable-engine/variable-core/src/ast/type/number.ts +++ b/packages/variable-engine/variable-core/src/ast/type/number.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind } from '../types'; import { BaseType } from './base-type'; diff --git a/packages/variable-engine/variable-core/src/ast/type/object.ts b/packages/variable-engine/variable-core/src/ast/type/object.ts index f6ecc80c..9deb050f 100644 --- a/packages/variable-engine/variable-core/src/ast/type/object.ts +++ b/packages/variable-engine/variable-core/src/ast/type/object.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { xor } from 'lodash'; import { parseTypeJsonOrKind } from '../utils/helpers'; diff --git a/packages/variable-engine/variable-core/src/ast/type/string.ts b/packages/variable-engine/variable-core/src/ast/type/string.ts index 04bc38f4..0eebc34c 100644 --- a/packages/variable-engine/variable-core/src/ast/type/string.ts +++ b/packages/variable-engine/variable-core/src/ast/type/string.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTKind } from '../types'; import { ASTNodeFlags } from '../flags'; import { BaseType } from './base-type'; diff --git a/packages/variable-engine/variable-core/src/ast/type/union.ts b/packages/variable-engine/variable-core/src/ast/type/union.ts index efaca382..e99de3fa 100644 --- a/packages/variable-engine/variable-core/src/ast/type/union.ts +++ b/packages/variable-engine/variable-core/src/ast/type/union.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTNodeJSONOrKind } from '../types'; export interface UnionJSON { diff --git a/packages/variable-engine/variable-core/src/ast/types.ts b/packages/variable-engine/variable-core/src/ast/types.ts index 3c8933d1..6af5f345 100644 --- a/packages/variable-engine/variable-core/src/ast/types.ts +++ b/packages/variable-engine/variable-core/src/ast/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { type Observer } from 'rxjs'; import { type Scope } from '../scope'; diff --git a/packages/variable-engine/variable-core/src/ast/utils/expression.ts b/packages/variable-engine/variable-core/src/ast/utils/expression.ts index d886cf6c..484fdfe2 100644 --- a/packages/variable-engine/variable-core/src/ast/utils/expression.ts +++ b/packages/variable-engine/variable-core/src/ast/utils/expression.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { intersection } from 'lodash'; import { ASTNodeFlags } from '../flags'; diff --git a/packages/variable-engine/variable-core/src/ast/utils/helpers.ts b/packages/variable-engine/variable-core/src/ast/utils/helpers.ts index bef94a74..c6737bdd 100644 --- a/packages/variable-engine/variable-core/src/ast/utils/helpers.ts +++ b/packages/variable-engine/variable-core/src/ast/utils/helpers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTNodeJSON, ASTNodeJSONOrKind } from '../types'; import { ASTMatch } from '../match'; import { ASTNode } from '../ast-node'; diff --git a/packages/variable-engine/variable-core/src/ast/utils/inversify.ts b/packages/variable-engine/variable-core/src/ast/utils/inversify.ts index 90981ceb..ff9fd74a 100644 --- a/packages/variable-engine/variable-core/src/ast/utils/inversify.ts +++ b/packages/variable-engine/variable-core/src/ast/utils/inversify.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { type ASTNode } from '../ast-node'; diff --git a/packages/variable-engine/variable-core/src/ast/utils/observable.ts b/packages/variable-engine/variable-core/src/ast/utils/observable.ts index e69de29b..77723d8d 100644 --- a/packages/variable-engine/variable-core/src/ast/utils/observable.ts +++ b/packages/variable-engine/variable-core/src/ast/utils/observable.ts @@ -0,0 +1,5 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + diff --git a/packages/variable-engine/variable-core/src/ast/utils/variable-field.ts b/packages/variable-engine/variable-core/src/ast/utils/variable-field.ts index 99bd15c8..00d096a0 100644 --- a/packages/variable-engine/variable-core/src/ast/utils/variable-field.ts +++ b/packages/variable-engine/variable-core/src/ast/utils/variable-field.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ASTNodeFlags } from '../flags'; import { BaseVariableField } from '../declaration'; import { ASTNode } from '../ast-node'; diff --git a/packages/variable-engine/variable-core/src/index.ts b/packages/variable-engine/variable-core/src/index.ts index 66fd06df..1d62eaeb 100644 --- a/packages/variable-engine/variable-core/src/index.ts +++ b/packages/variable-engine/variable-core/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { VariableContainerModule } from './variable-container-module'; export { VariableEngine } from './variable-engine'; export { VariableEngineProvider } from './providers'; diff --git a/packages/variable-engine/variable-core/src/providers.ts b/packages/variable-engine/variable-core/src/providers.ts index 50dbc139..0af4225a 100644 --- a/packages/variable-engine/variable-core/src/providers.ts +++ b/packages/variable-engine/variable-core/src/providers.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { interfaces } from 'inversify'; import { type VariableEngine } from './variable-engine'; diff --git a/packages/variable-engine/variable-core/src/react/context.tsx b/packages/variable-engine/variable-core/src/react/context.tsx index 911958f4..67a99259 100644 --- a/packages/variable-engine/variable-core/src/react/context.tsx +++ b/packages/variable-engine/variable-core/src/react/context.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { createContext, useContext } from 'react'; import { Scope } from '../scope'; diff --git a/packages/variable-engine/variable-core/src/react/hooks/useAvailableVariables.ts b/packages/variable-engine/variable-core/src/react/hooks/useAvailableVariables.ts index 557afda2..70254b83 100644 --- a/packages/variable-engine/variable-core/src/react/hooks/useAvailableVariables.ts +++ b/packages/variable-engine/variable-core/src/react/hooks/useAvailableVariables.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { useRefresh, useService } from '@flowgram.ai/core'; diff --git a/packages/variable-engine/variable-core/src/react/hooks/useScopeAvailable.ts b/packages/variable-engine/variable-core/src/react/hooks/useScopeAvailable.ts index 28bc89b2..08f5c42b 100644 --- a/packages/variable-engine/variable-core/src/react/hooks/useScopeAvailable.ts +++ b/packages/variable-engine/variable-core/src/react/hooks/useScopeAvailable.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useEffect } from 'react'; import { useRefresh } from '@flowgram.ai/core'; diff --git a/packages/variable-engine/variable-core/src/react/hooks/useScopeOutputVariables.ts b/packages/variable-engine/variable-core/src/react/hooks/useScopeOutputVariables.ts index 86a311a0..309cb5ad 100644 --- a/packages/variable-engine/variable-core/src/react/hooks/useScopeOutputVariables.ts +++ b/packages/variable-engine/variable-core/src/react/hooks/useScopeOutputVariables.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { useCallback, useEffect, useMemo, useState } from 'react'; import { DisposableCollection } from '@flowgram.ai/utils'; diff --git a/packages/variable-engine/variable-core/src/react/index.tsx b/packages/variable-engine/variable-core/src/react/index.tsx index 4d8cddb7..23ab6c02 100644 --- a/packages/variable-engine/variable-core/src/react/index.tsx +++ b/packages/variable-engine/variable-core/src/react/index.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { ScopeProvider, useCurrentScope, useScopeContext } from './context'; export { useScopeAvailable } from './hooks/useScopeAvailable'; export { useAvailableVariables } from './hooks/useAvailableVariables'; diff --git a/packages/variable-engine/variable-core/src/scope/datas/index.ts b/packages/variable-engine/variable-core/src/scope/datas/index.ts index ea86cdf0..6fa32880 100644 --- a/packages/variable-engine/variable-core/src/scope/datas/index.ts +++ b/packages/variable-engine/variable-core/src/scope/datas/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { ScopeOutputData } from './scope-output-data'; export { ScopeAvailableData } from './scope-available-data'; export { ScopeEventData } from './scope-event-data'; diff --git a/packages/variable-engine/variable-core/src/scope/datas/scope-available-data.ts b/packages/variable-engine/variable-core/src/scope/datas/scope-available-data.ts index 34bc5d45..10d42583 100644 --- a/packages/variable-engine/variable-core/src/scope/datas/scope-available-data.ts +++ b/packages/variable-engine/variable-core/src/scope/datas/scope-available-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Observable, Subject, diff --git a/packages/variable-engine/variable-core/src/scope/datas/scope-event-data.ts b/packages/variable-engine/variable-core/src/scope/datas/scope-event-data.ts index c62344eb..62f06fcc 100644 --- a/packages/variable-engine/variable-core/src/scope/datas/scope-event-data.ts +++ b/packages/variable-engine/variable-core/src/scope/datas/scope-event-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Subject, filter } from 'rxjs'; import { Disposable } from '@flowgram.ai/utils'; diff --git a/packages/variable-engine/variable-core/src/scope/datas/scope-output-data.ts b/packages/variable-engine/variable-core/src/scope/datas/scope-output-data.ts index aae76602..23739f97 100644 --- a/packages/variable-engine/variable-core/src/scope/datas/scope-output-data.ts +++ b/packages/variable-engine/variable-core/src/scope/datas/scope-output-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { VariableTable } from '../variable-table'; import { IVariableTable } from '../types'; import { type Scope } from '../scope'; diff --git a/packages/variable-engine/variable-core/src/scope/index.ts b/packages/variable-engine/variable-core/src/scope/index.ts index b9c0b18a..c0fc3ff0 100644 --- a/packages/variable-engine/variable-core/src/scope/index.ts +++ b/packages/variable-engine/variable-core/src/scope/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { ScopeChain } from './scope-chain'; export { Scope } from './scope'; export { ScopeOutputData } from './datas'; diff --git a/packages/variable-engine/variable-core/src/scope/scope-chain.ts b/packages/variable-engine/variable-core/src/scope/scope-chain.ts index 4b373e0e..cd2125f4 100644 --- a/packages/variable-engine/variable-core/src/scope/scope-chain.ts +++ b/packages/variable-engine/variable-core/src/scope/scope-chain.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable } from 'inversify'; import { DisposableCollection, type Event } from '@flowgram.ai/utils'; diff --git a/packages/variable-engine/variable-core/src/scope/scope.ts b/packages/variable-engine/variable-core/src/scope/scope.ts index 8c95a7ff..9b24efbc 100644 --- a/packages/variable-engine/variable-core/src/scope/scope.ts +++ b/packages/variable-engine/variable-core/src/scope/scope.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { DisposableCollection } from '@flowgram.ai/utils'; import { type VariableEngine } from '../variable-engine'; diff --git a/packages/variable-engine/variable-core/src/scope/types.ts b/packages/variable-engine/variable-core/src/scope/types.ts index 8bb47283..85f94c35 100644 --- a/packages/variable-engine/variable-core/src/scope/types.ts +++ b/packages/variable-engine/variable-core/src/scope/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Event, Disposable } from '@flowgram.ai/utils'; import { BaseVariableField, VariableDeclaration } from '../ast'; diff --git a/packages/variable-engine/variable-core/src/scope/variable-table.ts b/packages/variable-engine/variable-core/src/scope/variable-table.ts index d6722a59..6739c2ef 100644 --- a/packages/variable-engine/variable-core/src/scope/variable-table.ts +++ b/packages/variable-engine/variable-core/src/scope/variable-table.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Observable, Subject, merge, share, skip, switchMap } from 'rxjs'; import { DisposableCollection, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/variable-engine/variable-core/src/services/index.ts b/packages/variable-engine/variable-core/src/services/index.ts index fc235f2a..e22d87af 100644 --- a/packages/variable-engine/variable-core/src/services/index.ts +++ b/packages/variable-engine/variable-core/src/services/index.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { VariableFieldKeyRenameService } from './variable-field-key-rename-service'; diff --git a/packages/variable-engine/variable-core/src/services/variable-field-key-rename-service.ts b/packages/variable-engine/variable-core/src/services/variable-field-key-rename-service.ts index 78d347ef..3cfdd42f 100644 --- a/packages/variable-engine/variable-core/src/services/variable-field-key-rename-service.ts +++ b/packages/variable-engine/variable-core/src/services/variable-field-key-rename-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { difference } from 'lodash'; import { inject, injectable, postConstruct, preDestroy } from 'inversify'; import { DisposableCollection, Emitter } from '@flowgram.ai/utils'; diff --git a/packages/variable-engine/variable-core/src/utils/memo.ts b/packages/variable-engine/variable-core/src/utils/memo.ts index 658216fb..38ae05e8 100644 --- a/packages/variable-engine/variable-core/src/utils/memo.ts +++ b/packages/variable-engine/variable-core/src/utils/memo.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + type KeyType = string | symbol; /** diff --git a/packages/variable-engine/variable-core/src/utils/toDisposable.tsx b/packages/variable-engine/variable-core/src/utils/toDisposable.tsx index dc677bca..7ce64259 100644 --- a/packages/variable-engine/variable-core/src/utils/toDisposable.tsx +++ b/packages/variable-engine/variable-core/src/utils/toDisposable.tsx @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Subscription } from 'rxjs'; import { Disposable } from '@flowgram.ai/utils'; diff --git a/packages/variable-engine/variable-core/src/variable-container-module.ts b/packages/variable-engine/variable-core/src/variable-container-module.ts index 3dacd6a1..0d61bb57 100644 --- a/packages/variable-engine/variable-core/src/variable-container-module.ts +++ b/packages/variable-engine/variable-core/src/variable-container-module.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { ContainerModule } from 'inversify'; import { VariableEngine } from './variable-engine'; diff --git a/packages/variable-engine/variable-core/src/variable-engine.ts b/packages/variable-engine/variable-core/src/variable-engine.ts index 904df65a..179bfee2 100644 --- a/packages/variable-engine/variable-core/src/variable-engine.ts +++ b/packages/variable-engine/variable-core/src/variable-engine.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Subject } from 'rxjs'; import { inject, injectable, interfaces, preDestroy } from 'inversify'; import { Disposable, DisposableCollection } from '@flowgram.ai/utils'; diff --git a/packages/variable-engine/variable-core/vitest.config.ts b/packages/variable-engine/variable-core/vitest.config.ts index 14d9aab4..9daa9308 100644 --- a/packages/variable-engine/variable-core/vitest.config.ts +++ b/packages/variable-engine/variable-core/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/variable-engine/variable-core/vitest.setup.ts b/packages/variable-engine/variable-core/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/variable-engine/variable-core/vitest.setup.ts +++ b/packages/variable-engine/variable-core/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata'; diff --git a/packages/variable-engine/variable-layout/.eslintrc.js b/packages/variable-engine/variable-layout/.eslintrc.js index a281f9e6..9bc818e5 100644 --- a/packages/variable-engine/variable-layout/.eslintrc.js +++ b/packages/variable-engine/variable-layout/.eslintrc.js @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const { defineConfig } = require('@flowgram.ai/eslint-config'); module.exports = defineConfig({ diff --git a/packages/variable-engine/variable-layout/__mocks__/container.ts b/packages/variable-engine/variable-layout/__mocks__/container.ts index a1bb2052..9159c6a3 100644 --- a/packages/variable-engine/variable-layout/__mocks__/container.ts +++ b/packages/variable-engine/variable-layout/__mocks__/container.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Container } from 'inversify'; import { ASTFactory, diff --git a/packages/variable-engine/variable-layout/__mocks__/fixed-layout-specs.ts b/packages/variable-engine/variable-layout/__mocks__/fixed-layout-specs.ts index 0be00394..f92755e5 100644 --- a/packages/variable-engine/variable-layout/__mocks__/fixed-layout-specs.ts +++ b/packages/variable-engine/variable-layout/__mocks__/fixed-layout-specs.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowDocumentJSON } from '@flowgram.ai/document'; export const fixLayout1: FlowDocumentJSON = { diff --git a/packages/variable-engine/variable-layout/__mocks__/free-layout-specs.ts b/packages/variable-engine/variable-layout/__mocks__/free-layout-specs.ts index 06a4a1e6..f9b3ffb7 100644 --- a/packages/variable-engine/variable-layout/__mocks__/free-layout-specs.ts +++ b/packages/variable-engine/variable-layout/__mocks__/free-layout-specs.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { WorkflowJSON } from "@flowgram.ai/free-layout-core"; export const freeLayout1: WorkflowJSON = { diff --git a/packages/variable-engine/variable-layout/__mocks__/run-fixed-layout-test.ts b/packages/variable-engine/variable-layout/__mocks__/run-fixed-layout-test.ts index 88dbddb6..bfbb2d8f 100644 --- a/packages/variable-engine/variable-layout/__mocks__/run-fixed-layout-test.ts +++ b/packages/variable-engine/variable-layout/__mocks__/run-fixed-layout-test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { VariableEngine } from '@flowgram.ai/variable-core'; import { ASTKind } from '@flowgram.ai/variable-core'; diff --git a/packages/variable-engine/variable-layout/__mocks__/run-free-layout-test.ts b/packages/variable-engine/variable-layout/__mocks__/run-free-layout-test.ts index 2863f159..a132f563 100644 --- a/packages/variable-engine/variable-layout/__mocks__/run-free-layout-test.ts +++ b/packages/variable-engine/variable-layout/__mocks__/run-free-layout-test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { describe, expect, test } from 'vitest'; import { VariableEngine } from '@flowgram.ai/variable-core'; import { ASTKind } from '@flowgram.ai/variable-core'; diff --git a/packages/variable-engine/variable-layout/__tests__/variable-fix-enable-global-scope.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-fix-enable-global-scope.test.ts index 5210e527..affae904 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-fix-enable-global-scope.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-fix-enable-global-scope.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { runFixedLayoutTest } from '../__mocks__/run-fixed-layout-test'; import { fixLayout1 } from '../__mocks__/fixed-layout-specs'; diff --git a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-filter-start-end.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-filter-start-end.test.ts index bf861e24..4ca5f612 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-filter-start-end.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-filter-start-end.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeScope } from '../src/types'; import { runFixedLayoutTest } from '../__mocks__/run-fixed-layout-test'; import { fixLayout1 } from '../__mocks__/fixed-layout-specs'; diff --git a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-group.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-group.test.ts index 884d64d1..362dce1b 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-group.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-group.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { runFixedLayoutTest } from '../__mocks__/run-fixed-layout-test'; runFixedLayoutTest( diff --git a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-no-config.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-no-config.test.ts index 6ac2f1df..a3f12141 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-no-config.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-no-config.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { runFixedLayoutTest } from '../__mocks__/run-fixed-layout-test'; import { fixLayout1 } from '../__mocks__/fixed-layout-specs'; diff --git a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-transform-empty.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-transform-empty.test.ts index 0b8b5bd1..8021c4eb 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-transform-empty.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout-transform-empty.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { test, expect } from 'vitest'; import { ScopeChainTransformService } from '../src'; diff --git a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout.test.ts index 2f554e83..119d2ed2 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-fix-layout.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-fix-layout.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { runFixedLayoutTest } from '../__mocks__/run-fixed-layout-test'; import { fixLayout1 } from '../__mocks__/fixed-layout-specs'; diff --git a/packages/variable-engine/variable-layout/__tests__/variable-free-enable-global-scope.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-free-enable-global-scope.test.ts index 8c65973e..35d5382d 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-free-enable-global-scope.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-free-enable-global-scope.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { runFreeLayoutTest } from '../__mocks__/run-free-layout-test'; import { freeLayout1 } from '../__mocks__/free-layout-specs'; diff --git a/packages/variable-engine/variable-layout/__tests__/variable-free-layout-transform-empty.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-free-layout-transform-empty.test.ts index 0d1f5952..12cbf117 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-free-layout-transform-empty.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-free-layout-transform-empty.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { test, expect } from 'vitest'; import { ScopeChainTransformService } from '../src'; diff --git a/packages/variable-engine/variable-layout/__tests__/variable-free-layout.test.ts b/packages/variable-engine/variable-layout/__tests__/variable-free-layout.test.ts index 66e9e5f3..15ffd958 100644 --- a/packages/variable-engine/variable-layout/__tests__/variable-free-layout.test.ts +++ b/packages/variable-engine/variable-layout/__tests__/variable-free-layout.test.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { runFreeLayoutTest } from '../__mocks__/run-free-layout-test'; import { freeLayout1 } from '../__mocks__/free-layout-specs'; diff --git a/packages/variable-engine/variable-layout/src/chains/fixed-layout-scope-chain.ts b/packages/variable-engine/variable-layout/src/chains/fixed-layout-scope-chain.ts index 7881a119..73ce2cc7 100644 --- a/packages/variable-engine/variable-layout/src/chains/fixed-layout-scope-chain.ts +++ b/packages/variable-engine/variable-layout/src/chains/fixed-layout-scope-chain.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, optional } from 'inversify'; import { Scope, ScopeChain } from '@flowgram.ai/variable-core'; import { FlowDocument, type FlowVirtualTree } from '@flowgram.ai/document'; diff --git a/packages/variable-engine/variable-layout/src/chains/free-layout-scope-chain.ts b/packages/variable-engine/variable-layout/src/chains/free-layout-scope-chain.ts index d49391c0..800748d3 100644 --- a/packages/variable-engine/variable-layout/src/chains/free-layout-scope-chain.ts +++ b/packages/variable-engine/variable-layout/src/chains/free-layout-scope-chain.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, optional, postConstruct } from 'inversify'; import { Scope, ScopeChain } from '@flowgram.ai/variable-core'; import { WorkflowNodeLinesData, WorkflowNodeMeta } from '@flowgram.ai/free-layout-core'; diff --git a/packages/variable-engine/variable-layout/src/flow-node-variable-data.ts b/packages/variable-engine/variable-layout/src/flow-node-variable-data.ts index f5f71f84..3b77769d 100644 --- a/packages/variable-engine/variable-layout/src/flow-node-variable-data.ts +++ b/packages/variable-engine/variable-layout/src/flow-node-variable-data.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { BaseVariableField, VariableEngine } from '@flowgram.ai/variable-core'; import { type ASTNode, ASTNodeJSON } from '@flowgram.ai/variable-core'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/variable-engine/variable-layout/src/index.ts b/packages/variable-engine/variable-layout/src/index.ts index 998c1c8b..c5a8e151 100644 --- a/packages/variable-engine/variable-layout/src/index.ts +++ b/packages/variable-engine/variable-layout/src/index.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + export { FlowNodeVariableData } from './flow-node-variable-data'; export { FreeLayoutScopeChain } from './chains/free-layout-scope-chain'; export { VariableLayoutConfig } from './variable-layout-config'; diff --git a/packages/variable-engine/variable-layout/src/scopes/global-scope.ts b/packages/variable-engine/variable-layout/src/scopes/global-scope.ts index e47654f0..3c24e02c 100644 --- a/packages/variable-engine/variable-layout/src/scopes/global-scope.ts +++ b/packages/variable-engine/variable-layout/src/scopes/global-scope.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { injectable, interfaces } from 'inversify'; import { Scope, VariableEngine } from '@flowgram.ai/variable-core'; diff --git a/packages/variable-engine/variable-layout/src/services/scope-chain-transform-service.ts b/packages/variable-engine/variable-layout/src/services/scope-chain-transform-service.ts index 0a71eee3..bcc47fc2 100644 --- a/packages/variable-engine/variable-layout/src/services/scope-chain-transform-service.ts +++ b/packages/variable-engine/variable-layout/src/services/scope-chain-transform-service.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { inject, injectable, optional } from 'inversify'; import { Scope, VariableEngine } from '@flowgram.ai/variable-core'; import { FlowDocument } from '@flowgram.ai/document'; diff --git a/packages/variable-engine/variable-layout/src/types.ts b/packages/variable-engine/variable-layout/src/types.ts index caa08c73..69f54a8e 100644 --- a/packages/variable-engine/variable-layout/src/types.ts +++ b/packages/variable-engine/variable-layout/src/types.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { Scope } from '@flowgram.ai/variable-core'; import { FlowNodeEntity } from '@flowgram.ai/document'; diff --git a/packages/variable-engine/variable-layout/src/utils.ts b/packages/variable-engine/variable-layout/src/utils.ts index 422806d3..15007f99 100644 --- a/packages/variable-engine/variable-layout/src/utils.ts +++ b/packages/variable-engine/variable-layout/src/utils.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '@flowgram.ai/document'; import { FlowNodeVariableData } from './flow-node-variable-data'; diff --git a/packages/variable-engine/variable-layout/src/variable-layout-config.ts b/packages/variable-engine/variable-layout/src/variable-layout-config.ts index d80046ba..bcea396e 100644 --- a/packages/variable-engine/variable-layout/src/variable-layout-config.ts +++ b/packages/variable-engine/variable-layout/src/variable-layout-config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import { FlowNodeEntity } from '@flowgram.ai/document'; import { type ScopeChainNode } from './types'; diff --git a/packages/variable-engine/variable-layout/vitest.config.ts b/packages/variable-engine/variable-layout/vitest.config.ts index 14d9aab4..9daa9308 100644 --- a/packages/variable-engine/variable-layout/vitest.config.ts +++ b/packages/variable-engine/variable-layout/vitest.config.ts @@ -1,3 +1,8 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + const path = require('path'); import { defineConfig } from 'vitest/config'; diff --git a/packages/variable-engine/variable-layout/vitest.setup.ts b/packages/variable-engine/variable-layout/vitest.setup.ts index d2c9bc6e..030b1a8f 100644 --- a/packages/variable-engine/variable-layout/vitest.setup.ts +++ b/packages/variable-engine/variable-layout/vitest.setup.ts @@ -1 +1,6 @@ +/** + * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates + * SPDX-License-Identifier: MIT + */ + import 'reflect-metadata';