# UnifiedSlide File I/O Policy

UnifiedSlide follows the single-file tool policy.

## Native work file

- `.usldx`
- ZIP-based editable package
- Save / Save As target
- Not listed as an Export format

## Host callbacks

UnifiedSlide does not expose storage-specific menu entries in product UI. The Host decides whether a file comes from Local Disk, App Storage, Google Drive, Backend API, or another adapter.

```js
window.UnifiedSlideHost = {
  OpenFile: function (request, context) {},
  SaveFile: function (request, context) {}
};
```

## Commands

- `New`
- `Open` -> `OpenFile({ operation:'open', role:'main' })`
- `Save` -> `SaveFile({ operation:'save', phase:'write' })`
- `Save As` -> `SaveFile({ operation:'saveAs', phase:'choose' })`, then extension-based data generation, then `phase:'write'`
- `Import` -> `OpenFile({ operation:'import', role:'main' })`
- `Insert Image` -> `OpenFile({ operation:'open', role:'asset' })`
- `Export PNG/PDF/PPTX` -> `SaveFile({ operation:'export', phase:'write' })`

## Save As extension resolution

- `.usldx` -> native ZIP work file
- `.png` -> image output
- `.pdf` -> PDF output
- `.pptx` -> PPTX output
- unsupported extensions -> validation error and current editing state remains intact


## alpha36-fix11 v1.3 Direction Split

`OpenFile`/`SaveFile` callbacks point from package/workbench to Host. `openFile`/`saveFile`/`saveAsFile`/`exportFile` methods point from Host/workbench to EditorControl. `saveFile`, `saveAsFile`, and `exportFile` return a `HostSavePayload/v1` with `payload.data` filled.
