@c-time/frelio-data-json-recipe 1.4.5 → 1.4.7
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/dist/index.d.ts +42 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -71,6 +71,8 @@ type CustomFieldTransform = {
|
|
|
71
71
|
type: Exclude<CustomFieldFormatType, 'relationList' | 'constant'>;
|
|
72
72
|
/** フォーマット文字列(例: "YYYY年MM月DD日", "#,###円") */
|
|
73
73
|
format?: string;
|
|
74
|
+
/** date 整形時の出力タイムゾーン(オフセット表記: +09:00 / -05:00 / Z)。issue #92 */
|
|
75
|
+
timezone?: string;
|
|
74
76
|
/** truncate用の文字数 */
|
|
75
77
|
length?: number;
|
|
76
78
|
/** truncate用の末尾文字列(デフォルト: "...") */
|
|
@@ -149,6 +151,37 @@ type RelationExpand = {
|
|
|
149
151
|
/** ネストした展開設定(参照先の relation をさらに展開する場合) */
|
|
150
152
|
expand?: RelationExpand[];
|
|
151
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* 詳細レシピのナビゲーション設定
|
|
156
|
+
* 同一コンテンツタイプの整列済みリスト内で、現在のコンテンツの
|
|
157
|
+
* 前 / 次 / 最初 / 最後 のコンテンツを解決して詳細データに埋め込む。
|
|
158
|
+
*
|
|
159
|
+
* 並び順の基準は一覧と同じ sort(複数キー)と filters で決定する。
|
|
160
|
+
*/
|
|
161
|
+
type RecipeNavigation = {
|
|
162
|
+
/** 並び順の基準(一覧と同じ。単一または複数キー) */
|
|
163
|
+
sort?: RecipeSort | RecipeSort[];
|
|
164
|
+
/** 対象を絞るフィルター */
|
|
165
|
+
filters?: RecipeFilter[];
|
|
166
|
+
/**
|
|
167
|
+
* 各ナビ項目に含めるフィールド(null/未指定 = data の全フィールド)。
|
|
168
|
+
* contentId / slug / title / href は指定有無に関わらず常に付与される。
|
|
169
|
+
*/
|
|
170
|
+
fields?: string[] | null;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* ナビゲーション項目の出力形状
|
|
174
|
+
* 端のコンテンツでは prev / next が null になる。
|
|
175
|
+
*/
|
|
176
|
+
type NavigationItem = {
|
|
177
|
+
contentId: string;
|
|
178
|
+
slug: string;
|
|
179
|
+
title: string;
|
|
180
|
+
/** 詳細レシピの outputPath から自動算出したリンク先URL */
|
|
181
|
+
href: string;
|
|
182
|
+
/** fields で指定した追加フィールド */
|
|
183
|
+
[key: string]: unknown;
|
|
184
|
+
};
|
|
152
185
|
/**
|
|
153
186
|
* 親をたどるリピート設定
|
|
154
187
|
* カテゴリ階層などで親をたどってパスを生成する
|
|
@@ -177,6 +210,8 @@ type DetailPageRecipe = {
|
|
|
177
210
|
repeat?: RecipeRepeat;
|
|
178
211
|
/** カスタムフィールド定義 */
|
|
179
212
|
customFields?: CustomField[];
|
|
213
|
+
/** 隣接コンテンツ(前/次/最初/最後)のナビゲーション設定 */
|
|
214
|
+
navigation?: RecipeNavigation;
|
|
180
215
|
/** 追加で含めるデータ */
|
|
181
216
|
include?: {
|
|
182
217
|
/** サイト設定を含める */
|
|
@@ -309,6 +344,12 @@ type FrelioBuildDataRecipe = {
|
|
|
309
344
|
version: '1.0';
|
|
310
345
|
/** コンテンツタイプ別レシピ */
|
|
311
346
|
contentTypes: Record<string, ContentTypeRecipe>;
|
|
347
|
+
/**
|
|
348
|
+
* 既定の出力タイムゾーン(issue #92)。
|
|
349
|
+
* customFields の date 整形でフィールド単位の timezone が無い場合のフォールバック。
|
|
350
|
+
* オフセット表記(例 "+09:00")。未設定は UTC。
|
|
351
|
+
*/
|
|
352
|
+
outputTimezone?: string;
|
|
312
353
|
/** 固定ページレシピ */
|
|
313
354
|
staticPages?: StaticPageRecipe[];
|
|
314
355
|
/** テンプレートパーツ依存関係 */
|
|
@@ -344,4 +385,4 @@ declare function isCustomFieldRelationList(field: CustomField): field is CustomF
|
|
|
344
385
|
*/
|
|
345
386
|
declare function isCustomFieldTransform(field: CustomField): field is CustomFieldTransform;
|
|
346
387
|
|
|
347
|
-
export { type ContentTypeRecipe, type CustomField, type CustomFieldConstant, type CustomFieldFormatType, type CustomFieldRelationList, type CustomFieldTransform, type DetailPageRecipe, type FrelioBuildDataRecipe, type ListPageRecipe, type ListPageRecipePaginationConfig, type ListPageRecipeWithPagination, type ListPageRecipeWithoutPagination, type PaginatedListOutput, type PaginationConfigBase, type RecipeFilter, type RecipeFilterOperator, type RecipeRepeat, type RecipeSort, type RelationExpand, type RelationListPaginationConfig, type StaticPageRecipe, type TemplateIncludes, type TocEntry, isCustomFieldConstant, isCustomFieldRelationList, isCustomFieldTransform, isListPageRecipeWithPagination, isListPageRecipeWithoutPagination };
|
|
388
|
+
export { type ContentTypeRecipe, type CustomField, type CustomFieldConstant, type CustomFieldFormatType, type CustomFieldRelationList, type CustomFieldTransform, type DetailPageRecipe, type FrelioBuildDataRecipe, type ListPageRecipe, type ListPageRecipePaginationConfig, type ListPageRecipeWithPagination, type ListPageRecipeWithoutPagination, type NavigationItem, type PaginatedListOutput, type PaginationConfigBase, type RecipeFilter, type RecipeFilterOperator, type RecipeNavigation, type RecipeRepeat, type RecipeSort, type RelationExpand, type RelationListPaginationConfig, type StaticPageRecipe, type TemplateIncludes, type TocEntry, isCustomFieldConstant, isCustomFieldRelationList, isCustomFieldTransform, isListPageRecipeWithPagination, isListPageRecipeWithoutPagination };
|