@roottale/cms-client 0.72.0 → 0.73.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @roottale/cms-client
2
2
 
3
+ ## 0.73.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5806994: 공개 페이지의 색인을 사이트가 관리하는 `robots.forceIndex` 정책을 추가합니다. 개별 noindex와 분류 승격보다 우선하되 미리보기·미발행·콘텐츠 조건의 `forceNoindex`를 해제하지 않습니다. 관리자와 공개 head·사이트맵이 같은 정책을 사용할 수 있습니다.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [5806994]
12
+ - @roottale/cms-core@0.73.0
13
+
14
+ ## 0.72.1
15
+
16
+ ### Patch Changes
17
+
18
+ - ROOT-ADMIN 연동 설정의 GTM 컨테이너 ID를 theme.siteTracking으로 전달하고 안전한 표준 스니펫 헬퍼를 제공합니다.
19
+ - @roottale/cms-core@0.72.1
20
+
3
21
  ## 0.72.0
4
22
 
5
23
  ### Minor Changes
package/dist/server.d.ts CHANGED
@@ -352,6 +352,11 @@ interface RootTaleTheme {
352
352
  * 로 Next metadata `verification` 모양으로 바꿔 루트 layout 에 출력한다.
353
353
  */
354
354
  siteVerification?: SiteVerificationSettings;
355
+ siteTracking?: SiteTrackingSettings;
356
+ }
357
+ /** ROOT-ADMIN에서 저장한 공개 추적 태그 설정. */
358
+ interface SiteTrackingSettings {
359
+ googleTagManagerId?: string;
355
360
  }
356
361
  /** 엔진별 소유 확인 코드(고객·RootTale 계정이 각각 확인할 수 있어 여러 개). */
