@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.mjs CHANGED
@@ -1338,6 +1338,80 @@ import Color from "@tiptap/extension-color";
1338
1338
  import { TableKit } from "@tiptap/extension-table";
1339
1339
  import { Dropcursor } from "@tiptap/extensions";
1340
1340
 
1341
+ // src/components/extensions/list-marker-color.tsx
1342
+ import { Extension } from "@tiptap/core";
1343
+ var ListMarkerColor = Extension.create({
1344
+ name: "listMarkerColor",
1345
+ addGlobalAttributes() {
1346
+ return [
1347
+ {
1348
+ types: ["listItem", "taskItem"],
1349
+ attributes: {
1350
+ // Inherit color attribute from ColorBlock extension
1351
+ }
1352
+ }
1353
+ ];
1354
+ },
1355
+ addProseMirrorPlugins() {
1356
+ return [];
1357
+ },
1358
+ // Add CSS to make markers inherit color
1359
+ addOptions() {
1360
+ return {
1361
+ // CSS will be injected into the editor
1362
+ };
1363
+ },
1364
+ onCreate() {
1365
+ if (typeof document !== "undefined") {
1366
+ const styleId = "tiptap-list-marker-color";
1367
+ if (!document.getElementById(styleId)) {
1368
+ const style = document.createElement("style");
1369
+ style.id = styleId;
1370
+ style.textContent = `
1371
+ /* Bullet list markers inherit color */
1372
+ .ProseMirror ul[data-type="bulletList"] > li[style*="color"]::marker,
1373
+ .ProseMirror ul li[style*="color"]::marker {
1374
+ color: inherit !important;
1375
+ }
1376
+
1377
+ /* Ordered list numbers inherit color */
1378
+ .ProseMirror ol[data-type="orderedList"] > li[style*="color"]::marker,
1379
+ .ProseMirror ol li[style*="color"]::marker {
1380
+ color: inherit !important;
1381
+ }
1382
+
1383
+ /* Task list checkboxes inherit color */
1384
+ .ProseMirror ul[data-type="taskList"] > li[style*="color"] > label > input[type="checkbox"],
1385
+ .ProseMirror ul[data-type="taskList"] li[style*="color"] > label > input[type="checkbox"] {
1386
+ accent-color: currentColor;
1387
+ }
1388
+
1389
+ /* Alternative: Style the checkbox wrapper */
1390
+ .ProseMirror ul[data-type="taskList"] > li[style*="color"] > label,
1391
+ .ProseMirror ul[data-type="taskList"] li[style*="color"] > label {
1392
+ color: inherit;
1393
+ }
1394
+
1395
+ /* Ensure nested lists also inherit */
1396
+ .ProseMirror li[style*="color"] ul > li::marker,
1397
+ .ProseMirror li[style*="color"] ol > li::marker {
1398
+ color: inherit !important;
1399
+ }
1400
+ `;
1401
+ document.head.appendChild(style);
1402
+ }
1403
+ }
1404
+ },
1405
+ onDestroy() {
1406
+ if (typeof document !== "undefined") {
1407
+ const styleElement = document.getElementById("tiptap-list-marker-color");
1408
+ if (styleElement) {
1409
+ styleElement.remove();
1410
+ }
1411
+ }
1412
+ }
1413
+ });
1414
+
1341
1415
  // src/components/tiptap-ui-primitive/button/button.tsx
1342
1416
  import { forwardRef as forwardRef2, Fragment as Fragment2, useMemo as useMemo4 } from "react";
1343
1417
 
@@ -1513,7 +1587,7 @@ import {
1513
1587
  Selection,
1514
1588
  TextSelection
1515
1589
  } from "@tiptap/pm/state";
1516
- import { Extension } from "@tiptap/core";
1590
+ import { Extension as Extension2 } from "@tiptap/core";
1517
1591
  var MAX_FILE_SIZE = 5 * 1024 * 1024;
