@camox/cli 0.11.0 → 0.12.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/package.json +7 -2
- package/template/package.json +1 -0
- package/template/src/camox/blocks/faq.tsx +63 -0
- package/template/src/camox/blocks/footer.tsx +7 -9
- package/template/src/camox/blocks/navbar.tsx +7 -9
- package/template/src/camox/blocks/statistics.tsx +7 -9
- package/template/src/styles.css +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camox/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"bin": {
|
|
5
5
|
"camox": "./dist/index.mjs"
|
|
6
6
|
},
|
|
@@ -26,7 +26,12 @@
|
|
|
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.
|
|
29
|
+
"@camox/api-contract": "0.12.1"
|
|
30
|
+
},
|
|
31
|
+
"nx": {
|
|
32
|
+
"tags": [
|
|
33
|
+
"type:pkg"
|
|
34
|
+
]
|
|
30
35
|
},
|
|
31
36
|
"scripts": {
|
|
32
37
|
"build": "tsdown",
|
package/template/package.json
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Type, createBlock } from "camox/createBlock";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Accordion,
|
|
5
|
+
AccordionContent,
|
|
6
|
+
AccordionItem,
|
|
7
|
+
AccordionTrigger,
|
|
8
|
+
} from "@/components/ui/accordion";
|
|
9
|
+
|
|
10
|
+
const faq = createBlock({
|
|
11
|
+
id: "faq",
|
|
12
|
+
title: "FAQ",
|
|
13
|
+
description:
|
|
14
|
+
"Use this block to answer common questions about the product, pricing, or company. Place it near the bottom of a page to address objections before a conversion section.",
|
|
15
|
+
content: {
|
|
16
|
+
items: Type.RepeatableItem({
|
|
17
|
+
content: {
|
|
18
|
+
question: Type.String({
|
|
19
|
+
default: "What is your refund policy?",
|
|
20
|
+
title: "Question",
|
|
21
|
+
}),
|
|
22
|
+
answer: Type.String({
|
|
23
|
+
default:
|
|
24
|
+
"We offer a 30-day money-back guarantee. If you're not satisfied, contact support and we'll process your refund right away.",
|
|
25
|
+
title: "Answer",
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
minItems: 3,
|
|
29
|
+
maxItems: Infinity,
|
|
30
|
+
title: "Questions",
|
|
31
|
+
toMarkdown: (c) => [`Q: ${c.question}`, `A: ${c.answer}`],
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
component: FaqComponent,
|
|
35
|
+
toMarkdown: (c) => [c.items],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
function FaqComponent() {
|
|
39
|
+
return (
|
|
40
|
+
<section className="py-24">
|
|
41
|
+
<div className="mx-auto max-w-2xl px-4">
|
|
42
|
+
<Accordion>
|
|
43
|
+
<faq.Repeater name="items">
|
|
44
|
+
{(item, index) => (
|
|
45
|
+
<AccordionItem value={index}>
|
|
46
|
+
<AccordionTrigger className="items-center text-lg">
|
|
47
|
+
<item.Field name="question">{(props) => <span {...props} />}</item.Field>
|
|
48
|
+
</AccordionTrigger>
|
|
49
|
+
<AccordionContent>
|
|
50
|
+
<item.Field name="answer">
|
|
51
|
+
{(props) => <p {...props} className="text-muted-foreground text-base" />}
|
|
52
|
+
</item.Field>
|
|
53
|
+
</AccordionContent>
|
|
54
|
+
</AccordionItem>
|
|
55
|
+
)}
|
|
56
|
+
</faq.Repeater>
|
|
57
|
+
</Accordion>
|
|
58
|
+
</div>
|
|
59
|
+
</section>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { faq as block };
|
|
@@ -8,20 +8,18 @@ const footer = createBlock({
|
|
|
8
8
|
description: "A footer at the bottom of a page with a site name and navigation links.",
|
|
9
9
|
content: {
|
|
10
10
|
title: Type.String({ default: "{{projectName}}" }),
|
|
11
|
-
links: Type.RepeatableItem(
|
|
12
|
-
{
|
|
11
|
+
links: Type.RepeatableItem({
|
|
12
|
+
content: {
|
|
13
13
|
link: Type.Link({
|
|
14
14
|
default: { text: "Link", href: "#", newTab: false },
|
|
15
15
|
title: "Link",
|
|
16
16
|
}),
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
),
|
|
18
|
+
minItems: 1,
|
|
19
|
+
maxItems: 12,
|
|
20
|
+
title: "Links",
|
|
21
|
+
toMarkdown: (c) => [c.link],
|
|
22
|
+
}),
|
|
25
23
|
},
|
|
26
24
|
component: FooterComponent,
|
|
27
25
|
toMarkdown: (c) => [c.title, c.links],
|
|
@@ -18,20 +18,18 @@ const navbar = createBlock({
|
|
|
18
18
|
newTab: false,
|
|
19
19
|
},
|
|
20
20
|
}),
|
|
21
|
-
links: Type.RepeatableItem(
|
|
22
|
-
{
|
|
21
|
+
links: Type.RepeatableItem({
|
|
22
|
+
content: {
|
|
23
23
|
link: Type.Link({
|
|
24
24
|
default: { text: "Link", href: "#", newTab: false },
|
|
25
25
|
title: "Link",
|
|
26
26
|
}),
|
|
27
27
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
),
|
|
28
|
+
minItems: 1,
|
|
29
|
+
maxItems: 6,
|
|
30
|
+
title: "Links",
|
|
31
|
+
toMarkdown: (c) => [c.link],
|
|
32
|
+
}),
|
|
35
33
|
cta: Type.Link({
|
|
36
34
|
default: { text: "Get Started", href: "#", newTab: false },
|
|
37
35
|
title: "CTA",
|
|
@@ -20,8 +20,8 @@ const statistics = createBlock({
|
|
|
20
20
|
"Our platform empowers teams to build and ship faster. Here are some numbers we're proud of.",
|
|
21
21
|
title: "Description",
|
|
22
22
|
}),
|
|
23
|
-
statistics: Type.RepeatableItem(
|
|
24
|
-
{
|
|
23
|
+
statistics: Type.RepeatableItem({
|
|
24
|
+
content: {
|
|
25
25
|
number: Type.String({
|
|
26
26
|
default: "100+",
|
|
27
27
|
maxLength: 7,
|
|
@@ -32,13 +32,11 @@ const statistics = createBlock({
|
|
|
32
32
|
title: "Label",
|
|
33
33
|
}),
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
),
|
|
35
|
+
minItems: 3,
|
|
36
|
+
maxItems: 8,
|
|
37
|
+
title: "Statistics",
|
|
38
|
+
toMarkdown: (c) => [`**${c.number}** — ${c.label}`],
|
|
39
|
+
}),
|
|
42
40
|
},
|
|
43
41
|
component: StatisticsComponent,
|
|
44
42
|
toMarkdown: (c) => [`## ${c.subtitle}`, c.description, c.statistics],
|