@vkzstudio/muza-ui 1.0.9 → 1.0.10

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 (134) hide show
  1. package/dist/components/Button/buttonVariants.d.ts.map +1 -1
  2. package/dist/components/Button/buttonVariants.js +0 -1
  3. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
  4. package/dist/components/Icons/CustomIcons.d.ts +1 -0
  5. package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
  6. package/dist/components/Icons/CustomIcons.js +38 -27
  7. package/dist/components/TextEditor/EditorToolbar.d.ts +18 -0
  8. package/dist/components/TextEditor/EditorToolbar.d.ts.map +1 -0
  9. package/dist/components/TextEditor/EditorToolbar.js +175 -0
  10. package/dist/components/TextEditor/LinkBubbleMenu.d.ts +52 -0
  11. package/dist/components/TextEditor/LinkBubbleMenu.d.ts.map +1 -0
  12. package/dist/components/TextEditor/LinkBubbleMenu.js +97 -0
  13. package/dist/components/TextEditor/TextEditor.d.ts +134 -0
  14. package/dist/components/TextEditor/TextEditor.d.ts.map +1 -0
  15. package/dist/components/TextEditor/TextEditor.js +240 -0
  16. package/dist/components/TextEditor/TextEditor.stories.d.ts +51 -0
  17. package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -0
  18. package/dist/components/TextEditor/ToolbarButton.d.ts +38 -0
  19. package/dist/components/TextEditor/ToolbarButton.d.ts.map +1 -0
  20. package/dist/components/TextEditor/ToolbarButton.js +68 -0
  21. package/dist/components/TextEditor/ToolbarSeparator.d.ts +22 -0
  22. package/dist/components/TextEditor/ToolbarSeparator.d.ts.map +1 -0
  23. package/dist/components/TextEditor/ToolbarSeparator.js +23 -0
  24. package/dist/components/TextEditor/index.d.ts +4 -0
  25. package/dist/components/TextEditor/index.d.ts.map +1 -0
  26. package/dist/components/TextEditor/useLinkEditor.d.ts +37 -0
  27. package/dist/components/TextEditor/useLinkEditor.d.ts.map +1 -0
  28. package/dist/components/TextEditor/useLinkEditor.js +32 -0
  29. package/dist/components/index.d.ts +1 -0
  30. package/dist/components/index.d.ts.map +1 -1
  31. package/dist/index.js +140 -132
  32. package/dist/muza-ui.css +1 -1
  33. package/dist/node_modules/@popperjs/core/lib/createPopper.js +122 -0
  34. package/dist/node_modules/@popperjs/core/lib/dom-utils/contains.js +18 -0
  35. package/dist/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +23 -0
  36. package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +37 -0
  37. package/dist/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +32 -0
  38. package/dist/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +7 -0
  39. package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +10 -0
  40. package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +17 -0
  41. package/dist/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +9 -0
  42. package/dist/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +13 -0
  43. package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +6 -0
  44. package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +10 -0
  45. package/dist/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +35 -0
  46. package/dist/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +18 -0
  47. package/dist/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +10 -0
  48. package/dist/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +21 -0
  49. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindow.js +12 -0
  50. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +11 -0
  51. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +9 -0
  52. package/dist/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +20 -0
  53. package/dist/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +7 -0
  54. package/dist/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +8 -0
  55. package/dist/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +7 -0
  56. package/dist/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +16 -0
  57. package/dist/node_modules/@popperjs/core/lib/enums.js +31 -0
  58. package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +47 -0
  59. package/dist/node_modules/@popperjs/core/lib/modifiers/arrow.js +37 -0
  60. package/dist/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +99 -0
  61. package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +26 -0
  62. package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js +74 -0
  63. package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js +44 -0
  64. package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js +31 -0
  65. package/dist/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +19 -0
  66. package/dist/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +54 -0
  67. package/dist/node_modules/@popperjs/core/lib/popper.js +27 -0
  68. package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +27 -0
  69. package/dist/node_modules/@popperjs/core/lib/utils/computeOffsets.js +54 -0
  70. package/dist/node_modules/@popperjs/core/lib/utils/debounce.js +13 -0
  71. package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js +33 -0
  72. package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +8 -0
  73. package/dist/node_modules/@popperjs/core/lib/utils/getAltAxis.js +6 -0
  74. package/dist/node_modules/@popperjs/core/lib/utils/getBasePlacement.js +6 -0
  75. package/dist/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +11 -0
  76. package/dist/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +6 -0
  77. package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +14 -0
  78. package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +12 -0
  79. package/dist/node_modules/@popperjs/core/lib/utils/getVariation.js +6 -0
  80. package/dist/node_modules/@popperjs/core/lib/utils/math.js +6 -0
  81. package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js +15 -0
  82. package/dist/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +7 -0
  83. package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js +31 -0
  84. package/dist/node_modules/@popperjs/core/lib/utils/rectToClientRect.js +11 -0
  85. package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js +9 -0
  86. package/dist/node_modules/@popperjs/core/lib/utils/within.js +12 -0
  87. package/dist/node_modules/@tiptap/core/dist/index.js +2857 -0
  88. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +45 -0
  89. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +76 -0
  90. package/dist/node_modules/@tiptap/extension-bubble-menu/dist/index.js +129 -0
  91. package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js +55 -0
  92. package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
  93. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +136 -0
  94. package/dist/node_modules/@tiptap/extension-document/dist/index.js +10 -0
  95. package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js +21 -0
  96. package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js +25 -0
  97. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +56 -0
  98. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +55 -0
  99. package/dist/node_modules/@tiptap/extension-history/dist/index.js +36 -0
  100. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +59 -0
  101. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +75 -0
  102. package/dist/node_modules/@tiptap/extension-link/dist/index.js +272 -0
  103. package/dist/node_modules/@tiptap/extension-list-item/dist/index.js +34 -0
  104. package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js +73 -0
  105. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +34 -0
  106. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +53 -0
  107. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +64 -0
  108. package/dist/node_modules/@tiptap/extension-text/dist/index.js +9 -0
  109. package/dist/node_modules/@tiptap/react/dist/index.js +709 -0
  110. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +30 -0
  111. package/dist/node_modules/linkifyjs/dist/linkify.js +707 -0
  112. package/dist/node_modules/orderedmap/dist/index.js +103 -0
  113. package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
  114. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
  115. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
  116. package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
  117. package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
  118. package/dist/node_modules/prosemirror-model/dist/index.js +2733 -0
  119. package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
  120. package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
  121. package/dist/node_modules/prosemirror-transform/dist/index.js +1520 -0
  122. package/dist/node_modules/prosemirror-view/dist/index.js +3794 -0
  123. package/dist/node_modules/rope-sequence/dist/index.js +100 -0
  124. package/dist/node_modules/tippy.js/dist/tippy.esm.js +813 -0
  125. package/dist/node_modules/w3c-keyname/index.js +93 -0
  126. package/dist/translations/locales/cs.d.ts.map +1 -1
  127. package/dist/translations/locales/cs.js +18 -0
  128. package/dist/translations/locales/en.d.ts.map +1 -1
  129. package/dist/translations/locales/en.js +18 -0
  130. package/dist/translations/locales/sk.d.ts.map +1 -1
  131. package/dist/translations/locales/sk.js +18 -0
  132. package/dist/translations/types.d.ts +22 -0
  133. package/dist/translations/types.d.ts.map +1 -1
  134. package/package.json +17 -1
