@screegen/components 0.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.
- package/dist/components/OverviewGrid/OverviewGrid.d.ts +13 -0
- package/dist/components/OverviewGrid/OverviewGrid.d.ts.map +1 -0
- package/dist/components/OverviewGrid/index.d.ts +3 -0
- package/dist/components/OverviewGrid/index.d.ts.map +1 -0
- package/dist/components/Screen/Screen.d.ts +10 -0
- package/dist/components/Screen/Screen.d.ts.map +1 -0
- package/dist/components/Screen/index.d.ts +3 -0
- package/dist/components/Screen/index.d.ts.map +1 -0
- package/dist/components/ScreengenConfig/ScreengenConfig.d.ts +6 -0
- package/dist/components/ScreengenConfig/ScreengenConfig.d.ts.map +1 -0
- package/dist/components/ScreengenConfig/index.d.ts +3 -0
- package/dist/components/ScreengenConfig/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useColorScheme.d.ts +10 -0
- package/dist/hooks/useColorScheme.d.ts.map +1 -0
- package/dist/hooks/useUrlState.d.ts +5 -0
- package/dist/hooks/useUrlState.d.ts.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +817 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProjectConfig, ColorScheme } from '../../types';
|
|
2
|
+
export interface OverviewGridProps<L extends string = string> {
|
|
3
|
+
config: ProjectConfig<L>;
|
|
4
|
+
language: L;
|
|
5
|
+
scale?: number;
|
|
6
|
+
colorScheme?: ColorScheme;
|
|
7
|
+
onLanguageChange?: (language: L) => void;
|
|
8
|
+
onScaleChange?: (scale: number) => void;
|
|
9
|
+
onColorSchemeChange?: (scheme: ColorScheme) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function OverviewGrid<L extends string>({ config, language, scale, colorScheme, onLanguageChange, onScaleChange, onColorSchemeChange, className, }: OverviewGridProps<L>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=OverviewGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverviewGrid.d.ts","sourceRoot":"","sources":["../../../src/components/OverviewGrid/OverviewGrid.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAgB,MAAM,aAAa,CAAC;AAOvE,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC1D,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACzB,QAAQ,EAAE,CAAC,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,EAC7C,MAAM,EACN,QAAQ,EACR,KAAqB,EACrB,WAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,SAAS,GACV,EAAE,iBAAiB,CAAC,CAAC,CAAC,2CA6FtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OverviewGrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ProjectConfig } from '../../types';
|
|
2
|
+
export interface ScreenProps<L extends string = string> {
|
|
3
|
+
config: ProjectConfig<L>;
|
|
4
|
+
deviceKey: string;
|
|
5
|
+
screenKey: string;
|
|
6
|
+
language: L;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function Screen<L extends string>({ config, deviceKey, screenKey, language, className, }: ScreenProps<L>): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
//# sourceMappingURL=Screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/components/Screen/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACpD,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,EACvC,MAAM,EACN,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,GACV,EAAE,WAAW,CAAC,CAAC,CAAC,kDA4BhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ProjectConfig } from '../../types';
|
|
2
|
+
export interface ScreengenConfigProps<L extends string = string> {
|
|
3
|
+
config: ProjectConfig<L>;
|
|
4
|
+
}
|
|
5
|
+
export declare function ScreengenConfig<L extends string = string>({ config, }: ScreengenConfigProps<L>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ScreengenConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScreengenConfig.d.ts","sourceRoot":"","sources":["../../../src/components/ScreengenConfig/ScreengenConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC7D,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EACzD,MAAM,GACP,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CAoBzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScreengenConfig/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Screen } from './Screen';
|
|
2
|
+
export type { ScreenProps } from './Screen';
|
|
3
|
+
export { OverviewGrid } from './OverviewGrid';
|
|
4
|
+
export type { OverviewGridProps } from './OverviewGrid';
|
|
5
|
+
export { ScreengenConfig } from './ScreengenConfig';
|
|
6
|
+
export type { ScreengenConfigProps } from './ScreengenConfig';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColorScheme } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Get the system color scheme preference
|
|
4
|
+
*/
|
|
5
|
+
export declare function getSystemColorScheme(): ColorScheme;
|
|
6
|
+
/**
|
|
7
|
+
* Hook to track system color scheme preference with optional override
|
|
8
|
+
*/
|
|
9
|
+
export declare function useColorScheme(override?: ColorScheme): ColorScheme;
|
|
10
|
+
//# sourceMappingURL=useColorScheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useColorScheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useColorScheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,WAAW,CAOlD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,CAAC,EAAE,WAAW,GAAG,WAAW,CAoBlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUrlState.d.ts","sourceRoot":"","sources":["../../src/hooks/useUrlState.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,GACd,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAezB"}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Lexend:wght@300;400&display=swap";@import"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css";body{margin:0;font-family:Lexend,sans-serif;font-weight:300}._screen_l4v3n_1{background:#0080fc;color:#fff;position:relative;overflow:hidden}._overviewPage_f2w28_1{padding:20px;min-height:100vh;transition:background-color .2s,color .2s}._overviewPage_f2w28_1._light_f2w28_6{background-color:#f5f5f5;color:#333}._overviewPage_f2w28_1._dark_f2w28_10{background-color:#1a1a2e;color:#e0e0e0}._overviewControls_f2w28_15{display:flex;gap:20px;margin-bottom:20px;align-items:center}._overviewControls_f2w28_15 label{display:flex;align-items:center;gap:8px;font-weight:400}._overviewControls_f2w28_15 select{padding:8px 12px;font-size:14px;font-family:inherit;border:1px solid #ccc;border-radius:6px;background-color:#fff;color:#333;cursor:pointer;min-width:120px;transition:background-color .2s,border-color .2s,color .2s}._overviewControls_f2w28_15 select:hover{border-color:#999}._overviewControls_f2w28_15 select:focus{outline:none;border-color:#0080fc;box-shadow:0 0 0 2px #0080fc33}._dark_f2w28_10 select{background-color:#2d2d44;border-color:#444;color:#e0e0e0}._dark_f2w28_10 select:hover{border-color:#666}._dark_f2w28_10 select:focus{border-color:#0080fc}._dark_f2w28_10 h2{color:#e0e0e0}._overviewGrid_f2w28_63{display:flex;flex-direction:column;gap:30px}._overviewDevice_f2w28_69 h2{margin:0 0 15px;font-size:24px;font-weight:400;text-transform:capitalize}._overviewScreens_f2w28_76{display:flex;flex-wrap:wrap;gap:15px}._overviewScreenWrapper_f2w28_82{overflow:hidden;border-radius:8px;box-shadow:0 2px 8px #00000026}._dark_f2w28_10 ._overviewScreenWrapper_f2w28_82{box-shadow:0 2px 12px #0006}._overviewScreenScaled_f2w28_92{width:fit-content;height:fit-content}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type { ColorScheme, Feature, FeatureSection, ScreenConfig, ScreenComponentProps, DeviceConfig, ProjectConfig, ScreenProps as ScreenPropsType, } from './types';
|
|
2
|
+
export { colorSchemes } from './types';
|
|
3
|
+
export { useColorScheme, getSystemColorScheme } from './hooks/useColorScheme';
|
|
4
|
+
export { useUrlState } from './hooks/useUrlState';
|
|
5
|
+
export { Screen } from './components/Screen';
|
|
6
|
+
export type { ScreenProps } from './components/Screen';
|
|
7
|
+
export { OverviewGrid } from './components/OverviewGrid';
|
|
8
|
+
export type { OverviewGridProps } from './components/OverviewGrid';
|
|
9
|
+
export { ScreengenConfig } from './components/ScreengenConfig';
|
|
10
|
+
export type { ScreengenConfigProps } from './components/ScreengenConfig';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAG5B,YAAY,EACV,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,WAAW,IAAI,eAAe,GAC/B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,817 @@
|
|
|
1
|
+
import Oe, { useState as vr, useEffect as dr, useCallback as pr } from "react";
|
|
2
|
+
import { useSearchParams as hr } from "react-router-dom";
|
|
3
|
+
const _r = ["light", "dark"];
|
|
4
|
+
function mr() {
|
|
5
|
+
return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
6
|
+
}
|
|
7
|
+
function Wr(h) {
|
|
8
|
+
const [_, c] = vr(
|
|
9
|
+
() => mr()
|
|
10
|
+
);
|
|
11
|
+
return dr(() => {
|
|
12
|
+
if (typeof window > "u" || !window.matchMedia)
|
|
13
|
+
return;
|
|
14
|
+
const p = window.matchMedia("(prefers-color-scheme: dark)"), m = (l) => {
|
|
15
|
+
c(l.matches ? "dark" : "light");
|
|
16
|
+
};
|
|
17
|
+
return p.addEventListener("change", m), () => p.removeEventListener("change", m);
|
|
18
|
+
}, []), h ?? _;
|
|
19
|
+
}
|
|
20
|
+
function Nr(h, _) {
|
|
21
|
+
const [c, p] = hr(), m = c.get(h) || _, l = pr(
|
|
22
|
+
(E) => {
|
|
23
|
+
const y = new URLSearchParams(c);
|
|
24
|
+
y.set(h, E), p(y);
|
|
25
|
+
},
|
|
26
|
+
[h, c, p]
|
|
27
|
+
);
|
|
28
|
+
return [m, l];
|
|
29
|
+
}
|
|
30
|
+
var J = { exports: {} }, W = {};
|
|
31
|
+
/**
|
|
32
|
+
* @license React
|
|
33
|
+
* react-jsx-runtime.production.min.js
|
|
34
|
+
*
|
|
35
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the MIT license found in the
|
|
38
|
+
* LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/
|
|
40
|
+
var je;
|
|
41
|
+
function yr() {
|
|
42
|
+
if (je) return W;
|
|
43
|
+
je = 1;
|
|
44
|
+
var h = Oe, _ = Symbol.for("react.element"), c = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, m = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
45
|
+
function E(y, a, j) {
|
|
46
|
+
var R, x = {}, P = null, Y = null;
|
|
47
|
+
j !== void 0 && (P = "" + j), a.key !== void 0 && (P = "" + a.key), a.ref !== void 0 && (Y = a.ref);
|
|
48
|
+
for (R in a) p.call(a, R) && !l.hasOwnProperty(R) && (x[R] = a[R]);
|
|
49
|
+
if (y && y.defaultProps) for (R in a = y.defaultProps, a) x[R] === void 0 && (x[R] = a[R]);
|
|
50
|
+
return { $$typeof: _, type: y, key: P, ref: Y, props: x, _owner: m.current };
|
|
51
|
+
}
|
|
52
|
+
return W.Fragment = c, W.jsx = E, W.jsxs = E, W;
|
|
53
|
+
}
|
|
54
|
+
var N = {};
|
|
55
|
+
/**
|
|
56
|
+
* @license React
|
|
57
|
+
* react-jsx-runtime.development.js
|
|
58
|
+
*
|
|
59
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the MIT license found in the
|
|
62
|
+
* LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/
|
|
64
|
+
var xe;
|
|
65
|
+
function gr() {
|
|
66
|
+
return xe || (xe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
67
|
+
var h = Oe, _ = Symbol.for("react.element"), c = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), y = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Z = Symbol.iterator, Pe = "@@iterator";
|
|
68
|
+
function ke(e) {
|
|
69
|
+
if (e === null || typeof e != "object")
|
|
70
|
+
return null;
|
|
71
|
+
var r = Z && e[Z] || e[Pe];
|
|
72
|
+
return typeof r == "function" ? r : null;
|
|
73
|
+
}
|
|
74
|
+
var D = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
75
|
+
function g(e) {
|
|
76
|
+
{
|
|
77
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
78
|
+
t[n - 1] = arguments[n];
|
|
79
|
+
Ce("error", e, t);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function Ce(e, r, t) {
|
|
83
|
+
{
|
|
84
|
+
var n = D.ReactDebugCurrentFrame, s = n.getStackAddendum();
|
|
85
|
+
s !== "" && (r += "%s", t = t.concat([s]));
|
|
86
|
+
var u = t.map(function(o) {
|
|
87
|
+
return String(o);
|
|
88
|
+
});
|
|
89
|
+
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
var De = !1, Ae = !1, Fe = !1, $e = !1, Ie = !1, ee;
|
|
93
|
+
ee = Symbol.for("react.module.reference");
|
|
94
|
+
function We(e) {
|
|
95
|
+
return !!(typeof e == "string" || typeof e == "function" || e === p || e === l || Ie || e === m || e === j || e === R || $e || e === Y || De || Ae || Fe || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === x || e.$$typeof === E || e.$$typeof === y || e.$$typeof === a || // This needs to include all possible module reference object
|
|
96
|
+
// types supported by any Flight configuration anywhere since
|
|
97
|
+
// we don't know which Flight build this will end up being used
|
|
98
|
+
// with.
|
|
99
|
+
e.$$typeof === ee || e.getModuleId !== void 0));
|
|
100
|
+
}
|
|
101
|
+
function Ne(e, r, t) {
|
|
102
|
+
var n = e.displayName;
|
|
103
|
+
if (n)
|
|
104
|
+
return n;
|
|
105
|
+
var s = r.displayName || r.name || "";
|
|
106
|
+
return s !== "" ? t + "(" + s + ")" : t;
|
|
107
|
+
}
|
|
108
|
+
function re(e) {
|
|
109
|
+
return e.displayName || "Context";
|
|
110
|
+
}
|
|
111
|
+
function T(e) {
|
|
112
|
+
if (e == null)
|
|
113
|
+
return null;
|
|
114
|
+
if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
115
|
+
return e.displayName || e.name || null;
|
|
116
|
+
if (typeof e == "string")
|
|
117
|
+
return e;
|
|
118
|
+
switch (e) {
|
|
119
|
+
case p:
|
|
120
|
+
return "Fragment";
|
|
121
|
+
case c:
|
|
122
|
+
return "Portal";
|
|
123
|
+
case l:
|
|
124
|
+
return "Profiler";
|
|
125
|
+
case m:
|
|
126
|
+
return "StrictMode";
|
|
127
|
+
case j:
|
|
128
|
+
return "Suspense";
|
|
129
|
+
case R:
|
|
130
|
+
return "SuspenseList";
|
|
131
|
+
}
|
|
132
|
+
if (typeof e == "object")
|
|
133
|
+
switch (e.$$typeof) {
|
|
134
|
+
case y:
|
|
135
|
+
var r = e;
|
|
136
|
+
return re(r) + ".Consumer";
|
|
137
|
+
case E:
|
|
138
|
+
var t = e;
|
|
139
|
+
return re(t._context) + ".Provider";
|
|
140
|
+
case a:
|
|
141
|
+
return Ne(e, e.render, "ForwardRef");
|
|
142
|
+
case x:
|
|
143
|
+
var n = e.displayName || null;
|
|
144
|
+
return n !== null ? n : T(e.type) || "Memo";
|
|
145
|
+
case P: {
|
|
146
|
+
var s = e, u = s._payload, o = s._init;
|
|
147
|
+
try {
|
|
148
|
+
return T(o(u));
|
|
149
|
+
} catch {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
var k = Object.assign, $ = 0, te, ne, ae, ie, oe, se, ue;
|
|
157
|
+
function ce() {
|
|
158
|
+
}
|
|
159
|
+
ce.__reactDisabledLog = !0;
|
|
160
|
+
function Ye() {
|
|
161
|
+
{
|
|
162
|
+
if ($ === 0) {
|
|
163
|
+
te = console.log, ne = console.info, ae = console.warn, ie = console.error, oe = console.group, se = console.groupCollapsed, ue = console.groupEnd;
|
|
164
|
+
var e = {
|
|
165
|
+
configurable: !0,
|
|
166
|
+
enumerable: !0,
|
|
167
|
+
value: ce,
|
|
168
|
+
writable: !0
|
|
169
|
+
};
|
|
170
|
+
Object.defineProperties(console, {
|
|
171
|
+
info: e,
|
|
172
|
+
log: e,
|
|
173
|
+
warn: e,
|
|
174
|
+
error: e,
|
|
175
|
+
group: e,
|
|
176
|
+
groupCollapsed: e,
|
|
177
|
+
groupEnd: e
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
$++;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function Le() {
|
|
184
|
+
{
|
|
185
|
+
if ($--, $ === 0) {
|
|
186
|
+
var e = {
|
|
187
|
+
configurable: !0,
|
|
188
|
+
enumerable: !0,
|
|
189
|
+
writable: !0
|
|
190
|
+
};
|
|
191
|
+
Object.defineProperties(console, {
|
|
192
|
+
log: k({}, e, {
|
|
193
|
+
value: te
|
|
194
|
+
}),
|
|
195
|
+
info: k({}, e, {
|
|
196
|
+
value: ne
|
|
197
|
+
}),
|
|
198
|
+
warn: k({}, e, {
|
|
199
|
+
value: ae
|
|
200
|
+
}),
|
|
201
|
+
error: k({}, e, {
|
|
202
|
+
value: ie
|
|
203
|
+
}),
|
|
204
|
+
group: k({}, e, {
|
|
205
|
+
value: oe
|
|
206
|
+
}),
|
|
207
|
+
groupCollapsed: k({}, e, {
|
|
208
|
+
value: se
|
|
209
|
+
}),
|
|
210
|
+
groupEnd: k({}, e, {
|
|
211
|
+
value: ue
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
$ < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
var K = D.ReactCurrentDispatcher, G;
|
|
219
|
+
function L(e, r, t) {
|
|
220
|
+
{
|
|
221
|
+
if (G === void 0)
|
|
222
|
+
try {
|
|
223
|
+
throw Error();
|
|
224
|
+
} catch (s) {
|
|
225
|
+
var n = s.stack.trim().match(/\n( *(at )?)/);
|
|
226
|
+
G = n && n[1] || "";
|
|
227
|
+
}
|
|
228
|
+
return `
|
|
229
|
+
` + G + e;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
var q = !1, M;
|
|
233
|
+
{
|
|
234
|
+
var Me = typeof WeakMap == "function" ? WeakMap : Map;
|
|
235
|
+
M = new Me();
|
|
236
|
+
}
|
|
237
|
+
function le(e, r) {
|
|
238
|
+
if (!e || q)
|
|
239
|
+
return "";
|
|
240
|
+
{
|
|
241
|
+
var t = M.get(e);
|
|
242
|
+
if (t !== void 0)
|
|
243
|
+
return t;
|
|
244
|
+
}
|
|
245
|
+
var n;
|
|
246
|
+
q = !0;
|
|
247
|
+
var s = Error.prepareStackTrace;
|
|
248
|
+
Error.prepareStackTrace = void 0;
|
|
249
|
+
var u;
|
|
250
|
+
u = K.current, K.current = null, Ye();
|
|
251
|
+
try {
|
|
252
|
+
if (r) {
|
|
253
|
+
var o = function() {
|
|
254
|
+
throw Error();
|
|
255
|
+
};
|
|
256
|
+
if (Object.defineProperty(o.prototype, "props", {
|
|
257
|
+
set: function() {
|
|
258
|
+
throw Error();
|
|
259
|
+
}
|
|
260
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
261
|
+
try {
|
|
262
|
+
Reflect.construct(o, []);
|
|
263
|
+
} catch (b) {
|
|
264
|
+
n = b;
|
|
265
|
+
}
|
|
266
|
+
Reflect.construct(e, [], o);
|
|
267
|
+
} else {
|
|
268
|
+
try {
|
|
269
|
+
o.call();
|
|
270
|
+
} catch (b) {
|
|
271
|
+
n = b;
|
|
272
|
+
}
|
|
273
|
+
e.call(o.prototype);
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
try {
|
|
277
|
+
throw Error();
|
|
278
|
+
} catch (b) {
|
|
279
|
+
n = b;
|
|
280
|
+
}
|
|
281
|
+
e();
|
|
282
|
+
}
|
|
283
|
+
} catch (b) {
|
|
284
|
+
if (b && n && typeof b.stack == "string") {
|
|
285
|
+
for (var i = b.stack.split(`
|
|
286
|
+
`), w = n.stack.split(`
|
|
287
|
+
`), f = i.length - 1, d = w.length - 1; f >= 1 && d >= 0 && i[f] !== w[d]; )
|
|
288
|
+
d--;
|
|
289
|
+
for (; f >= 1 && d >= 0; f--, d--)
|
|
290
|
+
if (i[f] !== w[d]) {
|
|
291
|
+
if (f !== 1 || d !== 1)
|
|
292
|
+
do
|
|
293
|
+
if (f--, d--, d < 0 || i[f] !== w[d]) {
|
|
294
|
+
var S = `
|
|
295
|
+
` + i[f].replace(" at new ", " at ");
|
|
296
|
+
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, S), S;
|
|
297
|
+
}
|
|
298
|
+
while (f >= 1 && d >= 0);
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
} finally {
|
|
303
|
+
q = !1, K.current = u, Le(), Error.prepareStackTrace = s;
|
|
304
|
+
}
|
|
305
|
+
var F = e ? e.displayName || e.name : "", C = F ? L(F) : "";
|
|
306
|
+
return typeof e == "function" && M.set(e, C), C;
|
|
307
|
+
}
|
|
308
|
+
function Ue(e, r, t) {
|
|
309
|
+
return le(e, !1);
|
|
310
|
+
}
|
|
311
|
+
function Ve(e) {
|
|
312
|
+
var r = e.prototype;
|
|
313
|
+
return !!(r && r.isReactComponent);
|
|
314
|
+
}
|
|
315
|
+
function U(e, r, t) {
|
|
316
|
+
if (e == null)
|
|
317
|
+
return "";
|
|
318
|
+
if (typeof e == "function")
|
|
319
|
+
return le(e, Ve(e));
|
|
320
|
+
if (typeof e == "string")
|
|
321
|
+
return L(e);
|
|
322
|
+
switch (e) {
|
|
323
|
+
case j:
|
|
324
|
+
return L("Suspense");
|
|
325
|
+
case R:
|
|
326
|
+
return L("SuspenseList");
|
|
327
|
+
}
|
|
328
|
+
if (typeof e == "object")
|
|
329
|
+
switch (e.$$typeof) {
|
|
330
|
+
case a:
|
|
331
|
+
return Ue(e.render);
|
|
332
|
+
case x:
|
|
333
|
+
return U(e.type, r, t);
|
|
334
|
+
case P: {
|
|
335
|
+
var n = e, s = n._payload, u = n._init;
|
|
336
|
+
try {
|
|
337
|
+
return U(u(s), r, t);
|
|
338
|
+
} catch {
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return "";
|
|
343
|
+
}
|
|
344
|
+
var I = Object.prototype.hasOwnProperty, fe = {}, ve = D.ReactDebugCurrentFrame;
|
|
345
|
+
function V(e) {
|
|
346
|
+
if (e) {
|
|
347
|
+
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
348
|
+
ve.setExtraStackFrame(t);
|
|
349
|
+
} else
|
|
350
|
+
ve.setExtraStackFrame(null);
|
|
351
|
+
}
|
|
352
|
+
function Je(e, r, t, n, s) {
|
|
353
|
+
{
|
|
354
|
+
var u = Function.call.bind(I);
|
|
355
|
+
for (var o in e)
|
|
356
|
+
if (u(e, o)) {
|
|
357
|
+
var i = void 0;
|
|
358
|
+
try {
|
|
359
|
+
if (typeof e[o] != "function") {
|
|
360
|
+
var w = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
361
|
+
throw w.name = "Invariant Violation", w;
|
|
362
|
+
}
|
|
363
|
+
i = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
364
|
+
} catch (f) {
|
|
365
|
+
i = f;
|
|
366
|
+
}
|
|
367
|
+
i && !(i instanceof Error) && (V(s), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof i), V(null)), i instanceof Error && !(i.message in fe) && (fe[i.message] = !0, V(s), g("Failed %s type: %s", t, i.message), V(null));
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
var Ke = Array.isArray;
|
|
372
|
+
function B(e) {
|
|
373
|
+
return Ke(e);
|
|
374
|
+
}
|
|
375
|
+
function Ge(e) {
|
|
376
|
+
{
|
|
377
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
378
|
+
return t;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
function qe(e) {
|
|
382
|
+
try {
|
|
383
|
+
return de(e), !1;
|
|
384
|
+
} catch {
|
|
385
|
+
return !0;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function de(e) {
|
|
389
|
+
return "" + e;
|
|
390
|
+
}
|
|
391
|
+
function pe(e) {
|
|
392
|
+
if (qe(e))
|
|
393
|
+
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), de(e);
|
|
394
|
+
}
|
|
395
|
+
var he = D.ReactCurrentOwner, Be = {
|
|
396
|
+
key: !0,
|
|
397
|
+
ref: !0,
|
|
398
|
+
__self: !0,
|
|
399
|
+
__source: !0
|
|
400
|
+
}, _e, me;
|
|
401
|
+
function ze(e) {
|
|
402
|
+
if (I.call(e, "ref")) {
|
|
403
|
+
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
404
|
+
if (r && r.isReactWarning)
|
|
405
|
+
return !1;
|
|
406
|
+
}
|
|
407
|
+
return e.ref !== void 0;
|
|
408
|
+
}
|
|
409
|
+
function Xe(e) {
|
|
410
|
+
if (I.call(e, "key")) {
|
|
411
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
412
|
+
if (r && r.isReactWarning)
|
|
413
|
+
return !1;
|
|
414
|
+
}
|
|
415
|
+
return e.key !== void 0;
|
|
416
|
+
}
|
|
417
|
+
function He(e, r) {
|
|
418
|
+
typeof e.ref == "string" && he.current;
|
|
419
|
+
}
|
|
420
|
+
function Qe(e, r) {
|
|
421
|
+
{
|
|
422
|
+
var t = function() {
|
|
423
|
+
_e || (_e = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
424
|
+
};
|
|
425
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
426
|
+
get: t,
|
|
427
|
+
configurable: !0
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
function Ze(e, r) {
|
|
432
|
+
{
|
|
433
|
+
var t = function() {
|
|
434
|
+
me || (me = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
435
|
+
};
|
|
436
|
+
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
437
|
+
get: t,
|
|
438
|
+
configurable: !0
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
var er = function(e, r, t, n, s, u, o) {
|
|
443
|
+
var i = {
|
|
444
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
445
|
+
$$typeof: _,
|
|
446
|
+
// Built-in properties that belong on the element
|
|
447
|
+
type: e,
|
|
448
|
+
key: r,
|
|
449
|
+
ref: t,
|
|
450
|
+
props: o,
|
|
451
|
+
// Record the component responsible for creating this element.
|
|
452
|
+
_owner: u
|
|
453
|
+
};
|
|
454
|
+
return i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
455
|
+
configurable: !1,
|
|
456
|
+
enumerable: !1,
|
|
457
|
+
writable: !0,
|
|
458
|
+
value: !1
|
|
459
|
+
}), Object.defineProperty(i, "_self", {
|
|
460
|
+
configurable: !1,
|
|
461
|
+
enumerable: !1,
|
|
462
|
+
writable: !1,
|
|
463
|
+
value: n
|
|
464
|
+
}), Object.defineProperty(i, "_source", {
|
|
465
|
+
configurable: !1,
|
|
466
|
+
enumerable: !1,
|
|
467
|
+
writable: !1,
|
|
468
|
+
value: s
|
|
469
|
+
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
470
|
+
};
|
|
471
|
+
function rr(e, r, t, n, s) {
|
|
472
|
+
{
|
|
473
|
+
var u, o = {}, i = null, w = null;
|
|
474
|
+
t !== void 0 && (pe(t), i = "" + t), Xe(r) && (pe(r.key), i = "" + r.key), ze(r) && (w = r.ref, He(r, s));
|
|
475
|
+
for (u in r)
|
|
476
|
+
I.call(r, u) && !Be.hasOwnProperty(u) && (o[u] = r[u]);
|
|
477
|
+
if (e && e.defaultProps) {
|
|
478
|
+
var f = e.defaultProps;
|
|
479
|
+
for (u in f)
|
|
480
|
+
o[u] === void 0 && (o[u] = f[u]);
|
|
481
|
+
}
|
|
482
|
+
if (i || w) {
|
|
483
|
+
var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
484
|
+
i && Qe(o, d), w && Ze(o, d);
|
|
485
|
+
}
|
|
486
|
+
return er(e, i, w, s, n, he.current, o);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
var z = D.ReactCurrentOwner, ye = D.ReactDebugCurrentFrame;
|
|
490
|
+
function A(e) {
|
|
491
|
+
if (e) {
|
|
492
|
+
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
493
|
+
ye.setExtraStackFrame(t);
|
|
494
|
+
} else
|
|
495
|
+
ye.setExtraStackFrame(null);
|
|
496
|
+
}
|
|
497
|
+
var X;
|
|
498
|
+
X = !1;
|
|
499
|
+
function H(e) {
|
|
500
|
+
return typeof e == "object" && e !== null && e.$$typeof === _;
|
|
501
|
+
}
|
|
502
|
+
function ge() {
|
|
503
|
+
{
|
|
504
|
+
if (z.current) {
|
|
505
|
+
var e = T(z.current.type);
|
|
506
|
+
if (e)
|
|
507
|
+
return `
|
|
508
|
+
|
|
509
|
+
Check the render method of \`` + e + "`.";
|
|
510
|
+
}
|
|
511
|
+
return "";
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
function tr(e) {
|
|
515
|
+
return "";
|
|
516
|
+
}
|
|
517
|
+
var we = {};
|
|
518
|
+
function nr(e) {
|
|
519
|
+
{
|
|
520
|
+
var r = ge();
|
|
521
|
+
if (!r) {
|
|
522
|
+
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
523
|
+
t && (r = `
|
|
524
|
+
|
|
525
|
+
Check the top-level render call using <` + t + ">.");
|
|
526
|
+
}
|
|
527
|
+
return r;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
function Ee(e, r) {
|
|
531
|
+
{
|
|
532
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
533
|
+
return;
|
|
534
|
+
e._store.validated = !0;
|
|
535
|
+
var t = nr(r);
|
|
536
|
+
if (we[t])
|
|
537
|
+
return;
|
|
538
|
+
we[t] = !0;
|
|
539
|
+
var n = "";
|
|
540
|
+
e && e._owner && e._owner !== z.current && (n = " It was passed a child from " + T(e._owner.type) + "."), A(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), A(null);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function be(e, r) {
|
|
544
|
+
{
|
|
545
|
+
if (typeof e != "object")
|
|
546
|
+
return;
|
|
547
|
+
if (B(e))
|
|
548
|
+
for (var t = 0; t < e.length; t++) {
|
|
549
|
+
var n = e[t];
|
|
550
|
+
H(n) && Ee(n, r);
|
|
551
|
+
}
|
|
552
|
+
else if (H(e))
|
|
553
|
+
e._store && (e._store.validated = !0);
|
|
554
|
+
else if (e) {
|
|
555
|
+
var s = ke(e);
|
|
556
|
+
if (typeof s == "function" && s !== e.entries)
|
|
557
|
+
for (var u = s.call(e), o; !(o = u.next()).done; )
|
|
558
|
+
H(o.value) && Ee(o.value, r);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
function ar(e) {
|
|
563
|
+
{
|
|
564
|
+
var r = e.type;
|
|
565
|
+
if (r == null || typeof r == "string")
|
|
566
|
+
return;
|
|
567
|
+
var t;
|
|
568
|
+
if (typeof r == "function")
|
|
569
|
+
t = r.propTypes;
|
|
570
|
+
else if (typeof r == "object" && (r.$$typeof === a || // Note: Memo only checks outer props here.
|
|
571
|
+
// Inner props are checked in the reconciler.
|
|
572
|
+
r.$$typeof === x))
|
|
573
|
+
t = r.propTypes;
|
|
574
|
+
else
|
|
575
|
+
return;
|
|
576
|
+
if (t) {
|
|
577
|
+
var n = T(r);
|
|
578
|
+
Je(t, e.props, "prop", n, e);
|
|
579
|
+
} else if (r.PropTypes !== void 0 && !X) {
|
|
580
|
+
X = !0;
|
|
581
|
+
var s = T(r);
|
|
582
|
+
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
583
|
+
}
|
|
584
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
function ir(e) {
|
|
588
|
+
{
|
|
589
|
+
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
590
|
+
var n = r[t];
|
|
591
|
+
if (n !== "children" && n !== "key") {
|
|
592
|
+
A(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), A(null);
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
e.ref !== null && (A(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
var Re = {};
|
|
600
|
+
function Se(e, r, t, n, s, u) {
|
|
601
|
+
{
|
|
602
|
+
var o = We(e);
|
|
603
|
+
if (!o) {
|
|
604
|
+
var i = "";
|
|
605
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
606
|
+
var w = tr();
|
|
607
|
+
w ? i += w : i += ge();
|
|
608
|
+
var f;
|
|
609
|
+
e === null ? f = "null" : B(e) ? f = "array" : e !== void 0 && e.$$typeof === _ ? (f = "<" + (T(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, i);
|
|
610
|
+
}
|
|
611
|
+
var d = rr(e, r, t, s, u);
|
|
612
|
+
if (d == null)
|
|
613
|
+
return d;
|
|
614
|
+
if (o) {
|
|
615
|
+
var S = r.children;
|
|
616
|
+
if (S !== void 0)
|
|
617
|
+
if (n)
|
|
618
|
+
if (B(S)) {
|
|
619
|
+
for (var F = 0; F < S.length; F++)
|
|
620
|
+
be(S[F], e);
|
|
621
|
+
Object.freeze && Object.freeze(S);
|
|
622
|
+
} else
|
|
623
|
+
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
624
|
+
else
|
|
625
|
+
be(S, e);
|
|
626
|
+
}
|
|
627
|
+
if (I.call(r, "key")) {
|
|
628
|
+
var C = T(e), b = Object.keys(r).filter(function(fr) {
|
|
629
|
+
return fr !== "key";
|
|
630
|
+
}), Q = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
631
|
+
if (!Re[C + Q]) {
|
|
632
|
+
var lr = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
|
|
633
|
+
g(`A props object containing a "key" prop is being spread into JSX:
|
|
634
|
+
let props = %s;
|
|
635
|
+
<%s {...props} />
|
|
636
|
+
React keys must be passed directly to JSX without using spread:
|
|
637
|
+
let props = %s;
|
|
638
|
+
<%s key={someKey} {...props} />`, Q, C, lr, C), Re[C + Q] = !0;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
return e === p ? ir(d) : ar(d), d;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
function or(e, r, t) {
|
|
645
|
+
return Se(e, r, t, !0);
|
|
646
|
+
}
|
|
647
|
+
function sr(e, r, t) {
|
|
648
|
+
return Se(e, r, t, !1);
|
|
649
|
+
}
|
|
650
|
+
var ur = sr, cr = or;
|
|
651
|
+
N.Fragment = p, N.jsx = ur, N.jsxs = cr;
|
|
652
|
+
})()), N;
|
|
653
|
+
}
|
|
654
|
+
var Te;
|
|
655
|
+
function wr() {
|
|
656
|
+
return Te || (Te = 1, process.env.NODE_ENV === "production" ? J.exports = yr() : J.exports = gr()), J.exports;
|
|
657
|
+
}
|
|
658
|
+
var v = wr();
|
|
659
|
+
const Er = "_screen_l4v3n_1", br = {
|
|
660
|
+
screen: Er
|
|
661
|
+
};
|
|
662
|
+
function Rr({
|
|
663
|
+
config: h,
|
|
664
|
+
deviceKey: _,
|
|
665
|
+
screenKey: c,
|
|
666
|
+
language: p,
|
|
667
|
+
className: m
|
|
668
|
+
}) {
|
|
669
|
+
const l = h.devices.find((a) => a.key === _), E = l == null ? void 0 : l.screens.find((a) => a.key === c);
|
|
670
|
+
if (!l || !E)
|
|
671
|
+
return null;
|
|
672
|
+
const y = E.component;
|
|
673
|
+
return /* @__PURE__ */ v.jsx(
|
|
674
|
+
"div",
|
|
675
|
+
{
|
|
676
|
+
className: `${br.screen} ${m || ""}`,
|
|
677
|
+
"data-device": l.key,
|
|
678
|
+
style: { width: l.width, height: l.height },
|
|
679
|
+
children: y ? /* @__PURE__ */ v.jsx(
|
|
680
|
+
y,
|
|
681
|
+
{
|
|
682
|
+
language: p,
|
|
683
|
+
deviceKey: l.key,
|
|
684
|
+
width: l.width,
|
|
685
|
+
height: l.height
|
|
686
|
+
}
|
|
687
|
+
) : c
|
|
688
|
+
}
|
|
689
|
+
);
|
|
690
|
+
}
|
|
691
|
+
const Sr = "_overviewPage_f2w28_1", jr = "_light_f2w28_6", xr = "_dark_f2w28_10", Tr = "_overviewControls_f2w28_15", Or = "_overviewGrid_f2w28_63", Pr = "_overviewDevice_f2w28_69", kr = "_overviewScreens_f2w28_76", Cr = "_overviewScreenWrapper_f2w28_82", Dr = "_overviewScreenScaled_f2w28_92", O = {
|
|
692
|
+
overviewPage: Sr,
|
|
693
|
+
light: jr,
|
|
694
|
+
dark: xr,
|
|
695
|
+
overviewControls: Tr,
|
|
696
|
+
overviewGrid: Or,
|
|
697
|
+
overviewDevice: Pr,
|
|
698
|
+
overviewScreens: kr,
|
|
699
|
+
overviewScreenWrapper: Cr,
|
|
700
|
+
overviewScreenScaled: Dr
|
|
701
|
+
}, Ar = [0.1, 0.25, 1], Fr = 0.25;
|
|
702
|
+
function Yr({
|
|
703
|
+
config: h,
|
|
704
|
+
language: _,
|
|
705
|
+
scale: c = Fr,
|
|
706
|
+
colorScheme: p = "light",
|
|
707
|
+
onLanguageChange: m,
|
|
708
|
+
onScaleChange: l,
|
|
709
|
+
onColorSchemeChange: E,
|
|
710
|
+
className: y
|
|
711
|
+
}) {
|
|
712
|
+
return /* @__PURE__ */ v.jsxs(
|
|
713
|
+
"div",
|
|
714
|
+
{
|
|
715
|
+
className: `${O.overviewPage} ${O[p]} ${y || ""}`,
|
|
716
|
+
children: [
|
|
717
|
+
/* @__PURE__ */ v.jsxs("div", { className: O.overviewControls, children: [
|
|
718
|
+
/* @__PURE__ */ v.jsxs("label", { children: [
|
|
719
|
+
"Language:",
|
|
720
|
+
/* @__PURE__ */ v.jsx(
|
|
721
|
+
"select",
|
|
722
|
+
{
|
|
723
|
+
value: _,
|
|
724
|
+
onChange: (a) => m == null ? void 0 : m(a.target.value),
|
|
725
|
+
children: h.languages.map((a) => /* @__PURE__ */ v.jsx("option", { value: a, children: a }, a))
|
|
726
|
+
}
|
|
727
|
+
)
|
|
728
|
+
] }),
|
|
729
|
+
/* @__PURE__ */ v.jsxs("label", { children: [
|
|
730
|
+
"Scale:",
|
|
731
|
+
/* @__PURE__ */ v.jsx(
|
|
732
|
+
"select",
|
|
733
|
+
{
|
|
734
|
+
value: c,
|
|
735
|
+
onChange: (a) => l == null ? void 0 : l(parseFloat(a.target.value)),
|
|
736
|
+
children: Ar.map((a) => /* @__PURE__ */ v.jsxs("option", { value: a, children: [
|
|
737
|
+
a * 100,
|
|
738
|
+
"%"
|
|
739
|
+
] }, a))
|
|
740
|
+
}
|
|
741
|
+
)
|
|
742
|
+
] }),
|
|
743
|
+
/* @__PURE__ */ v.jsxs("label", { children: [
|
|
744
|
+
"Color Scheme:",
|
|
745
|
+
/* @__PURE__ */ v.jsx(
|
|
746
|
+
"select",
|
|
747
|
+
{
|
|
748
|
+
value: p,
|
|
749
|
+
onChange: (a) => E == null ? void 0 : E(a.target.value),
|
|
750
|
+
children: _r.map((a) => /* @__PURE__ */ v.jsx("option", { value: a, children: a.charAt(0).toUpperCase() + a.slice(1) }, a))
|
|
751
|
+
}
|
|
752
|
+
)
|
|
753
|
+
] })
|
|
754
|
+
] }),
|
|
755
|
+
/* @__PURE__ */ v.jsx("div", { className: O.overviewGrid, children: h.devices.map((a) => /* @__PURE__ */ v.jsxs("div", { className: O.overviewDevice, children: [
|
|
756
|
+
/* @__PURE__ */ v.jsx("h2", { children: a.key }),
|
|
757
|
+
/* @__PURE__ */ v.jsx("div", { className: O.overviewScreens, children: a.screens.map((j) => /* @__PURE__ */ v.jsx(
|
|
758
|
+
"div",
|
|
759
|
+
{
|
|
760
|
+
className: O.overviewScreenWrapper,
|
|
761
|
+
style: {
|
|
762
|
+
width: a.width * c,
|
|
763
|
+
height: a.height * c
|
|
764
|
+
},
|
|
765
|
+
children: /* @__PURE__ */ v.jsx(
|
|
766
|
+
"div",
|
|
767
|
+
{
|
|
768
|
+
className: O.overviewScreenScaled,
|
|
769
|
+
style: {
|
|
770
|
+
transform: `scale(${c})`,
|
|
771
|
+
transformOrigin: "top left"
|
|
772
|
+
},
|
|
773
|
+
children: /* @__PURE__ */ v.jsx(
|
|
774
|
+
Rr,
|
|
775
|
+
{
|
|
776
|
+
config: h,
|
|
777
|
+
deviceKey: a.key,
|
|
778
|
+
screenKey: j.key,
|
|
779
|
+
language: _
|
|
780
|
+
}
|
|
781
|
+
)
|
|
782
|
+
}
|
|
783
|
+
)
|
|
784
|
+
},
|
|
785
|
+
j.key
|
|
786
|
+
)) })
|
|
787
|
+
] }, a.key)) })
|
|
788
|
+
]
|
|
789
|
+
}
|
|
790
|
+
);
|
|
791
|
+
}
|
|
792
|
+
function Lr({
|
|
793
|
+
config: h
|
|
794
|
+
}) {
|
|
795
|
+
const _ = {
|
|
796
|
+
languages: h.languages,
|
|
797
|
+
devices: h.devices.map((c) => ({
|
|
798
|
+
key: c.key,
|
|
799
|
+
fastlaneKeys: c.fastlaneKeys,
|
|
800
|
+
width: c.width,
|
|
801
|
+
height: c.height,
|
|
802
|
+
screens: c.screens.map((p) => ({
|
|
803
|
+
key: p.key
|
|
804
|
+
}))
|
|
805
|
+
}))
|
|
806
|
+
};
|
|
807
|
+
return /* @__PURE__ */ v.jsx("pre", { id: "screegen-config", children: JSON.stringify(_, null, 2) });
|
|
808
|
+
}
|
|
809
|
+
export {
|
|
810
|
+
Yr as OverviewGrid,
|
|
811
|
+
Rr as Screen,
|
|
812
|
+
Lr as ScreengenConfig,
|
|
813
|
+
_r as colorSchemes,
|
|
814
|
+
mr as getSystemColorScheme,
|
|
815
|
+
Wr as useColorScheme,
|
|
816
|
+
Nr as useUrlState
|
|
817
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/test/setup.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Color scheme for light/dark mode
|
|
4
|
+
*/
|
|
5
|
+
export type ColorScheme = "light" | "dark";
|
|
6
|
+
export declare const colorSchemes: ColorScheme[];
|
|
7
|
+
/**
|
|
8
|
+
* A feature item with title, description, and icon
|
|
9
|
+
*/
|
|
10
|
+
export interface Feature {
|
|
11
|
+
title: string;
|
|
12
|
+
description: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A section of features with a title
|
|
17
|
+
*/
|
|
18
|
+
export interface FeatureSection {
|
|
19
|
+
title: string;
|
|
20
|
+
features: Feature[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Props passed to screen components
|
|
24
|
+
*/
|
|
25
|
+
export interface ScreenComponentProps<L extends string = string> {
|
|
26
|
+
language: L;
|
|
27
|
+
deviceKey: string;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Configuration for a single screen
|
|
33
|
+
*/
|
|
34
|
+
export interface ScreenConfig<L extends string = string> {
|
|
35
|
+
key: string;
|
|
36
|
+
component: ComponentType<ScreenComponentProps<L>>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Configuration for a device (iPhone, iPad, Mac, etc.)
|
|
40
|
+
*/
|
|
41
|
+
export interface DeviceConfig<L extends string = string> {
|
|
42
|
+
key: string;
|
|
43
|
+
fastlaneKeys: string[];
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
screens: ScreenConfig<L>[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Root project configuration
|
|
50
|
+
*/
|
|
51
|
+
export interface ProjectConfig<L extends string = string> {
|
|
52
|
+
languages: L[];
|
|
53
|
+
devices: DeviceConfig<L>[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Props for screen components
|
|
57
|
+
*/
|
|
58
|
+
export interface ScreenProps<L extends string = string> {
|
|
59
|
+
deviceKey: string;
|
|
60
|
+
screenKey: string;
|
|
61
|
+
language: L;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,eAAO,MAAM,YAAY,EAAE,WAAW,EAAsB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC7D,QAAQ,EAAE,CAAC,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACtD,SAAS,EAAE,CAAC,EAAE,CAAC;IACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,CAAC;CACb"}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@screegen/components",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./styles.css": "./dist/index.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite build --watch",
|
|
21
|
+
"build": "vite build",
|
|
22
|
+
"lint": "eslint src",
|
|
23
|
+
"test": "vitest run --coverage",
|
|
24
|
+
"publish": "npm publish --access=public"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "^18.0.0",
|
|
28
|
+
"react-dom": "^18.0.0",
|
|
29
|
+
"react-router-dom": "^6.0.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@testing-library/dom": "^10.4.0",
|
|
33
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
34
|
+
"@testing-library/react": "^16.1.0",
|
|
35
|
+
"@types/react": "^18.3.17",
|
|
36
|
+
"@types/react-dom": "^18.3.5",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
38
|
+
"@typescript-eslint/parser": "^8.52.0",
|
|
39
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
40
|
+
"@vitest/coverage-v8": "^2.1.0",
|
|
41
|
+
"eslint": "^9.39.2",
|
|
42
|
+
"eslint-config-prettier": "^10.1.8",
|
|
43
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
44
|
+
"jiti": "^2.6.1",
|
|
45
|
+
"jsdom": "^25.0.1",
|
|
46
|
+
"prettier": "^3.7.4",
|
|
47
|
+
"react": "^18.3.1",
|
|
48
|
+
"react-dom": "^18.3.1",
|
|
49
|
+
"react-router-dom": "^6.28.2",
|
|
50
|
+
"sass": "^1.83.0",
|
|
51
|
+
"typescript": "^5.7.2",
|
|
52
|
+
"vite": "^6.0.0",
|
|
53
|
+
"vite-plugin-dts": "^4.4.0",
|
|
54
|
+
"vitest": "^2.1.0"
|
|
55
|
+
},
|
|
56
|
+
"dependenciesMeta": {
|
|
57
|
+
"@testing-library/jest-dom": {
|
|
58
|
+
"unplugged": true
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|