@bikdotai/bik-component-library 0.0.804-beta.10 → 0.0.804-beta.12
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/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.types.js.map +1 -1
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js +1 -1
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js.map +1 -1
- package/dist/cjs/editor/extensions/slashCommand/SlashCommandMenu.js +1 -1
- package/dist/cjs/editor/extensions/slashCommand/SlashCommandMenu.js.map +1 -1
- package/dist/cjs/editor/extensions/suggestionPopup.js +1 -1
- package/dist/cjs/editor/extensions/suggestionPopup.js.map +1 -1
- package/dist/cjs/editor/floating/LinkBubbleMenu.js +1 -1
- package/dist/cjs/editor/floating/LinkBubbleMenu.js.map +1 -1
- package/dist/cjs/src/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/src/editor/BikEditor.types.d.ts +2 -2
- package/dist/cjs/src/editor/extensions/suggestionPopup.d.ts +2 -1
- package/dist/esm/editor/BikEditor.js +1 -1
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.types.js.map +1 -1
- package/dist/esm/editor/extensions/mention/MentionDropdown.js +1 -1
- package/dist/esm/editor/extensions/mention/MentionDropdown.js.map +1 -1
- package/dist/esm/editor/extensions/slashCommand/SlashCommandMenu.js +1 -1
- package/dist/esm/editor/extensions/slashCommand/SlashCommandMenu.js.map +1 -1
- package/dist/esm/editor/extensions/suggestionPopup.js +1 -1
- package/dist/esm/editor/extensions/suggestionPopup.js.map +1 -1
- package/dist/esm/editor/floating/LinkBubbleMenu.js +1 -1
- package/dist/esm/editor/floating/LinkBubbleMenu.js.map +1 -1
- package/dist/esm/src/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/src/editor/BikEditor.types.d.ts +2 -2
- package/dist/esm/src/editor/extensions/suggestionPopup.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestionPopup.js","sources":["../../../../src/editor/extensions/suggestionPopup.ts"],"sourcesContent":["/**\n * Lightweight popup positioner for suggestion dropdowns (mentions, slash commands).\n * Replaces tippy.js — all we need is a positioned container near the cursor.\n */\n\nexport interface SuggestionPopup {\n\tshow(): void;\n\thide(): void;\n\tdestroy(): void;\n\tupdatePosition(clientRect: () => DOMRect | null): void;\n\treadonly element: HTMLDivElement;\n}\n\nexport function createSuggestionPopup(\n\tcontent: HTMLElement,\n\tclientRect: (() => DOMRect | null) | null,\n): SuggestionPopup {\n\tconst wrapper = document.createElement('div');\n\twrapper.style.cssText
|
|
1
|
+
{"version":3,"file":"suggestionPopup.js","sources":["../../../../src/editor/extensions/suggestionPopup.ts"],"sourcesContent":["/**\n * Lightweight popup positioner for suggestion dropdowns (mentions, slash commands).\n * Replaces tippy.js — all we need is a positioned container near the cursor\n * that flips above when there isn't enough room below.\n */\n\nconst GAP = 4;\n\nexport interface SuggestionPopup {\n\tshow(): void;\n\thide(): void;\n\tdestroy(): void;\n\tupdatePosition(clientRect: () => DOMRect | null): void;\n\treadonly element: HTMLDivElement;\n}\n\nexport function createSuggestionPopup(\n\tcontent: HTMLElement,\n\tclientRect: (() => DOMRect | null) | null,\n): SuggestionPopup {\n\tconst wrapper = document.createElement('div');\n\twrapper.style.cssText = 'position:fixed;z-index:9999;pointer-events:auto;';\n\twrapper.appendChild(content);\n\tdocument.body.appendChild(wrapper);\n\n\tfunction reposition(getRectFn: (() => DOMRect | null) | null) {\n\t\tconst rect = getRectFn?.();\n\t\tif (!rect) return;\n\n\t\tconst popupHeight = wrapper.offsetHeight;\n\t\tconst popupWidth = wrapper.offsetWidth;\n\t\tconst viewportH = window.innerHeight;\n\t\tconst viewportW = window.innerWidth;\n\n\t\tconst spaceBelow = viewportH - rect.bottom - GAP;\n\t\tconst spaceAbove = rect.top - GAP;\n\t\tconst fitsBelow = spaceBelow >= popupHeight;\n\n\t\tconst top = fitsBelow\n\t\t\t? rect.bottom + GAP\n\t\t\t: spaceAbove >= popupHeight\n\t\t\t? rect.top - GAP - popupHeight\n\t\t\t: GAP;\n\n\t\tconst left = Math.min(rect.left, viewportW - popupWidth - GAP);\n\n\t\twrapper.style.left = `${Math.max(GAP, left)}px`;\n\t\twrapper.style.top = `${top}px`;\n\t}\n\n\treposition(clientRect);\n\n\treturn {\n\t\telement: wrapper,\n\t\tshow() {\n\t\t\twrapper.style.display = '';\n\t\t},\n\t\thide() {\n\t\t\twrapper.style.display = 'none';\n\t\t},\n\t\tdestroy() {\n\t\t\twrapper.remove();\n\t\t},\n\t\tupdatePosition(getRectFn: () => DOMRect | null) {\n\t\t\treposition(getRectFn);\n\t\t},\n\t};\n}\n"],"names":["createSuggestionPopup","content","clientRect","wrapper","document","createElement","reposition","getRectFn","rect","popupHeight","offsetHeight","popupWidth","offsetWidth","viewportH","window","innerHeight","viewportW","innerWidth","spaceBelow","bottom","spaceAbove","top","left","Math","min","style","max","cssText","appendChild","body","element","show","display","hide","destroy","remove","updatePosition"],"mappings":"AAgBgB,SAAAA,EACfC,EACAC,GAEA,MAAMC,EAAUC,SAASC,cAAc,OAKvC,SAASC,EAAWC,GACnB,MAAMC,EAAOD,aAAA,EAAAA,IACb,IAAKC,EAAM,OAEX,MAAMC,EAAcN,EAAQO,aACtBC,EAAaR,EAAQS,YACrBC,EAAYC,OAAOC,YACnBC,EAAYF,OAAOG,WAEnBC,EAAaL,EAAYL,EAAKW,OA5B1B,EA6BJC,EAAaZ,EAAKa,IA7Bd,EAgCJA,EAFYH,GAAcT,EAG7BD,EAAKW,OAjCE,EAkCPC,GAAcX,EACdD,EAAKa,IAnCE,EAmCUZ,EAnCV,EAsCJa,EAAOC,KAAKC,IAAIhB,EAAKc,KAAMN,EAAYL,EAtCnC,GAwCVR,EAAQsB,MAAMH,KAAU,GAAAC,KAAKG,IAxCnB,EAwC4BJ,OACtCnB,EAAQsB,MAAMJ,IAAS,GAAAA,KACxB,CAIA,OA/BAlB,EAAQsB,MAAME,QAAU,mDACxBxB,EAAQyB,YAAY3B,GACpBG,SAASyB,KAAKD,YAAYzB,GA2B1BG,EAAWJ,GAEJ,CACN4B,QAAS3B,EACT4B,OACC5B,EAAQsB,MAAMO,QAAU,EACxB,EACDC,OACC9B,EAAQsB,MAAMO,QAAU,MACxB,EACDE,UACC/B,EAAQgC,QACR,EACDC,eAAe7B,GACdD,EAAWC,EACZ,EAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useState as t,useRef as o,useCallback as r,useEffect as i}from"react";const l=l=>{let{editor:d,renderLinkTooltip:
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useState as t,useRef as o,useCallback as r,useEffect as i}from"react";const l=l=>{let{editor:d,renderLinkTooltip:a}=l;const[s,c]=t(null),p=o(null),u=r((()=>c(null)),[]);if(i((()=>{const e=d.view.dom,n=n=>{var t,o,r;if(!e.contains(n.target))return;const i=n.target,l=i instanceof Element?i:i.parentElement,d=null!==(t=null==l?void 0:l.closest("a"))&&void 0!==t?t:null;d?(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),c({href:null!==(o=d.getAttribute("href"))&&void 0!==o?o:"",text:null!==(r=d.textContent)&&void 0!==r?r:"",rect:d.getBoundingClientRect()})):u()},t=n=>{var t;const o=n.target;e.contains(o)||(null===(t=p.current)||void 0===t?void 0:t.contains(o))||u()},o=()=>u();return document.addEventListener("click",n,{capture:!0}),document.addEventListener("mousedown",t),e.addEventListener("keydown",o),()=>{document.removeEventListener("click",n,{capture:!0}),document.removeEventListener("mousedown",t),e.removeEventListener("keydown",o)}}),[d,u]),!s)return null;const{href:f,text:g,rect:v}=s,m=()=>window.open(f,"_blank","noopener,noreferrer"),b=()=>{d.chain().focus().extendMarkRange("link").unsetLink().run(),u()};return e("div",Object.assign({ref:p},{children:a?a({href:f,text:g,rect:v,onOpen:m,onRemove:b,onHide:u}):n("div",Object.assign({className:"bik-link-bubble",style:{position:"fixed",top:v.bottom+8,left:v.left,zIndex:9999,background:"#fff",border:"1px solid #dee2e6",borderRadius:6,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",padding:"6px 10px",display:"flex",alignItems:"center",gap:8,fontSize:13}},{children:[n("span",Object.assign({style:{display:"inline-flex",alignItems:"center",gap:4,color:"#4f46e5",maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{children:[n("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},{children:[e("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),e("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})),f.length>40?f.slice(0,40)+"…":f]})),e("button",Object.assign({onMouseDown:e=>{e.preventDefault(),m()},style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",fontSize:12,color:"#495057"}},{children:"Open ↗"})),e("span",Object.assign({style:{color:"#dee2e6"}},{children:"|"})),e("button",Object.assign({onMouseDown:e=>{e.preventDefault(),b()},style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",fontSize:12,color:"#dc3545"}},{children:"Remove"}))]}))}))};export{l as LinkBubbleMenu};
|
|
2
2
|
//# sourceMappingURL=LinkBubbleMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkBubbleMenu.js","sources":["../../../../src/editor/floating/LinkBubbleMenu.tsx"],"sourcesContent":["import { Editor } from '@tiptap/core';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport type { LinkTooltipProps } from '../BikEditor.types';\n\ninterface Props {\n\teditor: Editor;\n\trenderLinkTooltip?: (props: LinkTooltipProps) => React.ReactNode;\n}\n\ninterface LinkState {\n\thref: string;\n\ttext: string;\n\trect: DOMRect;\n}\n\n/**\n * Shows a tooltip when the user **clicks** a hyperlink inside the editor.\n * Hides on click outside the editor/bubble or on any keypress.\n * Does NOT trigger on cursor movement or keyboard navigation.\n */\nexport const LinkBubbleMenu: React.FC<Props> = ({\n\teditor,\n\trenderLinkTooltip,\n}) => {\n\tconst [link, setLink] = useState<LinkState | null>(null);\n\tconst bubbleRef = useRef<HTMLDivElement>(null);\n\n\tconst hide = useCallback(() => setLink(null), []);\n\n\tuseEffect(() => {\n\t\tconst dom = editor.view.dom;\n\n\t\t// Use document-level capture so we fire before ANY other listener on the\n\t\t// page — ProseMirror, browser defaults, and Storybook iframes included.\n\t\tconst handleCaptureClick = (e: MouseEvent) => {\n\t\t\t// Only act on clicks that land inside the editor\n\t\t\tif (!dom.contains(e.target as Node)) return;\n\n\t\t\tconst
|
|
1
|
+
{"version":3,"file":"LinkBubbleMenu.js","sources":["../../../../src/editor/floating/LinkBubbleMenu.tsx"],"sourcesContent":["import { Editor } from '@tiptap/core';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport type { LinkTooltipProps } from '../BikEditor.types';\n\ninterface Props {\n\teditor: Editor;\n\trenderLinkTooltip?: (props: LinkTooltipProps) => React.ReactNode;\n}\n\ninterface LinkState {\n\thref: string;\n\ttext: string;\n\trect: DOMRect;\n}\n\n/**\n * Shows a tooltip when the user **clicks** a hyperlink inside the editor.\n * Hides on click outside the editor/bubble or on any keypress.\n * Does NOT trigger on cursor movement or keyboard navigation.\n */\nexport const LinkBubbleMenu: React.FC<Props> = ({\n\teditor,\n\trenderLinkTooltip,\n}) => {\n\tconst [link, setLink] = useState<LinkState | null>(null);\n\tconst bubbleRef = useRef<HTMLDivElement>(null);\n\n\tconst hide = useCallback(() => setLink(null), []);\n\n\tuseEffect(() => {\n\t\tconst dom = editor.view.dom;\n\n\t\t// Use document-level capture so we fire before ANY other listener on the\n\t\t// page — ProseMirror, browser defaults, and Storybook iframes included.\n\t\tconst handleCaptureClick = (e: MouseEvent) => {\n\t\t\t// Only act on clicks that land inside the editor\n\t\t\tif (!dom.contains(e.target as Node)) return;\n\n\t\t\tconst target = e.target as Node;\n\t\t\tconst el = target instanceof Element ? target : target.parentElement;\n\t\t\tconst linkEl = el?.closest('a') ?? null;\n\t\t\tif (!linkEl) {\n\t\t\t\thide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Prevent browser href navigation\n\t\t\te.preventDefault();\n\t\t\t// Prevent the event reaching ProseMirror's bubble-phase handlers\n\t\t\te.stopPropagation();\n\t\t\te.stopImmediatePropagation();\n\n\t\t\tsetLink({\n\t\t\t\thref: linkEl.getAttribute('href') ?? '',\n\t\t\t\ttext: linkEl.textContent ?? '',\n\t\t\t\trect: linkEl.getBoundingClientRect(),\n\t\t\t});\n\t\t};\n\n\t\t// Hide when clicking outside both the editor and the bubble\n\t\tconst handleDocumentMousedown = (e: MouseEvent) => {\n\t\t\tconst target = e.target as Node;\n\t\t\tif (!dom.contains(target) && !bubbleRef.current?.contains(target)) {\n\t\t\t\thide();\n\t\t\t}\n\t\t};\n\n\t\t// Hide on any keypress — user is typing or navigating away\n\t\tconst handleKeyDown = () => hide();\n\n\t\t// { capture: true } on document — fires before every other listener\n\t\tdocument.addEventListener('click', handleCaptureClick, { capture: true });\n\t\tdocument.addEventListener('mousedown', handleDocumentMousedown);\n\t\tdom.addEventListener('keydown', handleKeyDown);\n\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('click', handleCaptureClick, {\n\t\t\t\tcapture: true,\n\t\t\t});\n\t\t\tdocument.removeEventListener('mousedown', handleDocumentMousedown);\n\t\t\tdom.removeEventListener('keydown', handleKeyDown);\n\t\t};\n\t}, [editor, hide]);\n\n\tif (!link) return null;\n\n\tconst { href, text, rect } = link;\n\n\tconst onOpen = () => window.open(href, '_blank', 'noopener,noreferrer');\n\tconst onRemove = () => {\n\t\teditor.chain().focus().extendMarkRange('link').unsetLink().run();\n\t\thide();\n\t};\n\n\t// The <div ref={bubbleRef}> wrapper is what we check for outside-click detection.\n\t// Consumer tooltips use position:fixed internally but remain DOM descendants of\n\t// this wrapper, so bubbleRef.contains() correctly identifies clicks inside them.\n\treturn (\n\t\t<div ref={bubbleRef}>\n\t\t\t{renderLinkTooltip ? (\n\t\t\t\trenderLinkTooltip({ href, text, rect, onOpen, onRemove, onHide: hide })\n\t\t\t) : (\n\t\t\t\t// Built-in fallback: shows href + Open + Remove.\n\t\t\t\t// Use renderLinkTooltip to add an Edit button or custom styling.\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"bik-link-bubble\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tposition: 'fixed',\n\t\t\t\t\t\ttop: rect.bottom + 8,\n\t\t\t\t\t\tleft: rect.left,\n\t\t\t\t\t\tzIndex: 9999,\n\t\t\t\t\t\tbackground: '#fff',\n\t\t\t\t\t\tborder: '1px solid #dee2e6',\n\t\t\t\t\t\tborderRadius: 6,\n\t\t\t\t\t\tboxShadow: '0 4px 12px rgba(0,0,0,0.15)',\n\t\t\t\t\t\tpadding: '6px 10px',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tgap: 8,\n\t\t\t\t\t\tfontSize: 13,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<span\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\tgap: 4,\n\t\t\t\t\t\t\tcolor: '#4f46e5',\n\t\t\t\t\t\t\tmaxWidth: 220,\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\ttextOverflow: 'ellipsis',\n\t\t\t\t\t\t\twhiteSpace: 'nowrap',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"14\"\n\t\t\t\t\t\t\theight=\"14\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\" />\n\t\t\t\t\t\t\t<path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t{href.length > 40 ? href.slice(0, 40) + '…' : href}\n\t\t\t\t\t</span>\n\t\t\t\t\t<button\n\t\t\t\t\t\tonMouseDown={(e) => {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tonOpen();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tbackground: 'none',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\tpadding: '2px 4px',\n\t\t\t\t\t\t\tfontSize: 12,\n\t\t\t\t\t\t\tcolor: '#495057',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tOpen ↗\n\t\t\t\t\t</button>\n\t\t\t\t\t<span style={{ color: '#dee2e6' }}>|</span>\n\t\t\t\t\t<button\n\t\t\t\t\t\tonMouseDown={(e) => {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tonRemove();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tbackground: 'none',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\tpadding: '2px 4px',\n\t\t\t\t\t\t\tfontSize: 12,\n\t\t\t\t\t\t\tcolor: '#dc3545',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tRemove\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"names":["LinkBubbleMenu","_ref","editor","renderLinkTooltip","link","setLink","useState","bubbleRef","useRef","hide","useCallback","useEffect","dom","view","handleCaptureClick","e","contains","target","el","Element","parentElement","linkEl","_a","closest","preventDefault","stopPropagation","stopImmediatePropagation","href","getAttribute","_b","text","_c","textContent","rect","getBoundingClientRect","handleDocumentMousedown","current","handleKeyDown","document","addEventListener","capture","removeEventListener","onOpen","window","open","onRemove","chain","focus","extendMarkRange","unsetLink","run","_jsx","Object","assign","ref","children","onHide","_jsxs","className","style","position","top","bottom","left","zIndex","background","border","borderRadius","boxShadow","padding","display","alignItems","gap","fontSize","color","maxWidth","overflow","textOverflow","whiteSpace","width","height","viewBox","fill","stroke","strokeWidth","d","length","slice","onMouseDown","cursor"],"mappings":"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"}
|
|
@@ -688,8 +688,8 @@ export interface BikEditorProps {
|
|
|
688
688
|
/** Called on every document change. */
|
|
689
689
|
onChange?: (content: EditorSnapshot) => void;
|
|
690
690
|
/**
|
|
691
|
-
* Called when the user presses
|
|
692
|
-
* Only fires when
|
|
691
|
+
* Called when the user presses the key combo defined by `sendShortcut`.
|
|
692
|
+
* Only fires when both `onSend` and `sendShortcut` are provided.
|
|
693
693
|
*/
|
|
694
694
|
onSend?: (content: EditorSnapshot) => void;
|
|
695
695
|
/** Called when the editor gains focus. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Lightweight popup positioner for suggestion dropdowns (mentions, slash commands).
|
|
3
|
-
* Replaces tippy.js — all we need is a positioned container near the cursor
|
|
3
|
+
* Replaces tippy.js — all we need is a positioned container near the cursor
|
|
4
|
+
* that flips above when there isn't enough room below.
|
|
4
5
|
*/
|
|
5
6
|
export interface SuggestionPopup {
|
|
6
7
|
show(): void;
|