{"_id":"@mhar00n/emdashcms-visual-builder","_rev":"2-7c858bc6bcd5e0c4783b301a80284985","name":"@mhar00n/emdashcms-visual-builder","dist-tags":{"latest":"0.1.0-alpha.1","alpha":"0.1.0-alpha.1"},"versions":{"0.0.0-stage":{"name":"@mhar00n/emdashcms-visual-builder","version":"0.0.0-stage","_id":"@mhar00n/emdashcms-visual-builder@0.0.0-stage","stub":true,"maintainers":[{"name":"mhar00n","email":"haroonchelsea2761@gmail.com"}],"dist":{"shasum":"84b22b85e5c6a1b4ff8cdbec45d640fc3f5dd028","tarball":"https://registry.npmjs.org/@mhar00n/emdashcms-visual-builder/-/emdashcms-visual-builder-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-OnSTBkYJJrf2MqcQ8Z8T5f+B/gdX+iu4Y2uk56hotqZXIMox+wNWpLmRz4oPTCwVO23UtaUU/F9u+8UkWUZYLQ==","signatures":[{"sig":"MEUCIEORSrkim9kn4+ItNpiiKqhn5PDXCoFgYM0NqLo48wGuAiEA37HZTE6JSzzjTSCZoYugK9GntOB4afFUAtrx6pX+/6M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":355},"_npmUser":{"name":"mhar00n","email":"haroonchelsea2761@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0-alpha.1":{"_id":"@mhar00n/emdashcms-visual-builder@0.1.0-alpha.1","bugs":{"url":"https://github.com/HaroonChelsea/emdashcms-visual-builder/issues"},"dist":{"shasum":"4b08218d307e5e90f5d40d4af8330fecc3247094","tarball":"https://registry.npmjs.org/@mhar00n/emdashcms-visual-builder/-/emdashcms-visual-builder-0.1.0-alpha.1.tgz","fileCount":106,"integrity":"sha512-RnTB1LKZxqtVrlB3U75Pdq7skMcLf/Q6R8/ppH1FeGdMabMN+VCb1CTgxevI6uVHVHtBj12v6hK3LQG54t8h2Q==","signatures":[{"sig":"MEUCIQD+kTciXY83kpbV4n96IaIEqOINxtZqlJdCv0E0FKinrQIgb8TtCjuHjiA4MzYOhkKD2EEfhZoE5d9QMBA3i9Uv3Yo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCBbSCVc6RJaW5rkPlrupgCgKrd7eJcVka68SCs8jE8kAIhAM+s+PhlWDzovfUId7kerXH1YBR38wH8R/btX5g5sjFO"}],"unpackedSize":574049},"main":"./dist/index.mjs","name":"@mhar00n/emdashcms-visual-builder","type":"module","types":"./dist/index.d.mts","author":{"name":"mharoon.dev"},"engines":{"node":">=22.16"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./admin":"./src/admin/index.tsx","./render":{"types":"./src/render/index.ts","default":"./src/render/index.ts"}},"gitHead":"d71d700d28bf4232f20f0a708164909f7f46b9b2","license":"MIT","scripts":{"test":"vitest","build":"tsdown src/index.ts --format esm --dts --clean","test:e2e":"node tests/e2e/run.mjs","test:run":"vitest run","pack:site":"pnpm build && pnpm check:package && rm -f *.tgz && pnpm pack && cd ../emdashcms-visual-builder-site && pnpm add ../emdashcms-visual-builder/mhar00n-emdashcms-visual-builder-$npm_package_version.tgz","typecheck":"tsc --noEmit","check:package":"node scripts/check-package.mjs","prepublishOnly":"pnpm typecheck && pnpm test:run && pnpm build && pnpm check:package"},"version":"0.1.0-alpha.1","_npmUser":{"name":"mhar00n","email":"haroonchelsea2761@gmail.com"},"homepage":"https://github.com/HaroonChelsea/emdashcms-visual-builder#readme","keywords":["emdash","emdash-cms","emdash-plugin","grapesjs","visual-builder","page-builder","cms","astro","website-builder"],"repository":{"url":"git+https://github.com/HaroonChelsea/emdashcms-visual-builder.git","type":"git"},"_npmVersion":"11.6.0","description":"Visual page and site building for EmDash CMS, powered by GrapesJS Core: responsive pages, header and footer, global styles, templates and reusable components.","directories":{},"maintainers":[{"name":"mhar00n","email":"haroonchelsea2761@gmail.com"}],"sideEffects":["**/*.css"],"_nodeVersion":"24.8.0","dependencies":{"grapesjs":"0.23.6"},"publishConfig":{"tag":"alpha","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"19.2.4","emdash":"1.1.0","tsdown":"^0.20.0","vitest":"^5.0.3","react-dom":"19.2.4","playwright":"^1.63.0","typescript":"^5.9.0","@types/react":"^19.0.0","@cloudflare/kumo":"2.6.0","@types/react-dom":"^19.0.0","@emdash-cms/admin":"1.1.0","@phosphor-icons/react":"2.1.10"},"peerDependencies":{"react":"^19.0.0","emdash":">=1.1.0 <2","react-dom":"^19.0.0","@cloudflare/kumo":"^2.6.0","@emdash-cms/admin":">=1.1.0 <2","@phosphor-icons/react":"^2.1.10"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emdashcms-visual-builder_0.1.0-alpha.1_1791440799188_0.9965056071980911"}}},"time":{"created":"2026-10-08T06:25:22.433Z","modified":"2026-10-08T06:26:39.460Z","0.0.0-stage":"2026-10-08T06:25:22.433Z","0.1.0-alpha.1":"2026-10-08T06:26:39.295Z"},"description":"Visual page and site building for EmDash CMS, powered by GrapesJS Core: responsive pages, header and footer, global styles, templates and reusable components.","maintainers":[{"name":"mhar00n","email":"haroonchelsea2761@gmail.com"}],"readme":"# EmDash CMS Visual Builder\n\nVisual page and site building for [EmDash CMS](https://emdashcms.com), powered by [GrapesJS](https://grapesjs.com) Core.\n\nBuild responsive pages, headers and footers visually while media, menus, permissions, drafts and publishing stay in EmDash.\n\n![The visual builder](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/01-builder.png)\n\n- Drag-and-drop pages with responsive (desktop / tablet / mobile) editing\n- EmDash Media for images and backgrounds (only the media id is stored)\n- Visual Header and Footer with live logo, title, menus, social links and copyright\n- Global Styles: one design system for colours, type, buttons and spacing, with **Light / Dark / System** palettes\n- 22 sections, 5 page templates and header/footer presets\n- Reusable Components: one source, many pages, draft and publish\n- My Templates with portable import / export (`.evb-template.json`)\n- Draft / publish through EmDash's normal content flow, with EmDash roles and permissions\n\n> **Alpha.** `0.1.0-alpha.1` is the first public pre-release. It is tested with **EmDash 1.1 and 1.2**, Node ≥ 22.16, React 19. It is a *native* EmDash plugin (it runs in your site's process), not a registry sandboxed plugin; install it only in sites you control.\n\n## Quick start\n\nYou need an EmDash site (create one with `npm create emdash@latest`). The steps below take a few minutes.\n\n**1. Install**\n\n```sh\npnpm add @mhar00n/emdashcms-visual-builder@alpha\n```\n\nEmDash's starter sets `minimumReleaseAge: 1440` in `pnpm-workspace.yaml`, which refuses packages published in the last 24 hours. If the install is refused for that reason, add the package to the exclusions (or wait a day):\n\n```yaml\nminimumReleaseAgeExclude:\n  - emdash\n  - \"@emdash-cms/*\"\n  - \"@mhar00n/emdashcms-visual-builder\"\n```\n\n**2. Register the plugin** in `astro.config.mjs`:\n\n```js\nimport { emdashVisualBuilderPlugin, emdashVisualBuilderVite } from \"@mhar00n/emdashcms-visual-builder\";\n\nexport default defineConfig({\n\t// ...\n\tintegrations: [\n\t\treact(),\n\t\temdash({\n\t\t\t// ...your existing options\n\t\t\tplugins: [emdashVisualBuilderPlugin()],\n\t\t}),\n\t],\n\tvite: emdashVisualBuilderVite(), // or emdashVisualBuilderVite({ ...yourViteConfig })\n});\n```\n\n**3. Start the site and run setup.** Start `pnpm dev`, sign in at `/_emdash/admin`, and open **Visual Builder**. A setup panel shows what your site is missing and offers **Fix setup for me**. It adds a JSON `layout` field to your `pages` collection (nothing changes until you press the button, and an existing field is never rewritten).\n\n**4. Render the design in your theme.** Installing the plugin does not change your site's pages. In the starter's `src/pages/pages/[slug].astro`, add the import and the `view` line to the frontmatter (after `page` has been loaded) and replace the existing `<article>…</article>` block (the starter already imports `PortableText`):\n\n```astro\n---\nimport { renderPage } from \"@mhar00n/emdashcms-visual-builder/render\";\nconst view = await renderPage(page.data.layout, Astro.locals.emdash);\n---\n\n{(view.showTitle || !view.visual) && (\n\t<article>\n\t\t<h1>{page.data.title}</h1>\n\t\t{!view.visual && <PortableText value={page.data.content} />}\n\t</article>\n)}\n{view.visual && (\n\t<>\n\t\t<style set:html={view.visual.css} />\n\t\t<Fragment set:html={view.visual.html} />\n\t</>\n)}\n```\n\nPages without a visual design keep rendering their normal content. The setup panel checks your theme and shows this snippet if it is missing. Your theme files are never edited for you. See [docs/theme-integration.md](docs/theme-integration.md) for the header and footer.\n\n**5. Build a page.** Open **Visual Builder**, choose a page, drag blocks in, **Save changes** (this saves a draft), then **Publish** the page in EmDash as usual.\n\n## What is optional\n\n| Feature | Where | Needs setup |\n|---|---|---|\n| Visual Header and Footer | Visual Builder → Header / Footer | Add the header/footer snippet to your layout ([theme integration](docs/theme-integration.md)). Saving a visual header or footer activates it; until then your theme's own keeps rendering. |\n| Global Styles (Light / Dark / System) | Visual Builder → Global Styles | None |\n| Reusable Components | Visual Builder → Reusable Components | **Fix setup for me** (creates a hidden `visual_components` collection) |\n| My Templates, import / export | Visual Builder → My Templates | **Fix setup for me** (creates a hidden `visual_templates` collection) |\n\nNothing is created when the plugin loads. Every schema change is an explicit button, idempotent, additive and never rewrites an existing collection or field.\n\n## Screenshots\n\n| | |\n|---|---|\n| ![Responsive editing](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/02-responsive-mobile.png) | ![Section library](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/03-sections.png) |\n| ![Page templates](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/04-page-templates.png) | ![Header builder](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/05-header-builder.png) |\n| ![Global Styles](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/06-global-styles.png) | ![Dark mode](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/07-dark-mode.png) |\n| ![Reusable components](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/08-reusable-components.png) | ![My Templates](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/09-my-templates.png) |\n| ![The published page](https://raw.githubusercontent.com/HaroonChelsea/emdashcms-visual-builder/main/docs/screenshots/10-public-page.png) | |\n\n## Who can do what\n\nThe plugin asks EmDash for permission **for the signed-in user on every request**; declaring a plugin capability never bypasses a user's role.\n\n| Role | Can |\n|---|---|\n| Subscriber | Nothing in the builder |\n| Contributor | Read drafts, components and templates; create components and templates |\n| Editor | Edit pages, edit and publish component sources, rename and delete templates, **view** header, footer and Global Styles |\n| Administrator | Everything: save the header, footer and Global Styles, and run the explicit setup actions |\n\nThe exact route-by-route table is in [docs/permissions.md](docs/permissions.md).\n\n## Documentation\n\n| | |\n|---|---|\n| [Theme integration](docs/theme-integration.md) | Page, header and footer snippets, fallbacks, short-page spacing |\n| [Permissions and capabilities](docs/permissions.md) | What the plugin requests and why; role table |\n| [Security](docs/security.md) | Trust boundary and protections |\n| [Template format](docs/template-format.md) | The `.evb-template.json` file |\n| [Architecture](docs/architecture.md) | Documents, storage, rendering |\n| [Troubleshooting](docs/troubleshooting.md) | Common problems |\n| [Changelog](CHANGELOG.md) | Release notes |\n\n## Status and known limitations\n\nThis is an alpha. Notably: no per-instance overrides for reusable components (edit the source, or detach), a template can't change kind after saving, media is not bundled in exported templates (images become placeholders), System mode follows `prefers-color-scheme` only (not a host's own dark-mode class), and the builder is designed for a pointer and keyboard (touch devices are not tested). The browser suite (574 checks) passes in Chromium, Firefox and WebKit; in Safari, Tab skips links by default (enable *Press Tab to highlight each item*, or use Option+Tab). See [docs/troubleshooting.md](docs/troubleshooting.md).\n\n## Development\n\n```sh\npnpm install\npnpm typecheck && pnpm test:run     # unit tests\npnpm build && pnpm check:package    # build and verify the npm tarball contents\npnpm test:e2e                       # browser suite; needs a running EmDash dev site (see tests/e2e/helpers.mjs)\n```\n\n## License\n\nMIT. The editor engine is [GrapesJS Core](https://github.com/GrapesJS/grapesjs) (BSD-3-Clause); see [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md). No GrapesJS Studio SDK or licence-key product is used.\n","readmeFilename":"README.md","homepage":"https://github.com/HaroonChelsea/emdashcms-visual-builder#readme","keywords":["emdash","emdash-cms","emdash-plugin","grapesjs","visual-builder","page-builder","cms","astro","website-builder"],"repository":{"url":"git+https://github.com/HaroonChelsea/emdashcms-visual-builder.git","type":"git"},"author":{"name":"mharoon.dev"},"bugs":{"url":"https://github.com/HaroonChelsea/emdashcms-visual-builder/issues"},"license":"MIT"}