@ampless/admin 1.0.0-alpha.41 → 1.0.0-alpha.43
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-YNQR3AFO.js → chunk-3EOEDH5Q.js} +2 -2
- package/dist/{chunk-BF6XV6TP.js → chunk-462KM4PP.js} +1 -1
- package/dist/{chunk-MDBBDBE5.js → chunk-4J2WT5DT.js} +2 -2
- package/dist/{chunk-3QXCPMPD.js → chunk-4VX6Z3OI.js} +1 -1
- package/dist/{chunk-GJSMMQVO.js → chunk-AZR2PYIA.js} +2 -2
- package/dist/{chunk-TGEPARLA.js → chunk-EX3XWPBC.js} +1 -1
- package/dist/{chunk-MHTKDXSP.js → chunk-HLORQWBX.js} +4 -2
- package/dist/{chunk-Q3FMKPAQ.js → chunk-IYUEDZTX.js} +2 -2
- package/dist/{chunk-OMWVBK2C.js → chunk-QUFDISLW.js} +1 -1
- package/dist/chunk-T6IB6W3N.js +380 -0
- package/dist/{chunk-5DWBQ73J.js → chunk-U2VSCLWY.js} +26 -0
- package/dist/{chunk-ZR35TWHV.js → chunk-VJ3FOXAK.js} +1 -1
- package/dist/{chunk-VZJU74K3.js → chunk-X47FJZR2.js} +1 -1
- package/dist/{chunk-UTQRFC6V.js → chunk-X4SCR6A4.js} +2 -2
- package/dist/{chunk-DNMENH6C.js → chunk-YI727DVE.js} +1 -1
- 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.js +3 -3
- 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.d.ts +17 -0
- package/dist/components/plugin-settings-form.js +10 -0
- package/dist/components/posts-list-view.js +3 -3
- package/dist/components/users-list-view.js +3 -3
- package/dist/{i18n-sYi0kbnC.d.ts → i18n-C2ev0Y0f.d.ts} +40 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.js +9 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/index.d.ts +17 -2
- package/dist/pages/index.js +70 -14
- package/package.json +4 -4
package/dist/components/index.js
CHANGED
|
@@ -4,23 +4,23 @@ import {
|
|
|
4
4
|
Sidebar,
|
|
5
5
|
SiteSettingsForm,
|
|
6
6
|
ThemeSettingsForm
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-HLORQWBX.js";
|
|
8
8
|
import {
|
|
9
9
|
invalidateSiteSettingsCache
|
|
10
10
|
} from "../chunk-D72XF3Q3.js";
|
|
11
11
|
import {
|
|
12
12
|
MediaPicker,
|
|
13
13
|
PostForm
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-X4SCR6A4.js";
|
|
15
15
|
import "../chunk-C7G5AQ3L.js";
|
|
16
16
|
import {
|
|
17
17
|
MediaUploader
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-3EOEDH5Q.js";
|
|
19
19
|
import {
|
|
20
20
|
ImageUploadDialog,
|
|
21
21
|
sanitizeName,
|
|
22
22
|
uploadProcessedImage
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-QUFDISLW.js";
|
|
24
24
|
import {
|
|
25
25
|
publicMediaUrl,
|
|
26
26
|
setAdminMediaContext
|
|
@@ -29,8 +29,8 @@ import {
|
|
|
29
29
|
I18nProvider,
|
|
30
30
|
useLocale,
|
|
31
31
|
useT
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import "../chunk-
|
|
32
|
+
} from "../chunk-EX3XWPBC.js";
|
|
33
|
+
import "../chunk-U2VSCLWY.js";
|
|
34
34
|
export {
|
|
35
35
|
AdminProviders,
|
|
36
36
|
I18nProvider,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
LoginPage
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-VJ3FOXAK.js";
|
|
5
|
+
import "../chunk-EX3XWPBC.js";
|
|
6
|
+
import "../chunk-U2VSCLWY.js";
|
|
7
7
|
export {
|
|
8
8
|
LoginPage
|
|
9
9
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
McpTokensView
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-X47FJZR2.js";
|
|
5
5
|
import "../chunk-C7G5AQ3L.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-EX3XWPBC.js";
|
|
7
|
+
import "../chunk-U2VSCLWY.js";
|
|
8
8
|
export {
|
|
9
9
|
McpTokensView
|
|
10
10
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
MediaPage
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-IYUEDZTX.js";
|
|
5
|
+
import "../chunk-3EOEDH5Q.js";
|
|
6
|
+
import "../chunk-QUFDISLW.js";
|
|
7
7
|
import "../chunk-2ITWLRYF.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-EX3XWPBC.js";
|
|
9
|
+
import "../chunk-U2VSCLWY.js";
|
|
10
10
|
export {
|
|
11
11
|
MediaPage
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
NewPostPage
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-4J2WT5DT.js";
|
|
5
|
+
import "../chunk-X4SCR6A4.js";
|
|
6
|
+
import "../chunk-QUFDISLW.js";
|
|
7
7
|
import "../chunk-2ITWLRYF.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-EX3XWPBC.js";
|
|
9
|
+
import "../chunk-U2VSCLWY.js";
|
|
10
10
|
export {
|
|
11
11
|
NewPostPage
|
|
12
12
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { LocalizedString, PluginSettingField } from 'ampless';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
instanceId: string;
|
|
6
|
+
displayName?: LocalizedString;
|
|
7
|
+
fields: ReadonlyArray<PluginSettingField>;
|
|
8
|
+
/**
|
|
9
|
+
* Existing stored values for this instance keyed by field `key`.
|
|
10
|
+
* Empty object means "no overrides yet"; the placeholders + defaults
|
|
11
|
+
* still come through the manifest.
|
|
12
|
+
*/
|
|
13
|
+
initialValues: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
declare function PluginSettingsForm({ instanceId, displayName, fields, initialValues, }: Props): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { PluginSettingsForm };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
PostsList
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-462KM4PP.js";
|
|
5
|
+
import "../chunk-EX3XWPBC.js";
|
|
6
|
+
import "../chunk-U2VSCLWY.js";
|
|
7
7
|
export {
|
|
8
8
|
PostsList
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
UsersListView
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-YI727DVE.js";
|
|
5
|
+
import "../chunk-EX3XWPBC.js";
|
|
6
|
+
import "../chunk-U2VSCLWY.js";
|
|
7
7
|
export {
|
|
8
8
|
UsersListView
|
|
9
9
|
};
|
|
@@ -32,6 +32,7 @@ var sidebar = {
|
|
|
32
32
|
posts: "Posts",
|
|
33
33
|
media: "Media",
|
|
34
34
|
sites: "Sites",
|
|
35
|
+
plugins: "Plugins",
|
|
35
36
|
users: "Users",
|
|
36
37
|
mcpTokens: "MCP tokens",
|
|
37
38
|
viewSite: "View site",
|
|
@@ -279,6 +280,18 @@ var auth = {
|
|
|
279
280
|
userExists: "An account with this email already exists."
|
|
280
281
|
}
|
|
281
282
|
};
|
|
283
|
+
var plugins = {
|
|
284
|
+
title: "Plugin Settings",
|
|
285
|
+
description: "Edit admin-managed values for installed plugins. Changes propagate to the public site within ~10 seconds (S3 cache rebuild).",
|
|
286
|
+
noConfigurablePlugins: "No installed plugins expose configurable settings.",
|
|
287
|
+
save: "Save",
|
|
288
|
+
saving: "Saving…",
|
|
289
|
+
saved: "Saved. Public site refreshes within ~10 seconds.",
|
|
290
|
+
saveError: "Save failed",
|
|
291
|
+
invalidValue: "One or more values are invalid — fix highlighted fields and try again.",
|
|
292
|
+
resetToDefault: "Reset to default",
|
|
293
|
+
resetDone: "Stored value cleared. Falling back to the manifest default."
|
|
294
|
+
};
|
|
282
295
|
var mcpTokens = {
|
|
283
296
|
title: "MCP tokens",
|
|
284
297
|
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.",
|
|
@@ -329,6 +342,7 @@ var en = {
|
|
|
329
342
|
theme: theme,
|
|
330
343
|
editor: editor,
|
|
331
344
|
auth: auth,
|
|
345
|
+
plugins: plugins,
|
|
332
346
|
mcpTokens: mcpTokens,
|
|
333
347
|
"public": {
|
|
334
348
|
back: "← Back",
|
|
@@ -374,6 +388,7 @@ declare const dictionaries: {
|
|
|
374
388
|
posts: string;
|
|
375
389
|
media: string;
|
|
376
390
|
sites: string;
|
|
391
|
+
plugins: string;
|
|
377
392
|
users: string;
|
|
378
393
|
mcpTokens: string;
|
|
379
394
|
viewSite: string;
|
|
@@ -621,6 +636,18 @@ declare const dictionaries: {
|
|
|
621
636
|
userExists: string;
|
|
622
637
|
};
|
|
623
638
|
};
|
|
639
|
+
plugins: {
|
|
640
|
+
title: string;
|
|
641
|
+
description: string;
|
|
642
|
+
noConfigurablePlugins: string;
|
|
643
|
+
save: string;
|
|
644
|
+
saving: string;
|
|
645
|
+
saved: string;
|
|
646
|
+
saveError: string;
|
|
647
|
+
invalidValue: string;
|
|
648
|
+
resetToDefault: string;
|
|
649
|
+
resetDone: string;
|
|
650
|
+
};
|
|
624
651
|
mcpTokens: {
|
|
625
652
|
title: string;
|
|
626
653
|
description: string;
|
|
@@ -701,6 +728,7 @@ declare const dictionaries: {
|
|
|
701
728
|
posts: string;
|
|
702
729
|
media: string;
|
|
703
730
|
sites: string;
|
|
731
|
+
plugins: string;
|
|
704
732
|
users: string;
|
|
705
733
|
mcpTokens: string;
|
|
706
734
|
viewSite: string;
|
|
@@ -948,6 +976,18 @@ declare const dictionaries: {
|
|
|
948
976
|
userExists: string;
|
|
949
977
|
};
|
|
950
978
|
};
|
|
979
|
+
plugins: {
|
|
980
|
+
title: string;
|
|
981
|
+
description: string;
|
|
982
|
+
noConfigurablePlugins: string;
|
|
983
|
+
save: string;
|
|
984
|
+
saving: string;
|
|
985
|
+
saved: string;
|
|
986
|
+
saveError: string;
|
|
987
|
+
invalidValue: string;
|
|
988
|
+
resetToDefault: string;
|
|
989
|
+
resetDone: string;
|
|
990
|
+
};
|
|
951
991
|
mcpTokens: {
|
|
952
992
|
title: string;
|
|
953
993
|
description: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Config } from 'ampless';
|
|
2
2
|
import { AmplessOutputs, EffectiveSiteSettings, EffectiveThemeConfig, ResolvedMedia, Ampless } from '@ampless/runtime';
|
|
3
|
-
import { L as Locale, D as Dictionary } from './i18n-
|
|
4
|
-
export { A as AdminLocaleStrings, g as getDictionary, r as resolveLocale, t as translate } from './i18n-
|
|
3
|
+
import { L as Locale, D as Dictionary } from './i18n-C2ev0Y0f.js';
|
|
4
|
+
export { A as AdminLocaleStrings, g as getDictionary, r as resolveLocale, t as translate } from './i18n-C2ev0Y0f.js';
|
|
5
5
|
import * as _aws_amplify_adapter_nextjs from '@aws-amplify/adapter-nextjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -62,6 +62,17 @@ interface Admin {
|
|
|
62
62
|
* S3 rebuild.
|
|
63
63
|
*/
|
|
64
64
|
readStoredActiveThemeFresh(): Promise<string | null>;
|
|
65
|
+
/**
|
|
66
|
+
* Phase 2 admin-managed plugin settings reader. Returns the
|
|
67
|
+
* currently-stored field map for one plugin instance (keyed by
|
|
68
|
+
* field `key`, not the full SK). The `/admin/plugins` page
|
|
69
|
+
* factory uses this to pre-fill its form. Resolves through the
|
|
70
|
+
* `ampless` opt so it works in server components — reads the same
|
|
71
|
+
* public S3 cache (`public/site-settings.json`) the public runtime
|
|
72
|
+
* uses, rather than going through the admin's client-only KvStore
|
|
73
|
+
* provider.
|
|
74
|
+
*/
|
|
75
|
+
loadPluginPublicSettings(instanceId: string): Promise<Record<string, unknown>>;
|
|
65
76
|
publicMediaUrl(input: string): string;
|
|
66
77
|
/**
|
|
67
78
|
* Look up the Media DynamoDB row for the given S3 key. Used by the
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getDictionary,
|
|
6
6
|
resolveLocale,
|
|
7
7
|
translate
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-U2VSCLWY.js";
|
|
9
9
|
|
|
10
10
|
// src/lib/amplify-server.ts
|
|
11
11
|
import { createServerRunner } from "@aws-amplify/adapter-nextjs";
|
|
@@ -81,6 +81,14 @@ function createAdmin(opts) {
|
|
|
81
81
|
loadSiteSettings: async () => (await resolveAmpless()).loadSiteSettings(),
|
|
82
82
|
loadThemeConfig: async () => (await resolveAmpless()).loadThemeConfig(),
|
|
83
83
|
readStoredActiveThemeFresh: async () => (await resolveAmpless()).readStoredActiveThemeFresh(),
|
|
84
|
+
// Server-safe path: load through ampless.pluginSettings (S3 cache
|
|
85
|
+
// via guest-readable site-settings.json), not through the
|
|
86
|
+
// client-only KvStore provider. Server Components call this from
|
|
87
|
+
// `createPluginsPage` to pre-fill the form.
|
|
88
|
+
loadPluginPublicSettings: async (instanceId) => {
|
|
89
|
+
const snapshot = await (await resolveAmpless()).pluginSettings.loadAll();
|
|
90
|
+
return snapshot.get(instanceId) ?? {};
|
|
91
|
+
},
|
|
84
92
|
publicMediaUrl: media.publicMediaUrl,
|
|
85
93
|
getMediaBySrc: async (src) => (await resolveAmpless()).getMediaBySrc(src),
|
|
86
94
|
outputs,
|