@aotter/mantle-admin-ui 0.1.0-alpha.8 → 0.1.2-alpha.1
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.md +65 -3
- package/dist/assets/developer-workspace-Bq6mqyTQ.js +9 -0
- package/dist/assets/developer-workspace-DLioOiRN.css +1 -0
- package/dist/assets/html-editor-Cx82YO89.js +129 -0
- package/dist/assets/index-BDekiLgG.js +71 -0
- package/dist/assets/index-GjroVjQW.css +2 -0
- package/dist/assets/markdown-editor-DRkrrStR.js +29 -0
- package/dist/assets/with-selector-Dv-JskCB.js +1 -0
- package/dist/components/one-time-code-input.d.ts +4 -0
- package/dist/components/one-time-code-input.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +13 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sidebar.d.ts +77 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/favicon.svg +18 -2
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/index.html +4 -77
- package/dist/kit.css +3 -0
- package/dist/kit.d.ts +28 -0
- package/dist/kit.d.ts.map +1 -0
- package/dist/kit.js +1535 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/preview.html +18 -0
- package/dist/r/auth-page.json +18 -0
- package/dist/r/registry.json +21 -0
- package/dist/server.js +1 -1
- package/dist/theme.js +64 -0
- package/dist/tokens.css +88 -0
- package/package.json +27 -10
- package/dist/assets/index-BZ7kdRYa.css +0 -2
- package/dist/assets/index-DiyKzLro.js +0 -54
package/README.md
CHANGED
|
@@ -2,9 +2,71 @@
|
|
|
2
2
|
|
|
3
3
|
Admin SPA shell for mantle.
|
|
4
4
|
|
|
5
|
-
This package builds a React/Tailwind static bundle
|
|
6
|
-
to `public/_mantle/admin
|
|
7
|
-
|
|
5
|
+
This package builds a React/Tailwind static bundle. When it is installed,
|
|
6
|
+
`mantle generate` copies that bundle to `public/_mantle/admin/` (excluding
|
|
7
|
+
`server.*` exports). Core-only projects that omit this package skip the copy.
|
|
8
|
+
It currently provides the system admin shell, preference UI, site overview
|
|
9
|
+
surfaces, and Mantle-branded system pages.
|
|
10
|
+
|
|
11
|
+
## Mantle UI kit
|
|
12
|
+
|
|
13
|
+
Applications that need the same React/shadcn visual language without embedding
|
|
14
|
+
the Admin product can import the domain-neutral primitives and compiled theme:
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { Button, Card, CardContent, Input } from "@aotter/mantle-admin-ui/kit";
|
|
18
|
+
import "@aotter/mantle-admin-ui/kit.css";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Use `@aotter/mantle-admin-ui/tokens.css` when an application only needs the
|
|
22
|
+
Mantle color, radius, background, and sidebar variables. The kit intentionally
|
|
23
|
+
does not export `AdminApp`, authenticated layouts, routes, queries, or feature
|
|
24
|
+
views; use the static Admin SPA or sandbox preview for the complete product.
|
|
25
|
+
|
|
26
|
+
`dist/r/auth-page.json` is a shadcn registry item for a working email OTP page.
|
|
27
|
+
It is copied into the consuming application, so its agent or author can change
|
|
28
|
+
the markup and flow without forking this package. The recipe accepts optional
|
|
29
|
+
Privacy Policy and Terms of Use links; their discovery and enforcement remain
|
|
30
|
+
the application's responsibility.
|
|
8
31
|
|
|
9
32
|
This package is prerelease software. Its `package.json` is the exact version
|
|
10
33
|
authority; the API surface may change until `v0.1.0`.
|
|
34
|
+
|
|
35
|
+
## Same-origin sandbox preview
|
|
36
|
+
|
|
37
|
+
Use the separate `dist/preview.html` document for a Builder preview. Copy its
|
|
38
|
+
assets unchanged; replace the `/_mantle/admin/` asset prefix if mounting the copy
|
|
39
|
+
elsewhere. Serve the preview document at your own preview route. Do not patch the
|
|
40
|
+
JavaScript bundle or change the canonical Admin document.
|
|
41
|
+
|
|
42
|
+
Before its module script boots, install your sandbox transport as `window.fetch`
|
|
43
|
+
and set `window.__MANTLE_ADMIN_PREVIEW__ = { fetch: window.fetch }`. The transport
|
|
44
|
+
must intercept `/admin/api/*` requests and reject failures; never fall back
|
|
45
|
+
to live Admin API requests. Preview permits only this same-origin fetch surface,
|
|
46
|
+
with native connections and form submissions disabled by document CSP. Use an
|
|
47
|
+
in-memory implementation or delegate with `postMessage` to the parent; a bridge
|
|
48
|
+
that performs native fetch inside the iframe is blocked. The preview refuses to render without this explicit
|
|
49
|
+
bridge, outside an iframe, in nested frames, or with a foreign-origin parent.
|
|
50
|
+
Only a same-origin top-level parent is supported. The ordinary `index.html`
|
|
51
|
+
continues to refuse all iframe rendering.
|
|
52
|
+
|
|
53
|
+
Sign-in, OAuth consent, connected apps and sign-out are unavailable in preview.
|
|
54
|
+
An unauthorized bridge response stays an error instead of navigating to live
|
|
55
|
+
sign-in. Internal edits/search/pagination use the Admin router; CSV downloads use
|
|
56
|
+
the bridge and a local blob. Canonical Admin retains its normal account flows
|
|
57
|
+
and browser-streamed downloads, without buffering large exports in the SPA.
|
|
58
|
+
|
|
59
|
+
This is a consumer-owned sandbox contract, not a way to embed authenticated
|
|
60
|
+
production Admin. Do not mount it in an untrusted same-origin application.
|
|
61
|
+
|
|
62
|
+
## Staff operations
|
|
63
|
+
|
|
64
|
+
The Operations navigation item (`/admin/operations`) lists authorized staff
|
|
65
|
+
Procedures without a row binding or `uiSchema.collectionAction`. It works on a
|
|
66
|
+
site with no collections. Bound operations stay in their collection and row
|
|
67
|
+
menus. All use the existing Admin operations API and schema form.
|
|
68
|
+
|
|
69
|
+
Successful output stays in the dialog until closed. Failed input, diagnostics,
|
|
70
|
+
and generated idempotency keys remain available for retry. Close and reopen a
|
|
71
|
+
successful operation to start a new invocation. API authorization and Procedure
|
|
72
|
+
validation remain authoritative.
|