@roottale/cms-renderer-next 0.61.1 → 0.63.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 +37 -0
- package/README.md +3 -0
- package/dist/chunk-L3I4W5NP.js +16 -0
- package/dist/chunk-L3I4W5NP.js.map +1 -0
- package/dist/chunk-SEPUIKVM.js +922 -0
- package/dist/chunk-SEPUIKVM.js.map +1 -0
- package/dist/chunk-UIBT23RJ.js +3 -0
- package/dist/chunk-UIBT23RJ.js.map +1 -0
- package/dist/cms-public.css +111 -13
- package/dist/exposure-client.d.ts +4 -9
- package/dist/exposure-client.js +5 -3
- package/dist/exposures.d.ts +51 -0
- package/dist/exposures.js +17 -0
- package/dist/exposures.js.map +1 -0
- package/dist/routes.d.ts +20 -1
- package/dist/routes.js +41 -2
- package/dist/routes.js.map +1 -1
- package/dist/server.d.ts +11 -4
- package/dist/server.js +16 -11
- package/dist/server.js.map +1 -1
- package/package.json +11 -4
- package/dist/chunk-GVKENK6H.js +0 -75
- package/dist/chunk-GVKENK6H.js.map +0 -1
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { CmsPostContent, RootTaleTheme, CmsPostType } from '@roottale/cms-client/server';
|
|
1
|
+
import { ReactElement, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { CmsPostContent, RootTaleTheme, CmsPostType, CmsSitePatternPresentation } from '@roottale/cms-client/server';
|
|
3
3
|
export { RootTaleTheme } from '@roottale/cms-client/server';
|
|
4
|
-
import { RootTaleThemeStyle } from '@roottale/ui-react/theme';
|
|
5
4
|
import { Block, BindingResolver, RouteCollection, InternalContentLinkResolver } from '@roottale/cms-core';
|
|
6
5
|
export { a as BlogCategory, B as BlogCategoryWithCount, c as collectCategories, b as collectCategoriesWithCounts, d as defaultCategoryHref, f as filterPostsByCategory, m as makeCategoryHref } from './blog-filter-qE9Lj49C.js';
|
|
7
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -81,7 +80,9 @@ interface RootTaleTableOfContentsProps {
|
|
|
81
80
|
}
|
|
82
81
|
declare function RootTaleTableOfContents(props: RootTaleTableOfContentsProps): ReactElement | null;
|
|
83
82
|
|
|
84
|
-
type RootTaleCssVars =
|
|
83
|
+
type RootTaleCssVars = CSSProperties & {
|
|
84
|
+
[customProperty: `--${string}`]: string | undefined;
|
|
85
|
+
};
|
|
85
86
|
declare function themeToCssVars(theme: RootTaleTheme | null): RootTaleCssVars | null;
|
|
86
87
|
|
|
87
88
|
/**
|
|
@@ -253,6 +254,10 @@ type RootTaleBlogPostProps = {
|
|
|
253
254
|
showTitle?: boolean;
|
|
254
255
|
showTableOfContents?: boolean;
|
|
255
256
|
tableOfContentsTitle?: string;
|
|
257
|
+
/** 사이트 코드가 정하는 목차 배치. 생략하면 기존 CMS 표시 설정을 유지한다. */
|
|
258
|
+
tocPosition?: "inline" | "sidebar";
|
|
259
|
+
/** 글 하단 공통 블록 디자인. 객체는 전체 대체, null은 사이트 CSS 사용, 생략은 기존 CMS 값 유지. */
|
|
260
|
+
footerPatternPresentation?: CmsSitePatternPresentation | null;
|
|
256
261
|
relatedPostsCount?: number;
|
|
257
262
|
relatedPostsTitle?: string;
|
|
258
263
|
postHref?: (post: CmsPostContent) => string;
|
|
@@ -293,6 +298,8 @@ interface RootTalePostPatternProps {
|
|
|
293
298
|
readonly post: Pick<CmsPostContent, "patternSlots">;
|
|
294
299
|
/** 자리 key. 기본 글 하단(`post_footer`). */
|
|
295
300
|
readonly slot?: string;
|
|
301
|
+
/** 객체는 CMS 디자인 전체 대체, null은 사이트 CSS 사용, 생략은 기존 CMS 값 유지. */
|
|
302
|
+
readonly presentation?: CmsSitePatternPresentation | null;
|
|
296
303
|
}
|
|
297
304
|
/**
|
|
298
305
|
* 자체 글 화면을 가진 사이트가 글 하단 공통 블록만 가져다 쓰는 서버 컴포넌트.
|
package/dist/server.js
CHANGED
|
@@ -14,9 +14,11 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
LeadFormMeta
|
|
16
16
|
} from "./chunk-VG6UUF4D.js";
|
|
17
|
+
import "./chunk-UIBT23RJ.js";
|
|
17
18
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
RootTaleLegacyExposure
|
|
20
|
+
} from "./chunk-SEPUIKVM.js";
|
|
21
|
+
import "./chunk-L3I4W5NP.js";
|
|
20
22
|
|
|
21
23
|
// src/PostCard.tsx
|
|
22
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1329,17 +1331,18 @@ async function resolvePostPatternFailSoft(post, input, slot = POST_FOOTER_PATTER
|
|
|
1329
1331
|
return null;
|
|
1330
1332
|
}
|
|
1331
1333
|
}
|
|
1332
|
-
function renderPostPattern(pattern, slot, input) {
|
|
1334
|
+
function renderPostPattern(pattern, slot, input, presentationOverride) {
|
|
1333
1335
|
if (!pattern) return null;
|
|
1334
|
-
const
|
|
1336
|
+
const presentationValue = presentationOverride === void 0 ? pattern.presentation : presentationOverride;
|
|
1337
|
+
const presentation = presentationValue === null ? null : sitePatternPresentationAttributes(presentationValue);
|
|
1335
1338
|
return /* @__PURE__ */ jsx13(
|
|
1336
1339
|
"aside",
|
|
1337
1340
|
{
|
|
1338
1341
|
"data-roottale-cms": "post-pattern",
|
|
1339
1342
|
"data-pattern-slot": slot,
|
|
1340
1343
|
"data-pattern-key": pattern.key,
|
|
1341
|
-
...presentation
|
|
1342
|
-
style: presentation
|
|
1344
|
+
...presentation?.dataset,
|
|
1345
|
+
style: presentation?.style,
|
|
1343
1346
|
className: "rt-cms-post-pattern",
|
|
1344
1347
|
"aria-label": pattern.name,
|
|
1345
1348
|
children: /* @__PURE__ */ jsx13(RenderTiptap, { doc: pattern.bodyJson, apiKey: input.apiKey, baseUrl: input.baseUrl })
|
|
@@ -1349,7 +1352,7 @@ function renderPostPattern(pattern, slot, input) {
|
|
|
1349
1352
|
async function RootTalePostPattern(props) {
|
|
1350
1353
|
const slot = props.slot ?? POST_FOOTER_PATTERN_SLOT;
|
|
1351
1354
|
const pattern = await resolvePostPatternFailSoft(props.post, props, slot);
|
|
1352
|
-
return renderPostPattern(pattern, slot, props);
|
|
1355
|
+
return renderPostPattern(pattern, slot, props, props.presentation);
|
|
1353
1356
|
}
|
|
1354
1357
|
|
|
1355
1358
|
// src/server/blog-post-archive.tsx
|
|
@@ -1773,6 +1776,8 @@ async function RootTaleBlogPost(props) {
|
|
|
1773
1776
|
showTitle = true,
|
|
1774
1777
|
showTableOfContents,
|
|
1775
1778
|
tableOfContentsTitle,
|
|
1779
|
+
tocPosition,
|
|
1780
|
+
footerPatternPresentation,
|
|
1776
1781
|
relatedPostsCount = 0,
|
|
1777
1782
|
locale,
|
|
1778
1783
|
relatedPostsTitle = t(locale, "relatedPostsTitle"),
|
|
@@ -1914,12 +1919,12 @@ async function RootTaleBlogPost(props) {
|
|
|
1914
1919
|
baseUrl,
|
|
1915
1920
|
toc,
|
|
1916
1921
|
tocTitle: display.tocTitle,
|
|
1917
|
-
tocPosition: display.tocPosition,
|
|
1922
|
+
tocPosition: tocPosition ?? display.tocPosition,
|
|
1918
1923
|
bodyHtml: post.bodyHtml,
|
|
1919
1924
|
internalLinks: internalLinkIndex
|
|
1920
1925
|
}
|
|
1921
1926
|
),
|
|
1922
|
-
renderPostPattern(footerPattern, POST_FOOTER_PATTERN_SLOT2, { apiKey, baseUrl }),
|
|
1927
|
+
renderPostPattern(footerPattern, POST_FOOTER_PATTERN_SLOT2, { apiKey, baseUrl }, footerPatternPresentation),
|
|
1923
1928
|
footerPattern ? null : renderPostCta(blogSettings.postCta),
|
|
1924
1929
|
showAuthorCard && authorName ? /* @__PURE__ */ jsxs13("section", { className: "rt-cms-author-card", "aria-label": "\uC791\uC131\uC790", children: [
|
|
1925
1930
|
authorImageUrl ? /* @__PURE__ */ jsx18(
|
|
@@ -2027,9 +2032,9 @@ async function RootTaleExposureSlot(props) {
|
|
|
2027
2032
|
slotKey: props.slotKey,
|
|
2028
2033
|
path: props.path,
|
|
2029
2034
|
revalidate: props.revalidate
|
|
2030
|
-
});
|
|
2035
|
+
}).catch(() => null);
|
|
2031
2036
|
if (!campaign || !props.allowedVariants.includes(campaign.content.variant)) return null;
|
|
2032
|
-
return /* @__PURE__ */ jsx21(
|
|
2037
|
+
return /* @__PURE__ */ jsx21(RootTaleLegacyExposure, { campaign, allowedVariants: props.allowedVariants });
|
|
2033
2038
|
}
|
|
2034
2039
|
export {
|
|
2035
2040
|
RenderTiptap,
|