@overlap/rte 1.0.7 → 1.0.8

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.
package/dist/index.js CHANGED
@@ -136,11 +136,6 @@ const Dropdown = ({ icon, label, options, onSelect, currentValue, disabled, show
136
136
  }, children: "Apply" })] }))] }))] }));
137
137
  };
138
138
 
139
- /** Debounce time for pushing to history after input (ms) */
140
- const HISTORY_DEBOUNCE_MS = 300;
141
- /** Width of the clickable checkbox area in pixels */
142
- const CHECKBOX_CLICK_ZONE_PX = 40;
143
-
144
139
  /**
145
140
  * Pure DOM utility functions.
146
141
  * No React dependencies - only native browser APIs.
@@ -393,8 +388,8 @@ function useCheckbox({ editorRef, isUpdatingRef, pushToHistory, notifyChange, ge
393
388
  const rect = listItem.getBoundingClientRect();
394
389
  const clientX = event.clientX;
395
390
  const isInCheckboxArea = listItem.dir === "rtl"
396
- ? clientX >= rect.right - CHECKBOX_CLICK_ZONE_PX
397
- : clientX <= rect.left + CHECKBOX_CLICK_ZONE_PX;
391
+ ? clientX >= rect.right
392
+ : clientX <= rect.left;
398
393
  if (isInCheckboxArea) {
399
394
  event.preventDefault();
400
395
  event.stopPropagation();
@@ -421,8 +416,8 @@ function useCheckbox({ editorRef, isUpdatingRef, pushToHistory, notifyChange, ge
421
416
  const rect = listItem.getBoundingClientRect();
422
417
  const clientX = event.clientX;
423
418
  const isInCheckboxArea = listItem.dir === "rtl"
424
- ? clientX >= rect.right - CHECKBOX_CLICK_ZONE_PX
425
- : clientX <= rect.left + CHECKBOX_CLICK_ZONE_PX;
419
+ ? clientX >= rect.right
420
+ : clientX <= rect.left;
426
421
  if (isInCheckboxArea) {
427
422
  event.preventDefault();
428
423
  }
@@ -680,6 +675,9 @@ function useCheckbox({ editorRef, isUpdatingRef, pushToHistory, notifyChange, ge
680
675
  };
681
676
  }
682
677
 
678
+ /** Debounce time for pushing to history after input (ms) */
679
+ const HISTORY_DEBOUNCE_MS = 300;
680
+
683
681
  /**
684
682
  * Lightweight HTML sanitizer (no external dependencies).
685
683
  *