@ampless/admin 1.0.0-beta.91 → 1.0.0-beta.93
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/api/index.d.ts +1 -1
- package/dist/{chunk-4YVI7TI4.js → chunk-26ZRUSES.js} +2 -2
- package/dist/{chunk-ZHOVAVUK.js → chunk-2GFTMGIZ.js} +1 -1
- package/dist/{chunk-TSPYGLX3.js → chunk-4UIDGQ2L.js} +12 -2
- package/dist/{chunk-6PAJSUMF.js → chunk-5KUAGEQW.js} +1 -1
- package/dist/{chunk-R5CWAZEY.js → chunk-5L2ICOCA.js} +1 -1
- package/dist/{chunk-7VF6F2P5.js → chunk-6EGOUZXY.js} +4 -4
- package/dist/{chunk-2ND3UUVK.js → chunk-ASEYWSR6.js} +2 -2
- package/dist/{chunk-2SYDNTEW.js → chunk-BU7YQ5MS.js} +1 -1
- package/dist/{chunk-B7DJVPO3.js → chunk-ISE2LXLA.js} +3 -3
- package/dist/{chunk-CU3CL5DB.js → chunk-JTPEKM5J.js} +11 -6
- package/dist/{chunk-ZDKVGJ4F.js → chunk-LHHWZQDN.js} +2 -2
- package/dist/{chunk-T3UDPN3W.js → chunk-P7NMQTSQ.js} +1 -1
- package/dist/{chunk-YGGBEDUG.js → chunk-PQU342OC.js} +1 -1
- package/dist/{chunk-CH2BLQD7.js → chunk-QTU63B4K.js} +2 -2
- package/dist/{chunk-QOUZDIVS.js → chunk-TDXYTNZB.js} +283 -213
- package/dist/{chunk-MOXQLS3E.js → chunk-UYT6WMWV.js} +1 -1
- package/dist/{chunk-36MRQN3G.js → chunk-ZDIDJCSU.js} +6 -1
- package/dist/components/account-view.d.ts +2 -1
- package/dist/components/account-view.js +4 -4
- package/dist/components/admin-dashboard.js +3 -3
- package/dist/components/edit-post-view.js +5 -5
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +6 -6
- package/dist/components/login-view.d.ts +3 -1
- package/dist/components/login-view.js +4 -4
- package/dist/components/mcp-tokens-view.js +3 -3
- package/dist/components/media-view.js +5 -5
- package/dist/components/new-post-view.js +5 -5
- package/dist/components/plugin-settings-form.js +3 -3
- package/dist/components/posts-list-view.js +3 -3
- package/dist/components/users-list-view.js +3 -3
- package/dist/{i18n-DiA-HQ9_.d.ts → i18n-BOuZ2Yhb.d.ts} +16 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/index.d.ts +11 -5
- package/dist/pages/index.js +27 -20
- package/package.json +3 -3
package/dist/api/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
MediaUploader
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QTU63B4K.js";
|
|
5
5
|
import {
|
|
6
6
|
useT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2GFTMGIZ.js";
|
|
8
8
|
|
|
9
9
|
// src/components/media-view.tsx
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -278,6 +278,10 @@ var en_default = {
|
|
|
278
278
|
deleteColumn: "Delete column",
|
|
279
279
|
toggleHeaderRow: "Toggle header row",
|
|
280
280
|
deleteTable: "Delete table"
|
|
281
|
+
},
|
|
282
|
+
codeBlock: {
|
|
283
|
+
languageLabel: "Language",
|
|
284
|
+
languagePlaceholder: "e.g. mermaid, ts"
|
|
281
285
|
}
|
|
282
286
|
},
|
|
283
287
|
auth: {
|
|
@@ -410,7 +414,8 @@ var en_default = {
|
|
|
410
414
|
delete: "Delete",
|
|
411
415
|
deleteConfirm: "Delete this passkey? You will no longer be able to sign in with it.",
|
|
412
416
|
loadError: "Failed to load passkeys",
|
|
413
|
-
unsupported: "This browser does not support passkeys."
|
|
417
|
+
unsupported: "This browser does not support passkeys.",
|
|
418
|
+
disabled: "Passkeys are disabled for this site."
|
|
414
419
|
}
|
|
415
420
|
}
|
|
416
421
|
};
|
|
@@ -695,6 +700,10 @@ var ja_default = {
|
|
|
695
700
|
deleteColumn: "\u5217\u3092\u524A\u9664",
|
|
696
701
|
toggleHeaderRow: "\u30D8\u30C3\u30C0\u30FC\u884C\u3092\u5207\u66FF",
|
|
697
702
|
deleteTable: "\u30C6\u30FC\u30D6\u30EB\u3092\u524A\u9664"
|
|
703
|
+
},
|
|
704
|
+
codeBlock: {
|
|
705
|
+
languageLabel: "\u8A00\u8A9E",
|
|
706
|
+
languagePlaceholder: "\u4F8B: mermaid, ts"
|
|
698
707
|
}
|
|
699
708
|
},
|
|
700
709
|
auth: {
|
|
@@ -827,7 +836,8 @@ var ja_default = {
|
|
|
827
836
|
delete: "\u524A\u9664",
|
|
828
837
|
deleteConfirm: "\u3053\u306E\u30D1\u30B9\u30AD\u30FC\u3092\u524A\u9664\u3057\u307E\u3059\u304B? \u3053\u306E\u30D1\u30B9\u30AD\u30FC\u3067\u306F\u30B5\u30A4\u30F3\u30A4\u30F3\u3067\u304D\u306A\u304F\u306A\u308A\u307E\u3059\u3002",
|
|
829
838
|
loadError: "\u30D1\u30B9\u30AD\u30FC\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
830
|
-
unsupported: "\u3053\u306E\u30D6\u30E9\u30A6\u30B6\u306F\u30D1\u30B9\u30AD\u30FC\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002"
|
|
839
|
+
unsupported: "\u3053\u306E\u30D6\u30E9\u30A6\u30B6\u306F\u30D1\u30B9\u30AD\u30FC\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
|
|
840
|
+
disabled: "\u3053\u306E\u30B5\u30A4\u30C8\u3067\u306F\u30D1\u30B9\u30AD\u30FC\u306F\u7121\u52B9\u3067\u3059\u3002"
|
|
831
841
|
}
|
|
832
842
|
}
|
|
833
843
|
};
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
classifyPasskeyError,
|
|
4
4
|
isWebAuthnSupported,
|
|
5
5
|
signInWithPasskey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZDIDJCSU.js";
|
|
7
7
|
import {
|
|
8
8
|
useT
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2GFTMGIZ.js";
|
|
10
10
|
|
|
11
11
|
// src/components/login-view.tsx
|
|
12
12
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "@ampless/runtime/ui";
|
|
32
32
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
33
33
|
var LAST_EMAIL_KEY = "ampless.lastSignInEmail";
|
|
34
|
-
function LoginPage() {
|
|
34
|
+
function LoginPage({ passkeysEnabled = true }) {
|
|
35
35
|
const router = useRouter();
|
|
36
36
|
const t = useT();
|
|
37
37
|
const [mode, setMode] = useState("signIn");
|
|
@@ -201,7 +201,7 @@ function LoginPage() {
|
|
|
201
201
|
info && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: info }),
|
|
202
202
|
error && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: error }),
|
|
203
203
|
/* @__PURE__ */ jsx(Button, { type: "submit", className: "w-full", disabled: loading, children: loading ? t("auth.common.working") : t(`auth.${mode}.submit`) }),
|
|
204
|
-
mode === "signIn" && passkeySupported && /* @__PURE__ */ jsxs(
|
|
204
|
+
mode === "signIn" && passkeysEnabled && passkeySupported && /* @__PURE__ */ jsxs(
|
|
205
205
|
Button,
|
|
206
206
|
{
|
|
207
207
|
type: "button",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
PostForm
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TDXYTNZB.js";
|
|
5
5
|
import {
|
|
6
6
|
useT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2GFTMGIZ.js";
|
|
8
8
|
|
|
9
9
|
// src/components/new-post-view.tsx
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
} from "./chunk-D72XF3Q3.js";
|
|
8
8
|
import {
|
|
9
9
|
clearAllDrafts
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TDXYTNZB.js";
|
|
11
11
|
import {
|
|
12
12
|
setAdminCmsConfigClient
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5L2ICOCA.js";
|
|
14
14
|
import {
|
|
15
15
|
setAdminMediaContext
|
|
16
16
|
} from "./chunk-2ITWLRYF.js";
|
|
17
17
|
import {
|
|
18
18
|
useLocale,
|
|
19
19
|
useT
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2GFTMGIZ.js";
|
|
21
21
|
|
|
22
22
|
// src/lib/amplify-client.ts
|
|
23
23
|
import { Amplify } from "aws-amplify";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
isWebAuthnSupported
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZDIDJCSU.js";
|
|
5
5
|
import {
|
|
6
6
|
useT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2GFTMGIZ.js";
|
|
8
8
|
|
|
9
9
|
// src/components/account-view.tsx
|
|
10
10
|
import { useEffect, useState } from "react";
|
|
@@ -67,7 +67,7 @@ function formatDate(iso) {
|
|
|
67
67
|
if (Number.isNaN(d.getTime())) return "";
|
|
68
68
|
return d.toLocaleString();
|
|
69
69
|
}
|
|
70
|
-
function AccountView({ currentUserEmail }) {
|
|
70
|
+
function AccountView({ currentUserEmail, passkeysEnabled }) {
|
|
71
71
|
const t = useT();
|
|
72
72
|
const [supported, setSupported] = useState(false);
|
|
73
73
|
const [supportResolved, setSupportResolved] = useState(false);
|
|
@@ -90,12 +90,17 @@ function AccountView({ currentUserEmail }) {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
useEffect(() => {
|
|
93
|
+
if (!passkeysEnabled) {
|
|
94
|
+
setSupportResolved(true);
|
|
95
|
+
setLoading(false);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
93
98
|
const ok = isWebAuthnSupported();
|
|
94
99
|
setSupported(ok);
|
|
95
100
|
setSupportResolved(true);
|
|
96
101
|
if (ok) void loadPasskeys();
|
|
97
102
|
else setLoading(false);
|
|
98
|
-
}, []);
|
|
103
|
+
}, [passkeysEnabled]);
|
|
99
104
|
async function handleAdd() {
|
|
100
105
|
setAdding(true);
|
|
101
106
|
setAddError(null);
|
|
@@ -127,10 +132,10 @@ function AccountView({ currentUserEmail }) {
|
|
|
127
132
|
/* @__PURE__ */ jsxs("section", { className: "space-y-4 rounded-md border bg-card p-4 md:p-6", children: [
|
|
128
133
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
129
134
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold", children: t("account.passkeys.title") }) }),
|
|
130
|
-
supportResolved && supported && /* @__PURE__ */ jsx(Button, { type: "button", disabled: adding, onClick: () => void handleAdd(), children: adding ? t("account.passkeys.adding") : t("account.passkeys.add") })
|
|
135
|
+
passkeysEnabled && supportResolved && supported && /* @__PURE__ */ jsx(Button, { type: "button", disabled: adding, onClick: () => void handleAdd(), children: adding ? t("account.passkeys.adding") : t("account.passkeys.add") })
|
|
131
136
|
] }),
|
|
132
137
|
addError && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: addError }),
|
|
133
|
-
supportResolved && !supported ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("account.passkeys.unsupported") }) : loading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("account.passkeys.loading") }) : loadError ? /* @__PURE__ */ jsxs("p", { className: "text-sm text-destructive", children: [
|
|
138
|
+
!passkeysEnabled ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("account.passkeys.disabled") }) : supportResolved && !supported ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("account.passkeys.unsupported") }) : loading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("account.passkeys.loading") }) : loadError ? /* @__PURE__ */ jsxs("p", { className: "text-sm text-destructive", children: [
|
|
134
139
|
t("account.passkeys.loadError"),
|
|
135
140
|
": ",
|
|
136
141
|
loadError
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
PostForm
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TDXYTNZB.js";
|
|
5
5
|
import {
|
|
6
6
|
useT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2GFTMGIZ.js";
|
|
8
8
|
|
|
9
9
|
// src/components/edit-post-view.tsx
|
|
10
10
|
import { useEffect, useState, use } from "react";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
ImageUploadDialog,
|
|
4
4
|
createMediaRow,
|
|
5
5
|
getMediaProcessingDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5L2ICOCA.js";
|
|
7
7
|
import {
|
|
8
8
|
publicMediaUrl
|
|
9
9
|
} from "./chunk-2ITWLRYF.js";
|
|
10
10
|
import {
|
|
11
11
|
useT
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2GFTMGIZ.js";
|
|
13
13
|
|
|
14
14
|
// src/components/media-uploader.tsx
|
|
15
15
|
import { useState, useEffect, useCallback, useRef } from "react";
|