# UnifiedSlide Demo Guide

UnifiedSlide の Demo は製品本体ではなく、Host が `scripts/main.js` の AMD package をどのように組み込むかを示す利用例です。Demo 専用コード、Local callback 実装、説明 UI は `demo/` 配下に分離します。

## Demo files

| Demo | Purpose | Main checks |
|---|---|---|
| `demo/index.html` | Demo Portal | Demo一覧、目的、確認観点、関連docs |
| `demo/basic.html` | Basic workspace | 安定レイアウト、初期スライド、Ruler、Inspector |
| `demo/parameters.html` | Options and frame | language/theme/pane options、Re-mount、最大化/復帰 |
| `demo/callback-io.html` | File I/O callback | OpenFile / SaveFile request / response、Save As拡張子判定 |
| `demo/control-architecture.html` | Control API | createControl、exec、on/off、getState |
| `demo/regression-tests.html` | Regression | 主要Commandとcallback契約の軽量確認 |

## Demo-only assets

- `demo/assets/css/demo.css` - Demo Portal / Parameters / Callback UI only.
- `demo/assets/js/demo-host-callbacks.js` - Browser local OpenFile / SaveFile fallback only for Demo.
- `demo/assets/js/demo-frame.js` - Demo display frame maximize/restore helper.

Product runtime under `scripts/` must not depend on these files.

## Maximum display frame

`parameters.html` separates the options area and the Control display frame. The frame can be maximized so reviewers can verify the Control using nearly the full page area. The maximize behavior is Demo-only and does not alter the product Control API.


## alpha20 Demo frame maximize fix
- parameters.html now performs true fixed-position Control frame maximization and restore.
- Demo-only maximize logic remains under demo/assets/js and demo/assets/css.
- Embedded workspace receives resize notifications after maximize/restore so rulers and canvas layout refresh.


## alpha36-fix11 CSS and payload demo notes

Demos keep Host shell CSS under `demo/assets/css`. Runtime package CSS is loaded from `themes/base/unified_slide.css` and optional theme CSS as declared in the manifest. Callback demos should verify `HostFilePayload/v1` and `HostSavePayload/v1` flows.
