@stdout-design/cli 0.1.8 → 0.2.0

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/README.md CHANGED
@@ -21,13 +21,13 @@ A CLI for rendering your own TSX components into pixel-perfect social and market
21
21
  bun add -d @stdout-design/cli
22
22
 
23
23
  # Scaffold a project
24
- npx studio init
24
+ npx @stdout-design/cli init
25
25
 
26
26
  # Render an image
27
- npx studio render bento-feature --title "Hello" --out hello.png
27
+ npx @stdout-design/cli render bento-feature --title "Hello" --out hello.png
28
28
 
29
29
  # Or open the live studio
30
- npx studio dev
30
+ npx @stdout-design/cli dev
31
31
  ```
32
32
 
33
33
  ## Installation
@@ -55,6 +55,8 @@ bun add -g @stdout-design/cli
55
55
  | `studio cache clean` | Clear the render cache |
56
56
  | `studio lint` | Check templates for compatibility |
57
57
 
58
+ Run commands with `npx @stdout-design/cli <command>`, or install globally with `bun add -g @stdout-design/cli` to use `studio <command>` directly.
59
+
58
60
  ### studio render
59
61
 
60
62
  ```bash
package/dist/index.mjs CHANGED
@@ -3255,8 +3255,8 @@ const getPkgJson = (name, version) => ({
3255
3255
  },
3256
3256
  type: "module"
3257
3257
  });
3258
- const templateDir = () => path.resolve(import.meta.dirname, "../../../template");
3259
- const templatesDir = () => path.resolve(import.meta.dirname, "../../../template/templates");
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"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdout-design/cli",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
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.1.2",
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.1.7",
70
- "@stdout-design/web-ui": "^0.1.7"
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
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "jsx": "react-jsx",
4
+ "module": "esnext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "target": "esnext"
8
+ }
9
+ }