# Integration

Set a RequireJS alias from the package root URL:

```javascript
require.config({ paths: { UnifiedControl: packageRootUrl + '/scripts' } });
require(['UnifiedControl/main'], function (UnifiedControl) {
  var designer = UnifiedControl.createDesignerControl({ container: '#target', language: 'ja' });
});
```

The package never stores a fixed internal CDN or root URL. The Host provides the root URL and consumes PACKAGE_MANIFEST.json paths.

## dev-0.2.0 Workbench options

```javascript
var control = UnifiedControl.createDesignerControl({
  container: '#target',
  language: 'ja',
  theme: 'flat',
  showPalette: true,
  showOutline: true,
  showInspector: true,
  showEventLog: true,
  dockLayout: previousLayoutState
});
```

`dockLayout` is optional. It can be obtained from `control.getWorkbenchLayout()`.

## dev-0.3.0 Designer options

```javascript
var control = UnifiedControl.createDesignerControl({
  container: '#target',
  language: 'ja',
  theme: 'flat',
  snapToGrid: true,
  gridSize: 8,
  historyLimit: 100
});
```

The Host should prefer `control.exec()` for user operations. Direct `control.canvas` access is useful for schema adapters and regression tests, but Host UI should not depend on canvas DOM internals.
