@ampless/admin 0.2.0-alpha.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/LICENSE +21 -0
- package/README.md +78 -0
- package/dist/api/index.d.ts +24 -0
- package/dist/api/index.js +41 -0
- package/dist/chunk-BN6BW7MP.js +2074 -0
- package/dist/chunk-TJR3ALRJ.js +575 -0
- package/dist/components/index.d.ts +169 -0
- package/dist/components/index.js +44 -0
- package/dist/i18n-ByHM_Bho.d.ts +738 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.js +115 -0
- package/dist/pages/index.d.ts +90 -0
- package/dist/pages/index.js +839 -0
- package/package.json +83 -0
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
// src/locales/en.json
|
|
2
|
+
var en_default = {
|
|
3
|
+
common: {
|
|
4
|
+
save: "Save",
|
|
5
|
+
saving: "Saving...",
|
|
6
|
+
cancel: "Cancel",
|
|
7
|
+
delete: "Delete",
|
|
8
|
+
edit: "Edit",
|
|
9
|
+
back: "Back",
|
|
10
|
+
loading: "Loading...",
|
|
11
|
+
default: "Default",
|
|
12
|
+
remove: "Remove",
|
|
13
|
+
create: "Create",
|
|
14
|
+
yes: "Yes",
|
|
15
|
+
no: "No",
|
|
16
|
+
confirm: "Confirm",
|
|
17
|
+
title: "Title",
|
|
18
|
+
name: "Name",
|
|
19
|
+
description: "Description",
|
|
20
|
+
url: "URL",
|
|
21
|
+
tags: "Tags",
|
|
22
|
+
status: "Status",
|
|
23
|
+
actions: "Actions",
|
|
24
|
+
draft: "Draft",
|
|
25
|
+
published: "Published",
|
|
26
|
+
preview: "Preview",
|
|
27
|
+
active: "Active",
|
|
28
|
+
siteId: "siteId",
|
|
29
|
+
updated: "Updated"
|
|
30
|
+
},
|
|
31
|
+
sidebar: {
|
|
32
|
+
brand: "ampless",
|
|
33
|
+
dashboard: "Dashboard",
|
|
34
|
+
posts: "Posts",
|
|
35
|
+
media: "Media",
|
|
36
|
+
sites: "Sites",
|
|
37
|
+
viewSite: "View site",
|
|
38
|
+
signOut: "Sign out",
|
|
39
|
+
site: "Site"
|
|
40
|
+
},
|
|
41
|
+
dashboard: {
|
|
42
|
+
title: "Dashboard",
|
|
43
|
+
newPost: "New post",
|
|
44
|
+
totalPosts: "Posts",
|
|
45
|
+
totalLabel: "total",
|
|
46
|
+
published: "Published",
|
|
47
|
+
drafts: "Drafts"
|
|
48
|
+
},
|
|
49
|
+
posts: {
|
|
50
|
+
list: {
|
|
51
|
+
title: "Posts",
|
|
52
|
+
newButton: "New post",
|
|
53
|
+
empty: "No posts yet.",
|
|
54
|
+
createFirst: "Create your first post",
|
|
55
|
+
columnTitle: "Title",
|
|
56
|
+
columnStatus: "Status",
|
|
57
|
+
columnSlug: "Slug",
|
|
58
|
+
columnUpdated: "Updated"
|
|
59
|
+
},
|
|
60
|
+
form: {
|
|
61
|
+
newTitle: "New post",
|
|
62
|
+
editTitle: "Edit post",
|
|
63
|
+
title: "Title",
|
|
64
|
+
slug: "Slug",
|
|
65
|
+
slugPlaceholder: "my-post-slug",
|
|
66
|
+
excerpt: "Excerpt",
|
|
67
|
+
body: "Body",
|
|
68
|
+
format: "Format",
|
|
69
|
+
formatHint: "Tiptap is the rich editor. Markdown / HTML use a plain textarea. Tip: a slug ending in .html (e.g. promo.html) serves the post as a bare HTML response with no theme chrome.",
|
|
70
|
+
insertMedia: "Insert media",
|
|
71
|
+
tabEdit: "Edit",
|
|
72
|
+
tabPreview: "Preview",
|
|
73
|
+
previewNoTitle: "(no title yet)",
|
|
74
|
+
previewHint: "Preview reflects your current draft, including unsaved edits. On the public site the active theme adds its header / footer / typography around this content.",
|
|
75
|
+
tags: "Tags",
|
|
76
|
+
tagsPlaceholder: "comma, separated, tags",
|
|
77
|
+
tagsHint: "Used to group posts on tag pages (e.g. /tag/tech).",
|
|
78
|
+
status: "Status",
|
|
79
|
+
saveChanges: "Save changes",
|
|
80
|
+
createPost: "Create post",
|
|
81
|
+
delete: "Delete",
|
|
82
|
+
deleteConfirm: 'Delete "{title}"?'
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
media: {
|
|
86
|
+
title: "Media",
|
|
87
|
+
uploading: "Uploading...",
|
|
88
|
+
queued: "{count} file(s) queued",
|
|
89
|
+
deleteConfirm: "Delete this file?",
|
|
90
|
+
copyUrl: "Copy URL",
|
|
91
|
+
copyTag: "Copy as HTML tag",
|
|
92
|
+
delete: "Delete",
|
|
93
|
+
empty: "No media yet.",
|
|
94
|
+
dialog: {
|
|
95
|
+
remaining: "{count} file(s) remaining",
|
|
96
|
+
uploading: " \xB7 uploading\u2026",
|
|
97
|
+
useOriginal: "Upload as original",
|
|
98
|
+
passthroughNote: "(GIF/SVG/AVIF/HEIC/BMP/TIFF are passed through automatically)",
|
|
99
|
+
aspectRatio: "Aspect ratio",
|
|
100
|
+
outputFormat: "Output format",
|
|
101
|
+
losslessWebp: "Lossless WebP",
|
|
102
|
+
quality: "Quality: {value}",
|
|
103
|
+
maxDimension: "Max dimension (px)",
|
|
104
|
+
cancelAll: "Cancel all",
|
|
105
|
+
skip: "Skip",
|
|
106
|
+
upload: "Upload",
|
|
107
|
+
uploadingButton: "Uploading\u2026"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
mediaPicker: {
|
|
111
|
+
title: "Insert image",
|
|
112
|
+
description: "Pick from your media library or upload a new file.",
|
|
113
|
+
uploadNew: "Upload new",
|
|
114
|
+
empty: "No media yet.",
|
|
115
|
+
emptyHint: "Click {action} to add the first image.",
|
|
116
|
+
emptyAction: "Upload new"
|
|
117
|
+
},
|
|
118
|
+
sites: {
|
|
119
|
+
list: {
|
|
120
|
+
title: "Sites",
|
|
121
|
+
description: "Per-site settings stored in DynamoDB. Adding sites and binding domains is done in cms.config.ts.",
|
|
122
|
+
columnSiteId: "Site ID",
|
|
123
|
+
columnName: "Name",
|
|
124
|
+
columnUrl: "URL",
|
|
125
|
+
columnDomains: "Domains",
|
|
126
|
+
edit: "Edit"
|
|
127
|
+
},
|
|
128
|
+
edit: {
|
|
129
|
+
themeLink: "Theme settings \u2192",
|
|
130
|
+
site: "Site",
|
|
131
|
+
media: "Media",
|
|
132
|
+
imageDisplay: "Image display",
|
|
133
|
+
imageMaxWidth: "Image max width (CSS)",
|
|
134
|
+
dateDisplay: "Date display",
|
|
135
|
+
dateFormat: "Format",
|
|
136
|
+
timezone: "Timezone (IANA)",
|
|
137
|
+
saved: "Saved. The public site refreshes within ~1 minute (S3 cache + Next.js fetch cache).",
|
|
138
|
+
saveButton: "Save settings",
|
|
139
|
+
imageDisplayInline: "Inline",
|
|
140
|
+
imageDisplayLightbox: "Lightbox",
|
|
141
|
+
dateFormatIso: "ISO (YYYY-MM-DD)",
|
|
142
|
+
dateFormatLong: "Long (April 27, 2026)",
|
|
143
|
+
dateFormatLocale: "Locale",
|
|
144
|
+
defaultPlaceholder: "Default ({value})"
|
|
145
|
+
},
|
|
146
|
+
selector: {
|
|
147
|
+
label: "Site"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
theme: {
|
|
151
|
+
title: "Theme",
|
|
152
|
+
activeLabel: "Active theme",
|
|
153
|
+
currentlyActive: "Currently active: {theme}",
|
|
154
|
+
propagating: " (just switched \u2014 propagating)",
|
|
155
|
+
switchButton: "Switch theme",
|
|
156
|
+
switching: "Switching...",
|
|
157
|
+
switched: "Switched to {theme}. Public site refreshes within ~10 seconds (S3 cache rebuild).",
|
|
158
|
+
previewLabel: "Preview",
|
|
159
|
+
previewHint: "Live preview of the selected theme using the public site. Reflects values currently saved in S3 \u2014 Save first to preview unsaved manifest edits.",
|
|
160
|
+
saveButton: "Save theme",
|
|
161
|
+
saving: "Saving...",
|
|
162
|
+
saved: "Saved. Public site refreshes within ~10 seconds (S3 cache rebuild).",
|
|
163
|
+
invalidValues: "One or more values are invalid \u2014 fix highlighted fields and try again.",
|
|
164
|
+
customizationHeading: "{theme} customization",
|
|
165
|
+
customizationHint: "Empty input resets to the manifest default.",
|
|
166
|
+
lengthHelp: "CSS length, e.g. 0.5rem, 4px.",
|
|
167
|
+
imagePlaceholder: "https://\u2026 or /media/\u2026"
|
|
168
|
+
},
|
|
169
|
+
editor: {
|
|
170
|
+
linkPrompt: "URL",
|
|
171
|
+
altPrompt: "Alt text",
|
|
172
|
+
image: {
|
|
173
|
+
inline: "Inline",
|
|
174
|
+
inlineTitle: "Force inline display",
|
|
175
|
+
lightbox: "Lightbox",
|
|
176
|
+
lightboxTitle: "Force click-to-enlarge",
|
|
177
|
+
alt: "Alt",
|
|
178
|
+
delete: "Delete"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
auth: {
|
|
182
|
+
common: {
|
|
183
|
+
email: "Email",
|
|
184
|
+
password: "Password",
|
|
185
|
+
newPassword: "New password",
|
|
186
|
+
code: "Verification code",
|
|
187
|
+
passwordHint: "Minimum 8 characters.",
|
|
188
|
+
working: "Working..."
|
|
189
|
+
},
|
|
190
|
+
signIn: {
|
|
191
|
+
title: "Sign in",
|
|
192
|
+
description: "Sign in to manage your site.",
|
|
193
|
+
submit: "Sign in",
|
|
194
|
+
forgotPassword: "Forgot password?",
|
|
195
|
+
createAccount: "Create admin account"
|
|
196
|
+
},
|
|
197
|
+
signUp: {
|
|
198
|
+
title: "Create admin account",
|
|
199
|
+
description: "The first user becomes the site admin.",
|
|
200
|
+
submit: "Sign up",
|
|
201
|
+
backToSignIn: "Back to sign in"
|
|
202
|
+
},
|
|
203
|
+
confirm: {
|
|
204
|
+
title: "Confirm email",
|
|
205
|
+
description: "Enter the verification code sent to your email.",
|
|
206
|
+
submit: "Confirm"
|
|
207
|
+
},
|
|
208
|
+
forgot: {
|
|
209
|
+
title: "Reset password",
|
|
210
|
+
description: "We'll email you a verification code.",
|
|
211
|
+
submit: "Send code",
|
|
212
|
+
codeSent: "Verification code sent. Check your email."
|
|
213
|
+
},
|
|
214
|
+
reset: {
|
|
215
|
+
title: "Set new password",
|
|
216
|
+
description: "Enter the code from your email and a new password.",
|
|
217
|
+
submit: "Update password",
|
|
218
|
+
resendCode: "Resend code",
|
|
219
|
+
passwordUpdated: "Password updated. Please sign in."
|
|
220
|
+
},
|
|
221
|
+
additionalStep: "Sign-in needs additional step: {step}",
|
|
222
|
+
errors: {
|
|
223
|
+
invalidCredentials: "Invalid email or password.",
|
|
224
|
+
passwordTooShort: "Password must be at least 8 characters.",
|
|
225
|
+
userExists: "An account with this email already exists."
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
public: {
|
|
229
|
+
back: "\u2190 Back",
|
|
230
|
+
home: "\u2190 Home",
|
|
231
|
+
noPosts: "No posts published yet.",
|
|
232
|
+
tagLabel: "Tag"
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
// src/locales/ja.json
|
|
237
|
+
var ja_default = {
|
|
238
|
+
common: {
|
|
239
|
+
save: "\u4FDD\u5B58",
|
|
240
|
+
saving: "\u4FDD\u5B58\u4E2D...",
|
|
241
|
+
cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
242
|
+
delete: "\u524A\u9664",
|
|
243
|
+
edit: "\u7DE8\u96C6",
|
|
244
|
+
back: "\u623B\u308B",
|
|
245
|
+
loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D...",
|
|
246
|
+
default: "\u30C7\u30D5\u30A9\u30EB\u30C8",
|
|
247
|
+
remove: "\u524A\u9664",
|
|
248
|
+
create: "\u4F5C\u6210",
|
|
249
|
+
yes: "\u306F\u3044",
|
|
250
|
+
no: "\u3044\u3044\u3048",
|
|
251
|
+
confirm: "\u78BA\u8A8D",
|
|
252
|
+
title: "\u30BF\u30A4\u30C8\u30EB",
|
|
253
|
+
name: "\u540D\u524D",
|
|
254
|
+
description: "\u8AAC\u660E",
|
|
255
|
+
url: "URL",
|
|
256
|
+
tags: "\u30BF\u30B0",
|
|
257
|
+
status: "\u30B9\u30C6\u30FC\u30BF\u30B9",
|
|
258
|
+
actions: "\u64CD\u4F5C",
|
|
259
|
+
draft: "\u4E0B\u66F8\u304D",
|
|
260
|
+
published: "\u516C\u958B\u6E08",
|
|
261
|
+
preview: "\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
262
|
+
active: "\u30A2\u30AF\u30C6\u30A3\u30D6",
|
|
263
|
+
siteId: "\u30B5\u30A4\u30C8ID",
|
|
264
|
+
updated: "\u66F4\u65B0\u65E5"
|
|
265
|
+
},
|
|
266
|
+
sidebar: {
|
|
267
|
+
brand: "ampless",
|
|
268
|
+
dashboard: "\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9",
|
|
269
|
+
posts: "\u8A18\u4E8B",
|
|
270
|
+
media: "\u30E1\u30C7\u30A3\u30A2",
|
|
271
|
+
sites: "\u30B5\u30A4\u30C8",
|
|
272
|
+
viewSite: "\u30B5\u30A4\u30C8\u3092\u8868\u793A",
|
|
273
|
+
signOut: "\u30B5\u30A4\u30F3\u30A2\u30A6\u30C8",
|
|
274
|
+
site: "\u30B5\u30A4\u30C8"
|
|
275
|
+
},
|
|
276
|
+
dashboard: {
|
|
277
|
+
title: "\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9",
|
|
278
|
+
newPost: "\u65B0\u898F\u8A18\u4E8B",
|
|
279
|
+
totalPosts: "\u8A18\u4E8B",
|
|
280
|
+
totalLabel: "\u7DCF\u6570",
|
|
281
|
+
published: "\u516C\u958B\u6E08",
|
|
282
|
+
drafts: "\u4E0B\u66F8\u304D"
|
|
283
|
+
},
|
|
284
|
+
posts: {
|
|
285
|
+
list: {
|
|
286
|
+
title: "\u8A18\u4E8B",
|
|
287
|
+
newButton: "\u65B0\u898F\u8A18\u4E8B",
|
|
288
|
+
empty: "\u8A18\u4E8B\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
289
|
+
createFirst: "\u6700\u521D\u306E\u8A18\u4E8B\u3092\u4F5C\u6210",
|
|
290
|
+
columnTitle: "\u30BF\u30A4\u30C8\u30EB",
|
|
291
|
+
columnStatus: "\u30B9\u30C6\u30FC\u30BF\u30B9",
|
|
292
|
+
columnSlug: "\u30B9\u30E9\u30C3\u30B0",
|
|
293
|
+
columnUpdated: "\u66F4\u65B0\u65E5"
|
|
294
|
+
},
|
|
295
|
+
form: {
|
|
296
|
+
newTitle: "\u65B0\u898F\u8A18\u4E8B",
|
|
297
|
+
editTitle: "\u8A18\u4E8B\u3092\u7DE8\u96C6",
|
|
298
|
+
title: "\u30BF\u30A4\u30C8\u30EB",
|
|
299
|
+
slug: "\u30B9\u30E9\u30C3\u30B0",
|
|
300
|
+
slugPlaceholder: "my-post-slug",
|
|
301
|
+
excerpt: "\u629C\u7C8B",
|
|
302
|
+
body: "\u672C\u6587",
|
|
303
|
+
format: "\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",
|
|
304
|
+
formatHint: "Tiptap \u306F\u30EA\u30C3\u30C1\u30A8\u30C7\u30A3\u30BF\u3002Markdown / HTML \u306F\u30D7\u30EC\u30FC\u30F3\u30C6\u30AD\u30B9\u30C8\u30A8\u30EA\u30A2\u3002\u30D2\u30F3\u30C8: \u30B9\u30E9\u30C3\u30B0\u306E\u672B\u5C3E\u304C .html (\u4F8B: promo.html) \u306E\u5834\u5408\u3001\u30C6\u30FC\u30DEchrome\u7121\u3057\u3067\u672C\u6587 HTML \u3092\u76F4\u63A5\u8FD4\u3057\u307E\u3059\u3002",
|
|
305
|
+
insertMedia: "\u30E1\u30C7\u30A3\u30A2\u3092\u633F\u5165",
|
|
306
|
+
tabEdit: "\u7DE8\u96C6",
|
|
307
|
+
tabPreview: "\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
308
|
+
previewNoTitle: "(\u30BF\u30A4\u30C8\u30EB\u672A\u5165\u529B)",
|
|
309
|
+
previewHint: "\u30D7\u30EC\u30D3\u30E5\u30FC\u306F\u672A\u4FDD\u5B58\u306E\u5909\u66F4\u3092\u542B\u3080\u73FE\u5728\u306E\u4E0B\u66F8\u304D\u3092\u53CD\u6620\u3057\u307E\u3059\u3002\u516C\u958B\u30B5\u30A4\u30C8\u3067\u306F\u3001\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C6\u30FC\u30DE\u306E\u30D8\u30C3\u30C0\u30FC / \u30D5\u30C3\u30BF\u30FC / \u30BF\u30A4\u30DD\u30B0\u30E9\u30D5\u30A3\u304C\u672C\u6587\u306E\u5468\u56F2\u306B\u8FFD\u52A0\u3055\u308C\u307E\u3059\u3002",
|
|
310
|
+
tags: "\u30BF\u30B0",
|
|
311
|
+
tagsPlaceholder: "\u30AB\u30F3\u30DE, \u533A\u5207\u308A, \u30BF\u30B0",
|
|
312
|
+
tagsHint: "\u30BF\u30B0\u30DA\u30FC\u30B8\u3067\u8A18\u4E8B\u3092\u30B0\u30EB\u30FC\u30D4\u30F3\u30B0 (\u4F8B: /tag/tech)\u3002",
|
|
313
|
+
status: "\u30B9\u30C6\u30FC\u30BF\u30B9",
|
|
314
|
+
saveChanges: "\u5909\u66F4\u3092\u4FDD\u5B58",
|
|
315
|
+
createPost: "\u8A18\u4E8B\u3092\u4F5C\u6210",
|
|
316
|
+
delete: "\u524A\u9664",
|
|
317
|
+
deleteConfirm: "\u300C{title}\u300D\u3092\u524A\u9664\u3057\u307E\u3059\u304B?"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
media: {
|
|
321
|
+
title: "\u30E1\u30C7\u30A3\u30A2",
|
|
322
|
+
uploading: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u4E2D...",
|
|
323
|
+
queued: "{count}\u4EF6\u306E\u30D5\u30A1\u30A4\u30EB\u304C\u30AD\u30E5\u30FC\u4E2D",
|
|
324
|
+
deleteConfirm: "\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u307E\u3059\u304B?",
|
|
325
|
+
copyUrl: "URL\u3092\u30B3\u30D4\u30FC",
|
|
326
|
+
copyTag: "HTML\u30BF\u30B0\u3068\u3057\u3066\u30B3\u30D4\u30FC",
|
|
327
|
+
delete: "\u524A\u9664",
|
|
328
|
+
empty: "\u30E1\u30C7\u30A3\u30A2\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
329
|
+
dialog: {
|
|
330
|
+
remaining: "\u6B8B\u308A{count}\u4EF6",
|
|
331
|
+
uploading: " \xB7 \u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u4E2D\u2026",
|
|
332
|
+
useOriginal: "\u5143\u753B\u50CF\u306E\u307E\u307E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
|
|
333
|
+
passthroughNote: "(GIF/SVG/AVIF/HEIC/BMP/TIFF\u306F\u81EA\u52D5\u3067\u539F\u672C\u6271\u3044)",
|
|
334
|
+
aspectRatio: "\u30A2\u30B9\u30DA\u30AF\u30C8\u6BD4",
|
|
335
|
+
outputFormat: "\u51FA\u529B\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",
|
|
336
|
+
losslessWebp: "\u30ED\u30B9\u30EC\u30B9 WebP",
|
|
337
|
+
quality: "\u54C1\u8CEA: {value}",
|
|
338
|
+
maxDimension: "\u9577\u8FBA\u6700\u5927 (px)",
|
|
339
|
+
cancelAll: "\u3059\u3079\u3066\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
340
|
+
skip: "\u30B9\u30AD\u30C3\u30D7",
|
|
341
|
+
upload: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
|
|
342
|
+
uploadingButton: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u4E2D\u2026"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
mediaPicker: {
|
|
346
|
+
title: "\u753B\u50CF\u3092\u633F\u5165",
|
|
347
|
+
description: "\u30E1\u30C7\u30A3\u30A2\u30E9\u30A4\u30D6\u30E9\u30EA\u304B\u3089\u9078\u3076\u304B\u3001\u65B0\u3057\u3044\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
348
|
+
uploadNew: "\u65B0\u898F\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
|
|
349
|
+
empty: "\u30E1\u30C7\u30A3\u30A2\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
350
|
+
emptyHint: "{action}\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u6700\u521D\u306E\u753B\u50CF\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
351
|
+
emptyAction: "\u65B0\u898F\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"
|
|
352
|
+
},
|
|
353
|
+
sites: {
|
|
354
|
+
list: {
|
|
355
|
+
title: "\u30B5\u30A4\u30C8",
|
|
356
|
+
description: "\u30B5\u30A4\u30C8\u3054\u3068\u306E\u8A2D\u5B9A\u306FDynamoDB\u306B\u4FDD\u5B58\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30B5\u30A4\u30C8\u306E\u8FFD\u52A0\u3068\u30C9\u30E1\u30A4\u30F3\u306E\u7D10\u4ED8\u3051\u306Fcms.config.ts\u3067\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
357
|
+
columnSiteId: "\u30B5\u30A4\u30C8ID",
|
|
358
|
+
columnName: "\u540D\u524D",
|
|
359
|
+
columnUrl: "URL",
|
|
360
|
+
columnDomains: "\u30C9\u30E1\u30A4\u30F3",
|
|
361
|
+
edit: "\u7DE8\u96C6"
|
|
362
|
+
},
|
|
363
|
+
edit: {
|
|
364
|
+
themeLink: "\u30C6\u30FC\u30DE\u8A2D\u5B9A \u2192",
|
|
365
|
+
site: "\u30B5\u30A4\u30C8",
|
|
366
|
+
media: "\u30E1\u30C7\u30A3\u30A2",
|
|
367
|
+
imageDisplay: "\u753B\u50CF\u8868\u793A",
|
|
368
|
+
imageMaxWidth: "\u753B\u50CF\u306E\u6700\u5927\u5E45(CSS)",
|
|
369
|
+
dateDisplay: "\u65E5\u4ED8\u8868\u793A",
|
|
370
|
+
dateFormat: "\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",
|
|
371
|
+
timezone: "\u30BF\u30A4\u30E0\u30BE\u30FC\u30F3(IANA)",
|
|
372
|
+
saved: "\u4FDD\u5B58\u3057\u307E\u3057\u305F\u3002\u516C\u958B\u30B5\u30A4\u30C8\u306B\u306F\u7D041\u5206\u4EE5\u5185\u306B\u53CD\u6620\u3055\u308C\u307E\u3059(S3\u30AD\u30E3\u30C3\u30B7\u30E5 + Next.js\u30AD\u30E3\u30C3\u30B7\u30E5)\u3002",
|
|
373
|
+
saveButton: "\u8A2D\u5B9A\u3092\u4FDD\u5B58",
|
|
374
|
+
imageDisplayInline: "\u30A4\u30F3\u30E9\u30A4\u30F3",
|
|
375
|
+
imageDisplayLightbox: "\u30E9\u30A4\u30C8\u30DC\u30C3\u30AF\u30B9",
|
|
376
|
+
dateFormatIso: "ISO\u5F62\u5F0F (YYYY-MM-DD)",
|
|
377
|
+
dateFormatLong: "\u9577\u3044\u5F62\u5F0F (2026\u5E744\u670827\u65E5)",
|
|
378
|
+
dateFormatLocale: "\u30ED\u30B1\u30FC\u30EB\u4F9D\u5B58",
|
|
379
|
+
defaultPlaceholder: "\u30C7\u30D5\u30A9\u30EB\u30C8 ({value})"
|
|
380
|
+
},
|
|
381
|
+
selector: {
|
|
382
|
+
label: "\u30B5\u30A4\u30C8"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
theme: {
|
|
386
|
+
title: "\u30C6\u30FC\u30DE",
|
|
387
|
+
activeLabel: "\u30A2\u30AF\u30C6\u30A3\u30D6\u30C6\u30FC\u30DE",
|
|
388
|
+
currentlyActive: "\u73FE\u5728\u306E\u30A2\u30AF\u30C6\u30A3\u30D6\u30C6\u30FC\u30DE: {theme}",
|
|
389
|
+
propagating: " (\u5207\u66FF\u4E2D \u2014 \u53CD\u6620\u5F85\u3061)",
|
|
390
|
+
switchButton: "\u30C6\u30FC\u30DE\u3092\u5207\u308A\u66FF\u3048",
|
|
391
|
+
switching: "\u5207\u308A\u66FF\u3048\u4E2D...",
|
|
392
|
+
switched: "{theme}\u306B\u5207\u308A\u66FF\u3048\u307E\u3057\u305F\u3002\u516C\u958B\u30B5\u30A4\u30C8\u306B\u306F\u7D0410\u79D2\u4EE5\u5185\u306B\u53CD\u6620\u3055\u308C\u307E\u3059(S3\u30AD\u30E3\u30C3\u30B7\u30E5\u518D\u751F\u6210)\u3002",
|
|
393
|
+
previewLabel: "\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
394
|
+
previewHint: "\u9078\u629E\u4E2D\u306E\u30C6\u30FC\u30DE\u3067\u516C\u958B\u30B5\u30A4\u30C8\u3092\u30E9\u30A4\u30D6\u30D7\u30EC\u30D3\u30E5\u30FC\u3002S3 \u306B\u4FDD\u5B58\u6E08\u307F\u306E\u5024\u304C\u53CD\u6620\u3055\u308C\u307E\u3059 \u2014 \u672A\u4FDD\u5B58\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u53CD\u6620\u3059\u308B\u306B\u306F\u5148\u306B\u4FDD\u5B58\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
395
|
+
saveButton: "\u30C6\u30FC\u30DE\u3092\u4FDD\u5B58",
|
|
396
|
+
saving: "\u4FDD\u5B58\u4E2D...",
|
|
397
|
+
saved: "\u4FDD\u5B58\u3057\u307E\u3057\u305F\u3002\u516C\u958B\u30B5\u30A4\u30C8\u306B\u306F\u7D0410\u79D2\u4EE5\u5185\u306B\u53CD\u6620\u3055\u308C\u307E\u3059(S3\u30AD\u30E3\u30C3\u30B7\u30E5\u518D\u751F\u6210)\u3002",
|
|
398
|
+
invalidValues: "\u4E0D\u6B63\u306A\u5024\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059 \u2014 \u30CF\u30A4\u30E9\u30A4\u30C8\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u4FEE\u6B63\u3057\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
399
|
+
customizationHeading: "{theme}\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA",
|
|
400
|
+
customizationHint: "\u7A7A\u6B04\u306B\u3059\u308B\u3068\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u306B\u623B\u308A\u307E\u3059\u3002",
|
|
401
|
+
lengthHelp: "CSS\u306E\u9577\u3055\u3002\u4F8B: 0.5rem, 4px\u3002",
|
|
402
|
+
imagePlaceholder: "https://\u2026 \u307E\u305F\u306F /media/\u2026"
|
|
403
|
+
},
|
|
404
|
+
editor: {
|
|
405
|
+
linkPrompt: "URL",
|
|
406
|
+
altPrompt: "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8",
|
|
407
|
+
image: {
|
|
408
|
+
inline: "\u30A4\u30F3\u30E9\u30A4\u30F3",
|
|
409
|
+
inlineTitle: "\u5F37\u5236\u7684\u306B\u30A4\u30F3\u30E9\u30A4\u30F3\u8868\u793A",
|
|
410
|
+
lightbox: "\u30E9\u30A4\u30C8\u30DC\u30C3\u30AF\u30B9",
|
|
411
|
+
lightboxTitle: "\u5F37\u5236\u7684\u306B\u30AF\u30EA\u30C3\u30AF\u3067\u62E1\u5927",
|
|
412
|
+
alt: "\u4EE3\u66FF",
|
|
413
|
+
delete: "\u524A\u9664"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
auth: {
|
|
417
|
+
common: {
|
|
418
|
+
email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",
|
|
419
|
+
password: "\u30D1\u30B9\u30EF\u30FC\u30C9",
|
|
420
|
+
newPassword: "\u65B0\u3057\u3044\u30D1\u30B9\u30EF\u30FC\u30C9",
|
|
421
|
+
code: "\u78BA\u8A8D\u30B3\u30FC\u30C9",
|
|
422
|
+
passwordHint: "8\u6587\u5B57\u4EE5\u4E0A\u3002",
|
|
423
|
+
working: "\u51E6\u7406\u4E2D..."
|
|
424
|
+
},
|
|
425
|
+
signIn: {
|
|
426
|
+
title: "\u30B5\u30A4\u30F3\u30A4\u30F3",
|
|
427
|
+
description: "\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u30B5\u30A4\u30C8\u3092\u7BA1\u7406\u3057\u307E\u3059\u3002",
|
|
428
|
+
submit: "\u30B5\u30A4\u30F3\u30A4\u30F3",
|
|
429
|
+
forgotPassword: "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u304A\u5FD8\u308C\u3067\u3059\u304B?",
|
|
430
|
+
createAccount: "\u7BA1\u7406\u8005\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210"
|
|
431
|
+
},
|
|
432
|
+
signUp: {
|
|
433
|
+
title: "\u7BA1\u7406\u8005\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210",
|
|
434
|
+
description: "\u6700\u521D\u306E\u30E6\u30FC\u30B6\u30FC\u304C\u30B5\u30A4\u30C8\u7BA1\u7406\u8005\u306B\u306A\u308A\u307E\u3059\u3002",
|
|
435
|
+
submit: "\u30A2\u30AB\u30A6\u30F3\u30C8\u4F5C\u6210",
|
|
436
|
+
backToSignIn: "\u30B5\u30A4\u30F3\u30A4\u30F3\u306B\u623B\u308B"
|
|
437
|
+
},
|
|
438
|
+
confirm: {
|
|
439
|
+
title: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306E\u78BA\u8A8D",
|
|
440
|
+
description: "\u30E1\u30FC\u30EB\u306B\u9001\u4FE1\u3055\u308C\u305F\u78BA\u8A8D\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
441
|
+
submit: "\u78BA\u8A8D"
|
|
442
|
+
},
|
|
443
|
+
forgot: {
|
|
444
|
+
title: "\u30D1\u30B9\u30EF\u30FC\u30C9\u30EA\u30BB\u30C3\u30C8",
|
|
445
|
+
description: "\u78BA\u8A8D\u30B3\u30FC\u30C9\u3092\u30E1\u30FC\u30EB\u3067\u9001\u4FE1\u3057\u307E\u3059\u3002",
|
|
446
|
+
submit: "\u30B3\u30FC\u30C9\u3092\u9001\u4FE1",
|
|
447
|
+
codeSent: "\u78BA\u8A8D\u30B3\u30FC\u30C9\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F\u3002\u30E1\u30FC\u30EB\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002"
|
|
448
|
+
},
|
|
449
|
+
reset: {
|
|
450
|
+
title: "\u65B0\u3057\u3044\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u8A2D\u5B9A",
|
|
451
|
+
description: "\u30E1\u30FC\u30EB\u306B\u9001\u4FE1\u3055\u308C\u305F\u78BA\u8A8D\u30B3\u30FC\u30C9\u3068\u65B0\u3057\u3044\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
452
|
+
submit: "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u66F4\u65B0",
|
|
453
|
+
resendCode: "\u30B3\u30FC\u30C9\u3092\u518D\u9001\u4FE1",
|
|
454
|
+
passwordUpdated: "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F\u3002\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
|
|
455
|
+
},
|
|
456
|
+
additionalStep: "\u30B5\u30A4\u30F3\u30A4\u30F3\u306B\u8FFD\u52A0\u30B9\u30C6\u30C3\u30D7\u304C\u5FC5\u8981\u3067\u3059: {step}",
|
|
457
|
+
errors: {
|
|
458
|
+
invalidCredentials: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u307E\u305F\u306F\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
459
|
+
passwordTooShort: "\u30D1\u30B9\u30EF\u30FC\u30C9\u306F8\u6587\u5B57\u4EE5\u4E0A\u5FC5\u8981\u3067\u3059\u3002",
|
|
460
|
+
userExists: "\u3053\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059\u3002"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
public: {
|
|
464
|
+
back: "\u2190 \u623B\u308B",
|
|
465
|
+
home: "\u2190 \u30DB\u30FC\u30E0",
|
|
466
|
+
noPosts: "\u307E\u3060\u516C\u958B\u3055\u308C\u305F\u8A18\u4E8B\u306F\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
467
|
+
tagLabel: "\u30BF\u30B0"
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
// src/lib/i18n.ts
|
|
472
|
+
var dictionaries = { en: en_default, ja: ja_default };
|
|
473
|
+
var SUPPORTED_LOCALES = Object.keys(dictionaries);
|
|
474
|
+
var FALLBACK_LOCALE = "en";
|
|
475
|
+
function resolveLocale(input) {
|
|
476
|
+
if (!input) return { locale: FALLBACK_LOCALE, dict: dictionaries[FALLBACK_LOCALE] };
|
|
477
|
+
if (typeof input === "string") {
|
|
478
|
+
if (input in dictionaries) {
|
|
479
|
+
return { locale: input, dict: dictionaries[input] };
|
|
480
|
+
}
|
|
481
|
+
return { locale: FALLBACK_LOCALE, dict: dictionaries[FALLBACK_LOCALE] };
|
|
482
|
+
}
|
|
483
|
+
return { locale: FALLBACK_LOCALE, dict: input };
|
|
484
|
+
}
|
|
485
|
+
function getDictionary(locale = FALLBACK_LOCALE) {
|
|
486
|
+
return dictionaries[locale];
|
|
487
|
+
}
|
|
488
|
+
function lookup(dict, key) {
|
|
489
|
+
let cur = dict;
|
|
490
|
+
for (const part of key.split(".")) {
|
|
491
|
+
if (cur && typeof cur === "object" && part in cur) {
|
|
492
|
+
cur = cur[part];
|
|
493
|
+
} else {
|
|
494
|
+
return void 0;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
return typeof cur === "string" ? cur : void 0;
|
|
498
|
+
}
|
|
499
|
+
function translate(dict, key, vars) {
|
|
500
|
+
const value = lookup(dict, key) ?? lookup(dictionaries[FALLBACK_LOCALE], key) ?? key;
|
|
501
|
+
if (!vars) return value;
|
|
502
|
+
return value.replace(/\{(\w+)\}/g, (_, k) => {
|
|
503
|
+
const v = vars[k];
|
|
504
|
+
return v !== void 0 ? String(v) : `{${k}}`;
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// src/lib/media.ts
|
|
509
|
+
var state = { outputs: null, cmsConfig: null };
|
|
510
|
+
function setAdminMediaContext(outputs, cmsConfig2) {
|
|
511
|
+
state.outputs = outputs;
|
|
512
|
+
state.cmsConfig = cmsConfig2;
|
|
513
|
+
}
|
|
514
|
+
function publicMediaUrl(input) {
|
|
515
|
+
if (/^https?:\/\//.test(input)) return input;
|
|
516
|
+
let path = input.replace(/^\/+/, "");
|
|
517
|
+
if (path.startsWith("public/")) path = path.slice("public/".length);
|
|
518
|
+
const { outputs, cmsConfig: cmsConfig2 } = state;
|
|
519
|
+
const delivery = cmsConfig2?.media?.delivery ?? "nextjs";
|
|
520
|
+
if (delivery !== "s3-direct") return `/api/media/${path}`;
|
|
521
|
+
const storage = outputs?.storage;
|
|
522
|
+
if (!storage) return `/api/media/${path}`;
|
|
523
|
+
return `https://${storage.bucket_name}.s3.${storage.aws_region}.amazonaws.com/public/${path}`;
|
|
524
|
+
}
|
|
525
|
+
function createMedia(outputs, cmsConfig2) {
|
|
526
|
+
const storage = outputs.storage;
|
|
527
|
+
function s3DirectUrl(path) {
|
|
528
|
+
if (!storage) return `/api/media/${path}`;
|
|
529
|
+
return `https://${storage.bucket_name}.s3.${storage.aws_region}.amazonaws.com/public/${path}`;
|
|
530
|
+
}
|
|
531
|
+
function urlFor(input) {
|
|
532
|
+
if (/^https?:\/\//.test(input)) return input;
|
|
533
|
+
let path = input.replace(/^\/+/, "");
|
|
534
|
+
if (path.startsWith("public/")) path = path.slice("public/".length);
|
|
535
|
+
const delivery = cmsConfig2.media?.delivery ?? "nextjs";
|
|
536
|
+
return delivery === "s3-direct" ? s3DirectUrl(path) : `/api/media/${path}`;
|
|
537
|
+
}
|
|
538
|
+
return { publicMediaUrl: urlFor };
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// src/lib/admin-site-client.ts
|
|
542
|
+
import { DEFAULT_SITE_ID, isMultiSite } from "ampless";
|
|
543
|
+
var ADMIN_SITE_COOKIE = "admin-site-id";
|
|
544
|
+
var cmsConfig = null;
|
|
545
|
+
function setAdminCmsConfig(config) {
|
|
546
|
+
cmsConfig = config;
|
|
547
|
+
}
|
|
548
|
+
function readAdminSiteIdFromCookie() {
|
|
549
|
+
if (!cmsConfig) return DEFAULT_SITE_ID;
|
|
550
|
+
if (!isMultiSite(cmsConfig)) return DEFAULT_SITE_ID;
|
|
551
|
+
const sites = cmsConfig.sites ?? {};
|
|
552
|
+
if (typeof document !== "undefined") {
|
|
553
|
+
const match = document.cookie.match(
|
|
554
|
+
new RegExp(`(?:^|;\\s*)${ADMIN_SITE_COOKIE}=([^;]+)`)
|
|
555
|
+
);
|
|
556
|
+
if (match) {
|
|
557
|
+
const v = decodeURIComponent(match[1]);
|
|
558
|
+
if (sites[v]) return v;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
const first = Object.keys(sites)[0];
|
|
562
|
+
return first ?? DEFAULT_SITE_ID;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export {
|
|
566
|
+
resolveLocale,
|
|
567
|
+
getDictionary,
|
|
568
|
+
translate,
|
|
569
|
+
setAdminMediaContext,
|
|
570
|
+
publicMediaUrl,
|
|
571
|
+
createMedia,
|
|
572
|
+
ADMIN_SITE_COOKIE,
|
|
573
|
+
setAdminCmsConfig,
|
|
574
|
+
readAdminSiteIdFromCookie
|
|
575
|
+
};
|