# Control Framework Status

## Implemented in alpha15

- Public `scripts/main.js` module exports `createControl()`.
- `UnifiedSlideControl` provides `mount`, `destroy`, `exec`, `on`, `off`, `getState`, and `setOptions`.
- `CommandRegistry` executes Host-visible commands with `beforeCommand`, `afterCommand`, and `commandError` events.
- `StateStore` provides initial file context, dirty flag, selection summary, view flags, capability and zoom state.
- `EventBus` provides internal and Host-facing pub/sub.
- `FileIoService` normalizes `OpenFile` and `SaveFile` callback calls.
- `FormatRegistry` manages `.usldx`, `.pptx`, `.pdf`, and `.png` format definitions.
- `SecurityPolicyService` centralizes first-line filename and blob size validation.

## Compatibility layer

The stable workspace still autostarts from `scripts/app.js` when `demo/basic.html` contains canvas `#c`. This is a temporary compatibility bridge to avoid the layout regressions seen during the previous policy migration.

## Not yet fully migrated

- Existing menu button handlers are still partly in `scripts/app.js`.
- Canvas/editor commands still call Fabric.js directly in legacy code.
- App Storage demo behavior still exists in the legacy runtime and should be moved to Demo callback implementations.
- PPTX Import and Export services should be placed under an OOXML Core namespace.


## UnifiedControl dependency

Host/Demo configures `UnifiedControl` as a RequireJS alias to the shared Control Framework package. UnifiedSlide does not copy UnifiedControl into this ZIP.

```js
require.config({
  paths: {
    UnifiedControl: 'https://cdn.skylarkjs.com/itoolkits/developments/UnifiedControl/scripts',
    UnifiedSlide: '<UnifiedSlidePackageRoot>/scripts'
  }
});
```
