@multiplatform.one/node-graph 7.11.0 → 7.16.0
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/node-graph",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.16.0",
|
|
4
4
|
"description": "Node graph editor — React Flow on web, Tamagui knob-aware nodes, an Expo DOM host on native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"multiplatform",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"author": "BitSpur <support@risserlabs.com> (https://risserlabs.com)",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "git+https://
|
|
16
|
+
"url": "git+https://git.corp.bitspur.com/multiplatform.one/mpo.git",
|
|
17
17
|
"directory": "public/node-graph"
|
|
18
18
|
},
|
|
19
19
|
"source": "src/index.ts",
|
|
@@ -80,16 +80,16 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@dagrejs/dagre": "^3.1.1",
|
|
83
|
-
"@multiplatform.one/forms": "7.
|
|
84
|
-
"@multiplatform.one/platform": "7.
|
|
85
|
-
"@multiplatform.one/theme": "7.
|
|
83
|
+
"@multiplatform.one/forms": "7.16.0",
|
|
84
|
+
"@multiplatform.one/platform": "7.16.0",
|
|
85
|
+
"@multiplatform.one/theme": "7.16.0",
|
|
86
86
|
"@xyflow/react": "^12.11.5",
|
|
87
87
|
"@xyflow/system": "0.0.81",
|
|
88
88
|
"tamagui": "2.7.6"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@multiplatform.one/config": "7.
|
|
92
|
-
"@multiplatform.one/test-utils": "7.
|
|
91
|
+
"@multiplatform.one/config": "7.16.0",
|
|
92
|
+
"@multiplatform.one/test-utils": "7.16.0",
|
|
93
93
|
"@tamagui/build": "2.7.6",
|
|
94
94
|
"@testing-library/react": "^16.3.2",
|
|
95
95
|
"@types/react-dom": "^19.2.3",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"vitest": "^4.1.5"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
|
-
"@multiplatform.one/components": "^7.
|
|
105
|
+
"@multiplatform.one/components": "^7.16.0",
|
|
106
106
|
"expo": ">=55",
|
|
107
107
|
"expo-haptics": "*",
|
|
108
108
|
"react": "^19.1.0",
|
|
@@ -48,8 +48,9 @@
|
|
|
48
48
|
|
|
49
49
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
50
50
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
51
|
+
import { Button } from "@multiplatform.one/forms";
|
|
51
52
|
import { pressTargetStyle } from "@multiplatform.one/theme";
|
|
52
|
-
import {
|
|
53
|
+
import { SizableText, XStack, YStack } from "tamagui";
|
|
53
54
|
import type { FrameStats } from "../bench/frameSampler";
|
|
54
55
|
import { gestureEndMark, gestureStartMark } from "../bench/frameSampler";
|
|
55
56
|
import type { GraphEventWire, PerfReportWire } from "../dom/wire";
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
* hide the same warning when it is real.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
import { Switch } from "@multiplatform.one/forms";
|
|
22
23
|
import { Preset, Surface } from "@multiplatform.one/theme";
|
|
23
24
|
import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
|
|
24
25
|
import { useState } from "react";
|
|
25
|
-
import {
|
|
26
|
+
import { SizableText, XStack, YStack } from "tamagui";
|
|
26
27
|
// React Flow's own sheet FIRST: it carries `.react-flow__handle-left/right/
|
|
27
28
|
// top/bottom`, the rules that translate a handle onto the node edge, and
|
|
28
29
|
// nothing in this package reproduces them. Without it a port renders at its
|
|
@@ -166,32 +167,20 @@ export const Crowded: Story = {
|
|
|
166
167
|
return (
|
|
167
168
|
<YStack gap="$5">
|
|
168
169
|
<XStack gap="$6" alignItems="center">
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<Switch
|
|
184
|
-
id="square"
|
|
185
|
-
size="$2"
|
|
186
|
-
checked={squareKnob}
|
|
187
|
-
onCheckedChange={(v) => setSquareKnob(Boolean(v))}
|
|
188
|
-
>
|
|
189
|
-
<Switch.Thumb />
|
|
190
|
-
</Switch>
|
|
191
|
-
<Label htmlFor="square" size="$2">
|
|
192
|
-
borderRadius: none — the port stays round anyway
|
|
193
|
-
</Label>
|
|
194
|
-
</XStack>
|
|
170
|
+
<Switch
|
|
171
|
+
id="coarse"
|
|
172
|
+
size="$2"
|
|
173
|
+
checked={coarsePointer}
|
|
174
|
+
onChange={setCoarsePointer}
|
|
175
|
+
label="coarse pointer (44pt pitch)"
|
|
176
|
+
/>
|
|
177
|
+
<Switch
|
|
178
|
+
id="square"
|
|
179
|
+
size="$2"
|
|
180
|
+
checked={squareKnob}
|
|
181
|
+
onChange={setSquareKnob}
|
|
182
|
+
label="borderRadius: none — the port stays round anyway"
|
|
183
|
+
/>
|
|
195
184
|
</XStack>
|
|
196
185
|
{/*
|
|
197
186
|
CASCADES, on purpose. `cascade={false}` starts from `defaultKnobs` and
|
|
@@ -323,19 +312,13 @@ export const HitTarget: Story = {
|
|
|
323
312
|
<YStack gap="$6">
|
|
324
313
|
{/* biome-ignore lint/security/noDangerouslySetInnerHtml: story-local debug paint */}
|
|
325
314
|
<style dangerouslySetInnerHTML={{ __html: hitDebugCss }} />
|
|
326
|
-
<
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<Switch.Thumb />
|
|
334
|
-
</Switch>
|
|
335
|
-
<Label htmlFor="hit-debug" size="$2">
|
|
336
|
-
paint the ::after hit region
|
|
337
|
-
</Label>
|
|
338
|
-
</XStack>
|
|
315
|
+
<Switch
|
|
316
|
+
id="hit-debug"
|
|
317
|
+
size="$2"
|
|
318
|
+
checked={debug}
|
|
319
|
+
onChange={setDebug}
|
|
320
|
+
label="paint the ::after hit region"
|
|
321
|
+
/>
|
|
339
322
|
|
|
340
323
|
<YStack className={debug ? hitDebugClass : undefined} gap="$5">
|
|
341
324
|
{([true, false] as const).map((coarsePointer) => (
|
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
* both sides of the crossover rather than a squint at a pixel.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
import { Switch } from "@multiplatform.one/forms";
|
|
22
23
|
import { Preset, Surface } from "@multiplatform.one/theme";
|
|
23
24
|
import { useState } from "react";
|
|
24
|
-
import {
|
|
25
|
+
import { SizableText, View, XStack, YStack } from "tamagui";
|
|
25
26
|
import type { BuiltinEdgeData } from "../edges/edgeKinds";
|
|
26
27
|
import type { GraphDocument } from "../model/index";
|
|
27
28
|
import { demoGraphSchema } from "../react-flow/demoNodeBody";
|
|
@@ -201,19 +202,13 @@ export const crossover = {
|
|
|
201
202
|
<Preset>
|
|
202
203
|
<Surface size="medium" density="comfortable">
|
|
203
204
|
<YStack gap="$3" padding="$3">
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
<Switch.Thumb />
|
|
212
|
-
</Switch>
|
|
213
|
-
<Label htmlFor="overview-zoom" size="$2">
|
|
214
|
-
overviewZoom 1 (everything is overview) instead of {defaultOverviewZoom}
|
|
215
|
-
</Label>
|
|
216
|
-
</XStack>
|
|
205
|
+
<Switch
|
|
206
|
+
id="overview-zoom"
|
|
207
|
+
size="$2"
|
|
208
|
+
checked={high}
|
|
209
|
+
onChange={setHigh}
|
|
210
|
+
label={`overviewZoom 1 (everything is overview) instead of ${defaultOverviewZoom}`}
|
|
211
|
+
/>
|
|
217
212
|
<View width="100%" height={560}>
|
|
218
213
|
<NodeGraphWeb
|
|
219
214
|
schema={schema}
|