feat: manually mirror opencoze's code from bytedance

Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
fanlv
2025-07-20 17:36:12 +08:00
commit 890153324f
14811 changed files with 1923430 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const MAIN_PANEL_ID = 'flowide-main-panel';
export const BOTTOM_PANEL_ID = 'flowide-bottom-panel';

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const CUSTOM_TAB_BAR_CONTAINER = 'custom-tabBar-container';
// 前边的 action
export const PRE_TAB_BAR_ACTION_CONTAINER = 'pre-flow-tabBar-action-container';
// 后边的 action
export const TAB_BAR_ACTION_CONTAINER = 'flow-tabBar-action-container';
// tab bar 滚动区域
export const TAB_BAR_SCROLL_CONTAINER = 'flow-tabBar-scroll-container';
// toolbar
export const TAB_BAR_TOOLBAR = 'flow-toolbar-container';
export const TAB_BAR_TOOLBAR_ITEM = 'flow-toolbar-item';
export const DISABLE_HANDLE_EVENT = 'disable-handle-event';
/** DebugBar 可拖拽区域 classname */
export const DEBUG_BAR_DRAGGABLE = 'flow-debug-bar-draggable';

View File

@@ -0,0 +1,17 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const SINGLE_MODE = 'single-document';

View File

@@ -0,0 +1,19 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { URI } from '@coze-project-ide/core';
export const HOVER_TOOLTIP_LABEL = new URI('flowide:///hover/tooltip-label');

View File

@@ -0,0 +1,21 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { VIEW_CONTAINER_CLASS_NAME, PANEL_CLASS_NAME_MAP } from './view';
export * from './class-names';
export * from './hover';
export * from './area-id';
export { SINGLE_MODE } from './dock-panel';

View File

@@ -0,0 +1,19 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ViewPluginOptions } from '../types';
export const ViewOptions = Symbol('ViewOptions');
export type ViewOptions = ViewPluginOptions;

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { URI } from '@coze-project-ide/core';
import { LayoutPanelType } from '../types';
import { BOTTOM_PANEL_ID, MAIN_PANEL_ID } from './area-id';
export const VIEW_CONTAINER_CLASS_NAME = 'flowide-container';
export const PANEL_CLASS_NAME_MAP: Record<LayoutPanelType, URI> = {
[LayoutPanelType.TOP_BAR]: new URI('flowide:///panel/flowide-top-bar'),
[LayoutPanelType.ACTIVITY_BAR]: new URI(
'flowide:///panel/flowide-activity-bar',
),
[LayoutPanelType.PRIMARY_SIDEBAR]: new URI(
'flowide:///panel/flowide-primary-sidebar',
),
[LayoutPanelType.MAIN_PANEL]: new URI(`flowide:///panel/${MAIN_PANEL_ID}`),
[LayoutPanelType.SECONDARY_SIDEBAR]: new URI(
'flowide:///panel/flowide-secondary-sidebar',
),
[LayoutPanelType.BOTTOM_PANEL]: new URI(
`flowide:///panel/${BOTTOM_PANEL_ID}`,
),
[LayoutPanelType.STATUS_BAR]: new URI('flowide:///panel/flowide-status-bar'),
[LayoutPanelType.RIGHT_BAR]: new URI('flowide:///panel/flowide-right-bar'),
};
export const ALL_PANEL_TYPES = [
LayoutPanelType.TOP_BAR,
LayoutPanelType.ACTIVITY_BAR,
LayoutPanelType.PRIMARY_SIDEBAR,
LayoutPanelType.MAIN_PANEL,
LayoutPanelType.SECONDARY_SIDEBAR,
LayoutPanelType.BOTTOM_PANEL,
LayoutPanelType.STATUS_BAR,
LayoutPanelType.RIGHT_BAR,
];
export const SPLIT_PANEL_CLASSNAME = 'flow-split-widget-panel';