@ampless/admin 0.2.0-alpha.8 → 1.0.0-alpha.26
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.ja.md +73 -0
- package/README.md +3 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/chunk-2ITWLRYF.js +38 -0
- package/dist/chunk-2U3POKAZ.js +198 -0
- package/dist/{chunk-VXEVLHGL.js → chunk-6LQGVDCW.js} +2 -2
- package/dist/chunk-6NPYUTV6.js +250 -0
- package/dist/chunk-6SB7YICQ.js +48 -0
- package/dist/chunk-6W3JIOOR.js +37 -0
- package/dist/chunk-CTGFMK2J.js +335 -0
- package/dist/chunk-G4CF5ZWV.js +1319 -0
- package/dist/chunk-KQOE5CT6.js +21 -0
- package/dist/chunk-MWSCSCCU.js +67 -0
- package/dist/chunk-Q66BLMNJ.js +33 -0
- package/dist/chunk-TZ5F24BG.js +149 -0
- package/dist/chunk-VL6MMF2P.js +21 -0
- package/dist/chunk-VSS5FWSR.js +334 -0
- package/dist/{chunk-KKM2MCM4.js → chunk-WL4IBW2D.js} +121 -43
- package/dist/chunk-YFWHKIVH.js +1187 -0
- package/dist/components/admin-dashboard.d.ts +10 -0
- package/dist/components/admin-dashboard.js +9 -0
- package/dist/components/edit-post-view.d.ts +9 -0
- package/dist/components/edit-post-view.js +12 -0
- package/dist/components/index.d.ts +14 -42
- package/dist/components/index.js +22 -33
- package/dist/components/login-view.d.ts +5 -0
- package/dist/components/login-view.js +9 -0
- package/dist/components/mcp-tokens-view.d.ts +16 -0
- package/dist/components/mcp-tokens-view.js +9 -0
- package/dist/components/media-view.d.ts +5 -0
- package/dist/components/media-view.js +12 -0
- package/dist/components/new-post-view.d.ts +5 -0
- package/dist/components/new-post-view.js +12 -0
- package/dist/components/posts-list-view.d.ts +5 -0
- package/dist/components/posts-list-view.js +9 -0
- package/dist/components/users-list-view.d.ts +7 -0
- package/dist/components/users-list-view.js +9 -0
- package/dist/{i18n-DzXXcIQQ.d.ts → i18n-BhMBRfio.d.ts} +179 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +17 -38
- package/dist/lib/theme-actions.d.ts +3 -3
- package/dist/lib/theme-actions.js +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/index.d.ts +35 -16
- package/dist/pages/index.js +90 -257
- package/package.json +19 -8
- package/dist/chunk-QDPB5W35.js +0 -3251
- package/dist/login-view-BKrSZLJu.d.ts +0 -24
|
@@ -35,6 +35,7 @@ var en_default = {
|
|
|
35
35
|
media: "Media",
|
|
36
36
|
sites: "Sites",
|
|
37
37
|
users: "Users",
|
|
38
|
+
mcpTokens: "MCP tokens",
|
|
38
39
|
viewSite: "View site",
|
|
39
40
|
signOut: "Sign out",
|
|
40
41
|
site: "Site",
|
|
@@ -200,7 +201,14 @@ var en_default = {
|
|
|
200
201
|
customizationHeading: "{theme} customization",
|
|
201
202
|
customizationHint: "Empty input resets to the manifest default.",
|
|
202
203
|
lengthHelp: "CSS length, e.g. 0.5rem, 4px.",
|
|
203
|
-
imagePlaceholder: "https://\u2026 or /media/\u2026"
|
|
204
|
+
imagePlaceholder: "https://\u2026 or /media/\u2026",
|
|
205
|
+
colorScheme: {
|
|
206
|
+
label: "Color scheme",
|
|
207
|
+
hint: "How the public site picks between the theme's light and dark token palettes.",
|
|
208
|
+
auto: "Auto (follow visitor's system)",
|
|
209
|
+
light: "Light only",
|
|
210
|
+
dark: "Dark only"
|
|
211
|
+
}
|
|
204
212
|
},
|
|
205
213
|
editor: {
|
|
206
214
|
linkPrompt: "URL",
|
|
@@ -212,6 +220,18 @@ var en_default = {
|
|
|
212
220
|
lightboxTitle: "Force click-to-enlarge",
|
|
213
221
|
alt: "Alt",
|
|
214
222
|
delete: "Delete"
|
|
223
|
+
},
|
|
224
|
+
table: {
|
|
225
|
+
title: "Table",
|
|
226
|
+
insert: "Insert table (3\xD73)",
|
|
227
|
+
addRowBefore: "Add row above",
|
|
228
|
+
addRowAfter: "Add row below",
|
|
229
|
+
addColumnBefore: "Add column before",
|
|
230
|
+
addColumnAfter: "Add column after",
|
|
231
|
+
deleteRow: "Delete row",
|
|
232
|
+
deleteColumn: "Delete column",
|
|
233
|
+
toggleHeaderRow: "Toggle header row",
|
|
234
|
+
deleteTable: "Delete table"
|
|
215
235
|
}
|
|
216
236
|
},
|
|
217
237
|
auth: {
|
|
@@ -261,6 +281,45 @@ var en_default = {
|
|
|
261
281
|
userExists: "An account with this email already exists."
|
|
262
282
|
}
|
|
263
283
|
},
|
|
284
|
+
mcpTokens: {
|
|
285
|
+
title: "MCP tokens",
|
|
286
|
+
description: "Access tokens for the HTTP MCP endpoint. Use them in Claude Desktop / Cursor / any MCP-aware client to read and write this CMS over the wire.",
|
|
287
|
+
endpointTitle: "MCP endpoint",
|
|
288
|
+
endpointCopy: "Copy",
|
|
289
|
+
endpointCopied: "Copied",
|
|
290
|
+
endpointMissing: "Not deployed yet. Run `npm run sandbox` or push to Amplify Hosting to provision the endpoint URL.",
|
|
291
|
+
inertBanner: "Heads up: the endpoint validates tokens, but tool dispatch (list_posts / create_post / etc.) lands in v0.2 Phase 4. Valid tokens currently get a stub 200 response.",
|
|
292
|
+
createButton: "Create token",
|
|
293
|
+
createModalTitle: "Create token",
|
|
294
|
+
scopeLabel: "Scope",
|
|
295
|
+
scopeAll: "All sites",
|
|
296
|
+
expirationLabel: "Expiration",
|
|
297
|
+
expirationNever: "Never",
|
|
298
|
+
expiration30days: "30 days",
|
|
299
|
+
expiration90days: "90 days",
|
|
300
|
+
expirationCustom: "Custom date",
|
|
301
|
+
issueButton: "Issue token",
|
|
302
|
+
issuing: "Issuing...",
|
|
303
|
+
revealTitle: "Token issued",
|
|
304
|
+
revealHint: "This is the only time you will see this token. Copy it now \u2014 closing this dialog discards it permanently.",
|
|
305
|
+
copy: "Copy",
|
|
306
|
+
copied: "Copied!",
|
|
307
|
+
done: "Done",
|
|
308
|
+
loading: "Loading tokens...",
|
|
309
|
+
error: "Failed to load tokens",
|
|
310
|
+
listEmpty: "No tokens yet. Click 'Create token' to issue your first one.",
|
|
311
|
+
columnPrefix: "Prefix",
|
|
312
|
+
columnScope: "Scope",
|
|
313
|
+
columnCreated: "Created",
|
|
314
|
+
columnLastUsed: "Last used",
|
|
315
|
+
columnStatus: "Status",
|
|
316
|
+
lastUsedNever: "Never used",
|
|
317
|
+
statusActive: "Active",
|
|
318
|
+
statusRevoked: "Revoked",
|
|
319
|
+
statusExpired: "Expired",
|
|
320
|
+
revoke: "Revoke",
|
|
321
|
+
revokeConfirm: "Revoke this token? This cannot be undone."
|
|
322
|
+
},
|
|
264
323
|
public: {
|
|
265
324
|
back: "\u2190 Back",
|
|
266
325
|
home: "\u2190 Home",
|
|
@@ -306,6 +365,7 @@ var ja_default = {
|
|
|
306
365
|
media: "\u30E1\u30C7\u30A3\u30A2",
|
|
307
366
|
sites: "\u30B5\u30A4\u30C8",
|
|
308
367
|
users: "\u30E6\u30FC\u30B6\u30FC",
|
|
368
|
+
mcpTokens: "MCP \u30C8\u30FC\u30AF\u30F3",
|
|
309
369
|
viewSite: "\u30B5\u30A4\u30C8\u3092\u8868\u793A",
|
|
310
370
|
signOut: "\u30B5\u30A4\u30F3\u30A2\u30A6\u30C8",
|
|
311
371
|
site: "\u30B5\u30A4\u30C8",
|
|
@@ -471,7 +531,14 @@ var ja_default = {
|
|
|
471
531
|
customizationHeading: "{theme}\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA",
|
|
472
532
|
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",
|
|
473
533
|
lengthHelp: "CSS\u306E\u9577\u3055\u3002\u4F8B: 0.5rem, 4px\u3002",
|
|
474
|
-
imagePlaceholder: "https://\u2026 \u307E\u305F\u306F /media/\u2026"
|
|
534
|
+
imagePlaceholder: "https://\u2026 \u307E\u305F\u306F /media/\u2026",
|
|
535
|
+
colorScheme: {
|
|
536
|
+
label: "\u30AB\u30E9\u30FC\u30B9\u30AD\u30FC\u30E0",
|
|
537
|
+
hint: "\u516C\u958B\u30B5\u30A4\u30C8\u3067\u30C6\u30FC\u30DE\u306E\u30E9\u30A4\u30C8/\u30C0\u30FC\u30AF\u4E21\u30D1\u30EC\u30C3\u30C8\u306E\u3069\u3061\u3089\u3092\u4F7F\u3046\u304B\u306E\u9078\u629E\u3002",
|
|
538
|
+
auto: "\u81EA\u52D5 (\u95B2\u89A7\u8005\u306EOS\u8A2D\u5B9A\u306B\u8FFD\u5F93)",
|
|
539
|
+
light: "\u30E9\u30A4\u30C8\u56FA\u5B9A",
|
|
540
|
+
dark: "\u30C0\u30FC\u30AF\u56FA\u5B9A"
|
|
541
|
+
}
|
|
475
542
|
},
|
|
476
543
|
editor: {
|
|
477
544
|
linkPrompt: "URL",
|
|
@@ -483,6 +550,18 @@ var ja_default = {
|
|
|
483
550
|
lightboxTitle: "\u5F37\u5236\u7684\u306B\u30AF\u30EA\u30C3\u30AF\u3067\u62E1\u5927",
|
|
484
551
|
alt: "\u4EE3\u66FF",
|
|
485
552
|
delete: "\u524A\u9664"
|
|
553
|
+
},
|
|
554
|
+
table: {
|
|
555
|
+
title: "\u30C6\u30FC\u30D6\u30EB",
|
|
556
|
+
insert: "\u30C6\u30FC\u30D6\u30EB\u3092\u633F\u5165 (3\xD73)",
|
|
557
|
+
addRowBefore: "\u4E0A\u306B\u884C\u3092\u8FFD\u52A0",
|
|
558
|
+
addRowAfter: "\u4E0B\u306B\u884C\u3092\u8FFD\u52A0",
|
|
559
|
+
addColumnBefore: "\u5DE6\u306B\u5217\u3092\u8FFD\u52A0",
|
|
560
|
+
addColumnAfter: "\u53F3\u306B\u5217\u3092\u8FFD\u52A0",
|
|
561
|
+
deleteRow: "\u884C\u3092\u524A\u9664",
|
|
562
|
+
deleteColumn: "\u5217\u3092\u524A\u9664",
|
|
563
|
+
toggleHeaderRow: "\u30D8\u30C3\u30C0\u30FC\u884C\u3092\u5207\u66FF",
|
|
564
|
+
deleteTable: "\u30C6\u30FC\u30D6\u30EB\u3092\u524A\u9664"
|
|
486
565
|
}
|
|
487
566
|
},
|
|
488
567
|
auth: {
|
|
@@ -532,6 +611,45 @@ var ja_default = {
|
|
|
532
611
|
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"
|
|
533
612
|
}
|
|
534
613
|
},
|
|
614
|
+
mcpTokens: {
|
|
615
|
+
title: "MCP \u30C8\u30FC\u30AF\u30F3",
|
|
616
|
+
description: "HTTP MCP \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u7528\u306E\u30A2\u30AF\u30BB\u30B9\u30C8\u30FC\u30AF\u30F3\u3002Claude Desktop / Cursor \u306A\u3069\u306E MCP \u5BFE\u5FDC\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304B\u3089\u3001\u3053\u306E CMS \u306E\u8AAD\u307F\u66F8\u304D\u306B\u4F7F\u3048\u307E\u3059\u3002",
|
|
617
|
+
endpointTitle: "MCP \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8",
|
|
618
|
+
endpointCopy: "\u30B3\u30D4\u30FC",
|
|
619
|
+
endpointCopied: "\u30B3\u30D4\u30FC\u6E08\u307F",
|
|
620
|
+
endpointMissing: "\u307E\u3060\u30C7\u30D7\u30ED\u30A4\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002`npm run sandbox` \u3092\u5B9F\u884C\u3059\u308B\u304B Amplify Hosting \u306B push \u3057\u3066\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8 URL \u3092\u30D7\u30ED\u30D3\u30B8\u30E7\u30CB\u30F3\u30B0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
621
|
+
inertBanner: "\u6CE8\u610F: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306F\u30C8\u30FC\u30AF\u30F3\u691C\u8A3C\u3092\u884C\u3044\u307E\u3059\u304C\u3001\u30C4\u30FC\u30EB\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1 (list_posts / create_post \u306A\u3069) \u306F v0.2 Phase 4 \u3067\u5B9F\u88C5\u3055\u308C\u307E\u3059\u3002\u73FE\u5728\u306F\u6709\u52B9\u306A\u30C8\u30FC\u30AF\u30F3\u306B\u5BFE\u3057\u3066 stub \u306E 200 \u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u8FD4\u3057\u307E\u3059\u3002",
|
|
622
|
+
createButton: "\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210",
|
|
623
|
+
createModalTitle: "\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210",
|
|
624
|
+
scopeLabel: "\u30B9\u30B3\u30FC\u30D7",
|
|
625
|
+
scopeAll: "\u3059\u3079\u3066\u306E\u30B5\u30A4\u30C8",
|
|
626
|
+
expirationLabel: "\u6709\u52B9\u671F\u9650",
|
|
627
|
+
expirationNever: "\u7121\u671F\u9650",
|
|
628
|
+
expiration30days: "30\u65E5",
|
|
629
|
+
expiration90days: "90\u65E5",
|
|
630
|
+
expirationCustom: "\u65E5\u4ED8\u3092\u6307\u5B9A",
|
|
631
|
+
issueButton: "\u30C8\u30FC\u30AF\u30F3\u3092\u767A\u884C",
|
|
632
|
+
issuing: "\u767A\u884C\u4E2D...",
|
|
633
|
+
revealTitle: "\u30C8\u30FC\u30AF\u30F3\u3092\u767A\u884C\u3057\u307E\u3057\u305F",
|
|
634
|
+
revealHint: "\u3053\u306E\u30C8\u30FC\u30AF\u30F3\u304C\u8868\u793A\u3055\u308C\u308B\u306E\u306F\u4ECA\u56DE\u9650\u308A\u3067\u3059\u3002\u4ECA\u3059\u3050\u30B3\u30D4\u30FC\u3057\u3066\u304F\u3060\u3055\u3044 \u2014 \u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u9589\u3058\u308B\u3068\u6C38\u4E45\u306B\u5931\u308F\u308C\u307E\u3059\u3002",
|
|
635
|
+
copy: "\u30B3\u30D4\u30FC",
|
|
636
|
+
copied: "\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
|
|
637
|
+
done: "\u9589\u3058\u308B",
|
|
638
|
+
loading: "\u30C8\u30FC\u30AF\u30F3\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D...",
|
|
639
|
+
error: "\u30C8\u30FC\u30AF\u30F3\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
640
|
+
listEmpty: "\u30C8\u30FC\u30AF\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002\u300C\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u6700\u521D\u306E\u30C8\u30FC\u30AF\u30F3\u3092\u767A\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
641
|
+
columnPrefix: "\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9",
|
|
642
|
+
columnScope: "\u30B9\u30B3\u30FC\u30D7",
|
|
643
|
+
columnCreated: "\u4F5C\u6210\u65E5\u6642",
|
|
644
|
+
columnLastUsed: "\u6700\u7D42\u4F7F\u7528",
|
|
645
|
+
columnStatus: "\u30B9\u30C6\u30FC\u30BF\u30B9",
|
|
646
|
+
lastUsedNever: "\u672A\u4F7F\u7528",
|
|
647
|
+
statusActive: "\u6709\u52B9",
|
|
648
|
+
statusRevoked: "\u5931\u52B9",
|
|
649
|
+
statusExpired: "\u671F\u9650\u5207\u308C",
|
|
650
|
+
revoke: "\u5931\u52B9",
|
|
651
|
+
revokeConfirm: "\u3053\u306E\u30C8\u30FC\u30AF\u30F3\u3092\u5931\u52B9\u3055\u305B\u307E\u3059\u304B\uFF1F\u3053\u306E\u64CD\u4F5C\u306F\u5143\u306B\u623B\u305B\u307E\u305B\u3093\u3002"
|
|
652
|
+
},
|
|
535
653
|
public: {
|
|
536
654
|
back: "\u2190 \u623B\u308B",
|
|
537
655
|
home: "\u2190 \u30DB\u30FC\u30E0",
|
|
@@ -577,48 +695,8 @@ function translate(dict, key, vars) {
|
|
|
577
695
|
});
|
|
578
696
|
}
|
|
579
697
|
|
|
580
|
-
// src/lib/media.ts
|
|
581
|
-
var state = { outputs: null, cmsConfig: null };
|
|
582
|
-
function setAdminMediaContext(outputs, cmsConfig) {
|
|
583
|
-
state.outputs = outputs;
|
|
584
|
-
state.cmsConfig = cmsConfig;
|
|
585
|
-
}
|
|
586
|
-
function publicMediaUrl(input) {
|
|
587
|
-
if (/^https?:\/\//.test(input)) return input;
|
|
588
|
-
let path = input.replace(/^\/+/, "");
|
|
589
|
-
if (path.startsWith("public/")) path = path.slice("public/".length);
|
|
590
|
-
const { outputs, cmsConfig } = state;
|
|
591
|
-
const delivery = cmsConfig?.media?.delivery ?? "nextjs";
|
|
592
|
-
if (delivery !== "s3-direct") return `/api/media/${path}`;
|
|
593
|
-
const storage = outputs?.storage;
|
|
594
|
-
if (!storage) return `/api/media/${path}`;
|
|
595
|
-
return `https://${storage.bucket_name}.s3.${storage.aws_region}.amazonaws.com/public/${path}`;
|
|
596
|
-
}
|
|
597
|
-
function createMedia(outputs, cmsConfig) {
|
|
598
|
-
const storage = outputs.storage;
|
|
599
|
-
function s3DirectUrl(path) {
|
|
600
|
-
if (!storage) return `/api/media/${path}`;
|
|
601
|
-
return `https://${storage.bucket_name}.s3.${storage.aws_region}.amazonaws.com/public/${path}`;
|
|
602
|
-
}
|
|
603
|
-
function urlFor(input) {
|
|
604
|
-
if (/^https?:\/\//.test(input)) return input;
|
|
605
|
-
let path = input.replace(/^\/+/, "");
|
|
606
|
-
if (path.startsWith("public/")) path = path.slice("public/".length);
|
|
607
|
-
const delivery = cmsConfig.media?.delivery ?? "nextjs";
|
|
608
|
-
return delivery === "s3-direct" ? s3DirectUrl(path) : `/api/media/${path}`;
|
|
609
|
-
}
|
|
610
|
-
return { publicMediaUrl: urlFor };
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
// src/lib/admin-site-cookie.ts
|
|
614
|
-
var ADMIN_SITE_COOKIE = "admin-site-id";
|
|
615
|
-
|
|
616
698
|
export {
|
|
617
699
|
resolveLocale,
|
|
618
700
|
getDictionary,
|
|
619
|
-
translate
|
|
620
|
-
setAdminMediaContext,
|
|
621
|
-
publicMediaUrl,
|
|
622
|
-
createMedia,
|
|
623
|
-
ADMIN_SITE_COOKIE
|
|
701
|
+
translate
|
|
624
702
|
};
|