Skip to content

some changes#12

Open
mhmad-nr wants to merge 6 commits into
mehanix:masterfrom
mhmad-nr:add-vitejs
Open

some changes#12
mhmad-nr wants to merge 6 commits into
mehanix:masterfrom
mhmad-nr:add-vitejs

Conversation

@mhmad-nr

@mhmad-nr mhmad-nr commented Jun 2, 2024

Copy link
Copy Markdown

add vitejs (it is faster than react-scripts)
add logo to favicon

qant-au added a commit to qant-au/axonometra that referenced this pull request Jun 10, 2026
Implements the embedding story the README has been claiming. Hosts
can now iframe Axonometra and round-trip plans without baking
build-time integration code.

- src/embed/embedConfig.ts reads ?embed=1 / ?readonly=1 URL params
  and VITE_EMBED_ALLOWED_ORIGINS (comma-separated, deny-by-default).
- src/embed/EmbedBridge.tsx mounts a message listener gated on the
  allowlist. Inbound: axo:load (string|object plan, fed through the
  hardened FloorPlan.load), axo:request-save (replies axo:save with
  a JSON snapshot to event.source/event.origin), axo:ready?
  (responds axo:ready). On mount, broadcasts axo:ready to
  window.parent with targetOrigin '*' so the host can discover us.
  Cleanup removes the listener.
- PageLayout hides the welcome modal when embedded (host loads the
  plan via postMessage) and the toolbar when readonly=1.
- docker/nginx.conf replaces the legacy X-Frame-Options: SAMEORIGIN
  with Content-Security-Policy frame-ancestors 'self'. Style-src
  retains 'unsafe-inline' for Mantine + Emotion. connect-src trims
  to 'self' now that the arcada-backend dependency is gone.
- EMBEDDING.md documents the protocol, URL params, origin allowlist,
  and how to extend frame-ancestors.
- README's two embeddability mentions now link to EMBEDDING.md.

Also closes action items mehanix#10 (CSP) and mehanix#11 (frame-ancestors).

Closes action items mehanix#5, mehanix#10, mehanix#11, #33 (code-review-2026-06-09 mehanix#2,
mehanix#12, mehanix#13, #35).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant