@onexapis/cli 1.1.38 → 1.1.39

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.
Files changed (60) hide show
  1. package/dist/cli.js +384 -380
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cli.mjs +381 -376
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/index.js +258 -293
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +255 -289
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/preview/preview-app.tsx +13 -5
  10. package/package.json +1 -3
  11. package/templates/default/AUTH_AND_PROFILE.md +167 -0
  12. package/templates/default/CLAUDE.md +334 -1
  13. package/templates/default/LAYOUT.md +195 -0
  14. package/templates/default/bundle-entry.ts +5 -0
  15. package/templates/default/esbuild.config.js +20 -0
  16. package/templates/default/hooks/index.ts +26 -0
  17. package/templates/default/hooks/use-forgot-password-form.ts +90 -0
  18. package/templates/default/hooks/use-login-form.ts +102 -0
  19. package/templates/default/hooks/use-profile-form.ts +255 -0
  20. package/templates/default/hooks/use-register-form.ts +154 -0
  21. package/templates/default/hooks/use-verify-code-form.ts +224 -0
  22. package/templates/default/index.ts +21 -1
  23. package/templates/default/pages/about.ts +2 -2
  24. package/templates/default/pages/forgot-password.ts +39 -0
  25. package/templates/default/pages/home.ts +4 -4
  26. package/templates/default/pages/login.ts +39 -0
  27. package/templates/default/pages/profile.ts +39 -0
  28. package/templates/default/pages/register.ts +39 -0
  29. package/templates/default/pages/showcase.ts +7 -7
  30. package/templates/default/pages/verify-code.ts +39 -0
  31. package/templates/default/sections/about/about.schema.ts +1 -1
  32. package/templates/default/sections/auth-forgot-password/auth-forgot-password-default.tsx +192 -0
  33. package/templates/default/sections/auth-forgot-password/auth-forgot-password.schema.ts +150 -0
  34. package/templates/default/sections/auth-forgot-password/index.ts +14 -0
  35. package/templates/default/sections/auth-login/auth-login-default.tsx +238 -0
  36. package/templates/default/sections/auth-login/auth-login.schema.ts +171 -0
  37. package/templates/default/sections/auth-login/index.ts +14 -0
  38. package/templates/default/sections/auth-register/auth-register-default.tsx +327 -0
  39. package/templates/default/sections/auth-register/auth-register.schema.ts +188 -0
  40. package/templates/default/sections/auth-register/index.ts +14 -0
  41. package/templates/default/sections/auth-verify-code/auth-verify-code-default.tsx +209 -0
  42. package/templates/default/sections/auth-verify-code/auth-verify-code.schema.ts +150 -0
  43. package/templates/default/sections/auth-verify-code/index.ts +14 -0
  44. package/templates/default/sections/cta/cta.schema.ts +1 -1
  45. package/templates/default/sections/features/features.schema.ts +1 -1
  46. package/templates/default/sections/footer/footer-default.tsx +214 -0
  47. package/templates/default/sections/footer/footer.schema.ts +170 -0
  48. package/templates/default/sections/footer/index.ts +14 -0
  49. package/templates/default/sections/gallery/gallery.schema.ts +1 -1
  50. package/templates/default/sections/header/header-default.tsx +322 -0
  51. package/templates/default/sections/header/header.schema.ts +168 -0
  52. package/templates/default/sections/header/index.ts +14 -0
  53. package/templates/default/sections/hero/hero.schema.ts +1 -1
  54. package/templates/default/sections/profile/index.ts +14 -0
  55. package/templates/default/sections/profile/profile-default.tsx +522 -0
  56. package/templates/default/sections/profile/profile.schema.ts +228 -0
  57. package/templates/default/sections/stats/stats.schema.ts +1 -1
  58. package/templates/default/sections/testimonials/testimonials.schema.ts +1 -1
  59. package/templates/default/sections-registry.ts +28 -0
  60. package/templates/default/theme.layout.ts +71 -2
