@mhamz.01/easyflow-texteditor 0.1.152 → 0.1.154

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
@@ -1400,6 +1400,80 @@ var import_extension_color = __toESM(require("@tiptap/extension-color"));
1400
1400
  var import_extension_table = require("@tiptap/extension-table");
1401
1401
  var import_extensions2 = require("@tiptap/extensions");
1402
1402
 
1403
+ // src/components/extensions/list-marker-color.tsx
1404
+ var import_core3 = require("@tiptap/core");
1405
+ var ListMarkerColor = import_core3.Extension.create({
1406
+ name: "listMarkerColor",
1407
+ addGlobalAttributes() {
1408
+ return [
1409
+ {
1410
+ types: ["listItem", "taskItem"],
1411
+ attributes: {
1412
+ // Inherit color attribute from ColorBlock extension
1413
+ }
1414
+ }
1415
+ ];
1416
+ },
1417
+ addProseMirrorPlugins() {
1418
+ return [];
1419
+ },
1420
+ // Add CSS to make markers inherit color
1421
+ addOptions() {
1422
+ return {
1423
+ // CSS will be injected into the editor
1424
+ };
1425
+ },
1426
+ onCreate() {
1427
+ if (typeof document !== "undefined") {
1428
+ const styleId = "tiptap-list-marker-color";
1429
+ if (!document.getElementById(styleId)) {
1430
+ const style = document.createElement("style");
1431
+ style.id = styleId;
1432
+ style.textContent = `
1433
+ /* Bullet list markers inherit color */
1434
+ .ProseMirror ul[data-type="bulletList"] > li[style*="color"]::marker,
1435
+ .ProseMirror ul li[style*="color"]::marker {
1436
+ color: inherit !important;
1437
+ }
1438
+
1439
+ /* Ordered list numbers inherit color */
1440
+ .ProseMirror ol[data-type="orderedList"] > li[style*="color"]::marker,
1441
+ .ProseMirror ol li[style*="color"]::marker {
1442
+ color: inherit !important;
1443
+ }
1444
+
1445
+ /* Task list checkboxes inherit color */
1446
+ .ProseMirror ul[data-type="taskList"] > li[style*="color"] > label > input[type="checkbox"],
1447
+ .ProseMirror ul[data-type="taskList"] li[style*="color"] > label > input[type="checkbox"] {
1448
+ accent-color: currentColor;
1449
+ }
1450
+
1451
+ /* Alternative: Style the checkbox wrapper */
1452
+ .ProseMirror ul[data-type="taskList"] > li[style*="color"] > label,
1453
+ .ProseMirror ul[data-type="taskList"] li[style*="color"] > label {
1454
+ color: inherit;
1455
+ }
1456
+
1457
+ /* Ensure nested lists also inherit */
1458
+ .ProseMirror li[style*="color"] ul > li::marker,
1459
+ .ProseMirror li[style*="color"] ol > li::marker {
1460
+ color: inherit !important;
1461
+ }
1462
+ `;
1463
+ document.head.appendChild(style);
1464
+ }
1465
+ }
1466
+ },
1467
+ onDestroy() {
1468
+ if (typeof document !== "undefined") {
1469
+ const styleElement = document.getElementById("tiptap-list-marker-color");
1470
+ if (styleElement) {
1471
+ styleElement.remove();
1472
+ }
1473
+ }
1474
+ }
1475
+ });
1476
+
1403
1477
  // src/components/tiptap-ui-primitive/button/button.tsx
1404
1478
  var import_react12 = require("react");
1405
1479
 
@@ -1547,7 +1621,7 @@ TooltipContent2.displayName = "TooltipContent";
1547
1621
 
1548
1622
  // src/lib/tiptap-utils.ts
1549
1623
  var import_state = require("@tiptap/pm/state");
1550
- var import_core3 = require("@tiptap/core");
1624
+ var import_core4 = require("@tiptap/core");
1551
1625
  var MAX_FILE_SIZE = 5 * 1024 * 1024;
