@overlap/rte 1.0.6 → 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/README.md +2 -0
- package/dist/constants.d.ts +0 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/hooks/useCheckbox.d.ts.map +1 -1
- package/dist/index.esm.js +7 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/dist/styles.css +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/constants.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** Debounce time for pushing to history after input (ms) */
|
|
2
2
|
export declare const HISTORY_DEBOUNCE_MS = 300;
|
|
3
|
-
/** Width of the clickable checkbox area in pixels */
|
|
4
|
-
export declare const CHECKBOX_CLICK_ZONE_PX = 40;
|
|
5
3
|
/** Maximum nesting depth for lists */
|
|
6
4
|
export declare const MAX_LIST_DEPTH = 6;
|
|
7
5
|
/** Maximum number of history entries */
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,sCAAsC;AACtC,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,wCAAwC;AACxC,eAAO,MAAM,gBAAgB,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckbox.d.ts","sourceRoot":"","sources":["../../src/hooks/useCheckbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCheckbox.d.ts","sourceRoot":"","sources":["../../src/hooks/useCheckbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACH,mBAAmB,EAInB,qBAAqB,EACxB,MAAM,mBAAmB,CAAC;AAS3B,UAAU,kBAAkB;IACxB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,aAAa,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACpC,aAAa,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,MAAM,aAAa,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EACxB,SAAS,EACT,aAAa,EACb,aAAa,EACb,YAAY,EACZ,aAAa,GAChB,EAAE,kBAAkB;;iCA4QJ,WAAW,KAAG,OAAO;+BApL1B,aAAa,KAAG,OAAO;6BAkFvB,aAAa,KAAG,OAAO;;EA0MlC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -132,11 +132,6 @@ const Dropdown = ({ icon, label, options, onSelect, currentValue, disabled, show
|
|
|
132
132
|
}, children: "Apply" })] }))] }))] }));
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
-
/** Debounce time for pushing to history after input (ms) */
|
|
136
|
-
const HISTORY_DEBOUNCE_MS = 300;
|
|
137
|
-
/** Width of the clickable checkbox area in pixels */
|
|
138
|
-
const CHECKBOX_CLICK_ZONE_PX = 40;
|
|
139
|
-
|
|
140
135
|
/**
|
|
141
136
|
* Pure DOM utility functions.
|
|
142
137
|
* No React dependencies - only native browser APIs.
|
|
@@ -389,8 +384,8 @@ function useCheckbox({ editorRef, isUpdatingRef, pushToHistory, notifyChange, ge
|
|
|
389
384
|
const rect = listItem.getBoundingClientRect();
|
|
390
385
|
const clientX = event.clientX;
|
|
391
386
|
const isInCheckboxArea = listItem.dir === "rtl"
|
|
392
|
-
? clientX >= rect.right
|
|
393
|
-
: clientX <= rect.left
|
|
387
|
+
? clientX >= rect.right
|
|
388
|
+
: clientX <= rect.left;
|
|
394
389
|
if (isInCheckboxArea) {
|
|
395
390
|
event.preventDefault();
|
|
396
391
|
event.stopPropagation();
|
|
@@ -417,8 +412,8 @@ function useCheckbox({ editorRef, isUpdatingRef, pushToHistory, notifyChange, ge
|
|
|
417
412
|
const rect = listItem.getBoundingClientRect();
|
|
418
413
|
const clientX = event.clientX;
|
|
419
414
|
const isInCheckboxArea = listItem.dir === "rtl"
|
|
420
|
-
? clientX >= rect.right
|
|
421
|
-
: clientX <= rect.left
|
|
415
|
+
? clientX >= rect.right
|
|
416
|
+
: clientX <= rect.left;
|
|
422
417
|
if (isInCheckboxArea) {
|
|
423
418
|
event.preventDefault();
|
|
424
419
|
}
|
|
@@ -676,6 +671,9 @@ function useCheckbox({ editorRef, isUpdatingRef, pushToHistory, notifyChange, ge
|
|
|
676
671
|
};
|
|
677
672
|
}
|
|
678
673
|
|
|
674
|
+
/** Debounce time for pushing to history after input (ms) */
|
|
675
|
+
const HISTORY_DEBOUNCE_MS = 300;
|
|
676
|
+
|
|
679
677
|
/**
|
|
680
678
|
* Lightweight HTML sanitizer (no external dependencies).
|
|
681
679
|
*
|