# Demo Structure

Demo は製品本体ではありません。UnifiedFiler の `scripts/` と `themes/` を、Host や他アプリがどのように利用するかを確認するための独立ページです。

## Pages

| Page | Purpose |
| --- | --- |
| `index.html` | Demo Launcher |
| `explorer.html` | Full FileExplorer component usage |
| `file-picker.html` | FilePicker dialog standalone usage |
| `file-saver.html` | FileSaver dialog standalone usage |
| `embedded-basic.html` | Minimal embedded FileExplorer usage |
| `google-drive.html` | Real browser-only Google Drive OAuth / Drive API / Picker usage |

## Launch parameter samples

`explorer.html`, `file-picker.html`, and `file-saver.html` include option forms so a Host-side developer can change representative launch parameters before initializing each component. The rendered code block shows the jQuery Plugin call that corresponds to the selected parameters.

## Shared Demo Code

- `demo/scripts/demo-bootstrap.js` creates StorageRegistry, FileService, RecentFileService, FavoriteFileService, MetadataService, PreviewService, OperationProgressService, PackageInfoService, MemoryApiBackendService, IndexedDbAdapter, LocalDiskAdapter, BackendApiAdapter, GoogleIdentityAuthService, GoogleDriveApiService, GoogleDrivePickerService, and GoogleDriveAdapter.
- `demo/themes/demo.css` contains only demo-page styling.
- Product component styling stays in `themes/default/unified-filer.css`.
- Demo pages mount the package with the RequireJS alias `UnifiedFiler`.

## Running

Run through HTTP. IndexedDB, CDN loading, and browser local-folder mounting do not work correctly from `file://` in many browsers. File System Access API features require a supported browser such as Chromium-based browsers and an explicit user gesture.

```bash
python -m http.server 8080
```

```text
http://localhost:8080/demo/
```

## v1.8.1 Google Drive demo

`google-drive.html` registers `googleDrive` through `GoogleDriveAdapter` with browser-only OAuth / Drive API / Picker parameters. `explorer.html`, `file-picker.html`, and `file-saver.html` can also include Google Drive, but it is unchecked by default because real Google Cloud parameters are required.

## v1.6 package demo

`explorer.html` loads JSZip and seeds real ZIP-based sample package files under App Storage (`/Packages`). Select a `.uwpsx`, `.umal`, or `.ualbx` file to confirm package preview and the context-menu Package Info dialog.
