@liveblocks/react-flow 3.17.0-rc1 → 3.18.0-rc1

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/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const PKG_NAME = "@liveblocks/react-flow";
2
- const PKG_VERSION = typeof "3.17.0-rc1" === "string" && "3.17.0-rc1";
2
+ const PKG_VERSION = typeof "3.18.0-rc1" === "string" && "3.18.0-rc1";
3
3
  const PKG_FORMAT = typeof TSUP_FORMAT === "string" && TSUP_FORMAT;
4
4
 
5
5
  export { PKG_FORMAT, PKG_NAME, PKG_VERSION };
package/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@liveblocks/react-flow",
3
- "version": "3.17.0-rc1",
3
+ "version": "3.18.0-rc1",
4
4
  "description": "An integration of React Flow to enable collaboration and realtime cursors with Liveblocks.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Liveblocks Inc.",
7
7
  "type": "module",
8
8
  "main": "./dist/index.cjs",
9
9
  "types": "./dist/index.d.cts",
10
+ "typesVersions": {
11
+ "*": {
12
+ "node": [
13
+ "./dist/node.d.ts"
14
+ ]
15
+ }
16
+ },
10
17
  "exports": {
11
18
  ".": {
12
19
  "import": {
@@ -19,6 +26,17 @@
19
26
  "default": "./dist/index.cjs"
20
27
  }
21
28
  },
29
+ "./node": {
30
+ "import": {
31
+ "types": "./dist/node.d.ts",
32
+ "default": "./dist/node.js"
33
+ },
34
+ "require": {
35
+ "types": "./dist/node.d.cts",
36
+ "module": "./dist/node.js",
37
+ "default": "./dist/node.cjs"
38
+ }
39
+ },
22
40
  "./styles.css": {
23
41
  "types": "./styles.css.d.cts",
24
42
  "default": "./styles.css"
@@ -37,6 +55,7 @@
37
55
  "build": "rollup --config rollup.config.js",
38
56
  "start": "npm run dev",
39
57
  "format": "(eslint --fix src/ || true) && stylelint --fix src/styles/ && prettier --write src/",
58
+ "lint:package": "publint --strict && attw --pack && node check-node-entrypoint.mjs",
40
59
  "lint": "eslint src/ && stylelint src/styles/",
41
60
  "test": "npx liveblocks dev -p 1154 -c 'vitest run --coverage'",
42
61
  "test:ci": "vitest run",
@@ -44,10 +63,10 @@
44
63
  "test:watch": "vitest"
45
64
  },
46
65
  "dependencies": {
47
- "@liveblocks/client": "3.17.0-rc1",
48
- "@liveblocks/core": "3.17.0-rc1",
49
- "@liveblocks/react": "3.17.0-rc1",
50
- "@liveblocks/react-ui": "3.17.0-rc1"
66
+ "@liveblocks/client": "3.18.0-rc1",
67
+ "@liveblocks/core": "3.18.0-rc1",
68
+ "@liveblocks/react": "3.18.0-rc1",
69
+ "@liveblocks/react-ui": "3.18.0-rc1"
51
70
  },
52
71
  "peerDependencies": {
53
72
  "@xyflow/react": "^12",
@@ -64,6 +83,7 @@
64
83
  },
65
84
  "devDependencies": {
66
85
  "@liveblocks/eslint-config": "*",
86
+ "@liveblocks/node": "*",
67
87
  "@liveblocks/rollup-config": "*",
68
88
  "@liveblocks/vitest-config": "*",
69
89
  "@testing-library/jest-dom": "^6.4.6",
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- const DEFAULT_STORAGE_KEY = "flow";
4
- const NODE_BASE_CONFIG = {
5
- // Local-only (not synced)
6
- selected: false,
7
- dragging: false,
8
- measured: false,
9
- resizing: false,
10
- // Atomic (synced as plain Json)
11
- position: "atomic",
12
- sourcePosition: "atomic",
13
- targetPosition: "atomic",
14
- extent: "atomic",
15
- origin: "atomic",
16
- handles: "atomic"
17
- // Note: the `data` key is intentionally left out of this base config, as it
18
- // is expected to be provided by the end user
19
- };
20
- const EDGE_BASE_CONFIG = {
21
- // Local-only (not synced)
22
- selected: false,
23
- // Atomic (synced as plain Json)
24
- markerStart: "atomic",
25
- markerEnd: "atomic",
26
- label: "atomic",
27
- labelBgPadding: "atomic"
28
- // Note: the `data` key is intentionally left out of this base config, as it
29
- // is expected to be provided by the end user
30
- };
31
-
32
- exports.DEFAULT_STORAGE_KEY = DEFAULT_STORAGE_KEY;
33
- exports.EDGE_BASE_CONFIG = EDGE_BASE_CONFIG;
34
- exports.NODE_BASE_CONFIG = NODE_BASE_CONFIG;
35
- //# sourceMappingURL=constants.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.cjs","sources":["../src/constants.ts"],"sourcesContent":["import type { SyncMode } from \"@liveblocks/core\";\nimport type { Edge, Node } from \"@xyflow/react\";\n\nexport const DEFAULT_STORAGE_KEY = \"flow\";\n\n// React Flow specific versions of `SyncConfig` that only allow keys that are actually exposed by React Flow.\ntype NodeSyncConfig = { [K in keyof Node]?: SyncMode };\ntype EdgeSyncConfig = { [K in keyof Edge]?: SyncMode };\n\nexport const NODE_BASE_CONFIG = {\n // Local-only (not synced)\n selected: false,\n dragging: false,\n measured: false,\n resizing: false,\n\n // Atomic (synced as plain Json)\n position: \"atomic\",\n sourcePosition: \"atomic\",\n targetPosition: \"atomic\",\n extent: \"atomic\",\n origin: \"atomic\",\n handles: \"atomic\",\n\n // Note: the `data` key is intentionally left out of this base config, as it\n // is expected to be provided by the end user\n} as const satisfies NodeSyncConfig;\n\nexport const EDGE_BASE_CONFIG = {\n // Local-only (not synced)\n selected: false,\n\n // Atomic (synced as plain Json)\n markerStart: \"atomic\",\n markerEnd: \"atomic\",\n label: \"atomic\",\n labelBgPadding: \"atomic\",\n\n // Note: the `data` key is intentionally left out of this base config, as it\n // is expected to be provided by the end user\n} as const satisfies EdgeSyncConfig;\n"],"names":[],"mappings":";;AAGO,MAAM,mBAAsB,GAAA,OAAA;AAM5B,MAAM,gBAAmB,GAAA;AAAA;AAAA,EAE9B,QAAU,EAAA,KAAA;AAAA,EACV,QAAU,EAAA,KAAA;AAAA,EACV,QAAU,EAAA,KAAA;AAAA,EACV,QAAU,EAAA,KAAA;AAAA;AAAA,EAGV,QAAU,EAAA,QAAA;AAAA,EACV,cAAgB,EAAA,QAAA;AAAA,EAChB,cAAgB,EAAA,QAAA;AAAA,EAChB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA,QAAA;AAAA,EACR,OAAS,EAAA,QAAA;AAAA;AAAA;AAIX,EAAA;AAEO,MAAM,gBAAmB,GAAA;AAAA;AAAA,EAE9B,QAAU,EAAA,KAAA;AAAA;AAAA,EAGV,WAAa,EAAA,QAAA;AAAA,EACb,SAAW,EAAA,QAAA;AAAA,EACX,KAAO,EAAA,QAAA;AAAA,EACP,cAAgB,EAAA,QAAA;AAAA;AAAA;AAIlB;;;;;;"}
package/dist/constants.js DELETED
@@ -1,31 +0,0 @@
1
- const DEFAULT_STORAGE_KEY = "flow";
2
- const NODE_BASE_CONFIG = {
3
- // Local-only (not synced)
4
- selected: false,
5
- dragging: false,
6
- measured: false,
7
- resizing: false,
8
- // Atomic (synced as plain Json)
9
- position: "atomic",
10
- sourcePosition: "atomic",
11
- targetPosition: "atomic",
12
- extent: "atomic",
13
- origin: "atomic",
14
- handles: "atomic"
15
- // Note: the `data` key is intentionally left out of this base config, as it
16
- // is expected to be provided by the end user
17
- };
18
- const EDGE_BASE_CONFIG = {
19
- // Local-only (not synced)
20
- selected: false,
21
- // Atomic (synced as plain Json)
22
- markerStart: "atomic",
23
- markerEnd: "atomic",
24
- label: "atomic",
25
- labelBgPadding: "atomic"
26
- // Note: the `data` key is intentionally left out of this base config, as it
27
- // is expected to be provided by the end user
28
- };
29
-
30
- export { DEFAULT_STORAGE_KEY, EDGE_BASE_CONFIG, NODE_BASE_CONFIG };
31
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["import type { SyncMode } from \"@liveblocks/core\";\nimport type { Edge, Node } from \"@xyflow/react\";\n\nexport const DEFAULT_STORAGE_KEY = \"flow\";\n\n// React Flow specific versions of `SyncConfig` that only allow keys that are actually exposed by React Flow.\ntype NodeSyncConfig = { [K in keyof Node]?: SyncMode };\ntype EdgeSyncConfig = { [K in keyof Edge]?: SyncMode };\n\nexport const NODE_BASE_CONFIG = {\n // Local-only (not synced)\n selected: false,\n dragging: false,\n measured: false,\n resizing: false,\n\n // Atomic (synced as plain Json)\n position: \"atomic\",\n sourcePosition: \"atomic\",\n targetPosition: \"atomic\",\n extent: \"atomic\",\n origin: \"atomic\",\n handles: \"atomic\",\n\n // Note: the `data` key is intentionally left out of this base config, as it\n // is expected to be provided by the end user\n} as const satisfies NodeSyncConfig;\n\nexport const EDGE_BASE_CONFIG = {\n // Local-only (not synced)\n selected: false,\n\n // Atomic (synced as plain Json)\n markerStart: \"atomic\",\n markerEnd: \"atomic\",\n label: \"atomic\",\n labelBgPadding: \"atomic\",\n\n // Note: the `data` key is intentionally left out of this base config, as it\n // is expected to be provided by the end user\n} as const satisfies EdgeSyncConfig;\n"],"names":[],"mappings":"AAGO,MAAM,mBAAsB,GAAA,OAAA;AAM5B,MAAM,gBAAmB,GAAA;AAAA;AAAA,EAE9B,QAAU,EAAA,KAAA;AAAA,EACV,QAAU,EAAA,KAAA;AAAA,EACV,QAAU,EAAA,KAAA;AAAA,EACV,QAAU,EAAA,KAAA;AAAA;AAAA,EAGV,QAAU,EAAA,QAAA;AAAA,EACV,cAAgB,EAAA,QAAA;AAAA,EAChB,cAAgB,EAAA,QAAA;AAAA,EAChB,MAAQ,EAAA,QAAA;AAAA,EACR,MAAQ,EAAA,QAAA;AAAA,EACR,OAAS,EAAA,QAAA;AAAA;AAAA;AAIX,EAAA;AAEO,MAAM,gBAAmB,GAAA;AAAA;AAAA,EAE9B,QAAU,EAAA,KAAA;AAAA;AAAA,EAGV,WAAa,EAAA,QAAA;AAAA,EACb,SAAW,EAAA,QAAA;AAAA,EACX,KAAO,EAAA,QAAA;AAAA,EACP,cAAgB,EAAA,QAAA;AAAA;AAAA;AAIlB;;;;"}