@ai-composer/dom
v0.1.1
Published
The browser DOM layer for AI Composer. It connects the core editor to an editable surface and provides selection handling, clipboard integration, attachment rendering, and suggestion popups. Framework adapters use it internally; use it directly to build a
Readme
@ai-composer/dom
The browser DOM layer for AI Composer. It connects the core editor to an editable surface and provides selection handling, clipboard integration, attachment rendering, and suggestion popups. Framework adapters use it internally; use it directly to build a vanilla JavaScript integration.
npm install @ai-composer/core @ai-composer/domimport { createAIComposer } from '@ai-composer/core';
import { mountAIComposer } from '@ai-composer/dom';
const editor = createAIComposer({ mode: 'chat' });
const mounted = mountAIComposer(document.querySelector('#composer')!, editor);
// When the host UI is removed:
mounted.destroy();
editor.destroy();Documentation
Source: GitHub
