@bpmn-io/properties-panel 3.42.0 → 3.43.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": "@bpmn-io/properties-panel",
3
- "version": "3.42.0",
3
+ "version": "3.43.0",
4
4
  "description": "Library for creating bpmn-io properties panels.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -52,26 +52,25 @@
52
52
  "feelers": "^1.5.1",
53
53
  "focus-trap": "^8.0.0",
54
54
  "min-dash": "^5.0.0",
55
- "min-dom": "^5.2.0"
55
+ "min-dom": "^5.3.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@babel/core": "^7.28.5",
59
- "@babel/plugin-transform-react-jsx": "^7.27.1",
58
+ "@babel/core": "^7.29.0",
59
+ "@babel/plugin-transform-react-jsx": "^7.28.6",
60
60
  "@rollup/plugin-babel": "^7.0.0",
61
61
  "@rollup/plugin-json": "^6.1.0",
62
62
  "@rollup/plugin-node-resolve": "^16.0.3",
63
63
  "@testing-library/preact": "^3.2.4",
64
- "axe-core": "^4.11.0",
65
- "babel-loader": "^10.0.0",
64
+ "axe-core": "^4.11.4",
65
+ "babel-loader": "^10.1.1",
66
66
  "babel-plugin-inline-react-svg": "^2.0.2",
67
67
  "babel-plugin-istanbul": "^8.0.0",
68
- "babel-plugin-module-resolver": "^5.0.2",
68
+ "babel-plugin-module-resolver": "^5.0.3",
69
69
  "chai": "^6.2.2",
70
- "copy-webpack-plugin": "^14.0.0",
71
70
  "cross-env": "^10.1.0",
72
71
  "del-cli": "^7.0.0",
73
72
  "diagram-js": "^15.9.1",
74
- "eslint": "^9.39.1",
73
+ "eslint": "^9.39.4",
75
74
  "eslint-plugin-bpmn-io": "^2.2.0",
76
75
  "eslint-plugin-import": "^2.32.0",
77
76
  "eslint-plugin-react-hooks": "^6.1.1",
@@ -82,17 +81,17 @@
82
81
  "karma-env-preprocessor": "^0.1.1",
83
82
  "karma-mocha": "^2.0.1",
84
83
  "karma-webpack": "^5.0.1",
85
- "mocha": "^11.7.5",
84
+ "mocha": "^11.7.6",
86
85
  "mocha-test-container-support": "^0.2.0",
87
- "npm-run-all2": "^8.0.4",
86
+ "npm-run-all2": "^9.0.0",
88
87
  "preact": "^10.19.3",
89
- "puppeteer": "^24.36.1",
88
+ "puppeteer": "^25.0.4",
90
89
  "raw-loader": "^4.0.2",
91
- "replace-in-file": "^7.2.0",
92
- "rollup": "^4.53.3",
90
+ "replace-in-file": "^8.4.0",
91
+ "rollup": "^4.60.4",
93
92
  "rollup-plugin-copy": "^3.5.0",
94
93
  "sinon": "^22.0.0",
95
94
  "sinon-chai": "^4.0.1",
96
- "webpack": "^5.105.0"
95
+ "webpack": "^5.107.1"
97
96
  }
98
97
  }
@@ -0,0 +1,13 @@
1
+ // Intentionally not using a relative path to take advantage of
2
+ // the TS version resolution mechanism
3
+ import * as preact from 'preact';
4
+
5
+ export function createRoot(container: preact.ContainerNode): {
6
+ render(children: preact.ComponentChild): void;
7
+ unmount(): void;
8
+ };
9
+
10
+ export function hydrateRoot(
11
+ container: preact.ContainerNode,
12
+ children: preact.ComponentChild
13
+ ): ReturnType<typeof createRoot>;
@@ -0,0 +1,67 @@
1
+ import { useState, useLayoutEffect, useEffect } from '../../hooks';
2
+ import { is } from './util';
3
+
4
+ /**
5
+ * This is taken from https://github.com/facebook/react/blob/main/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L84
6
+ * on a high level this cuts out the warnings, ... and attempts a smaller implementation
7
+ * @typedef {{ _value: any; _getSnapshot: () => any }} Store
8
+ */
9
+ export function useSyncExternalStore(subscribe, getSnapshot) {
10
+ const value = getSnapshot();
11
+
12
+ /**
13
+ * @typedef {{ _instance: Store }} StoreRef
14
+ * @type {[StoreRef, (store: StoreRef) => void]}
15
+ */
16
+ const [{ _instance }, forceUpdate] = useState({
17
+ _instance: { _value: value, _getSnapshot: getSnapshot }
18
+ });
19
+
20
+ useLayoutEffect(() => {
21
+ _instance._value = value;
22
+ _instance._getSnapshot = getSnapshot;
23
+
24
+ if (didSnapshotChange(_instance)) {
25
+ forceUpdate({ _instance });
26
+ }
27
+ }, [subscribe, value, getSnapshot]);
28
+
29
+ useEffect(() => {
30
+ if (didSnapshotChange(_instance)) {
31
+ forceUpdate({ _instance });
32
+ }
33
+
34
+ return subscribe(() => {
35
+ if (didSnapshotChange(_instance)) {
36
+ forceUpdate({ _instance });
37
+ }
38
+ });
39
+ }, [subscribe]);
40
+
41
+ return value;
42
+ }
43
+
44
+ /** @type {(inst: Store) => boolean} */
45
+ function didSnapshotChange(inst) {
46
+ try {
47
+ return !is(inst._value, inst._getSnapshot());
48
+ } catch (error) {
49
+ return true;
50
+ }
51
+ }
52
+
53
+ export function startTransition(cb) {
54
+ cb();
55
+ }
56
+
57
+ export function useDeferredValue(val) {
58
+ return val;
59
+ }
60
+
61
+ export function useTransition() {
62
+ return [false, startTransition];
63
+ }
64
+
65
+ // TODO: in theory this should be done after a VNode is diffed as we want to insert
66
+ // styles/... before it attaches
67
+ export const useInsertionEffect = useLayoutEffect;
@@ -0,0 +1 @@
1
+ export * from '../test-utils';