@pinkpixel/marzipan 1.0.6 → 1.0.7

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.
Files changed (95) hide show
  1. package/dist/actions/core/detection.d.ts +11 -0
  2. package/dist/actions/core/detection.d.ts.map +1 -0
  3. package/dist/actions/core/detection.js +142 -0
  4. package/dist/actions/core/detection.js.map +1 -0
  5. package/dist/actions/core/formats.d.ts +5 -0
  6. package/dist/actions/core/formats.d.ts.map +1 -0
  7. package/dist/actions/core/formats.js +75 -0
  8. package/dist/actions/core/formats.js.map +1 -0
  9. package/dist/actions/core/insertion.d.ts +5 -0
  10. package/dist/actions/core/insertion.d.ts.map +1 -0
  11. package/dist/actions/core/insertion.js +116 -0
  12. package/dist/actions/core/insertion.js.map +1 -0
  13. package/dist/actions/core/selection.d.ts +13 -0
  14. package/dist/actions/core/selection.d.ts.map +1 -0
  15. package/dist/actions/core/selection.js +137 -0
  16. package/dist/actions/core/selection.js.map +1 -0
  17. package/dist/actions/debug.d.ts +10 -0
  18. package/dist/actions/debug.d.ts.map +1 -0
  19. package/dist/actions/debug.js +39 -0
  20. package/dist/actions/debug.js.map +1 -0
  21. package/dist/actions/index.d.ts +48 -0
  22. package/dist/actions/index.d.ts.map +1 -0
  23. package/dist/actions/index.js +237 -0
  24. package/dist/actions/index.js.map +1 -0
  25. package/dist/actions/operations/block.d.ts +5 -0
  26. package/dist/actions/operations/block.d.ts.map +1 -0
  27. package/dist/actions/operations/block.js +120 -0
  28. package/dist/actions/operations/block.js.map +1 -0
  29. package/dist/actions/operations/list.d.ts +4 -0
  30. package/dist/actions/operations/list.d.ts.map +1 -0
  31. package/dist/actions/operations/list.js +151 -0
  32. package/dist/actions/operations/list.js.map +1 -0
  33. package/dist/actions/types.d.ts +43 -0
  34. package/dist/actions/types.d.ts.map +1 -0
  35. package/dist/actions/types.js +2 -0
  36. package/dist/actions/types.js.map +1 -0
  37. package/dist/icons.d.ts +17 -0
  38. package/dist/icons.d.ts.map +1 -0
  39. package/dist/icons.js +67 -0
  40. package/dist/icons.js.map +1 -0
  41. package/dist/index.d.ts +143 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/link-tooltip.d.ts +27 -0
  44. package/dist/link-tooltip.d.ts.map +1 -0
  45. package/dist/link-tooltip.js +224 -0
  46. package/dist/link-tooltip.js.map +1 -0
  47. package/dist/marzipan.d.ts +472 -0
  48. package/dist/marzipan.d.ts.map +1 -0
  49. package/dist/marzipan.js +1185 -0
  50. package/dist/marzipan.js.map +1 -0
  51. package/dist/parser.d.ts +234 -0
  52. package/dist/parser.d.ts.map +1 -0
  53. package/dist/parser.js +886 -0
  54. package/dist/parser.js.map +1 -0
  55. package/dist/plugins/accentSwatchPlugin.d.ts +15 -0
  56. package/dist/plugins/accentSwatchPlugin.d.ts.map +1 -0
  57. package/dist/plugins/imageManagerPlugin.d.ts +16 -0
  58. package/dist/plugins/imageManagerPlugin.d.ts.map +1 -0
  59. package/dist/plugins/imagePicker.d.ts +7 -0
  60. package/dist/plugins/imagePicker.d.ts.map +1 -0
  61. package/dist/plugins/imagePickerPlugin.d.ts +3 -0
  62. package/dist/plugins/imagePickerPlugin.d.ts.map +1 -0
  63. package/dist/plugins/mermaidExternal.d.ts +2 -0
  64. package/dist/plugins/mermaidExternal.d.ts.map +1 -0
  65. package/dist/plugins/mermaidPlugin.d.ts +2 -0
  66. package/dist/plugins/mermaidPlugin.d.ts.map +1 -0
  67. package/dist/plugins/tableGenerator.d.ts +2 -0
  68. package/dist/plugins/tableGenerator.d.ts.map +1 -0
  69. package/dist/plugins/tableGridPlugin.d.ts +14 -0
  70. package/dist/plugins/tableGridPlugin.d.ts.map +1 -0
  71. package/dist/plugins/tablePlugin.d.ts +2 -0
  72. package/dist/plugins/tablePlugin.d.ts.map +1 -0
  73. package/dist/plugins/tinyHighlight.d.ts +10 -0
  74. package/dist/plugins/tinyHighlight.d.ts.map +1 -0
  75. package/dist/plugins/utils/table.d.ts +3 -0
  76. package/dist/plugins/utils/table.d.ts.map +1 -0
  77. package/dist/plugins/utils/table.js +25 -0
  78. package/dist/plugins/utils/table.js.map +1 -0
  79. package/dist/shortcuts.d.ts +15 -0
  80. package/dist/shortcuts.d.ts.map +1 -0
  81. package/dist/shortcuts.js +78 -0
  82. package/dist/shortcuts.js.map +1 -0
  83. package/dist/styles.d.ts +11 -0
  84. package/dist/styles.d.ts.map +1 -0
  85. package/dist/styles.js +854 -0
  86. package/dist/styles.js.map +1 -0
  87. package/dist/themes.d.ts +197 -0
  88. package/dist/themes.d.ts.map +1 -0
  89. package/dist/themes.js +120 -0
  90. package/dist/themes.js.map +1 -0
  91. package/dist/toolbar.d.ts +37 -0
  92. package/dist/toolbar.d.ts.map +1 -0
  93. package/dist/toolbar.js +283 -0
  94. package/dist/toolbar.js.map +1 -0
  95. package/package.json +2 -2
