@ampless/admin 1.0.0-beta.92 → 1.0.0-beta.94
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/api/index.js +4 -2
- package/dist/{chunk-FVHQJCH4.js → chunk-26ZRUSES.js} +2 -2
- package/dist/{chunk-IBFNFTJ6.js → chunk-2GFTMGIZ.js} +1 -1
- package/dist/{chunk-M5QQJHM7.js → chunk-4UIDGQ2L.js} +8 -0
- package/dist/{chunk-TMOFUAU7.js → chunk-5KUAGEQW.js} +1 -1
- package/dist/{chunk-6275N7HG.js → chunk-5L2ICOCA.js} +1 -1
- package/dist/{chunk-2Y5SRSCZ.js → chunk-6EGOUZXY.js} +1 -1
- package/dist/{chunk-OPHSYQQV.js → chunk-ASEYWSR6.js} +2 -2
- package/dist/{chunk-OAG4NI7Q.js → chunk-BU7YQ5MS.js} +1 -1
- package/dist/{chunk-FVGWVH6Q.js → chunk-ISE2LXLA.js} +3 -3
- package/dist/{chunk-VJ5SDYVW.js → chunk-JTPEKM5J.js} +1 -1
- package/dist/{chunk-HRCUFIGW.js → chunk-LHHWZQDN.js} +2 -2
- package/dist/{chunk-HKMHNEFV.js → chunk-P7NMQTSQ.js} +1 -1
- package/dist/{chunk-QO73C7VC.js → chunk-PQU342OC.js} +1 -1
- package/dist/{chunk-TEMSFG34.js → chunk-QTU63B4K.js} +2 -2
- package/dist/{chunk-UUZAKCZZ.js → chunk-TDXYTNZB.js} +283 -213
- package/dist/{chunk-3AQGYUVP.js → chunk-UYT6WMWV.js} +1 -1
- package/dist/components/account-view.js +3 -3
- 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.js +3 -3
- package/dist/components/posts-list-view.js +3 -3
- package/dist/components/users-list-view.js +3 -3
- package/dist/{i18n-CecqYBeP.d.ts → i18n-BOuZ2Yhb.d.ts} +12 -0
- 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 +1 -1
- package/dist/pages/index.js +21 -21
- package/package.json +2 -2
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
|
@@ -58,7 +58,7 @@ async function signMediaUrl({
|
|
|
58
58
|
|
|
59
59
|
// src/api/preview-route.tsx
|
|
60
60
|
import { renderThemeCss } from "@ampless/runtime";
|
|
61
|
-
import { Fragment, jsxs } from "react/jsx-runtime";
|
|
61
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
62
62
|
var PREVIEW_BASE_CSS = `
|
|
63
63
|
/* ampless admin preview \u2014 typography approximation */
|
|
64
64
|
*,
|
|
@@ -250,8 +250,10 @@ function createPreviewRouteHandler(admin, options = {}) {
|
|
|
250
250
|
await ampless.renderBody(draft),
|
|
251
251
|
await ampless.publicPostScriptsForPage([draft])
|
|
252
252
|
] });
|
|
253
|
+
const headNode = await ampless.publicHeadForPreview();
|
|
253
254
|
const { renderToStaticMarkup } = await import("react-dom/server");
|
|
254
255
|
const fragment = renderToStaticMarkup(node);
|
|
256
|
+
const headMarkup = headNode ? renderToStaticMarkup(/* @__PURE__ */ jsx(Fragment, { children: headNode })) : "";
|
|
255
257
|
let themeCssBlock = "";
|
|
256
258
|
try {
|
|
257
259
|
const themeConfig = await admin.loadThemeConfig();
|
|
@@ -260,7 +262,7 @@ function createPreviewRouteHandler(admin, options = {}) {
|
|
|
260
262
|
} catch (err) {
|
|
261
263
|
console.warn("[ampless admin] preview theme CSS unavailable:", err);
|
|
262
264
|
}
|
|
263
|
-
const html = `<!doctype html><html><head><meta charset="utf-8">` + (themeCssBlock ? `<style>${themeCssBlock}</style>` : "") + `<style id="ampless-preview-base">${PREVIEW_BASE_CSS}</style
|
|
265
|
+
const html = `<!doctype html><html><head><meta charset="utf-8">` + (themeCssBlock ? `<style>${themeCssBlock}</style>` : "") + `<style id="ampless-preview-base">${PREVIEW_BASE_CSS}</style>` + headMarkup + `</head><body class="ampless-preview"><main class="${bodyClassName}">${fragment}</main></body></html>`;
|
|
264
266
|
return new Response(html, {
|
|
265
267
|
headers: {
|
|
266
268
|
"Content-Type": "text/html; charset=utf-8",
|
|
@@ -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: {
|
|
@@ -696,6 +700,10 @@ var ja_default = {
|
|
|
696
700
|
deleteColumn: "\u5217\u3092\u524A\u9664",
|
|
697
701
|
toggleHeaderRow: "\u30D8\u30C3\u30C0\u30FC\u884C\u3092\u5207\u66FF",
|
|
698
702
|
deleteTable: "\u30C6\u30FC\u30D6\u30EB\u3092\u524A\u9664"
|
|
703
|
+
},
|
|
704
|
+
codeBlock: {
|
|
705
|
+
languageLabel: "\u8A00\u8A9E",
|
|
706
|
+
languagePlaceholder: "\u4F8B: mermaid, ts"
|
|
699
707
|
}
|
|
700
708
|
},
|
|
701
709
|
auth: {
|
|
@@ -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
|
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";
|