eddev 0.2.0-beta.10 → 0.2.0-beta.14
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/get-webpack-config.js +4 -1
- package/cli/cli.js +1 -1
- package/config/config-schema.d.ts +7 -22
- package/config/config-schema.js +1 -6
- package/config/get-config.d.ts +6 -15
- package/config/parse-config.d.ts +4 -10
- 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/DevUI.d.ts +2 -0
- package/dev-ui/components/DevUI.js +28 -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/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 +13 -0
- package/dev-ui/panels.d.ts +11 -0
- package/dev-ui/panels.js +33 -0
- package/dev-ui/theme.d.ts +151 -0
- package/dev-ui/theme.js +50 -0
- package/entry/Root.js +7 -5
- package/package.json +2 -1
- package/serverless-template/pages/_app.tsx +0 -2
- package/style/createStitches.d.ts +71 -1
- package/style/createStitches.js +151 -45
- package/utils/getRepoName.js +13 -5
- package/build/workers/serverless-worker-script.d.ts +0 -0
- package/build/workers/serverless-worker-script.js +0 -1
- package/serverless-template/package-lock.json +0 -641
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePersistState = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var get = function (id, fallback) {
|
|
6
|
+
if (fallback === void 0) { fallback = undefined; }
|
|
7
|
+
var value = localStorage.getItem("devui_" + id);
|
|
8
|
+
if (value !== null) {
|
|
9
|
+
try {
|
|
10
|
+
return JSON.parse(value);
|
|
11
|
+
}
|
|
12
|
+
catch (err) {
|
|
13
|
+
return fallback;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return fallback;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var set = function (id, value) {
|
|
21
|
+
localStorage.setItem("devui_" + id, JSON.stringify(value));
|
|
22
|
+
};
|
|
23
|
+
function usePersistState(id, initial) {
|
|
24
|
+
var _a = (0, react_1.useState)(function () { return get(id, initial); }), value = _a[0], setValue = _a[1];
|
|
25
|
+
return [
|
|
26
|
+
value,
|
|
27
|
+
function (value) {
|
|
28
|
+
set(id, value);
|
|
29
|
+
setValue(value);
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
exports.usePersistState = usePersistState;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useStylesheet = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
function useStylesheet(id) {
|
|
6
|
+
var _a = (0, react_1.useState)(null), element = _a[0], setElement = _a[1];
|
|
7
|
+
(0, react_1.useEffect)(function () {
|
|
8
|
+
if (!element) {
|
|
9
|
+
var style = document.getElementById("devui-" + id);
|
|
10
|
+
if (!style) {
|
|
11
|
+
style = document.createElement("style");
|
|
12
|
+
style.id = "devui-" + id;
|
|
13
|
+
document.body.appendChild(style);
|
|
14
|
+
}
|
|
15
|
+
setElement(style);
|
|
16
|
+
}
|
|
17
|
+
}, [element]);
|
|
18
|
+
return {
|
|
19
|
+
clear: function () {
|
|
20
|
+
if (element) {
|
|
21
|
+
element.innerHTML = "";
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
set: function (value) {
|
|
25
|
+
if (element) {
|
|
26
|
+
element.innerHTML = value;
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
exports.useStylesheet = useStylesheet;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const bolt: JSX.Element;
|
|
3
|
+
export declare const typography: JSX.Element;
|
|
4
|
+
export declare const ruler: JSX.Element;
|
|
5
|
+
export declare const structure: JSX.Element;
|
|
6
|
+
export declare const code: JSX.Element;
|
|
7
|
+
export declare const share: JSX.Element;
|
|
8
|
+
export declare const close: JSX.Element;
|
|
9
|
+
export declare const check: JSX.Element;
|
|
10
|
+
export declare const checkEmpty: JSX.Element;
|
|
11
|
+
export declare const checkFilled: JSX.Element;
|
|
12
|
+
export declare const line: JSX.Element;
|
|
13
|
+
export declare const copy: JSX.Element;
|
|
14
|
+
export declare const paste: JSX.Element;
|
|
15
|
+
export declare const trash: JSX.Element;
|
package/dev-ui/icons.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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.trash = exports.paste = exports.copy = exports.line = exports.checkFilled = exports.checkEmpty = exports.check = exports.close = exports.share = exports.code = exports.structure = exports.ruler = exports.typography = exports.bolt = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
exports.bolt = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("rect", { fill: "none", height: "24", width: "24" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("path", { d: "M11,21h-1l1-7H6.74c0,0,3.68-6.46,6.26-11h1l-1,7h4.28L11,21z" }, void 0) }, void 0)] }), void 0));
|
|
17
|
+
exports.typography = ((0, jsx_runtime_1.jsx)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z" }, void 0) }), void 0));
|
|
18
|
+
exports.ruler = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M23 6H1v12h22V6zm-2 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z" }, void 0)] }), void 0));
|
|
19
|
+
exports.structure = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", enableBackground: "new 0 0 24 24", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("rect", { fill: "none", height: "24", width: "24" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("polygon", { points: "22,11 22,3 15,3 15,6 9,6 9,3 2,3 2,11 9,11 9,8 11,8 11,18 15,18 15,21 22,21 22,13 15,13 15,16 13,16 13,8 15,8 15,11" }, void 0)] }), void 0));
|
|
20
|
+
exports.code = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" }, void 0)] }), void 0));
|
|
21
|
+
exports.share = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", enableBackground: "new 0 0 24 24", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("rect", { fill: "none", height: "24", width: "24" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("polygon", { points: "23,3 1,3 1,13 3,13 3,5 21,5 21,21 23,21" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("circle", { cx: "9", cy: "10", r: "4" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("path", { d: "M15.39,16.56C13.71,15.7,11.53,15,9,15c-2.53,0-4.71,0.7-6.39,1.56C1.61,17.07,1,18.1,1,19.22V22h16v-2.78 C17,18.1,16.39,17.07,15.39,16.56z" }, void 0) }, void 0)] }, void 0) }, void 0)] }), void 0));
|
|
22
|
+
exports.close = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }, void 0)] }), void 0));
|
|
23
|
+
exports.check = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" }, void 0)] }), void 0));
|
|
24
|
+
exports.checkEmpty = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M19 5v14H5V5h14m2-2H3v18h18V3z" }, void 0)] }), void 0));
|
|
25
|
+
exports.checkFilled = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M21 3H3v18h18V3zM10 17l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }, void 0)] }), void 0));
|
|
26
|
+
exports.line = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", enableBackground: "new 0 0 24 24", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("rect", { fill: "none", height: "24", width: "24", x: "0" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("path", { d: "M23,8c0,1.1-0.9,2-2,2c-0.18,0-0.35-0.02-0.51-0.07l-3.56,3.55C16.98,13.64,17,13.82,17,14c0,1.1-0.9,2-2,2s-2-0.9-2-2 c0-0.18,0.02-0.36,0.07-0.52l-2.55-2.55C10.36,10.98,10.18,11,10,11c-0.18,0-0.36-0.02-0.52-0.07l-4.55,4.56 C4.98,15.65,5,15.82,5,16c0,1.1-0.9,2-2,2s-2-0.9-2-2s0.9-2,2-2c0.18,0,0.35,0.02,0.51,0.07l4.56-4.55C8.02,9.36,8,9.18,8,9 c0-1.1,0.9-2,2-2s2,0.9,2,2c0,0.18-0.02,0.36-0.07,0.52l2.55,2.55C14.64,12.02,14.82,12,15,12c0.18,0,0.36,0.02,0.52,0.07 l3.55-3.56C19.02,8.35,19,8.18,19,8c0-1.1,0.9-2,2-2S23,6.9,23,8z" }, void 0) }, void 0) }, void 0)] }), void 0));
|
|
27
|
+
exports.copy = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" }, void 0)] }), void 0));
|
|
28
|
+
exports.paste = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M19 2h-4.18C14.4.84 13.3 0 12 0S9.6.84 9.18 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z" }, void 0)] }), void 0));
|
|
29
|
+
exports.trash = ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M0 0h24v24H0V0z", fill: "none" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M6 21h12V7H6v14zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" }, void 0)] }), void 0));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components/DevUI";
|
package/dev-ui/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./components/DevUI"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from "react";
|
|
2
|
+
declare type DevUIPanelItem = {
|
|
3
|
+
label: string;
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
component: ComponentType;
|
|
6
|
+
};
|
|
7
|
+
export declare const DEV_UI_PANELS: {
|
|
8
|
+
[key: string]: DevUIPanelItem;
|
|
9
|
+
};
|
|
10
|
+
export declare type PanelID = keyof typeof DEV_UI_PANELS;
|
|
11
|
+
export {};
|
package/dev-ui/panels.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEV_UI_PANELS = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var PageDataDebugger_1 = require("./components/panels/PageDataDebugger");
|
|
6
|
+
var SpacingEditor_1 = require("./components/panels/SpacingEditor");
|
|
7
|
+
var TypographyEditor_1 = require("./components/panels/TypographyEditor");
|
|
8
|
+
var icons_1 = require("./icons");
|
|
9
|
+
var TempComponent = function () {
|
|
10
|
+
return (0, jsx_runtime_1.jsx)("div", { children: "Test" }, void 0);
|
|
11
|
+
};
|
|
12
|
+
exports.DEV_UI_PANELS = {
|
|
13
|
+
typography: {
|
|
14
|
+
label: "Typography",
|
|
15
|
+
icon: icons_1.typography,
|
|
16
|
+
component: TypographyEditor_1.TypographyEditor,
|
|
17
|
+
},
|
|
18
|
+
spacing: {
|
|
19
|
+
label: "Spacing",
|
|
20
|
+
icon: icons_1.ruler,
|
|
21
|
+
component: SpacingEditor_1.SpacingEditor,
|
|
22
|
+
},
|
|
23
|
+
page: {
|
|
24
|
+
label: "Page Data",
|
|
25
|
+
icon: icons_1.code,
|
|
26
|
+
component: PageDataDebugger_1.PageDataDebugger,
|
|
27
|
+
},
|
|
28
|
+
// structure: {
|
|
29
|
+
// label: "Page Structure",
|
|
30
|
+
// icon: structure,
|
|
31
|
+
// component: TempComponent,
|
|
32
|
+
// },
|
|
33
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const styled: <Type extends import("react").ComponentType<any> | keyof JSX.IntrinsicElements | import("@stitches/react/types/util").Function, Composers extends (string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function | {
|
|
3
|
+
[name: string]: unknown;
|
|
4
|
+
})[], CSS = 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, {}>>(type: Type, ...composers: { [K in keyof Composers]: Composers[K] extends string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
|
|
46
|
+
variants?: {
|
|
47
|
+
[x: string]: {
|
|
48
|
+
[x: string]: CSS;
|
|
49
|
+
[x: number]: CSS;
|
|
50
|
+
};
|
|
51
|
+
} | undefined;
|
|
52
|
+
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("@stitches/react/types/util").WideObject) & {
|
|
53
|
+
css: CSS;
|
|
54
|
+
})[] | undefined;
|
|
55
|
+
defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("@stitches/react/types/util").WideObject) | undefined;
|
|
56
|
+
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("@stitches/react/types/styled-component").StyledComponent<Type, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, import("@stitches/react/types/css-util").CSS<{}, {
|
|
57
|
+
space: {
|
|
58
|
+
smallButtonHeight: string;
|
|
59
|
+
buttonHeight: string;
|
|
60
|
+
0: string;
|
|
61
|
+
1: string;
|
|
62
|
+
2: string;
|
|
63
|
+
3: string;
|
|
64
|
+
4: string;
|
|
65
|
+
5: string;
|
|
66
|
+
6: string;
|
|
67
|
+
};
|
|
68
|
+
colors: {
|
|
69
|
+
bg: string;
|
|
70
|
+
bgHover: string;
|
|
71
|
+
bgHoverLight: string;
|
|
72
|
+
bgLine: string;
|
|
73
|
+
bgLineStrong: string;
|
|
74
|
+
button: string;
|
|
75
|
+
buttonHover: string;
|
|
76
|
+
fg: string;
|
|
77
|
+
fgFaded: string;
|
|
78
|
+
};
|
|
79
|
+
fontSizes: {
|
|
80
|
+
sm: string;
|
|
81
|
+
md: string;
|
|
82
|
+
lg: string;
|
|
83
|
+
xl: string;
|
|
84
|
+
};
|
|
85
|
+
fonts: {
|
|
86
|
+
body: string;
|
|
87
|
+
mono: string;
|
|
88
|
+
};
|
|
89
|
+
radii: {
|
|
90
|
+
sm: string;
|
|
91
|
+
md: string;
|
|
92
|
+
lg: string;
|
|
93
|
+
};
|
|
94
|
+
transitions: {
|
|
95
|
+
default: string;
|
|
96
|
+
};
|
|
97
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>, css: <Composers extends (string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function | {
|
|
98
|
+
[name: string]: unknown;
|
|
99
|
+
})[], CSS = import("@stitches/react/types/css-util").CSS<{}, {
|
|
100
|
+
space: {
|
|
101
|
+
smallButtonHeight: string;
|
|
102
|
+
buttonHeight: string;
|
|
103
|
+
0: string;
|
|
104
|
+
1: string;
|
|
105
|
+
2: string;
|
|
106
|
+
3: string;
|
|
107
|
+
4: string;
|
|
108
|
+
5: string;
|
|
109
|
+
6: string;
|
|
110
|
+
};
|
|
111
|
+
colors: {
|
|
112
|
+
bg: string;
|
|
113
|
+
bgHover: string;
|
|
114
|
+
bgHoverLight: string;
|
|
115
|
+
bgLine: string;
|
|
116
|
+
bgLineStrong: string;
|
|
117
|
+
button: string;
|
|
118
|
+
buttonHover: string;
|
|
119
|
+
fg: string;
|
|
120
|
+
fgFaded: string;
|
|
121
|
+
};
|
|
122
|
+
fontSizes: {
|
|
123
|
+
sm: string;
|
|
124
|
+
md: string;
|
|
125
|
+
lg: string;
|
|
126
|
+
xl: string;
|
|
127
|
+
};
|
|
128
|
+
fonts: {
|
|
129
|
+
body: string;
|
|
130
|
+
mono: string;
|
|
131
|
+
};
|
|
132
|
+
radii: {
|
|
133
|
+
sm: string;
|
|
134
|
+
md: string;
|
|
135
|
+
lg: string;
|
|
136
|
+
};
|
|
137
|
+
transitions: {
|
|
138
|
+
default: string;
|
|
139
|
+
};
|
|
140
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>(...composers: { [K in keyof Composers]: Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
|
|
141
|
+
variants?: {
|
|
142
|
+
[x: string]: {
|
|
143
|
+
[x: string]: CSS;
|
|
144
|
+
[x: number]: CSS;
|
|
145
|
+
};
|
|
146
|
+
} | undefined;
|
|
147
|
+
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]> | undefined; } : import("@stitches/react/types/util").WideObject) & {
|
|
148
|
+
css: CSS;
|
|
149
|
+
})[] | undefined;
|
|
150
|
+
defaultVariants?: ("variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]> | undefined; } : import("@stitches/react/types/util").WideObject) | undefined;
|
|
151
|
+
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("@stitches/react/types/styled-component").CssComponent<import("@stitches/react/types/styled-component").StyledComponentType<Composers>, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, CSS>;
|
package/dev-ui/theme.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.css = exports.styled = void 0;
|
|
5
|
+
var react_1 = require("@stitches/react");
|
|
6
|
+
exports.styled = (_a = (0, react_1.createStitches)({
|
|
7
|
+
theme: {
|
|
8
|
+
space: {
|
|
9
|
+
smallButtonHeight: "22px",
|
|
10
|
+
buttonHeight: "26px",
|
|
11
|
+
0: "4px",
|
|
12
|
+
1: "8px",
|
|
13
|
+
2: "12px",
|
|
14
|
+
3: "16px",
|
|
15
|
+
4: "24px",
|
|
16
|
+
5: "32px",
|
|
17
|
+
6: "48px",
|
|
18
|
+
},
|
|
19
|
+
colors: {
|
|
20
|
+
bg: "#111111",
|
|
21
|
+
bgHover: "#333333",
|
|
22
|
+
bgHoverLight: "#333333",
|
|
23
|
+
bgLine: "#1a1a1a",
|
|
24
|
+
bgLineStrong: "#222222",
|
|
25
|
+
button: "#333333",
|
|
26
|
+
buttonHover: "#555555",
|
|
27
|
+
fg: "#ffffff",
|
|
28
|
+
fgFaded: "#aaaaaa",
|
|
29
|
+
},
|
|
30
|
+
fontSizes: {
|
|
31
|
+
sm: "12px",
|
|
32
|
+
md: "14px",
|
|
33
|
+
lg: "18px",
|
|
34
|
+
xl: "24px",
|
|
35
|
+
},
|
|
36
|
+
fonts: {
|
|
37
|
+
body: '"Roboto", Helvetica, sans-serif',
|
|
38
|
+
mono: '"Roboto Mono", Menlo, monospace',
|
|
39
|
+
},
|
|
40
|
+
radii: {
|
|
41
|
+
sm: "4px",
|
|
42
|
+
md: "8px",
|
|
43
|
+
lg: "16px",
|
|
44
|
+
},
|
|
45
|
+
transitions: {
|
|
46
|
+
default: "0.2s ease",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
prefix: "eddev",
|
|
50
|
+
}), _a.styled), exports.css = _a.css;
|
package/entry/Root.js
CHANGED
|
@@ -33,14 +33,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
33
33
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
34
34
|
// @ts-ignore
|
|
35
35
|
var views_1 = __importStar(require("@manifest/views"));
|
|
36
|
+
var dynamic_1 = require("../dynamic");
|
|
36
37
|
var react_1 = require("react");
|
|
37
38
|
var routing_1 = require("../routing");
|
|
39
|
+
var DevUI = (0, dynamic_1.dynamic)(function () { return Promise.resolve().then(function () { return __importStar(require("../dev-ui/components/DevUI")); }); });
|
|
38
40
|
function Root() {
|
|
39
41
|
var route = (0, routing_1.useRoute)();
|
|
40
|
-
return ((0, jsx_runtime_1.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [process.devUI ? (0, jsx_runtime_1.jsx)(DevUI, {}, void 0) : null, (0, jsx_runtime_1.jsx)(views_1.App, { children: (0, jsx_runtime_1.jsx)(routing_1.Switch, { children: Object.entries(views_1.default).map(function (_a) {
|
|
43
|
+
var _b, _c;
|
|
44
|
+
var name = _a[0], Component = _a[1];
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(routing_1.Route, __assign({ match: function (route) { var _a; return ((_a = route.data) === null || _a === void 0 ? void 0 : _a.view) === name; } }, { children: (0, jsx_runtime_1.jsx)(Component, __assign({}, (_c = (_b = route.data) === null || _b === void 0 ? void 0 : _b.viewData) === null || _c === void 0 ? void 0 : _c.data), void 0) }), name));
|
|
46
|
+
}) }, void 0) }, void 0)] }, void 0));
|
|
45
47
|
}
|
|
46
48
|
exports.default = Root;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eddev",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.14",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"glob": "^7.1.7",
|
|
68
68
|
"glob-promise": "^4.2.0",
|
|
69
69
|
"graphql": "^15.5.3",
|
|
70
|
+
"immer": "^9.0.12",
|
|
70
71
|
"ink": "^3.2.0",
|
|
71
72
|
"inquirer": "^8.1.2",
|
|
72
73
|
"mini-css-extract-plugin": "^2.2.2",
|
|
@@ -19,8 +19,6 @@ function MyApp({ Component, pageProps }: AppProps) {
|
|
|
19
19
|
|
|
20
20
|
const View = manifest[pageProps.view]
|
|
21
21
|
|
|
22
|
-
console.log("ROUTE", pageProps, route.pathname)
|
|
23
|
-
|
|
24
22
|
return (
|
|
25
23
|
<ServerlessAppDataProvider value={appData}>
|
|
26
24
|
<NextRouter data={pageProps} path={route.pathname}>
|
|
@@ -18,6 +18,12 @@ declare type TypographyConfig<Theme extends ConfigType.Theme<{}>, Media extends
|
|
|
18
18
|
lineHeight?: ResponsiveValue<Media, Theme["lineHeights"] extends {} ? `$${Extract<keyof Theme["lineHeights"], string>}` | CSS["lineHeight"] : CSS["lineHeight"]>;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
+
export declare type BreakpointArray = {
|
|
22
|
+
key: string;
|
|
23
|
+
min: string | null;
|
|
24
|
+
max: string | null;
|
|
25
|
+
}[];
|
|
26
|
+
export declare function parseBreakpoints(names: string[], medias: any): BreakpointArray;
|
|
21
27
|
interface GridConfig<Theme extends ConfigType.Theme<{}>, Media extends ConfigType.Media<{}>> {
|
|
22
28
|
columns: number;
|
|
23
29
|
breakpoints: {
|
|
@@ -36,7 +42,49 @@ declare type ResponsiveScale<Media extends ConfigType.Media<{}>, T extends {}> =
|
|
|
36
42
|
declare type ResponsiveConfig<Media extends ConfigType.Media<{}>, T extends {}> = {
|
|
37
43
|
[Scale in keyof T]: ResponsiveScale<Media, T[Scale]>;
|
|
38
44
|
};
|
|
39
|
-
|
|
45
|
+
declare type ResponsiveAtom = {
|
|
46
|
+
lerpStart: boolean;
|
|
47
|
+
} & ({
|
|
48
|
+
type: "multiplier";
|
|
49
|
+
value: number;
|
|
50
|
+
} | {
|
|
51
|
+
type: "percent";
|
|
52
|
+
value: number;
|
|
53
|
+
} | {
|
|
54
|
+
type: "px";
|
|
55
|
+
value: number;
|
|
56
|
+
} | {
|
|
57
|
+
type: "number";
|
|
58
|
+
value: number;
|
|
59
|
+
} | {
|
|
60
|
+
type: "unknown";
|
|
61
|
+
value: string | number;
|
|
62
|
+
} | {
|
|
63
|
+
type: "undefined";
|
|
64
|
+
});
|
|
65
|
+
export declare type ResponsiveAtomCalc = ResponsiveAtom & {
|
|
66
|
+
defined: boolean;
|
|
67
|
+
breakpoint: string;
|
|
68
|
+
baseBreakpoint: string;
|
|
69
|
+
lastBreakpoint: string;
|
|
70
|
+
lerping?: {
|
|
71
|
+
fromBP: string | null;
|
|
72
|
+
toBP: string | null;
|
|
73
|
+
minMedia: number;
|
|
74
|
+
maxMedia: number;
|
|
75
|
+
minValue: number;
|
|
76
|
+
maxValue: number;
|
|
77
|
+
};
|
|
78
|
+
concreteValue: number | null;
|
|
79
|
+
};
|
|
80
|
+
export declare function parseResponsiveObject(breakpoints: ReturnType<typeof parseBreakpoints>, object: any): ResponsiveAtomCalc[];
|
|
81
|
+
export declare function getResponsiveObjectStyles(breakpoints: ReturnType<typeof parseBreakpoints>, object: any, varName: string, unit?: string): any[];
|
|
82
|
+
export declare function parseResponsiveTokens(theme: any, breakpoints: any): {
|
|
83
|
+
initialResponsive: any;
|
|
84
|
+
globalResponsive: any;
|
|
85
|
+
};
|
|
86
|
+
export declare function createStitches<Prefix extends string = "", Media extends {} = {}, Breakpoints extends (keyof Media)[] = [], Theme extends {} = {}, Responsive extends {} = {}, ThemeMap extends {} = DefaultThemeMap, Utils extends {} = {}, Typography extends {} = {}>(config: {
|
|
87
|
+
breakpoints: Breakpoints;
|
|
40
88
|
prefix?: ConfigType.Prefix<Prefix>;
|
|
41
89
|
media: ConfigType.Media<Media>;
|
|
42
90
|
theme: ConfigType.Theme<Theme>;
|
|
@@ -55,12 +103,34 @@ export declare function createStitches<Prefix extends string = "", Media extends
|
|
|
55
103
|
themeMap?: ConfigType.ThemeMap<ThemeMap>;
|
|
56
104
|
utils: ConfigType.Utils<Utils>;
|
|
57
105
|
}): {
|
|
106
|
+
originalConfig: {
|
|
107
|
+
breakpoints: Breakpoints;
|
|
108
|
+
prefix?: ConfigType.Prefix<Prefix> | undefined;
|
|
109
|
+
media: ConfigType.Media<Media>;
|
|
110
|
+
theme: ConfigType.Theme<Theme>;
|
|
111
|
+
responsive: ResponsiveConfig<Media & {
|
|
112
|
+
initial: string;
|
|
113
|
+
editor: string;
|
|
114
|
+
}, Responsive>;
|
|
115
|
+
typography: TypographyConfig<Theme, Media & {
|
|
116
|
+
initial: string;
|
|
117
|
+
editor: string;
|
|
118
|
+
}, Typography>;
|
|
119
|
+
grid: GridConfig<Theme, Media & {
|
|
120
|
+
initial: string;
|
|
121
|
+
editor: string;
|
|
122
|
+
}>;
|
|
123
|
+
themeMap?: ConfigType.ThemeMap<ThemeMap> | undefined;
|
|
124
|
+
utils: ConfigType.Utils<Utils>;
|
|
125
|
+
};
|
|
126
|
+
breakpoints: BreakpointArray;
|
|
58
127
|
typeVariants: { [key in keyof TypographyConfig<Theme, Media & {
|
|
59
128
|
initial: string;
|
|
60
129
|
editor: string;
|
|
61
130
|
}, Typography>]: any; };
|
|
62
131
|
gridVariants: {};
|
|
63
132
|
responsiveTokens: { [Scale in keyof Responsive]: { [T in keyof Responsive[Scale]]: number; }; };
|
|
133
|
+
responsiveGlobals: any;
|
|
64
134
|
config: {
|
|
65
135
|
prefix: "";
|
|
66
136
|
media: {
|