@yiyi_zhang/reactflow-ui 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/AiWorkflowIDE.d.ts +13 -0
- package/dist/WorkflowIDE.d.ts +9 -0
- package/dist/actions/builtin/coerce.d.ts +9 -0
- package/dist/actions/types.d.ts +1 -0
- package/dist/ai.d.ts +21 -2
- package/dist/components/AiNative/AgentTimeline.d.ts +1 -1
- package/dist/components/AiNative/ClarificationCard.d.ts +3 -2
- package/dist/components/AiNative/InlineCanvasCopilot.d.ts +2 -1
- package/dist/components/AiNative/RepairCard.d.ts +3 -2
- package/dist/components/AiNative/mermaidParser.d.ts +31 -0
- package/dist/components/AiNative/repairActions.d.ts +16 -0
- package/dist/components/AiNative/runInputs.d.ts +13 -0
- package/dist/components/BrandLogo.d.ts +2 -3
- package/dist/components/ConfirmDialog.d.ts +3 -1
- package/dist/components/DraftCodeField.d.ts +26 -0
- package/dist/components/PromptDialog.d.ts +3 -1
- package/dist/components/business/ActionPickerModal.d.ts +2 -0
- package/dist/components/business/BusinessEditorContext.d.ts +38 -0
- package/dist/components/business/DataPillInput.d.ts +10 -0
- package/dist/components/business/DecisionBranchCard.d.ts +2 -1
- package/dist/components/business/ForkJoinCard.d.ts +2 -1
- package/dist/components/business/LibraryVersionBadge.d.ts +1 -1
- package/dist/components/business/LoopDoWhileCard.d.ts +2 -1
- package/dist/components/business/NestedControlStep.d.ts +7 -1
- package/dist/components/business/RunStoryTimeline.d.ts +7 -0
- package/dist/components/business/StepCardParts.d.ts +73 -0
- package/dist/components/business/StepFlowEditor.d.ts +18 -1
- package/dist/components/business/StepListEditor.d.ts +6 -2
- package/dist/components/business/deleteMessage.d.ts +6 -0
- package/dist/components/business/runStatus.d.ts +11 -0
- package/dist/components/icons/CmIcon.d.ts +17 -0
- package/dist/components/icons/iconRegistry.d.ts +80 -0
- package/dist/components/import/ApiImportDialog.d.ts +27 -0
- package/dist/components/onboarding/ModalShell.d.ts +15 -0
- package/dist/components/onboarding/OnboardingController.d.ts +74 -0
- package/dist/components/onboarding/OnboardingGuideCard.d.ts +10 -0
- package/dist/components/onboarding/OnboardingWizard.d.ts +42 -0
- package/dist/components/onboarding/PromotionPanel.d.ts +28 -0
- package/dist/components/onboarding/WorkflowNameBuilder.d.ts +19 -0
- package/dist/components/onboarding/index.d.ts +8 -0
- package/dist/components/onboarding/styles.d.ts +11 -0
- package/dist/components/onboarding/useOnboardingData.d.ts +17 -0
- package/dist/components/template/TemplateGallery.d.ts +2 -0
- package/dist/components/template/TemplateSetupWizard.d.ts +2 -0
- package/dist/hooks/useConfirm.d.ts +3 -1
- package/dist/import/buildAction.d.ts +23 -0
- package/dist/import/common.d.ts +23 -0
- package/dist/import/curl.d.ts +12 -0
- package/dist/import/detect.d.ts +9 -0
- package/dist/import/index.d.ts +10 -0
- package/dist/import/insert.d.ts +16 -0
- package/dist/import/openapi.d.ts +9 -0
- package/dist/import/postman.d.ts +9 -0
- package/dist/import/schema.d.ts +15 -0
- package/dist/import/selection.d.ts +17 -0
- package/dist/import/sensitive.d.ts +18 -0
- package/dist/import/types.d.ts +62 -0
- package/dist/import/util.d.ts +23 -0
- package/dist/index.d.ts +21 -2
- package/dist/library/versionStatus.d.ts +2 -2
- package/dist/logo.svg +9 -36
- package/dist/onboarding/index.d.ts +6 -0
- package/dist/onboarding/naming.d.ts +46 -0
- package/dist/onboarding/poll.d.ts +42 -0
- package/dist/onboarding/wizardState.d.ts +44 -0
- package/dist/parser/conductorGenerator.d.ts +17 -2
- package/dist/product-launch.html +10 -1394
- package/dist/providers/WorkflowIdeProvider.d.ts +23 -0
- package/dist/providers/resolve.d.ts +20 -0
- package/dist/providers/types.d.ts +67 -0
- package/dist/reactflow-ui-ai.es.js +20355 -13884
- package/dist/reactflow-ui.css +1 -1
- package/dist/reactflow-ui.es.js +23257 -14745
- package/dist/reactflow-ui.umd.js +192 -38
- package/dist/sample-imports/cmdb-openapi3.json +334 -0
- package/dist/sample-imports/cmdb-postman.json +100 -0
- package/dist/sample-imports/ticket-swagger2.json +231 -0
- package/dist/sample-workflows/ecs-lifecycle-automation.json +36 -4
- package/dist/services/ai/agentRunner.d.ts +42 -1
- package/dist/services/ai/errorMessages.d.ts +9 -1
- package/dist/services/ai/protocolAdapter.d.ts +5 -0
- package/dist/services/ai/systemPrompt.d.ts +1 -1
- package/dist/services/ai/toolExecutor.d.ts +26 -0
- package/dist/services/ai/workflowSynthesizer.d.ts +4 -4
- package/dist/services/aiService.d.ts +5 -1
- package/dist/stepmodel/compile.d.ts +2 -1
- package/dist/stepmodel/factory.d.ts +5 -0
- package/dist/stepmodel/pills.d.ts +32 -0
- package/dist/stepmodel/types.d.ts +10 -0
- package/dist/stepmodel/validate.d.ts +20 -0
- package/dist/store/aiStore.d.ts +10 -3
- package/dist/store/sandboxRunObserver.d.ts +20 -0
- package/dist/store/workflowStore.d.ts +2 -9
- package/dist/telemetry/buffer.d.ts +37 -0
- package/dist/telemetry/once.d.ts +11 -0
- package/dist/telemetry/track.d.ts +17 -0
- package/dist/telemetry/types.d.ts +24 -0
- package/dist/telemetry/useTelemetry.d.ts +22 -0
- package/dist/template/templateStore.d.ts +6 -0
- package/dist/template/types.d.ts +1 -0
- package/dist/types/conductor.d.ts +25 -1
- package/dist/types/workflow.d.ts +20 -3
- package/dist/types/workflowLibrary.d.ts +5 -5
- package/dist/utils/executionAnalyzer.d.ts +5 -0
- package/dist/utils/executionImport.d.ts +52 -0
- package/dist/utils/executionPoller.d.ts +37 -0
- package/dist/utils/localSandboxEngine.d.ts +43 -6
- package/dist/utils/runStory.d.ts +20 -0
- package/dist/utils/sandbox/jq.d.ts +13 -0
- package/dist/utils/sandbox/scriptRunner.d.ts +34 -0
- package/dist/utils/statusMeta.d.ts +35 -0
- package/dist/utils/taskEditing.d.ts +59 -0
- package/dist/utils/taskTypeMeta.d.ts +1 -0
- package/dist/utils/validationRules.d.ts +19 -5
- package/package.json +6 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { IdeProviders } from './types';
|
|
3
|
+
export interface WorkflowIdeProviderProps {
|
|
4
|
+
providers: IdeProviders;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 统一注册扩展点:宿主配置一次,其下所有 `WorkflowIDE` / `AiWorkflowIDE` 共用。
|
|
9
|
+
* `providers` 对象每次渲染重新创建也没关系——只有某个 provider 引用变化时才会通知下游。
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <WorkflowIdeProvider providers={{ library, telemetry }}>
|
|
13
|
+
* <WorkflowIDE … />
|
|
14
|
+
* </WorkflowIdeProvider>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function WorkflowIdeProvider({ providers, children }: WorkflowIdeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/** 读取外层 `WorkflowIdeProvider` 提供的扩展点;没有外层时返回空对象(不抛错) */
|
|
19
|
+
export declare function useIdeProviders(): IdeProviders;
|
|
20
|
+
/**
|
|
21
|
+
* IDE 内部使用:合并「专用 prop > 组件 providers prop > 外层 Provider」,结果按字段引用稳定。
|
|
22
|
+
*/
|
|
23
|
+
export declare function useResolvedProviders(componentProviders: IdeProviders | undefined, override?: Partial<IdeProviders>): IdeProviders;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IdeProviders } from './types';
|
|
2
|
+
/** 各层来源,按优先级从高到低排列 */
|
|
3
|
+
export interface ProviderSources {
|
|
4
|
+
/** 组件上的专用 prop(如 `libraryProvider`),优先级最高 */
|
|
5
|
+
override?: Partial<IdeProviders>;
|
|
6
|
+
/** 组件的 `providers` prop */
|
|
7
|
+
component?: Partial<IdeProviders>;
|
|
8
|
+
/** 外层 `WorkflowIdeProvider` */
|
|
9
|
+
context?: Partial<IdeProviders>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 按字段解析:专用 prop > 组件 `providers` prop > 外层 `WorkflowIdeProvider` > 无。
|
|
13
|
+
* 某一层的字段为 undefined 时才落到下一层(不是整个对象覆盖)。纯函数,每次返回新对象。
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveProviders(sources?: ProviderSources): IdeProviders;
|
|
16
|
+
/**
|
|
17
|
+
* 稳定化:各字段引用都与 prev 相同时返回 prev 本身。
|
|
18
|
+
* 宿主每次渲染新建 `providers` 对象、但 provider 实例不变时,下游拿到的仍是同一个对象,不会触发目录重载。
|
|
19
|
+
*/
|
|
20
|
+
export declare function stabilizeProviders(prev: IdeProviders | undefined, next: IdeProviders): IdeProviders;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 扩展点注册:统一的 Provider 集合与自助接入(Onboarding)契约。
|
|
3
|
+
* 设计见 docs/design/v1.3.0-自助接入设计.md 第 2、3.2 节。
|
|
4
|
+
*/
|
|
5
|
+
import type { LibraryProvider } from '../library/types';
|
|
6
|
+
import type { TelemetrySink } from '../telemetry/types';
|
|
7
|
+
export interface OnboardingContext {
|
|
8
|
+
env: 'TEST' | 'PROD';
|
|
9
|
+
/** `email` 写入向导生成的骨架流程的 ownerEmail(可选) */
|
|
10
|
+
user: {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
email?: string;
|
|
14
|
+
};
|
|
15
|
+
/** 当前环境是否开放自助试用(生产为 false) */
|
|
16
|
+
trialEnabled: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ProductInfo {
|
|
19
|
+
name: string;
|
|
20
|
+
domain: string;
|
|
21
|
+
status: 'PENDING' | 'ACTIVE';
|
|
22
|
+
role: 'OWNER' | 'MEMBER';
|
|
23
|
+
}
|
|
24
|
+
export type StartTrialResult = {
|
|
25
|
+
status: 'ok';
|
|
26
|
+
product: ProductInfo;
|
|
27
|
+
} | {
|
|
28
|
+
status: 'conflict';
|
|
29
|
+
owners: {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
export interface PromotionStatus {
|
|
35
|
+
requestId: string;
|
|
36
|
+
state: 'SUBMITTED' | 'REVIEWING' | 'APPROVED' | 'REJECTED' | 'SYNCED';
|
|
37
|
+
targetName?: string;
|
|
38
|
+
comment?: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
export interface OnboardingProvider {
|
|
42
|
+
getContext(signal?: AbortSignal): Promise<OnboardingContext>;
|
|
43
|
+
listDomains(signal?: AbortSignal): Promise<string[]>;
|
|
44
|
+
listMyProducts(signal?: AbortSignal): Promise<ProductInfo[]>;
|
|
45
|
+
startTrial(input: {
|
|
46
|
+
productName: string;
|
|
47
|
+
domain: string;
|
|
48
|
+
systemCode?: string;
|
|
49
|
+
}): Promise<StartTrialResult>;
|
|
50
|
+
requestPromotion(input: {
|
|
51
|
+
workflowName: string;
|
|
52
|
+
version: number;
|
|
53
|
+
targetType: 'custom' | 'std';
|
|
54
|
+
}): Promise<{
|
|
55
|
+
requestId: string;
|
|
56
|
+
}>;
|
|
57
|
+
getPromotion(requestId: string, signal?: AbortSignal): Promise<PromotionStatus>;
|
|
58
|
+
}
|
|
59
|
+
/** 宿主配置一次、页面内所有 IDE 共用的扩展点集合 */
|
|
60
|
+
export interface IdeProviders {
|
|
61
|
+
/** 流程库数据源(1.2.0 已有) */
|
|
62
|
+
library?: LibraryProvider;
|
|
63
|
+
/** 自助接入(1.3.0;B1 仅定义契约,界面在 B2) */
|
|
64
|
+
onboarding?: OnboardingProvider;
|
|
65
|
+
/** 接入埋点(1.3.0) */
|
|
66
|
+
telemetry?: TelemetrySink;
|
|
67
|
+
}
|