357
362
  interface SiteVerificationSettings {
@@ -1649,6 +1654,12 @@ interface SiteVerificationMetadata {
1649
1654
  */
1650
1655
  declare function siteVerificationMetadata(settings: SiteVerificationSettings | undefined): SiteVerificationMetadata | undefined;
1651
1656
 
1657
+ /** Google의 표준 스니펫. 공개 컨테이너 ID만 허용한다. */
1658
+ declare function googleTagManagerSnippet(id: string | undefined): {
1659
+ script: string;
1660
+ iframeUrl: string;
1661
+ } | undefined;
1662
+
1652
1663
  /**
1653
1664
  * `@roottale/cms-client` — 리드(문의) 접수 server-side 헬퍼.
1654
1665
  *
@@ -1757,4 +1768,4 @@ declare function formatKoreanPhoneNumber(input: string): string;
1757
1768
  */
1758
1769
  declare function submitInquiry(options: SubmitInquiryOptions): Promise<SubmitInquiryResult>;
1759
1770
 
1760
- export { type ActionDockAction, type ActionDockKind, type ActionDockPosition, type ActionDockSettings, type AnalyticsTagConfig, type AnalyticsTagProvider, type AnnouncementItem, type AnnouncementSettings, type AnnouncementTone, type AnnouncementVariant, type ArticleSchemaInput, BLOG_SETTINGS_CACHE_TAG, BUSINESS_CACHE_TAG, type BusinessDayCode, type BusinessOpeningHours, type BusinessType, CMS_CLIENT_VERSION, COLLECTIONS_CACHE_TAG, CONTENT_POLICY_CACHE_TAG, CmsApiError, type CmsArchiveRelatedGroup, type CmsArchiveRelatedPost, type CmsCategoryCount, type CmsCategoryCounts, type CmsContentEditorState, type CmsContentModel, type CmsExposureCampaign, type CmsExposureDecision, type CmsFieldMetaEntry, type CmsPostContent, type CmsPostContentPage, type CmsPostPreviewContent, type CmsPostPreviewInfo, type CmsPostPreviewVisualTarget, type CmsPostTranslationRef, type CmsPostType, type CmsRouteCollection, type CmsSearchHit, type CmsSitePattern, type CmsSitePatternPresentation, type CmsTaxonomyKind, type CmsTermRef, type ContentEditorStateParseResult, DEFAULT_BLOG_SETTINGS, DEFAULT_SITE_PATTERN_PRESENTATION, EXPOSURE_CACHE_TAG, type FetchAllPostsOptions, type FetchAnalyticsOptions, type FetchAuthorsOptions, type FetchBlogSettingsOptions, type FetchBusinessProfileOptions, type FetchCategoryCountsOptions, type FetchCollectionsOptions, type FetchContentModelsOptions, type FetchExposureDecisionOptions, type FetchExposureOptions, type FetchInquiryFormOptions, type FetchMenuOptions, type FetchMenusOptions, type FetchPageBySlugOptions, type FetchPostOptions, type FetchPostPreviewOptions, type FetchPostsOptions, type FetchRedirectsOptions, type FetchRouteMetadataOptions, type FetchSiteInquiriesOptions, type FetchSiteInquiryOptions, type FetchSitePatternsOptions, type FetchThemeOptions, type FormInquiryReceipt, INQUIRY_ERROR_MESSAGES, InquiryAttribution, type InquiryBoardSettings, type InquiryVertical, LOCAL_BUSINESS_MAX_SERVICES, LOCAL_BUSINESS_SERVICE_MAX_LENGTH, type LocalBusinessProfileInput, MENUS_CACHE_TAG, METADATA_CACHE_TAG, POST_FOOTER_PATTERN_SLOT, type PublishedInquiryForm, type ResolvedPostDisplay, type RootTaleAuthor, type RootTaleBlogPostCta, type RootTaleBlogSettings, type RootTaleBusinessProfile, type RootTaleMenu, type RootTaleMenuItem, type RootTaleRedirect, type RootTaleSiteProfile, type RootTaleSitemapSettings, type RootTaleTheme, type RssFeedInput, type RssItemInput, SETTINGS_CACHE_TAGS, SITE_METADATA_DEFAULTS_CACHE_TAG, SITE_PATTERNS_CACHE_TAG, type SearchPostsOptions, type SiteAnalyticsTags, type SiteInquiryDetail, type SiteInquiryListItem, type SiteInquiryListPage, type SiteInquiryStatus, type SiteNavColumn, type SiteNavCta, type SiteNavGroup, type SiteNavLink, type SiteNavSettings, type SiteVerificationMetadata, type SiteVerificationSettings, type SubmitFormInquiryFields, type SubmitFormInquiryOptions, type SubmitFormInquiryResult, type SubmitInquiryFields, type SubmitInquiryOptions, type SubmitInquiryResult, type SubmitSiteInquiryFields, type SubmitSiteInquiryOptions, type SubmitSiteInquiryResult, THEME_CACHE_TAG, articleSchema, breadcrumbSchema, businessProfileFromWire, collectionPageSchema, contentIdMeta, faqSchema, fetchAllPosts, fetchAnalyticsConfig, fetchAuthors, fetchBlogSettings, fetchBusinessProfile, fetchCategoryCounts, fetchCollections, fetchCollectionsSafeDefault, fetchContentModels, fetchExposure, fetchExposureDecision, fetchInquiryForm, fetchMenu, fetchMenus, fetchPageBySlug, fetchPost, fetchPostPreview, fetchPosts, fetchRedirects, fetchRouteMetadata, fetchSiteInquiries, fetchSiteInquiry, fetchSitePatterns, fetchTheme, formatKoreanPhoneNumber, generateRssXml, inquiryErrorMessage, isPreviewExpiredError, isPreviewSupersededError, jsonLdJson, jsonLdScript, localBusinessSchema, metadataContractChecksum, organizationSchema, parseContentEditorState, parseInquiryRedirect, profilePageSchema, resolvePostDisplay, resolveSearchHitPath, routeMetadataCacheTag, rssItemsFromPosts, searchPosts, selectRelatedPosts, selectSitePatternForSlot, sitePatternPresentationAttributes, siteVerificationMetadata, submitFormInquiry, submitInquiry, submitSiteInquiry, websiteSchema };
1771
+ export { type ActionDockAction, type ActionDockKind, type ActionDockPosition, type ActionDockSettings, type AnalyticsTagConfig, type AnalyticsTagProvider, type AnnouncementItem, type AnnouncementSettings, type AnnouncementTone, type AnnouncementVariant, type ArticleSchemaInput, BLOG_SETTINGS_CACHE_TAG, BUSINESS_CACHE_TAG, type BusinessDayCode, type BusinessOpeningHours, type BusinessType, CMS_CLIENT_VERSION, COLLECTIONS_CACHE_TAG, CONTENT_POLICY_CACHE_TAG, CmsApiError, type CmsArchiveRelatedGroup, type CmsArchiveRelatedPost, type CmsCategoryCount, type CmsCategoryCounts, type CmsContentEditorState, type CmsContentModel, type CmsExposureCampaign, type CmsExposureDecision, type CmsFieldMetaEntry, type CmsPostContent, type CmsPostContentPage, type CmsPostPreviewContent, type CmsPostPreviewInfo, type CmsPostPreviewVisualTarget, type CmsPostTranslationRef, type CmsPostType, type CmsRouteCollection, type CmsSearchHit, type CmsSitePattern, type CmsSitePatternPresentation, type CmsTaxonomyKind, type CmsTermRef, type ContentEditorStateParseResult, DEFAULT_BLOG_SETTINGS, DEFAULT_SITE_PATTERN_PRESENTATION, EXPOSURE_CACHE_TAG, type FetchAllPostsOptions, type FetchAnalyticsOptions, type FetchAuthorsOptions, type FetchBlogSettingsOptions, type FetchBusinessProfileOptions, type FetchCategoryCountsOptions, type FetchCollectionsOptions, type FetchContentModelsOptions, type FetchExposureDecisionOptions, type FetchExposureOptions, type FetchInquiryFormOptions, type FetchMenuOptions, type FetchMenusOptions, type FetchPageBySlugOptions, type FetchPostOptions, type FetchPostPreviewOptions, type FetchPostsOptions, type FetchRedirectsOptions, type FetchRouteMetadataOptions, type FetchSiteInquiriesOptions, type FetchSiteInquiryOptions, type FetchSitePatternsOptions, type FetchThemeOptions, type FormInquiryReceipt, INQUIRY_ERROR_MESSAGES, InquiryAttribution, type InquiryBoardSettings, type InquiryVertical, LOCAL_BUSINESS_MAX_SERVICES, LOCAL_BUSINESS_SERVICE_MAX_LENGTH, type LocalBusinessProfileInput, MENUS_CACHE_TAG, METADATA_CACHE_TAG, POST_FOOTER_PATTERN_SLOT, type PublishedInquiryForm, type ResolvedPostDisplay, type RootTaleAuthor, type RootTaleBlogPostCta, type RootTaleBlogSettings, type RootTaleBusinessProfile, type RootTaleMenu, type RootTaleMenuItem, type RootTaleRedirect, type RootTaleSiteProfile, type RootTaleSitemapSettings, type RootTaleTheme, type RssFeedInput, type RssItemInput, SETTINGS_CACHE_TAGS, SITE_METADATA_DEFAULTS_CACHE_TAG, SITE_PATTERNS_CACHE_TAG, type SearchPostsOptions, type SiteAnalyticsTags, type SiteInquiryDetail, type SiteInquiryListItem, type SiteInquiryListPage, type SiteInquiryStatus, type SiteNavColumn, type SiteNavCta, type SiteNavGroup, type SiteNavLink, type SiteNavSettings, type SiteTrackingSettings, type SiteVerificationMetadata, type SiteVerificationSettings, type SubmitFormInquiryFields, type SubmitFormInquiryOptions, type SubmitFormInquiryResult, type SubmitInquiryFields, type SubmitInquiryOptions, type SubmitInquiryResult, type SubmitSiteInquiryFields, type SubmitSiteInquiryOptions, type SubmitSiteInquiryResult, THEME_CACHE_TAG, articleSchema, breadcrumbSchema, businessProfileFromWire, collectionPageSchema, contentIdMeta, faqSchema, fetchAllPosts, fetchAnalyticsConfig, fetchAuthors, fetchBlogSettings, fetchBusinessProfile, fetchCategoryCounts, fetchCollections, fetchCollectionsSafeDefault, fetchContentModels, fetchExposure, fetchExposureDecision, fetchInquiryForm, fetchMenu, fetchMenus, fetchPageBySlug, fetchPost, fetchPostPreview, fetchPosts, fetchRedirects, fetchRouteMetadata, fetchSiteInquiries, fetchSiteInquiry, fetchSitePatterns, fetchTheme, formatKoreanPhoneNumber, generateRssXml, googleTagManagerSnippet, inquiryErrorMessage, isPreviewExpiredError, isPreviewSupersededError, jsonLdJson, jsonLdScript, localBusinessSchema, metadataContractChecksum, organizationSchema, parseContentEditorState, parseInquiryRedirect, profilePageSchema, resolvePostDisplay, resolveSearchHitPath, routeMetadataCacheTag, rssItemsFromPosts, searchPosts, selectRelatedPosts, selectSitePatternForSlot, sitePatternPresentationAttributes, siteVerificationMetadata, submitFormInquiry, submitInquiry, submitSiteInquiry, websiteSchema };
package/dist/server.js CHANGED
@@ -8,7 +8,7 @@ var DEFAULT_SERVER_FETCH_TIMEOUT_MS = 1e4;
8
8
  function requestSignal(signal) {
9
9
  return signal ?? AbortSignal.timeout(DEFAULT_SERVER_FETCH_TIMEOUT_MS);
10
10
  }
11
- var CLIENT_VERSION = true ? "0.72.0" : "dev";
11
+ var CLIENT_VERSION = true ? "0.73.0" : "dev";
12
12
  var CMS_CLIENT_VERSION = CLIENT_VERSION;
13
13
  function authHeaders(apiKey) {
14
14
  return {
@@ -210,6 +210,7 @@ async function fetchTheme(options) {
210
210
  if (json.inquiryBoard) theme.inquiryBoard = json.inquiryBoard;
211
211
  if (json.siteNav) theme.siteNav = json.siteNav;
212
212
  if (json.siteVerification) theme.siteVerification = json.siteVerification;
213
+ if (json.siteTracking) theme.siteTracking = json.siteTracking;
213
214
  return theme;
214
215
  }
215
216
  async function fetchAnalyticsConfig(options) {
@@ -1633,6 +1634,15 @@ function siteVerificationMetadata(settings) {
1633
1634
  };
1634
1635
  }
1635
1636
 
1637
+ // src/tag-manager.ts
1638
+ function googleTagManagerSnippet(id) {
1639
+ if (!id || !/^GTM-[A-Z0-9]{4,20}$/.test(id)) return void 0;
1640
+ return {
1641
+ script: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','${id}');`,
1642
+ iframeUrl: `https://www.googletagmanager.com/ns.html?id=${id}`
1643
+ };
1644
+ }
1645
+
1636
1646
  // src/inquiry.ts
1637
1647
  var DEFAULT_BASE_URL2 = "https://api.roottale.com";
1638
1648
  var INQUIRY_ERROR_MESSAGES = {
@@ -1830,6 +1840,7 @@ export {
1830
1840
  formatKoreanPhoneNumber,
1831
1841
  formatMetadataDefaults,
1832
1842
  generateRssXml,
1843
+ googleTagManagerSnippet,
1833
1844
  inquiryErrorMessage,
1834
1845
  isPreviewExpiredError,
1835
1846
  isPreviewSupersededError,