@camox/cli 0.10.1 → 0.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camox/cli",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "bin": {
5
5
  "camox": "./dist/index.mjs"
6
6
  },
@@ -26,7 +26,7 @@
26
26
  "@typescript/native-preview": "7.0.0-dev.20260412.1",
27
27
  "oxlint": "^0.15.0",
28
28
  "tsdown": "^0.21.8",
29
- "@camox/api-contract": "0.10.1"
29
+ "@camox/api-contract": "0.11.0"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsdown",
@@ -6,7 +6,6 @@ const footer = createBlock({
6
6
  title: "Footer",
7
7
  layoutOnly: true,
8
8
  description: "A footer at the bottom of a page with a site name and navigation links.",
9
- toMarkdown: ["{{title}}", "{{links}}"],
10
9
  content: {
11
10
  title: Type.String({ default: "{{projectName}}" }),
12
11
  links: Type.RepeatableItem(
@@ -20,11 +19,12 @@ const footer = createBlock({
20
19
  minItems: 1,
21
20
  maxItems: 12,
22
21
  title: "Links",
23
- toMarkdown: ["{{link}}"],
22
+ toMarkdown: (c) => [c.link],
24
23
  },
25
24
  ),
26
25
  },
27
26
  component: FooterComponent,
27
+ toMarkdown: (c) => [c.title, c.links],
28
28
  });
29
29
 
30
30
  function FooterComponent() {
@@ -8,7 +8,6 @@ const hero = createBlock({
8
8
  title: "Hero",
9
9
  description:
10
10
  "Use this block as the main landing section at the top of a page. It should capture attention immediately with a clear value proposition.",
11
- toMarkdown: ["# {{title}}", "{{description}}", "{{cta}}"],
12
11
  content: {
13
12
  title: Type.String({
14
13
  default: "Welcome to {{projectName}}",
@@ -25,6 +24,7 @@ const hero = createBlock({
25
24
  }),
26
25
  },
27
26
  component: HeroComponent,
27
+ toMarkdown: (c) => [`# ${c.title}`, c.description, c.cta],
28
28
  });
29
29
 
30
30
  function HeroComponent() {
@@ -9,7 +9,6 @@ const navbar = createBlock({
9
9
  layoutOnly: true,
10
10
  description:
11
11
  "A navigation bar at the top of a page with a brand name, navigation links, and a call-to-action link.",
12
- toMarkdown: ["{{title}}", "{{links}}", "{{cta}}"],
13
12
  content: {
14
13
  title: Type.Link({
15
14
  title: "Site name",
@@ -30,7 +29,7 @@ const navbar = createBlock({
30
29
  minItems: 1,
31
30
  maxItems: 6,
32
31
  title: "Links",
33
- toMarkdown: ["{{link}}"],
32
+ toMarkdown: (c) => [c.link],
34
33
  },
35
34
  ),
36
35
  cta: Type.Link({
@@ -39,6 +38,7 @@ const navbar = createBlock({
39
38
  }),
40
39
  },
41
40
  component: NavbarComponent,
41
+ toMarkdown: (c) => [c.title, c.links, c.cta],
42
42
  });
43
43
 
44
44
  function NavbarComponent() {
@@ -5,7 +5,6 @@ const statistics = createBlock({
5
5
  title: "Statistics",
6
6
  description:
7
7
  "Showcase key metrics, achievements, or performance indicators. Ideal for displaying platform statistics or company milestones.",
8
- toMarkdown: ["## {{subtitle}}", "{{description}}", "{{statistics}}"],
9
8
  content: {
10
9
  title: Type.String({
11
10
  default: "By the numbers",
@@ -37,11 +36,12 @@ const statistics = createBlock({
37
36
  minItems: 3,
38
37
  maxItems: 8,
39
38
  title: "Statistics",
40
- toMarkdown: ["**{{number}}** — {{label}}"],
39
+ toMarkdown: (c) => [`**${c.number}** — ${c.label}`],
41
40
  },
42
41
  ),
43
42
  },
44
43
  component: StatisticsComponent,
44
+ toMarkdown: (c) => [`## ${c.subtitle}`, c.description, c.statistics],
45
45
  });
46
46
 
47
47
  function StatisticsComponent() {
@@ -5,7 +5,6 @@ const testimonial = createBlock({
5
5
  title: "Testimonial",
6
6
  description:
7
7
  "Display a customer testimonial or user review. Ideal for building trust and social proof.",
8
- toMarkdown: ["> {{quote}}", "— {{author}}, {{title}}, {{company}}"],
9
8
  content: {
10
9
  quote: Type.String({
11
10
  default:
@@ -17,6 +16,7 @@ const testimonial = createBlock({
17
16
  company: Type.String({ default: "TechCorp", title: "Company" }),
18
17
  },
19
18
  component: TestimonialComponent,
19
+ toMarkdown: (c) => [`> ${c.quote}`, `— ${c.author}, ${c.title}, ${c.company}`],
20
20
  });
21
21
 
22
22
  function TestimonialComponent() {