@multiplatform.one/node-graph 7.10.0 → 7.15.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.10.0",
3
+ "version": "7.15.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://gitlab.com/bitspur/frappe/multiplatform.one.git",
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,14 +80,16 @@
80
80
  },
81
81
  "dependencies": {
82
82
  "@dagrejs/dagre": "^3.1.1",
83
+ "@multiplatform.one/forms": "7.15.0",
84
+ "@multiplatform.one/platform": "7.15.0",
85
+ "@multiplatform.one/theme": "7.15.0",
83
86
  "@xyflow/react": "^12.11.5",
84
87
  "@xyflow/system": "0.0.81",
85
- "tamagui": "2.7.6",
86
- "@multiplatform.one/forms": "7.10.0",
87
- "@multiplatform.one/theme": "7.10.0",
88
- "@multiplatform.one/platform": "7.10.0"
88
+ "tamagui": "2.7.6"
89
89
  },
90
90
  "devDependencies": {
91
+ "@multiplatform.one/config": "7.15.0",
92
+ "@multiplatform.one/test-utils": "7.15.0",
91
93
  "@tamagui/build": "2.7.6",
92
94
  "@testing-library/react": "^16.3.2",
93
95
  "@types/react-dom": "^19.2.3",
@@ -97,18 +99,16 @@
97
99
  "react": "19.2.5",
98
100
  "react-dom": "19.2.5",
99
101
  "subset-font": "^2.7.0",
100
- "vitest": "^4.1.5",
101
- "@multiplatform.one/test-utils": "7.10.0",
102
- "@multiplatform.one/config": "7.10.0"
102
+ "vitest": "^4.1.5"
103
103
  },
104
104
  "peerDependencies": {
105
+ "@multiplatform.one/components": "^7.15.0",
105
106
  "expo": ">=55",
106
107
  "expo-haptics": "*",
107
108
  "react": "^19.1.0",
108
109
  "react-dom": "^19.1.0",
109
110
  "react-native": ">=0.83.0",
110
- "react-native-webview": ">=13.16.0",
111
- "@multiplatform.one/components": "^7.10.0"
111
+ "react-native-webview": ">=13.16.0"
112
112
  },
113
113
  "peerDependenciesMeta": {
114
114
  "@multiplatform.one/components": {
@@ -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 { Button, SizableText, XStack, YStack } from "tamagui";
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 { Label, SizableText, Switch, XStack, YStack } from "tamagui";
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
- <XStack gap="$2" alignItems="center">
170
- <Switch
171
- id="coarse"
172
- size="$2"
173
- checked={coarsePointer}
174
- onCheckedChange={(v) => setCoarsePointer(Boolean(v))}
175
- >
176
- <Switch.Thumb />
177
- </Switch>
178
- <Label htmlFor="coarse" size="$2">
179
- coarse pointer (44pt pitch)
180
- </Label>
181
- </XStack>
182
- <XStack gap="$2" alignItems="center">
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
- <XStack gap="$2" alignItems="center">
327
- <Switch
328
- id="hit-debug"
329
- size="$2"
330
- checked={debug}
331
- onCheckedChange={(v) => setDebug(Boolean(v))}
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 { Label, SizableText, Switch, View, XStack, YStack } from "tamagui";
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
- <XStack gap="$2" alignItems="center">
205
- <Switch
206
- id="overview-zoom"
207
- size="$2"
208
- checked={high}
209
- onCheckedChange={(v) => setHigh(Boolean(v))}
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}