mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-07 10:06:21 +00:00
* feat(studio): edit and style text in the preview Double-press a text element in the canvas and the caret opens where you pressed, in the element itself rather than in a panel. Select characters and a small toolbar offers colour, bold, italic and underline, applied to exactly those characters. The toolbar lives in Studio's document rather than the composition's. Putting it in the preview would inject Studio's chrome into the user's composition, where a render would capture it and the composition's own styling would inherit into it. In a flex or grid container the rebuilt runs go inside one wrapper, so a coloured word cannot reflow the element it sits in. Also fixes the keyboard: the shortcut guards matched contenteditable=true only, so playback shortcuts ate letters typed into the composition. * refactor(studio): keep domEditingLayers under the size cap The rich-text operation pushed this file past the 600-line gate. Same change the branch made later, landed with the commit that caused it. * test(studio): wrap selection changes in act * fix(studio): restore rich text after failed save * fix(studio): polish inline text editing * fix(studio): harden inline text editing
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
/**
|
|
* Public API for dom editing — re-exports from focused sub-modules.
|
|
* Import from this file to avoid breaking existing import paths.
|
|
*/
|
|
|
|
// Types
|
|
export type {
|
|
DomEditCapabilities,
|
|
DomEditContextOptions,
|
|
DomEditLayerItem,
|
|
DomEditSelection,
|
|
DomEditTextField,
|
|
DomEditViewport,
|
|
TimelineElementDomTarget,
|
|
TimelineElementDomTargetOptions,
|
|
} from "./domEditingTypes";
|
|
|
|
// Element finders, visibility, visual scoring, raster detection
|
|
export {
|
|
findElementForSelection,
|
|
findElementForTimelineElement,
|
|
isLargeRasterDomEditSelection,
|
|
resolveVisualDomEditSelectionTarget,
|
|
} from "./domEditingElement";
|
|
|
|
// Layers, text fields, capabilities, selection, patch ops
|
|
export {
|
|
buildDefaultDomEditTextField,
|
|
buildDomEditPatchTarget,
|
|
buildDomEditRichTextPatchOperation,
|
|
buildDomEditStylePatchOperation,
|
|
buildDomEditTextPatchOperation,
|
|
collectDomEditLayerItems,
|
|
countDomEditChildLayers,
|
|
buildTextFieldChildLocator,
|
|
getDomEditLayerKey,
|
|
getDomEditNonEditableReason,
|
|
getDomEditTargetKey,
|
|
isTextEditableSelection,
|
|
readHfId,
|
|
refreshDomEditSelection,
|
|
resolveDomEditCapabilities,
|
|
resolveDomEditSelection,
|
|
serializeDomEditTextFields,
|
|
} from "./domEditingLayers";
|
|
|
|
// Agent prompt
|
|
export { buildElementAgentPrompt } from "./domEditingAgentPrompt";
|