@@ -0,0 +1,228 @@
1
+ /**
2
+ * Profile Section Schema
3
+ * User profile form with editable labels
4
+ */
5
+
6
+ import type { SectionSchema, FieldDefinition } from "@onexapis/core/types";
7
+
8
+ const commonSettings: FieldDefinition[] = [
9
+ {
10
+ id: "heading",
11
+ type: "text",
12
+ label: "Heading",
13
+ default: "My Profile",
14
+ required: true,
15
+ },
16
+ {
17
+ id: "nameLabel",
18
+ type: "text",
19
+ label: "Name Label",
20
+ default: "Full Name",
21
+ },
22
+ {
23
+ id: "namePlaceholder",
24
+ type: "text",
25
+ label: "Name Placeholder",
26
+ default: "Enter your full name",
27
+ },
28
+ {
29
+ id: "emailLabel",
30
+ type: "text",
31
+ label: "Email Label",
32
+ default: "Email",
33
+ },
34
+ {
35
+ id: "phoneLabel",
36
+ type: "text",
37
+ label: "Phone Label",
38
+ default: "Phone Number",
39
+ },
40
+ {
41
+ id: "phonePlaceholder",
42
+ type: "text",
43
+ label: "Phone Placeholder",
44
+ default: "Enter your phone number",
45
+ },
46
+ {
47
+ id: "addressLabel",
48
+ type: "text",
49
+ label: "Address Label",
50
+ default: "Address",
51
+ },
52
+ {
53
+ id: "addressPlaceholder",
54
+ type: "text",
55
+ label: "Address Placeholder",
56
+ default: "Enter your address",
57
+ },
58
+ {
59
+ id: "updateButtonText",
60
+ type: "text",
61
+ label: "Update Button Text",
62
+ default: "Update Profile",
63
+ },
64
+ {
65
+ id: "updatingText",
66
+ type: "text",
67
+ label: "Updating Text",
68
+ default: "Updating...",
69
+ },
70
+ {
71
+ id: "changePasswordText",
72
+ type: "text",
73
+ label: "Change Password Link Text",
74
+ default: "Change Password",
75
+ },
76
+ {
77
+ id: "currentPasswordLabel",
78
+ type: "text",
79
+ label: "Current Password Label",
80
+ default: "Current Password",
81
+ },
82
+ {
83
+ id: "currentPasswordPlaceholder",
84
+ type: "text",
85
+ label: "Current Password Placeholder",
86
+ default: "Enter current password",
87
+ },
88
+ {
89
+ id: "newPasswordLabel",
90
+ type: "text",
91
+ label: "New Password Label",
92
+ default: "New Password",
93
+ },
94
+ {
95
+ id: "newPasswordPlaceholder",
96
+ type: "text",
97
+ label: "New Password Placeholder",
98
+ default: "Enter new password",
99
+ },
100
+ {
101
+ id: "confirmPasswordLabel",
102
+ type: "text",
103
+ label: "Confirm Password Label",
104
+ default: "Confirm New Password",
105
+ },
106
+ {
107
+ id: "confirmPasswordPlaceholder",
108
+ type: "text",
109
+ label: "Confirm Password Placeholder",
110
+ default: "Re-enter new password",
111
+ },
112
+ {
113
+ id: "changePasswordButtonText",
114
+ type: "text",
115
+ label: "Change Password Button Text",
116
+ default: "Change Password",
117
+ },
118
+ {
119
+ id: "changingPasswordText",
120
+ type: "text",
121
+ label: "Changing Password Text",
122
+ default: "Changing...",
123
+ },
124
+ {
125
+ id: "cancelText",
126
+ type: "text",
127
+ label: "Cancel Text",
128
+ default: "Cancel",
129
+ },
130
+ {
131
+ id: "passwordRequirementText",
132
+ type: "text",
133
+ label: "Password Requirement Text",
134
+ default: "At least 8 characters with uppercase, lowercase, and a number",
135
+ },
136
+ {
137
+ id: "logoutText",
138
+ type: "text",
139
+ label: "Logout Text",
140
+ default: "Log out",
141
+ },
142
+ {
143
+ id: "backgroundColor",
144
+ type: "color",
145
+ label: "Background Color",
146
+ default: "#F9FAFB",
147
+ },
148
+ {
149
+ id: "cardBackground",
150
+ type: "color",
151
+ label: "Card Background",
152
+ default: "#FFFFFF",
153
+ },
154
+ {
155
+ id: "primaryColor",
156
+ type: "color",
157
+ label: "Primary Color (buttons)",
158
+ default: "#2563EB",
159
+ },
160
+ {
161
+ id: "textColor",
162
+ type: "color",
163
+ label: "Heading Text Color",
164
+ default: "#111827",
165
+ },
166
+ {
167
+ id: "cardBorderRadius",
168
+ type: "select",
169
+ label: "Card Border Radius",
170
+ default: "2xl",
171
+ options: [
172
+ { label: "Small", value: "lg" },
173
+ { label: "Medium", value: "xl" },
174
+ { label: "Large", value: "2xl" },
175
+ { label: "Extra Large", value: "3xl" },
176
+ ],
177
+ },
178
+ ];
179
+
180
+ export const profileSchema: SectionSchema = {
181
+ type: "profile",
182
+ name: "Profile",
183
+ description: "User profile with form fields and change password",
184
+ category: "content",
185
+ icon: "user",
186
+ settings: commonSettings,
187
+ templates: [
188
+ {
189
+ id: "default",
190
+ name: "Default Profile",
191
+ description: "Profile page with editable fields and password change",
192
+ isDefault: true,
193
+ },
194
+ ],
195
+ defaults: {
196
+ settings: {
197
+ heading: "My Profile",
198
+ nameLabel: "Full Name",
199
+ namePlaceholder: "Enter your full name",
200
+ emailLabel: "Email",
201
+ phoneLabel: "Phone Number",
202
+ phonePlaceholder: "Enter your phone number",
203
+ addressLabel: "Address",
204
+ addressPlaceholder: "Enter your address",
205
+ updateButtonText: "Update Profile",
206
+ updatingText: "Updating...",
207
+ changePasswordText: "Change Password",
208
+ currentPasswordLabel: "Current Password",
209
+ currentPasswordPlaceholder: "Enter current password",
210
+ newPasswordLabel: "New Password",
211
+ newPasswordPlaceholder: "Enter new password",
212
+ confirmPasswordLabel: "Confirm New Password",
213
+ confirmPasswordPlaceholder: "Re-enter new password",
214
+ changePasswordButtonText: "Change Password",
215
+ changingPasswordText: "Changing...",
216
+ cancelText: "Cancel",
217
+ passwordRequirementText:
218
+ "At least 8 characters with uppercase, lowercase, and a number",
219
+ logoutText: "Log out",
220
+ backgroundColor: "#F9FAFB",
221
+ cardBackground: "#FFFFFF",
222
+ primaryColor: "#2563EB",
223
+ textColor: "#111827",
224
+ cardBorderRadius: "2xl",
225
+ },
226
+ },
227
+ tags: ["profile", "account", "user"],
228
+ };
@@ -27,7 +27,7 @@ const commonSettings: FieldDefinition[] = [
27
27
  ];
