@octanejs/xyflow 0.1.0 → 0.1.2

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  Octane binding for [`@xyflow/react`](https://www.npmjs.com/package/@xyflow/react) — node-based graphs and flow editors (React Flow).
4
4
 
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install @octanejs/xyflow
9
+ pnpm add @octanejs/xyflow
10
+ ```
11
+
5
12
  ## Usage
6
13
 
7
14
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/xyflow",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -45,10 +45,10 @@
45
45
  "dependencies": {
46
46
  "@xyflow/system": "0.0.79",
47
47
  "classcat": "5.0.5",
48
- "@octanejs/zustand": "0.1.48"
48
+ "@octanejs/zustand": "0.1.50"
49
49
  },
50
50
  "peerDependencies": {
51
- "octane": "0.1.49"
51
+ "octane": "0.1.51"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@tsrx/react": "^0.2.61",
@@ -59,8 +59,8 @@
59
59
  "react": "^19.2.7",
60
60
  "react-dom": "^19.2.7",
61
61
  "vitest": "^4.1.10",
62
- "octane": "0.1.49",
63
- "@octanejs/zustand": "0.1.48"
62
+ "octane": "0.1.51",
63
+ "@octanejs/zustand": "0.1.50"
64
64
  },
65
65
  "scripts": {
66
66
  "test": "vitest run --root ../.. --project xyflow --project xyflow-differential",
@@ -1,5 +1,5 @@
1
1
  import { useEffect, useState } from 'octane';
2
- import { resolveHookSlot } from './slot';
2
+ import { resolveHookSlot, subSlot } from './slot';
3
3
  import type { ColorMode, ColorModeClass } from '@xyflow/system';
4
4
 
5
5
  function getMediaQuery() {
@@ -20,7 +20,7 @@ export function useColorModeClass(colorMode: ColorMode, ...rest: [slot?: symbol]
20
20
  const slot = resolveHookSlot(rest);
21
21
  const [colorModeClass, setColorModeClass] = useState<ColorModeClass | null>(
22
22
  colorMode === 'system' ? null : colorMode,
23
- slot,
23
+ subSlot(slot, 'state'),
24
24
  );
25
25
 
26
26
  useEffect(
@@ -43,7 +43,7 @@ export function useColorModeClass(colorMode: ColorMode, ...rest: [slot?: symbol]
43
43
  };
44
44
  },
45
45
  [colorMode],
46
- slot,
46
+ subSlot(slot, 'effect'),
47
47
  );
48
48
 
49
49
  return colorModeClass !== null ? colorModeClass : getMediaQuery()?.matches ? 'dark' : 'light';