@@ -1 +1 @@
1
- {"version":3,"file":"buttonVariants.d.ts","sourceRoot":"","sources":["../../../src/components/Button/buttonVariants.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;CA+NhC,CAAA;AAED,eAAO,MAAM,cAAc;;;;;;;;8EA4J1B,CAAA"}
1
+ {"version":3,"file":"buttonVariants.d.ts","sourceRoot":"","sources":["../../../src/components/Button/buttonVariants.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;CA8NhC,CAAA;AAED,eAAO,MAAM,cAAc;;;;;;;;8EA4J1B,CAAA"}
@@ -23,7 +23,6 @@ const e = {
23
23
  "data-[ghost=true]:hover:bg-comp-button-primary-ghost-bg-hover",
24
24
  "data-[ghost=true]:hover:text-comp-button-primary-ghost-text-hover",
25
25
  "data-[ghost=true]:hover:border-comp-button-primary-ghost-stroke-hover",
26
- "data-[ghost=true]:focus-visible-default",
27
26
  "data-[ghost=true]:active:bg-comp-button-primary-ghost-bg-focused",
28
27
  "data-[ghost=true]:active:text-comp-button-primary-ghost-text-focused",
29
28
  "data-[ghost=true]:focus-visible:border-comp-button-primary-ghost-stroke-focused",
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AA4B3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmF2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAuB3B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAwB5B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA+BxB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAiC1B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA2C/B,CAAA;AAED,eAAO,MAAM,kCAAkC,EAAE,KA+EhD,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KA4B5B,CAAA"}
1
+ {"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AA4B3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmF2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAuB3B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAwB5B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAgCxB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAiC1B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA2C/B,CAAA;AAED,eAAO,MAAM,kCAAkC,EAAE,KA+EhD,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KA4B5B,CAAA"}
@@ -37,6 +37,7 @@ export declare const Fingerprint: Icon;
37
37
  export declare const Coins: Icon;
38
38
  export declare const Coins2Outline: Icon;
39
39
  export declare const Coins3: Icon;
40
+ export declare const ColorSquare: Icon;
40
41
  export declare const EmptyCircle: Icon;
41
42
  export declare const MenuDotsVertical: Icon;
42
43
  //# sourceMappingURL=CustomIcons.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomIcons.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/CustomIcons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAA;AAI7D,eAAO,MAAM,SAAS,EAAE,IAiBvB,CAAA;AAGD,eAAO,MAAM,OAAO,EAAE,IASrB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IAexB,CAAA;AAGD,eAAO,MAAM,OAAO,EAAE,IASrB,CAAA;AAGD,eAAO,MAAM,QAAQ,EAAE,IAStB,CAAA;AAGD,eAAO,MAAM,aAAa,EAAE,IAa3B,CAAA;AAGD,eAAO,MAAM,KAAK,EAAE,IAUnB,CAAA;AAGD,eAAO,MAAM,cAAc,EAAE,IAS5B,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,IAS9B,CAAA;AAGD,eAAO,MAAM,GAAG,EAAE,IAOhB,CAAA;AAGF,eAAO,MAAM,GAAG,EAAE,IAOhB,CAAA;AAGF,eAAO,MAAM,OAAO,EAAE,IAWrB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IAWxB,CAAA;AAGD,eAAO,MAAM,eAAe,EAAE,IAW7B,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IA2BpB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IAgCpB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IAqCpB,CAAA;AAGD,eAAO,MAAM,OAAO,EAAE,IASrB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IASxB,CAAA;AAGD,eAAO,MAAM,YAAY,EAAE,IAS1B,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,IASjC,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IASxB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IASxB,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,IAS9B,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAID,eAAO,MAAM,OAAO,EAAE,IASrB,CAAA;AAKD,eAAO,MAAM,gBAAgB,EAAE,IAW9B,CAAA;AAGD,eAAO,MAAM,YAAY,EAAE,IAiB1B,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAGD,eAAO,MAAM,IAAI,EAAE,IA2BjB,CAAA;AAGF,eAAO,MAAM,IAAI,EAAE,IAOjB,CAAA;AAGF,eAAO,MAAM,WAAW,EAAE,IAmCzB,CAAA;AAGD,eAAO,MAAM,KAAK,EAAE,IASnB,CAAA;AAGD,eAAO,MAAM,aAAa,EAAE,IAiB3B,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IAapB,CAAA;AAGD,eAAO,MAAM,WAAW,EAAE,IAWzB,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,IAiB9B,CAAA"}
1
+ {"version":3,"file":"CustomIcons.d.ts","sourceRoot":"","sources":["../../../src/components/Icons/CustomIcons.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAA;AAI7D,eAAO,MAAM,SAAS,EAAE,IAiBvB,CAAA;AAGD,eAAO,MAAM,OAAO,EAAE,IASrB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IAexB,CAAA;AAGD,eAAO,MAAM,OAAO,EAAE,IASrB,CAAA;AAGD,eAAO,MAAM,QAAQ,EAAE,IAStB,CAAA;AAGD,eAAO,MAAM,aAAa,EAAE,IAa3B,CAAA;AAGD,eAAO,MAAM,KAAK,EAAE,IAUnB,CAAA;AAGD,eAAO,MAAM,cAAc,EAAE,IAS5B,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,IAS9B,CAAA;AAGD,eAAO,MAAM,GAAG,EAAE,IAOhB,CAAA;AAGF,eAAO,MAAM,GAAG,EAAE,IAOhB,CAAA;AAGF,eAAO,MAAM,OAAO,EAAE,IAWrB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IAWxB,CAAA;AAGD,eAAO,MAAM,eAAe,EAAE,IAW7B,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IA2BpB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IAgCpB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IAqCpB,CAAA;AAGD,eAAO,MAAM,OAAO,EAAE,IASrB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IASxB,CAAA;AAGD,eAAO,MAAM,YAAY,EAAE,IAS1B,CAAA;AAGD,eAAO,MAAM,mBAAmB,EAAE,IASjC,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IASxB,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE,IASxB,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,IAS9B,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAID,eAAO,MAAM,OAAO,EAAE,IASrB,CAAA;AAKD,eAAO,MAAM,gBAAgB,EAAE,IAW9B,CAAA;AAGD,eAAO,MAAM,YAAY,EAAE,IAiB1B,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IASpB,CAAA;AAGD,eAAO,MAAM,IAAI,EAAE,IA2BjB,CAAA;AAGF,eAAO,MAAM,IAAI,EAAE,IAOjB,CAAA;AAGF,eAAO,MAAM,WAAW,EAAE,IAmCzB,CAAA;AAGD,eAAO,MAAM,KAAK,EAAE,IASnB,CAAA;AAGD,eAAO,MAAM,aAAa,EAAE,IAiB3B,CAAA;AAGD,eAAO,MAAM,MAAM,EAAE,IAapB,CAAA;AAGD,eAAO,MAAM,WAAW,EAAE,IASzB,CAAA;AAGD,eAAO,MAAM,WAAW,EAAE,IAWzB,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,IAiB9B,CAAA"}
@@ -1,8 +1,8 @@
1
- import { jsxs as i, jsx as C } from "react/jsx-runtime";
1
+ import { jsxs as o, jsx as C } from "react/jsx-runtime";
2
2
  import { forwardRef as r } from "react";
3
3
  import { IconBase as e } from "@solar-icons/react-perf";
4
- const o = r(
5
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
4
+ const i = r(
5
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
6
6
  /* @__PURE__ */ C(
7
7
  "path",
8
8
  {
@@ -26,7 +26,7 @@ const o = r(
26
26
  )
27
27
  ] })
28
28
  );
29
- o.displayName = "EyeClosed";
29
+ i.displayName = "EyeClosed";
30
30
  const t = r(
31
31
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
32
32
  "path",
@@ -38,7 +38,7 @@ const t = r(
38
38
  );
39
39
  t.displayName = "Barcode";
40
40
  const H = r(
41
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
41
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
42
42
  /* @__PURE__ */ C(
43
43
  "path",
44
44
  {
@@ -79,7 +79,7 @@ const n = r(
79
79
  );
80
80
  n.displayName = "MuzaIcon";
81
81
  const V = r(
82
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
82
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
83
83
  /* @__PURE__ */ C(
84
84
  "path",
85
85
  {
@@ -181,8 +181,8 @@ const u = r(
181
181
  );
182
182
  u.displayName = "MagnifyingGlass";
183
183
  const f = r(
184
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, viewBox: "0 0 20 20", children: [
185
- /* @__PURE__ */ i("g", { clipPath: "url(#clip0_6290_399)", children: [
184
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, viewBox: "0 0 20 20", children: [
185
+ /* @__PURE__ */ o("g", { clipPath: "url(#clip0_6290_399)", children: [
186
186
  /* @__PURE__ */ C(
187
187
  "path",
188
188
  {
@@ -216,8 +216,8 @@ const f = r(
216
216
  );
217
217
  f.displayName = "FlagCz";
218
218
  const m = r(
219
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, viewBox: "0 0 20 20", children: [
220
- /* @__PURE__ */ i("g", { clipPath: "url(#clip0_6290_408)", children: [
219
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, viewBox: "0 0 20 20", children: [
220
+ /* @__PURE__ */ o("g", { clipPath: "url(#clip0_6290_408)", children: [
221
221
  /* @__PURE__ */ C("path", { d: "M1.00015 4H19.0002V15.9754H1.00015V4Z", fill: "#EFEFEF" }),
222
222
  /* @__PURE__ */ C(
223
223
  "path",
@@ -259,8 +259,8 @@ const m = r(
259
259
  );
260
260
  m.displayName = "FlagEn";
261
261
  const y = r(
262
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, viewBox: "0 0 20 20", children: [
263
- /* @__PURE__ */ i("g", { clipPath: "url(#clip0_6290_420)", children: [
262
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, viewBox: "0 0 20 20", children: [
263
+ /* @__PURE__ */ o("g", { clipPath: "url(#clip0_6290_420)", children: [
264
264
  /* @__PURE__ */ C(
265
265
  "path",
266
266
  {
@@ -399,7 +399,7 @@ const B = r(
399
399
  ) })
400
400
  );
401
401
  B.displayName = "NumberList";
402
- const w = r(
402
+ const S = r(
403
403
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
404
404
  "path",
405
405
  {
@@ -408,8 +408,8 @@ const w = r(
408
408
  }
409
409
  ) })
410
410
  );
411
- w.displayName = "RemoveTextFormat";
412
- const S = r(
411
+ S.displayName = "RemoveTextFormat";
412
+ const w = r(
413
413
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
414
414
  "path",
415
415
  {
@@ -418,7 +418,7 @@ const S = r(
418
418
  }
419
419
  ) })
420
420
  );
421
- S.displayName = "Colour";
421
+ w.displayName = "Colour";
422
422
  const _ = r(
423
423
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
424
424
  "path",
@@ -442,7 +442,7 @@ const D = r(
442
442
  );
443
443
  D.displayName = "DoubleArrowRight";
444
444
  const P = r(
445
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
445
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
446
446
  /* @__PURE__ */ C(
447
447
  "path",
448
448
  {
@@ -477,7 +477,7 @@ const T = r(
477
477
  ) })
478
478
  );
479
479
  T.displayName = "XClose";
480
- const z = r((L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
480
+ const z = r((L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
481
481
  /* @__PURE__ */ C(
482
482
  "path",
483
483
  {
@@ -531,7 +531,7 @@ const A = r((L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE_
531
531
  ) }));
532
532
  A.displayName = "Plus";
533
533
  const I = r(
534
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
534
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
535
535
  /* @__PURE__ */ C(
536
536
  "path",
537
537
  {
@@ -591,7 +591,7 @@ const W = r(
591
591
  );
592
592
  W.displayName = "Coins";
593
593
  const b = r(
594
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
594
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
595
595
  /* @__PURE__ */ C(
596
596
  "path",
597
597
  {
@@ -614,7 +614,7 @@ const b = r(
614
614
  );
615
615
  b.displayName = "Coins2Outline";
616
616
  const K = r(
617
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
617
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
618
618
  /* @__PURE__ */ C(
619
619
  "path",
620
620
  {
@@ -633,6 +633,16 @@ const K = r(
633
633
  );
634
634
  K.displayName = "Coins3";
635
635
  const j = r(
636
+ (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
637
+ "path",
638
+ {
639
+ d: "M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z",
640
+ fill: "currentColor"
641
+ }
642
+ ) })
643
+ );
644
+ j.displayName = "ColorSquare";
645
+ const q = r(
636
646
  (L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
637
647
  "path",
638
648
  {
@@ -643,9 +653,9 @@ const j = r(
643
653
  }
644
654
  ) })
645
655
  );
646
- j.displayName = "EmptyCircle";
656
+ q.displayName = "EmptyCircle";
647
657
  const G = r(
648
- (L, l) => /* @__PURE__ */ i(e, { ref: l, ...L, children: [
658
+ (L, l) => /* @__PURE__ */ o(e, { ref: l, ...L, children: [
649
659
  /* @__PURE__ */ C(
650
660
  "path",
651
661
  {
@@ -681,16 +691,17 @@ export {
681
691
  H as Coins2Bold,
682
692
  b as Coins2Outline,
683
693
  K as Coins3,
684
- S as Colour,
694
+ j as ColorSquare,
695
+ w as Colour,
685
696
  d as Cutlery,
686
697
  D as DoubleArrowRight,
687
698
  Z as EUR,
688
699
  k as EditorBold,
689
700
  v as EditorItalic,
690
701
  g as EditorStrikethrough,
691
- j as EmptyCircle,
702
+ q as EmptyCircle,
692
703
  P as ExternalLink,
693
- o as EyeClosed,
704
+ i as EyeClosed,
694
705
  I as Fingerprint,
695
706
  f as FlagCz,
696
707
  m as FlagEn,
@@ -702,7 +713,7 @@ export {
702
713
  n as MuzaIcon,
703
714
  B as NumberList,
704
715
  A as Plus,
705
- w as RemoveTextFormat,
716
+ S as RemoveTextFormat,
706
717
  N as Reorder,
707
718
  a as SKMap,
708
719
  z as Scan,
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { Editor } from '@tiptap/react';
3
+ import { TextEditorTranslations } from '../../translations/types';
4
+ import { TextEditorToolbarConfig } from './TextEditor';
5
+ export interface EditorToolbarProps {
6
+ editor: Editor | null;
7
+ toolbarConfig: Required<TextEditorToolbarConfig>;
8
+ disabled: boolean;
9
+ translations: TextEditorTranslations;
10
+ onLinkClick: () => void;
11
+ toolbarExtra?: ReactNode;
12
+ }
13
+ /**
14
+ * Internal toolbar component for TextEditor.
15
+ * Renders toolbar buttons based on the provided configuration.
16
+ */
17
+ export declare const EditorToolbar: ({ editor, toolbarConfig, disabled, translations: t, onLinkClick, toolbarExtra, }: EditorToolbarProps) => import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=EditorToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/EditorToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAgBlE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAI3D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,aAAa,EAAE,QAAQ,CAAC,uBAAuB,CAAC,CAAA;IAChD,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,sBAAsB,CAAA;IACpC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,YAAY,CAAC,EAAE,SAAS,CAAA;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,kFAO3B,kBAAkB,4CAoLpB,CAAA"}
@@ -0,0 +1,175 @@
1
+ import { jsxs as u, Fragment as m, jsx as n } from "react/jsx-runtime";
2
+ import { ToolbarButton as h } from "./ToolbarButton.js";
3
+ import { ToolbarSeparator as e } from "./ToolbarSeparator.js";
4
+ import { Flex as v } from "../Flex/Flex.js";
5
+ import { TextH1 as B, TextH2 as L, TextH3 as A, BulletList as T, NumberList as i } from "../Icons/CustomIcons.js";
6
+ import { UndoLeftBold as H, UndoRightBold as y, TextBoldBold as F, TextItalicBold as w, TextCrossBold as I, LinkRoundBold as N, EraserBold as S } from "@solar-icons/react-perf";
7
+ const O = ({
8
+ editor: l,
9
+ toolbarConfig: c,
10
+ disabled: a,
11
+ translations: s,
12
+ onLinkClick: x,
13
+ toolbarExtra: p
14
+ }) => {
15
+ const g = (k, f) => typeof k == "boolean" ? k : k.includes(f);
16
+ return /* @__PURE__ */ u(
17
+ v,
18
+ {
19
+ wrap: "wrap",
20
+ align: "center",
21
+ gap: "md",
22
+ padding: { px: "2xl", py: "md" },
23
+ className: "border-b border-comp-texteditor-stroke-def",
24
+ children: [
25
+ c.history !== !1 && /* @__PURE__ */ u(m, { children: [
26
+ /* @__PURE__ */ u(v, { align: "center", gap: "3xs", children: [
27
+ g(c.history, "undo") && /* @__PURE__ */ n(
28
+ h,
29
+ {
30
+ icon: /* @__PURE__ */ n(H, {}),
31
+ onClick: () => l == null ? void 0 : l.chain().focus().undo().run(),
32
+ disabled: a || !(l != null && l.can().undo()),
33
+ label: s.undo
34
+ }
35
+ ),
36
+ g(c.history, "redo") && /* @__PURE__ */ n(
37
+ h,
38
+ {
39
+ icon: /* @__PURE__ */ n(y, {}),
40
+ onClick: () => l == null ? void 0 : l.chain().focus().redo().run(),
41
+ disabled: a || !(l != null && l.can().redo()),
42
+ label: s.redo
43
+ }
44
+ )
45
+ ] }),
46
+ /* @__PURE__ */ n(e, {})
47
+ ] }),
48
+ c.headings !== !1 && /* @__PURE__ */ u(m, { children: [
49
+ /* @__PURE__ */ u(v, { align: "center", gap: "3xs", children: [
50
+ g(c.headings, 1) && /* @__PURE__ */ n(
51
+ h,
52
+ {
53
+ icon: /* @__PURE__ */ n(B, {}),
54
+ onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 1 }).run(),
55
+ active: l == null ? void 0 : l.isActive("heading", { level: 1 }),
56
+ disabled: a,
57
+ label: s.heading1
58
+ }
59
+ ),
60
+ g(c.headings, 2) && /* @__PURE__ */ n(
61
+ h,
62
+ {
63
+ icon: /* @__PURE__ */ n(L, {}),
64
+ onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 2 }).run(),
65
+ active: l == null ? void 0 : l.isActive("heading", { level: 2 }),
66
+ disabled: a,
67
+ label: s.heading2
68
+ }
69
+ ),
70
+ g(c.headings, 3) && /* @__PURE__ */ n(
71
+ h,
72
+ {
73
+ icon: /* @__PURE__ */ n(A, {}),
74
+ onClick: () => l == null ? void 0 : l.chain().focus().toggleHeading({ level: 3 }).run(),
75
+ active: l == null ? void 0 : l.isActive("heading", { level: 3 }),
76
+ disabled: a,
77
+ label: s.heading3
78
+ }
79
+ )
80
+ ] }),
81
+ /* @__PURE__ */ n(e, {})
82
+ ] }),
83
+ c.formatting !== !1 && /* @__PURE__ */ u(m, { children: [
84
+ /* @__PURE__ */ u(v, { align: "center", gap: "3xs", children: [
85
+ g(c.formatting, "bold") && /* @__PURE__ */ n(
86
+ h,
87
+ {
88
+ icon: /* @__PURE__ */ n(F, {}),
89
+ onClick: () => l == null ? void 0 : l.chain().focus().toggleBold().run(),
90
+ active: l == null ? void 0 : l.isActive("bold"),
91
+ disabled: a,
92
+ label: s.bold
93
+ }
94
+ ),
95
+ g(c.formatting, "italic") && /* @__PURE__ */ n(
96
+ h,
97
+ {
98
+ icon: /* @__PURE__ */ n(w, {}),
99
+ onClick: () => l == null ? void 0 : l.chain().focus().toggleItalic().run(),
100
+ active: l == null ? void 0 : l.isActive("italic"),
101
+ disabled: a,
102
+ label: s.italic
103
+ }
104
+ ),
105
+ g(c.formatting, "strikethrough") && /* @__PURE__ */ n(
106
+ h,
107
+ {
108
+ icon: /* @__PURE__ */ n(I, {}),
109
+ onClick: () => l == null ? void 0 : l.chain().focus().toggleStrike().run(),
110
+ active: l == null ? void 0 : l.isActive("strike"),
111
+ disabled: a,
112
+ label: s.strikethrough
113
+ }
114
+ )
115
+ ] }),
116
+ /* @__PURE__ */ n(e, {})
117
+ ] }),
118
+ c.lists !== !1 && /* @__PURE__ */ u(m, { children: [
119
+ /* @__PURE__ */ u(v, { align: "center", gap: "3xs", children: [
120
+ g(c.lists, "bullet") && /* @__PURE__ */ n(
121
+ h,
122
+ {
123
+ icon: /* @__PURE__ */ n(T, {}),
124
+ onClick: () => l == null ? void 0 : l.chain().focus().toggleBulletList().run(),
125
+ active: l == null ? void 0 : l.isActive("bulletList"),
126
+ disabled: a,
127
+ label: s.bulletList
128
+ }
129
+ ),
130
+ g(c.lists, "ordered") && /* @__PURE__ */ n(
131
+ h,
132
+ {
133
+ icon: /* @__PURE__ */ n(i, {}),
134
+ onClick: () => l == null ? void 0 : l.chain().focus().toggleOrderedList().run(),
135
+ active: l == null ? void 0 : l.isActive("orderedList"),
136
+ disabled: a,
137
+ label: s.orderedList
138
+ }
139
+ )
140
+ ] }),
141
+ /* @__PURE__ */ n(e, {})
142
+ ] }),
143
+ c.link && /* @__PURE__ */ u(m, { children: [
144
+ /* @__PURE__ */ n(
145
+ h,
146
+ {
147
+ icon: /* @__PURE__ */ n(N, {}),
148
+ onClick: x,
149
+ active: l == null ? void 0 : l.isActive("link"),
150
+ disabled: a,
151
+ label: s.insertLink
152
+ }
153
+ ),
154
+ /* @__PURE__ */ n(e, {})
155
+ ] }),
156
+ c.clearFormatting && /* @__PURE__ */ u(m, { children: [
157
+ /* @__PURE__ */ n(
158
+ h,
159
+ {
160
+ icon: /* @__PURE__ */ n(S, {}),
161
+ onClick: () => l == null ? void 0 : l.chain().focus().unsetAllMarks().clearNodes().run(),
162
+ disabled: a,
163
+ label: s.clearFormatting
164
+ }
165
+ ),
166
+ p && /* @__PURE__ */ n(e, {})
167
+ ] }),
168
+ p
169
+ ]
170
+ }
171
+ );
172
+ };
173
+ export {
174
+ O as EditorToolbar
175
+ };
@@ -0,0 +1,52 @@
1
+ import { Editor } from '@tiptap/react';
2
+ /**
3
+ * Translations for the LinkBubbleMenu component.
4
+ * @internal
5
+ */
6
+ export interface LinkBubbleMenuTranslations {
7
+ /** Text for the save button */
8
+ saveButton: string;
9
+ /** Text for the cancel button */
10
+ cancelButton: string;
11
+ /** Aria label for the edit button */
12
+ editButton: string;
13
+ /** Aria label for the remove button */
14
+ removeButton: string;
15
+ }
16
+ /**
17
+ * Props for the LinkBubbleMenu component.
18
+ * @internal
19
+ */
20
+ export interface LinkBubbleMenuProps {
21
+ /** The TipTap editor instance */
22
+ editor: Editor;
23
+ /** Current URL value in the input */
24
+ linkUrl: string;
25
+ /** Whether the edit input is visible */
26
+ isEditingLink: boolean;
27
+ /** Fires when the URL input value changes */
28
+ onUrlChange: (url: string) => void;
29
+ /** Fires when the edit button is clicked */
30
+ onEdit: () => void;
31
+ /** Fires when the save button is clicked or Enter is pressed */
32
+ onSave: () => void;
33
+ /** Fires when the remove button is clicked */
34
+ onRemove: () => void;
35
+ /** Fires when the cancel button is clicked or Escape is pressed */
36
+ onCancel: () => void;
37
+ /** Translation strings */
38
+ translations: LinkBubbleMenuTranslations;
39
+ }
40
+ /**
41
+ * Bubble menu for editing links in the TextEditor.
42
+ *
43
+ * Shows when a link is selected, displaying either:
44
+ * - View mode: Link URL with edit/remove buttons
45
+ * - Edit mode: Input field with save/cancel buttons
46
+ *
47
+ * Supports keyboard shortcuts: Enter to save, Escape to cancel.
48
+ *
49
+ * @internal
50
+ */
51
+ export declare const LinkBubbleMenu: ({ editor, linkUrl, isEditingLink, onUrlChange, onEdit, onSave, onRemove, onCancel, translations, }: LinkBubbleMenuProps) => import("react/jsx-runtime").JSX.Element;
52
+ //# sourceMappingURL=LinkBubbleMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkBubbleMenu.d.ts","sourceRoot":"","sources":["../../../src/components/TextEditor/LinkBubbleMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,eAAe,CAAA;AAKvD;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,iCAAiC;IACjC,YAAY,EAAE,MAAM,CAAA;IACpB,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,aAAa,EAAE,OAAO,CAAA;IACtB,6CAA6C;IAC7C,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,4CAA4C;IAC5C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,gEAAgE;IAChE,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,0BAA0B;IAC1B,YAAY,EAAE,0BAA0B,CAAA;CACzC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,GAAI,oGAU5B,mBAAmB,4CAmFrB,CAAA"}
@@ -0,0 +1,97 @@
1
+ import { jsx as e, jsxs as n, Fragment as f } from "react/jsx-runtime";
2
+ import { BubbleMenu as b } from "../../node_modules/@tiptap/react/dist/index.js";
3
+ import { Flex as a } from "../Flex/Flex.js";
4
+ import { Button as s } from "../Button/Button.js";
5
+ import { Pen2Bold as h, TrashBinTrashBold as x } from "@solar-icons/react-perf";
6
+ const N = ({
7
+ editor: o,
8
+ linkUrl: c,
9
+ isEditingLink: u,
10
+ onUrlChange: p,
11
+ onEdit: d,
12
+ onSave: l,
13
+ onRemove: m,
14
+ onCancel: i,
15
+ translations: r
16
+ }) => /* @__PURE__ */ e(
17
+ b,
18
+ {
19
+ editor: o,
20
+ tippyOptions: {
21
+ duration: 150,
22
+ placement: "top",
23
+ popperOptions: {
24
+ modifiers: [
25
+ {
26
+ name: "flip",
27
+ options: {
28
+ fallbackPlacements: ["top"]
29
+ }
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ shouldShow: ({ editor: t }) => t.isActive("link"),
35
+ children: /* @__PURE__ */ e(
36
+ a,
37
+ {
38
+ direction: "column",
39
+ className: "gap-2 rounded-xl bg-surface-base-secondary p-3 shadow-lg",
40
+ children: u ? /* @__PURE__ */ n(f, { children: [
41
+ /* @__PURE__ */ e(
42
+ "input",
43
+ {
44
+ type: "text",
45
+ value: c,
46
+ onChange: (t) => p(t.target.value),
47
+ onKeyDown: (t) => {
48
+ t.key === "Enter" && (t.preventDefault(), l()), t.key === "Escape" && i();
49
+ },
50
+ placeholder: "https://...",
51
+ className: "w-64 rounded-lg border border-comp-input-stroke-def bg-comp-input-fill-def px-3 py-2 text-sm outline-none focus:border-comp-input-stroke-focused",
52
+ autoFocus: !0
53
+ }
54
+ ),
55
+ /* @__PURE__ */ n(a, { justify: "end", className: "w-full gap-2", children: [
56
+ /* @__PURE__ */ e(s, { size: "xs", variant: "secondary", ghost: !0, onClick: i, children: r.cancelButton }),
57
+ /* @__PURE__ */ e(s, { size: "xs", onClick: l, children: r.saveButton })
58
+ ] })
59
+ ] }) : /* @__PURE__ */ n(a, { align: "center", className: "gap-2", children: [
60
+ /* @__PURE__ */ e(
61
+ "a",
62
+ {
63
+ href: o.getAttributes("link").href,
64
+ target: "_blank",
65
+ rel: "noopener noreferrer",
66
+ className: "max-w-48 flex-1 truncate text-sm text-text-brand-def hover:underline",
67
+ children: o.getAttributes("link").href
68
+ }
69
+ ),
70
+ /* @__PURE__ */ e(
71
+ "button",
72
+ {
73
+ type: "button",
74
+ onClick: d,
75
+ className: "cursor-pointer rounded p-1 text-text-brand-def hover:bg-surface-base-tertiary",
76
+ "aria-label": r.editButton,
77
+ children: /* @__PURE__ */ e(h, { className: "size-icon-xsmall" })
78
+ }
79
+ ),
80
+ /* @__PURE__ */ e(
81
+ "button",
82
+ {
83
+ type: "button",
84
+ onClick: m,
85
+ className: "cursor-pointer rounded p-1 text-text-brand-def hover:bg-surface-base-tertiary",
86
+ "aria-label": r.removeButton,
87
+ children: /* @__PURE__ */ e(x, { className: "size-icon-xsmall" })
88
+ }
89
+ )
90
+ ] })
91
+ }
92
+ )
93
+ }
94
+ );
95
+ export {
96
+ N as LinkBubbleMenu
97
+ };