Skip to content

Commit eaabbf8

Browse files
authored
Merge pull request #95 from codewithkyle/wip-0.10
📦 Release v0.10.0
2 parents 12fd5fa + c989794 commit eaabbf8

File tree

161 files changed

+3507
-978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+3507
-978
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deployment
33
on:
44
push:
55
branches:
6-
- "wip-0.10"
6+
- master
77
workflow_dispatch:
88

99
jobs:

README.md

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,7 @@ module.exports = {
5454
700: "#3F3F46",
5555
800: "#27272A",
5656
900: "#18181B",
57-
},
58-
neutral: {
59-
50: "#FAFAFA",
60-
100: "#F5F5F5",
61-
200: "#E5E5E5",
62-
300: "#D4D4D4",
63-
400: "#A3A3A3",
64-
500: "#737373",
65-
600: "#525252",
66-
700: "#404040",
67-
800: "#262626",
68-
900: "#171717",
57+
950: "#09090b",
6958
},
7059
primary: {
7160
50: "#EFF6FF",
@@ -78,18 +67,7 @@ module.exports = {
7867
700: "#1D4ED8",
7968
800: "#1E40AF",
8069
900: "#1E3A8A",
81-
},
82-
info: {
83-
50: "#EFF6FF",
84-
100: "#DBEAFE",
85-
200: "#BFDBFE",
86-
300: "#93C5FD",
87-
400: "#60A5FA",
88-
500: "#3B82F6",
89-
600: "#2563EB",
90-
700: "#1D4ED8",
91-
800: "#1E40AF",
92-
900: "#1E3A8A",
70+
950: "#172554",
9371
},
9472
success: {
9573
50: "#ECFDF5",
@@ -102,6 +80,7 @@ module.exports = {
10280
700: "#047857",
10381
800: "#065F46",
10482
900: "#064E3B",
83+
950: "#022c22",
10584
},
10685
danger: {
10786
50: "#FFF1F2",
@@ -114,6 +93,7 @@ module.exports = {
11493
700: "#BE123C",
11594
800: "#9F1239",
11695
900: "#881337",
96+
950: "#4c0519",
11797
},
11898
warning: {
11999
50: "#FFFBEB",
@@ -126,6 +106,7 @@ module.exports = {
126106
700: "#B45309",
127107
800: "#92400E",
128108
900: "#78350F",
109+
950: "#451a03",
129110
},
130111
},
131112
borders: {
@@ -137,15 +118,13 @@ module.exports = {
137118
variables: {
138119
"focus-ring": "1px auto var(--primary-500)",
139120
"focus-ring-offset": "5px",
140-
"bevel": "0 1px 0 hsl(0deg 0% 0% / 0.1), inset 0 -2px 0 hsl(0deg 0% 0% / 0.05)",
141-
"primary-opaque-hover": "rgba(14,165,233,0.05)",
142-
"primary-opaque-active": "rgba(14,165,233,0.1)",
121+
"bevel": "0 1px 0 hsl(0deg 0% 0% / 0.1)",
143122
"input-border": "1px solid var(--grey-300)",
144-
"button-shadow": "0px 1px 2px -1px rgba(0, 0, 0, 0.09), 0px 7px 14px -5px rgba(0, 0, 0, 0.06), 0px 3px 7px -2px rgba(0, 0, 0, 0.04), inset 0px -1px 0px 1px rgba(0, 0, 0, 0.06)",
123+
"button-shadow": "0px 1px 2px -1px rgba(0, 0, 0, 0.09), inset 0px -1px 0px 1px rgba(0, 0, 0, 0.06)",
145124
},
146125
shadows: {
147126
colors: {
148-
grey: "0deg 0% 0%",
127+
black: "var(--black-hsl)",
149128
},
150129
sizes: {
151130
sm: `
@@ -174,6 +153,12 @@ module.exports = {
174153
`,
175154
},
176155
},
156+
prefixes: {
157+
dark: {
158+
features: ["backgrounds", "fonts", "borders", "shadows"],
159+
rule: "prefers-color-scheme: dark",
160+
},
161+
},
177162
};
178163
```
179164

brixi.config.js

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,7 @@ module.exports = {
1717
700: "#3F3F46",
1818
800: "#27272A",
1919
900: "#18181B",
20-
},
21-
neutral: {
22-
50: "#FAFAFA",
23-
100: "#F5F5F5",
24-
200: "#E5E5E5",
25-
300: "#D4D4D4",
26-
400: "#A3A3A3",
27-
500: "#737373",
28-
600: "#525252",
29-
700: "#404040",
30-
800: "#262626",
31-
900: "#171717",
20+
950: "#09090b",
3221
},
3322
primary: {
3423
50: "#EFF6FF",
@@ -41,18 +30,7 @@ module.exports = {
4130
700: "#1D4ED8",
4231
800: "#1E40AF",
4332
900: "#1E3A8A",
44-
},
45-
info: {
46-
50: "#EFF6FF",
47-
100: "#DBEAFE",
48-
200: "#BFDBFE",
49-
300: "#93C5FD",
50-
400: "#60A5FA",
51-
500: "#3B82F6",
52-
600: "#2563EB",
53-
700: "#1D4ED8",
54-
800: "#1E40AF",
55-
900: "#1E3A8A",
33+
950: "#172554",
5634
},
5735
success: {
5836
50: "#ECFDF5",
@@ -65,6 +43,7 @@ module.exports = {
6543
700: "#047857",
6644
800: "#065F46",
6745
900: "#064E3B",
46+
950: "#022c22",
6847
},
6948
danger: {
7049
50: "#FFF1F2",
@@ -77,6 +56,7 @@ module.exports = {
7756
700: "#BE123C",
7857
800: "#9F1239",
7958
900: "#881337",
59+
950: "#4c0519",
8060
},
8161
warning: {
8262
50: "#FFFBEB",
@@ -89,6 +69,7 @@ module.exports = {
8969
700: "#B45309",
9070
800: "#92400E",
9171
900: "#78350F",
72+
950: "#451a03",
9273
},
9374
},
9475
borders: {
@@ -100,15 +81,13 @@ module.exports = {
10081
variables: {
10182
"focus-ring": "1px auto var(--primary-500)",
10283
"focus-ring-offset": "5px",
103-
"bevel": "0 1px 0 hsl(0deg 0% 0% / 0.1), inset 0 -2px 0 hsl(0deg 0% 0% / 0.05)",
104-
"primary-opaque-hover": "rgba(14,165,233,0.05)",
105-
"primary-opaque-active": "rgba(14,165,233,0.1)",
84+
"bevel": "0 1px 0 hsl(0deg 0% 0% / 0.1)",
10685
"input-border": "1px solid var(--grey-300)",
107-
"button-shadow": "0px 1px 2px -1px rgba(0, 0, 0, 0.09), 0px 7px 14px -5px rgba(0, 0, 0, 0.06), 0px 3px 7px -2px rgba(0, 0, 0, 0.04), inset 0px -1px 0px 1px rgba(0, 0, 0, 0.06)",
86+
"button-shadow": "0px 1px 2px -1px rgba(0, 0, 0, 0.09), inset 0px -1px 0px 1px rgba(0, 0, 0, 0.06)",
10887
},
10988
shadows: {
11089
colors: {
111-
grey: "var(--black-hsl)",
90+
black: "var(--black-hsl)",
11291
},
11392
sizes: {
11493
sm: `
@@ -137,4 +116,10 @@ module.exports = {
137116
`,
138117
},
139118
},
119+
prefixes: {
120+
dark: {
121+
features: ["backgrounds", "fonts", "borders", "shadows"],
122+
rule: "prefers-color-scheme: dark",
123+
},
124+
},
140125
};

build/iframe-generator.js

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,32 @@ const componentsDir = path.join(cwd, "src", "framework", "components");
1919
.replace(/.*[\\\/]/, "")
2020
.toLowerCase()
2121
.trim();
22-
const p = component
22+
const spaHtml = await renderComponent(name, component);
23+
const spaDir = path.join(publicDir, "spa", name);
24+
if (!fs.existsSync(spaDir)) {
25+
await fs.promises.mkdir(spaDir, { recursive: true });
26+
}
27+
await fs.promises.writeFile(path.join(spaDir, "index.html"), spaHtml);
28+
}
29+
const mpaComponents = glob.sync(`${componentsDir}/**/static.html`);
30+
for (const component of mpaComponents) {
31+
const name = component
2332
.match(/.*[\\\/]/, "")[0]
33+
.replace(/[\\\/]$/, "")
34+
.replace(/.*[\\\/]/, "")
2435
.toLowerCase()
2536
.trim();
26-
const html = await renderComponent(name, p);
27-
const pDir = path.join(publicDir, name);
28-
if (!fs.existsSync(pDir)) {
29-
await fs.promises.mkdir(pDir);
37+
const mpaHtml = await renderComponent(name, component);
38+
const mpaDir = path.join(publicDir, "mpa", name);
39+
if (!fs.existsSync(mpaDir)) {
40+
await fs.promises.mkdir(mpaDir, { recursive: true });
3041
}
31-
await fs.promises.writeFile(path.join(pDir, "index.html"), html);
42+
await fs.promises.writeFile(path.join(mpaDir, "index.html"), mpaHtml);
3243
}
3344
})();
3445

3546
async function renderComponent(name, p) {
36-
const content = await fs.promises.readFile(path.join(p, "index.html"), { encoding: "utf-8" });
47+
const content = await fs.promises.readFile(p, { encoding: "utf-8" });
3748
return `<!DOCTYPE html>
3849
<html lang="en">
3950
<head>
@@ -59,7 +70,7 @@ async function renderComponent(name, p) {
5970
<script type="module" src="/js/${name}.js"></script>
6071
</head>
6172
<body>
62-
${content}
73+
${content.trim().length ? content : '<p>Coming soon.</p>'}
6374
</body>
6475
</html>
6576
`;

0 commit comments

Comments
 (0)