@pradip1995/framework-compiler 0.2.0 → 0.2.2
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/bin/storefront-build.js
CHANGED
|
@@ -13,21 +13,7 @@ const require = createRequire(import.meta.url)
|
|
|
13
13
|
const clientDir = resolve(process.cwd())
|
|
14
14
|
const outDir = join(clientDir, ".generated-app")
|
|
15
15
|
|
|
16
|
-
function loadClientTheme(clientDir) {
|
|
17
|
-
return loadClientStorefrontConfig(clientDir).theme
|
|
18
|
-
}
|
|
19
|
-
|
|
20
16
|
function loadClientStorefrontConfig(clientDir) {
|
|
21
|
-
const envPath = join(clientDir, ".env.local")
|
|
22
|
-
let envTheme = "valero"
|
|
23
|
-
if (existsSync(envPath)) {
|
|
24
|
-
const text = readFileSync(envPath, "utf8")
|
|
25
|
-
const match = text.match(/NEXT_PUBLIC_STOREFRONT_THEME=(.+)/)
|
|
26
|
-
const raw = match?.[1]?.trim().replace(/^["']|["']$/g, "") || "valero"
|
|
27
|
-
const map = { sahsha: "impulse", impulse: "impulse", valero: "valero" }
|
|
28
|
-
envTheme = map[raw] || "valero"
|
|
29
|
-
}
|
|
30
|
-
|
|
31
17
|
let raw = {}
|
|
32
18
|
const jsonPath = join(clientDir, "storefront.config.json")
|
|
33
19
|
const tsPath = join(clientDir, "storefront.config.ts")
|
|
@@ -48,7 +34,6 @@ function loadClientStorefrontConfig(clientDir) {
|
|
|
48
34
|
}
|
|
49
35
|
|
|
50
36
|
return {
|
|
51
|
-
theme: envTheme,
|
|
52
37
|
defaultCountryCode: raw.defaultCountryCode || "in",
|
|
53
38
|
loader,
|
|
54
39
|
}
|
|
@@ -56,7 +41,7 @@ function loadClientStorefrontConfig(clientDir) {
|
|
|
56
41
|
|
|
57
42
|
function generateRootLayout(config) {
|
|
58
43
|
const loaderJson = JSON.stringify(config.loader)
|
|
59
|
-
return `import "@pradip1995/segment-tokens/themes
|
|
44
|
+
return `import "@pradip1995/segment-tokens/themes/impulse.css"
|
|
60
45
|
import "./globals.css"
|
|
61
46
|
import { LoaderProvider, GlobalLoader } from "@pradip1995/segment-loader"
|
|
62
47
|
|
|
@@ -280,6 +265,9 @@ function copyPublicAssets(packages, clientDir, outDir) {
|
|
|
280
265
|
}
|
|
281
266
|
|
|
282
267
|
function resolveDynamicConfigSchemaDir() {
|
|
268
|
+
const bundled = join(__dirname, "..", "dynamic-config-schema")
|
|
269
|
+
if (existsSync(join(bundled, "schemas", "homepage-config.json"))) return bundled
|
|
270
|
+
|
|
283
271
|
const candidates = [
|
|
284
272
|
join(__dirname, "..", "dynamic-config-schema"),
|
|
285
273
|
join(__dirname, "..", "..", "dynamic-config-schema"),
|
|
@@ -332,7 +320,10 @@ function generateDynamicConfigSchema(clientDir, outDir) {
|
|
|
332
320
|
let homepageDefaults = {}
|
|
333
321
|
|
|
334
322
|
if (homepageSchema && schemaDir) {
|
|
335
|
-
const
|
|
323
|
+
const defaultsPath = existsSync(join(schemaDir, "build-defaults.cjs"))
|
|
324
|
+
? join(schemaDir, "build-defaults.cjs")
|
|
325
|
+
: join(schemaDir, "build-defaults.js")
|
|
326
|
+
const { buildHomepageConfigDefaults } = require(defaultsPath)
|
|
336
327
|
homepageDefaults = buildHomepageConfigDefaults(homepageSchema)
|
|
337
328
|
}
|
|
338
329
|
|
|
@@ -445,13 +436,21 @@ function generateRoutePages(pagesConfig, outDir, region = "in") {
|
|
|
445
436
|
slugCode = `[${parts.map((p) => `"${p}"`).join(", ")}]`
|
|
446
437
|
}
|
|
447
438
|
|
|
439
|
+
const metadataBlock =
|
|
440
|
+
page.metadata?.title || page.metadata?.description
|
|
441
|
+
? `
|
|
442
|
+
export const metadata = {
|
|
443
|
+
${page.metadata?.title ? ` title: ${JSON.stringify(page.metadata.title)},\n` : ""}${page.metadata?.description ? ` description: ${JSON.stringify(page.metadata.description)},\n` : ""}}
|
|
444
|
+
`
|
|
445
|
+
: ""
|
|
446
|
+
|
|
448
447
|
const content = `import { renderConfiguredPage } from "@pradip1995/framework-runtime"
|
|
449
448
|
import workflow from "${workflowPkg}"
|
|
450
449
|
import Layout from "${layoutPkg}"
|
|
451
450
|
${segmentImports.map((s) => `import ${s.name} from "${s.pkg}"`).join("\n")}
|
|
452
451
|
|
|
453
452
|
export const dynamic = "force-dynamic"
|
|
454
|
-
|
|
453
|
+
${metadataBlock}
|
|
455
454
|
const pageConfig = {
|
|
456
455
|
workflow,
|
|
457
456
|
layout: Layout,
|
|
@@ -754,7 +753,7 @@ function generatePackageJson(packages, clientDir) {
|
|
|
754
753
|
)
|
|
755
754
|
}
|
|
756
755
|
|
|
757
|
-
const ROOT_LAYOUT = `import "@pradip1995/segment-tokens/
|
|
756
|
+
const ROOT_LAYOUT = `import "@pradip1995/segment-tokens/themes/impulse.css"
|
|
758
757
|
import "./globals.css"
|
|
759
758
|
|
|
760
759
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build initial homepage-config values from schema structure defaultValue fields.
|
|
3
|
+
* Used at storefront build time and by Medusa backend seed/bootstrap.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** @typedef {import("./types").DynamicConfigStructureField} DynamicConfigStructureField */
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {DynamicConfigStructureField[]} fields
|
|
10
|
+
* @returns {Record<string, unknown>}
|
|
11
|
+
*/
|
|
12
|
+
function buildDefaultsFromStructure(fields) {
|
|
13
|
+
/** @type {Record<string, unknown>} */
|
|
14
|
+
const result = {}
|
|
15
|
+
for (const field of fields) {
|
|
16
|
+
const value = buildDefaultForField(field)
|
|
17
|
+
if (value !== undefined) {
|
|
18
|
+
result[field.id] = value
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return result
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @param {DynamicConfigStructureField} field
|
|
26
|
+
* @returns {unknown}
|
|
27
|
+
*/
|
|
28
|
+
function buildDefaultForField(field) {
|
|
29
|
+
if (field.defaultValue !== undefined) {
|
|
30
|
+
return field.defaultValue
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (field.type === "object" && field.children?.length) {
|
|
34
|
+
const nested = buildDefaultsFromStructure(field.children)
|
|
35
|
+
return Object.keys(nested).length > 0 ? nested : undefined
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (field.type === "array" && field.children?.length) {
|
|
39
|
+
const [itemSchema] = field.children
|
|
40
|
+
if (itemSchema?.type === "object" && itemSchema.children?.length) {
|
|
41
|
+
const itemDefaults = buildDefaultsFromStructure(itemSchema.children)
|
|
42
|
+
if (Object.keys(itemDefaults).length > 0) {
|
|
43
|
+
return [{ [itemSchema.id]: itemDefaults }]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return undefined
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return undefined
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @param {{ structure?: DynamicConfigStructureField[] }} configSchema
|
|
54
|
+
* @returns {Record<string, unknown>}
|
|
55
|
+
*/
|
|
56
|
+
function buildHomepageConfigDefaults(configSchema) {
|
|
57
|
+
if (!configSchema?.structure?.length) return {}
|
|
58
|
+
return buildDefaultsFromStructure(configSchema.structure)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
module.exports = {
|
|
62
|
+
buildDefaultsFromStructure,
|
|
63
|
+
buildDefaultForField,
|
|
64
|
+
buildHomepageConfigDefaults,
|
|
65
|
+
}
|
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "homepage-config",
|
|
3
|
+
"title": "Homepage Experiments",
|
|
4
|
+
"active": true,
|
|
5
|
+
"structure": [
|
|
6
|
+
{
|
|
7
|
+
"id": "app-banner-array",
|
|
8
|
+
"title": "App Banner Array",
|
|
9
|
+
"type": "array",
|
|
10
|
+
"children": [
|
|
11
|
+
{
|
|
12
|
+
"id": "app-banner",
|
|
13
|
+
"title": "App Banner",
|
|
14
|
+
"type": "object",
|
|
15
|
+
"children": [
|
|
16
|
+
{ "id": "app-banner-image", "title": "Banner Image", "type": "file", "required": false },
|
|
17
|
+
{ "id": "app-banner-title", "title": "Banner Title", "type": "short-text", "required": false },
|
|
18
|
+
{ "id": "app-banner-subtitle", "title": "Banner Subtitle", "type": "short-text", "required": false },
|
|
19
|
+
{ "id": "app-banner-description", "title": "Banner Description", "type": "long-text", "required": false },
|
|
20
|
+
{ "id": "app-banner-button-name", "title": "Button Name", "type": "short-text", "required": false },
|
|
21
|
+
{ "id": "app-banner-button-link", "title": "Button Link", "type": "short-text", "required": false }
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "homepage-banner-array",
|
|
28
|
+
"title": "Homepage Banner Array",
|
|
29
|
+
"type": "array",
|
|
30
|
+
"defaultValue": [
|
|
31
|
+
{
|
|
32
|
+
"homepage-banner": {
|
|
33
|
+
"homepage-banner-subtitle": "Grace Woven In Every Thread",
|
|
34
|
+
"homepage-banner-title": "Luxury Sarees • Curated For You",
|
|
35
|
+
"homepage-banner-description": "From festive celebrations to timeless everyday elegance, explore our exclusive saree collection crafted with beauty and comfort in mind.",
|
|
36
|
+
"homepage-banner-button-name": "Explore Now",
|
|
37
|
+
"homepage-banner-button-link": "/store"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"children": [
|
|
42
|
+
{
|
|
43
|
+
"id": "homepage-banner",
|
|
44
|
+
"title": "Homepage Banner",
|
|
45
|
+
"type": "object",
|
|
46
|
+
"children": [
|
|
47
|
+
{ "id": "homepage-banner-image", "title": "Banner Image", "type": "file", "required": false },
|
|
48
|
+
{ "id": "homepage-banner-title", "title": "Banner Title", "type": "short-text", "required": false },
|
|
49
|
+
{ "id": "homepage-banner-subtitle", "title": "Banner Subtitle", "type": "short-text", "required": false },
|
|
50
|
+
{ "id": "homepage-banner-description", "title": "Banner Description", "type": "long-text", "required": false },
|
|
51
|
+
{ "id": "homepage-banner-button-name", "title": "Button Name", "type": "short-text", "required": false },
|
|
52
|
+
{ "id": "homepage-banner-button-link", "title": "Button Link", "type": "short-text", "required": false }
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "promotional-banner-array",
|
|
59
|
+
"title": "Promotional Banner Array",
|
|
60
|
+
"type": "array",
|
|
61
|
+
"defaultValue": [
|
|
62
|
+
{
|
|
63
|
+
"promotional-banner": {
|
|
64
|
+
"promotional-banner-title": "Effortless Everyday Elegance",
|
|
65
|
+
"promotional-banner-description": "Beautiful kurtis designed for comfort, style, and every moment of your day.",
|
|
66
|
+
"promotional-banner-button-name": "EXPLORE NOW",
|
|
67
|
+
"promotional-banner-link": "/store"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"promotional-banner": {
|
|
72
|
+
"promotional-banner-title": "Where Tradition Meets Style",
|
|
73
|
+
"promotional-banner-description": "Exquisite sarees that bring timeless beauty to your wardrobe.",
|
|
74
|
+
"promotional-banner-button-name": "SHOP NOW",
|
|
75
|
+
"promotional-banner-link": "/store"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"children": [
|
|
80
|
+
{
|
|
81
|
+
"id": "promotional-banner",
|
|
82
|
+
"title": "Promotional Banner",
|
|
83
|
+
"type": "object",
|
|
84
|
+
"children": [
|
|
85
|
+
{ "id": "promotional-banner-image", "title": "Banner Image", "type": "file", "required": false },
|
|
86
|
+
{ "id": "promotional-banner-title", "title": "Banner Title", "type": "short-text", "required": false },
|
|
87
|
+
{ "id": "promotional-banner-description", "title": "Banner Description", "type": "long-text", "required": false },
|
|
88
|
+
{ "id": "promotional-banner-button-name", "title": "Button Name", "type": "short-text", "required": false },
|
|
89
|
+
{ "id": "promotional-banner-link", "title": "Button Link", "type": "short-text", "required": false }
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "promo-bar",
|
|
96
|
+
"title": "Promotion Bar",
|
|
97
|
+
"type": "object",
|
|
98
|
+
"defaultValue": {
|
|
99
|
+
"promo-active": true,
|
|
100
|
+
"promo-rotate": true,
|
|
101
|
+
"promo-text": "Free shipping on orders above ₹999",
|
|
102
|
+
"promo-messages-array": [
|
|
103
|
+
{
|
|
104
|
+
"promo-message": {
|
|
105
|
+
"promo-message-text": "Free Shipping on Orders Above ₹999"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"promo-message": {
|
|
110
|
+
"promo-message-text": "New Arrivals Are Live • Shop The Latest Saree Collection"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"promo-message": {
|
|
115
|
+
"promo-message-text": "Handpicked Sarees Crafted For Every Celebration"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"promo-message": {
|
|
120
|
+
"promo-message-text": "Flat 10% OFF On Your First Order • Use Code: WELCOME10",
|
|
121
|
+
"promo-message-highlight": "WELCOME10"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"promo-message": {
|
|
126
|
+
"promo-message-text": "Free Shipping • Easy Returns • Secure Payments"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"children": [
|
|
132
|
+
{
|
|
133
|
+
"id": "promo-active",
|
|
134
|
+
"title": "Show Promotion Bar",
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"required": false,
|
|
137
|
+
"defaultValue": true
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"id": "promo-rotate",
|
|
141
|
+
"title": "Rotate Messages (Sahsha-style ticker)",
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"required": false,
|
|
144
|
+
"defaultValue": true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "promo-text",
|
|
148
|
+
"title": "Promotion Text (fallback when no message list)",
|
|
149
|
+
"type": "short-text",
|
|
150
|
+
"required": false,
|
|
151
|
+
"defaultValue": "Free shipping on orders above ₹999"
|
|
152
|
+
},
|
|
153
|
+
{ "id": "promo-code", "title": "Promo Code (for copying)", "type": "short-text", "required": false },
|
|
154
|
+
{ "id": "promo-value", "title": "Promo Value (e.g. 20% or ₹100)", "type": "short-text", "required": false },
|
|
155
|
+
{
|
|
156
|
+
"id": "promo-messages-array",
|
|
157
|
+
"title": "Rotating Promo Messages",
|
|
158
|
+
"type": "array",
|
|
159
|
+
"children": [
|
|
160
|
+
{
|
|
161
|
+
"id": "promo-message",
|
|
162
|
+
"title": "Promo Message",
|
|
163
|
+
"type": "object",
|
|
164
|
+
"children": [
|
|
165
|
+
{
|
|
166
|
+
"id": "promo-message-text",
|
|
167
|
+
"title": "Message Text",
|
|
168
|
+
"type": "short-text",
|
|
169
|
+
"required": false
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "promo-message-highlight",
|
|
173
|
+
"title": "Highlight Text (e.g. coupon code)",
|
|
174
|
+
"type": "short-text",
|
|
175
|
+
"required": false
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{ "id": "logo", "title": "Company Logo", "type": "file", "required": false },
|
|
184
|
+
{
|
|
185
|
+
"id": "website-description",
|
|
186
|
+
"title": "Website Description",
|
|
187
|
+
"type": "long-text",
|
|
188
|
+
"required": false,
|
|
189
|
+
"defaultValue": "Discover stylish Kurtis and elegant Sarees crafted for every occasion. From everyday comfort to festive elegance, explore timeless fashion designed for modern women."
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"id": "contact-us",
|
|
193
|
+
"title": "Contact Us",
|
|
194
|
+
"type": "object",
|
|
195
|
+
"children": [
|
|
196
|
+
{ "id": "contact-whatsapp", "title": "WhatsApp Number", "type": "short-text", "required": false },
|
|
197
|
+
{ "id": "contact-phone", "title": "Phone Number", "type": "short-text", "required": false },
|
|
198
|
+
{ "id": "contact-email", "title": "Email Address", "type": "short-text", "required": false },
|
|
199
|
+
{ "id": "contact-address", "title": "Our Address", "type": "long-text", "required": false }
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"id": "why-choose-us-title",
|
|
204
|
+
"title": "Why Choose Us Title",
|
|
205
|
+
"type": "short-text",
|
|
206
|
+
"required": false,
|
|
207
|
+
"defaultValue": "Why Women Love Us?"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": "why-choose-us-features",
|
|
211
|
+
"title": "Why Choose Us Features",
|
|
212
|
+
"type": "array",
|
|
213
|
+
"defaultValue": [
|
|
214
|
+
{ "feature": { "feature-name": "High Quality", "feature-icon": "/quality.svg" } },
|
|
215
|
+
{ "feature": { "feature-name": "Custom Fitting", "feature-icon": "/fitting.svg" } },
|
|
216
|
+
{ "feature": { "feature-name": "Trusted by Customers", "feature-icon": "/trusted.svg" } },
|
|
217
|
+
{ "feature": { "feature-name": "Customer Support", "feature-icon": "/support.svg" } }
|
|
218
|
+
],
|
|
219
|
+
"children": [
|
|
220
|
+
{
|
|
221
|
+
"id": "feature",
|
|
222
|
+
"title": "Feature",
|
|
223
|
+
"type": "object",
|
|
224
|
+
"children": [
|
|
225
|
+
{ "id": "feature-name", "title": "Feature Name", "type": "short-text", "required": false },
|
|
226
|
+
{ "id": "feature-icon", "title": "Feature Icon", "type": "file", "required": false }
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "rating-title",
|
|
233
|
+
"title": "Rating Title",
|
|
234
|
+
"type": "short-text",
|
|
235
|
+
"required": false,
|
|
236
|
+
"defaultValue": "What Our Customers Are Saying"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "rating-eyebrow",
|
|
240
|
+
"title": "Rating Eyebrow",
|
|
241
|
+
"type": "short-text",
|
|
242
|
+
"required": false,
|
|
243
|
+
"defaultValue": "Trusted by our customers"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"id": "rating-description",
|
|
247
|
+
"title": "Rating Description",
|
|
248
|
+
"type": "long-text",
|
|
249
|
+
"required": false,
|
|
250
|
+
"defaultValue": "Crafted with quality fabrics and designed for everyday elegance. Join the community who have made ethnic wear a statement of sophistication."
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "new-arrivals-title",
|
|
254
|
+
"title": "New Arrivals Title",
|
|
255
|
+
"type": "short-text",
|
|
256
|
+
"required": false,
|
|
257
|
+
"defaultValue": "New arrivals"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": "new-arrivals-view-all",
|
|
261
|
+
"title": "New Arrivals View All Link",
|
|
262
|
+
"type": "short-text",
|
|
263
|
+
"required": false,
|
|
264
|
+
"defaultValue": "View all"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"id": "new-arrivals-empty-message",
|
|
268
|
+
"title": "New Arrivals Empty Message",
|
|
269
|
+
"type": "short-text",
|
|
270
|
+
"required": false,
|
|
271
|
+
"defaultValue": "No new arrivals at the moment. Check back soon!"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "bestsellers-title",
|
|
275
|
+
"title": "Best Sellers Title",
|
|
276
|
+
"type": "short-text",
|
|
277
|
+
"required": false,
|
|
278
|
+
"defaultValue": "Best sellers"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"id": "bestsellers-view-all",
|
|
282
|
+
"title": "Best Sellers View All Link",
|
|
283
|
+
"type": "short-text",
|
|
284
|
+
"required": false,
|
|
285
|
+
"defaultValue": "View all"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "loved-by-moms-title",
|
|
289
|
+
"title": "Loved By Moms Title",
|
|
290
|
+
"type": "short-text",
|
|
291
|
+
"required": false,
|
|
292
|
+
"defaultValue": "Loved by Moms"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"id": "loved-by-moms-view-all",
|
|
296
|
+
"title": "Loved By Moms View All Link",
|
|
297
|
+
"type": "short-text",
|
|
298
|
+
"required": false,
|
|
299
|
+
"defaultValue": "Shop all"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"id": "shop-by-category-title",
|
|
303
|
+
"title": "Shop By Category Title",
|
|
304
|
+
"type": "short-text",
|
|
305
|
+
"required": false,
|
|
306
|
+
"defaultValue": "Shop by category"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"id": "shop-by-category-cta",
|
|
310
|
+
"title": "Shop By Category CTA",
|
|
311
|
+
"type": "short-text",
|
|
312
|
+
"required": false,
|
|
313
|
+
"defaultValue": "View the collection"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"id": "shop-by-age-title",
|
|
317
|
+
"title": "Shop By Age Title",
|
|
318
|
+
"type": "short-text",
|
|
319
|
+
"required": false,
|
|
320
|
+
"defaultValue": "Shop by Age"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"id": "collections-showcase-eyebrow",
|
|
324
|
+
"title": "Collections Showcase Eyebrow",
|
|
325
|
+
"type": "short-text",
|
|
326
|
+
"required": false,
|
|
327
|
+
"defaultValue": "What's new"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"id": "collections-showcase-title",
|
|
331
|
+
"title": "Collections Showcase Title",
|
|
332
|
+
"type": "short-text",
|
|
333
|
+
"required": false,
|
|
334
|
+
"defaultValue": "Shop collections"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"id": "related-products-title",
|
|
338
|
+
"title": "Related Products Title",
|
|
339
|
+
"type": "short-text",
|
|
340
|
+
"required": false,
|
|
341
|
+
"defaultValue": "You may also like"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"id": "store-page-title",
|
|
345
|
+
"title": "Store Page Title",
|
|
346
|
+
"type": "short-text",
|
|
347
|
+
"required": false,
|
|
348
|
+
"defaultValue": "Shop All Products"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"id": "store-page-empty-message",
|
|
352
|
+
"title": "Store Page Empty Message",
|
|
353
|
+
"type": "long-text",
|
|
354
|
+
"required": false,
|
|
355
|
+
"defaultValue": "No products to show yet. Start the Medusa backend or check your publishable key."
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"id": "wishlist-sign-in-title",
|
|
359
|
+
"title": "Wishlist Sign In Title",
|
|
360
|
+
"type": "short-text",
|
|
361
|
+
"required": false,
|
|
362
|
+
"defaultValue": "Sign in to view your wishlist"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"id": "wishlist-sign-in-description",
|
|
366
|
+
"title": "Wishlist Sign In Description",
|
|
367
|
+
"type": "short-text",
|
|
368
|
+
"required": false,
|
|
369
|
+
"defaultValue": "Save your favourite pieces and come back to them anytime."
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"id": "wishlist-sign-in-button",
|
|
373
|
+
"title": "Wishlist Sign In Button",
|
|
374
|
+
"type": "short-text",
|
|
375
|
+
"required": false,
|
|
376
|
+
"defaultValue": "Sign in"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"id": "wishlist-empty-title",
|
|
380
|
+
"title": "Wishlist Empty Title",
|
|
381
|
+
"type": "short-text",
|
|
382
|
+
"required": false,
|
|
383
|
+
"defaultValue": "Your wishlist is empty"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"id": "wishlist-empty-description",
|
|
387
|
+
"title": "Wishlist Empty Description",
|
|
388
|
+
"type": "short-text",
|
|
389
|
+
"required": false,
|
|
390
|
+
"defaultValue": "Start adding items you love."
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"id": "wishlist-empty-button",
|
|
394
|
+
"title": "Wishlist Empty Button",
|
|
395
|
+
"type": "short-text",
|
|
396
|
+
"required": false,
|
|
397
|
+
"defaultValue": "Browse products"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"id": "footer-shop-label",
|
|
401
|
+
"title": "Footer Shop Column Label",
|
|
402
|
+
"type": "short-text",
|
|
403
|
+
"required": false,
|
|
404
|
+
"defaultValue": "Shop"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"id": "footer-company-label",
|
|
408
|
+
"title": "Footer Company Column Label",
|
|
409
|
+
"type": "short-text",
|
|
410
|
+
"required": false,
|
|
411
|
+
"defaultValue": "Company"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"id": "footer-newsletter-label",
|
|
415
|
+
"title": "Footer Newsletter Label",
|
|
416
|
+
"type": "short-text",
|
|
417
|
+
"required": false,
|
|
418
|
+
"defaultValue": "Newsletter"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"id": "footer-newsletter-description",
|
|
422
|
+
"title": "Footer Newsletter Description",
|
|
423
|
+
"type": "short-text",
|
|
424
|
+
"required": false,
|
|
425
|
+
"defaultValue": "Subscribe for exclusive offers and new arrivals."
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"id": "checkout-form-title",
|
|
429
|
+
"title": "Checkout Form Title",
|
|
430
|
+
"type": "short-text",
|
|
431
|
+
"required": false,
|
|
432
|
+
"defaultValue": "Contact & shipping"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"id": "checkout-summary-title",
|
|
436
|
+
"title": "Checkout Summary Title",
|
|
437
|
+
"type": "short-text",
|
|
438
|
+
"required": false,
|
|
439
|
+
"defaultValue": "Order summary"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"id": "cart-summary-title",
|
|
443
|
+
"title": "Cart Summary Title",
|
|
444
|
+
"type": "short-text",
|
|
445
|
+
"required": false,
|
|
446
|
+
"defaultValue": "Order Summary"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"id": "cart-empty-message",
|
|
450
|
+
"title": "Cart Empty Message",
|
|
451
|
+
"type": "short-text",
|
|
452
|
+
"required": false,
|
|
453
|
+
"defaultValue": "Your cart is empty."
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"id": "cart-empty-button",
|
|
457
|
+
"title": "Cart Empty Button",
|
|
458
|
+
"type": "short-text",
|
|
459
|
+
"required": false,
|
|
460
|
+
"defaultValue": "Browse products"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"id": "trust-strip-features",
|
|
464
|
+
"title": "Trust Strip Features",
|
|
465
|
+
"type": "array",
|
|
466
|
+
"defaultValue": [
|
|
467
|
+
{
|
|
468
|
+
"feature": {
|
|
469
|
+
"feature-name": "100% Secure",
|
|
470
|
+
"feature-description": "Safe & protected checkout",
|
|
471
|
+
"feature-icon": "/secure.svg"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"feature": {
|
|
476
|
+
"feature-name": "Easy Exchanges",
|
|
477
|
+
"feature-description": "Hassle-free 15-day returns",
|
|
478
|
+
"feature-icon": "/exchnage.svg"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"feature": {
|
|
483
|
+
"feature-name": "Fast Delivery",
|
|
484
|
+
"feature-description": "Quick doorstep delivery",
|
|
485
|
+
"feature-icon": "/fast.svg"
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"feature": {
|
|
490
|
+
"feature-name": "Cash On Delivery",
|
|
491
|
+
"feature-description": "Pay when you receive",
|
|
492
|
+
"feature-icon": "/cash.svg"
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
"children": [
|
|
497
|
+
{
|
|
498
|
+
"id": "feature",
|
|
499
|
+
"title": "Trust Feature",
|
|
500
|
+
"type": "object",
|
|
501
|
+
"children": [
|
|
502
|
+
{ "id": "feature-name", "title": "Feature Name", "type": "short-text", "required": false },
|
|
503
|
+
{ "id": "feature-description", "title": "Feature Description", "type": "short-text", "required": false },
|
|
504
|
+
{ "id": "feature-icon", "title": "Feature Icon", "type": "file", "required": false }
|
|
505
|
+
]
|
|
506
|
+
}
|
|
507
|
+
]
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"id": "ratings",
|
|
511
|
+
"title": "Ratings",
|
|
512
|
+
"type": "array",
|
|
513
|
+
"children": [
|
|
514
|
+
{
|
|
515
|
+
"id": "review",
|
|
516
|
+
"title": "Review",
|
|
517
|
+
"type": "object",
|
|
518
|
+
"children": [
|
|
519
|
+
{ "id": "review-description", "title": "Description", "type": "long-text", "required": false },
|
|
520
|
+
{ "id": "review-user-name", "title": "User Name", "type": "short-text", "required": false },
|
|
521
|
+
{ "id": "review-rating", "title": "Rating", "type": "short-text", "required": false },
|
|
522
|
+
{ "id": "review-profile-image", "title": "Profile Image", "type": "file", "required": false }
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"id": "faq-array",
|
|
529
|
+
"title": "Help & FAQs",
|
|
530
|
+
"type": "array",
|
|
531
|
+
"children": [
|
|
532
|
+
{
|
|
533
|
+
"id": "faq",
|
|
534
|
+
"title": "FAQ Item",
|
|
535
|
+
"type": "object",
|
|
536
|
+
"children": [
|
|
537
|
+
{ "id": "faq-category", "title": "Category Name (e.g. Orders & Shipping)", "type": "short-text", "required": false },
|
|
538
|
+
{ "id": "faq-question", "title": "Question", "type": "short-text", "required": true },
|
|
539
|
+
{ "id": "faq-answer", "title": "Answer", "type": "long-text", "required": true }
|
|
540
|
+
]
|
|
541
|
+
}
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"id": "social-links",
|
|
546
|
+
"title": "Social Media Links",
|
|
547
|
+
"type": "array",
|
|
548
|
+
"defaultValue": [
|
|
549
|
+
{ "social-link": { "social-platform-name": "LinkedIn", "social-platform-url": "#", "social-platform-icon": "/LINK.svg" } },
|
|
550
|
+
{ "social-link": { "social-platform-name": "Facebook", "social-platform-url": "#", "social-platform-icon": "/FACE.svg" } },
|
|
551
|
+
{ "social-link": { "social-platform-name": "Instagram", "social-platform-url": "#", "social-platform-icon": "/INSTA.svg" } },
|
|
552
|
+
{ "social-link": { "social-platform-name": "YouTube", "social-platform-url": "#", "social-platform-icon": "/YOU.svg" } }
|
|
553
|
+
],
|
|
554
|
+
"children": [
|
|
555
|
+
{
|
|
556
|
+
"id": "social-link",
|
|
557
|
+
"title": "Social Link",
|
|
558
|
+
"type": "object",
|
|
559
|
+
"children": [
|
|
560
|
+
{ "id": "social-platform-name", "title": "Platform Name", "type": "short-text", "required": true },
|
|
561
|
+
{ "id": "social-platform-icon", "title": "Icon", "type": "file", "required": false },
|
|
562
|
+
{ "id": "social-platform-url", "title": "Redirect URL", "type": "short-text", "required": true }
|
|
563
|
+
]
|
|
564
|
+
}
|
|
565
|
+
]
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pradip1995/framework-compiler",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"bin",
|
|
14
|
-
"templates"
|
|
14
|
+
"templates",
|
|
15
|
+
"dynamic-config-schema"
|
|
15
16
|
],
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"jiti": "^2.4.2"
|