28
28
 
29
29
  export const statsSchema: SectionSchema = {
30
- type: "my-simple-stats",
30
+ type: "stats",
31
31
  name: "Simple Stats",
32
32
  description: "Statistics section with large numbers and labels",
33
33
  category: "content",
@@ -33,7 +33,7 @@ const commonSettings: FieldDefinition[] = [
33
33
  ];
34
34
 
35
35
  export const testimonialsSchema: SectionSchema = {
36
- type: "my-simple-testimonials",
36
+ type: "testimonials",
37
37
  name: "Simple Testimonials",
38
38
  description:
39
39
  "Testimonial cards with quote, rating, name, role, and avatar blocks",
@@ -3,6 +3,14 @@
3
3
  * Auto-discovery entry point for all sections
4
4
  */
5
5
 
6
+ // Header (layout)
7
+ export { default as HeaderDefault } from "./sections/header/header-default";
8
+ export { headerSchema } from "./sections/header/header.schema";
9
+
10
+ // Footer (layout)
11
+ export { default as FooterDefault } from "./sections/footer/footer-default";
12
+ export { footerSchema } from "./sections/footer/footer.schema";
13
+
6
14
  // Hero
7
15
  export { default as HeroDefault } from "./sections/hero/hero-default";
8
16
  export { heroSchema } from "./sections/hero/hero.schema";
@@ -30,3 +38,23 @@ export { ctaSchema } from "./sections/cta/cta.schema";
30
38
  // Stats (block-based)
31
39
  export { default as StatsDefault } from "./sections/stats/stats-default";
32
40
  export { statsSchema } from "./sections/stats/stats.schema";
41
+
42
+ // Auth Login
43
+ export { default as AuthLoginDefault } from "./sections/auth-login/auth-login-default";
44
+ export { authLoginSchema } from "./sections/auth-login/auth-login.schema";
45
+
46
+ // Auth Register
47
+ export { default as AuthRegisterDefault } from "./sections/auth-register/auth-register-default";
48
+ export { authRegisterSchema } from "./sections/auth-register/auth-register.schema";
49
+
50
+ // Auth Forgot Password
51
+ export { default as AuthForgotPasswordDefault } from "./sections/auth-forgot-password/auth-forgot-password-default";
52
+ export { authForgotPasswordSchema } from "./sections/auth-forgot-password/auth-forgot-password.schema";
53
+
54
+ // Auth Verify Code
55
+ export { default as AuthVerifyCodeDefault } from "./sections/auth-verify-code/auth-verify-code-default";
56
+ export { authVerifyCodeSchema } from "./sections/auth-verify-code/auth-verify-code.schema";
57
+
58
+ // Profile
59
+ export { default as ProfileDefault } from "./sections/profile/profile-default";
60
+ export { profileSchema } from "./sections/profile/profile.schema";
@@ -9,8 +9,77 @@ export const simpleLayoutConfig: ThemeLayoutConfig = {
9
9
  id: "my-simple",
10
10
  name: "My My Simple Theme",
11
11
  version: "1.0.0",
12
- headerSections: [],
13
- footerSections: [],
12
+ headerSections: [
13
+ {
14
+ id: "global-header-1",
15
+ type: "my-simple-header",
16
+ template: "default",
17
+ order: 0,
18
+ enabled: true,
19
+ settings: {
20
+ logoText: "My Site",
21
+ sticky: true,
22
+ autoHide: true,
23
+ scrollThreshold: 10,
24
+ showShadowOnScroll: true,
25
+ transparentOnTop: false,
26
+ headerHeight: "16",
27
+ navigationItems: JSON.stringify([
28
+ { label: "Home", href: "/" },
29
+ { label: "About", href: "/about" },
30
+ { label: "Showcase", href: "/showcase" },
31
+ ]),
32
+ ctaText: "Contact",
33
+ ctaLink: "#contact",
34
+ backgroundColor: "#FFFFFF",
35
+ textColor: "#111827",
36
+ primaryColor: "#2563EB",
37
+ },
38
+ components: [],
39
+ blocks: [],
40
+ },
41
+ ],
42
+ footerSections: [
43
+ {
44
+ id: "global-footer-1",
45
+ type: "my-simple-footer",
46
+ template: "default",
47
+ order: 0,
48
+ enabled: true,
49
+ settings: {
50
+ companyName: "My Site",
51
+ description: "A clean and minimal theme for your website.",
52
+ showAboutColumn: true,
53
+ aboutColumnTitle: "About",
54
+ showLinksColumn: true,
55
+ linksColumnTitle: "Quick Links",
56
+ copyrightText: "My Site. All rights reserved.",
57
+ backgroundColor: "#111827",
58
+ textColor: "#9CA3AF",
59
+ primaryColor: "#FFFFFF",
60
+ },
61
+ components: [],
62
+ blocks: [],
63
+ },
64
+ ],
65
+ designSystem: {
66
+ colors: {
67
+ primaryColor: "#3B82F6",
68
+ secondaryColor: "#8B5CF6",
69
+ colorMode: "light",
70
+ },
71
+ typography: {
72
+ headingFont: "system-ui, sans-serif",
73
+ bodyFont: "system-ui, sans-serif",
74
+ },
75
+ layout: {
76
+ spacing: "comfortable",
77
+ },
78
+ pageBackground: {
79
+ type: "solid",
80
+ color: "#FFFFFF",
81
+ },
82
+ },
14
83
  globalSettings: {
15
84
  primaryColor: "#3B82F6",
16
85
  secondaryColor: "#8B5CF6",