Workshop Kit widget

Shipped

live-preview-frame

A sandboxed iframe rendering a miniature, live preview of the operator's restaurant site as it stands right now. The foundation of the Muntin Method's persistent artifact rail — every bootcamp lesson hosts one.

Contract

Module path: /tools/_shared/workshop/live-preview-frame.js.

Exports:

export const tag         = 'live-preview-frame';
export const contextKeys = ['palette', 'onePromise', 'customerParagraph'];

export function mount(rootEl, state, deps) -> { unmount(), refresh(state) };
export function serialize() -> {};

Context keys consumed: palette, onePromise, customerParagraph, and (via MuntinContext.readRestaurantProfile()) the operator's name, cuisine, address, phone.

This widget is a viewer — it consumes context but never writes to it. Other widgets (palette-picker, voice-slider, persona-card-builder) are the producers.

Place it on a page

Drop a single section anywhere in a course-lesson page; the Workshop Kit engine loaded at the bottom of the page handles discovery and mount.

<section class="course-widget"
         data-widget="live-preview-frame"
         data-preview-page="home">
</section>
<script src="/tools/_shared/context-bus.js" defer></script>
<script src="/assets/js/workshop-widget.js" defer></script>

Optional data-preview-page: home (default), menu, about, contact. The non-home pages render a placeholder until the corresponding page template lands later in P6.

How it behaves