@ryusenkei/maezae 0.2.0 → 0.3.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/README.md +2 -0
- package/dist/analytics.d.ts +1 -0
- package/dist/analytics.js +33 -0
- package/dist/body.d.ts +1 -24
- package/dist/body.js +1 -333
- package/dist/declared-9_jI3JXH.js +336 -0
- package/dist/delivery.d.ts +1 -211
- package/dist/integrations.d.ts +1 -72
- package/dist/integrations.js +12 -2
- package/dist/model.d.ts +1 -82
- package/dist/model.js +338 -1
- package/dist/preview.d.ts +1 -2
- package/dist/preview.js +1 -1
- package/dist/{src-CA_67dWy.js → src-Baj-EC2G.js} +105 -3
- package/dist/trace.d.ts +1 -0
- package/dist/trace.js +1 -0
- package/dist/types/access/src/index.d.ts +5 -0
- package/dist/types/access/src/jwt.d.ts +42 -0
- package/dist/types/access/src/oidc.d.ts +47 -0
- package/dist/types/access/src/signed.d.ts +47 -0
- package/dist/types/access/src/span.d.ts +23 -0
- package/dist/types/access/src/traceparent.d.ts +21 -0
- package/dist/types/analytics/src/day.d.ts +2 -0
- package/dist/types/analytics/src/index.d.ts +4 -0
- package/dist/types/analytics/src/record.d.ts +22 -0
- package/dist/types/analytics/src/schedule.d.ts +2 -0
- package/dist/types/analytics/src/source.d.ts +33 -0
- package/dist/types/analytics/src/store.d.ts +24 -0
- package/dist/types/body/src/components.d.ts +25 -0
- package/dist/types/body/src/declared.d.ts +34 -0
- package/dist/types/body/src/derive.d.ts +13 -0
- package/dist/types/body/src/description.d.ts +8 -0
- package/dist/types/body/src/href.d.ts +4 -0
- package/dist/types/body/src/index.d.ts +11 -0
- package/dist/types/body/src/library.d.ts +94 -0
- package/dist/types/body/src/markdown.d.ts +14 -0
- package/dist/types/body/src/normalize.d.ts +7 -0
- package/dist/types/body/src/profile.d.ts +48 -0
- package/dist/types/body/src/schema.d.ts +6 -0
- package/dist/types/body/src/standard.d.ts +20 -0
- package/dist/types/body/src/types.d.ts +91 -0
- package/dist/types/cms-contract/src/apiKeys.d.ts +13 -0
- package/dist/types/cms-contract/src/assets.d.ts +10 -0
- package/dist/types/cms-contract/src/builtins.d.ts +17 -0
- package/dist/types/cms-contract/src/embeds.d.ts +56 -0
- package/dist/types/cms-contract/src/errorLabels.d.ts +22 -0
- package/dist/types/cms-contract/src/errors.d.ts +97 -0
- package/dist/types/cms-contract/src/extensions.d.ts +75 -0
- package/dist/types/cms-contract/src/fieldRules.d.ts +37 -0
- package/dist/types/cms-contract/src/functions.d.ts +71 -0
- package/dist/types/cms-contract/src/index.d.ts +19 -0
- package/dist/types/cms-contract/src/labels.d.ts +6 -0
- package/dist/types/cms-contract/src/modules.d.ts +144 -0
- package/dist/types/cms-contract/src/paths.d.ts +6 -0
- package/dist/types/cms-contract/src/pending.d.ts +4 -0
- package/dist/types/cms-contract/src/permissions.d.ts +69 -0
- package/dist/types/cms-contract/src/roles.d.ts +35 -0
- package/dist/types/cms-contract/src/settings.d.ts +19 -0
- package/dist/types/cms-contract/src/transfer.d.ts +48 -0
- package/dist/types/cms-contract/src/views.d.ts +21 -0
- package/dist/types/cms-contract/src/webhooks.d.ts +45 -0
- package/dist/types/delivery-client/src/client.d.ts +62 -0
- package/dist/types/delivery-client/src/index.d.ts +5 -0
- package/dist/types/delivery-client/src/media.d.ts +12 -0
- package/dist/types/delivery-client/src/query.d.ts +68 -0
- package/dist/types/delivery-client/src/schema.d.ts +19 -0
- package/dist/types/delivery-client/src/values.d.ts +63 -0
- package/dist/types/model/src/asset.d.ts +89 -0
- package/dist/types/model/src/capabilities.d.ts +20 -0
- package/dist/types/model/src/changes.d.ts +23 -0
- package/dist/types/model/src/check.d.ts +10 -0
- package/dist/types/model/src/image.d.ts +38 -0
- package/dist/types/model/src/index.d.ts +14 -0
- package/dist/types/model/src/input.d.ts +26 -0
- package/dist/types/model/src/media.d.ts +5 -0
- package/dist/types/model/src/model.d.ts +190 -0
- package/dist/types/model/src/page.d.ts +47 -0
- package/dist/types/model/src/rules.d.ts +15 -0
- package/dist/types/model/src/schema.d.ts +3 -0
- package/dist/types/model/src/screens.d.ts +72 -0
- package/dist/types/model/src/time.d.ts +25 -0
- package/dist/types/model/src/values.d.ts +24 -0
- package/dist/types/sdk/src/analytics.d.ts +2 -0
- package/dist/types/sdk/src/body.d.ts +2 -0
- package/dist/types/sdk/src/defaults.d.ts +5 -0
- package/dist/types/sdk/src/delivery.d.ts +2 -0
- package/dist/types/sdk/src/integrations.d.ts +4 -0
- package/dist/types/sdk/src/model.d.ts +5 -0
- package/dist/types/sdk/src/preview.d.ts +2 -0
- package/dist/types/sdk/src/trace.d.ts +2 -0
- package/package.json +10 -2
- package/dist/index-C8duwjns.d.ts +0 -157
- package/dist/index-CLDe_wBc.d.ts +0 -340
- package/dist/signed-B_58gV21.d.ts +0 -44
package/dist/index-CLDe_wBc.d.ts
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import { n as BodyProfile, r as DeclaredComponent } from "./index-C8duwjns.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
/** ページの行の値(項目の key と値、表の列・集計の値も含む) */
|
|
4
|
-
type PageEntry = Readonly<Record<string, unknown>>;
|
|
5
|
-
/**
|
|
6
|
-
* 公開中の条件の1つ(key は行の値の key)
|
|
7
|
-
* - in・notIn: 値の文字列が一覧にある・ない
|
|
8
|
-
* - truthy: 値が真(公開のチェックなど)
|
|
9
|
-
* - notFuture: 値が空か、今の時刻以前(予約の公開日時)
|
|
10
|
-
*/
|
|
11
|
-
type PageRule = Readonly<{
|
|
12
|
-
key: string;
|
|
13
|
-
} & ({
|
|
14
|
-
in: readonly string[];
|
|
15
|
-
} | {
|
|
16
|
-
notIn: readonly string[];
|
|
17
|
-
} | {
|
|
18
|
-
truthy: true;
|
|
19
|
-
} | {
|
|
20
|
-
notFuture: true;
|
|
21
|
-
})>;
|
|
22
|
-
/** ページの宣言(when は選択肢の項目による条件、path は {key} を含む雛形) */
|
|
23
|
-
type PageDef = Readonly<{
|
|
24
|
-
when?: FieldCondition;
|
|
25
|
-
path: string;
|
|
26
|
-
public?: readonly PageRule[];
|
|
27
|
-
}>;
|
|
28
|
-
/** 画像の枠(ratio は CSS の aspect-ratio の書式、size は推奨の寸法、label は画像の呼び名) */
|
|
29
|
-
type ImageFrame = Readonly<{
|
|
30
|
-
ratio: string;
|
|
31
|
-
size: Readonly<{
|
|
32
|
-
width: number;
|
|
33
|
-
height: number;
|
|
34
|
-
}>;
|
|
35
|
-
label: string;
|
|
36
|
-
}>;
|
|
37
|
-
/** 画像の枠の宣言(when は同じ階層にある選択肢の項目による条件) */
|
|
38
|
-
type ImageFrameDef = ImageFrame & Readonly<{
|
|
39
|
-
when?: FieldCondition;
|
|
40
|
-
}>;
|
|
41
|
-
/** ページのパス(ページのない型・行は null、公開の状態は見ない) */
|
|
42
|
-
declare function pagePathOf(type: ContentType, entry: PageEntry): string | null;
|
|
43
|
-
/** 公開中のページのパス(公開前・予約中・ページのない行は null、now は今の時刻の ISO 文字列) */
|
|
44
|
-
declare function publicPathOf(type: ContentType, entry: PageEntry, now: string): string | null;
|
|
45
|
-
/** 必須になる時点(page は行のページが公開中になるとき、false は任意) */
|
|
46
|
-
type Requirement = 'save' | 'submit' | 'page' | false;
|
|
47
|
-
type FieldBase = Readonly<{
|
|
48
|
-
key: string;
|
|
49
|
-
label: string;
|
|
50
|
-
/** 書き手と AI への説明(MCP の項目の説明にも使用) */
|
|
51
|
-
description?: string;
|
|
52
|
-
required?: Requirement;
|
|
53
|
-
when?: FieldCondition;
|
|
54
|
-
/** 配信しない項目(CMS の中だけで使用) */
|
|
55
|
-
private?: boolean;
|
|
56
|
-
/** 行のすべてを変更できるアカウントだけが編集(自分のものだけを変更できるアカウントの保存では保存済みの値のまま) */
|
|
57
|
-
adminOnly?: boolean;
|
|
58
|
-
/** 未定の null にできる期限: 型の最上位の項目 key に値が入ると未定なし(方針のページの制定日など) */
|
|
59
|
-
pendingUntil?: string;
|
|
60
|
-
}>;
|
|
61
|
-
/** 項目の対象の条件(同じ階層にある選択肢の項目 key の値が in のいずれか) */
|
|
62
|
-
type FieldCondition = Readonly<{
|
|
63
|
-
key: string;
|
|
64
|
-
in: readonly string[];
|
|
65
|
-
}>;
|
|
66
|
-
/** 選択肢の値の調子(CMS の札の色、positive は進行中・提供中、caution は途中・注意、neutral は終了・既定) */
|
|
67
|
-
type OptionTone = 'positive' | 'caution' | 'neutral';
|
|
68
|
-
/** セレクトの選択肢(tone は札の色、なしは neutral、restricted は型の公開が可のアカウントだけが選択し AI は選択不可) */
|
|
69
|
-
type SelectOption = Readonly<{
|
|
70
|
-
value: string;
|
|
71
|
-
label: string;
|
|
72
|
-
tone?: OptionTone;
|
|
73
|
-
restricted?: boolean;
|
|
74
|
-
}>;
|
|
75
|
-
/** ほかの項目の値で決まる値(同じ階層の選択肢の項目 from の値ごとの値、表にない値は otherwise) */
|
|
76
|
-
type FieldDerive = Readonly<{
|
|
77
|
-
from: string;
|
|
78
|
-
map: Readonly<Record<string, string>>;
|
|
79
|
-
otherwise: string;
|
|
80
|
-
}>;
|
|
81
|
-
/** 参照先の値で固定する値(同じ階層の参照の項目 ref が指す行の項目 key の値ごとの値、表にない値は固定なし) */
|
|
82
|
-
type FieldFixedBy = Readonly<{
|
|
83
|
-
ref: string;
|
|
84
|
-
key: string;
|
|
85
|
-
map: Readonly<Record<string, string>>;
|
|
86
|
-
}>;
|
|
87
|
-
/**
|
|
88
|
-
* 被参照の件数: 型 from で公開中の行のうち、参照の項目 field でこの行を指す数
|
|
89
|
-
* - key: 値の名前(ページの公開中の条件などで使用)
|
|
90
|
-
*/
|
|
91
|
-
type CountDef = Readonly<{
|
|
92
|
-
key: string;
|
|
93
|
-
from: string;
|
|
94
|
-
field: string;
|
|
95
|
-
}>;
|
|
96
|
-
/** 値の件数の下限と上限(multiple の項目だけ、空は必須の判定に任せる) */
|
|
97
|
-
type Counts = Readonly<{
|
|
98
|
-
minItems?: number;
|
|
99
|
-
maxItems?: number;
|
|
100
|
-
}>;
|
|
101
|
-
/**
|
|
102
|
-
* 参照の項目で保存できる条件(参照先の行が満たす条件、DB を参照するため CMS のサーバーが保存のときに検査)
|
|
103
|
-
* - unique: 同じ行を重ねて選択できない(checkFields で検査)
|
|
104
|
-
* - published: 参照先は公開中の行だけ
|
|
105
|
-
* - linkedBy: 参照先の項目 key がこの行を指す行だけ(本人の記事など、参照先の複数の参照は含むかで判定、作成のときは選択不可)
|
|
106
|
-
*/
|
|
107
|
-
type ReferenceRules = Readonly<{
|
|
108
|
-
unique?: boolean;
|
|
109
|
-
published?: boolean;
|
|
110
|
-
linkedBy?: string;
|
|
111
|
-
}>;
|
|
112
|
-
/** メディアの種類(コアの型 image・video の id と同じ) */
|
|
113
|
-
type MediaKind = 'image' | 'video';
|
|
114
|
-
/** 項目の定義 */
|
|
115
|
-
type FieldDef = FieldBase & Readonly<{
|
|
116
|
-
type: 'text' | 'textarea';
|
|
117
|
-
maxLength?: number;
|
|
118
|
-
minLength?: number; /** 形式(正規表現、空でない値が全体で一致) */
|
|
119
|
-
pattern?: string; /** 文字数の目安(超えても保存可、画面で表示) */
|
|
120
|
-
guideLength?: number; /** 文字の配列(段落の並びなど) */
|
|
121
|
-
multiple?: boolean;
|
|
122
|
-
} & Counts | {
|
|
123
|
-
type: 'number';
|
|
124
|
-
min?: number;
|
|
125
|
-
max?: number;
|
|
126
|
-
} | {
|
|
127
|
-
type: 'checkbox';
|
|
128
|
-
} | {
|
|
129
|
-
type: 'date' | 'datetime';
|
|
130
|
-
} | ({
|
|
131
|
-
type: 'select';
|
|
132
|
-
options: readonly SelectOption[]; /** 新しい行の初期値(なしは先頭の選択肢) */
|
|
133
|
-
initial?: string;
|
|
134
|
-
multiple?: boolean;
|
|
135
|
-
derive?: FieldDerive;
|
|
136
|
-
fixedBy?: FieldFixedBy;
|
|
137
|
-
} & Counts) | ({
|
|
138
|
-
type: 'reference';
|
|
139
|
-
to: string;
|
|
140
|
-
multiple?: boolean; /** 候補の絞り込み(参照先のコアの項目の key と値、例: 企画の種類が特集) */
|
|
141
|
-
where?: Readonly<Record<string, string>>; /** 候補にない名前を追加の依頼で付けられる(参照先は一覧で管理する汎用の型、承認で行を作成) */
|
|
142
|
-
requests?: boolean; /** 値が空のときの表示名(持ち主のいない行の名義など) */
|
|
143
|
-
emptyLabel?: string;
|
|
144
|
-
} & ReferenceRules & Counts) | ({
|
|
145
|
-
type: 'media'; /** 受け付けるメディアの種類(なしはすべて) */
|
|
146
|
-
accept?: readonly MediaKind[];
|
|
147
|
-
multiple?: boolean; /** 画像の枠(先頭から条件に合うもの、page.ts) */
|
|
148
|
-
frames?: readonly ImageFrameDef[];
|
|
149
|
-
} & Counts) | {
|
|
150
|
-
type: 'body';
|
|
151
|
-
profile: BodyProfile;
|
|
152
|
-
} | ({
|
|
153
|
-
type: 'group'; /** まとまりの中の項目(Sanity の object、microCMS のカスタムフィールド) */
|
|
154
|
-
fields: readonly FieldDef[];
|
|
155
|
-
multiple?: boolean;
|
|
156
|
-
} & Counts)>;
|
|
157
|
-
/** 型の形式(リスト形式は行を複数、オブジェクト形式は行を1つだけ) */
|
|
158
|
-
type ContentFormat = 'list' | 'object';
|
|
159
|
-
/** 公開の管理(なし・下書きと公開・レビューあり) */
|
|
160
|
-
type Publishing = 'none' | 'draft' | 'review';
|
|
161
|
-
/**
|
|
162
|
-
* 型の定義
|
|
163
|
-
* - id: コアの型の ID か、追加の型の ID
|
|
164
|
-
* - core: コアで固定の項目、fields: 導入先の追加の項目
|
|
165
|
-
* - format: 形式(なしはリスト形式)、オブジェクト形式はコアの項目なし
|
|
166
|
-
* - publishing: 公開の管理(なしは管理なし)
|
|
167
|
-
* - table: コアの項目を持つ型の表
|
|
168
|
-
* - pages: サイトのページの URL と公開中の条件(なしはページのない型、page.ts)
|
|
169
|
-
*/
|
|
170
|
-
/**
|
|
171
|
-
* コンテンツタイプ
|
|
172
|
-
* - counts: 被参照の件数(ページの公開中の条件・ページの公開で必須の判定に使用)
|
|
173
|
-
* - og: サイトの OG 画像のパスの雛形({key} は行の値、管理画面の OG 画像のプレビュー)
|
|
174
|
-
*/
|
|
175
|
-
type ContentType = Readonly<{
|
|
176
|
-
id: string;
|
|
177
|
-
label: string;
|
|
178
|
-
description?: string;
|
|
179
|
-
format?: ContentFormat;
|
|
180
|
-
publishing?: Publishing;
|
|
181
|
-
table?: string;
|
|
182
|
-
core?: readonly FieldDef[];
|
|
183
|
-
fields: readonly FieldDef[];
|
|
184
|
-
pages?: readonly PageDef[];
|
|
185
|
-
counts?: readonly CountDef[];
|
|
186
|
-
og?: string;
|
|
187
|
-
}>;
|
|
188
|
-
/** コンテンツスキーマ(導入先ごとに1つ) */
|
|
189
|
-
type ContentModel = Readonly<{
|
|
190
|
-
types: readonly ContentType[];
|
|
191
|
-
components?: readonly DeclaredComponent[];
|
|
192
|
-
}>;
|
|
193
|
-
/** コンテンツスキーマの型(id から、なければ例外: 導入先の設定の誤り) */
|
|
194
|
-
declare function typeOf(model: ContentModel, id: string): ContentType;
|
|
195
|
-
/**
|
|
196
|
-
* 見せたい点(Sanity の hotspot、値はすべて画像に対する割合の0〜1、左上が0,0)
|
|
197
|
-
* - x・y: 中心(枠に合わせて切り抜くときの中心、なしは中央)
|
|
198
|
-
* - width・height: 範囲の大きさ(今の表示は中心だけを使用)
|
|
199
|
-
* - 切り抜き crop がある画像: CMS で保存する値は元の画像に対する割合、表示の Media では切り抜いた後の画像に対する割合
|
|
200
|
-
*/
|
|
201
|
-
type Hotspot = Readonly<{
|
|
202
|
-
x: number;
|
|
203
|
-
y: number;
|
|
204
|
-
width?: number;
|
|
205
|
-
height?: number;
|
|
206
|
-
}>;
|
|
207
|
-
/** 切り抜き(Sanity の crop、上下左右の各辺から削る量を画像に対する割合の0〜1で) */
|
|
208
|
-
type Crop = Readonly<{
|
|
209
|
-
top: number;
|
|
210
|
-
bottom: number;
|
|
211
|
-
left: number;
|
|
212
|
-
right: number;
|
|
213
|
-
}>;
|
|
214
|
-
/** サイトのビルドで読み込んだ画像(Astro の ImageMetadata と同じ形、画像の最適化の対象) */
|
|
215
|
-
type LocalImage = Readonly<{
|
|
216
|
-
src: string;
|
|
217
|
-
width: number;
|
|
218
|
-
height: number;
|
|
219
|
-
format: string;
|
|
220
|
-
}>;
|
|
221
|
-
/** 実体の共通の項目(ID は UUID で R2 のキーと同じ、sha256 は内容のハッシュで同じ画像の重複を防止、ファイル名は保存しない) */
|
|
222
|
-
type AssetBase = Readonly<{
|
|
223
|
-
id: string;
|
|
224
|
-
mimeType: string;
|
|
225
|
-
size: number;
|
|
226
|
-
sha256: string | null;
|
|
227
|
-
width: number;
|
|
228
|
-
height: number;
|
|
229
|
-
alt: string;
|
|
230
|
-
hotspot?: Hotspot;
|
|
231
|
-
crop?: Crop;
|
|
232
|
-
createdAt: string;
|
|
233
|
-
}>;
|
|
234
|
-
/** 画像の実体(Sanity の sanity.imageAsset、代替テキストと hotspot は画像ごとに1つ) */
|
|
235
|
-
type ImageAsset = AssetBase & Readonly<{
|
|
236
|
-
kind: 'image';
|
|
237
|
-
}>;
|
|
238
|
-
/** 動画の実体(poster は代わりに表示する画像の実体の ID、配信と再生は最初に使用する場所が決まったときに実装) */
|
|
239
|
-
type VideoAsset = AssetBase & Readonly<{
|
|
240
|
-
kind: 'video';
|
|
241
|
-
duration?: number;
|
|
242
|
-
poster?: string;
|
|
243
|
-
}>;
|
|
244
|
-
/** 実体(CMS のメディアにある1件) */
|
|
245
|
-
type Asset = ImageAsset | VideoAsset;
|
|
246
|
-
/** 使用する側が保存する実体の参照(Sanity の image の asset、表示のときに実体の寸法・代替テキスト・hotspot を合わせて Media に解決) */
|
|
247
|
-
type AssetRef = Readonly<{
|
|
248
|
-
asset: string;
|
|
249
|
-
}>;
|
|
250
|
-
/**
|
|
251
|
-
* 表示する素材の共通の項目
|
|
252
|
-
* - src: URL(CMS の実体)か、ビルドで読み込んだ画像
|
|
253
|
-
* - width・height: 元の寸法(表示の比と、読み込み前の場所の確保)
|
|
254
|
-
* - alt: 代替テキスト(飾りの画像は空文字)
|
|
255
|
-
*/
|
|
256
|
-
type MediaBase = Readonly<{
|
|
257
|
-
src: string | LocalImage;
|
|
258
|
-
width: number;
|
|
259
|
-
height: number;
|
|
260
|
-
alt: string;
|
|
261
|
-
hotspot?: Hotspot;
|
|
262
|
-
}>;
|
|
263
|
-
/**
|
|
264
|
-
* 表示の素材(使用する側の型で共通、実体の参照 AssetRef を解決した値)
|
|
265
|
-
* - `image`: 画像
|
|
266
|
-
* - `video`: 動画(poster は読み込み前・動きを抑える設定・OG で代わりに表示する画像、再生の仕方は使用する場所で決定)
|
|
267
|
-
*/
|
|
268
|
-
type Media = MediaBase & Readonly<{
|
|
269
|
-
kind: 'image';
|
|
270
|
-
} | {
|
|
271
|
-
kind: 'video';
|
|
272
|
-
poster: MediaBase;
|
|
273
|
-
}>;
|
|
274
|
-
/** 解決後の素材の検査(src は URL、ビルドで読み込んだ画像は JSON に含めないため対象外) */
|
|
275
|
-
declare const mediaSchema: z.ZodType<Media>;
|
|
276
|
-
/** 静止画として表示する画像(動画は代わりの画像 poster) */
|
|
277
|
-
declare const stillOf: (media: Media) => Readonly<{
|
|
278
|
-
src: string | LocalImage;
|
|
279
|
-
width: number;
|
|
280
|
-
height: number;
|
|
281
|
-
alt: string;
|
|
282
|
-
hotspot?: Hotspot;
|
|
283
|
-
}>;
|
|
284
|
-
/** 見せたい点を CSS の object-position に(なしは undefined で中央、枠の比が分からない表示の代わり) */
|
|
285
|
-
declare const objectPosition: (hotspot?: Hotspot) => string | undefined;
|
|
286
|
-
/**
|
|
287
|
-
* 枠を覆う表示で、枠に見える範囲(窓)の始まりの位置: 1次元、画像に対する割合で0〜1 - window
|
|
288
|
-
* - 見せたい範囲の中心を窓の中央に寄せ、画像の端を越えるときは端と同じ位置
|
|
289
|
-
* - 範囲が窓に収まる大きさなら、この位置で範囲は必ず窓に入る(範囲が窓より大きいときは範囲の中央を表示)
|
|
290
|
-
* - center なしは中央、CMS のプレビュー(apps/admin の crop.ts)とサイトの表示で共通
|
|
291
|
-
*/
|
|
292
|
-
declare function coverStart(center: number | undefined, window: number): number;
|
|
293
|
-
/**
|
|
294
|
-
* 枠を覆う表示(object-fit: cover)の object-position: 見せたい範囲が枠に入る位置
|
|
295
|
-
* - size: 画像の幅と高さ、frame: 枠の幅 / 高さ(なしは見せたい点の百分率で代用)
|
|
296
|
-
* - 帯や余白はなし、枠いっぱいに画像を敷いたまま位置だけを合わせる
|
|
297
|
-
*/
|
|
298
|
-
declare function coverPosition(hotspot: Hotspot | undefined, size: Readonly<{
|
|
299
|
-
width: number;
|
|
300
|
-
height: number;
|
|
301
|
-
}>, frame?: number): string | undefined;
|
|
302
|
-
/** 切り抜いた範囲(元の画像の画素、左上と大きさ、1画素以上) */
|
|
303
|
-
type CropRect = Readonly<{
|
|
304
|
-
left: number;
|
|
305
|
-
top: number;
|
|
306
|
-
width: number;
|
|
307
|
-
height: number;
|
|
308
|
-
}>;
|
|
309
|
-
/** 切り抜きの割合から、元画像での画素の範囲 */
|
|
310
|
-
declare function cropRect(width: number, height: number, crop: Crop): CropRect;
|
|
311
|
-
/** 元の画像に対する見せたい点を、切り抜いた後の画像に対する割合に変換(範囲の外は端に寄せる) */
|
|
312
|
-
declare function croppedHotspot(hotspot: Hotspot, crop: Crop): Hotspot;
|
|
313
|
-
/** 画像の型 */
|
|
314
|
-
declare const IMAGE_TYPE: ContentType;
|
|
315
|
-
/** 動画の型(配信と再生は最初に使用する場所が決まったときに実装) */
|
|
316
|
-
declare const VIDEO_TYPE: ContentType;
|
|
317
|
-
/** 暦の日付(`YYYY-MM-DD`) */
|
|
318
|
-
type DateString = `${number}-${number}-${number}`;
|
|
319
|
-
/** 日付だけの値(`YYYY-MM-DD`)か */
|
|
320
|
-
declare const isDateOnly: (value: string) => boolean;
|
|
321
|
-
/** タイムゾーンを固定した日時の変換 */
|
|
322
|
-
type Clock = Readonly<{
|
|
323
|
-
/** 今の日時 */
|
|
324
|
-
nowIso: () => string;
|
|
325
|
-
/** タイムゾーンの日付と時刻(HH:MM、省略は0時)の日時 */
|
|
326
|
-
fromLocal: (date: string, time?: string) => string;
|
|
327
|
-
/** 日付・日時・SQLite の日時を日時に(解釈できない値は null) */
|
|
328
|
-
toDateTime: (value: string) => string | null;
|
|
329
|
-
/** 日時のタイムゾーンの日付(日付だけの値はそのまま) */
|
|
330
|
-
dateOf: (value: string) => string;
|
|
331
|
-
/** 日時のタイムゾーンの時刻(HH:MM) */
|
|
332
|
-
timeOf: (value: string) => string;
|
|
333
|
-
/** タイムゾーンでその日の最後の時点 */
|
|
334
|
-
endOfDay: (date: string) => string;
|
|
335
|
-
/** タイムゾーンの今日の日付(now は試験用の今のミリ秒) */
|
|
336
|
-
today: (now?: number) => string;
|
|
337
|
-
}>;
|
|
338
|
-
/** タイムゾーンの日時の変換を作成 */
|
|
339
|
-
declare function createClock(timeZone: string): Clock;
|
|
340
|
-
export { pagePathOf as A, ContentType as C, typeOf as D, Publishing as E, PageDef as O, ContentModel as S, FieldDef as T, Hotspot as _, IMAGE_TYPE as a, mediaSchema as b, coverPosition as c, croppedHotspot as d, objectPosition as f, Crop as g, AssetRef as h, isDateOnly as i, publicPathOf as j, PageEntry as k, coverStart as l, Asset as m, DateString as n, VIDEO_TYPE as o, stillOf as p, createClock as r, CropRect as s, Clock as t, cropRect as u, LocalImage as v, CountDef as w, ContentFormat as x, Media as y };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/** 経路ごとのヘッダーの名前(署名と主体) */
|
|
2
|
-
declare const SIGNED_HEADERS: {
|
|
3
|
-
/** MCP → CMS の署名(鍵は MCP_TOKEN) */
|
|
4
|
-
readonly mcp: "x-mcp-signature";
|
|
5
|
-
/** MCP → CMS のログインのメールアドレス(署名の主体) */
|
|
6
|
-
readonly mcpEmail: "x-mcp-email";
|
|
7
|
-
/** CMS ⇄ サイトのプレビューと下書きの署名(鍵は PREVIEW_TOKEN) */
|
|
8
|
-
readonly preview: "x-preview-signature";
|
|
9
|
-
/** CMS → 外の送信先の Webhook・外の関数の署名(鍵は登録ごと、受け手は verifyParts と同じ手順で照合) */
|
|
10
|
-
readonly outbound: "x-cms-signature";
|
|
11
|
-
};
|
|
12
|
-
/** 署名の対象(body は本文、なしは空) */
|
|
13
|
-
type SignedParts = Readonly<{
|
|
14
|
-
method: string;
|
|
15
|
-
url: string;
|
|
16
|
-
body?: string | ArrayBuffer | Uint8Array | null;
|
|
17
|
-
/** 主体(MCP のログインのメールアドレスなど、なしは空) */
|
|
18
|
-
subject?: string | null;
|
|
19
|
-
}>;
|
|
20
|
-
/** 署名のヘッダーの値(t=<秒>,v1=<署名>) */
|
|
21
|
-
declare function signParts(secret: string, parts: SignedParts, now?: number): Promise<string>;
|
|
22
|
-
/** 署名の照合(形の誤り・時刻のずれの超過・不一致は false) */
|
|
23
|
-
declare function verifyParts(secret: string, header: string | null | undefined, parts: SignedParts, { now, maxSkewSec }?: {
|
|
24
|
-
now?: number;
|
|
25
|
-
maxSkewSec?: number;
|
|
26
|
-
}): Promise<boolean>;
|
|
27
|
-
/** 署名を付けたヘッダー(init のヘッダーに署名と主体を追加した新しい Headers) */
|
|
28
|
-
declare function signedHeaders(secret: string, { method, url, body, subject }: SignedParts, { header, subjectHeader, init, now }: Readonly<{
|
|
29
|
-
header: string;
|
|
30
|
-
subjectHeader?: string;
|
|
31
|
-
init?: HeadersInit;
|
|
32
|
-
now?: number;
|
|
33
|
-
}>): Promise<Headers>;
|
|
34
|
-
/** 署名つきのリクエストを照合する設定 */
|
|
35
|
-
type VerifyRequestOptions = Readonly<{
|
|
36
|
-
/** 署名のヘッダーの名前 */
|
|
37
|
-
header: string;
|
|
38
|
-
/** 主体のヘッダーの名前(なしは主体なしで照合) */
|
|
39
|
-
subjectHeader?: string;
|
|
40
|
-
now?: number;
|
|
41
|
-
}>;
|
|
42
|
-
/** リクエストの署名の照合(本文は複製から読み込み、元のリクエストの本文は残す) */
|
|
43
|
-
declare function verifyRequest(secret: string | undefined, request: Request, { header, subjectHeader, now }: VerifyRequestOptions): Promise<boolean>;
|
|
44
|
-
export { signedHeaders as a, signParts as i, SignedParts as n, verifyParts as o, VerifyRequestOptions as r, verifyRequest as s, SIGNED_HEADERS as t };
|