@genai-fi/base 4.3.7 → 4.3.8

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.
Files changed (48) hide show
  1. package/dist/{Button-BgSe1MyE.js → Button-HlUfDiMM.js} +3 -3
  2. package/dist/{CircularProgress-DgKnRiq7.js → CircularProgress-DZ8YZ0Dt.js} +345 -310
  3. package/dist/{Close-Cv_QwhIN.js → Close-TS8H1lQg.js} +1 -1
  4. package/dist/{DefaultPropsProvider-BurgXZzw.js → DefaultPropsProvider-B_x1hwuY.js} +2 -2
  5. package/dist/{DialogQR-DoM8ZHBM.js → DialogQR-ByOert0g.js} +4 -4
  6. package/dist/{FileSaver.min-DhePf63e.js → FileSaver.min-CDwyANUI.js} +57 -57
  7. package/dist/{FlashWifi-slUpI7sB.js → FlashWifi-CNanHNye.js} +1 -1
  8. package/dist/{Portal-MiwrHMB_.js → Portal-BdRLJx1y.js} +140 -133
  9. package/dist/assets/SidePanel.css +1 -1
  10. package/dist/assets/SvgLayer.css +1 -1
  11. package/dist/assets/Widget.css +1 -1
  12. package/dist/{browser-HW-wgeM2.js → browser-DWbgwj89.js} +421 -451
  13. package/dist/components/AlertPara/AlertPara.js +1 -1
  14. package/dist/components/Application/Application.js +724 -689
  15. package/dist/components/BusyButton/BusyButton.d.ts +4 -4
  16. package/dist/components/BusyButton/BusyButton.js +1 -1
  17. package/dist/components/Button/Button.js +2 -2
  18. package/dist/components/ConnectionStatus/ConnectionStatus.js +3 -3
  19. package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
  20. package/dist/components/Feedback/Feedback.js +4 -4
  21. package/dist/components/Feedback/Rating.js +1 -1
  22. package/dist/components/Help/Help.js +5 -5
  23. package/dist/components/LangSelect/LangSelect.js +1 -1
  24. package/dist/components/Motd/Motd.js +1 -1
  25. package/dist/components/PieScore/PieScore.js +9609 -6092
  26. package/dist/components/QRCode/DialogQR.js +4 -4
  27. package/dist/components/QRCode/QRCode.js +2 -2
  28. package/dist/components/SidePanel/SidePanel.d.ts +2 -1
  29. package/dist/components/SidePanel/SidePanel.js +107 -89
  30. package/dist/components/Webcam/Webcam.js +3 -3
  31. package/dist/components/WorkflowLayout/Widget.js +1460 -1438
  32. package/dist/{createSvgIcon-BM4dw4Lw.js → createSvgIcon-DjQWJ3wn.js} +2 -2
  33. package/dist/{createTheme-DV959X3d.js → createTheme-DnBeI7Zz.js} +752 -749
  34. package/dist/hooks/peer.js +1 -1
  35. package/dist/{index-SOhdqzHq.js → index-B_zFkp-8.js} +2 -2
  36. package/dist/react-CiLnfHJp.js +140 -0
  37. package/dist/services/peer2peer/Incoming.js +1 -1
  38. package/dist/services/peer2peer/Outgoing.js +1 -1
  39. package/dist/services/peer2peer/Peer2Peer.js +538 -541
  40. package/dist/services/peer2peer/PeerConnection.js +1 -1
  41. package/dist/state/webrtcState.js +1 -1
  42. package/dist/style/theme.js +1 -1
  43. package/dist/util/Observer.js +1 -1
  44. package/dist/util/zip.js +1 -1
  45. package/dist/vanilla-OLGM3aAq.js +439 -0
  46. package/package.json +3 -3
  47. package/dist/react-B9NW8BS7.js +0 -112
  48. package/dist/vanilla-BJxibF1U.js +0 -404
@@ -1,16 +1,16 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import "../../browser-HW-wgeM2.js";
3
+ import "../../browser-DWbgwj89.js";
4
4
  import "@mui/material";
5
5
  import "react-i18next";
6
- import { D as k } from "../../DialogQR-DoM8ZHBM.js";
6
+ import { D as k } from "../../DialogQR-ByOert0g.js";
7
7
  import "../../state/webrtcState.js";
