@genai-fi/base 3.0.2 → 4.0.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.
Files changed (82) hide show
  1. package/dist/Button-CGKw9sMz.js +656 -0
  2. package/dist/CircularProgress-C6sMwjDC.js +1275 -0
  3. package/dist/{DefaultPropsProvider-C0Ib4Mye.js → DefaultPropsProvider-D2IJ8Qbs.js} +5 -1
  4. package/dist/{DialogQR-DVWhImXI.js → DialogQR-CyZcX7ul.js} +9 -5
  5. package/dist/{FlashWifi-CaAOKd3g.js → FlashWifi-CYp0UP0B.js} +1 -1
  6. package/dist/Portal-BqkDy0Wc.js +613 -0
  7. package/dist/SvgLayer-CA0elY7q.js +36 -0
  8. package/dist/assets/IconButtonDot.css +1 -0
  9. package/dist/assets/LangSelect.css +1 -0
  10. package/dist/assets/Loading.css +1 -0
  11. package/dist/assets/PercentageBar.css +1 -0
  12. package/dist/assets/PieScore.css +1 -0
  13. package/dist/assets/SvgLayer.css +1 -0
  14. package/dist/assets/Widget.css +1 -0
  15. package/dist/assets/style.css +1 -1
  16. package/dist/assets/style2.css +1 -0
  17. package/dist/colours.module.css +4 -0
  18. package/dist/components/AlertPara/AlertPara.js +1 -1
  19. package/dist/components/Application/Application.d.ts +10 -0
  20. package/dist/components/Application/Application.js +1610 -0
  21. package/dist/components/BusyButton/BusyButton.js +7 -6
  22. package/dist/components/Button/Button.js +12 -4
  23. package/dist/components/ConnectionStatus/ConnectionStatus.d.ts +1 -5
  24. package/dist/components/ConnectionStatus/ConnectionStatus.js +48 -47
  25. package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
  26. package/dist/components/ContentLoader/ContentError.js +1 -1
  27. package/dist/components/ContentLoader/ContentLoader.js +5 -1
  28. package/dist/components/ContentLoader/ContentProgress.js +1 -1
  29. package/dist/components/IconButtonDot/IconButtonDot.d.ts +7 -0
  30. package/dist/components/IconButtonDot/IconButtonDot.js +22 -0
  31. package/dist/components/IconMenu/IconMenu.d.ts +12 -0
  32. package/dist/components/IconMenu/IconMenu.js +26 -0
  33. package/dist/components/IconMenu/IconMenuInline.d.ts +6 -0
  34. package/dist/components/IconMenu/IconMenuInline.js +12 -0
  35. package/dist/components/IconMenu/Item.d.ts +9 -0
  36. package/dist/components/IconMenu/Item.js +34 -0
  37. package/dist/components/IconMenu/Spacer.d.ts +1 -0
  38. package/dist/components/IconMenu/Spacer.js +11 -0
  39. package/dist/components/IconMenu/context.d.ts +1 -0
  40. package/dist/components/IconMenu/context.js +5 -0
  41. package/dist/components/IconMenu/index.d.ts +4 -0
  42. package/dist/components/IconMenu/index.js +10 -0
  43. package/dist/components/LangSelect/LangSelect.d.ts +12 -0
  44. package/dist/components/LangSelect/LangSelect.js +46 -0
  45. package/dist/components/Loading/Loading.d.ts +7 -0
  46. package/dist/components/Loading/Loading.js +15 -0
  47. package/dist/components/Motd/Motd.js +1 -1
  48. package/dist/components/PercentageBar/PercentageBar.d.ts +7 -0
  49. package/dist/components/PercentageBar/PercentageBar.js +37 -0
  50. package/dist/components/PieScore/PieScore.d.ts +6 -0
  51. package/dist/components/PieScore/PieScore.js +10676 -0
  52. package/dist/components/QRCode/DialogQR.js +8 -4
  53. package/dist/components/QRCode/QRCode.js +1 -1
  54. package/dist/components/Webcam/Webcam.js +3 -3
  55. package/dist/components/WorkflowLayout/Layout.d.ts +7 -0
  56. package/dist/components/WorkflowLayout/Layout.js +43 -0
  57. package/dist/components/WorkflowLayout/SvgLayer.d.ts +14 -0
  58. package/dist/components/WorkflowLayout/SvgLayer.js +5 -0
  59. package/dist/components/WorkflowLayout/Widget.d.ts +18 -0
  60. package/dist/components/WorkflowLayout/Widget.js +7413 -0
  61. package/dist/components/WorkflowLayout/index.d.ts +3 -0
  62. package/dist/components/WorkflowLayout/index.js +6 -0
  63. package/dist/components/WorkflowLayout/lines.d.ts +17 -0
  64. package/dist/components/WorkflowLayout/lines.js +37 -0
  65. package/dist/{createSvgIcon-BfF8yuCp.js → createSvgIcon-DmrVEdN7.js} +2 -2
  66. package/dist/{createTheme-BIcG8YPQ.js → createTheme-a85zdZWm.js} +4 -0
  67. package/dist/hooks/peer.d.ts +25 -2
  68. package/dist/hooks/peer.js +196 -54
  69. package/dist/main.d.ts +6 -0
  70. package/dist/main.js +53 -33
  71. package/dist/react-D_xU5dL6.js +112 -0
  72. package/dist/state/webrtcState.js +5 -4
  73. package/dist/style/theme.js +1 -1
  74. package/dist/style.module-BAnhZ_KJ.js +9 -0
  75. package/dist/style.module-BDpZJv9y.js +26 -0
  76. package/dist/util/Observer.d.ts +7 -0
  77. package/dist/util/Observer.js +9 -0
  78. package/dist/{webrtcState-D0nJpE9Z.js → vanilla-BJxibF1U.js} +83 -85
  79. package/package.json +8 -2
  80. package/dist/Button-DQwRVw4a.js +0 -1918
  81. package/dist/react-D-b-Xrzv.js +0 -98
  82. package/dist/style.module-DSFm2eLD.js +0 -9
