@stdout-design/cli 0.1.9 → 0.2.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/index.mjs
CHANGED
|
@@ -3255,12 +3255,12 @@ const getPkgJson = (name, version) => ({
|
|
|
3255
3255
|
},
|
|
3256
3256
|
type: "module"
|
|
3257
3257
|
});
|
|
3258
|
-
const templateDir = () => path.resolve(import.meta.dirname, "
|
|
3259
|
-
const templatesDir = () => path.resolve(import.meta.dirname, "
|
|
3258
|
+
const templateDir = () => path.resolve(import.meta.dirname, "../template");
|
|
3259
|
+
const templatesDir = () => path.resolve(import.meta.dirname, "../template/templates");
|
|
3260
3260
|
const copyStaticAssets = async (dir) => {
|
|
3261
3261
|
const base = templateDir();
|
|
3262
3262
|
await cp(path.resolve(base, "tsconfig.json"), path.resolve(dir, "tsconfig.json"));
|
|
3263
|
-
await cp(path.resolve(base, "
|
|
3263
|
+
await cp(path.resolve(base, "gitignore"), path.resolve(dir, ".gitignore"));
|
|
3264
3264
|
};
|
|
3265
3265
|
const generateConfig = async (dir, version) => {
|
|
3266
3266
|
await writeFile(path.resolve(dir, "studio.config.ts"), getConfigTemplate(version));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdout-design/cli",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "stdout-design CLI — shallow front door to @stdout-design/core and @stdout-design/dev-server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"studio": "./dist/index.mjs"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
|
-
"dist"
|
|
29
|
+
"dist",
|
|
30
|
+
"template"
|
|
30
31
|
],
|
|
31
32
|
"type": "module",
|
|
32
33
|
"exports": {
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
},
|
|
57
58
|
"dependencies": {
|
|
58
59
|
"@clack/prompts": "^1.7.0",
|
|
59
|
-
"@stdout-design/core": "^0.
|
|
60
|
+
"@stdout-design/core": "^0.2.0",
|
|
60
61
|
"commander": "^15.0.0",
|
|
61
62
|
"package-manager-detector": "^1.8.0"
|
|
62
63
|
},
|
|
@@ -66,8 +67,8 @@
|
|
|
66
67
|
"typescript": "^7.0.2"
|
|
67
68
|
},
|
|
68
69
|
"peerDependencies": {
|
|
69
|
-
"@stdout-design/dev-server": "^0.
|
|
70
|
-
"@stdout-design/web-ui": "^0.
|
|
70
|
+
"@stdout-design/dev-server": "^0.2.0",
|
|
71
|
+
"@stdout-design/web-ui": "^0.2.0"
|
|
71
72
|
},
|
|
72
73
|
"peerDependenciesMeta": {
|
|
73
74
|
"@stdout-design/dev-server": {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineSchema } from "@stdout-design/core/schema";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
export const templateId = "bento-feature" as const;
|
|
5
|
+
|
|
6
|
+
export const propsSchema = defineSchema(
|
|
7
|
+
z.object({
|
|
8
|
+
accentColor: z
|
|
9
|
+
.string()
|
|
10
|
+
.default("#6366f1")
|
|
11
|
+
.describe("The primary accent color used for borders and highlights"),
|
|
12
|
+
background: z
|
|
13
|
+
.string()
|
|
14
|
+
.default("#0a0a0b")
|
|
15
|
+
.describe("Background color of the card"),
|
|
16
|
+
description: z
|
|
17
|
+
.string()
|
|
18
|
+
.default("A beautiful description goes here.")
|
|
19
|
+
.describe("Supporting description text"),
|
|
20
|
+
headline: z
|
|
21
|
+
.string()
|
|
22
|
+
.min(1)
|
|
23
|
+
.default("Featured App")
|
|
24
|
+
.describe("Main headline for the feature card"),
|
|
25
|
+
locale: z
|
|
26
|
+
.string()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe("Current locale code for RTL support"),
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export type Props = z.infer<typeof propsSchema>;
|
|
33
|
+
|
|
34
|
+
export default function BentoFeature({
|
|
35
|
+
headline,
|
|
36
|
+
description,
|
|
37
|
+
accentColor,
|
|
38
|
+
background,
|
|
39
|
+
locale,
|
|
40
|
+
}: Props) {
|
|
41
|
+
const isRtl = locale?.startsWith("ar") ?? false;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div
|
|
45
|
+
lang={isRtl ? "ar" : undefined}
|
|
46
|
+
dir={isRtl ? "rtl" : "ltr"}
|
|
47
|
+
tw="flex w-full h-full p-8"
|
|
48
|
+
style={{
|
|
49
|
+
backgroundColor: background,
|
|
50
|
+
color: "#ffffff",
|
|
51
|
+
fontFamily: "system-ui, sans-serif",
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<div
|
|
55
|
+
tw="flex flex-col justify-center items-center w-full h-full rounded-[32px] border-2 p-12"
|
|
56
|
+
style={{ backgroundColor: `${background}80`, borderColor: accentColor }}
|
|
57
|
+
>
|
|
58
|
+
<div
|
|
59
|
+
tw="flex items-center justify-center w-16 h-16 rounded-full mb-6"
|
|
60
|
+
style={{ backgroundColor: accentColor }}
|
|
61
|
+
>
|
|
62
|
+
<span tw="text-3xl text-white">✦</span>
|
|
63
|
+
</div>
|
|
64
|
+
<h2
|
|
65
|
+
tw="text-4xl font-bold tracking-tight text-center mb-2"
|
|
66
|
+
style={{ color: "#ffffff" }}
|
|
67
|
+
>
|
|
68
|
+
{headline}
|
|
69
|
+
</h2>
|
|
70
|
+
{description ? (
|
|
71
|
+
<p tw="text-xl text-center max-w-md" style={{ color: "#a1a1aa" }}>
|
|
72
|
+
{description}
|
|
73
|
+
</p>
|
|
74
|
+
) : null}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|