@genai-fi/base 3.0.1

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 (99) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +18 -0
  3. package/dist/Button-DQwRVw4a.js +1918 -0
  4. package/dist/DefaultPropsProvider-C0Ib4Mye.js +520 -0
  5. package/dist/DialogQR-BU45QB3i.js +1625 -0
  6. package/dist/FileSaver.min-DhePf63e.js +2397 -0
  7. package/dist/FlashWifi-CaAOKd3g.js +33 -0
  8. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  9. package/dist/assets/AlertPara.css +1 -0
  10. package/dist/assets/ConnectionStatus.css +1 -0
  11. package/dist/assets/DialogQR.css +1 -0
  12. package/dist/assets/Motd.css +1 -0
  13. package/dist/assets/Privacy.css +1 -0
  14. package/dist/assets/Spinner.css +1 -0
  15. package/dist/assets/Webcam.css +1 -0
  16. package/dist/assets/style.css +1 -0
  17. package/dist/assets/theme.css +1 -0
  18. package/dist/colours.module.css +19 -0
  19. package/dist/components/AlertPara/AlertPara.d.ts +8 -0
  20. package/dist/components/AlertPara/AlertPara.js +19 -0
  21. package/dist/components/BusyButton/BusyButton.d.ts +7 -0
  22. package/dist/components/BusyButton/BusyButton.js +25 -0
  23. package/dist/components/Button/Button.d.ts +6 -0
  24. package/dist/components/Button/Button.js +6 -0
  25. package/dist/components/ConnectionStatus/ConnectionStatus.d.ts +12 -0
  26. package/dist/components/ConnectionStatus/ConnectionStatus.js +82 -0
  27. package/dist/components/ConnectionStatus/FlashWifi.d.ts +1 -0
  28. package/dist/components/ConnectionStatus/FlashWifi.js +6 -0
  29. package/dist/components/ConnectionStatus/check.d.ts +1 -0
  30. package/dist/components/ConnectionStatus/check.js +10 -0
  31. package/dist/components/ConnectionStatus/ice.d.ts +13 -0
  32. package/dist/components/ConnectionStatus/ice.js +12 -0
  33. package/dist/components/ContentLoader/ContentError.d.ts +5 -0
  34. package/dist/components/ContentLoader/ContentError.js +21 -0
  35. package/dist/components/ContentLoader/ContentLoader.d.ts +8 -0
  36. package/dist/components/ContentLoader/ContentLoader.js +51 -0
  37. package/dist/components/ContentLoader/ContentProgress.d.ts +6 -0
  38. package/dist/components/ContentLoader/ContentProgress.js +31 -0
  39. package/dist/components/Motd/Motd.d.ts +5 -0
  40. package/dist/components/Motd/Motd.js +48 -0
  41. package/dist/components/Privacy/Privacy.d.ts +7 -0
  42. package/dist/components/Privacy/Privacy.js +57 -0
  43. package/dist/components/QRCode/DialogQR.d.ts +7 -0
  44. package/dist/components/QRCode/DialogQR.js +14 -0
  45. package/dist/components/QRCode/QRCode.d.ts +9 -0
  46. package/dist/components/QRCode/QRCode.js +61 -0
  47. package/dist/components/Spinner/Spinner.d.ts +6 -0
  48. package/dist/components/Spinner/Spinner.js +33 -0
  49. package/dist/components/Webcam/Webcam.d.ts +15 -0
  50. package/dist/components/Webcam/Webcam.js +397 -0
  51. package/dist/components/Webcam/webcamClass.d.ts +32 -0
  52. package/dist/components/Webcam/webcamClass.js +76 -0
  53. package/dist/createSvgIcon-BfF8yuCp.js +249 -0
  54. package/dist/createTheme-BIcG8YPQ.js +2895 -0
  55. package/dist/hooks/id.d.ts +1 -0
  56. package/dist/hooks/id.js +16 -0
  57. package/dist/hooks/onlyOnce.d.ts +1 -0
  58. package/dist/hooks/onlyOnce.js +7 -0
  59. package/dist/hooks/peer.d.ts +25 -0
  60. package/dist/hooks/peer.js +70 -0
  61. package/dist/hooks/random.d.ts +1 -0
  62. package/dist/hooks/random.js +9 -0
  63. package/dist/hooks/useTabActive.d.ts +1 -0
  64. package/dist/hooks/useTabActive.js +17 -0
  65. package/dist/index-SOhdqzHq.js +113 -0
  66. package/dist/main.d.ts +21 -0
  67. package/dist/main.js +49 -0
  68. package/dist/react-D-b-Xrzv.js +98 -0
  69. package/dist/services/peer2peer/Incoming.d.ts +13 -0
  70. package/dist/services/peer2peer/Incoming.js +39 -0
  71. package/dist/services/peer2peer/Outgoing.d.ts +25 -0
  72. package/dist/services/peer2peer/Outgoing.js +65 -0
  73. package/dist/services/peer2peer/Peer2Peer.d.ts +80 -0
  74. package/dist/services/peer2peer/Peer2Peer.js +3367 -0
  75. package/dist/services/peer2peer/PeerConnection.d.ts +40 -0
  76. package/dist/services/peer2peer/PeerConnection.js +155 -0
  77. package/dist/services/peer2peer/error.d.ts +2 -0
  78. package/dist/services/peer2peer/error.js +5 -0
  79. package/dist/services/peer2peer/types.d.ts +38 -0
  80. package/dist/services/peer2peer/types.js +1 -0
  81. package/dist/state/webrtcState.d.ts +12 -0
  82. package/dist/state/webrtcState.js +6 -0
  83. package/dist/style/theme.d.ts +1 -0
  84. package/dist/style/theme.js +33 -0
  85. package/dist/style.module-DSFm2eLD.js +9 -0
  86. package/dist/util/backoff.d.ts +1 -0
  87. package/dist/util/backoff.js +6 -0
  88. package/dist/util/base64.d.ts +2 -0
  89. package/dist/util/base64.js +19 -0
  90. package/dist/util/canvas.d.ts +7 -0
  91. package/dist/util/canvas.js +92 -0
  92. package/dist/util/crypto.d.ts +7 -0
  93. package/dist/util/crypto.js +50 -0
  94. package/dist/util/randomId.d.ts +1 -0
  95. package/dist/util/randomId.js +8 -0
  96. package/dist/util/zip.d.ts +13 -0
  97. package/dist/util/zip.js +94 -0
  98. package/dist/webrtcState-D0nJpE9Z.js +406 -0
  99. package/package.json +88 -0
