@onexapis/cli 1.1.17 → 1.1.18
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 +82 -16
- package/dist/cli.js +522 -286
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +519 -283
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +47 -270
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -270
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/default/.env.example +1 -1
- package/templates/default/.mcp.json +8 -0
- package/templates/default/CLAUDE.md +941 -0
- package/templates/default/bundle-entry.ts +18 -0
- package/templates/default/index.ts +26 -0
- package/templates/default/package.json +37 -0
- package/templates/default/pages/about.ts +66 -0
- package/templates/default/pages/home.ts +93 -0
- package/templates/default/pages/showcase.ts +146 -0
- package/templates/default/sections/about/about-default.tsx +237 -0
- package/templates/default/sections/about/about.schema.ts +259 -0
- package/templates/default/sections/about/index.ts +15 -0
- package/templates/default/sections/cta/cta-default.tsx +180 -0
- package/templates/default/sections/cta/cta.schema.ts +210 -0
- package/templates/default/sections/cta/index.ts +11 -0
- package/templates/default/sections/features/features-default.tsx +154 -0
- package/templates/default/sections/features/features.schema.ts +330 -0
- package/templates/default/sections/features/index.ts +11 -0
- package/templates/default/sections/gallery/gallery-default.tsx +134 -0
- package/templates/default/sections/gallery/gallery.schema.ts +397 -0
- package/templates/default/sections/gallery/index.ts +11 -0
- package/templates/default/sections/hero/hero-default.tsx +212 -0
- package/templates/default/sections/hero/hero.schema.ts +273 -0
- package/templates/default/sections/hero/index.ts +15 -0
- package/templates/default/sections/stats/index.ts +11 -0
- package/templates/default/sections/stats/stats-default.tsx +103 -0
- package/templates/default/sections/stats/stats.schema.ts +266 -0
- package/templates/default/sections/testimonials/index.ts +11 -0
- package/templates/default/sections/testimonials/testimonials-default.tsx +130 -0
- package/templates/default/sections/testimonials/testimonials.schema.ts +371 -0
- package/templates/default/sections-registry.ts +32 -0
- package/templates/default/theme.config.ts +107 -0
- package/templates/default/theme.layout.ts +21 -0
- package/templates/default/tsconfig.json +16 -7
- package/templates/default/README.md.ejs +0 -129
- package/templates/default/esbuild.config.js +0 -81
- package/templates/default/package.json.ejs +0 -31
- package/templates/default/src/config.ts.ejs +0 -98
- package/templates/default/src/index.ts.ejs +0 -11
- package/templates/default/src/layout.ts +0 -23
- package/templates/default/src/manifest.ts.ejs +0 -47
- package/templates/default/src/pages/home.ts.ejs +0 -37
- package/templates/default/src/sections/footer/footer-default.tsx +0 -28
- package/templates/default/src/sections/footer/footer.schema.ts +0 -45
- package/templates/default/src/sections/footer/index.ts +0 -2
- package/templates/default/src/sections/header/header-default.tsx +0 -61
- package/templates/default/src/sections/header/header.schema.ts +0 -46
- package/templates/default/src/sections/header/index.ts +0 -2
- package/templates/default/src/sections/hero/hero-default.tsx +0 -52
- package/templates/default/src/sections/hero/hero.schema.ts +0 -52
- package/templates/default/src/sections/hero/index.ts +0 -2
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { SectionComponentProps } from "@onexapis/core";
|
|
3
|
-
|
|
4
|
-
export function HeroDefault({ section, isEditing }: SectionComponentProps) {
|
|
5
|
-
const { settings } = section;
|
|
6
|
-
|
|
7
|
-
// Get settings with defaults
|
|
8
|
-
const title = (settings.title as string) || "Welcome to OneX";
|
|
9
|
-
const subtitle =
|
|
10
|
-
(settings.subtitle as string) || "Build amazing websites with themes";
|
|
11
|
-
const backgroundColor = (settings.backgroundColor as string) || "#3b82f6";
|
|
12
|
-
const textColor = (settings.textColor as string) || "#ffffff";
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<section
|
|
16
|
-
style={{
|
|
17
|
-
backgroundColor,
|
|
18
|
-
color: textColor,
|
|
19
|
-
minHeight: "500px",
|
|
20
|
-
display: "flex",
|
|
21
|
-
alignItems: "center",
|
|
22
|
-
justifyContent: "center",
|
|
23
|
-
padding: "4rem 2rem",
|
|
24
|
-
}}
|
|
25
|
-
data-section-id={section.id}
|
|
26
|
-
data-editable={isEditing}
|
|
27
|
-
>
|
|
28
|
-
<div style={{ maxWidth: "800px", textAlign: "center" }}>
|
|
29
|
-
<h1
|
|
30
|
-
style={{
|
|
31
|
-
fontSize: "3rem",
|
|
32
|
-
fontWeight: "bold",
|
|
33
|
-
marginBottom: "1rem",
|
|
34
|
-
}}
|
|
35
|
-
data-editable-field="title"
|
|
36
|
-
>
|
|
37
|
-
{title}
|
|
38
|
-
</h1>
|
|
39
|
-
|
|
40
|
-
<p
|
|
41
|
-
style={{
|
|
42
|
-
fontSize: "1.25rem",
|
|
43
|
-
opacity: 0.9,
|
|
44
|
-
}}
|
|
45
|
-
data-editable-field="subtitle"
|
|
46
|
-
>
|
|
47
|
-
{subtitle}
|
|
48
|
-
</p>
|
|
49
|
-
</div>
|
|
50
|
-
</section>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { SectionSchema } from "@onexapis/core";
|
|
2
|
-
import { HeroDefault } from "./hero-default";
|
|
3
|
-
|
|
4
|
-
export const heroSchema: SectionSchema = {
|
|
5
|
-
id: "hero",
|
|
6
|
-
name: "Hero Section",
|
|
7
|
-
description: "A hero section with title and subtitle",
|
|
8
|
-
icon: "layout",
|
|
9
|
-
category: "marketing",
|
|
10
|
-
|
|
11
|
-
// Available templates
|
|
12
|
-
templates: {
|
|
13
|
-
default: {
|
|
14
|
-
name: "Default Hero",
|
|
15
|
-
component: HeroDefault,
|
|
16
|
-
preview: undefined,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
// Section settings schema
|
|
21
|
-
settingsSchema: {
|
|
22
|
-
title: {
|
|
23
|
-
type: "text",
|
|
24
|
-
label: "Title",
|
|
25
|
-
default: "Welcome to OneX",
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
subtitle: {
|
|
29
|
-
type: "textarea",
|
|
30
|
-
label: "Subtitle",
|
|
31
|
-
default: "Build amazing websites with themes",
|
|
32
|
-
},
|
|
33
|
-
backgroundColor: {
|
|
34
|
-
type: "color",
|
|
35
|
-
label: "Background Color",
|
|
36
|
-
default: "#3b82f6",
|
|
37
|
-
},
|
|
38
|
-
textColor: {
|
|
39
|
-
type: "color",
|
|
40
|
-
label: "Text Color",
|
|
41
|
-
default: "#ffffff",
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
// Default settings
|
|
46
|
-
defaultSettings: {
|
|
47
|
-
title: "Welcome to OneX",
|
|
48
|
-
subtitle: "Build amazing websites with themes",
|
|
49
|
-
backgroundColor: "#3b82f6",
|
|
50
|
-
textColor: "#ffffff",
|
|
51
|
-
},
|
|
52
|
-
};
|