8
8
  import "../../hooks/peer.js";
9
9
  import "../Button/Button.js";
10
- import "../../index-SOhdqzHq.js";
10
+ import "../../index-B_zFkp-8.js";
11
11
  import "../../style/theme.js";
12
12
  import "../../util/canvas.js";
13
- import "../../FileSaver.min-DhePf63e.js";
13
+ import "../../FileSaver.min-CDwyANUI.js";
14
14
  import "../BusyButton/BusyButton.js";
15
15
  import "../WorkflowLayout/lines.js";
16
16
  import "../WorkflowLayout/svgContext.js";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import { useRef as h, useState as m, useEffect as u, Suspense as p } from "react";
3
- import { q as v } from "../../browser-HW-wgeM2.js";
4
- import { s as o, D as b } from "../../DialogQR-DoM8ZHBM.js";
3
+ import { q as v } from "../../browser-DWbgwj89.js";
4
+ import { s as o, D as b } from "../../DialogQR-ByOert0g.js";
5
5
  function w({ url: a, size: r, code: c, label: l, dialog: d }) {
6
6
  const t = h(null), [f, n] = m(!1);
7
7
  return u(() => {
@@ -5,6 +5,7 @@ interface Props extends PropsWithChildren {
5
5
  onOpen?: () => void;
6
6
  position?: 'right' | 'bottom';
7
7
  closeLabel?: string;
8
+ dark?: boolean;
8
9
  }
9
- export default function SidePanel({ children, open, onClose, onOpen, closeLabel, position }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export default function SidePanel({ children, open, onClose, onOpen, closeLabel, position, dark, }: Props): import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -1,98 +1,109 @@
1
- import { jsxs as p, jsx as u } from "react/jsx-runtime";
2
- import { useState as h, useRef as w, useEffect as E } from "react";
3
- import { C as T } from "../../Close-Cv_QwhIN.js";
4
- import { IconButton as k } from "@mui/material";
5
- import '../../assets/SidePanel.css';const V = "_sidePanel_g53a4_1", W = "_sidePanelHorizontal_g53a4_14", Z = "_closed_g53a4_19", C = "_opening_g53a4_27", K = "_open_g53a4_27", U = "_resizer_g53a4_47", X = "_resizerHorizontal_g53a4_58", j = "_resizerVertical_g53a4_67", F = "_noSelect_g53a4_75", O = "_resizerBar_g53a4_79", Y = "_resizing_g53a4_101", G = "_resizerHandle_g53a4_105", q = "_minimised_g53a4_131", J = "_content_g53a4_199", Q = "_closeButton_g53a4_205", t = {
6
- sidePanel: V,
7
- sidePanelHorizontal: W,
8
- closed: Z,
9
- opening: C,
10
- open: K,
11
- resizer: U,
12
- resizerHorizontal: X,
13
- resizerVertical: j,
14
- noSelect: F,
15
- resizerBar: O,
16
- resizing: Y,
17
- resizerHandle: G,
18
- minimised: q,
19
- content: J,
20
- closeButton: Q
21
- }, H = 30, b = 300, P = Math.max(b, Math.floor(window.innerWidth * 0.25)), c = "sidePanelWidth";
22
- function re({ children: $, open: o, onClose: d, onOpen: y, closeLabel: A, position: i = "right" }) {
23
- const [m, s] = h(o ? P : 0), S = w(null), [g, x] = h(!1), [v, R] = h(!1), [M, B] = h(!o), I = w(null), _ = w(null), l = w(
24
- window.sessionStorage.getItem(c) ? Number(window.sessionStorage.getItem(c)) : P
1
+ import { jsxs as R, jsx as u } from "react/jsx-runtime";
2
+ import { useState as w, useRef as g, useEffect as M } from "react";
3
+ import { C as V } from "../../Close-TS8H1lQg.js";
4
+ import { IconButton as T } from "@mui/material";
5
+ import '../../assets/SidePanel.css';const W = "_sidePanel_dklbs_1", Z = "_dark_dklbs_15", K = "_sidePanelHorizontal_dklbs_20", U = "_sidePanelVertical_dklbs_25", X = "_closed_dklbs_29", j = "_opening_dklbs_37", C = "_open_dklbs_37", F = "_resizer_dklbs_57", O = "_resizerHorizontal_dklbs_68", Y = "_resizerVertical_dklbs_77", G = "_noSelect_dklbs_85", q = "_resizerBar_dklbs_89", J = "_resizerDark_dklbs_100", Q = "_resizing_dklbs_115", ee = "_resizerHandle_dklbs_119", te = "_minimised_dklbs_152", ie = "_content_dklbs_234", ne = "_closeButton_dklbs_242", t = {
6
+ sidePanel: W,
7
+ dark: Z,
8
+ sidePanelHorizontal: K,
9
+ sidePanelVertical: U,
10
+ closed: X,
11
+ opening: j,
12
+ open: C,
13
+ resizer: F,
14
+ resizerHorizontal: O,
15
+ resizerVertical: Y,
16
+ noSelect: G,
17
+ resizerBar: q,
18
+ resizerDark: J,
19
+ resizing: Q,
20
+ resizerHandle: ee,
21
+ minimised: te,
22
+ content: ie,
23
+ closeButton: ne
24
+ }, I = 30, $ = 300, p = Math.max($, Math.floor(window.innerWidth * 0.25)), l = "sidePanelWidth";
25
+ function le({
26
+ children: N,
27
+ open: o,
28
+ onClose: m,
29
+ onOpen: E,
30
+ closeLabel: A,
31
+ position: n = "right",
32
+ dark: P = !1
33
+ }) {
34
+ const [_, s] = w(o ? p : 0), S = g(null), [z, x] = w(!1), [b, H] = w(!1), [k, y] = w(!o), v = g(null), f = g(null), c = g(
35
+ window.sessionStorage.getItem(l) ? Number(window.sessionStorage.getItem(l)) : p
25
36
  ), a = Math.max(
26
- b,
27
- Math.floor(i === "right" ? window.innerWidth * 0.9 : window.innerHeight * 0.9)
37
+ $,
38
+ Math.floor(n === "right" ? window.innerWidth * 0.9 : window.innerHeight * 0.9)
28
39
  );
29
- E(() => {
40
+ M(() => {
30
41
  if (o)
31
- R(!0), B(!1), _.current = document.activeElement ? document.activeElement : null;
42
+ H(!0), y(!1), f.current = document.activeElement ? document.activeElement : null;
32
43
  else {
33
44
  s(0);
34
- const n = setTimeout(() => {
35
- B(!0), _.current && document.contains(_.current) && _.current.focus();
45
+ const i = setTimeout(() => {
46
+ y(!0), f.current && document.contains(f.current) && f.current.focus();
36
47
  }, 300);
37
- return () => clearTimeout(n);
48
+ return () => clearTimeout(i);
38
49
  }
39
- }, [o]), E(() => {
40
- if (v) {
41
- I.current && I.current.focus(), s(l.current || P);
42
- const n = setTimeout(() => {
43
- R(!1);
50
+ }, [o]), M(() => {
51
+ if (b) {
52
+ v.current && v.current.focus(), s(c.current || p);
53
+ const i = setTimeout(() => {
54
+ H(!1);
44
55
  }, 300);
45
- return () => clearTimeout(n);
56
+ return () => clearTimeout(i);
46
57
  }
47
- }, [v]), E(() => {
48
- if (g) {
49
- let n = function(e) {
50
- if (g && S.current) {
51
- const N = S.current.getBoundingClientRect(), D = i === "right" ? N.right - e.clientX : N.bottom - e.clientY, f = Math.max(Math.min(D, a), H);
52
- f - D > 10 ? s(0) : (l.current = f, s(f), window.sessionStorage.setItem(c, f.toString())), e.preventDefault();
58
+ }, [b]), M(() => {
59
+ if (z) {
60
+ let i = function(e) {
61
+ if (z && S.current) {
62
+ const D = S.current.getBoundingClientRect(), B = n === "right" ? D.right - e.clientX : D.bottom - e.clientY, h = Math.max(Math.min(B, a), I);
63
+ h - B > 10 ? s(0) : (c.current = h, s(h), window.sessionStorage.setItem(l, h.toString())), e.preventDefault();
53
64
  }
54
65
  }, r = function() {
55
66
  x(!1);
56
67
  };
57
- return window.addEventListener("pointermove", n, { passive: !1 }), window.addEventListener("pointerup", r), document.body.classList.add(t.noSelect), () => {
58
- window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", r), document.body.classList.remove(t.noSelect);
68
+ return window.addEventListener("pointermove", i, { passive: !1 }), window.addEventListener("pointerup", r), document.body.classList.add(t.noSelect), () => {
69
+ window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", r), document.body.classList.remove(t.noSelect);
59
70
  };
60
71
  }
61
- }, [g, i, a]);
62
- const z = m === 0 || M, L = /* @__PURE__ */ p(
72
+ }, [z, n, a]);
73
+ const d = _ === 0 || k, L = /* @__PURE__ */ R(
63
74
  "div",
64
75
  {
65
- className: `${t.resizer} ${g ? t.resizing : ""} ${i === "right" ? t.resizerVertical : t.resizerHorizontal}`,
76
+ className: `${t.resizer} ${z ? t.resizing : ""} ${n === "right" ? t.resizerVertical : t.resizerHorizontal} ${P ? t.resizerDark : ""}`,
66
77
  onPointerDown: () => {
67
- x(!0), y && y();
78
+ x(!0), E && E();
68
79
  },
69
80
  children: [
70
81
  /* @__PURE__ */ u("div", { className: t.resizerBar }),
71
82
  o && /* @__PURE__ */ u(
72
83
  "div",
73
84
  {
74
- className: `${t.resizerHandle} ${z ? t.minimised : ""}`,
85
+ className: `${t.resizerHandle} ${d ? t.minimised : ""}`,
75
86
  role: "separator",
76
- "aria-orientation": i === "right" ? "vertical" : "horizontal",
87
+ "aria-orientation": n === "right" ? "vertical" : "horizontal",
77
88
  "aria-label": "Resize sidebar",
78
89
  tabIndex: 0,
79
- "aria-valuenow": m,
90
+ "aria-valuenow": _,
80
91
  "aria-valuemin": 0,
81
92
  "aria-valuemax": a,
82
- ref: I,
83
- onKeyDown: (n) => {
84
- i === "right" ? n.key === "ArrowRight" ? s((r) => {
93
+ ref: v,
94
+ onKeyDown: (i) => {
95
+ n === "right" ? i.key === "ArrowRight" ? s((r) => {
85
96
  const e = Math.min(a, Math.max(0, r - 50));
86
- return l.current = e, window.sessionStorage.setItem(c, e.toString()), e;
87
- }) : n.key === "ArrowLeft" && s((r) => {
88
- const e = Math.max(H, Math.min(a, r + 50));
89
- return l.current = e, window.sessionStorage.setItem(c, e.toString()), e;
90
- }) : n.key === "ArrowDown" ? s((r) => {
97
+ return c.current = e, window.sessionStorage.setItem(l, e.toString()), e;
98
+ }) : i.key === "ArrowLeft" && s((r) => {
99
+ const e = Math.max(I, Math.min(a, r + 50));
100
+ return c.current = e, window.sessionStorage.setItem(l, e.toString()), e;
101
+ }) : i.key === "ArrowDown" ? s((r) => {
91
102
  const e = Math.min(a, Math.max(0, r - 50));
92
- return l.current = e, window.sessionStorage.setItem(c, e.toString()), e;
93
- }) : n.key === "ArrowUp" && s((r) => {
94
- const e = Math.max(H, Math.min(a, r + 50));
95
- return l.current = e, window.sessionStorage.setItem(c, e.toString()), e;
103
+ return c.current = e, window.sessionStorage.setItem(l, e.toString()), e;
104
+ }) : i.key === "ArrowUp" && s((r) => {
105
+ const e = Math.max(I, Math.min(a, r + 50));
106
+ return c.current = e, window.sessionStorage.setItem(l, e.toString()), e;
96
107
  });
97
108
  }
98
109
  }
@@ -100,40 +111,47 @@ function re({ children: $, open: o, onClose: d, onOpen: y, closeLabel: A, positi
100
111
  ]
101
112
  }
102
113
  );
103
- return /* @__PURE__ */ p(
114
+ return /* @__PURE__ */ R(
104
115
  "aside",
105
116
  {
106
- className: `${t.sidePanel} ${o ? t.open : t.closed} ${v ? t.opening : ""} ${i === "right" ? t.sidePanelVertical : t.sidePanelHorizontal}`,
107
- style: i === "right" ? { width: z ? 0 : m, visibility: M ? "hidden" : void 0 } : { height: z ? 0 : m, visibility: M ? "hidden" : void 0 },
117
+ className: `${t.sidePanel} ${o ? t.open : t.closed} ${b ? t.opening : ""} ${n === "right" ? t.sidePanelVertical : t.sidePanelHorizontal} ${P ? t.dark : ""}`,
118
+ style: n === "right" ? {
119
+ width: d ? 0 : _,
120
+ visibility: k ? "hidden" : void 0,
121
+ flexBasis: d ? 0 : "unset"
122
+ } : {
123
+ height: d ? 0 : _,
124
+ visibility: k ? "hidden" : void 0,
125
+ flexBasis: d ? 0 : "unset"
126
+ },
108
127
  ref: S,
109
128
  "aria-hidden": !o,
110
- onKeyDownCapture: (n) => {
111
- n.key === "Escape" && (n.stopPropagation(), d == null || d());
129
+ onKeyDownCapture: (i) => {
130
+ i.key === "Escape" && (i.stopPropagation(), m == null || m());
112
131
  },
113
132
  children: [
114
- (i === "right" || i === "bottom") && L,
115
- /* @__PURE__ */ p("div", { className: t.content, children: [
116
- d && /* @__PURE__ */ u("div", { className: t.closeButton, children: /* @__PURE__ */ u(
117
- k,
118
- {
119
- onClick: d,
120
- "data-testid": "sidepanel-close-button",
121
- "aria-label": A ?? "Close side panel",
122
- children: /* @__PURE__ */ u(
123
- T,
124
- {
125
- fontSize: "medium",
126
- htmlColor: "#444"
127
- }
128
- )
129
- }
130
- ) }),
131
- z || m < b ? null : $
132
- ] })
133
+ (n === "right" || n === "bottom") && L,
134
+ /* @__PURE__ */ u("div", { className: t.content, children: d ? null : N }),
135
+ m && _ > 50 && /* @__PURE__ */ u("div", { className: t.closeButton, children: /* @__PURE__ */ u(
136
+ T,
137
+ {
138
+ onClick: m,
139
+ "data-testid": "sidepanel-close-button",
140
+ "aria-label": A ?? "Close side panel",
141
+ color: "inherit",
142
+ children: /* @__PURE__ */ u(
143
+ V,
144
+ {
145
+ fontSize: "medium",
146
+ color: "inherit"
147
+ }
148
+ )
149
+ }
150
+ ) })
133
151
  ]
134
152
  }
135
153
  );
136
154
  }
137
155
  export {
138
- re as default
156
+ le as default
139
157
  };
@@ -3,10 +3,10 @@ import * as G from "react";
3
3
  import { useState as N, useRef as T, useEffect as b, useCallback as E } from "react";
4
4
  import { useTranslation as J } from "react-i18next";
5
5
  import { IconButton as V } from "@mui/material";
6
- import { c as Q } from "../../createSvgIcon-BM4dw4Lw.js";
6
+ import { c as Q } from "../../createSvgIcon-DjQWJ3wn.js";
7
7
  import { WebcamClass as Y } from "./webcamClass.js";
8
- import { g as Z, u as P, c as W, a as ee, s as te, m as ae } from "../../DefaultPropsProvider-BurgXZzw.js";
9
- import { g as ne, P as a } from "../../createTheme-DV959X3d.js";
8
+ import { g as Z, u as P, c as W, a as ee, s as te, m as ae } from "../../DefaultPropsProvider-B_x1hwuY.js";
9
+ import { g as ne, P as a } from "../../createTheme-DnBeI7Zz.js";
10
10
  import { css as A, keyframes as H } from "@emotion/react";
11
11
  import '../../assets/Webcam.css';function re(e) {
12
12
  return String(e).match(/[\d.\-+]*\s*(.*)/)[1] || "";