Skip to content

rune-langium / visual-editor/src / UseTypeRefDropOptions

Interface: UseTypeRefDropOptions ​

Defined in: packages/visual-editor/src/hooks/useTypeRefDrop.ts:39

Properties ​

PropertyModifierTypeDescriptionDefined in
acceptreadonlyreadonly ( | "Data" | "Choice" | "Annotation" | "Enum" | "BasicType" | "Record" | "TypeAlias" | "Func")[]Kinds this drop target will accept. Drops whose payload.kind is not in this list are silently ignored (no onDrop call). isOver semantics during dragover depend on what the drag source registered on dataTransfer: - Kind-specific MIME (e.g. application/x-rune-type-ref+data): isOver is set only when at least one registered kind matches this list — strict accept gating during hover. - Canonical MIME only (application/x-rune-type-ref, no kind suffix): isOver is set as a backward-compatibility fallback; kind filtering moves to drop time via the parsed payload + accept check. Hover may briefly show "accepting" before the drop is rejected. Drag sources following the recommended dual-MIME contract get the strict behavior; single-MIME sources still work but lose dragover-time filtering.packages/visual-editor/src/hooks/useTypeRefDrop.ts:57
onDropreadonly(payload) => voidCalled with the parsed payload when an accepted drop completes.packages/visual-editor/src/hooks/useTypeRefDrop.ts:59

Core packages released under MIT. Studio app released under FSL-1.1-ALv2.