@aotter/mantle-admin-ui 0.1.0-alpha.9 → 0.1.2-alpha.2

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.
Files changed (83) hide show
  1. package/README.md +65 -3
  2. package/dist/assets/developer-workspace-97rQcp2Z.js +9 -0
  3. package/dist/assets/developer-workspace-DLioOiRN.css +1 -0
  4. package/dist/assets/html-editor-CU3Appqm.js +129 -0
  5. package/dist/assets/index-B8RINKhG.js +71 -0
  6. package/dist/assets/index-opuoP5cI.css +2 -0
  7. package/dist/assets/markdown-editor-HuiPry9W.js +29 -0
  8. package/dist/assets/with-selector-q9dA_Nh5.js +1 -0
  9. package/dist/components/auth-card.d.ts +15 -0
  10. package/dist/components/auth-card.d.ts.map +1 -0
  11. package/dist/components/one-time-code-input.d.ts +4 -0
  12. package/dist/components/one-time-code-input.d.ts.map +1 -0
  13. package/dist/components/ui/alert-dialog.d.ts +19 -0
  14. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  15. package/dist/components/ui/avatar.d.ts +12 -0
  16. package/dist/components/ui/avatar.d.ts.map +1 -0
  17. package/dist/components/ui/badge.d.ts +10 -0
  18. package/dist/components/ui/badge.d.ts.map +1 -0
  19. package/dist/components/ui/breadcrumb.d.ts +13 -0
  20. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  21. package/dist/components/ui/button.d.ts +11 -0
  22. package/dist/components/ui/button.d.ts.map +1 -0
  23. package/dist/components/ui/calendar.d.ts +11 -0
  24. package/dist/components/ui/calendar.d.ts.map +1 -0
  25. package/dist/components/ui/card.d.ts +12 -0
  26. package/dist/components/ui/card.d.ts.map +1 -0
  27. package/dist/components/ui/checkbox.d.ts +5 -0
  28. package/dist/components/ui/checkbox.d.ts.map +1 -0
  29. package/dist/components/ui/collapsible.d.ts +6 -0
  30. package/dist/components/ui/collapsible.d.ts.map +1 -0
  31. package/dist/components/ui/dialog.d.ts +17 -0
  32. package/dist/components/ui/dialog.d.ts.map +1 -0
  33. package/dist/components/ui/dropdown-menu.d.ts +30 -0
  34. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  35. package/dist/components/ui/input-otp.d.ts +11 -0
  36. package/dist/components/ui/input-otp.d.ts.map +1 -0
  37. package/dist/components/ui/input.d.ts +4 -0
  38. package/dist/components/ui/input.d.ts.map +1 -0
  39. package/dist/components/ui/label.d.ts +5 -0
  40. package/dist/components/ui/label.d.ts.map +1 -0
  41. package/dist/components/ui/pagination.d.ts +19 -0
  42. package/dist/components/ui/pagination.d.ts.map +1 -0
  43. package/dist/components/ui/popover.d.ts +11 -0
  44. package/dist/components/ui/popover.d.ts.map +1 -0
  45. package/dist/components/ui/select.d.ts +16 -0
  46. package/dist/components/ui/select.d.ts.map +1 -0
  47. package/dist/components/ui/separator.d.ts +5 -0
  48. package/dist/components/ui/separator.d.ts.map +1 -0
  49. package/dist/components/ui/sheet.d.ts +16 -0
  50. package/dist/components/ui/sheet.d.ts.map +1 -0
  51. package/dist/components/ui/sidebar.d.ts +77 -0
  52. package/dist/components/ui/sidebar.d.ts.map +1 -0
  53. package/dist/components/ui/skeleton.d.ts +3 -0
  54. package/dist/components/ui/skeleton.d.ts.map +1 -0
  55. package/dist/components/ui/sonner.d.ts +4 -0
  56. package/dist/components/ui/sonner.d.ts.map +1 -0
  57. package/dist/components/ui/table.d.ts +11 -0
  58. package/dist/components/ui/table.d.ts.map +1 -0
  59. package/dist/components/ui/tabs.d.ts +12 -0
  60. package/dist/components/ui/tabs.d.ts.map +1 -0
  61. package/dist/components/ui/textarea.d.ts +4 -0
  62. package/dist/components/ui/textarea.d.ts.map +1 -0
  63. package/dist/components/ui/tooltip.d.ts +8 -0
  64. package/dist/components/ui/tooltip.d.ts.map +1 -0
  65. package/dist/favicon.svg +18 -2
  66. package/dist/hooks/use-mobile.d.ts +2 -0
  67. package/dist/hooks/use-mobile.d.ts.map +1 -0
  68. package/dist/index.html +4 -77
  69. package/dist/kit.css +3 -0
  70. package/dist/kit.d.ts +29 -0
  71. package/dist/kit.d.ts.map +1 -0
  72. package/dist/kit.js +1577 -0
  73. package/dist/lib/utils.d.ts +3 -0
  74. package/dist/lib/utils.d.ts.map +1 -0
  75. package/dist/preview.html +18 -0
  76. package/dist/r/auth-page.json +18 -0
  77. package/dist/r/registry.json +21 -0
  78. package/dist/server.js +1 -1
  79. package/dist/theme.js +64 -0
  80. package/dist/tokens.css +88 -0
  81. package/package.json +27 -10
  82. package/dist/assets/index-BZ7kdRYa.css +0 -2
  83. package/dist/assets/index-DqiSJNEC.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 copied by `mantle generate`
6
- to `public/_mantle/admin/`. It currently provides the system admin shell, preference
7
- UI, site overview surfaces, and Mantle-branded system pages.
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.