1552
1626
  var MAC_SYMBOLS = {
1553
1627
  mod: "\u2318",
@@ -1790,7 +1864,7 @@ var FONT_SIZES = [
1790
1864
  "56px",
1791
1865
  "64px"
1792
1866
  ];
1793
- var FontSizeExtension = import_core3.Extension.create({
1867
+ var FontSizeExtension = import_core4.Extension.create({
1794
1868
  name: "fontSize",
1795
1869
  addOptions() {
1796
1870
  return {
@@ -7349,7 +7423,7 @@ function ColorPicker({ type = "text" }) {
7349
7423
  {
7350
7424
  className: "flex flex-col gap-3",
7351
7425
  onMouseDown: (e) => e.stopPropagation(),
7352
- onMouseUp: (e) => e.stopPropagation(),
7426
+ onMouseUp: ((e) => e.stopPropagation()),
7353
7427
  onPointerDown: (e) => e.stopPropagation(),
7354
7428
  onPointerUp: (e) => e.stopPropagation(),
7355
7429
  onClick: (e) => e.stopPropagation(),
@@ -7720,9 +7794,9 @@ function useCursorVisibility({
7720
7794
  }
7721
7795
 
7722
7796
  // src/components/extensions/font-family-block.ts
7723
- var import_core4 = require("@tiptap/core");
7797
+ var import_core5 = require("@tiptap/core");
7724
7798
  var import_state5 = require("@tiptap/pm/state");
7725
- var FontFamilyBlock = import_core4.Extension.create({
7799
+ var FontFamilyBlock = import_core5.Extension.create({
7726
7800
  name: "fontFamilyBlock",
7727
7801
  addGlobalAttributes() {
7728
7802
  return [
@@ -7750,7 +7824,7 @@ var FontFamilyBlock = import_core4.Extension.create({
7750
7824
  ];
7751
7825
  }
7752
7826
  });
7753
- var ColorBlock = import_core4.Extension.create({
7827
+ var ColorBlock = import_core5.Extension.create({
7754
7828
  name: "colorBlock",
7755
7829
  addGlobalAttributes() {
7756
7830
  return [
@@ -7778,8 +7852,51 @@ var ColorBlock = import_core4.Extension.create({
7778
7852
  ];
7779
7853
  }
7780
7854
  });
7855
+ var ListMarkerColor2 = import_core5.Extension.create({
7856
+ name: "listMarkerColor",
7857
+ onCreate() {
7858
+ if (typeof document !== "undefined") {
7859
+ const styleId = "tiptap-list-marker-color";
7860
+ if (!document.getElementById(styleId)) {
7861
+ const style = document.createElement("style");
7862
+ style.id = styleId;
7863
+ style.textContent = `
7864
+ /* Bullet list markers inherit color */
7865
+ .ProseMirror ul > li[style*="color"]::marker {
7866
+ color: inherit !important;
7867
+ }
7868
+
7869
+ /* Ordered list numbers inherit color */
7870
+ .ProseMirror ol > li[style*="color"]::marker {
7871
+ color: inherit !important;
7872
+ }
7873
+
7874
+ /* Task list checkboxes inherit color */
7875
+ .ProseMirror ul[data-type="taskList"] > li[style*="color"] > label > input[type="checkbox"] {
7876
+ accent-color: currentColor;
7877
+ }
7878
+
7879
+ /* Ensure nested lists also inherit */
7880
+ .ProseMirror li[style*="color"] ul > li::marker,
7881
+ .ProseMirror li[style*="color"] ol > li::marker {
7882
+ color: inherit !important;
7883
+ }
7884
+ `;
7885
+ document.head.appendChild(style);
7886
+ }
7887
+ }
7888
+ },
7889
+ onDestroy() {
7890
+ if (typeof document !== "undefined") {
7891
+ const styleElement = document.getElementById("tiptap-list-marker-color");
7892
+ if (styleElement) {
7893
+ styleElement.remove();
7894
+ }
7895
+ }
7896
+ }
7897
+ });
7781
7898
  var stylePersistenceKey = new import_state5.PluginKey("stylePersistence");
7782
- var StylePersistence = import_core4.Extension.create({
7899
+ var StylePersistence = import_core5.Extension.create({
7783
7900
  name: "stylePersistence",
7784
7901
  addOptions() {
7785
7902
  return {
@@ -8057,6 +8174,7 @@ function SimpleEditor() {
8057
8174
  import_extension_superscript.Superscript,
8058
8175
  import_extension_subscript.Subscript,
8059
8176
  import_extensions.Selection,
8177
+ ListMarkerColor,
8060
8178
  FontFamilyBlock,
8061
8179
  ColorBlock,
8062
8180
  StylePersistence,