oasis-editor 0.0.361 → 0.0.363

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,9 @@ export interface EditorTextDragDeps {
20
20
  warn?: (msg: string, payload?: unknown) => void;
21
21
  };
22
22
  }
23
+ /** Cross-story drops are explicit transactions, not edits of the active
24
+ * zone's flattened paragraph stream. Unsupported transfers are no-ops. */
25
+ export declare function applyTextDragDrop(state: EditorState, destination: EditorPosition, hit: Pick<SurfaceHit, "zone" | "paragraphId" | "paragraphOffset" | "tableCellAnchorPosition">, copy: boolean, edit: EditorTextDragDeps["applyTableAwareParagraphEdit"], onRejected?: (error: unknown) => void): EditorState;
23
26
  export declare function createEditorTextDrag(deps: EditorTextDragDeps): ReturnType<typeof createEditorTextDragImpl>;
24
27
  declare function createEditorTextDragImpl(deps: EditorTextDragDeps): {
25
28
  dragging: import('solid-js').Accessor<boolean>;
@@ -8,5 +8,9 @@ export interface EditorClipboardParagraphSpec {
8
8
  style?: EditorParagraphStyle;
9
9
  list?: EditorParagraphListStyle;
10
10
  }
11
+ /** A plain-text/HTML clipboard cannot represent source-owned OPC objects.
12
+ * Refuse the entire selection, including mixed text/object ranges, rather
13
+ * than copying a replacement character and subsequently deleting real data. */
14
+ export declare function selectionContainsOpaqueObject(state: EditorState): boolean;
11
15
  export declare function serializeEditorSelectionToHtml(state: EditorState): string;
12
16
  export declare function insertClipboardParagraphsAtSelection(state: EditorState, paragraphsSpec: EditorClipboardParagraphSpec[]): EditorState;
@@ -0,0 +1,9 @@
1
+ import { EditorState } from '../model.js';
2
+ export interface OpaqueRelocationDestination {
3
+ zone: "main" | "header" | "footer";
4
+ paragraphId: string;
5
+ offset: number;
6
+ }
7
+ /** Transactional command for a unique inline opaque object. Throws on an
8
+ * unsupported operation, before returning any changed state. */
9
+ export declare function relocateSelectedOpaqueObject(state: EditorState, destination: OpaqueRelocationDestination): EditorState;
@@ -2,3 +2,4 @@ export { moveOrCopySelectionToPosition, insertTextAtSelection, insertPlainTextAt
2
2
  export { deleteBackward, deleteForward, deleteCharsBackwardRaw, } from './textDeletion.js';
3
3
  export { toggleTextStyle, toggleCharacterBorder, clearSelectedTextFormatting, setTextStyleValue, nudgeFontSize, } from './textFormatting.js';
4
4
  export { type TextCaseMode, transformSelectedText, changeSelectedTextCase, } from './textCase.js';
5
+ export { relocateSelectedOpaqueObject, type OpaqueRelocationDestination } from './opaqueRelocation.js';
@@ -228,6 +228,14 @@ export interface EditorDocument {
228
228
  * objects. Immutable state metadata travels with undo/redo snapshots;
229
229
  * never mutate the shared original OPC package to record an edit.
230
230
  */
231
+ /** At most one pending cross-story move per source snapshot. Derived
232
+ * relationship IDs are deliberately not stored as authority. */
233
+ opaqueRelocationIntent?: Readonly<{
234
+ ownerPath: string;
235
+ ordinal: number;
236
+ signature: string;
237
+ destinationOwner: string;
238
+ }>;
231
239
  opaqueDeletionIntents?: ReadonlyArray<{
232
240
  ownerPath: string;
233
241
  ordinal: number;