@ampless/admin 1.0.0-alpha.85 → 1.0.0-beta.100
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 +2 -2
- package/README.md +2 -2
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +4 -2
- package/dist/{chunk-SQ6LFPXH.js → chunk-2TBGPB5H.js} +2 -2
- package/dist/{chunk-K44QF3MV.js → chunk-4OFRX6QX.js} +1 -1
- package/dist/{chunk-HANIMWMN.js → chunk-4WYMEUYU.js} +301 -222
- package/dist/chunk-7HSWOQWV.js +172 -0
- package/dist/{chunk-J6R356H3.js → chunk-7OZ23MLD.js} +1 -1
- package/dist/{chunk-OFPNBZKP.js → chunk-7W7LAQXY.js} +76 -8
- package/dist/{chunk-HN3UFHP7.js → chunk-ANME5KDN.js} +1 -1
- package/dist/{chunk-GGHN2RKQ.js → chunk-E5VF3Y65.js} +69 -3
- package/dist/{chunk-7LT6YPIT.js → chunk-JLCTF5HY.js} +8 -2
- package/dist/{chunk-R3TEJ32M.js → chunk-LXY3BRKQ.js} +2 -2
- package/dist/{chunk-MKWYNK4J.js → chunk-NHMG2MRJ.js} +2 -2
- package/dist/{chunk-AYESATAM.js → chunk-OPVLQOOB.js} +44 -13
- package/dist/{chunk-SMI7Y77B.js → chunk-ORXOMW7M.js} +265 -190
- package/dist/{chunk-W4VHP2JW.js → chunk-SYAEM5DM.js} +1 -1
- package/dist/{chunk-7NQERXNY.js → chunk-TJZ4FTU6.js} +1 -1
- package/dist/{chunk-CFIOUXVE.js → chunk-V5XORHKX.js} +1 -1
- package/dist/chunk-ZDIDJCSU.js +40 -0
- package/dist/components/account-view.d.ts +8 -0
- package/dist/components/account-view.js +10 -0
- package/dist/components/admin-dashboard.js +3 -3
- package/dist/components/edit-post-view.js +5 -5
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.js +7 -7
- package/dist/components/login-view.d.ts +3 -1
- package/dist/components/login-view.js +4 -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 +2 -10
- package/dist/components/plugin-settings-form.js +5 -7
- package/dist/components/posts-list-view.js +3 -3
- package/dist/components/users-list-view.js +3 -3
- package/dist/{i18n-DA-aakRX.d.ts → i18n-Bd8q9aTl.d.ts} +108 -5
- 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 +21 -4
- package/dist/pages/index.js +54 -24
- package/package.json +5 -6
package/README.ja.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
[ampless](https://github.com/heavymoons/ampless) 向け管理 UI ライブラリ。投稿エディター(Tiptap + Markdown + HTML)、メディアマネージャー(S3 + 画像処理)、サイト / テーマ設定、ロケール対応 UI 文字列、そしてすべてを結びつける Next.js ページファクトリーを提供します。
|
|
7
7
|
|
|
8
|
-
> **プレリリース /
|
|
8
|
+
> **プレリリース / ベータ版。** v1.0 まではマイナーバージョンでも破壊的変更が入る可能性があります。
|
|
9
9
|
|
|
10
10
|
## なぜライブラリなのか?
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
## インストール
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install @ampless/admin@
|
|
17
|
+
npm install @ampless/admin@beta @ampless/runtime@beta ampless@beta
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
ピア依存: `next`、`react`、`react-dom`、`aws-amplify`、`@aws-amplify/adapter-nextjs`。
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ editor (Tiptap + Markdown + HTML), media manager (S3 + image processing),
|
|
|
8
8
|
site/theme settings, locale-aware UI strings, and the Next.js page
|
|
9
9
|
factories that wire it all together.
|
|
10
10
|
|
|
11
|
-
> **Pre-release /
|
|
11
|
+
> **Pre-release / beta.** Breaking changes possible in any minor version until v1.0.
|
|
12
12
|
|
|
13
13
|
## Why a library?
|
|
14
14
|
|
|
@@ -20,7 +20,7 @@ template and downstream sites.
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
npm install @ampless/admin@
|
|
23
|
+
npm install @ampless/admin@beta @ampless/runtime@beta ampless@beta
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Peer-installs: `next`, `react`, `react-dom`, `aws-amplify`,
|
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",
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
ImageUploadDialog,
|
|
4
4
|
createMediaRow,
|
|
5
5
|
getMediaProcessingDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ANME5KDN.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-4OFRX6QX.js";
|
|
13
13
|
|
|
14
14
|
// src/components/media-uploader.tsx
|
|
15
15
|
import { useState, useEffect, useCallback, useRef } from "react";
|