@roottale/cms-renderer-next 0.20.0 → 0.22.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/CHANGELOG.md +19 -0
- package/dist/chunk-DCTKVXWE.js +964 -0
- package/dist/chunk-DCTKVXWE.js.map +1 -0
- package/dist/routes.js +1 -1
- package/dist/server.d.ts +30 -1
- package/dist/server.js +19 -909
- package/dist/server.js.map +1 -1
- package/dist/templates.css +260 -0
- package/dist/templates.d.ts +715 -0
- package/dist/templates.js +462 -0
- package/dist/templates.js.map +1 -0
- package/package.json +10 -3
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RootTaleBlogList,
|
|
3
|
+
RootTaleLeadForm
|
|
4
|
+
} from "./chunk-DCTKVXWE.js";
|
|
5
|
+
import "./chunk-QWBFHYB6.js";
|
|
6
|
+
|
|
7
|
+
// src/templates/site-config.ts
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
var JsonValue = z.lazy(
|
|
10
|
+
() => z.union([
|
|
11
|
+
z.string(),
|
|
12
|
+
z.number(),
|
|
13
|
+
z.boolean(),
|
|
14
|
+
z.null(),
|
|
15
|
+
z.array(JsonValue),
|
|
16
|
+
z.record(JsonValue)
|
|
17
|
+
])
|
|
18
|
+
);
|
|
19
|
+
var NavItemSchema = z.object({
|
|
20
|
+
label: z.string(),
|
|
21
|
+
href: z.string(),
|
|
22
|
+
children: z.array(z.object({ label: z.string(), href: z.string() })).optional()
|
|
23
|
+
});
|
|
24
|
+
var CtaSchema = z.object({ label: z.string(), href: z.string() });
|
|
25
|
+
var SectionBase = z.object({
|
|
26
|
+
/** 안정적 anchor·dedup·preview 매핑용. 페이지 내 유일. */
|
|
27
|
+
id: z.string().optional(),
|
|
28
|
+
/** 빌트인 또는 customSections registry 키. kebab-case. */
|
|
29
|
+
type: z.string(),
|
|
30
|
+
/** 같은 type 의 비주얼 변형. 빌트인 type 은 enum 으로 좁힘. */
|
|
31
|
+
variant: z.string().optional(),
|
|
32
|
+
/** 섹션 스코프 토큰 override (`--rt-*` CSS 변수 → 값). */
|
|
33
|
+
theme: z.record(z.string()).optional(),
|
|
34
|
+
/** 섹션별 직렬화 props. */
|
|
35
|
+
props: z.record(JsonValue).default({})
|
|
36
|
+
});
|
|
37
|
+
var HeroSectionSchema = SectionBase.extend({
|
|
38
|
+
type: z.literal("hero"),
|
|
39
|
+
variant: z.enum(["split", "image", "minimal"]).default("split"),
|
|
40
|
+
props: z.object({
|
|
41
|
+
eyebrow: z.string().optional(),
|
|
42
|
+
/** `\n` 으로 줄바꿈. */
|
|
43
|
+
title: z.string(),
|
|
44
|
+
description: z.string().optional(),
|
|
45
|
+
imageSrc: z.string().optional(),
|
|
46
|
+
imageAlt: z.string().optional(),
|
|
47
|
+
cta: CtaSchema.optional()
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
var RichTextSectionSchema = SectionBase.extend({
|
|
51
|
+
type: z.literal("rich-text"),
|
|
52
|
+
props: z.object({
|
|
53
|
+
heading: z.string().optional(),
|
|
54
|
+
/** `\n\n` 으로 문단 분리. */
|
|
55
|
+
body: z.string()
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
var ServicesSectionSchema = SectionBase.extend({
|
|
59
|
+
type: z.literal("services"),
|
|
60
|
+
variant: z.enum(["grid", "list"]).default("grid"),
|
|
61
|
+
props: z.object({
|
|
62
|
+
heading: z.string().optional(),
|
|
63
|
+
description: z.string().optional(),
|
|
64
|
+
items: z.array(
|
|
65
|
+
z.object({
|
|
66
|
+
title: z.string(),
|
|
67
|
+
description: z.string().optional(),
|
|
68
|
+
href: z.string().optional()
|
|
69
|
+
})
|
|
70
|
+
).min(1)
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
var FaqSectionSchema = SectionBase.extend({
|
|
74
|
+
type: z.literal("faq"),
|
|
75
|
+
props: z.object({
|
|
76
|
+
heading: z.string().optional(),
|
|
77
|
+
items: z.array(z.object({ question: z.string(), answer: z.string() })).min(1),
|
|
78
|
+
/** FAQPage JSON-LD 주입 (기본 true — SEO 3 pillars). 페이지에 FAQ 섹션이 여럿이면 하나만 true 로. */
|
|
79
|
+
jsonLd: z.boolean().default(true)
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
var CtaBannerSectionSchema = SectionBase.extend({
|
|
83
|
+
type: z.literal("cta-banner"),
|
|
84
|
+
props: z.object({
|
|
85
|
+
title: z.string(),
|
|
86
|
+
description: z.string().optional(),
|
|
87
|
+
cta: CtaSchema.optional()
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
var BlogListSectionSchema = SectionBase.extend({
|
|
91
|
+
type: z.literal("blog-list"),
|
|
92
|
+
props: z.object({
|
|
93
|
+
heading: z.string().optional(),
|
|
94
|
+
limit: z.number().int().positive().optional(),
|
|
95
|
+
/** 포스트 링크 베이스. 기본 `/blog`. */
|
|
96
|
+
blogBasePath: z.string().optional(),
|
|
97
|
+
emptyMessage: z.string().optional()
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
var LeadFormSectionSchema = SectionBase.extend({
|
|
101
|
+
type: z.literal("lead-form"),
|
|
102
|
+
props: z.object({
|
|
103
|
+
/** 사이트 자체 server 엔드포인트 (예: `/api/inquiry`). intake API 직접 지정 금지. */
|
|
104
|
+
action: z.string(),
|
|
105
|
+
vertical: z.enum(["consulting", "medical", "tax", "legal"]).optional(),
|
|
106
|
+
heading: z.string().optional(),
|
|
107
|
+
description: z.string().optional(),
|
|
108
|
+
submitLabel: z.string().optional()
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
var CustomSectionSchema = SectionBase;
|
|
112
|
+
var BUILTIN_SECTION_SCHEMAS = {
|
|
113
|
+
hero: HeroSectionSchema,
|
|
114
|
+
"rich-text": RichTextSectionSchema,
|
|
115
|
+
services: ServicesSectionSchema,
|
|
116
|
+
faq: FaqSectionSchema,
|
|
117
|
+
"cta-banner": CtaBannerSectionSchema,
|
|
118
|
+
"blog-list": BlogListSectionSchema,
|
|
119
|
+
"lead-form": LeadFormSectionSchema
|
|
120
|
+
};
|
|
121
|
+
var BUILTIN_SECTION_TYPES = Object.keys(
|
|
122
|
+
BUILTIN_SECTION_SCHEMAS
|
|
123
|
+
);
|
|
124
|
+
var SectionSchema = z.object({ type: z.string() }).passthrough().transform((section, ctx) => {
|
|
125
|
+
const schema = BUILTIN_SECTION_SCHEMAS[section.type] ?? CustomSectionSchema;
|
|
126
|
+
const result = schema.safeParse(section);
|
|
127
|
+
if (!result.success) {
|
|
128
|
+
for (const issue of result.error.issues) ctx.addIssue(issue);
|
|
129
|
+
return z.NEVER;
|
|
130
|
+
}
|
|
131
|
+
return result.data;
|
|
132
|
+
});
|
|
133
|
+
var SiteConfigSchema = z.object({
|
|
134
|
+
site: z.object({
|
|
135
|
+
/** canonical origin. 생략 시 소비측이 `SITE_URL` env 등으로 해석. */
|
|
136
|
+
url: z.string().url().optional(),
|
|
137
|
+
title: z.string(),
|
|
138
|
+
description: z.string().optional(),
|
|
139
|
+
locale: z.string().default("ko-KR"),
|
|
140
|
+
og: z.object({ image: z.string().optional() }).optional()
|
|
141
|
+
}),
|
|
142
|
+
/** 사이트 전역 토큰 override (`--rt-*` CSS 변수 → 값). 비우면 admin /design SSoT. */
|
|
143
|
+
theme: z.record(z.string()).default({}),
|
|
144
|
+
nav: z.array(NavItemSchema).default([]),
|
|
145
|
+
/** path("/", "/services", …) → 섹션 배열. */
|
|
146
|
+
pages: z.record(z.array(SectionSchema))
|
|
147
|
+
});
|
|
148
|
+
function parseSiteConfig(input) {
|
|
149
|
+
return SiteConfigSchema.parse(input);
|
|
150
|
+
}
|
|
151
|
+
function defineSiteConfig(input) {
|
|
152
|
+
return parseSiteConfig(input);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// src/templates/sections.tsx
|
|
156
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
157
|
+
function sectionThemeStyle(theme) {
|
|
158
|
+
if (!theme) return void 0;
|
|
159
|
+
const style = {};
|
|
160
|
+
for (const [key, value] of Object.entries(theme)) {
|
|
161
|
+
if (key.startsWith("--")) style[key] = value;
|
|
162
|
+
}
|
|
163
|
+
return Object.keys(style).length > 0 ? style : void 0;
|
|
164
|
+
}
|
|
165
|
+
function CtaLink({
|
|
166
|
+
cta,
|
|
167
|
+
className
|
|
168
|
+
}) {
|
|
169
|
+
return /* @__PURE__ */ jsx("a", { className: className ?? "rt-tpl-btn rt-tpl-btn--primary", href: cta.href, children: cta.label });
|
|
170
|
+
}
|
|
171
|
+
function TemplateHero(section) {
|
|
172
|
+
const { eyebrow, title, description, imageSrc, imageAlt, cta } = section.props;
|
|
173
|
+
const variant = section.variant;
|
|
174
|
+
const showImage = variant !== "minimal" && imageSrc;
|
|
175
|
+
return /* @__PURE__ */ jsx(
|
|
176
|
+
"section",
|
|
177
|
+
{
|
|
178
|
+
"data-roottale-tpl": "hero",
|
|
179
|
+
"data-variant": variant,
|
|
180
|
+
id: section.id,
|
|
181
|
+
className: "rt-tpl-section rt-tpl-hero",
|
|
182
|
+
style: sectionThemeStyle(section.theme),
|
|
183
|
+
children: /* @__PURE__ */ jsxs("div", { className: "rt-tpl-container rt-tpl-hero-inner", children: [
|
|
184
|
+
/* @__PURE__ */ jsxs("div", { className: "rt-tpl-hero-copy", children: [
|
|
185
|
+
eyebrow ? /* @__PURE__ */ jsx("p", { className: "rt-tpl-hero-eyebrow", children: eyebrow }) : null,
|
|
186
|
+
/* @__PURE__ */ jsx("h1", { className: "rt-tpl-hero-title", children: title.split("\n").map((line, i) => /* @__PURE__ */ jsx("span", { className: "rt-tpl-hero-title-line", children: line }, i)) }),
|
|
187
|
+
description ? /* @__PURE__ */ jsx("p", { className: "rt-tpl-hero-desc", children: description }) : null,
|
|
188
|
+
cta ? /* @__PURE__ */ jsx(CtaLink, { cta }) : null
|
|
189
|
+
] }),
|
|
190
|
+
showImage ? /* @__PURE__ */ jsx("div", { className: "rt-tpl-hero-media", children: /* @__PURE__ */ jsx(
|
|
191
|
+
"img",
|
|
192
|
+
{
|
|
193
|
+
className: "rt-tpl-hero-img",
|
|
194
|
+
src: imageSrc,
|
|
195
|
+
alt: imageAlt ?? "",
|
|
196
|
+
loading: "eager"
|
|
197
|
+
}
|
|
198
|
+
) }) : null
|
|
199
|
+
] })
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
function TemplateRichText(section) {
|
|
204
|
+
const { heading, body } = section.props;
|
|
205
|
+
return /* @__PURE__ */ jsx(
|
|
206
|
+
"section",
|
|
207
|
+
{
|
|
208
|
+
"data-roottale-tpl": "rich-text",
|
|
209
|
+
id: section.id,
|
|
210
|
+
className: "rt-tpl-section rt-tpl-rich-text",
|
|
211
|
+
style: sectionThemeStyle(section.theme),
|
|
212
|
+
children: /* @__PURE__ */ jsxs("div", { className: "rt-tpl-container", children: [
|
|
213
|
+
heading ? /* @__PURE__ */ jsx("h2", { className: "rt-tpl-heading", children: heading }) : null,
|
|
214
|
+
body.split("\n\n").map((para, i) => /* @__PURE__ */ jsx("p", { className: "rt-tpl-rich-text-p", children: para }, i))
|
|
215
|
+
] })
|
|
216
|
+
}
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
function TemplateServices(section) {
|
|
220
|
+
const { heading, description, items } = section.props;
|
|
221
|
+
return /* @__PURE__ */ jsx(
|
|
222
|
+
"section",
|
|
223
|
+
{
|
|
224
|
+
"data-roottale-tpl": "services",
|
|
225
|
+
"data-variant": section.variant,
|
|
226
|
+
id: section.id,
|
|
227
|
+
className: "rt-tpl-section rt-tpl-services",
|
|
228
|
+
style: sectionThemeStyle(section.theme),
|
|
229
|
+
children: /* @__PURE__ */ jsxs("div", { className: "rt-tpl-container", children: [
|
|
230
|
+
heading ? /* @__PURE__ */ jsx("h2", { className: "rt-tpl-heading", children: heading }) : null,
|
|
231
|
+
description ? /* @__PURE__ */ jsx("p", { className: "rt-tpl-section-desc", children: description }) : null,
|
|
232
|
+
/* @__PURE__ */ jsx("ul", { className: "rt-tpl-services-list", children: items.map((item, i) => {
|
|
233
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
234
|
+
/* @__PURE__ */ jsx("h3", { className: "rt-tpl-services-title", children: item.title }),
|
|
235
|
+
item.description ? /* @__PURE__ */ jsx("p", { className: "rt-tpl-services-desc", children: item.description }) : null
|
|
236
|
+
] });
|
|
237
|
+
return /* @__PURE__ */ jsx("li", { className: "rt-tpl-services-item", children: item.href ? /* @__PURE__ */ jsx("a", { className: "rt-tpl-services-link", href: item.href, children: body }) : body }, i);
|
|
238
|
+
}) })
|
|
239
|
+
] })
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
function TemplateFaq(section) {
|
|
244
|
+
const { heading, items, jsonLd } = section.props;
|
|
245
|
+
return /* @__PURE__ */ jsxs(
|
|
246
|
+
"section",
|
|
247
|
+
{
|
|
248
|
+
"data-roottale-tpl": "faq",
|
|
249
|
+
id: section.id,
|
|
250
|
+
className: "rt-tpl-section rt-tpl-faq",
|
|
251
|
+
style: sectionThemeStyle(section.theme),
|
|
252
|
+
children: [
|
|
253
|
+
/* @__PURE__ */ jsxs("div", { className: "rt-tpl-container", children: [
|
|
254
|
+
heading ? /* @__PURE__ */ jsx("h2", { className: "rt-tpl-heading", children: heading }) : null,
|
|
255
|
+
/* @__PURE__ */ jsx("div", { className: "rt-tpl-faq-list", children: items.map((item, i) => /* @__PURE__ */ jsxs("details", { className: "rt-tpl-faq-item", children: [
|
|
256
|
+
/* @__PURE__ */ jsx("summary", { className: "rt-tpl-faq-q", children: item.question }),
|
|
257
|
+
/* @__PURE__ */ jsx("p", { className: "rt-tpl-faq-a", children: item.answer })
|
|
258
|
+
] }, i)) })
|
|
259
|
+
] }),
|
|
260
|
+
jsonLd ? /* @__PURE__ */ jsx(
|
|
261
|
+
"script",
|
|
262
|
+
{
|
|
263
|
+
type: "application/ld+json",
|
|
264
|
+
dangerouslySetInnerHTML: {
|
|
265
|
+
__html: JSON.stringify({
|
|
266
|
+
"@context": "https://schema.org",
|
|
267
|
+
"@type": "FAQPage",
|
|
268
|
+
mainEntity: items.map((item) => ({
|
|
269
|
+
"@type": "Question",
|
|
270
|
+
name: item.question,
|
|
271
|
+
acceptedAnswer: { "@type": "Answer", text: item.answer }
|
|
272
|
+
}))
|
|
273
|
+
})
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
) : null
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
function TemplateCtaBanner(section) {
|
|
282
|
+
const { title, description, cta } = section.props;
|
|
283
|
+
return /* @__PURE__ */ jsx(
|
|
284
|
+
"section",
|
|
285
|
+
{
|
|
286
|
+
"data-roottale-tpl": "cta-banner",
|
|
287
|
+
id: section.id,
|
|
288
|
+
className: "rt-tpl-section rt-tpl-cta-banner",
|
|
289
|
+
style: sectionThemeStyle(section.theme),
|
|
290
|
+
children: /* @__PURE__ */ jsxs("div", { className: "rt-tpl-container rt-tpl-cta-banner-inner", children: [
|
|
291
|
+
/* @__PURE__ */ jsx("h2", { className: "rt-tpl-cta-banner-title", children: title }),
|
|
292
|
+
description ? /* @__PURE__ */ jsx("p", { className: "rt-tpl-cta-banner-desc", children: description }) : null,
|
|
293
|
+
cta ? /* @__PURE__ */ jsx(CtaLink, { cta }) : null
|
|
294
|
+
] })
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// src/templates/SiteRenderer.tsx
|
|
300
|
+
import {
|
|
301
|
+
Fragment as Fragment2
|
|
302
|
+
} from "react";
|
|
303
|
+
import { Fragment as Fragment3, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
304
|
+
function isDev() {
|
|
305
|
+
const env = globalThis.process?.env ?? {};
|
|
306
|
+
return env.NODE_ENV !== "production";
|
|
307
|
+
}
|
|
308
|
+
function UnknownSection({
|
|
309
|
+
type,
|
|
310
|
+
mode
|
|
311
|
+
}) {
|
|
312
|
+
if (mode === "ignore") return null;
|
|
313
|
+
if (mode === "placeholder") {
|
|
314
|
+
return /* @__PURE__ */ jsx2(
|
|
315
|
+
"section",
|
|
316
|
+
{
|
|
317
|
+
"data-roottale-tpl": "placeholder",
|
|
318
|
+
className: "rt-tpl-section rt-tpl-placeholder",
|
|
319
|
+
"aria-hidden": true,
|
|
320
|
+
children: /* @__PURE__ */ jsx2("div", { className: "rt-tpl-container", children: /* @__PURE__ */ jsx2("div", { className: "rt-tpl-placeholder-box", children: type }) })
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
if (!isDev()) return null;
|
|
325
|
+
const style = {
|
|
326
|
+
padding: "1rem",
|
|
327
|
+
border: "1px dashed #c00",
|
|
328
|
+
color: "#c00"
|
|
329
|
+
};
|
|
330
|
+
return /* @__PURE__ */ jsxs2("div", { style, children: [
|
|
331
|
+
"\uC54C \uC218 \uC5C6\uB294 \uC139\uC158 type: ",
|
|
332
|
+
/* @__PURE__ */ jsx2("code", { children: type }),
|
|
333
|
+
" \u2014 SiteRenderer \uC758 customSections \uC5D0 \uB4F1\uB85D\uD558\uC138\uC694."
|
|
334
|
+
] });
|
|
335
|
+
}
|
|
336
|
+
function renderBuiltin(section, ctx) {
|
|
337
|
+
switch (section.type) {
|
|
338
|
+
case "hero":
|
|
339
|
+
return /* @__PURE__ */ jsx2(TemplateHero, { ...section });
|
|
340
|
+
case "rich-text":
|
|
341
|
+
return /* @__PURE__ */ jsx2(TemplateRichText, { ...section });
|
|
342
|
+
case "services":
|
|
343
|
+
return /* @__PURE__ */ jsx2(TemplateServices, { ...section });
|
|
344
|
+
case "faq":
|
|
345
|
+
return /* @__PURE__ */ jsx2(TemplateFaq, { ...section });
|
|
346
|
+
case "cta-banner":
|
|
347
|
+
return /* @__PURE__ */ jsx2(TemplateCtaBanner, { ...section });
|
|
348
|
+
case "blog-list": {
|
|
349
|
+
const s = section;
|
|
350
|
+
const base = s.props.blogBasePath ?? "/blog";
|
|
351
|
+
return /* @__PURE__ */ jsx2(
|
|
352
|
+
"section",
|
|
353
|
+
{
|
|
354
|
+
"data-roottale-tpl": "blog-list",
|
|
355
|
+
"data-roottale-cms": "list",
|
|
356
|
+
id: s.id,
|
|
357
|
+
className: "rt-tpl-section rt-tpl-blog-list",
|
|
358
|
+
style: sectionThemeStyle(s.theme),
|
|
359
|
+
children: /* @__PURE__ */ jsxs2("div", { className: "rt-tpl-container", children: [
|
|
360
|
+
s.props.heading ? /* @__PURE__ */ jsx2("h2", { className: "rt-tpl-heading", children: s.props.heading }) : null,
|
|
361
|
+
/* @__PURE__ */ jsx2(
|
|
362
|
+
RootTaleBlogList,
|
|
363
|
+
{
|
|
364
|
+
apiKey: ctx.apiKey,
|
|
365
|
+
baseUrl: ctx.baseUrl,
|
|
366
|
+
limit: s.props.limit,
|
|
367
|
+
emptyMessage: s.props.emptyMessage,
|
|
368
|
+
postHref: (post) => `${base}/${post.slug}`
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
] })
|
|
372
|
+
}
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
case "lead-form": {
|
|
376
|
+
const s = section;
|
|
377
|
+
return /* @__PURE__ */ jsx2(
|
|
378
|
+
"section",
|
|
379
|
+
{
|
|
380
|
+
"data-roottale-tpl": "lead-form",
|
|
381
|
+
"data-roottale-cms": "lead-form",
|
|
382
|
+
id: s.id,
|
|
383
|
+
className: "rt-tpl-section rt-tpl-lead-form",
|
|
384
|
+
style: sectionThemeStyle(s.theme),
|
|
385
|
+
children: /* @__PURE__ */ jsx2("div", { className: "rt-tpl-container", children: /* @__PURE__ */ jsx2(
|
|
386
|
+
RootTaleLeadForm,
|
|
387
|
+
{
|
|
388
|
+
action: s.props.action,
|
|
389
|
+
vertical: s.props.vertical,
|
|
390
|
+
heading: s.props.heading,
|
|
391
|
+
description: s.props.description,
|
|
392
|
+
submitLabel: s.props.submitLabel
|
|
393
|
+
}
|
|
394
|
+
) })
|
|
395
|
+
}
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
default:
|
|
399
|
+
return void 0;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
function SiteRenderer(props) {
|
|
403
|
+
const {
|
|
404
|
+
path,
|
|
405
|
+
apiKey,
|
|
406
|
+
baseUrl,
|
|
407
|
+
customSections = {},
|
|
408
|
+
unknownSection = "warn-dev"
|
|
409
|
+
} = props;
|
|
410
|
+
const config = parseSiteConfig(props.config);
|
|
411
|
+
const sections = config.pages[path] ?? [];
|
|
412
|
+
return /* @__PURE__ */ jsxs2(Fragment3, { children: [
|
|
413
|
+
sections.length === 0 ? /* @__PURE__ */ jsx2(
|
|
414
|
+
UnknownSection,
|
|
415
|
+
{
|
|
416
|
+
type: `pages["${path}"] (\uC139\uC158 0\uAC1C)`,
|
|
417
|
+
mode: unknownSection
|
|
418
|
+
}
|
|
419
|
+
) : null,
|
|
420
|
+
sections.map((section, i) => {
|
|
421
|
+
const key = section.id ?? `${section.type}-${i}`;
|
|
422
|
+
const builtin = renderBuiltin(section, { apiKey, baseUrl });
|
|
423
|
+
if (builtin !== void 0) {
|
|
424
|
+
return /* @__PURE__ */ jsx2(Fragment2, { children: builtin }, key);
|
|
425
|
+
}
|
|
426
|
+
const Custom = customSections[section.type];
|
|
427
|
+
if (Custom) {
|
|
428
|
+
return /* @__PURE__ */ jsx2(Fragment2, { children: Custom({
|
|
429
|
+
id: section.id,
|
|
430
|
+
props: section.props,
|
|
431
|
+
variant: section.variant,
|
|
432
|
+
theme: section.theme
|
|
433
|
+
}) }, key);
|
|
434
|
+
}
|
|
435
|
+
return /* @__PURE__ */ jsx2(UnknownSection, { type: section.type, mode: unknownSection }, key);
|
|
436
|
+
})
|
|
437
|
+
] });
|
|
438
|
+
}
|
|
439
|
+
export {
|
|
440
|
+
BUILTIN_SECTION_TYPES,
|
|
441
|
+
BlogListSectionSchema,
|
|
442
|
+
CtaBannerSectionSchema,
|
|
443
|
+
CustomSectionSchema,
|
|
444
|
+
FaqSectionSchema,
|
|
445
|
+
HeroSectionSchema,
|
|
446
|
+
LeadFormSectionSchema,
|
|
447
|
+
NavItemSchema,
|
|
448
|
+
RichTextSectionSchema,
|
|
449
|
+
SectionSchema,
|
|
450
|
+
ServicesSectionSchema,
|
|
451
|
+
SiteConfigSchema,
|
|
452
|
+
SiteRenderer,
|
|
453
|
+
TemplateCtaBanner,
|
|
454
|
+
TemplateFaq,
|
|
455
|
+
TemplateHero,
|
|
456
|
+
TemplateRichText,
|
|
457
|
+
TemplateServices,
|
|
458
|
+
defineSiteConfig,
|
|
459
|
+
parseSiteConfig,
|
|
460
|
+
sectionThemeStyle
|
|
461
|
+
};
|
|
462
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/templates/site-config.ts","../src/templates/sections.tsx","../src/templates/SiteRenderer.tsx"],"sourcesContent":["/**\n * `@roottale/cms-renderer-next/templates` — canonical `SiteConfig` 스키마.\n *\n * ADR-0040 P2 + P0.5 RFC §① (`roottale-docs/docs/services/external-site-blockification.md`).\n *\n * 설계 원칙 (codex consult #1 반영):\n * - **계약 = `section type + variant + renderer registry`.** tier 는 스키마 필드가\n * 아니라 문서/거버넌스용 성숙도 메타데이터.\n * - **100% serializable** — 함수/JSX 금지 (Astro parity + admin preview 동일 경로).\n * escape hatch 는 config 안 함수가 아니라 `customSections` registry\n * (`SiteRenderer` 에 빌드 시 type→컴포넌트 주입).\n * - CMS-bound 섹션(`blog-list`/`lead-form`)은 `RootTaleBlogList`/`RootTaleLeadForm`\n * 으로 위임 — templates 는 cms-renderer 코어를 단방향 의존 (RFC §②).\n *\n * RFC §① 대비 구현 정정:\n * - `site.url` 은 optional — 스타터/외부 사이트가 `SITE_URL` env 로 런타임 해석하는\n * 기존 패턴(P4 스타터)과 충돌하므로 config 강제 대신 env fallback 허용.\n * - 빌트인에 `rich-text` 추가 (P4 스타터 기 운영 섹션 — \"동일 패턴\" 군).\n */\nimport { z } from \"zod\";\n\nconst JsonValue: z.ZodType<unknown> = z.lazy(() =>\n z.union([\n z.string(),\n z.number(),\n z.boolean(),\n z.null(),\n z.array(JsonValue),\n z.record(JsonValue),\n ]),\n);\n\nexport const NavItemSchema = z.object({\n label: z.string(),\n href: z.string(),\n children: z\n .array(z.object({ label: z.string(), href: z.string() }))\n .optional(),\n});\nexport type NavItem = z.infer<typeof NavItemSchema>;\n\nconst CtaSchema = z.object({ label: z.string(), href: z.string() });\nexport type SectionCta = z.infer<typeof CtaSchema>;\n\n/**\n * 모든 섹션 공통 필드. `theme` 는 섹션 스코프 CSS 변수 override —\n * key 는 `--rt-*` custom property 이름, 값은 CSS 값.\n * 예) `{ \"--rt-color-primary\": \"#0B1F49\" }`\n */\nconst SectionBase = z.object({\n /** 안정적 anchor·dedup·preview 매핑용. 페이지 내 유일. */\n id: z.string().optional(),\n /** 빌트인 또는 customSections registry 키. kebab-case. */\n type: z.string(),\n /** 같은 type 의 비주얼 변형. 빌트인 type 은 enum 으로 좁힘. */\n variant: z.string().optional(),\n /** 섹션 스코프 토큰 override (`--rt-*` CSS 변수 → 값). */\n theme: z.record(z.string()).optional(),\n /** 섹션별 직렬화 props. */\n props: z.record(JsonValue).default({}),\n});\n\n// ── 빌트인 섹션 (props 좁힘 — 런타임 + 타입) ────────────────────────────────\n\nexport const HeroSectionSchema = SectionBase.extend({\n type: z.literal(\"hero\"),\n variant: z.enum([\"split\", \"image\", \"minimal\"]).default(\"split\"),\n props: z.object({\n eyebrow: z.string().optional(),\n /** `\\n` 으로 줄바꿈. */\n title: z.string(),\n description: z.string().optional(),\n imageSrc: z.string().optional(),\n imageAlt: z.string().optional(),\n cta: CtaSchema.optional(),\n }),\n});\n\nexport const RichTextSectionSchema = SectionBase.extend({\n type: z.literal(\"rich-text\"),\n props: z.object({\n heading: z.string().optional(),\n /** `\\n\\n` 으로 문단 분리. */\n body: z.string(),\n }),\n});\n\nexport const ServicesSectionSchema = SectionBase.extend({\n type: z.literal(\"services\"),\n variant: z.enum([\"grid\", \"list\"]).default(\"grid\"),\n props: z.object({\n heading: z.string().optional(),\n description: z.string().optional(),\n items: z\n .array(\n z.object({\n title: z.string(),\n description: z.string().optional(),\n href: z.string().optional(),\n }),\n )\n .min(1),\n }),\n});\n\nexport const FaqSectionSchema = SectionBase.extend({\n type: z.literal(\"faq\"),\n props: z.object({\n heading: z.string().optional(),\n items: z\n .array(z.object({ question: z.string(), answer: z.string() }))\n .min(1),\n /** FAQPage JSON-LD 주입 (기본 true — SEO 3 pillars). 페이지에 FAQ 섹션이 여럿이면 하나만 true 로. */\n jsonLd: z.boolean().default(true),\n }),\n});\n\nexport const CtaBannerSectionSchema = SectionBase.extend({\n type: z.literal(\"cta-banner\"),\n props: z.object({\n title: z.string(),\n description: z.string().optional(),\n cta: CtaSchema.optional(),\n }),\n});\n\n/** → `RootTaleBlogList` 위임 (cms-bound). */\nexport const BlogListSectionSchema = SectionBase.extend({\n type: z.literal(\"blog-list\"),\n props: z.object({\n heading: z.string().optional(),\n limit: z.number().int().positive().optional(),\n /** 포스트 링크 베이스. 기본 `/blog`. */\n blogBasePath: z.string().optional(),\n emptyMessage: z.string().optional(),\n }),\n});\n\n/** → `RootTaleLeadForm` 위임 (cms-bound). */\nexport const LeadFormSectionSchema = SectionBase.extend({\n type: z.literal(\"lead-form\"),\n props: z.object({\n /** 사이트 자체 server 엔드포인트 (예: `/api/inquiry`). intake API 직접 지정 금지. */\n action: z.string(),\n vertical: z.enum([\"consulting\", \"medical\", \"tax\", \"legal\"]).optional(),\n heading: z.string().optional(),\n description: z.string().optional(),\n submitLabel: z.string().optional(),\n }),\n});\n\n/** customSections 용 fallback — `type` 자유, props 는 직렬화만 강제. */\nexport const CustomSectionSchema = SectionBase;\n\nconst BUILTIN_SECTION_SCHEMAS: Record<string, z.ZodTypeAny> = {\n hero: HeroSectionSchema,\n \"rich-text\": RichTextSectionSchema,\n services: ServicesSectionSchema,\n faq: FaqSectionSchema,\n \"cta-banner\": CtaBannerSectionSchema,\n \"blog-list\": BlogListSectionSchema,\n \"lead-form\": LeadFormSectionSchema,\n};\n\n/** 빌트인 type 목록 (renderer registry 와 1:1). */\nexport const BUILTIN_SECTION_TYPES = Object.keys(\n BUILTIN_SECTION_SCHEMAS,\n) as readonly string[];\n\nexport type HeroSection = z.output<typeof HeroSectionSchema>;\nexport type RichTextSection = z.output<typeof RichTextSectionSchema>;\nexport type ServicesSection = z.output<typeof ServicesSectionSchema>;\nexport type FaqSection = z.output<typeof FaqSectionSchema>;\nexport type CtaBannerSection = z.output<typeof CtaBannerSectionSchema>;\nexport type BlogListSection = z.output<typeof BlogListSectionSchema>;\nexport type LeadFormSection = z.output<typeof LeadFormSectionSchema>;\nexport type CustomSection = z.output<typeof CustomSectionSchema>;\n\n/** 파싱 결과 섹션 (defaults 적용 후). */\nexport type Section =\n | HeroSection\n | RichTextSection\n | ServicesSection\n | FaqSection\n | CtaBannerSection\n | BlogListSection\n | LeadFormSection\n | CustomSection;\n\n/** config 작성용 섹션 (defaults 생략 가능). `site.config.ts` 에서 이 타입 사용. */\nexport type SectionInput =\n | z.input<typeof HeroSectionSchema>\n | z.input<typeof RichTextSectionSchema>\n | z.input<typeof ServicesSectionSchema>\n | z.input<typeof FaqSectionSchema>\n | z.input<typeof CtaBannerSectionSchema>\n | z.input<typeof BlogListSectionSchema>\n | z.input<typeof LeadFormSectionSchema>\n | z.input<typeof CustomSectionSchema>;\n\n/**\n * 섹션 스키마 — 빌트인 type 이면 해당 스키마로 *강제* 검증 (union fallthrough 로\n * 빌트인 오타이핑이 CustomSection 으로 조용히 통과하는 것을 차단), 미지 type 은\n * CustomSection 으로 통과 (렌더러가 customSections registry 로 해석).\n */\nexport const SectionSchema: z.ZodType<Section, z.ZodTypeDef, SectionInput> = z\n .object({ type: z.string() })\n .passthrough()\n .transform((section, ctx) => {\n const schema = BUILTIN_SECTION_SCHEMAS[section.type] ?? CustomSectionSchema;\n const result = schema.safeParse(section);\n if (!result.success) {\n for (const issue of result.error.issues) ctx.addIssue(issue);\n return z.NEVER;\n }\n return result.data as Section;\n }) as unknown as z.ZodType<Section, z.ZodTypeDef, SectionInput>;\n\nexport const SiteConfigSchema = z.object({\n site: z.object({\n /** canonical origin. 생략 시 소비측이 `SITE_URL` env 등으로 해석. */\n url: z.string().url().optional(),\n title: z.string(),\n description: z.string().optional(),\n locale: z.string().default(\"ko-KR\"),\n og: z.object({ image: z.string().optional() }).optional(),\n }),\n /** 사이트 전역 토큰 override (`--rt-*` CSS 변수 → 값). 비우면 admin /design SSoT. */\n theme: z.record(z.string()).default({}),\n nav: z.array(NavItemSchema).default([]),\n /** path(\"/\", \"/services\", …) → 섹션 배열. */\n pages: z.record(z.array(SectionSchema)),\n});\n\nexport type SiteConfig = z.output<typeof SiteConfigSchema>;\n/** config 작성용 (defaults 생략 가능). */\nexport type SiteConfigInput = Omit<\n z.input<typeof SiteConfigSchema>,\n \"pages\"\n> & { pages: Record<string, SectionInput[]> };\n\n/** config 검증 + defaults 적용. 실패 시 ZodError throw (빌드 타임 fail-fast 용). */\nexport function parseSiteConfig(input: unknown): SiteConfig {\n return SiteConfigSchema.parse(input);\n}\n\n/**\n * `site.config.ts` 작성 헬퍼 — 타입 추론 + 즉시 검증.\n *\n * ```ts\n * import { defineSiteConfig } from \"@roottale/cms-renderer-next/templates\";\n * export default defineSiteConfig({ site: { title: \"…\" }, pages: { \"/\": [ … ] } });\n * ```\n */\nexport function defineSiteConfig(input: SiteConfigInput): SiteConfig {\n return parseSiteConfig(input);\n}\n","/**\n * 빌트인 섹션 템플릿 — MUI-free, 0 JS RSC (ADR-0040 P2).\n *\n * 클래스는 전부 `rt-tpl-*` prefix, 스코프는 섹션 루트의 `data-roottale-tpl`\n * (templates.css 가 `[data-roottale-tpl] :where(…)` 로 zero-specificity 적용 —\n * customer 는 plain class / Tailwind utility 로 자유 override, cms-public.css\n * 와 동일 계약).\n *\n * 토큰은 `--rt-*` CSS 변수 + 정적 fallback — `@roottale/tokens`(private) 미의존\n * (RFC §②). admin /design 값은 `RootTaleThemeProvider` 가 주입.\n */\nimport type { CSSProperties, ReactElement } from \"react\";\n\nimport type {\n CtaBannerSection,\n FaqSection,\n HeroSection,\n RichTextSection,\n SectionCta,\n ServicesSection,\n} from \"./site-config.js\";\n\n/** 섹션 `theme`(--rt-* 변수 override)를 inline style 로. */\nexport function sectionThemeStyle(\n theme: Record<string, string> | undefined,\n): CSSProperties | undefined {\n if (!theme) return undefined;\n const style: Record<string, string> = {};\n for (const [key, value] of Object.entries(theme)) {\n if (key.startsWith(\"--\")) style[key] = value;\n }\n return Object.keys(style).length > 0 ? (style as CSSProperties) : undefined;\n}\n\nfunction CtaLink({\n cta,\n className,\n}: {\n cta: SectionCta;\n className?: string;\n}): ReactElement {\n return (\n <a className={className ?? \"rt-tpl-btn rt-tpl-btn--primary\"} href={cta.href}>\n {cta.label}\n </a>\n );\n}\n\n/** 빌트인 `hero`. variant: split(기본) / image / minimal. */\nexport function TemplateHero(section: HeroSection): ReactElement {\n const { eyebrow, title, description, imageSrc, imageAlt, cta } =\n section.props;\n const variant = section.variant;\n const showImage = variant !== \"minimal\" && imageSrc;\n return (\n <section\n data-roottale-tpl=\"hero\"\n data-variant={variant}\n id={section.id}\n className=\"rt-tpl-section rt-tpl-hero\"\n style={sectionThemeStyle(section.theme)}\n >\n <div className=\"rt-tpl-container rt-tpl-hero-inner\">\n <div className=\"rt-tpl-hero-copy\">\n {eyebrow ? <p className=\"rt-tpl-hero-eyebrow\">{eyebrow}</p> : null}\n <h1 className=\"rt-tpl-hero-title\">\n {title.split(\"\\n\").map((line, i) => (\n <span key={i} className=\"rt-tpl-hero-title-line\">\n {line}\n </span>\n ))}\n </h1>\n {description ? (\n <p className=\"rt-tpl-hero-desc\">{description}</p>\n ) : null}\n {cta ? <CtaLink cta={cta} /> : null}\n </div>\n {showImage ? (\n <div className=\"rt-tpl-hero-media\">\n <img\n className=\"rt-tpl-hero-img\"\n src={imageSrc}\n alt={imageAlt ?? \"\"}\n loading=\"eager\"\n />\n </div>\n ) : null}\n </div>\n </section>\n );\n}\n\n/** 빌트인 `rich-text`. 문단은 `\\n\\n` 분리. */\nexport function TemplateRichText(section: RichTextSection): ReactElement {\n const { heading, body } = section.props;\n return (\n <section\n data-roottale-tpl=\"rich-text\"\n id={section.id}\n className=\"rt-tpl-section rt-tpl-rich-text\"\n style={sectionThemeStyle(section.theme)}\n >\n <div className=\"rt-tpl-container\">\n {heading ? <h2 className=\"rt-tpl-heading\">{heading}</h2> : null}\n {body.split(\"\\n\\n\").map((para, i) => (\n <p key={i} className=\"rt-tpl-rich-text-p\">\n {para}\n </p>\n ))}\n </div>\n </section>\n );\n}\n\n/** 빌트인 `services`. variant: grid(기본) / list. */\nexport function TemplateServices(section: ServicesSection): ReactElement {\n const { heading, description, items } = section.props;\n return (\n <section\n data-roottale-tpl=\"services\"\n data-variant={section.variant}\n id={section.id}\n className=\"rt-tpl-section rt-tpl-services\"\n style={sectionThemeStyle(section.theme)}\n >\n <div className=\"rt-tpl-container\">\n {heading ? <h2 className=\"rt-tpl-heading\">{heading}</h2> : null}\n {description ? (\n <p className=\"rt-tpl-section-desc\">{description}</p>\n ) : null}\n <ul className=\"rt-tpl-services-list\">\n {items.map((item, i) => {\n const body = (\n <>\n <h3 className=\"rt-tpl-services-title\">{item.title}</h3>\n {item.description ? (\n <p className=\"rt-tpl-services-desc\">{item.description}</p>\n ) : null}\n </>\n );\n return (\n <li key={i} className=\"rt-tpl-services-item\">\n {item.href ? (\n <a className=\"rt-tpl-services-link\" href={item.href}>\n {body}\n </a>\n ) : (\n body\n )}\n </li>\n );\n })}\n </ul>\n </div>\n </section>\n );\n}\n\n/** 빌트인 `faq`. `<details>` 0 JS + FAQPage JSON-LD (기본 on). */\nexport function TemplateFaq(section: FaqSection): ReactElement {\n const { heading, items, jsonLd } = section.props;\n return (\n <section\n data-roottale-tpl=\"faq\"\n id={section.id}\n className=\"rt-tpl-section rt-tpl-faq\"\n style={sectionThemeStyle(section.theme)}\n >\n <div className=\"rt-tpl-container\">\n {heading ? <h2 className=\"rt-tpl-heading\">{heading}</h2> : null}\n <div className=\"rt-tpl-faq-list\">\n {items.map((item, i) => (\n <details key={i} className=\"rt-tpl-faq-item\">\n <summary className=\"rt-tpl-faq-q\">{item.question}</summary>\n <p className=\"rt-tpl-faq-a\">{item.answer}</p>\n </details>\n ))}\n </div>\n </div>\n {jsonLd ? (\n <script\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify({\n \"@context\": \"https://schema.org\",\n \"@type\": \"FAQPage\",\n mainEntity: items.map((item) => ({\n \"@type\": \"Question\",\n name: item.question,\n acceptedAnswer: { \"@type\": \"Answer\", text: item.answer },\n })),\n }),\n }}\n />\n ) : null}\n </section>\n );\n}\n\n/** 빌트인 `cta-banner`. */\nexport function TemplateCtaBanner(section: CtaBannerSection): ReactElement {\n const { title, description, cta } = section.props;\n return (\n <section\n data-roottale-tpl=\"cta-banner\"\n id={section.id}\n className=\"rt-tpl-section rt-tpl-cta-banner\"\n style={sectionThemeStyle(section.theme)}\n >\n <div className=\"rt-tpl-container rt-tpl-cta-banner-inner\">\n <h2 className=\"rt-tpl-cta-banner-title\">{title}</h2>\n {description ? (\n <p className=\"rt-tpl-cta-banner-desc\">{description}</p>\n ) : null}\n {cta ? <CtaLink cta={cta} /> : null}\n </div>\n </section>\n );\n}\n","/**\n * `SiteRenderer` — `SiteConfig.pages[path]` 섹션 배열을 registry 로 렌더.\n *\n * ADR-0040 P2 + P0.5 RFC §①:\n * - 빌트인 registry + 클라 주입 `customSections` 머지. **빌트인이 우선** —\n * 클라가 빌트인 type 을 가로채 계약이 갈라지는 것 방지 (고유 섹션은 고유\n * type 으로).\n * - **render-prop 금지**: 임의 JSX escape hatch 는 customSections registry 로만.\n * - **admin preview parity**: admin draft/preview 도 동일 `SiteRenderer` + 동일\n * 빌트인 registry 를 탄다. customSections 는 클라 repo 자산 — preview 에선\n * 미주입 → `unknownSection: \"placeholder\"` 로 skeleton 표시.\n * - cms-bound 섹션(blog-list/lead-form)은 `RootTaleBlogList`/`RootTaleLeadForm`\n * 위임 (단방향: templates → renderer 코어).\n */\nimport {\n Fragment,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from \"react\";\n\nimport { RootTaleLeadForm } from \"../LeadForm.js\";\nimport { RootTaleBlogList } from \"../server.js\";\nimport {\n TemplateCtaBanner,\n TemplateFaq,\n TemplateHero,\n TemplateRichText,\n TemplateServices,\n sectionThemeStyle,\n} from \"./sections.js\";\nimport {\n type BlogListSection,\n type CtaBannerSection,\n type FaqSection,\n type HeroSection,\n type LeadFormSection,\n type RichTextSection,\n type Section,\n type ServicesSection,\n type SiteConfig,\n type SiteConfigInput,\n parseSiteConfig,\n} from \"./site-config.js\";\n\n/** customSections registry 컴포넌트 계약 (RFC §①). */\nexport type SectionComponent = (p: {\n id?: string;\n props: Record<string, unknown>;\n variant?: string;\n theme?: Record<string, string>;\n}) => ReactNode;\n\nexport interface SiteRendererProps {\n /** `defineSiteConfig()` 결과 또는 raw config (내부에서 검증). */\n config: SiteConfig | SiteConfigInput;\n /** 현재 페이지 경로 — `config.pages` 의 key (\"/\", \"/services\", …). */\n path: string;\n /** cms-bound 섹션(blog-list/lead-form 의 theme fetch) 위임용. 서버 전용. */\n apiKey: string;\n /** self-host 등 API base override (`ROOTTALE_API_BASE`). */\n baseUrl?: string;\n /** 클라 repo 고유 섹션 registry (escape hatch). 빌트인 type 은 가로챌 수 없음. */\n customSections?: Record<string, SectionComponent>;\n /**\n * registry 에 없는 type 처리. 기본 \"warn-dev\" = dev 에서 경고 박스, prod 에서\n * 생략. admin preview 는 \"placeholder\" (customSections 미주입 환경).\n */\n unknownSection?: \"warn-dev\" | \"placeholder\" | \"ignore\";\n}\n\nfunction isDev(): boolean {\n // dts 빌드는 node types 없이 돈다 — process 는 globalThis 경유로 안전 접근.\n const env =\n (globalThis as { process?: { env?: Record<string, string | undefined> } })\n .process?.env ?? {};\n return env.NODE_ENV !== \"production\";\n}\n\nfunction UnknownSection({\n type,\n mode,\n}: {\n type: string;\n mode: \"warn-dev\" | \"placeholder\" | \"ignore\";\n}): ReactElement | null {\n if (mode === \"ignore\") return null;\n if (mode === \"placeholder\") {\n return (\n <section\n data-roottale-tpl=\"placeholder\"\n className=\"rt-tpl-section rt-tpl-placeholder\"\n aria-hidden\n >\n <div className=\"rt-tpl-container\">\n <div className=\"rt-tpl-placeholder-box\">{type}</div>\n </div>\n </section>\n );\n }\n if (!isDev()) return null;\n const style: CSSProperties = {\n padding: \"1rem\",\n border: \"1px dashed #c00\",\n color: \"#c00\",\n };\n return (\n <div style={style}>\n 알 수 없는 섹션 type: <code>{type}</code> — SiteRenderer 의 customSections\n 에 등록하세요.\n </div>\n );\n}\n\nfunction renderBuiltin(\n section: Section,\n ctx: { apiKey: string; baseUrl?: string },\n): ReactNode | undefined {\n switch (section.type) {\n case \"hero\":\n return <TemplateHero {...(section as HeroSection)} />;\n case \"rich-text\":\n return <TemplateRichText {...(section as RichTextSection)} />;\n case \"services\":\n return <TemplateServices {...(section as ServicesSection)} />;\n case \"faq\":\n return <TemplateFaq {...(section as FaqSection)} />;\n case \"cta-banner\":\n return <TemplateCtaBanner {...(section as CtaBannerSection)} />;\n case \"blog-list\": {\n const s = section as BlogListSection;\n const base = s.props.blogBasePath ?? \"/blog\";\n return (\n <section\n data-roottale-tpl=\"blog-list\"\n data-roottale-cms=\"list\"\n id={s.id}\n className=\"rt-tpl-section rt-tpl-blog-list\"\n style={sectionThemeStyle(s.theme)}\n >\n <div className=\"rt-tpl-container\">\n {s.props.heading ? (\n <h2 className=\"rt-tpl-heading\">{s.props.heading}</h2>\n ) : null}\n <RootTaleBlogList\n apiKey={ctx.apiKey}\n baseUrl={ctx.baseUrl}\n limit={s.props.limit}\n emptyMessage={s.props.emptyMessage}\n postHref={(post) => `${base}/${post.slug}`}\n />\n </div>\n </section>\n );\n }\n case \"lead-form\": {\n const s = section as LeadFormSection;\n return (\n <section\n data-roottale-tpl=\"lead-form\"\n data-roottale-cms=\"lead-form\"\n id={s.id}\n className=\"rt-tpl-section rt-tpl-lead-form\"\n style={sectionThemeStyle(s.theme)}\n >\n <div className=\"rt-tpl-container\">\n <RootTaleLeadForm\n action={s.props.action}\n vertical={s.props.vertical}\n heading={s.props.heading}\n description={s.props.description}\n submitLabel={s.props.submitLabel}\n />\n </div>\n </section>\n );\n }\n default:\n return undefined;\n }\n}\n\n/**\n * 한 페이지의 섹션 배열을 순서대로 렌더.\n *\n * ```tsx\n * // app/services/page.tsx\n * import config from \"@/site.config\";\n * import { SiteRenderer } from \"@roottale/cms-renderer-next/templates\";\n *\n * export default function ServicesPage() {\n * return (\n * <SiteRenderer config={config} path=\"/services\"\n * apiKey={process.env.ROOTTALE_API_KEY!} />\n * );\n * }\n * ```\n */\nexport function SiteRenderer(props: SiteRendererProps): ReactElement {\n const {\n path,\n apiKey,\n baseUrl,\n customSections = {},\n unknownSection = \"warn-dev\",\n } = props;\n const config = parseSiteConfig(props.config);\n const sections = config.pages[path] ?? [];\n return (\n <>\n {sections.length === 0 ? (\n <UnknownSection\n type={`pages[\"${path}\"] (섹션 0개)`}\n mode={unknownSection}\n />\n ) : null}\n {sections.map((section, i) => {\n const key = section.id ?? `${section.type}-${i}`;\n const builtin = renderBuiltin(section, { apiKey, baseUrl });\n if (builtin !== undefined) {\n return <Fragment key={key}>{builtin}</Fragment>;\n }\n const Custom = customSections[section.type];\n if (Custom) {\n return (\n <Fragment key={key}>\n {Custom({\n id: section.id,\n props: section.props as Record<string, unknown>,\n variant: section.variant,\n theme: section.theme,\n })}\n </Fragment>\n );\n }\n return (\n <UnknownSection key={key} type={section.type} mode={unknownSection} />\n );\n })}\n </>\n );\n}\n"],"mappings":";;;;;;;AAmBA,SAAS,SAAS;AAElB,IAAM,YAAgC,EAAE;AAAA,EAAK,MAC3C,EAAE,MAAM;AAAA,IACN,EAAE,OAAO;AAAA,IACT,EAAE,OAAO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C;AAC9C,YAAM,UAAU,cAAc,SAAS,EAAE,QAAQ,QAAQ,CAAC;AAC1D,UAAI,YAAY,QAAW;AACzB,eAAO,gBAAAA,KAACD,WAAA,EAAoB,qBAAN,GAAc;AAAA,MACtC;AACA,YAAM,SAAS,eAAe,QAAQ,IAAI;AAC1C,UAAI,QAAQ;AACV,eACE,gBAAAC,KAACD,WAAA,EACE,iBAAO;AAAA,UACN,IAAI,QAAQ;AAAA,UACZ,OAAO,QAAQ;AAAA,UACf,SAAS,QAAQ;AAAA,UACjB,OAAO,QAAQ;AAAA,QACjB,CAAC,KANY,GAOf;AAAA,MAEJ;AACA,aACE,gBAAAC,KAAC,kBAAyB,MAAM,QAAQ,MAAM,MAAM,kBAA/B,GAA+C;AAAA,IAExE,CAAC;AAAA,KACH;AAEJ;","names":["Fragment","Fragment","jsx","jsxs"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roottale/cms-renderer-next",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "RootTale CMS public-render React/Next.js Server Components. SSR-only RSC components (RootTaleBlogList / RootTaleBlogPost / RootTaleLeadForm) for external customer sites. Companion of @roottale/cms-renderer-astro (ADR-0034 §1.5 amended).",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,13 @@
|
|
|
26
26
|
"import": "./dist/mui.js",
|
|
27
27
|
"default": "./dist/mui.js"
|
|
28
28
|
},
|
|
29
|
+
"./templates": {
|
|
30
|
+
"types": "./dist/templates.d.ts",
|
|
31
|
+
"import": "./dist/templates.js",
|
|
32
|
+
"default": "./dist/templates.js"
|
|
33
|
+
},
|
|
29
34
|
"./styles": "./dist/cms-public.css",
|
|
35
|
+
"./templates/styles": "./dist/templates.css",
|
|
30
36
|
"./package.json": "./package.json"
|
|
31
37
|
},
|
|
32
38
|
"files": [
|
|
@@ -35,8 +41,9 @@
|
|
|
35
41
|
"CHANGELOG.md"
|
|
36
42
|
],
|
|
37
43
|
"dependencies": {
|
|
38
|
-
"
|
|
39
|
-
"@roottale/cms-client": "^0.20.0"
|
|
44
|
+
"zod": "^3.23.8",
|
|
45
|
+
"@roottale/cms-client": "^0.20.0",
|
|
46
|
+
"@roottale/cms-core": "^0.18.0"
|
|
40
47
|
},
|
|
41
48
|
"peerDependencies": {
|
|
42
49
|
"react": "^19.0.0"
|