@@ -0,0 +1,43 @@
1
+ export interface FormatStyleOptions {
2
+ prefix?: string;
3
+ suffix?: string;
4
+ blockPrefix?: string;
5
+ blockSuffix?: string;
6
+ multiline?: boolean;
7
+ replaceNext?: string;
8
+ prefixSpace?: boolean;
9
+ scanFor?: string | RegExp;
10
+ surroundWithNewlines?: boolean;
11
+ orderedList?: boolean;
12
+ unorderedList?: boolean;
13
+ trimFirst?: boolean;
14
+ }
15
+ export interface ResolvedFormatStyle {
16
+ prefix: string;
17
+ suffix: string;
18
+ blockPrefix: string;
19
+ blockSuffix: string;
20
+ multiline: boolean;
21
+ replaceNext: string;
22
+ prefixSpace: boolean;
23
+ scanFor: string | RegExp | null;
24
+ surroundWithNewlines: boolean;
25
+ orderedList: boolean;
26
+ unorderedList: boolean;
27
+ trimFirst: boolean;
28
+ }
29
+ export interface TextTransformResult {
30
+ text: string;
31
+ selectionStart: number;
32
+ selectionEnd: number;
33
+ }
34
+ export type UndoMethod = 'native' | 'manual' | 'auto';
35
+ export interface LineOperationAdjustment {
36
+ start: number;
37
+ end: number;
38
+ }
39
+ export interface LineOperationOptions {
40
+ prefix?: string;
41
+ adjustSelection?: (isRemoving: boolean, selectionStart: number, selectionEnd: number, lineStart: number) => LineOperationAdjustment;
42
+ }
43
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/actions/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChC,oBAAoB,EAAE,OAAO,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,CAChB,UAAU,EAAE,OAAO,EACnB,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,KACd,uBAAuB,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/actions/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * SVG icons for Marzipan toolbar (TypeScript)
3
+ * Quill-style icons with inline styles
4
+ */
5
+ export declare const boldIcon = "<svg viewBox=\"0 0 18 18\">\n <path stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z\"></path>\n <path stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z\"></path>\n</svg>";
6
+ export declare const italicIcon = "<svg viewBox=\"0 0 18 18\">\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"7\" x2=\"13\" y1=\"4\" y2=\"4\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"5\" x2=\"11\" y1=\"14\" y2=\"14\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"8\" x2=\"10\" y1=\"14\" y2=\"4\"></line>\n</svg>";
7
+ export declare const h1Icon = "<svg viewBox=\"0 0 18 18\">\n <path fill=\"currentColor\" d=\"M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z\"></path>\n</svg>";
8
+ export declare const h2Icon = "<svg viewBox=\"0 0 18 18\">\n <path fill=\"currentColor\" d=\"M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"></path>\n</svg>";
9
+ export declare const h3Icon = "<svg viewBox=\"0 0 18 18\">\n <path fill=\"currentColor\" d=\"M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"></path>\n</svg>";
10
+ export declare const linkIcon = "<svg viewBox=\"0 0 18 18\">\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"7\" x2=\"11\" y1=\"7\" y2=\"11\"></line>\n <path stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z\"></path>\n <path stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z\"></path>\n</svg>";
11
+ export declare const codeIcon = "<svg viewBox=\"0 0 18 18\">\n <polyline stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" points=\"5 7 3 9 5 11\"></polyline>\n <polyline stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" points=\"13 7 15 9 13 11\"></polyline>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"10\" x2=\"8\" y1=\"5\" y2=\"13\"></line>\n</svg>";
12
+ export declare const bulletListIcon = "<svg viewBox=\"0 0 18 18\">\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"6\" x2=\"15\" y1=\"4\" y2=\"4\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"6\" x2=\"15\" y1=\"9\" y2=\"9\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"6\" x2=\"15\" y1=\"14\" y2=\"14\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"3\" x2=\"3\" y1=\"4\" y2=\"4\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"3\" x2=\"3\" y1=\"9\" y2=\"9\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"3\" x2=\"3\" y1=\"14\" y2=\"14\"></line>\n</svg>";
13
+ export declare const orderedListIcon = "<svg viewBox=\"0 0 18 18\">\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"7\" x2=\"15\" y1=\"4\" y2=\"4\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"7\" x2=\"15\" y1=\"9\" y2=\"9\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"7\" x2=\"15\" y1=\"14\" y2=\"14\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1\" x1=\"2.5\" x2=\"4.5\" y1=\"5.5\" y2=\"5.5\"></line>\n <path fill=\"currentColor\" d=\"M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z\"></path>\n <path stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1\" d=\"M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156\"></path>\n <path stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1\" d=\"M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109\"></path>\n</svg>";
14
+ export declare const quoteIcon = "<svg viewBox=\"2 2 20 20\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 10.8182L9 10.8182C8.80222 10.8182 8.60888 10.7649 8.44443 10.665C8.27998 10.5651 8.15181 10.4231 8.07612 10.257C8.00043 10.0909 7.98063 9.90808 8.01922 9.73174C8.0578 9.55539 8.15304 9.39341 8.29289 9.26627C8.43275 9.13913 8.61093 9.05255 8.80491 9.01747C8.99889 8.98239 9.19996 9.00039 9.38268 9.0692C9.56541 9.13801 9.72159 9.25453 9.83147 9.40403C9.94135 9.55353 10 9.72929 10 9.90909L10 12.1818C10 12.664 9.78929 13.1265 9.41421 13.4675C9.03914 13.8084 8.53043 14 8 14\"></path>\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M16 10.8182L15 10.8182C14.8022 10.8182 14.6089 10.7649 14.4444 10.665C14.28 10.5651 14.1518 10.4231 14.0761 10.257C14.0004 10.0909 13.9806 9.90808 14.0192 9.73174C14.0578 9.55539 14.153 9.39341 14.2929 9.26627C14.4327 9.13913 14.6109 9.05255 14.8049 9.01747C14.9989 8.98239 15.2 9.00039 15.3827 9.0692C15.5654 9.13801 15.7216 9.25453 15.8315 9.40403C15.9414 9.55353 16 9.72929 16 9.90909L16 12.1818C16 12.664 15.7893 13.1265 15.4142 13.4675C15.0391 13.8084 14.5304 14 14 14\"></path>\n</svg>";
15
+ export declare const taskListIcon = "<svg viewBox=\"0 0 18 18\">\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"8\" x2=\"16\" y1=\"4\" y2=\"4\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"8\" x2=\"16\" y1=\"9\" y2=\"9\"></line>\n <line stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" x1=\"8\" x2=\"16\" y1=\"14\" y2=\"14\"></line>\n <rect stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.5\" x=\"2\" y=\"3\" width=\"3\" height=\"3\" rx=\"0.5\"></rect>\n <rect stroke=\"currentColor\" fill=\"none\" stroke-width=\"1.5\" x=\"2\" y=\"13\" width=\"3\" height=\"3\" rx=\"0.5\"></rect>\n <polyline stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" points=\"2.65 9.5 3.5 10.5 5 8.5\"></polyline>\n</svg>";
16
+ export declare const eyeIcon = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" fill=\"none\"></path>\n <circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"none\"></circle>\n</svg>";
17
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,eAAO,MAAM,QAAQ,2dAGd,CAAC;AAER,eAAO,MAAM,UAAU,ihBAIhB,CAAC;AAER,eAAO,MAAM,MAAM,wlBAEZ,CAAC;AAER,eAAO,MAAM,MAAM,wpBAEZ,CAAC;AAER,eAAO,MAAM,MAAM,02BAEZ,CAAC;AAER,eAAO,MAAM,QAAQ,osBAId,CAAC;AAER,eAAO,MAAM,QAAQ,wgBAId,CAAC;AAGR,eAAO,MAAM,cAAc,q/BAOpB,CAAC;AAER,eAAO,MAAM,eAAe,2zCAQrB,CAAC;AAER,eAAO,MAAM,SAAS,ysCAGf,CAAC;AAER,eAAO,MAAM,YAAY,27BAOlB,CAAC;AAER,eAAO,MAAM,OAAO,qSAGb,CAAC"}
package/dist/icons.js ADDED
@@ -0,0 +1,67 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * SVG icons for Marzipan toolbar (TypeScript)
4
+ * Quill-style icons with inline styles
5
+ */
6
+ export const boldIcon = `<svg viewBox="0 0 18 18">
7
+ <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"></path>
8
+ <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"></path>
9
+ </svg>`;
10
+ export const italicIcon = `<svg viewBox="0 0 18 18">
11
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="13" y1="4" y2="4"></line>
12
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="5" x2="11" y1="14" y2="14"></line>
13
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="10" y1="14" y2="4"></line>
14
+ </svg>`;
15
+ export const h1Icon = `<svg viewBox="0 0 18 18">
16
+ <path fill="currentColor" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"></path>
17
+ </svg>`;
18
+ export const h2Icon = `<svg viewBox="0 0 18 18">
19
+ <path fill="currentColor" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path>
20
+ </svg>`;
21
+ export const h3Icon = `<svg viewBox="0 0 18 18">
22
+ <path fill="currentColor" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"></path>
23
+ </svg>`;
24
+ export const linkIcon = `<svg viewBox="0 0 18 18">
25
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="11" y1="7" y2="11"></line>
26
+ <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"></path>
27
+ <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"></path>
28
+ </svg>`;
29
+ export const codeIcon = `<svg viewBox="0 0 18 18">
30
+ <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="5 7 3 9 5 11"></polyline>
31
+ <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" points="13 7 15 9 13 11"></polyline>
32
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="10" x2="8" y1="5" y2="13"></line>
33
+ </svg>`;
34
+ export const bulletListIcon = `<svg viewBox="0 0 18 18">
35
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="4" y2="4"></line>
36
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="9" y2="9"></line>
37
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="6" x2="15" y1="14" y2="14"></line>
38
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="4" y2="4"></line>
39
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="9" y2="9"></line>
40
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="3" x2="3" y1="14" y2="14"></line>
41
+ </svg>`;
42
+ export const orderedListIcon = `<svg viewBox="0 0 18 18">
43
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="4" y2="4"></line>
44
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="9" y2="9"></line>
45
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="7" x2="15" y1="14" y2="14"></line>
46
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" x1="2.5" x2="4.5" y1="5.5" y2="5.5"></line>
47
+ <path fill="currentColor" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"></path>
48
+ <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"></path>
49
+ <path stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"></path>
50
+ </svg>`;
51
+ export const quoteIcon = `<svg viewBox="2 2 20 20">
52
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 10.8182L9 10.8182C8.80222 10.8182 8.60888 10.7649 8.44443 10.665C8.27998 10.5651 8.15181 10.4231 8.07612 10.257C8.00043 10.0909 7.98063 9.90808 8.01922 9.73174C8.0578 9.55539 8.15304 9.39341 8.29289 9.26627C8.43275 9.13913 8.61093 9.05255 8.80491 9.01747C8.99889 8.98239 9.19996 9.00039 9.38268 9.0692C9.56541 9.13801 9.72159 9.25453 9.83147 9.40403C9.94135 9.55353 10 9.72929 10 9.90909L10 12.1818C10 12.664 9.78929 13.1265 9.41421 13.4675C9.03914 13.8084 8.53043 14 8 14"></path>
53
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 10.8182L15 10.8182C14.8022 10.8182 14.6089 10.7649 14.4444 10.665C14.28 10.5651 14.1518 10.4231 14.0761 10.257C14.0004 10.0909 13.9806 9.90808 14.0192 9.73174C14.0578 9.55539 14.153 9.39341 14.2929 9.26627C14.4327 9.13913 14.6109 9.05255 14.8049 9.01747C14.9989 8.98239 15.2 9.00039 15.3827 9.0692C15.5654 9.13801 15.7216 9.25453 15.8315 9.40403C15.9414 9.55353 16 9.72929 16 9.90909L16 12.1818C16 12.664 15.7893 13.1265 15.4142 13.4675C15.0391 13.8084 14.5304 14 14 14"></path>
54
+ </svg>`;
55
+ export const taskListIcon = `<svg viewBox="0 0 18 18">
56
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="4" y2="4"></line>
57
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="9" y2="9"></line>
58
+ <line stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" x1="8" x2="16" y1="14" y2="14"></line>
59
+ <rect stroke="currentColor" fill="none" stroke-width="1.5" x="2" y="3" width="3" height="3" rx="0.5"></rect>
60
+ <rect stroke="currentColor" fill="none" stroke-width="1.5" x="2" y="13" width="3" height="3" rx="0.5"></rect>
61
+ <polyline stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" points="2.65 9.5 3.5 10.5 5 8.5"></polyline>
62
+ </svg>`;
63
+ export const eyeIcon = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
64
+ <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" fill="none"></path>
65
+ <circle cx="12" cy="12" r="3" fill="none"></circle>
66
+ </svg>`;
67
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;GAGG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG;;;OAGjB,CAAC;AAER,MAAM,CAAC,MAAM,UAAU,GAAG;;;;OAInB,CAAC;AAER,MAAM,CAAC,MAAM,MAAM,GAAG;;OAEf,CAAC;AAER,MAAM,CAAC,MAAM,MAAM,GAAG;;OAEf,CAAC;AAER,MAAM,CAAC,MAAM,MAAM,GAAG;;OAEf,CAAC;AAER,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;OAIjB,CAAC;AAER,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;OAIjB,CAAC;AAGR,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;OAOvB,CAAC;AAER,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;OAQxB,CAAC;AAER,MAAM,CAAC,MAAM,SAAS,GAAG;;;OAGlB,CAAC;AAER,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;OAOrB,CAAC;AAER,MAAM,CAAC,MAAM,OAAO,GAAG;;;OAGhB,CAAC"}
@@ -0,0 +1,143 @@
1
+ // Type definitions for @pinkpixel/marzipan
2
+ // Project: https://github.com/pinkpixel-dev/marzipan
3
+ // Definitions by: Pink Pixel <https://pinkpixel.dev>
4
+
5
+ // Re-export all types from main declarations
6
+ export * from './marzipan.d';
7
+
8
+ // Re-export default
9
+ export { default } from './marzipan.d';
10
+
11
+ // Action types (these should match actions/types.ts exports)
12
+ export interface FormatStyleOptions {
13
+ prefix?: string;
14
+ suffix?: string;
15
+ blockPrefix?: string;
16
+ blockSuffix?: string;
17
+ multiline?: boolean;
18
+ replaceNext?: string;
19
+ prefixSpace?: boolean;
20
+ scanFor?: string | RegExp;
21
+ surroundWithNewlines?: boolean;
22
+ orderedList?: boolean;
23
+ unorderedList?: boolean;
24
+ trimFirst?: boolean;
25
+ }
26
+
27
+ export interface ResolvedFormatStyle {
28
+ prefix: string;
29
+ suffix: string;
30
+ blockPrefix: string;
31
+ blockSuffix: string;
32
+ multiline: boolean;
33
+ replaceNext: string;
34
+ prefixSpace: boolean;
35
+ scanFor: string | RegExp | null;
36
+ surroundWithNewlines: boolean;
37
+ orderedList: boolean;
38
+ unorderedList: boolean;
39
+ trimFirst: boolean;
40
+ }
41
+
42
+ export interface TextTransformResult {
43
+ text: string;
44
+ selectionStart: number;
45
+ selectionEnd: number;
46
+ }
47
+
48
+ export type UndoMethod = 'native' | 'manual' | 'auto';
49
+
50
+ export interface LineOperationAdjustment {
51
+ start: number;
52
+ end: number;
53
+ }
54
+
55
+ export interface LineOperationOptions {
56
+ prefix?: string;
57
+ adjustSelection?: (
58
+ isRemoving: boolean,
59
+ selectionStart: number,
60
+ selectionEnd: number,
61
+ lineStart: number
62
+ ) => LineOperationAdjustment;
63
+ }
64
+
65
+ // Theme utilities
66
+ export interface Theme {
67
+ name: string;
68
+ colors: ThemeColors;
69
+ }
70
+
71
+ export interface ThemeColors {
72
+ bgPrimary?: string;
73
+ bgSecondary?: string;
74
+ text?: string;
75
+ textSecondary?: string;
76
+ h1?: string;
77
+ h2?: string;
78
+ h3?: string;
79
+ strong?: string;
80
+ em?: string;
81
+ link?: string;
82
+ code?: string;
83
+ codeBg?: string;
84
+ blockquote?: string;
85
+ hr?: string;
86
+ syntaxMarker?: string;
87
+ listMarker?: string;
88
+ cursor?: string;
89
+ selection?: string;
90
+ rawLine?: string;
91
+ toolbarBg?: string;
92
+ toolbarBorder?: string;
93
+ toolbarIcon?: string;
94
+ toolbarHover?: string;
95
+ toolbarActive?: string;
96
+ border?: string;
97
+ }
98
+
99
+ // Built-in themes
100
+ export declare const solar: Theme;
101
+ export declare const cave: Theme;
102
+ export declare const themes: {
103
+ solar: Theme;
104
+ cave: Theme;
105
+ light: Theme;
106
+ dark: Theme;
107
+ };
108
+
109
+ // Theme utility functions
110
+ export declare function getTheme(theme: string | Theme): Theme;
111
+ export declare function themeToCSSVars(colors: ThemeColors): string;
112
+ export declare function mergeTheme(baseTheme: Theme, customColors?: Partial<ThemeColors>): Theme;
113
+
114
+ // Markdown actions
115
+ export interface LinkOptions {
116
+ url?: string;
117
+ text?: string;
118
+ }
119
+
120
+ export interface MarkdownActions {
121
+ toggleBold(textarea: HTMLTextAreaElement | null): void;
122
+ toggleItalic(textarea: HTMLTextAreaElement | null): void;
123
+ toggleCode(textarea: HTMLTextAreaElement | null): void;
124
+ insertLink(textarea: HTMLTextAreaElement | null, options?: LinkOptions): void;
125
+ toggleBulletList(textarea: HTMLTextAreaElement | null): void;
126
+ toggleNumberedList(textarea: HTMLTextAreaElement | null): void;
127
+ toggleQuote(textarea: HTMLTextAreaElement | null): void;
128
+ toggleTaskList(textarea: HTMLTextAreaElement | null): void;
129
+ insertHeader(textarea: HTMLTextAreaElement | null, level?: number, toggle?: boolean): void;
130
+ toggleH1(textarea: HTMLTextAreaElement | null): void;
131
+ toggleH2(textarea: HTMLTextAreaElement | null): void;
132
+ toggleH3(textarea: HTMLTextAreaElement | null): void;
133
+ getActiveFormats(textarea: HTMLTextAreaElement): string[];
134
+ hasFormat(textarea: HTMLTextAreaElement, format: string): boolean;
135
+ expandSelection(textarea: HTMLTextAreaElement): void;
136
+ applyCustomFormat(textarea: HTMLTextAreaElement | null, format: FormatStyleOptions): void;
137
+ preserveSelection(textarea: HTMLTextAreaElement, fn: () => void): void;
138
+ setUndoMethod(method: UndoMethod): void;
139
+ setDebugMode(enabled: boolean): void;
140
+ getDebugMode(): boolean;
141
+ }
142
+
143
+ export declare const actions: MarkdownActions;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,YAAY,CAAA;AAGjC,eAAe,QAAQ,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,CAAA;AAGnB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAA;AAGpC,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAChD,YAAY,EACV,OAAO,IAAI,eAAe,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,KAAK,EACL,WAAW,EACX,KAAK,EACL,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,aAAa,EACd,MAAM,cAAc,CAAA;AAErB,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Link Tooltip - CSS Anchor Positioning with index-based anchors
3
+ * Shows a clickable tooltip when cursor is within a link
4
+ * Uses CSS anchor positioning with dynamically selected anchor
5
+ */
6
+ export declare class LinkTooltip {
7
+ [key: string]: any;
8
+ constructor(editor: any);
9
+ init(): void;
10
+ bindListeners(): void;
11
+ createTooltip(): void;
12
+ handleSelectionChange(): void;
13
+ checkCursorPosition(): void;
14
+ findLinkAtPosition(text: any, position: any): {
15
+ text: string;
16
+ url: string;
17
+ index: number;
18
+ start: number;
19
+ end: number;
20
+ } | null;
21
+ show(linkInfo: any): void;
22
+ hide(): void;
23
+ scheduleHide(): void;
24
+ cancelHide(): void;
25
+ destroy(): void;
26
+ }
27
+ //# sourceMappingURL=link-tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-tooltip.d.ts","sourceRoot":"","sources":["../src/link-tooltip.ts"],"names":[],"mappings":"AACA;;;;GAIG;AA2CH,qBAAa,WAAW;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;gBAEP,MAAM,EAAE,GAAG;IAiBvB,IAAI;IAiBJ,aAAa;IAyBb,aAAa;IA4Bb,qBAAqB;IAYrB,mBAAmB;IAiBnB,kBAAkB,CAAC,IAAI,KAAA,EAAE,QAAQ,KAAA;;;;;;;IAwBjC,IAAI,CAAC,QAAQ,KAAA;IAeb,IAAI;IAMJ,YAAY;IAKZ,UAAU;IAOV,OAAO;CAkCR"}
@@ -0,0 +1,224 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * Link Tooltip - CSS Anchor Positioning with index-based anchors
4
+ * Shows a clickable tooltip when cursor is within a link
5
+ * Uses CSS anchor positioning with dynamically selected anchor
6
+ */
7
+ let tooltipStylesInjected = false;
8
+ function ensureTooltipStyles() {
9
+ if (tooltipStylesInjected || typeof document === 'undefined')
10
+ return;
11
+ const style = document.createElement('style');
12
+ style.className = 'marzipan-link-tooltip-styles';
13
+ style.textContent = `
14
+ @supports (position-anchor: --x) and (position-area: center) {
15
+ .marzipan-link-tooltip {
16
+ position: absolute;
17
+ position-anchor: var(--target-anchor, --link-0);
18
+ position-area: block-end center;
19
+ margin-top: 8px !important;
20
+ background: #333 !important;
21
+ color: white !important;
22
+ padding: 6px 10px !important;
23
+ border-radius: 16px !important;
24
+ font-size: 12px !important;
25
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
26
+ display: none !important;
27
+ z-index: 10000 !important;
28
+ cursor: pointer !important;
29
+ box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
30
+ max-width: 300px !important;
31
+ white-space: nowrap !important;
32
+ overflow: hidden !important;
33
+ text-overflow: ellipsis !important;
34
+ position-try: most-width block-end inline-end, flip-inline, block-start center;
35
+ position-visibility: anchors-visible;
36
+ }
37
+
38
+ .marzipan-link-tooltip.visible {
39
+ display: flex !important;
40
+ }
41
+ }
42
+ `;
43
+ document.head.appendChild(style);
44
+ tooltipStylesInjected = true;
45
+ }
46
+ export class LinkTooltip {
47
+ constructor(editor) {
48
+ this.editor = editor;
49
+ this.tooltip = null;
50
+ this.currentLink = null;
51
+ this.hideTimeout = null;
52
+ this.supportsAnchor = false;
53
+ this._selectionHandler = null;
54
+ this._keyupHandler = null;
55
+ this._inputHandler = null;
56
+ this._scrollHandler = null;
57
+ this._tooltipEnterHandler = null;
58
+ this._tooltipLeaveHandler = null;
59
+ this.init();
60
+ }
61
+ init() {
62
+ if (typeof CSS === 'undefined' || typeof CSS.supports !== 'function') {
63
+ return;
64
+ }
65
+ const supportsAnchor = CSS.supports('position-anchor: --x') && CSS.supports('position-area: center');
66
+ if (!supportsAnchor) {
67
+ return;
68
+ }
69
+ ensureTooltipStyles();
70
+ this.supportsAnchor = true;
71
+ this.createTooltip();
72
+ this.bindListeners();
73
+ }
74
+ bindListeners() {
75
+ if (!this.supportsAnchor || typeof document === 'undefined' || !this.tooltip)
76
+ return;
77
+ this._selectionHandler = () => this.handleSelectionChange();
78
+ document.addEventListener('selectionchange', this._selectionHandler);
79
+ this._keyupHandler = (e) => {
80
+ if (e.key.includes('Arrow') || e.key === 'Home' || e.key === 'End') {
81
+ this.checkCursorPosition();
82
+ }
83
+ };
84
+ this.editor.textarea.addEventListener('keyup', this._keyupHandler);
85
+ this._inputHandler = () => this.hide();
86
+ this.editor.textarea.addEventListener('input', this._inputHandler);
87
+ this._scrollHandler = () => this.hide();
88
+ this.editor.textarea.addEventListener('scroll', this._scrollHandler);
89
+ this._tooltipEnterHandler = () => this.cancelHide();
90
+ this._tooltipLeaveHandler = () => this.scheduleHide();
91
+ this.tooltip.addEventListener('mouseenter', this._tooltipEnterHandler);
92
+ this.tooltip.addEventListener('mouseleave', this._tooltipLeaveHandler);
93
+ }
94
+ createTooltip() {
95
+ if (typeof document === 'undefined')
96
+ return;
97
+ this.tooltip = document.createElement('div');
98
+ this.tooltip.className = 'marzipan-link-tooltip';
99
+ this.tooltip.innerHTML = `
100
+ <span style="display: flex; align-items: center; gap: 6px;">
101
+ <svg width="12" height="12" viewBox="0 0 20 20" fill="currentColor" style="flex-shrink: 0;">
102
+ <path d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"></path>
103
+ <path d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"></path>
104
+ </svg>
105
+ <span class="marzipan-link-tooltip-url"></span>
106
+ </span>
107
+ `;
108
+ this.tooltip.addEventListener('click', (e) => {
109
+ e.preventDefault();
110
+ e.stopPropagation();
111
+ if (this.currentLink) {
112
+ window.open(this.currentLink.url, '_blank');
113
+ this.hide();
114
+ }
115
+ });
116
+ this.editor.container.appendChild(this.tooltip);
117
+ }
118
+ handleSelectionChange() {
119
+ if (typeof document === 'undefined') {
120
+ return;
121
+ }
122
+ if (document.activeElement !== this.editor.textarea) {
123
+ this.scheduleHide();
124
+ return;
125
+ }
126
+ this.checkCursorPosition();
127
+ }
128
+ checkCursorPosition() {
129
+ if (!this.tooltip)
130
+ return;
131
+ const cursorPos = this.editor.textarea.selectionStart;
132
+ const text = this.editor.textarea.value;
133
+ const linkInfo = this.findLinkAtPosition(text, cursorPos);
134
+ if (linkInfo) {
135
+ if (!this.currentLink || this.currentLink.url !== linkInfo.url || this.currentLink.index !== linkInfo.index) {
136
+ this.show(linkInfo);
137
+ }
138
+ }
139
+ else {
140
+ this.scheduleHide();
141
+ }
142
+ }
143
+ findLinkAtPosition(text, position) {
144
+ const linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
145
+ let match;
146
+ let linkIndex = 0;
147
+ while ((match = linkRegex.exec(text)) !== null) {
148
+ const start = match.index;
149
+ const end = match.index + match[0].length;
150
+ if (position >= start && position <= end) {
151
+ return {
152
+ text: match[1],
153
+ url: match[2],
154
+ index: linkIndex,
155
+ start,
156
+ end,
157
+ };
158
+ }
159
+ linkIndex++;
160
+ }
161
+ return null;
162
+ }
163
+ show(linkInfo) {
164
+ if (!this.tooltip)
165
+ return;
166
+ this.currentLink = linkInfo;
167
+ this.cancelHide();
168
+ const urlSpan = this.tooltip.querySelector('.marzipan-link-tooltip-url');
169
+ if (urlSpan) {
170
+ urlSpan.textContent = linkInfo.url;
171
+ }
172
+ this.tooltip.style.setProperty('--target-anchor', `--link-${linkInfo.index}`);
173
+ this.tooltip.classList.add('visible');
174
+ }
175
+ hide() {
176
+ if (!this.tooltip)
177
+ return;
178
+ this.tooltip.classList.remove('visible');
179
+ this.currentLink = null;
180
+ }
181
+ scheduleHide() {
182
+ this.cancelHide();
183
+ this.hideTimeout = setTimeout(() => this.hide(), 300);
184
+ }
185
+ cancelHide() {
186
+ if (this.hideTimeout) {
187
+ clearTimeout(this.hideTimeout);
188
+ this.hideTimeout = null;
189
+ }
190
+ }
191
+ destroy() {
192
+ this.cancelHide();
193
+ if (this._selectionHandler && typeof document !== 'undefined') {
194
+ document.removeEventListener('selectionchange', this._selectionHandler);
195
+ this._selectionHandler = null;
196
+ }
197
+ if (this._keyupHandler) {
198
+ this.editor.textarea.removeEventListener('keyup', this._keyupHandler);
199
+ this._keyupHandler = null;
200
+ }
201
+ if (this._inputHandler) {
202
+ this.editor.textarea.removeEventListener('input', this._inputHandler);
203
+ this._inputHandler = null;
204
+ }
205
+ if (this._scrollHandler) {
206
+ this.editor.textarea.removeEventListener('scroll', this._scrollHandler);
207
+ this._scrollHandler = null;
208
+ }
209
+ if (this._tooltipEnterHandler) {
210
+ this.tooltip?.removeEventListener('mouseenter', this._tooltipEnterHandler);
211
+ this._tooltipEnterHandler = null;
212
+ }
213
+ if (this._tooltipLeaveHandler) {
214
+ this.tooltip?.removeEventListener('mouseleave', this._tooltipLeaveHandler);
215
+ this._tooltipLeaveHandler = null;
216
+ }
217
+ if (this.tooltip && this.tooltip.parentNode) {
218
+ this.tooltip.parentNode.removeChild(this.tooltip);
219
+ }
220
+ this.tooltip = null;
221
+ this.currentLink = null;
222
+ }
223
+ }
224
+ //# sourceMappingURL=link-tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-tooltip.js","sourceRoot":"","sources":["../src/link-tooltip.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;GAIG;AAEH,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAElC,SAAS,mBAAmB;IAC1B,IAAI,qBAAqB,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAErE,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,SAAS,GAAG,8BAA8B,CAAC;IACjD,KAAK,CAAC,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BnB,CAAC;IACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,qBAAqB,GAAG,IAAI,CAAC;AAC/B,CAAC;AAED,MAAM,OAAO,WAAW;IAGtB,YAAY,MAAW;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAE5B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC;QACjC,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