fix(builder): correct move and sortable behavior
Quality / quality (ubuntu-latest) (push) Failing after 10m0s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-09-05 10:49:33 +05:30
1 parent 0bd2a6860d
commit edccf06658
5 files changed
+70 -5

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@wrnexus/block-editor",
"version": "0.1.0",
"version": "0.1.1",
"type": "module",
"description": "Hydrated accessible editor runtime for WRNexus block documents.",
"exports": {
+5 -2
View File
@@ -49,8 +49,11 @@ export function mountBlockEditor(root: HTMLElement, options: MountEditorOptions)
const parent = element.dataset.blockParent!;
const slot = element.dataset.blockSlot!;
const siblings = [
...element.parentElement!.querySelectorAll<HTMLElement>(":scope > [data-block-id]"),
];
...root.querySelectorAll<HTMLElement>("[data-block-id][data-block-parent][data-block-slot]"),
].filter(
(candidate) =>
candidate.dataset.blockParent === parent && candidate.dataset.blockSlot === slot,
);
const handle = element.querySelector<HTMLElement>("[data-block-handle]") ?? undefined;
cleanups.push(
manager.registerSortable({