1518
1592
  var MAC_SYMBOLS = {
1519
1593
  mod: "\u2318",
@@ -1756,7 +1830,7 @@ var FONT_SIZES = [
1756
1830
  "56px",
1757
1831
  "64px"
1758
1832
  ];
1759
- var FontSizeExtension = Extension.create({
1833
+ var FontSizeExtension = Extension2.create({
1760
1834
  name: "fontSize",
1761
1835
  addOptions() {
1762
1836
  return {
@@ -7323,7 +7397,7 @@ function ColorPicker({ type = "text" }) {
7323
7397
  {
7324
7398
  className: "flex flex-col gap-3",
7325
7399
  onMouseDown: (e) => e.stopPropagation(),
7326
- onMouseUp: (e) => e.stopPropagation(),
7400
+ onMouseUp: ((e) => e.stopPropagation()),
7327
7401
  onPointerDown: (e) => e.stopPropagation(),
7328
7402
  onPointerUp: (e) => e.stopPropagation(),
7329
7403
  onClick: (e) => e.stopPropagation(),
@@ -7694,9 +7768,9 @@ function useCursorVisibility({
7694
7768
  }
7695
7769
 
7696
7770
  // src/components/extensions/font-family-block.ts
7697
- import { Extension as Extension2 } from "@tiptap/core";
7771
+ import { Extension as Extension3 } from "@tiptap/core";
7698
7772
  import { Plugin, PluginKey } from "@tiptap/pm/state";
7699
- var FontFamilyBlock = Extension2.create({
7773
+ var FontFamilyBlock = Extension3.create({
7700
7774
  name: "fontFamilyBlock",
7701
7775
  addGlobalAttributes() {
7702
7776
  return [
@@ -7724,7 +7798,7 @@ var FontFamilyBlock = Extension2.create({
7724
7798
  ];
7725
7799
  }
7726
7800
  });
7727
- var ColorBlock = Extension2.create({
7801
+ var ColorBlock = Extension3.create({
7728
7802
  name: "colorBlock",
7729
7803
  addGlobalAttributes() {
7730
7804
  return [
@@ -7752,8 +7826,51 @@ var ColorBlock = Extension2.create({
7752
7826
  ];
7753
7827
  }
7754
7828
  });
7829
+ var ListMarkerColor2 = Extension3.create({
7830
+ name: "listMarkerColor",
7831
+ onCreate() {
7832
+ if (typeof document !== "undefined") {
7833
+ const styleId = "tiptap-list-marker-color";
7834
+ if (!document.getElementById(styleId)) {
7835
+ const style = document.createElement("style");
7836
+ style.id = styleId;
7837
+ style.textContent = `
7838
+ /* Bullet list markers inherit color */
7839
+ .ProseMirror ul > li[style*="color"]::marker {
7840
+ color: inherit !important;
7841
+ }
7842
+
7843
+ /* Ordered list numbers inherit color */
7844
+ .ProseMirror ol > li[style*="color"]::marker {
7845
+ color: inherit !important;
7846
+ }
7847
+
7848
+ /* Task list checkboxes inherit color */
7849
+ .ProseMirror ul[data-type="taskList"] > li[style*="color"] > label > input[type="checkbox"] {
7850
+ accent-color: currentColor;
7851
+ }
7852
+
7853
+ /* Ensure nested lists also inherit */
7854
+ .ProseMirror li[style*="color"] ul > li::marker,
7855
+ .ProseMirror li[style*="color"] ol > li::marker {
7856
+ color: inherit !important;
7857
+ }
7858
+ `;
7859
+ document.head.appendChild(style);
7860
+ }
7861
+ }
7862
+ },
7863
+ onDestroy() {
7864
+ if (typeof document !== "undefined") {
7865
+ const styleElement = document.getElementById("tiptap-list-marker-color");
7866
+ if (styleElement) {
7867
+ styleElement.remove();
7868
+ }
7869
+ }
7870
+ }
7871
+ });
7755
7872
  var stylePersistenceKey = new PluginKey("stylePersistence");
7756
- var StylePersistence = Extension2.create({
7873
+ var StylePersistence = Extension3.create({
7757
7874
  name: "stylePersistence",
7758
7875
  addOptions() {
7759
7876
  return {
@@ -8031,6 +8148,7 @@ function SimpleEditor() {
8031
8148
  Superscript,
8032
8149
  Subscript,
8033
8150
  Selection2,
8151
+ ListMarkerColor,
8034
8152
  FontFamilyBlock,
8035
8153
  ColorBlock,
8036
8154
  StylePersistence,