@@ -0,0 +1,249 @@
1
+ import * as h from "react";
2
+ import { jsxs as b, jsx as I } from "react/jsx-runtime";
3
+ import { g as w, a as z, P as e } from "./createTheme-BIcG8YPQ.js";
4
+ import { g as N, u as C, s as O, c as T, a as R, m as E } from "./DefaultPropsProvider-C0Ib4Mye.js";
5
+ function j(o) {
6
+ return w("MuiSvgIcon", o);
7
+ }
8
+ N("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
9
+ const V = (o) => {
10
+ const {
11
+ color: r,
12
+ fontSize: n,
13
+ classes: s
14
+ } = o, t = {
15
+ root: ["root", r !== "inherit" && `color${z(r)}`, `fontSize${z(n)}`]
16
+ };
17
+ return R(t, j, s);
18
+ }, $ = O("svg", {
19
+ name: "MuiSvgIcon",
20
+ slot: "Root",
21
+ overridesResolver: (o, r) => {
22
+ const {
23
+ ownerState: n
24
+ } = o;
25
+ return [r.root, n.color !== "inherit" && r[`color${z(n.color)}`], r[`fontSize${z(n.fontSize)}`]];
26
+ }
27
+ })(E(({
28
+ theme: o
29
+ }) => {
30
+ var r, n, s, t, l, S, a, g, p, d, c, m, y, f;
31
+ return {
32
+ userSelect: "none",
33
+ width: "1em",
34
+ height: "1em",
35
+ display: "inline-block",
36
+ flexShrink: 0,
37
+ transition: (t = (r = o.transitions) == null ? void 0 : r.create) == null ? void 0 : t.call(r, "fill", {
38
+ duration: (s = (n = (o.vars ?? o).transitions) == null ? void 0 : n.duration) == null ? void 0 : s.shorter
39
+ }),
40
+ variants: [
41
+ {
42
+ props: (i) => !i.hasSvgAsChild,
43
+ style: {
44
+ // the <svg> will define the property that has `currentColor`
45
+ // for example heroicons uses fill="none" and stroke="currentColor"
46
+ fill: "currentColor"
47
+ }
48
+ },
49
+ {
50
+ props: {
51
+ fontSize: "inherit"
52
+ },
53
+ style: {
54
+ fontSize: "inherit"
55
+ }
56
+ },
57
+ {
58
+ props: {
59
+ fontSize: "small"
60
+ },
61
+ style: {
62
+ fontSize: ((S = (l = o.typography) == null ? void 0 : l.pxToRem) == null ? void 0 : S.call(l, 20)) || "1.25rem"
63
+ }
64
+ },
65
+ {
66
+ props: {
67
+ fontSize: "medium"
68
+ },
69
+ style: {
70
+ fontSize: ((g = (a = o.typography) == null ? void 0 : a.pxToRem) == null ? void 0 : g.call(a, 24)) || "1.5rem"
71
+ }
72
+ },
73
+ {
74
+ props: {
75
+ fontSize: "large"
76
+ },
77
+ style: {
78
+ fontSize: ((d = (p = o.typography) == null ? void 0 : p.pxToRem) == null ? void 0 : d.call(p, 35)) || "2.1875rem"
79
+ }
80
+ },
81
+ // TODO v5 deprecate color prop, v6 remove for sx
82
+ ...Object.entries((o.vars ?? o).palette).filter(([, i]) => i && i.main).map(([i]) => {
83
+ var u, v;
84
+ return {
85
+ props: {
86
+ color: i
87
+ },
88
+ style: {
89
+ color: (v = (u = (o.vars ?? o).palette) == null ? void 0 : u[i]) == null ? void 0 : v.main
90
+ }
91
+ };
92
+ }),
93
+ {
94
+ props: {
95
+ color: "action"
96
+ },
97
+ style: {
98
+ color: (m = (c = (o.vars ?? o).palette) == null ? void 0 : c.action) == null ? void 0 : m.active
99
+ }
100
+ },
101
+ {
102
+ props: {
103
+ color: "disabled"
104
+ },
105
+ style: {
106
+ color: (f = (y = (o.vars ?? o).palette) == null ? void 0 : y.action) == null ? void 0 : f.disabled
107
+ }
108
+ },
109
+ {
110
+ props: {
111
+ color: "inherit"
112
+ },
113
+ style: {
114
+ color: void 0
115
+ }
116
+ }
117
+ ]
118
+ };
119
+ })), x = /* @__PURE__ */ h.forwardRef(function(r, n) {
120
+ const s = C({
121
+ props: r,
122
+ name: "MuiSvgIcon"
123
+ }), {
124
+ children: t,
125
+ className: l,
126
+ color: S = "inherit",
127
+ component: a = "svg",
128
+ fontSize: g = "medium",
129
+ htmlColor: p,
130
+ inheritViewBox: d = !1,
131
+ titleAccess: c,
132
+ viewBox: m = "0 0 24 24",
133
+ ...y
134
+ } = s, f = /* @__PURE__ */ h.isValidElement(t) && t.type === "svg", i = {
135
+ ...s,
136
+ color: S,
137
+ component: a,
138
+ fontSize: g,
139
+ instanceFontSize: r.fontSize,
140
+ inheritViewBox: d,
141
+ viewBox: m,
142
+ hasSvgAsChild: f
143
+ }, u = {};
144
+ d || (u.viewBox = m);
145
+ const v = V(i);
146
+ return /* @__PURE__ */ b($, {
147
+ as: a,
148
+ className: T(v.root, l),
149
+ focusable: "false",
150
+ color: p,
151
+ "aria-hidden": c ? void 0 : !0,
152
+ role: c ? "img" : void 0,
153
+ ref: n,
154
+ ...u,
155
+ ...y,
156
+ ...f && t.props,
157
+ ownerState: i,
158
+ children: [f ? t.props.children : t, c ? /* @__PURE__ */ I("title", {
159
+ children: c
160
+ }) : null]
161
+ });
162
+ });
163
+ process.env.NODE_ENV !== "production" && (x.propTypes = {
164
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
165
+ // │ These PropTypes are generated from the TypeScript type definitions. │
166
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
167
+ // └─────────────────────────────────────────────────────────────────────┘
168
+ /**
169
+ * Node passed into the SVG element.
170
+ */
171
+ children: e.node,
172
+ /**
173
+ * Override or extend the styles applied to the component.
174
+ */
175
+ classes: e.object,
176
+ /**
177
+ * @ignore
178
+ */
179
+ className: e.string,
180
+ /**
181
+ * The color of the component.
182
+ * It supports both default and custom theme colors, which can be added as shown in the
183
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
184
+ * You can use the `htmlColor` prop to apply a color attribute to the SVG element.
185
+ * @default 'inherit'
186
+ */
187
+ color: e.oneOfType([e.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
188
+ /**
189
+ * The component used for the root node.
190
+ * Either a string to use a HTML element or a component.
191
+ */
192
+ component: e.elementType,
193
+ /**
194
+ * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
195
+ * @default 'medium'
196
+ */
197
+ fontSize: e.oneOfType([e.oneOf(["inherit", "large", "medium", "small"]), e.string]),
198
+ /**
199
+ * Applies a color attribute to the SVG element.
200
+ */
201
+ htmlColor: e.string,
202
+ /**
203
+ * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
204
+ * prop will be ignored.
205
+ * Useful when you want to reference a custom `component` and have `SvgIcon` pass that
206
+ * `component`'s viewBox to the root node.
207
+ * @default false
208
+ */
209
+ inheritViewBox: e.bool,
210
+ /**
211
+ * The shape-rendering attribute. The behavior of the different options is described on the
212
+ * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/shape-rendering).
213
+ * If you are having issues with blurry icons you should investigate this prop.
214
+ */
215
+ shapeRendering: e.string,
216
+ /**
217
+ * The system prop that allows defining system overrides as well as additional CSS styles.
218
+ */
219
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
220
+ /**
221
+ * Provides a human-readable title for the element that contains it.
222
+ * https://www.w3.org/TR/SVG-access/#Equivalent
223
+ */
224
+ titleAccess: e.string,
225
+ /**
226
+ * Allows you to redefine what the coordinates without units mean inside an SVG element.
227
+ * For example, if the SVG element is 500 (width) by 200 (height),
228
+ * and you pass viewBox="0 0 50 20",
229
+ * this means that the coordinates inside the SVG will go from the top left corner (0,0)
230
+ * to bottom right (50,20) and each unit will be worth 10px.
231
+ * @default '0 0 24 24'
232
+ */
233
+ viewBox: e.string
234
+ });
235
+ x.muiName = "SvgIcon";
236
+ function M(o, r) {
237
+ function n(s, t) {
238
+ return /* @__PURE__ */ I(x, {
239
+ "data-testid": process.env.NODE_ENV !== "production" ? `${r}Icon` : void 0,
240
+ ref: t,
241
+ ...s,
242
+ children: o
243
+ });
244
+ }
245
+ return process.env.NODE_ENV !== "production" && (n.displayName = `${r}Icon`), n.muiName = x.muiName, /* @__PURE__ */ h.memo(/* @__PURE__ */ h.forwardRef(n));
246
+ }
247
+ export {
248
+ M as c
249
+ };