@arronqzy/react-blueprint 1.0.18 → 1.0.19
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/package.json +5 -5
- package/src/BlueprintContextMenu.tsx +1 -1
- package/src/BlueprintNodeConfigSidebar.tsx +10 -2
- package/src/components/BlueprintExecutionLogPanel.tsx +10 -2
- package/src/components/BlueprintLibrarySelect.tsx +1 -1
- package/src/components/BlueprintMetaDialog.tsx +1 -1
- package/src/components/BlueprintNodeSwitchTaskDialog.tsx +1 -1
- package/src/components/BlueprintPanelToolbar.tsx +10 -2
- package/src/components/ClockNodeConfigPanel.tsx +1 -1
- package/src/components/ConfigHintIcon.tsx +1 -1
- package/src/components/FetchNodeConfigPanel.tsx +1 -1
- package/src/components/FetchUrlAutocomplete.tsx +1 -1
- package/src/components/JsonNodeConfigPanel.tsx +1 -1
- package/src/components/LogicNodeConfigPanel.tsx +1 -1
- package/src/components/StorageKeyAutocomplete.tsx +1 -1
- package/src/components/StorageNodeConfigPanel.tsx +1 -1
- package/src/components/ViewElementMultiSelect.tsx +1 -1
- package/src/hooks/useBlueprintFlowState.ts +1 -1
- package/src/index.tsx +30 -27
- package/src/nodes/AndFlowNode.tsx +1 -1
- package/src/nodes/BlueprintFlowNode.tsx +1 -1
- package/src/nodes/BlueprintNodeCard.tsx +1 -1
- package/src/nodes/BlueprintNodeShell.tsx +1 -1
- package/src/nodes/ClockFlowNode.tsx +1 -1
- package/src/nodes/EventFlowNode.tsx +1 -1
- package/src/nodes/FetchFlowNode.tsx +1 -1
- package/src/nodes/JsonFlowNode.tsx +1 -1
- package/src/nodes/LifecycleFlowNode.tsx +1 -1
- package/src/nodes/LogicFlowNode.tsx +1 -1
- package/src/nodes/StorageFlowNode.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arronqzy/react-blueprint",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"index.ts",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"dayjs": "^1.11.13",
|
|
19
19
|
"react-dom": "^19",
|
|
20
20
|
"@xyflow/react": "^12.9.3",
|
|
21
|
-
"@arronqzy/i18n": "0.1.13",
|
|
22
|
-
"@arronqzy/ui": "1.0.9",
|
|
23
21
|
"@arronqzy/blueprint-dsl": "1.0.15",
|
|
24
|
-
"@arronqzy/react-rx-store": "1.1.8"
|
|
22
|
+
"@arronqzy/react-rx-store": "1.1.8",
|
|
23
|
+
"@arronqzy/ui": "1.0.9",
|
|
24
|
+
"@arronqzy/i18n": "0.1.15"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^19.0.1",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"eslint": "^8.57.0",
|
|
35
35
|
"typescript": "^5.5.4",
|
|
36
36
|
"vite": "^5.1.4",
|
|
37
|
-
"@arronqzy/eslint-config": "0.0.0",
|
|
38
37
|
"@arronqzy/tailwind": "1.0.2",
|
|
38
|
+
"@arronqzy/eslint-config": "0.0.0",
|
|
39
39
|
"@arronqzy/typescript-config": "1.0.0"
|
|
40
40
|
},
|
|
41
41
|
"keywords": [],
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
type PageLifecyclePhase,
|
|
17
17
|
type ViewEventType,
|
|
18
18
|
} from "@arronqzy/blueprint-dsl";
|
|
19
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
19
|
+
import { EnsureI18nProvider, useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
20
20
|
|
|
21
21
|
import { FetchNodeConfigPanel } from "./components/FetchNodeConfigPanel";
|
|
22
22
|
import { ClockNodeConfigPanel } from "./components/ClockNodeConfigPanel";
|
|
@@ -96,7 +96,15 @@ const ROLE_LABEL_KEYS: Record<BlueprintNodeRole, string> = {
|
|
|
96
96
|
event: "blueprint.config.roleEvent",
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
export function BlueprintNodeConfigSidebar({
|
|
99
|
+
export function BlueprintNodeConfigSidebar(props: BlueprintNodeConfigSidebarProps) {
|
|
100
|
+
return (
|
|
101
|
+
<EnsureI18nProvider>
|
|
102
|
+
<BlueprintNodeConfigSidebarInner {...props} />
|
|
103
|
+
</EnsureI18nProvider>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function BlueprintNodeConfigSidebarInner({
|
|
100
108
|
node,
|
|
101
109
|
graphNodes = [],
|
|
102
110
|
graphEdges = [],
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
type ExecutionTraceEntry,
|
|
21
21
|
type PageLifecyclePhase,
|
|
22
22
|
} from "@arronqzy/blueprint-dsl";
|
|
23
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
23
|
+
import { EnsureI18nProvider, useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
24
24
|
import { getLifecyclePhaseLabel } from "../graph/document";
|
|
25
25
|
|
|
26
26
|
import type { ExecutionLogSettings } from "../library/execution-log-settings";
|
|
@@ -140,7 +140,15 @@ export type BlueprintExecutionLogPanelProps = {
|
|
|
140
140
|
lifecyclePhase?: string;
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
export function BlueprintExecutionLogPanel({
|
|
143
|
+
export function BlueprintExecutionLogPanel(props: BlueprintExecutionLogPanelProps) {
|
|
144
|
+
return (
|
|
145
|
+
<EnsureI18nProvider>
|
|
146
|
+
<BlueprintExecutionLogPanelInner {...props} />
|
|
147
|
+
</EnsureI18nProvider>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function BlueprintExecutionLogPanelInner({
|
|
144
152
|
entries,
|
|
145
153
|
settings,
|
|
146
154
|
onUpdateSettings,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import type { BlueprintLibraryListItem } from "../library/types";
|
|
19
19
|
import type { LifecycleNodeOption } from "../hooks/useBlueprintDebugSession";
|
|
20
20
|
import { type PageLifecyclePhase } from "@arronqzy/blueprint-dsl";
|
|
21
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
21
|
+
import { EnsureI18nProvider, useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
22
22
|
import { getLifecyclePhaseLabel } from "../graph/document";
|
|
23
23
|
|
|
24
24
|
export type BlueprintRenameDialogProps = {
|
|
@@ -393,7 +393,15 @@ function LibraryRow({
|
|
|
393
393
|
);
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
export function BlueprintPanelToolbar({
|
|
396
|
+
export function BlueprintPanelToolbar(props: BlueprintPanelToolbarProps) {
|
|
397
|
+
return (
|
|
398
|
+
<EnsureI18nProvider>
|
|
399
|
+
<BlueprintPanelToolbarInner {...props} />
|
|
400
|
+
</EnsureI18nProvider>
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
function BlueprintPanelToolbarInner({
|
|
397
405
|
items,
|
|
398
406
|
activeId,
|
|
399
407
|
currentBlueprintLabel,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, type ChangeEvent } from "react";
|
|
2
2
|
import { Input } from "@arronqzy/ui";
|
|
3
3
|
import type { ClockNodeConfig } from "@arronqzy/blueprint-dsl";
|
|
4
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
4
|
+
import { useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
5
5
|
|
|
6
6
|
import type { BlueprintGraphNode } from "../graph/document";
|
|
7
7
|
import { resolveNodeClockConfig } from "../graph/document";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
useFetchDebugTask,
|
|
46
46
|
useSwaggerLoadTask,
|
|
47
47
|
} from "../fetch-config-task-store";
|
|
48
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
48
|
+
import { useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
49
49
|
|
|
50
50
|
import { ConfigFieldLabel, ConfigHintIcon, ConfigSectionTitle } from "./ConfigHintIcon";
|
|
51
51
|
import { FetchUrlAutocomplete } from "./FetchUrlAutocomplete";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { cn } from "@arronqzy/ui";
|
|
3
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
3
|
+
import { useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
4
4
|
import {
|
|
5
5
|
buildEndpointSuggestions,
|
|
6
6
|
filterEndpointSuggestions,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveFetchScopeAutocompleteRoot,
|
|
10
10
|
validateJsonStringAllowingScope,
|
|
11
11
|
} from "@arronqzy/blueprint-dsl";
|
|
12
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
12
|
+
import { useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
13
13
|
|
|
14
14
|
import type { BlueprintGraphEdge, BlueprintGraphNode } from "../graph/document";
|
|
15
15
|
import { resolveNodeJsonConfig } from "../graph/document";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState, type ChangeEvent } from "react";
|
|
2
2
|
import { validateLogicSourceCode } from "@arronqzy/blueprint-dsl";
|
|
3
3
|
import type { LogicNodeConfig } from "@arronqzy/blueprint-dsl";
|
|
4
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
4
|
+
import { useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
5
5
|
|
|
6
6
|
import type { BlueprintGraphNode } from "../graph/document";
|
|
7
7
|
import { resolveNodeLogicConfig } from "../graph/document";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { cn } from "@arronqzy/ui";
|
|
3
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
3
|
+
import { useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
4
4
|
import {
|
|
5
5
|
filterStorageKeySuggestions,
|
|
6
6
|
listBrowserStorageKeys,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
resolveFetchScopeAutocompleteRoot,
|
|
21
21
|
uniqueStorageKinds,
|
|
22
22
|
} from "@arronqzy/blueprint-dsl";
|
|
23
|
-
import { useI18n } from "@arronqzy/i18n/react";
|
|
23
|
+
import { useI18nOptional as useI18n } from "@arronqzy/i18n/react";
|
|
24
24
|
|
|
25
25
|
import type { BlueprintGraphEdge, BlueprintGraphNode } from "../graph/document";
|
|
26
26
|
import { resolveNodeStorageConfig } from "../graph/document";
|
package/src/index.tsx
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
type Node,
|
|
15
15
|
type Edge,
|
|
16
16
|
} from "@xyflow/react";
|
|
17
|
+
import { EnsureI18nProvider } from "@arronqzy/i18n/react";
|
|
17
18
|
import "@xyflow/react/dist/style.css";
|
|
18
19
|
import "./blueprint.css";
|
|
19
20
|
|
|
@@ -241,33 +242,35 @@ export const BluePrintReactRoot: FC<BluePrintReactRootProps> = ({
|
|
|
241
242
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
242
243
|
|
|
243
244
|
return (
|
|
244
|
-
<
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
<BlueprintCanvasProvider
|
|
256
|
-
onSelectNode={onSelectNode}
|
|
257
|
-
onAbortClock={onAbortClock}
|
|
245
|
+
<EnsureI18nProvider>
|
|
246
|
+
<div
|
|
247
|
+
ref={containerRef}
|
|
248
|
+
data-workspace-region="blueprint"
|
|
249
|
+
className="bp-canvas h-full w-full bg-background text-foreground"
|
|
250
|
+
style={{
|
|
251
|
+
width: "100%",
|
|
252
|
+
height: "100%",
|
|
253
|
+
minHeight: 0,
|
|
254
|
+
...style,
|
|
255
|
+
}}
|
|
258
256
|
>
|
|
259
|
-
<
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
257
|
+
<BlueprintCanvasProvider
|
|
258
|
+
onSelectNode={onSelectNode}
|
|
259
|
+
onAbortClock={onAbortClock}
|
|
260
|
+
>
|
|
261
|
+
<ReactFlowProvider>
|
|
262
|
+
<BlueprintCanvas
|
|
263
|
+
containerRef={containerRef}
|
|
264
|
+
graph={graph}
|
|
265
|
+
onGraphChange={onGraphChange}
|
|
266
|
+
selectedNodeId={selectedNodeId}
|
|
267
|
+
executionOverlay={executionOverlay}
|
|
268
|
+
onSelectNode={onSelectNode}
|
|
269
|
+
libraryNameById={libraryNameById}
|
|
270
|
+
/>
|
|
271
|
+
</ReactFlowProvider>
|
|
272
|
+
</BlueprintCanvasProvider>
|
|
273
|
+
</div>
|
|
274
|
+
</EnsureI18nProvider>
|
|
272
275
|
);
|
|
273
276
|
};
|