@qnote/q-ai-note 1.0.16 → 1.0.18

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.
@@ -3670,6 +3670,37 @@ dialog::backdrop {
3670
3670
  margin-bottom: 8px;
3671
3671
  }
3672
3672
 
3673
+ .drawer-work-item-quick-edit {
3674
+ display: grid;
3675
+ gap: 8px;
3676
+ padding: 10px;
3677
+ background: #f8f9fb;
3678
+ border: 1px solid var(--border);
3679
+ border-radius: 10px;
3680
+ }
3681
+
3682
+ .drawer-work-item-quick-edit-grid {
3683
+ display: grid;
3684
+ grid-template-columns: 1fr 1fr;
3685
+ gap: 8px;
3686
+ }
3687
+
3688
+ .drawer-work-item-quick-edit input,
3689
+ .drawer-work-item-quick-edit select,
3690
+ .drawer-work-item-quick-edit textarea {
3691
+ width: 100%;
3692
+ border: 1px solid var(--border);
3693
+ border-radius: 8px;
3694
+ padding: 8px 10px;
3695
+ font-size: 13px;
3696
+ background: #fff;
3697
+ }
3698
+
3699
+ .drawer-work-item-quick-edit-actions {
3700
+ display: flex;
3701
+ justify-content: flex-end;
3702
+ }
3703
+
3673
3704
  .drawer-create-form {
3674
3705
  display: grid;
3675
3706
  gap: 8px;
@@ -494,11 +494,6 @@ export function mountWorkTree(targetId, options) {
494
494
  byParent.forEach((rows, parentKey) => {
495
495
  rows.sort((a, b) => {
496
496
  if (parentKey === '__root__') {
497
- const laneKeyA = keyOf(a, 'lane_order_key');
498
- const laneKeyB = keyOf(b, 'lane_order_key');
499
- if (laneKeyA && laneKeyB && laneKeyA !== laneKeyB) return laneKeyA.localeCompare(laneKeyB);
500
- if (laneKeyA && !laneKeyB) return -1;
501
- if (!laneKeyA && laneKeyB) return 1;
502
497
  const laneDiff = laneOrderOf(a) - laneOrderOf(b);
503
498
  if (laneDiff !== 0) return laneDiff;
504
499
  } else {
@@ -641,7 +636,6 @@ export function mountWorkTree(targetId, options) {
641
636
  const laneEls = Array.from(container.querySelectorAll('.dense-lane[data-root-id]'));
642
637
  const laneSlotEls = Array.from(container.querySelectorAll('.dense-lane-drop-slot[data-lane-slot-root-id]'));
643
638
  const laneEndSlotEl = container.querySelector('.dense-lane-drop-slot[data-lane-slot-end="1"]');
644
- const laneDropPositionByRootId = new Map();
645
639
  const laneHandleEls = Array.from(container.querySelectorAll('.dense-lane-drag-handle[data-lane-drag-id]'));
646
640
  laneHandleEls.forEach((handle) => {
647
641
  const rootId = handle.getAttribute('data-lane-drag-id') || '';
@@ -660,67 +654,18 @@ export function mountWorkTree(targetId, options) {
660
654
  board?.classList.remove('is-lane-dragging-active');
661
655
  laneEls.forEach((laneEl) => {
662
656
  laneEl.classList.remove('lane-drag-over-target');
663
- laneEl.removeAttribute('data-lane-drop-position');
664
657
  });
665
658
  laneSlotEls.forEach((slotEl) => slotEl.classList.remove('lane-slot-drag-over'));
666
659
  laneEndSlotEl?.classList.remove('lane-slot-drag-over');
667
- laneDropPositionByRootId.clear();
668
660
  draggingLaneId = '';
669
661
  });
670
662
  });
671
- laneEls.forEach((el) => {
672
- const rootId = el.getAttribute('data-root-id') || '';
673
- el.addEventListener('dragover', (event) => {
674
- if (!draggingLaneId || draggingLaneId === rootId) return;
675
- event.preventDefault();
676
- const rect = el.getBoundingClientRect();
677
- const offsetX = event.clientX - rect.left;
678
- const ratio = rect.width > 0 ? offsetX / rect.width : 0.5;
679
- const laneDropPosition = ratio >= 0.5 ? 'after' : 'before';
680
- laneDropPositionByRootId.set(rootId, laneDropPosition);
681
- el.setAttribute('data-lane-drop-position', laneDropPosition);
682
- el.classList.add('lane-drag-over-target');
683
- });
684
- el.addEventListener('dragleave', () => {
685
- el.classList.remove('lane-drag-over-target');
686
- el.removeAttribute('data-lane-drop-position');
687
- laneDropPositionByRootId.delete(rootId);
688
- });
689
- el.addEventListener('drop', (event) => {
690
- event.preventDefault();
691
- el.classList.remove('lane-drag-over-target');
692
- let laneDropPosition = laneDropPositionByRootId.get(rootId);
693
- if (!laneDropPosition) {
694
- const rect = el.getBoundingClientRect();
695
- const offsetX = event.clientX - rect.left;
696
- const ratio = rect.width > 0 ? offsetX / rect.width : 0.5;
697
- laneDropPosition = ratio >= 0.5 ? 'after' : 'before';
698
- }
699
- el.removeAttribute('data-lane-drop-position');
700
- laneDropPositionByRootId.delete(rootId);
701
- if (!draggingLaneId || draggingLaneId === rootId) return;
702
- if (laneDropPosition === 'before') {
703
- event.stopPropagation();
704
- onReorderLanes?.(draggingLaneId, rootId, 'before');
705
- board?.classList.remove('is-lane-dragging-active');
706
- draggingLaneId = '';
707
- } else {
708
- const orderedRootIds = laneEls
709
- .map((laneEl) => laneEl.getAttribute('data-root-id') || '')
710
- .filter((id) => id && id !== draggingLaneId);
711
- const isLastTarget = orderedRootIds.length > 0 && orderedRootIds[orderedRootIds.length - 1] === rootId;
712
- if (!isLastTarget) {
713
- event.stopPropagation();
714
- onReorderLanes?.(draggingLaneId, rootId, 'after');
715
- board?.classList.remove('is-lane-dragging-active');
716
- draggingLaneId = '';
717
- }
718
- }
719
- });
720
- });
663
+ // Lane reordering is intentionally slot-only for deterministic behavior.
664
+ // Users can drop on a "before slot" or the final "end slot".
721
665
  laneSlotEls.forEach((slotEl) => {
722
666
  const targetRootId = slotEl.getAttribute('data-lane-slot-root-id') || '';
723
667
  slotEl.addEventListener('dragover', (event) => {
668
+ if (draggingNodeId) return;
724
669
  if (!draggingLaneId || draggingLaneId === targetRootId) return;
725
670
  event.preventDefault();
726
671
  slotEl.classList.add('lane-slot-drag-over');
@@ -729,6 +674,7 @@ export function mountWorkTree(targetId, options) {
729
674
  slotEl.classList.remove('lane-slot-drag-over');
730
675
  });
731
676
  slotEl.addEventListener('drop', (event) => {
677
+ if (draggingNodeId) return;
732
678
  event.preventDefault();
733
679
  event.stopPropagation();
734
680
  slotEl.classList.remove('lane-slot-drag-over');
@@ -739,6 +685,7 @@ export function mountWorkTree(targetId, options) {
739
685
  });
740
686
  });
741
687
  laneEndSlotEl?.addEventListener('dragover', (event) => {
688
+ if (draggingNodeId) return;
742
689
  if (!draggingLaneId) return;
743
690
  event.preventDefault();
744
691
  laneEndSlotEl.classList.add('lane-slot-drag-over');
@@ -747,6 +694,7 @@ export function mountWorkTree(targetId, options) {
747
694
  laneEndSlotEl.classList.remove('lane-slot-drag-over');
748
695
  });
749
696
  laneEndSlotEl?.addEventListener('drop', (event) => {
697
+ if (draggingNodeId) return;
750
698
  if (!draggingLaneId) return;
751
699
  event.preventDefault();
752
700
  event.stopPropagation();
@@ -764,10 +712,7 @@ export function mountWorkTree(targetId, options) {
764
712
  event.preventDefault();
765
713
  laneEls.forEach((laneEl) => {
766
714
  laneEl.classList.remove('lane-drag-over-target');
767
- laneEl.removeAttribute('data-lane-drop-position');
768
715
  });
769
- laneDropPositionByRootId.clear();
770
- onReorderLanes?.(draggingLaneId, '', 'end');
771
- draggingLaneId = '';
716
+ // Ignore board-level lane drops to avoid ambiguous outcomes.
772
717
  });
773
718
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qnote/q-ai-note",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "type": "module",
5
5
  "description": "AI-assisted personal work sandbox and diary system",
6
6
  "main": "dist/server/index.js",