@runtypelabs/react-flow 0.1.2 → 0.1.4
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +16 -0
- package/dist/index.js +5 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -13
- package/dist/index.mjs.map +1 -1
- package/example/CHANGELOG.md +10 -0
- package/example/package.json +1 -2
- package/example/src/App.tsx +3 -15
- package/package.json +2 -3
- package/src/flow-step-types.ts +32 -0
- package/src/hooks/useRuntypeFlow.ts +9 -20
- package/src/types/index.ts +1 -1
- package/src/utils/adapter.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @runtypelabs/react-flow@0.1.
|
|
2
|
+
> @runtypelabs/react-flow@0.1.4 build /home/runner/work/core/core/packages/react-flow
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m104.29 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m224.04 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 2183ms
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m100.24 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m223.72 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 2183ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @runtypelabs/react-flow
|
|
2
2
|
|
|
3
|
+
## 0.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [9ec83bd]
|
|
8
|
+
- Updated dependencies [a63f268]
|
|
9
|
+
- @runtypelabs/sdk@0.3.0
|
|
10
|
+
|
|
11
|
+
## 0.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 8506aa1: Remove private @runtypelabs/shared dependency from all public packages by inlining types and constants. This fixes npm installation errors where users couldn't install packages due to the unpublished internal shared package dependency.
|
|
16
|
+
- Updated dependencies [8506aa1]
|
|
17
|
+
- @runtypelabs/sdk@0.2.1
|
|
18
|
+
|
|
3
19
|
## 0.1.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -644,8 +644,7 @@ function useRuntypeFlow(options) {
|
|
|
644
644
|
setError(null);
|
|
645
645
|
try {
|
|
646
646
|
const flow = await client.flows.get(id);
|
|
647
|
-
const
|
|
648
|
-
const steps = Array.isArray(stepsResponse) ? stepsResponse : [];
|
|
647
|
+
const steps = Array.isArray(flow.flowSteps) ? flow.flowSteps : [];
|
|
649
648
|
let newNodes = flowStepsToNodes(steps, {
|
|
650
649
|
onChange: handleStepChange,
|
|
651
650
|
onDelete: handleStepDelete
|
|
@@ -681,22 +680,15 @@ function useRuntypeFlow(options) {
|
|
|
681
680
|
const steps = nodesToFlowSteps(nodes);
|
|
682
681
|
await client.flows.update(flowId, {
|
|
683
682
|
name: flowName,
|
|
684
|
-
description: flowDescription
|
|
685
|
-
|
|
686
|
-
const existingSteps = await client.flowSteps.getByFlow(flowId);
|
|
687
|
-
for (const step of existingSteps) {
|
|
688
|
-
await client.flowSteps.delete(step.id);
|
|
689
|
-
}
|
|
690
|
-
for (const step of steps) {
|
|
691
|
-
await client.flowSteps.create({
|
|
692
|
-
flowId,
|
|
683
|
+
description: flowDescription,
|
|
684
|
+
flow_steps: steps.map((step) => ({
|
|
693
685
|
type: step.type,
|
|
694
686
|
name: step.name,
|
|
695
687
|
order: step.order,
|
|
696
688
|
enabled: step.enabled,
|
|
697
689
|
config: step.config
|
|
698
|
-
})
|
|
699
|
-
}
|
|
690
|
+
}))
|
|
691
|
+
});
|
|
700
692
|
setHasUnsavedChanges(false);
|
|
701
693
|
lastSavedState.current = JSON.stringify(steps);
|
|
702
694
|
return {
|