markstream-vue2 0.0.17 → 0.0.19-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +519 -187
- package/dist/index.js +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/index2.js +1 -1
- package/dist/index3.js +1 -1
- package/dist/index4.js +1 -1
- package/dist/index5.js +1 -1
- package/dist/index6.js +1 -6
- package/dist/index7.js +3051 -0
- package/dist/tailwind.ts +1 -1
- package/package.json +6 -2
- package/dist/Tooltip.js +0 -1
- package/dist/exports.js +0 -1
package/dist/tailwind.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const safeList = `checkbox-node checkbox-input checkbox checked dl definition-list dt definition-term item.term
|
|
1
|
+
export const safeList = `checkbox-node checkbox-input checkbox checked admonition is-dark admonition-header [_setup.iconMap[_setup.props.node.kind] admonition-icon admonition-title admonition-toggle show v-show !collapsed admonition-content copy a5b14cbe emphasis-node component child emphasis footnote-anchor text-sm text-[#0366d6] hover:underline cursor-pointer heading-node auto heading ffb7cf51 dl definition-list dt definition-term item.term dd definition-desc item.definition footnote-reference footnote-link [] hard-break container code-block-container my-4 rounded-lg border overflow-hidden shadow-sm border-gray-700/30 bg-gray-900 border-gray-200 bg-white code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5 space-x-2 flex-1 icon-slot h-4 w-4 flex-shrink-0 font-medium font-mono truncate header-right code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] mouseenter focus w-3 h-3 none currentColor round m9 click m14 evenodd !isCollapsed codeEditor code-editor-container code-height-placeholder"] !stream loading code-loading-placeholder loading-skeleton skeleton-line short sr-only polite status inline text-[85%] px-1 py-0.5 rounded bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full before:content-[''] after:content-[''] htmlRef html-block-node dynamic html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 node insert-node insert ab1ec9bc mt-2 mb-2 leading-relaxed border-t border-[#eaecef] pt-2 mark highlight-node highlight emoji-node de55dc97 d2-block-container text-gray-100 text-gray-900 d2-block-header gap-x-2 gap-x-1 p-0.5 bg-gray-700 bg-gray-100 mode-btn px-2 py-1 is-active preview source d2-action-btn bodyRef d2-block-body d2-source py-4 d2-code d2-error d2-render d2-svg pb-3 ecdef8dc html-inline-node containerRef html-inline-node--loading link-node noopener noreferrer link-text link-loading inline-flex items-baseline gap-1.5 link-text-wrapper relative leading-[normal] underline-anim c6e041bc is-rendering infographic-block-header bg-gray-800 bg-gray-50 [_vm.$slots["header-left"] [_vm._t("header-left")] my-0 text-gray-400 text-gray-600 [_vm._t("header-center")] px-2.5 bg-gray-600 text-gray-200 text-gray-700 hover:text-gray-200 text-gray-500 hover:text-gray-700 m16 [_vm._t("header-right")] opacity-50 cursor-not-allowed m7 p-4 whitespace-pre-wrap text-gray-300 absolute top-2 right-2 z-10 gap-2 backdrop-blur hover:bg-gray-700 hover:bg-gray-200"] in m21 out zoom min-h-[360px] transition-all duration-100 block inset-0 cursor-grab infographicContainer w-full text-center justify-center min-h-full markstream-vue infographic-dialog fixed z-50 bg-black/70 dialog-panel h-full max-h-full shadow-lg top-6 right-6 modalContent c97dc3fc list-node list-disc item ?? index void f8d5db30 list-item pl-1.5 my-2 e56be25e figureRef my-8 inline-block img-switch out-in image max-w-96 h-auto transition-opacity duration-200 ease-in-out contain lazy eager async placeholder placeholder-layer rounded-full border-2 border-solid border-current border-t-transparent animate-spin whitespace-nowrap [_vm._v(_vm._s(_vm.node.raw))])]] error py-2 text-red-500 italic a5977223 containerEl math-block overflow-x-auto min-h-[40px] math-fade math-loading-overlay math-loading-spinner mathBlockElement math-rendering a98be743 math-inline-wrapper !renderingLoading mathElement math-inline table-node-fade math-inline__loading math-inline__spinner isLoading codeBlockContent code-block-content rendererTarget code-block-render code-fallback-plain stream beef883a [_setup.languageClass] no textContent markstream-vue2 markdown-renderer node-spacer item.index node-slot item.node.type node-content typewriter item.node item.node.loading item.indexKey handle-artifact-click handleArtifactClick item.bindings node-placeholder strikethrough-node strikethrough mermaid-block-header space-x-1 modeContainerRef mermaidContainer mermaidContent mermaid-dialog paragraph-node text text-node child.center text-node-center subscript-node a2b068c3 strong-node custom-id af3ce037 reference-node bg-[hsl(var(--muted))] px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))] mouseEnter mouseleave mouseLeave hr-node superscript-node vmr-container table-node-wrapper table-node border-[var(--table-border,#cbd5e1)] font-semibold p-[calc(4/7*1em)] right text-right cell.align center text-left cell.children transition table-node__loading table-node__spinner is common alias note smooth previewCode touchstart object passive boolean preview-code plaintext diff single [markstream-vue2] stream-monaco not blocks will use basic enhanced editor theme provided themes array on same to initialize number typeof window.getComputedStyle navigator.clipboard navigator.clipboard.writeText top visible post resize template href name xlink:href string instance.render instance missing render returned empty window.requestAnimationFrame tooltip ready z-[9999] text-base px-3 shadow-md pointer-events-none tooltip-element text-white border-gray-700 border"] linear infinite openModal element found hidden keydown transform ease fullscreen library failed p-4">Failed instanceof error.message infographic-action-btn hover:bg-gray-200 load $$ vitesse-dark vitesse-light lang shiki shiki-fallback [MarkdownCodeBlockNode] even stream-markdown overflow-y"] overflow-x"] stream-markdown-parser mouseover mouseout globalThis.process globalThis.process?.env?.NODE_ENV test reverse scroll too-many-targets console viewportPriority virtualization peer dependencies are back inline-code rendering enable full features please install preformatted code_block mermaid infographic d2 d2lang [data-node-index] toggleMode strict loose afterbegin configure dark default abort timed error?.message viewBox width height get [data-mermaid-wrapper] open-modal toggle-mode transitionend light retry mermaid-action-btn html-preview-frame__backdrop html-preview-frame html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label html-preview-frame__close html-preview-frame__iframe allow-scripts allow-same-origin srcdoc unknown-node en utf-8 viewport content="width=device-width initial-scale=1 e.key rootRef portal-root`
|
|
2
2
|
module.exports = safeList;
|
|
3
3
|
export default safeList;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markstream-vue2",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.19-beta.0",
|
|
5
5
|
"description": "Vue 2 Markdown renderer optimized for large documents with progressive Mermaid rendering, streaming diff code blocks, and fast real-time preview. Perfect for documentation sites, AI chat interfaces, and content management systems.",
|
|
6
6
|
"author": "Simon He",
|
|
7
7
|
"license": "MIT",
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
],
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@antv/infographic": "^0.2.3",
|
|
82
|
+
"@terrastruct/d2": ">=0.1.33",
|
|
82
83
|
"@vue/composition-api": ">=1.7.2",
|
|
83
84
|
"katex": ">=0.16.22",
|
|
84
85
|
"mermaid": ">=11",
|
|
@@ -92,6 +93,9 @@
|
|
|
92
93
|
"@antv/infographic": {
|
|
93
94
|
"optional": true
|
|
94
95
|
},
|
|
96
|
+
"@terrastruct/d2": {
|
|
97
|
+
"optional": true
|
|
98
|
+
},
|
|
95
99
|
"@vue/composition-api": {
|
|
96
100
|
"optional": true
|
|
97
101
|
},
|
|
@@ -116,7 +120,7 @@
|
|
|
116
120
|
},
|
|
117
121
|
"dependencies": {
|
|
118
122
|
"@floating-ui/dom": "^1.7.5",
|
|
119
|
-
"stream-markdown-parser": "0.0.59-beta.
|
|
123
|
+
"stream-markdown-parser": "0.0.59-beta.9"
|
|
120
124
|
},
|
|
121
125
|
"devDependencies": {
|
|
122
126
|
"@vitejs/plugin-vue2": "^2.3.4",
|
package/dist/Tooltip.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty,e=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,l=(e,n,o)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,c=(t,e)=>{for(var n in e||(e={}))i.call(e,n)&&l(t,n,e[n]);if(o)for(var n of o(e))r.call(e,n)&&l(t,n,e[n]);return t},s=(t,o)=>e(t,n(o)),a=(t,e)=>{var n={};for(var l in t)i.call(t,l)&&e.indexOf(l)<0&&(n[l]=t[l]);if(null!=t&&o)for(var l of o(t))e.indexOf(l)<0&&r.call(t,l)&&(n[l]=t[l]);return n},u=(t,e,n)=>new Promise((o,i)=>{var r=t=>{try{c(n.next(t))}catch(e){i(e)}},l=t=>{try{c(n.throw(t))}catch(e){i(e)}},c=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,l);c((n=n.apply(t,e)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("vue"),d=require("./exports.js");require("stream-markdown-parser");const p=Math.min,h=Math.max,m=Math.round,y=Math.floor,g=t=>({x:t,y:t}),x={left:"right",right:"left",bottom:"top",top:"bottom"},v={start:"end",end:"start"};function w(t,e,n){return h(t,p(e,n))}function b(t,e){return"function"==typeof t?t(e):t}function R(t){return t.split("-")[0]}function E(t){return t.split("-")[1]}function T(t){return"x"===t?"y":"x"}function L(t){return"y"===t?"height":"width"}const k=new Set(["top","bottom"]);function A(t){return k.has(R(t))?"y":"x"}function S(t){return T(A(t))}function P(t){return t.replace(/start|end/g,t=>v[t])}const O=["left","right"],D=["right","left"],C=["top","bottom"],M=["bottom","top"];function F(t){return t.replace(/left|right|bottom|top/g,t=>x[t])}function B(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function W(t,e,n){let{reference:o,floating:i}=t;const r=A(e),l=S(e),c=L(l),s=R(e),a="y"===r,u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,d=o[c]/2-i[c]/2;let p;switch(s){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-i.width,y:f};break;default:p={x:o.x,y:o.y}}switch(E(e)){case"start":p[l]-=d*(n&&a?-1:1);break;case"end":p[l]+=d*(n&&a?-1:1)}return p}function _(t,e){return u(this,null,function*(){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:l,elements:s,strategy:a}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=b(e,t),m=function(t){return"number"!=typeof t?function(t){return c({top:0,right:0,bottom:0,left:0},t)}(t):{top:t,right:t,bottom:t,left:t}}(h),y=s[p?"floating"===d?"reference":"floating":d],g=B(yield r.getClippingRect({element:null==(n=yield null==r.isElement?void 0:r.isElement(y))||n?y:y.contextElement||(yield null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:a})),x="floating"===d?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,v=yield null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating),w=(yield null==r.isElement?void 0:r.isElement(v))&&(yield null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},R=B(r.convertOffsetParentRelativeRectToViewportRelativeRect?yield r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:v,strategy:a}):x);return{top:(g.top-R.top+m.top)/w.y,bottom:(R.bottom-g.bottom+m.bottom)/w.y,left:(g.left-R.left+m.left)/w.x,right:(R.right-g.right+m.right)/w.x}})}const j=new Set(["left","top"]);function H(){return"undefined"!=typeof window}function N(t){return X(t)?(t.nodeName||"").toLowerCase():"#document"}function V(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function z(t){var e;return null==(e=(X(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function X(t){return!!H()&&(t instanceof Node||t instanceof V(t).Node)}function Y(t){return!!H()&&(t instanceof Element||t instanceof V(t).Element)}function $(t){return!!H()&&(t instanceof HTMLElement||t instanceof V(t).HTMLElement)}function q(t){return!(!H()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof V(t).ShadowRoot)}const I=new Set(["inline","contents"]);function U(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=lt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!I.has(i)}const G=new Set(["table","td","th"]);function J(t){return G.has(N(t))}const K=[":popover-open",":modal"];function Q(t){return K.some(e=>{try{return t.matches(e)}catch(n){return!1}})}const Z=["transform","translate","scale","rotate","perspective"],tt=["transform","translate","scale","rotate","perspective","filter"],et=["paint","layout","strict","content"];function nt(t){const e=ot(),n=Y(t)?lt(t):t;return Z.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||tt.some(t=>(n.willChange||"").includes(t))||et.some(t=>(n.contain||"").includes(t))}function ot(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const it=new Set(["html","body","#document"]);function rt(t){return it.has(N(t))}function lt(t){return V(t).getComputedStyle(t)}function ct(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function st(t){if("html"===N(t))return t;const e=t.assignedSlot||t.parentNode||q(t)&&t.host||z(t);return q(e)?e.host:e}function at(t){const e=st(t);return rt(e)?t.ownerDocument?t.ownerDocument.body:t.body:$(e)&&U(e)?e:at(e)}function ut(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=at(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=V(i);if(r){const t=ft(l);return e.concat(l,l.visualViewport||[],U(i)?i:[],t&&n?ut(t):[])}return e.concat(i,ut(i,[],n))}function ft(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function dt(t){const e=lt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=$(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,c=m(n)!==r||m(o)!==l;return c&&(n=r,o=l),{width:n,height:o,$:c}}function pt(t){return Y(t)?t:t.contextElement}function ht(t){const e=pt(t);if(!$(e))return g(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=dt(e);let l=(r?m(n.width):n.width)/o,c=(r?m(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const mt=g(0);function yt(t){const e=V(t);return ot()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:mt}function gt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),r=pt(t);let l=g(1);e&&(o?Y(o)&&(l=ht(o)):l=ht(t));const c=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==V(t))&&e}(r,n,o)?yt(r):g(0);let s=(i.left+c.x)/l.x,a=(i.top+c.y)/l.y,u=i.width/l.x,f=i.height/l.y;if(r){const t=V(r),e=o&&Y(o)?V(o):o;let n=t,i=ft(n);for(;i&&o&&e!==n;){const t=ht(i),e=i.getBoundingClientRect(),o=lt(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;s*=t.x,a*=t.y,u*=t.x,f*=t.y,s+=r,a+=l,n=V(i),i=ft(n)}}return B({width:u,height:f,x:s,y:a})}function xt(t,e){const n=ct(t).scrollLeft;return e?e.left+n:gt(z(t)).left+n}function vt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-xt(t,n),y:n.top+e.scrollTop}}const wt=new Set(["absolute","fixed"]);function bt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=V(t),o=z(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,c=0,s=0;if(i){r=i.width,l=i.height;const t=ot();(!t||t&&"fixed"===e)&&(c=i.offsetLeft,s=i.offsetTop)}const a=xt(o);if(a<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(o.clientWidth-e.clientWidth-i);l<=25&&(r-=l)}else a<=25&&(r+=a);return{width:r,height:l,x:c,y:s}}(t,n);else if("document"===e)o=function(t){const e=z(t),n=ct(t),o=t.ownerDocument.body,i=h(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=h(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+xt(t);const c=-n.scrollTop;return"rtl"===lt(o).direction&&(l+=h(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:c}}(z(t));else if(Y(e))o=function(t,e){const n=gt(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=$(t)?ht(t):g(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else{const n=yt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return B(o)}function Rt(t,e){const n=st(t);return!(n===e||!Y(n)||rt(n))&&("fixed"===lt(n).position||Rt(n,e))}function Et(t,e,n){const o=$(e),i=z(e),r="fixed"===n,l=gt(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const s=g(0);function a(){s.x=xt(i)}if(o||!o&&!r)if(("body"!==N(e)||U(i))&&(c=ct(e)),o){const t=gt(e,!0,r,e);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&a();r&&!o&&i&&a();const u=!i||o||r?g(0):vt(i,c);return{x:l.left+c.scrollLeft-s.x-u.x,y:l.top+c.scrollTop-s.y-u.y,width:l.width,height:l.height}}function Tt(t){return"static"===lt(t).position}function Lt(t,e){if(!$(t)||"fixed"===lt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return z(t)===n&&(n=n.ownerDocument.body),n}function kt(t,e){const n=V(t);if(Q(t))return n;if(!$(t)){let e=st(t);for(;e&&!rt(e);){if(Y(e)&&!Tt(e))return e;e=st(e)}return n}let o=Lt(t,e);for(;o&&J(o)&&Tt(o);)o=Lt(o,e);return o&&rt(o)&&Tt(o)&&!nt(o)?n:o||function(t){let e=st(t);for(;$(e)&&!rt(e);){if(nt(e))return e;if(Q(e))return null;e=st(e)}return null}(t)||n}const At={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,l=z(o),c=!!e&&Q(e.floating);if(o===l||c&&r)return n;let s={scrollLeft:0,scrollTop:0},a=g(1);const u=g(0),f=$(o);if((f||!f&&!r)&&(("body"!==N(o)||U(l))&&(s=ct(o)),$(o))){const t=gt(o);a=ht(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const d=!l||f||r?g(0):vt(l,s);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+u.x+d.x,y:n.y*a.y-s.scrollTop*a.y+u.y+d.y}},getDocumentElement:z,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?Q(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=ut(t,[],!1).filter(t=>Y(t)&&"body"!==N(t)),i=null;const r="fixed"===lt(t).position;let l=r?st(t):t;for(;Y(l)&&!rt(l);){const e=lt(l),n=nt(l);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&wt.has(i.position)||U(l)&&!n&&Rt(t,l))?o=o.filter(t=>t!==l):i=e,l=st(l)}return e.set(t,o),o}(e,this._c):[].concat(n),o],l=r[0],c=r.reduce((t,n)=>{const o=bt(e,n,i);return t.top=h(o.top,t.top),t.right=p(o.right,t.right),t.bottom=p(o.bottom,t.bottom),t.left=h(o.left,t.left),t},bt(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:kt,getElementRects:function(t){return u(this,null,function*(){const e=this.getOffsetParent||kt,n=this.getDimensions,o=yield n(t.floating);return{reference:Et(t.reference,yield e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=dt(t);return{width:e,height:n}},getScale:ht,isElement:Y,isRTL:function(t){return"rtl"===lt(t).direction}};function St(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Pt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,f=pt(t),d=i||r?[...f?ut(f):[],...ut(e)]:[];d.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:!0}),r&&t.addEventListener("resize",n)});const m=f&&a?function(t,e){let n,o=null;const i=z(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function l(a,u){void 0===a&&(a=!1),void 0===u&&(u=1),r();const f=t.getBoundingClientRect(),{left:d,top:m,width:g,height:x}=f;if(a||e(),!g||!x)return;const v={rootMargin:-y(m)+"px "+-y(i.clientWidth-(d+g))+"px "+-y(i.clientHeight-(m+x))+"px "+-y(d)+"px",threshold:h(0,p(1,u))||1};let w=!0;function b(e){const o=e[0].intersectionRatio;if(o!==u){if(!w)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||St(f,t.getBoundingClientRect())||l(),w=!1}try{o=new IntersectionObserver(b,s(c({},v),{root:i.ownerDocument}))}catch(R){o=new IntersectionObserver(b,v)}o.observe(t)}(!0),r}(f,n):null;let g,x=-1,v=null;l&&(v=new ResizeObserver(t=>{let[o]=t;o&&o.target===f&&v&&(v.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var t;null==(t=v)||t.observe(e)})),n()}),f&&!u&&v.observe(f),v.observe(e));let w=u?gt(t):null;return u&&function e(){const o=gt(t);w&&!St(w,o)&&n(),w=o,g=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n)}),null==m||m(),null==(t=v)||t.disconnect(),v=null,u&&cancelAnimationFrame(g)}}const Ot=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn(e){return u(this,null,function*(){const{x:n,y:o,placement:i}=e,r=b(t,e),{mainAxis:l=!0,crossAxis:u=!1,limiter:f={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}}}=r,d=a(r,["mainAxis","crossAxis","limiter"]),p={x:n,y:o},h=yield _(e,d),m=A(R(i)),y=T(m);let g=p[y],x=p[m];if(l){const t="y"===y?"bottom":"right";g=w(g+h["y"===y?"top":"left"],g,g-h[t])}if(u){const t="y"===m?"bottom":"right";x=w(x+h["y"===m?"top":"left"],x,x-h[t])}const v=f.fn(s(c({},e),{[y]:g,[m]:x}));return s(c({},v),{data:{x:v.x-n,y:v.y-o,enabled:{[y]:l,[m]:u}}})})}}},Dt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn(e){return u(this,null,function*(){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:c,platform:s,elements:u}=e,f=b(t,e),{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0}=f,x=a(f,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const v=R(i),w=A(c),T=R(c)===c,k=yield null==s.isRTL?void 0:s.isRTL(u.floating),B=h||(T||!g?[F(c)]:function(t){const e=F(t);return[P(t),e,P(e)]}(c)),W="none"!==y;!h&&W&&B.push(...function(t,e,n,o){const i=E(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?D:O:e?O:D;case"left":case"right":return e?C:M;default:return[]}}(R(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(P)))),r}(c,g,y,k));const j=[c,...B],H=yield _(e,x),N=[];let V=(null==(o=r.flip)?void 0:o.overflows)||[];if(d&&N.push(H[v]),p){const t=function(t,e,n){void 0===n&&(n=!1);const o=E(t),i=S(t),r=L(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=F(l)),[l,F(l)]}(i,l,k);N.push(H[t[0]],H[t[1]])}if(V=[...V,{placement:i,overflows:N}],!N.every(t=>t<=0)){var z,X;const t=((null==(z=r.flip)?void 0:z.index)||0)+1,e=j[t];if(e&&("alignment"!==p||w===A(e)||V.every(t=>A(t.placement)!==w||t.overflows[0]>0)))return{data:{index:t,overflows:V},reset:{placement:e}};let n=null==(X=V.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:X.placement;if(!n)switch(m){case"bestFit":{var Y;const t=null==(Y=V.filter(t=>{if(W){const e=A(t.placement);return e===w||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:Y[0];t&&(n=t);break}case"initialPlacement":n=c}if(i!==n)return{reset:{placement:n}}}return{}})}}},Ct=f.defineComponent({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:null,content:null,placement:null,offset:null,originX:null,originY:null,id:null,isDark:{type:[Boolean,null]}},setup(t){const e=t,n=f.computed(()=>{if(void 0!==e.isDark&&null!==e.isDark)return Boolean(e.isDark);if("undefined"!=typeof document)try{if(document.documentElement.classList.contains("dark"))return!0;if((null==window?void 0:window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches)return!0}catch(t){}return!1}),o=f.ref(null),i=f.ref({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),r=f.ref(!1);let l=null;function a(){return u(this,null,function*(){var t,n;if(!e.anchorEl||!o.value)return;const r=[(f=null!=(t=e.offset)?t:8,void 0===f&&(f=0),{name:"offset",options:f,fn(t){return u(this,null,function*(){var e,n;const{x:o,y:i,placement:r,middlewareData:l}=t,a=yield function(t,e){return u(this,null,function*(){const{placement:n,platform:o,elements:i}=t,r=yield null==o.isRTL?void 0:o.isRTL(i.floating),l=R(n),c=E(n),s="y"===A(n),a=j.has(l)?-1:1,u=r&&s?-1:1,f=b(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&"number"==typeof h&&(p="end"===c?-1*h:h),s?{x:p*u,y:d*a}:{x:d*a,y:p*u}})}(t,f);return r===(null==(e=l.offset)?void 0:e.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:s(c({},a),{placement:r})}})}}),Dt(),Ot({padding:8})],{x:l,y:a}=yield((t,e,n)=>{const o=new Map,i=c({platform:At},n),r=s(c({},i.platform),{_c:o});return((t,e,n)=>u(exports,null,function*(){const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,a=r.filter(Boolean),u=yield null==l.isRTL?void 0:l.isRTL(e);let f=yield l.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:p}=W(f,o,u),h=o,m={},y=0;for(let n=0;n<a.length;n++){const{name:r,fn:g}=a[n],{x,y:v,data:w,reset:b}=yield g({x:d,y:p,initialPlacement:o,placement:h,strategy:i,middlewareData:m,rects:f,platform:l,elements:{reference:t,floating:e}});d=null!=x?x:d,p=null!=v?v:p,m=s(c({},m),{[r]:c(c({},m[r]),w)}),b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(f=!0===b.rects?yield l.getElementRects({reference:t,floating:e,strategy:i}):b.rects),({x:d,y:p}=W(f,h,u))),n=-1)}return{x:d,y:p,placement:h,strategy:i,middlewareData:m}}))(t,e,s(c({},i),{platform:r}))})(e.anchorEl,o.value,{placement:null!=(n=e.placement)?n:"top",middleware:r,strategy:"fixed"});var f;i.value.transform=`translate3d(${Math.round(l)}px, ${Math.round(a)}px, 0)`,i.value.left="0px",i.value.top="0px"})}return f.watch(()=>e.visible,t=>u(this,null,function*(){if(t)if(r.value=!1,yield f.nextTick(),e.anchorEl&&o.value)try{const t=e.anchorEl.getBoundingClientRect();yield a();const n=i.value.transform;if(null!=e.originX&&null!=e.originY){const o=Math.abs(Number(e.originX)-t.left),l=Math.abs(Number(e.originY)-t.top);Math.hypot(o,l)>120?(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield f.nextTick(),r.value=!0,yield f.nextTick(),i.value.transform=n):r.value=!0}else r.value=!0;l=Pt(e.anchorEl,o.value,a)}catch(n){yield a(),r.value=!0,l=Pt(e.anchorEl,o.value,a)}else r.value=!0;else r.value=!1,l&&(l(),l=null)})),f.watch([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>u(this,null,function*(){e.visible&&e.anchorEl&&o.value&&(yield f.nextTick(),yield a())})),f.onBeforeUnmount(()=>{l&&l()}),{__sfc:!0,props:e,isDarkEffective:n,tooltip:o,style:i,ready:r,cleanupAutoUpdate:l,updatePosition:a,Portal:d.Portal}}});var Mt=function(){var t=this,e=t._self._c,n=t._self._setupProxy;return e(n.Portal,{attrs:{to:"body"}},[e("div",{staticClass:"markstream-vue2"},[e("transition",{attrs:{name:"tooltip",appear:""}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible&&n.ready,expression:"visible && ready"}],ref:"tooltip",staticClass:"z-[9999] inline-block text-base py-2 px-3 rounded-md shadow-md whitespace-nowrap pointer-events-none tooltip-element border",class:[n.isDarkEffective?"bg-gray-900 text-white border-gray-700 border is-dark":"bg-white text-gray-900 border-gray-200 border"],style:{position:"fixed",left:n.style.left,top:n.style.top,transform:n.style.transform},attrs:{id:n.props.id,role:"tooltip"}},[t._v(" "+t._s(t.content)+" ")])])],1)])},Ft=[];const Bt=d.normalizeComponent(Ct,Mt,Ft,!1,null,"401f7c22",null,null).exports;exports.default=Bt;
|