@mittwald/flow-react-components 0.1.0-alpha.273 → 0.1.0-alpha.275

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/List.js CHANGED
@@ -39,7 +39,7 @@ import { useReactTable as yt, getCoreRowModel as Et, getSortedRowModel as Ft, ge
39
39
  import ye from "invariant";
40
40
  import { getAsyncResource as he } from "@mittwald/react-use-promise";
41
41
  import { u as ge } from "./useSelector-DpU7_HMO.js";
42
- import { u as Lt } from "./SettingsProvider-54X6WkBH.js";
42
+ import { u as Lt } from "./SettingsProvider-D9oDS5r9.js";
43
43
  import * as _ from "react-aria-components";
44
44
  import { S as B } from "./SkeletonText-B5ZghZhO.js";
45
45
  import { I as Pt } from "./IllustratedMessage-B3MHD01M.js";
@@ -1,20 +1,20 @@
1
1
  "use client"
2
2
  /* */
3
- var w = Object.defineProperty;
4
- var J = (s, t, e) => t in s ? w(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var y = Object.defineProperty;
4
+ var J = (s, t, e) => t in s ? y(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
5
5
  var c = (s, t, e) => J(s, typeof t != "symbol" ? t + "" : t, e);
6
- import O, { createContext as b, useContext as j, useRef as v, useMemo as x, useEffect as E } from "react";
7
- import { toJS as l, makeAutoObservable as p, ObservableMap as a, autorun as K } from "mobx";
8
- import { getAsyncResource as A } from "@mittwald/react-use-promise";
6
+ import O, { createContext as b, useContext as v, useRef as x, useMemo as K, useEffect as j } from "react";
7
+ import { makeAutoObservable as l, ObservableMap as a, toJS as E, autorun as P } from "mobx";
8
+ import { getAsyncResource as R } from "@mittwald/react-use-promise";
9
9
  import { mapValues as g } from "remeda";
10
- const P = (s) => Object.fromEntries(l(s).entries());
10
+ const h = (s) => Object.fromEntries(s.entries());
11
11
  class i {
12
12
  constructor(t = new a()) {
13
13
  c(this, "settings");
14
- this.settings = t, p(this);
14
+ this.settings = t, l(this);
15
15
  }
16
16
  set(t, e, n) {
17
- this.settings.set(t, e.parse(l(n)));
17
+ this.settings.set(t, e.parse(E(n)));
18
18
  }
19
19
  get(t, e) {
20
20
  return e.parse(this.settings.get(t));
@@ -23,7 +23,7 @@ class i {
23
23
  this.settings.delete(t);
24
24
  }
25
25
  get asJson() {
26
- return g(P(this.settings), (t) => JSON.stringify(t));
26
+ return g(h(this.settings), (t) => JSON.stringify(t));
27
27
  }
28
28
  static fromJson(t) {
29
29
  return new i(
@@ -36,7 +36,7 @@ class i {
36
36
  class u {
37
37
  constructor(t = new a()) {
38
38
  c(this, "componentSettings");
39
- this.componentSettings = t, p(this);
39
+ this.componentSettings = t, l(this);
40
40
  }
41
41
  set(t, e, n, o) {
42
42
  const r = this.componentSettings.get(t) ?? new i();
@@ -50,19 +50,14 @@ class u {
50
50
  (n = this.componentSettings.get(t)) == null || n.clear(e);
51
51
  }
52
52
  get asJson() {
53
- return Object.fromEntries(
54
- Array.from(this.componentSettings.entries()).map(([t, e]) => [
55
- t,
56
- e.asJson
57
- ])
58
- );
53
+ return g(h(this.componentSettings), (t) => t.asJson);
59
54
  }
60
55
  static fromJson(t) {
61
56
  const e = g(t, (n) => i.fromJson(n));
62
57
  return new u(new a(e));
63
58
  }
64
59
  }
65
- class R {
60
+ class A {
66
61
  constructor(t) {
67
62
  c(this, "storageKey");
68
63
  this.storageKey = t;
@@ -80,22 +75,22 @@ const I = (s) => {
80
75
  case "custom":
81
76
  return s.store;
82
77
  case "localStorage":
83
- return new R(s.storageKey);
78
+ return new A(s.storageKey);
84
79
  }
85
80
  throw new Error(`Unsupported setting backend: ${s}`);
86
- }, h = b(void 0), F = () => j(h), L = (s) => {
87
- const { children: t, id: e, ...n } = s, o = I(n), r = A(() => o.load(), [], {
81
+ }, p = b(void 0), F = () => v(p), L = (s) => {
82
+ const { children: t, id: e, ...n } = s, o = I(n), r = R(() => o.load(), [], {
88
83
  loaderId: e
89
- }), f = r.use(), m = v(Promise.resolve()), S = x(
84
+ }), f = r.use(), m = x(Promise.resolve()), S = K(
90
85
  () => u.fromJson(f),
91
86
  [e]
92
87
  ), d = () => {
93
- const y = S.asJson;
88
+ const w = S.asJson;
94
89
  m.current = m.current.then(async () => {
95
- await o.store(y), r.refresh();
90
+ await o.store(w), r.refresh();
96
91
  });
97
92
  };
98
- return E(() => K(d), [e]), /* @__PURE__ */ O.createElement(h.Provider, { value: S }, t);
93
+ return j(() => P(d), [e]), /* @__PURE__ */ O.createElement(p.Provider, { value: S }, t);
99
94
  };
100
95
  export {
101
96
  L as S,
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { S as t } from "./SettingsProvider-54X6WkBH.js";
3
+ import { S as t } from "./SettingsProvider-D9oDS5r9.js";
4
4
  export {
5
5
  t as SettingsProvider,
6
6
  t as default
@@ -27,7 +27,7 @@ export declare const typedList: <T>() => {
27
27
  TableRow: (ignoredProps: {
28
28
  style?: import('react').CSSProperties | ((values: import('react-aria-components').RowRenderProps & {
29
29
  defaultStyle: import('react').CSSProperties;
30
- }) => import('react').CSSProperties) | undefined;
30
+ }) => import('react').CSSProperties | undefined) | undefined;
31
31
  value?: undefined;
32
32
  children?: import('react').ReactNode | undefined;
33
33
  className?: string | ((values: import('react-aria-components').RowRenderProps & {
@@ -57,7 +57,7 @@ export declare const typedList: <T>() => {
57
57
  slot?: (string | null) | undefined;
58
58
  style?: import('react').CSSProperties | ((values: import('react-aria-components').TableRenderProps & {
59
59
  defaultStyle: import('react').CSSProperties;
60
- }) => import('react').CSSProperties) | undefined;
60
+ }) => import('react').CSSProperties | undefined) | undefined;
61
61
  children?: import('react').ReactNode;
62
62
  className?: string | ((values: import('react-aria-components').TableRenderProps & {
63
63
  defaultClassName: string | undefined;
@@ -9,7 +9,7 @@ export declare class SettingsStore {
9
9
  get<T extends ZodSchema>(componentName: FlowComponentName, settingKey: string, schema: T): z.infer<T>;
10
10
  clear(componentName: FlowComponentName, settingKey: string): void;
11
11
  get asJson(): {
12
- [k: string]: import('./ComponentSettings').ComponentSettingsJson;
12
+ [x: string]: import('./ComponentSettings').ComponentSettingsJson;
13
13
  };
14
14
  static fromJson(json: SettingsJson): SettingsStore;
15
15
  }
@@ -1,2 +1,2 @@
1
1
  import { ObservableMap } from 'mobx';
2
- export declare const mobxMapToObject: (map: ObservableMap) => any;
2
+ export declare const mobxMapToObject: <T>(map: ObservableMap<string, T>) => Record<string, T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.273",
3
+ "version": "0.1.0-alpha.275",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -311,71 +311,70 @@
311
311
  },
312
312
  "dependencies": {
313
313
  "@chakra-ui/live-region": "^2.1.0",
314
- "@internationalized/date": "^3.5.5",
315
- "@internationalized/string-compiler": "^3.2.4",
316
- "@mittwald/react-tunnel": "^0.1.0-alpha.273",
314
+ "@internationalized/date": "^3.5.6",
315
+ "@internationalized/string-compiler": "^3.2.5",
316
+ "@mittwald/react-tunnel": "^0.1.0-alpha.275",
317
317
  "@mittwald/react-use-promise": "^2.5.0",
318
- "@react-aria/utils": "^3.25.2",
319
- "@react-types/shared": "^3.24.1",
320
- "@tabler/icons-react": "^3.17.0",
318
+ "@react-aria/utils": "^3.25.3",
319
+ "@react-types/shared": "^3.25.0",
320
+ "@tabler/icons-react": "^3.19.0",
321
321
  "@tanstack/react-table": "^8.20.5",
322
322
  "@types/luxon": "^3.4.2",
323
323
  "clsx": "^2.1.1",
324
324
  "copy-to-clipboard": "^3.3.3",
325
325
  "dot-prop": "^9.0.0",
326
- "framer-motion": "^11.5.5",
327
- "html-react-parser": "^5.1.16",
326
+ "framer-motion": "^11.11.1",
327
+ "html-react-parser": "^5.1.18",
328
328
  "invariant": "^2.2.4",
329
329
  "luxon": "^3.5.0",
330
- "mobx": "^6.13.2",
330
+ "mobx": "^6.13.3",
331
331
  "mobx-react-lite": "^4.0.7",
332
332
  "object-code": "^1.3.3",
333
- "react-aria": "^3.34.3",
334
- "react-aria-components": "^1.3.3",
333
+ "react-aria": "^3.35.0",
334
+ "react-aria-components": "^1.4.0",
335
335
  "react-children-utilities": "^2.10.0",
336
- "react-stately": "^3.32.2",
337
- "remeda": "^2.14.0",
336
+ "react-stately": "^3.33.0",
337
+ "remeda": "^2.15.0",
338
338
  "use-callback-ref": "^1.3.2",
339
339
  "zod": "^3.23.8"
340
340
  },
341
341
  "devDependencies": {
342
- "@faker-js/faker": "^9.0.1",
343
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.273",
342
+ "@faker-js/faker": "^9.0.3",
343
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.275",
344
344
  "@mittwald/react-use-promise": "^2.5.0",
345
- "@nx/storybook": "^19.7.4",
346
- "@storybook/addon-a11y": "^8.3.2",
347
- "@storybook/addon-actions": "^8.3.2",
348
- "@storybook/addon-essentials": "^8.3.2",
349
- "@storybook/addon-interactions": "^8.3.2",
350
- "@storybook/addon-links": "^8.3.2",
351
- "@storybook/blocks": "^8.3.2",
352
- "@storybook/components": "^8.3.2",
353
- "@storybook/core-events": "^8.3.2",
354
- "@storybook/manager-api": "^8.3.2",
355
- "@storybook/preview-api": "^8.3.2",
356
- "@storybook/react": "^8.3.2",
357
- "@storybook/react-vite": "^8.3.2",
358
- "@storybook/test": "^8.3.2",
359
- "@storybook/theming": "^8.3.2",
345
+ "@nx/storybook": "^20.0.0",
346
+ "@storybook/addon-a11y": "^8.3.5",
347
+ "@storybook/addon-actions": "^8.3.5",
348
+ "@storybook/addon-essentials": "^8.3.5",
349
+ "@storybook/addon-interactions": "^8.3.5",
350
+ "@storybook/addon-links": "^8.3.5",
351
+ "@storybook/blocks": "^8.3.5",
352
+ "@storybook/components": "^8.3.5",
353
+ "@storybook/core-events": "^8.3.5",
354
+ "@storybook/manager-api": "^8.3.5",
355
+ "@storybook/preview-api": "^8.3.5",
356
+ "@storybook/react": "^8.3.5",
357
+ "@storybook/react-vite": "^8.3.5",
358
+ "@storybook/test": "^8.3.5",
359
+ "@storybook/theming": "^8.3.5",
360
360
  "@testing-library/dom": "^10.4.0",
361
361
  "@testing-library/jest-dom": "6.4.7",
362
362
  "@testing-library/react": "~16.0.1",
363
363
  "@testing-library/user-event": "^14.5.2",
364
364
  "@types/invariant": "^2.2.37",
365
- "@types/node": "22.5.5",
365
+ "@types/node": "22.7.5",
366
366
  "@types/prettier": "^3.0.0",
367
367
  "@types/prop-types": "^15.7.13",
368
- "@types/react": "^18.3.8",
368
+ "@types/react": "^18.3.11",
369
369
  "@types/react-dom": "^18.3.0",
370
370
  "@types/rollup": "^0.54.0",
371
- "@vitejs/plugin-react": "^4.3.1",
372
- "@vitest/coverage-v8": "~2.1.1",
371
+ "@vitejs/plugin-react": "^4.3.2",
372
+ "@vitest/coverage-v8": "~2.1.2",
373
373
  "decamelize": "^6.0.0",
374
- "expect-type": "^0.20.0",
375
374
  "fs-jetpack": "^5.1.0",
376
- "happy-dom": "^14.12.3",
377
- "next": "^14.2.13",
378
- "nx": "^19.7.4",
375
+ "happy-dom": "^15.7.4",
376
+ "next": "^14.2.14",
377
+ "nx": "^20.0.0",
379
378
  "postcss": "^8.4.47",
380
379
  "postcss-nested-import": "^1.3.0",
381
380
  "postcss-nesting": "^13.0.0",
@@ -385,19 +384,19 @@
385
384
  "react-dom": "^18.3.1",
386
385
  "react-element-to-jsx-string": "^15.0.0",
387
386
  "react-hook-form": "^7.53.0",
388
- "rollup": "^4.22.1",
389
- "sass": "^1.79.2",
390
- "storybook": "^8.3.2",
387
+ "rollup": "~4.21.3",
388
+ "sass": "^1.79.4",
389
+ "storybook": "^8.3.5",
391
390
  "storybook-addon-rtl": "^1.0.1",
392
391
  "tsx": "^4.19.1",
393
- "typescript": "^5.5.4",
392
+ "typescript": "^5.6.2",
394
393
  "typescript-plugin-css-modules": "^5.1.0",
395
- "vite": "^5.4.6",
394
+ "vite": "^5.4.8",
396
395
  "vite-plugin-banner": "^0.8.0",
397
396
  "vite-plugin-checker": "^0.8.0",
398
- "vite-plugin-dts": "^4.2.1",
397
+ "vite-plugin-dts": "^4.2.3",
399
398
  "vite-plugin-externalize-deps": "^0.8.0",
400
- "vitest": "~2.1.1",
399
+ "vitest": "~2.1.2",
401
400
  "yaml": "^2.5.1"
402
401
  },
403
402
  "peerDependencies": {
@@ -418,5 +417,5 @@
418
417
  "optional": true
419
418
  }
420
419
  },
421
- "gitHead": "fc26f49e7a750c4603590d2fae6562745d5d9b92"
420
+ "gitHead": "aa58a578751088129a14bb38177fbd0ae19b5acd"
422
421
  }