@@ -1,15 +1,19 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { D as x } from "../../DialogQR-DVWhImXI.js";
3
+ import { D as g } from "../../DialogQR-CyZcX7ul.js";
4
4
  import "@mui/material";
5
5
  import "react-i18next";
6
- import "../../webrtcState-D0nJpE9Z.js";
7
- import "../../Button-DQwRVw4a.js";
6
+ import "../../state/webrtcState.js";
7
+ import "../../hooks/peer.js";
8
+ import "../Button/Button.js";
8
9
  import "../../index-SOhdqzHq.js";
9
10
  import "../../style/theme.js";
10
11
  import "../../util/canvas.js";
11
12
  import "../../FileSaver.min-DhePf63e.js";
12
13
  import "../BusyButton/BusyButton.js";
14
+ import "../WorkflowLayout/Widget.js";
15
+ import "../IconMenu/context.js";
16
+ import "@emotion/react";
13
17
  export {
14
- x as default
18
+ g as default
15
19
  };
@@ -1,6 +1,6 @@
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 v } from "react";
3
- import { q as p, s as o, D as b } from "../../DialogQR-DVWhImXI.js";
3
+ import { q as p, s as o, D as b } from "../../DialogQR-CyZcX7ul.js";
4
4
  function q({ url: a, size: r, code: c, label: l, dialog: d }) {
5
5
  const t = h(null), [f, n] = m(!1);
6
6
  return u(() => {
@@ -3,10 +3,10 @@ import * as G from "react";
3
3
  import { useState as M, useRef as O, useEffect as y, 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-BfF8yuCp.js";
6
+ import { c as Q } from "../../createSvgIcon-DmrVEdN7.js";
7
7
  import { WebcamClass as Y } from "./webcamClass.js";
8
- import { g as Z, u as z, s as P, c as W, a as ee, m as te } from "../../DefaultPropsProvider-C0Ib4Mye.js";
9
- import { g as ae, b as ne, P as a } from "../../createTheme-BIcG8YPQ.js";
8
+ import { g as Z, u as z, s as P, c as W, a as ee, m as te } from "../../DefaultPropsProvider-D2IJ8Qbs.js";
9
+ import { g as ae, b as ne, P as a } from "../../createTheme-a85zdZWm.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] || "";
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { IConnection } from './lines';
3
+ interface Props extends PropsWithChildren {
4
+ connections: IConnection[];
5
+ }
6
+ export default function WorkflowLayout({ children, connections }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,43 @@
1
+ import { jsx as c, jsxs as m } from "react/jsx-runtime";
2
+ import { useState as d, useRef as i, useEffect as p } from "react";
3
+ import { extractNodesFromElements as v, generateLines as y } from "./lines.js";
4
+ import { s as a, S as g } from "../../SvgLayer-CA0elY7q.js";
5
+ function L({ children: n, connections: o }) {
6
+ const [l, u] = d([]), r = i(null), s = i();
7
+ return p(() => {
8
+ if (r.current) {
9
+ s.current = new ResizeObserver(() => {
10
+ if (r.current) {
11
+ const e = v(r.current);
12
+ u(y(e, o));
13
+ }
14
+ }), s.current.observe(r.current);
15
+ const t = r.current.children;
16
+ if (t)
17
+ for (let e = 0; e < t.length; ++e) {
18
+ const f = t[e];
19
+ s.current.observe(f);
20
+ }
21
+ return () => {
22
+ var e;
23
+ (e = s.current) == null || e.disconnect();
24
+ };
25
+ }
26
+ }, [o]), /* @__PURE__ */ c("div", { className: a.workspace, children: /* @__PURE__ */ m(
27
+ "div",
28
+ {
29
+ className: a.container,
30
+ ref: r,
31
+ style: {
32
+ gridTemplateColumns: `repeat(${Array.isArray(n) ? n.filter((t) => !!t).length : 1}, max-content)`
33
+ },
34
+ children: [
35
+ /* @__PURE__ */ c(g, { lines: l }),
36
+ n
37
+ ]
38
+ }
39
+ ) });
40
+ }
41
+ export {
42
+ L as default
43
+ };
@@ -0,0 +1,14 @@
1
+ export interface ILine {
2
+ x1: number;
3
+ x2: number;
4
+ y1: number;
5
+ y2: number;
6
+ direction: 'horizontal' | 'vertical';
7
+ id1: string;
8
+ id2: string;
9
+ }
10
+ interface Props {
11
+ lines: ILine[];
12
+ }
13
+ export default function SvgLayer({ lines }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,5 @@
1
+ import "react/jsx-runtime";
2
+ import { S as a } from "../../SvgLayer-CA0elY7q.js";
3
+ export {
4
+ a as default
5
+ };
@@ -0,0 +1,18 @@
1
+ import { default as React, CSSProperties } from 'react';
2
+ interface Props extends React.HTMLProps<HTMLDivElement> {
3
+ title?: string;
4
+ setTitle?: (title: string) => void;
5
+ menu?: React.ReactNode;
6
+ className?: string;
7
+ focus?: boolean;
8
+ disabled?: boolean;
9
+ hidden?: boolean;
10
+ dataWidget?: string;
11
+ 'aria-label'?: string;
12
+ active?: boolean;
13
+ id?: string;
14
+ noPadding?: boolean;
15
+ contentStyle?: CSSProperties;
16
+ }
17
+ export declare function Widget({ disabled, focus, title, setTitle, children, menu, className, hidden, dataWidget, id, noPadding, active, contentStyle, ...props }: Props): import("react/jsx-runtime").JSX.Element;
18
+ export {};