Parent: #138
Depends on: #139
Goal
Export EmailTemplateAdmin as the primary embeddable admin page from @singleton-sd/post-kit-editor: template list, ported EmailBuilder MUI canvas, PostKit metadata/variables/preview/validation/save/send chrome, and an internal MUI ThemeProvider so hosts need no MUI setup.
Scope
Public API
<EmailTemplateAdmin
templates={catalog}
onSave={saveToConsumerApi}
onSendTest={postSendTestToBff} // optional
/>
- Absorb list/select behaviour from
examples/admin-editor/App.tsx.
- Reuse existing save/send/validation/preview logic from
EmailTemplateEditor.
- Mount
ThemeProvider inside the component.
- Keep
EmailTemplateEditor / EmailBuilderCanvas exported for advanced hosts.
Layout
Full-page layout: template list + PostKit sidebar chrome + EmailBuilder inspector/samples/canvas + sandboxed preview.
Tests / Storybook
- SSR smoke for admin shell with fixtures.
- Storybook story for
EmailTemplateAdmin.
Constraints
- No credentials props; no disk/Git/network inside the package.
- Do not rewrite
examples/admin-editor docs beyond what is needed to compile against the new export (docs/example thinning is the next issue).
Acceptance criteria
Agent implementation notes
Depends on the MUI canvas port. Branch: feat/<N>-email-template-admin.
Parent: #138
Depends on: #139
Goal
Export
EmailTemplateAdminas the primary embeddable admin page from@singleton-sd/post-kit-editor: template list, ported EmailBuilder MUI canvas, PostKit metadata/variables/preview/validation/save/send chrome, and an internal MUIThemeProviderso hosts need no MUI setup.Scope
Public API
examples/admin-editor/App.tsx.EmailTemplateEditor.ThemeProviderinside the component.EmailTemplateEditor/EmailBuilderCanvasexported for advanced hosts.Layout
Full-page layout: template list + PostKit sidebar chrome + EmailBuilder inspector/samples/canvas + sandboxed preview.
Tests / Storybook
EmailTemplateAdmin.Constraints
examples/admin-editordocs beyond what is needed to compile against the new export (docs/example thinning is the next issue).Acceptance criteria
EmailTemplateAdminis exported from packageindex.templates+onSaveshows list, MUI canvas/inspector/samples, and PostKit chrome.onSendTesthides Send-test; provide it shows Send-test.ThemeProvider.pnpm --filter @singleton-sd/post-kit-editor testand Storybook build succeed.Agent implementation notes
Depends on the MUI canvas port. Branch:
feat/<N>-email-template-admin.