eddev 0.2.0-beta.1 → 0.2.0-beta.13
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/build/build-favicon.d.ts +1 -0
- package/build/build-favicon.js +71 -0
- package/build/create-serverless-dev-worker.d.ts +3 -0
- package/build/create-serverless-dev-worker.js +99 -0
- package/build/get-webpack-config.js +19 -11
- package/build/reporter.js +0 -109
- package/build/serverless/create-next-app.d.ts +2 -0
- package/build/serverless/create-next-app.js +212 -76
- package/build/state/serverless-state.d.ts +26 -0
- package/build/state/serverless-state.js +2 -0
- package/build/workers/serverless-worker-dev-script.d.ts +1 -0
- package/build/workers/serverless-worker-dev-script.js +21 -0
- package/cli/build.dev.js +30 -7
- package/cli/build.prod.js +5 -0
- package/cli/cli.js +23 -15
- package/cli/display/components/DevCLIDisplay.d.ts +3 -0
- package/cli/display/components/DevCLIDisplay.js +20 -1
- package/cli/display/components/ServerlessDisplay.d.ts +9 -0
- package/cli/display/components/ServerlessDisplay.js +68 -0
- package/config/config-schema.d.ts +50 -0
- package/config/config-schema.js +18 -0
- package/config/create-schema-file.d.ts +1 -0
- package/config/create-schema-file.js +20 -0
- package/config/get-config.d.ts +36 -0
- package/config/get-config.js +32 -0
- package/config/index.d.ts +2 -0
- package/config/index.js +14 -0
- package/config/parse-config.d.ts +23 -0
- package/config/parse-config.js +8 -0
- package/config/print-zod-errors.d.ts +2 -0
- package/config/print-zod-errors.js +14 -0
- package/dev-ui/components/BreakpointColumnHeader.d.ts +11 -0
- package/dev-ui/components/BreakpointColumnHeader.js +47 -0
- package/dev-ui/components/BreakpointIndicator.d.ts +2 -0
- package/dev-ui/components/BreakpointIndicator.js +138 -0
- package/dev-ui/components/BreakpointList.d.ts +6 -0
- package/dev-ui/components/BreakpointList.js +38 -0
- package/dev-ui/components/DevUI.d.ts +2 -0
- package/dev-ui/components/DevUI.js +29 -0
- package/dev-ui/components/Launcher.d.ts +98 -0
- package/dev-ui/components/Launcher.js +94 -0
- package/dev-ui/components/PanelWrapper.d.ts +8 -0
- package/dev-ui/components/PanelWrapper.js +37 -0
- package/dev-ui/components/ResponsiveLerpControl.d.ts +8 -0
- package/dev-ui/components/ResponsiveLerpControl.js +177 -0
- package/dev-ui/components/ResponsiveScaleEditor.d.ts +26 -0
- package/dev-ui/components/ResponsiveScaleEditor.js +233 -0
- package/dev-ui/components/ResponsiveScaleHeader.d.ts +15 -0
- package/dev-ui/components/ResponsiveScaleHeader.js +51 -0
- package/dev-ui/components/atoms/Button.d.ts +47 -0
- package/dev-ui/components/atoms/Button.js +67 -0
- package/dev-ui/components/atoms/Dropdown.d.ts +13 -0
- package/dev-ui/components/atoms/Dropdown.js +50 -0
- package/dev-ui/components/atoms/NumberField.d.ts +12 -0
- package/dev-ui/components/atoms/NumberField.js +111 -0
- package/dev-ui/components/atoms/Spacer.d.ts +42 -0
- package/dev-ui/components/atoms/Spacer.js +8 -0
- package/dev-ui/components/atoms/Text.d.ts +45 -0
- package/dev-ui/components/atoms/Text.js +39 -0
- package/dev-ui/components/atoms/ToggleButton.d.ts +8 -0
- package/dev-ui/components/atoms/ToggleButton.js +41 -0
- package/dev-ui/components/atoms/Tooltip.d.ts +9 -0
- package/dev-ui/components/atoms/Tooltip.js +66 -0
- package/dev-ui/components/panels/PageDataDebugger.d.ts +2 -0
- package/dev-ui/components/panels/PageDataDebugger.js +30 -0
- package/dev-ui/components/panels/SpacingEditor.d.ts +2 -0
- package/dev-ui/components/panels/SpacingEditor.js +88 -0
- package/dev-ui/components/panels/TypographyEditor.d.ts +2 -0
- package/dev-ui/components/panels/TypographyEditor.js +88 -0
- package/dev-ui/hooks/useBreakpoint.d.ts +11 -0
- package/dev-ui/hooks/useBreakpoint.js +59 -0
- package/dev-ui/hooks/usePersistState.d.ts +1 -0
- package/dev-ui/hooks/usePersistState.js +33 -0
- package/dev-ui/hooks/useStylesheet.d.ts +4 -0
- package/dev-ui/hooks/useStylesheet.js +31 -0
- package/dev-ui/icons.d.ts +15 -0
- package/dev-ui/icons.js +29 -0
- package/dev-ui/index.d.ts +1 -0
- package/dev-ui/index.js +5 -0
- package/dev-ui/panels.d.ts +11 -0
- package/dev-ui/panels.js +33 -0
- package/dev-ui/theme.d.ts +150 -0
- package/dev-ui/theme.js +50 -0
- package/entry/Root.js +6 -5
- package/hooks/useAppData.js +0 -1
- package/package.json +8 -7
- package/serverless/create-rpc-client.d.ts +33 -0
- package/serverless/create-rpc-client.js +20 -0
- package/serverless/define-api.d.ts +2 -0
- package/serverless/define-api.js +66 -0
- package/serverless/define-rpc-router.d.ts +2 -0
- package/serverless/define-rpc-router.js +27 -0
- package/serverless/error-codes.d.ts +2 -0
- package/serverless/error-codes.js +14 -0
- package/serverless/index.d.ts +4 -0
- package/serverless/index.js +16 -0
- package/serverless/rpc-provider.d.ts +1 -0
- package/serverless/rpc-provider.js +5 -0
- package/serverless-template/_utils/ed-config.ts +5 -0
- package/serverless-template/_utils/fetch-wordpress-props.ts +30 -6
- package/serverless-template/next.config.js +63 -52
- package/serverless-template/pages/_app.tsx +0 -2
- package/serverless-template/pages/_document.tsx +19 -0
- package/style/createStitches.d.ts +75 -6
- package/style/createStitches.js +151 -45
- package/utils/getRepoName.d.ts +2 -2
- package/utils/getRepoName.js +14 -52
- package/cli/prepare-next.d.ts +0 -0
- package/cli/prepare-next.js +0 -1
- package/fields/ImageWell.d.ts +0 -8
- package/fields/ImageWell.js +0 -64
- package/serverless-template/package-lock.json +0 -641
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BreakpointArray, ResponsiveAtomCalc } from "../../style";
|
|
3
|
+
declare type Props = {
|
|
4
|
+
editableRange?: boolean;
|
|
5
|
+
editableValues?: boolean;
|
|
6
|
+
showBreakpointName?: boolean;
|
|
7
|
+
showValues?: boolean;
|
|
8
|
+
showRange?: boolean;
|
|
9
|
+
data: ResponsiveAtomCalc;
|
|
10
|
+
breakpoints: BreakpointArray;
|
|
11
|
+
};
|
|
12
|
+
export declare function ResponsiveScaleEditor(props: Props): JSX.Element;
|
|
13
|
+
export declare const RESPONSIVE_COLUMN_WIDTH = "100px";
|
|
14
|
+
export declare const RESPONSIVE_ROW_HEIGHT = "25px";
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.RESPONSIVE_ROW_HEIGHT = exports.RESPONSIVE_COLUMN_WIDTH = exports.ResponsiveScaleEditor = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var theme_1 = require("../theme");
|
|
17
|
+
var NumberField_1 = require("./atoms/NumberField");
|
|
18
|
+
var ResponsiveLerpControl_1 = require("./ResponsiveLerpControl");
|
|
19
|
+
var Text_1 = require("./atoms/Text");
|
|
20
|
+
var ToggleButton_1 = require("./atoms/ToggleButton");
|
|
21
|
+
function ResponsiveScaleEditor(props) {
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper, __assign({ css: { $$total: props.data.length } }, { children: [props.showBreakpointName && ((0, jsx_runtime_1.jsx)(Row, { children: props.data.map(function (item, i) {
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(Col, __assign({ css: { textAlign: "center" } }, { children: (0, jsx_runtime_1.jsx)(ToggleButton_1.ToggleButton, { checked: item.defined, onChange: function (checked) { }, label: (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ as: "span", variant: "monoBold" }, { children: item.breakpoint }), void 0) }, void 0) }), void 0));
|
|
24
|
+
}) }, void 0)), props.showRange && (0, jsx_runtime_1.jsx)(ResponsiveLerpControl_1.ResponsiveLerpControl, { data: props.data }, void 0), props.showValues && ((0, jsx_runtime_1.jsx)(Row, { children: props.data.map(function (item, i) {
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(Col, { children: (0, jsx_runtime_1.jsx)(Start, { children: item.type === "px" ? (0, jsx_runtime_1.jsx)(NumberField_1.NumberField, { suffix: "px", value: item.value, onChange: function () { } }, void 0) : null }, void 0) }, void 0));
|
|
26
|
+
}) }, void 0))] }), void 0));
|
|
27
|
+
}
|
|
28
|
+
exports.ResponsiveScaleEditor = ResponsiveScaleEditor;
|
|
29
|
+
exports.RESPONSIVE_COLUMN_WIDTH = "100px";
|
|
30
|
+
exports.RESPONSIVE_ROW_HEIGHT = "25px";
|
|
31
|
+
var Wrapper = (0, theme_1.styled)("div", {
|
|
32
|
+
position: "relative",
|
|
33
|
+
width: "calc(".concat(exports.RESPONSIVE_COLUMN_WIDTH, " * $$total)"),
|
|
34
|
+
});
|
|
35
|
+
var Row = (0, theme_1.styled)("div", {
|
|
36
|
+
display: "flex",
|
|
37
|
+
});
|
|
38
|
+
var Col = (0, theme_1.styled)("div", {
|
|
39
|
+
position: "relative",
|
|
40
|
+
width: exports.RESPONSIVE_COLUMN_WIDTH,
|
|
41
|
+
height: exports.RESPONSIVE_ROW_HEIGHT,
|
|
42
|
+
boxSizing: "border-box",
|
|
43
|
+
borderLeft: "1px solid $colors$bgHover",
|
|
44
|
+
display: "flex",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyContent: "center",
|
|
47
|
+
});
|
|
48
|
+
var Start = (0, theme_1.styled)("div", {
|
|
49
|
+
position: "absolute",
|
|
50
|
+
left: 2,
|
|
51
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const Button: import("@stitches/react/types/styled-component").StyledComponent<"button", {
|
|
2
|
+
state?: "active" | "inactive" | undefined;
|
|
3
|
+
color?: "default" | "black" | undefined;
|
|
4
|
+
small?: boolean | "true" | undefined;
|
|
5
|
+
tiny?: boolean | "true" | undefined;
|
|
6
|
+
}, {}, import("@stitches/react/types/css-util").CSS<{}, {
|
|
7
|
+
space: {
|
|
8
|
+
smallButtonHeight: string;
|
|
9
|
+
buttonHeight: string;
|
|
10
|
+
0: string;
|
|
11
|
+
1: string;
|
|
12
|
+
2: string;
|
|
13
|
+
3: string;
|
|
14
|
+
4: string;
|
|
15
|
+
5: string;
|
|
16
|
+
6: string;
|
|
17
|
+
};
|
|
18
|
+
colors: {
|
|
19
|
+
bg: string;
|
|
20
|
+
bgHover: string;
|
|
21
|
+
bgHoverLight: string;
|
|
22
|
+
bgLine: string;
|
|
23
|
+
bgLineStrong: string;
|
|
24
|
+
button: string;
|
|
25
|
+
buttonHover: string;
|
|
26
|
+
fg: string;
|
|
27
|
+
fgFaded: string;
|
|
28
|
+
};
|
|
29
|
+
fontSizes: {
|
|
30
|
+
sm: string;
|
|
31
|
+
md: string;
|
|
32
|
+
lg: string;
|
|
33
|
+
xl: string;
|
|
34
|
+
};
|
|
35
|
+
fonts: {
|
|
36
|
+
body: string;
|
|
37
|
+
mono: string;
|
|
38
|
+
};
|
|
39
|
+
radii: {
|
|
40
|
+
sm: string;
|
|
41
|
+
md: string;
|
|
42
|
+
lg: string;
|
|
43
|
+
};
|
|
44
|
+
transitions: {
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Button = void 0;
|
|
4
|
+
var theme_1 = require("../../theme");
|
|
5
|
+
exports.Button = (0, theme_1.styled)("button", {
|
|
6
|
+
appearance: "none",
|
|
7
|
+
border: "0px",
|
|
8
|
+
$$bg: "$colors$bg",
|
|
9
|
+
$$fg: "$colors$fg",
|
|
10
|
+
$$bgHover: "$colors$bgHover",
|
|
11
|
+
background: "$$bg",
|
|
12
|
+
color: "$$fg",
|
|
13
|
+
borderRadius: "100px",
|
|
14
|
+
whiteSpace: "nowrap",
|
|
15
|
+
padding: "4px 8px",
|
|
16
|
+
display: "flex",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
cursor: "pointer",
|
|
19
|
+
boxSizing: "border-box",
|
|
20
|
+
height: "$space$buttonHeight",
|
|
21
|
+
pointerEvents: "all",
|
|
22
|
+
fontSize: "$sm",
|
|
23
|
+
"&:hover": {
|
|
24
|
+
backgroundColor: "$$bgHover",
|
|
25
|
+
},
|
|
26
|
+
svg: {
|
|
27
|
+
display: "block",
|
|
28
|
+
fill: "currentColor",
|
|
29
|
+
marginRight: "5px",
|
|
30
|
+
width: "14px",
|
|
31
|
+
height: "14px",
|
|
32
|
+
},
|
|
33
|
+
variants: {
|
|
34
|
+
state: {
|
|
35
|
+
active: {},
|
|
36
|
+
inactive: {
|
|
37
|
+
$$fg: "$colors$fgFaded",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
color: {
|
|
41
|
+
black: {
|
|
42
|
+
$$bg: "$colors$bg",
|
|
43
|
+
$$fg: "$colors$fg",
|
|
44
|
+
$$bgHover: "$colors$bgHover",
|
|
45
|
+
},
|
|
46
|
+
default: {
|
|
47
|
+
$$bg: "$colors$button",
|
|
48
|
+
$$fg: "$colors$fg",
|
|
49
|
+
$$bgHover: "$colors$buttonHover",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
small: {
|
|
53
|
+
true: {
|
|
54
|
+
height: "$space$smallButtonHeight",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
tiny: {
|
|
58
|
+
true: {
|
|
59
|
+
height: "10px",
|
|
60
|
+
fontSize: "10px",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
defaultVariants: {
|
|
65
|
+
color: "default",
|
|
66
|
+
},
|
|
67
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from "react";
|
|
2
|
+
declare type MenuItem = {
|
|
3
|
+
icon?: ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
};
|
|
7
|
+
declare type Props = PropsWithChildren<{
|
|
8
|
+
items: MenuItem[];
|
|
9
|
+
mono?: boolean;
|
|
10
|
+
offset?: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function Tooltip(props: Props): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Tooltip = void 0;
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
var theme_1 = require("../../theme");
|
|
7
|
+
function Tooltip(props) {
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper, { children: [(0, jsx_runtime_1.jsx)(MenuWrapper, { css: { $$offset: (typeof props.offset === "number" ? props.offset : 5) + "px" }, mono: props.mono }, void 0), props.children] }, void 0));
|
|
9
|
+
}
|
|
10
|
+
exports.Tooltip = Tooltip;
|
|
11
|
+
var MenuWrapper = (0, theme_1.styled)("div", {
|
|
12
|
+
position: "absolute",
|
|
13
|
+
bottom: "calc(100% + $$offset)",
|
|
14
|
+
left: "50%",
|
|
15
|
+
transform: "translateX(-50%)",
|
|
16
|
+
backgroundColor: "$fg",
|
|
17
|
+
color: "$bg",
|
|
18
|
+
borderRadius: "100px",
|
|
19
|
+
fontSize: "$sm",
|
|
20
|
+
padding: "3px 10px",
|
|
21
|
+
opacity: 0,
|
|
22
|
+
pointerEvents: "none",
|
|
23
|
+
whiteSpace: "nowrap",
|
|
24
|
+
"&:after": {
|
|
25
|
+
backgroundColor: "inherit",
|
|
26
|
+
content: '" "',
|
|
27
|
+
width: "5px",
|
|
28
|
+
height: "5px",
|
|
29
|
+
display: "block",
|
|
30
|
+
position: "absolute",
|
|
31
|
+
top: "0%",
|
|
32
|
+
left: "50%",
|
|
33
|
+
transform: "translate(-50%, -50%) rotate(45deg)",
|
|
34
|
+
},
|
|
35
|
+
variants: {
|
|
36
|
+
mono: {
|
|
37
|
+
true: {
|
|
38
|
+
fontFamily: "$mono",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
var Wrapper = (0, theme_1.styled)("div", {
|
|
44
|
+
position: "relative",
|
|
45
|
+
"&:hover": (_a = {},
|
|
46
|
+
_a[MenuWrapper.toString()] = {
|
|
47
|
+
opacity: 1,
|
|
48
|
+
},
|
|
49
|
+
_a),
|
|
50
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
prefix?: string;
|
|
4
|
+
suffix?: string;
|
|
5
|
+
value: number;
|
|
6
|
+
onChange: (value: number) => void;
|
|
7
|
+
faded?: boolean;
|
|
8
|
+
increment: number;
|
|
9
|
+
tabIndex?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function NumberField(props: Props): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.NumberField = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var react_1 = require("react");
|
|
17
|
+
var theme_1 = require("../../theme");
|
|
18
|
+
function NumberField(props) {
|
|
19
|
+
var ref = (0, react_1.useRef)(null);
|
|
20
|
+
var _a = (0, react_1.useState)(false), focused = _a[0], setFocused = _a[1];
|
|
21
|
+
var _b = (0, react_1.useState)(props.value), value = _b[0], setValue = _b[1];
|
|
22
|
+
var focusAll = function () {
|
|
23
|
+
var range = document.createRange();
|
|
24
|
+
range.selectNodeContents(ref.current);
|
|
25
|
+
var sel = window.getSelection();
|
|
26
|
+
sel === null || sel === void 0 ? void 0 : sel.removeAllRanges();
|
|
27
|
+
sel === null || sel === void 0 ? void 0 : sel.addRange(range);
|
|
28
|
+
};
|
|
29
|
+
var normalize = function (value) {
|
|
30
|
+
return parseFloat(Math.max(0, value).toFixed(4));
|
|
31
|
+
};
|
|
32
|
+
var setValueForced = function (value, changed) {
|
|
33
|
+
if (changed === void 0) { changed = false; }
|
|
34
|
+
var v = normalize(value);
|
|
35
|
+
setValue(v);
|
|
36
|
+
if (ref.current) {
|
|
37
|
+
if (ref.current.innerHTML !== v.toString()) {
|
|
38
|
+
ref.current.innerHTML = v.toString();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (changed) {
|
|
42
|
+
props.onChange(value);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
(0, react_1.useEffect)(function () {
|
|
46
|
+
setValueForced(props.value, false);
|
|
47
|
+
}, [props.value]);
|
|
48
|
+
(0, react_1.useEffect)(function () {
|
|
49
|
+
if (!focused) {
|
|
50
|
+
setValueForced(value);
|
|
51
|
+
}
|
|
52
|
+
}, [value, focused]);
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)(Field, __assign({ focused: focused, onMouseDown: function (e) {
|
|
54
|
+
var _a;
|
|
55
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
56
|
+
if (!focused) {
|
|
57
|
+
focusAll();
|
|
58
|
+
e.preventDefault();
|
|
59
|
+
}
|
|
60
|
+
} }, { children: [props.prefix && (0, jsx_runtime_1.jsx)(Extra, { children: props.prefix }, void 0), (0, jsx_runtime_1.jsx)(Input, { ref: ref, contentEditable: !!props.onChange, tabIndex: props.tabIndex, onFocus: function () {
|
|
61
|
+
setFocused(true);
|
|
62
|
+
focusAll();
|
|
63
|
+
}, onBlur: function () { return setFocused(false); }, onInput: function (e) {
|
|
64
|
+
var value = parseFloat(e.currentTarget.innerText.replace(/[^0-9\.]/g, "")) || 0;
|
|
65
|
+
setValue(value);
|
|
66
|
+
props.onChange(value);
|
|
67
|
+
},
|
|
68
|
+
// onPasteCapture={(e) => {
|
|
69
|
+
// console.log(e.clipboardData.getData("text/plain"))
|
|
70
|
+
// e.preventDefault()
|
|
71
|
+
// }}
|
|
72
|
+
onKeyDown: function (e) {
|
|
73
|
+
var increment = props.increment * (e.shiftKey ? 10 : 1);
|
|
74
|
+
if (e.key === "ArrowUp") {
|
|
75
|
+
setValueForced(value + increment, true);
|
|
76
|
+
setTimeout(function () { return focusAll(); }, 1);
|
|
77
|
+
}
|
|
78
|
+
else if (e.key === "ArrowDown") {
|
|
79
|
+
setValueForced(value - increment, true);
|
|
80
|
+
setTimeout(function () { return focusAll(); }, 1);
|
|
81
|
+
}
|
|
82
|
+
else if (e.key === "Enter") {
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
}
|
|
85
|
+
} }, void 0), props.suffix && (0, jsx_runtime_1.jsx)(Extra, { children: props.suffix }, void 0)] }), void 0));
|
|
86
|
+
}
|
|
87
|
+
exports.NumberField = NumberField;
|
|
88
|
+
var Field = (0, theme_1.styled)("div", {
|
|
89
|
+
display: "inline-flex",
|
|
90
|
+
fontFamily: "$mono",
|
|
91
|
+
fontSize: "$sm",
|
|
92
|
+
padding: "0 4px",
|
|
93
|
+
borderRadius: "$sm",
|
|
94
|
+
variants: {
|
|
95
|
+
focused: {
|
|
96
|
+
true: {
|
|
97
|
+
backgroundColor: "$bgHover",
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
var Input = (0, theme_1.styled)("span", {
|
|
103
|
+
outline: "0px",
|
|
104
|
+
"&::selection": {
|
|
105
|
+
background: "white",
|
|
106
|
+
color: "black",
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
var Extra = (0, theme_1.styled)("span", {
|
|
110
|
+
opacity: 0.7,
|
|
111
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const Spacer: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {}, import("@stitches/react/types/css-util").CSS<{}, {
|
|
2
|
+
space: {
|
|
3
|
+
smallButtonHeight: string;
|
|
4
|
+
buttonHeight: string;
|
|
5
|
+
0: string;
|
|
6
|
+
1: string;
|
|
7
|
+
2: string;
|
|
8
|
+
3: string;
|
|
9
|
+
4: string;
|
|
10
|
+
5: string;
|
|
11
|
+
6: string;
|
|
12
|
+
};
|
|
13
|
+
colors: {
|
|
14
|
+
bg: string;
|
|
15
|
+
bgHover: string;
|
|
16
|
+
bgHoverLight: string;
|
|
17
|
+
bgLine: string;
|
|
18
|
+
bgLineStrong: string;
|
|
19
|
+
button: string;
|
|
20
|
+
buttonHover: string;
|
|
21
|
+
fg: string;
|
|
22
|
+
fgFaded: string;
|
|
23
|
+
};
|
|
24
|
+
fontSizes: {
|
|
25
|
+
sm: string;
|
|
26
|
+
md: string;
|
|
27
|
+
lg: string;
|
|
28
|
+
xl: string;
|
|
29
|
+
};
|
|
30
|
+
fonts: {
|
|
31
|
+
body: string;
|
|
32
|
+
mono: string;
|
|
33
|
+
};
|
|
34
|
+
radii: {
|
|
35
|
+
sm: string;
|
|
36
|
+
md: string;
|
|
37
|
+
lg: string;
|
|
38
|
+
};
|
|
39
|
+
transitions: {
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const Text: import("@stitches/react/types/styled-component").StyledComponent<"div", {
|
|
2
|
+
variant?: "mono" | "h1" | "monoBold" | "monoTiny" | undefined;
|
|
3
|
+
align?: "left" | "right" | "center" | undefined;
|
|
4
|
+
}, {}, import("@stitches/react/types/css-util").CSS<{}, {
|
|
5
|
+
space: {
|
|
6
|
+
smallButtonHeight: string;
|
|
7
|
+
buttonHeight: string;
|
|
8
|
+
0: string;
|
|
9
|
+
1: string;
|
|
10
|
+
2: string;
|
|
11
|
+
3: string;
|
|
12
|
+
4: string;
|
|
13
|
+
5: string;
|
|
14
|
+
6: string;
|
|
15
|
+
};
|
|
16
|
+
colors: {
|
|
17
|
+
bg: string;
|
|
18
|
+
bgHover: string;
|
|
19
|
+
bgHoverLight: string;
|
|
20
|
+
bgLine: string;
|
|
21
|
+
bgLineStrong: string;
|
|
22
|
+
button: string;
|
|
23
|
+
buttonHover: string;
|
|
24
|
+
fg: string;
|
|
25
|
+
fgFaded: string;
|
|
26
|
+
};
|
|
27
|
+
fontSizes: {
|
|
28
|
+
sm: string;
|
|
29
|
+
md: string;
|
|
30
|
+
lg: string;
|
|
31
|
+
xl: string;
|
|
32
|
+
};
|
|
33
|
+
fonts: {
|
|
34
|
+
body: string;
|
|
35
|
+
mono: string;
|
|
36
|
+
};
|
|
37
|
+
radii: {
|
|
38
|
+
sm: string;
|
|
39
|
+
md: string;
|
|
40
|
+
lg: string;
|
|
41
|
+
};
|
|
42
|
+
transitions: {
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Text = void 0;
|
|
4
|
+
var theme_1 = require("../../theme");
|
|
5
|
+
exports.Text = (0, theme_1.styled)("div", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
h1: {
|
|
9
|
+
fontSize: "$xl",
|
|
10
|
+
},
|
|
11
|
+
monoBold: {
|
|
12
|
+
fontFamily: "$mono",
|
|
13
|
+
fontSize: "$sm",
|
|
14
|
+
fontWeight: "bold",
|
|
15
|
+
lineHeight: "1.6",
|
|
16
|
+
},
|
|
17
|
+
mono: {
|
|
18
|
+
fontFamily: "$mono",
|
|
19
|
+
fontSize: "$sm",
|
|
20
|
+
lineHeight: "1.6",
|
|
21
|
+
},
|
|
22
|
+
monoTiny: {
|
|
23
|
+
fontSize: "8px",
|
|
24
|
+
fontFamily: "$mono",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
align: {
|
|
28
|
+
left: {
|
|
29
|
+
textAlign: "left",
|
|
30
|
+
},
|
|
31
|
+
center: {
|
|
32
|
+
textAlign: "center",
|
|
33
|
+
},
|
|
34
|
+
right: {
|
|
35
|
+
textAlign: "right",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ToggleButton = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var icons_1 = require("../../icons");
|
|
17
|
+
var theme_1 = require("../../theme");
|
|
18
|
+
function ToggleButton(props) {
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(ToggleButtonStyle, __assign({ onClick: function () { return props.onChange(!props.checked); } }, { children: [props.checked ? icons_1.checkFilled : icons_1.checkEmpty, props.label] }), void 0));
|
|
20
|
+
}
|
|
21
|
+
exports.ToggleButton = ToggleButton;
|
|
22
|
+
var ToggleButtonStyle = (0, theme_1.styled)("button", {
|
|
23
|
+
appearance: "none",
|
|
24
|
+
background: "transparent",
|
|
25
|
+
border: "0px",
|
|
26
|
+
padding: "3px",
|
|
27
|
+
height: "auto",
|
|
28
|
+
display: "inline-flex",
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
color: "inherit",
|
|
32
|
+
"&:hover": {
|
|
33
|
+
// backgroundColor: "$bgHover",
|
|
34
|
+
},
|
|
35
|
+
svg: {
|
|
36
|
+
fill: "$fg",
|
|
37
|
+
width: "14px",
|
|
38
|
+
height: "14px",
|
|
39
|
+
display: "block",
|
|
40
|
+
},
|
|
41
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var _a;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Tooltip = void 0;
|
|
16
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
17
|
+
var theme_1 = require("../../theme");
|
|
18
|
+
function Tooltip(props) {
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper, { children: [(0, jsx_runtime_1.jsx)(TooltipStyle, __assign({ css: { $$offset: (typeof props.offset === "number" ? props.offset : 5) + "px" }, nowrap: props.nowrap, mono: props.mono }, { children: props.label }), void 0), props.children] }, void 0));
|
|
20
|
+
}
|
|
21
|
+
exports.Tooltip = Tooltip;
|
|
22
|
+
var TooltipStyle = (0, theme_1.styled)("div", {
|
|
23
|
+
position: "absolute",
|
|
24
|
+
bottom: "calc(100% + $$offset)",
|
|
25
|
+
left: "50%",
|
|
26
|
+
transform: "translateX(-50%)",
|
|
27
|
+
backgroundColor: "#f0f0f0",
|
|
28
|
+
color: "#000000",
|
|
29
|
+
borderRadius: "100px",
|
|
30
|
+
fontSize: "$sm",
|
|
31
|
+
padding: "3px 10px",
|
|
32
|
+
opacity: 0,
|
|
33
|
+
pointerEvents: "none",
|
|
34
|
+
fontWeight: "normal",
|
|
35
|
+
"&:after": {
|
|
36
|
+
backgroundColor: "inherit",
|
|
37
|
+
content: '" "',
|
|
38
|
+
width: "5px",
|
|
39
|
+
height: "5px",
|
|
40
|
+
display: "block",
|
|
41
|
+
position: "absolute",
|
|
42
|
+
top: "100%",
|
|
43
|
+
left: "50%",
|
|
44
|
+
transform: "translate(-50%, -50%) rotate(45deg)",
|
|
45
|
+
},
|
|
46
|
+
variants: {
|
|
47
|
+
mono: {
|
|
48
|
+
true: {
|
|
49
|
+
fontFamily: "$mono",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
nowrap: {
|
|
53
|
+
true: {
|
|
54
|
+
whiteSpace: "nowrap",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
var Wrapper = (0, theme_1.styled)("div", {
|
|
60
|
+
position: "relative",
|
|
61
|
+
"&:hover": (_a = {},
|
|
62
|
+
_a[TooltipStyle.toString()] = {
|
|
63
|
+
opacity: 1,
|
|
64
|
+
},
|
|
65
|
+
_a),
|
|
66
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.PageDataDebugger = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var react_inspector_1 = require("react-inspector");
|
|
17
|
+
var routing_1 = require("../../../routing");
|
|
18
|
+
var theme_1 = require("../../theme");
|
|
19
|
+
var PanelWrapper_1 = require("../PanelWrapper");
|
|
20
|
+
function PageDataDebugger() {
|
|
21
|
+
var _a;
|
|
22
|
+
var route = (0, routing_1.useRoute)();
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(PanelWrapper_1.PanelWrapper, __assign({ title: "Page Data" }, { children: (0, jsx_runtime_1.jsx)(Wrapper, { children: (0, jsx_runtime_1.jsx)(react_inspector_1.ObjectInspector, { theme: "chromeDark", data: (_a = route.data) === null || _a === void 0 ? void 0 : _a.viewData.data, expandLevel: 3 }, void 0) }, void 0) }), void 0));
|
|
24
|
+
}
|
|
25
|
+
exports.PageDataDebugger = PageDataDebugger;
|
|
26
|
+
var Wrapper = (0, theme_1.styled)("div", {
|
|
27
|
+
width: "500px",
|
|
28
|
+
maxHeight: "calc(100vh - 100px)",
|
|
29
|
+
overflowY: "auto",
|
|
30
|
+
});
|