@kedataindo/docflow-vue 0.0.75 → 0.0.77
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.js +40 -19
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -15232,7 +15232,7 @@ ${n.innerHTML}
|
|
|
15232
15232
|
</terms>
|
|
15233
15233
|
</locale>
|
|
15234
15234
|
`,g5=b5,Ta={"chicago-notes-bibliography":{id:"chicago-notes-bibliography",name:"Chicago (notes & bibliography)",category:"note",xml:c5},"chicago-author-date":{id:"chicago-author-date",name:"Chicago (author-date)",category:"in-text",xml:d5},apa:{id:"apa",name:"APA",category:"in-text",xml:p5},"modern-language-association":{id:"modern-language-association",name:"MLA",category:"in-text",xml:h5}},v5="chicago-notes-bibliography",x5=g5,jd=0;function mh(){return jd+=1,`cite-${Date.now().toString(36)}-${jd.toString(36)}`}var y5=/^<\/?(i|b|em|strong|sup|sub|span|nobr)( style="font-variant: ?small-caps;?")?\/?>$|^<div class="csl-entry">$|^<\/div>$/;function $d(e){return e.replace(/<[^>]*>/g,t=>y5.test(t)?t:t.replace(/</g,"<").replace(/>/g,">"))}var k5=class{constructor(e={}){kn(this,"sources",new Map);kn(this,"style");kn(this,"clusters",new Map);kn(this,"order",[]);kn(this,"rendered",new Map);kn(this,"bibliography",[]);kn(this,"listeners",new Set);kn(this,"lastSignature","");this.style=e.style&&Ta[e.style]?e.style:v5,this.updateSources(e.sources??[],!1)}getStyle(){return this.style}isNoteStyle(){var e;return((e=Ta[this.style])==null?void 0:e.category)==="note"}getSource(e){return this.sources.get(e)}getSourceIds(){return[...this.sources.keys()]}getCitedSourceIds(){const e=new Set;for(const t of this.clusters.values())t.sourceId&&e.add(t.sourceId);return[...e]}setStyle(e){!Ta[e]||e===this.style||(this.style=e,this.recompute(),this.emitChange())}updateSources(e,t=!0){this.sources=new Map(e.map(n=>[n.id,n])),this.recompute(),t&&this.emitChange()}onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}syncCitations(e){const t=e.map(n=>{const i=n.attrs;return`${n.citationId}|${i.sourceId??""}|${i.locator??""}|${i.label??""}|${i.mode??""}|${i.prefix??""}|${i.suffix??""}`}).join(`
|
|
15235
|
-
`);return t===this.lastSignature?!1:(this.lastSignature=t,this.clusters=new Map(e.map(n=>[n.citationId,n.attrs])),this.order=e.map(n=>n.citationId),this.recompute(),this.emitChange(),!0)}renderCluster(e){return this.rendered.get(e)??""}getBibliography(){return this.bibliography}emitChange(){for(const e of this.listeners)e()}recompute(){const e=Ta[this.style],t=new F3.Engine({retrieveLocale:()=>x5,retrieveItem:a=>this.sources.get(a)},e.xml,"en-US"),n=new Map,i=[];let r=0;for(const a of this.order){const o=this.clusters.get(a);if(!(o!=null&&o.sourceId)||!this.sources.has(o.sourceId)){n.set(a,"");continue}r+=1;try{const[,l]=t.processCitationCluster({citationID:a,citationItems:[{id:o.sourceId,locator:o.locator||void 0,label:o.label||void 0,prefix:o.prefix||void 0,suffix:o.suffix||void 0,"suppress-author":o.mode==="suppress-author"||void 0,"author-only":o.mode==="author-only"||void 0}],properties:{noteIndex:e.category==="note"?r:0}},i,[]);i.push([a,r]);for(const[,c,u]of l??[])n.set(u,$d(c));n.has(a)||n.set(a,"")}catch{n.set(a,"")}}this.rendered=n;try{const a=t.makeBibliography();this.bibliography=a?a[1].map(o=>$d(o).trim()):[]}catch{this.bibliography=[]}}};function Wd(e){const t=e.storage.citationEngine;return(t==null?void 0:t.engine)??null}var w5=Ae.create({name:"bibliography",group:"block",selectable:!0,draggable:!0,atom:!0,parseHTML(){return[{tag:'div[data-node-type="bibliography"]'}]},renderHTML({HTMLAttributes:e}){return["div",Fe(e,{"data-node-type":"bibliography",class:"docs-bibliography"})]},addNodeView(){return e=>{const t=e.editor,n=document.createElement("div");n.className="docs-bibliography",n.setAttribute("data-node-type","bibliography");
|
|
15235
|
+
`);return t===this.lastSignature?!1:(this.lastSignature=t,this.clusters=new Map(e.map(n=>[n.citationId,n.attrs])),this.order=e.map(n=>n.citationId),this.recompute(),this.emitChange(),!0)}renderCluster(e){return this.rendered.get(e)??""}getBibliography(){return this.bibliography}emitChange(){for(const e of this.listeners)e()}recompute(){const e=Ta[this.style],t=new F3.Engine({retrieveLocale:()=>x5,retrieveItem:a=>this.sources.get(a)},e.xml,"en-US"),n=new Map,i=[];let r=0;for(const a of this.order){const o=this.clusters.get(a);if(!(o!=null&&o.sourceId)||!this.sources.has(o.sourceId)){n.set(a,"");continue}r+=1;try{const[,l]=t.processCitationCluster({citationID:a,citationItems:[{id:o.sourceId,locator:o.locator||void 0,label:o.label||void 0,prefix:o.prefix||void 0,suffix:o.suffix||void 0,"suppress-author":o.mode==="suppress-author"||void 0,"author-only":o.mode==="author-only"||void 0}],properties:{noteIndex:e.category==="note"?r:0}},i,[]);i.push([a,r]);for(const[,c,u]of l??[])n.set(u,$d(c));n.has(a)||n.set(a,"")}catch{n.set(a,"")}}this.rendered=n;try{const a=t.makeBibliography();this.bibliography=a?a[1].map(o=>$d(o).trim()):[]}catch{this.bibliography=[]}}};function Wd(e){const t=e.storage.citationEngine;return(t==null?void 0:t.engine)??null}var w5=Ae.create({name:"bibliography",group:"block",selectable:!0,draggable:!0,atom:!0,addAttributes(){return{showHeading:{default:!0,parseHTML:e=>e.getAttribute("data-show-heading")!=="false",renderHTML:e=>e.showHeading===!1?{"data-show-heading":"false"}:{}},headingText:{default:"Bibliography",parseHTML:e=>e.getAttribute("data-heading-text")||"Bibliography",renderHTML:e=>typeof e.headingText=="string"&&e.headingText!=="Bibliography"?{"data-heading-text":e.headingText}:{}}}},parseHTML(){return[{tag:'div[data-node-type="bibliography"]'}]},renderHTML({HTMLAttributes:e}){return["div",Fe(e,{"data-node-type":"bibliography",class:"docs-bibliography"})]},addNodeView(){return e=>{var l;const t=e.editor,n=document.createElement("div");n.className="docs-bibliography",n.setAttribute("data-node-type","bibliography");let i=((l=e.node)==null?void 0:l.attrs)??{};const r=()=>{const c=Wd(t),u=(c==null?void 0:c.getBibliography())??[],f=i.showHeading!==!1,m=typeof i.headingText=="string"?i.headingText:"Bibliography";if(n.innerHTML="",u.length===0){if(!f)return;const h=document.createElement("p");h.className="docs-bibliography__empty",h.textContent=m,n.appendChild(h);return}if(f){const h=document.createElement("h2");h.className="docs-bibliography__heading",h.textContent=m,n.appendChild(h)}const p=document.createElement("div");p.className="docs-bibliography__entries";for(const h of u){const g=document.createElement("p");g.className="docs-bibliography__entry",g.innerHTML=h,p.appendChild(g)}n.appendChild(p)};r();const a=Wd(t),o=a==null?void 0:a.onChange(r);return{dom:n,update(c){var m;if(((m=c==null?void 0:c.type)==null?void 0:m.name)!=="bibliography")return!1;const u=c.attrs??{},f=u.showHeading!==i.showHeading||u.headingText!==i.headingText;return i=u,f&&r(),!0},destroy(){o==null||o()}}}}});function hh(e,t){const n=mh();return e.isNoteStyle()?{type:"footnote",attrs:{content:"",sourceId:t.sourceId,locator:t.locator??"",citationId:n}}:{type:"citation",attrs:{citationId:n,sourceId:t.sourceId,locator:t.locator??""}}}function Ui(e){return e.storage.citationEngine?e.storage.citationEngine.engine??null:null}var _5=Ke.create({name:"citationEngine",addStorage(){return{engine:null}},onUpdate(){var r,a;const e=this.editor,t=Ui(e);if(!t)return;{const o=new Set,l=[];if(e.state.doc.descendants((c,u)=>{if(c.type.name==="citation"||c.type.name==="footnote"&&c.attrs.sourceId){const f=c.attrs.citationId;f&&(o.has(f)?l.push({pos:u,attrs:{...c.attrs}}):o.add(f))}return!0}),l.length>0){const c=e.state.tr;for(const{pos:u,attrs:f}of l)c.setNodeMarkup(u,void 0,{...f,citationId:mh()});e.view.dispatch(c);return}}const n=[];if(e.state.doc.descendants((o,l)=>((o.type.name==="citation"||o.type.name==="footnote"&&o.attrs.sourceId)&&n.push({citationId:o.attrs.citationId??`anon-${l}`,attrs:{sourceId:o.attrs.sourceId??null,locator:o.attrs.locator||"",label:o.attrs.label||"page",mode:o.attrs.mode||"normal",prefix:o.attrs.prefix||"",suffix:o.attrs.suffix||""}}),!0)),t.syncCitations(n)){const o=e.storage.editorContext;(a=(r=o==null?void 0:o.citation)==null?void 0:r.onSourcesChange)==null||a.call(r,t.getCitedSourceIds())}{const o=[];if(e.state.doc.descendants((l,c)=>{if(l.type.name==="footnote"&&l.attrs.sourceId){const u=l.attrs.citationId;if(!u)return!0;const f=t.renderCluster(u);f&&f!==l.attrs.content&&o.push({pos:c,content:f})}return!0}),o.length>0){const l=e.state.tr;for(const{pos:c,content:u}of o){const f=e.state.doc.nodeAt(c);f&&l.setNodeMarkup(c,void 0,{...f.attrs,content:u})}e.view.dispatch(l)}}}}),S5=Ae.create({name:"citation",group:"inline",inline:!0,selectable:!0,draggable:!1,atom:!0,addAttributes(){return{citationId:{default:null,parseHTML:e=>e.getAttribute("data-citation-id"),renderHTML:e=>({"data-citation-id":e.citationId})},sourceId:{default:null,parseHTML:e=>e.getAttribute("data-citation-source-id"),renderHTML:e=>({"data-citation-source-id":e.sourceId})},locator:{default:"",parseHTML:e=>e.getAttribute("data-citation-locator")??"",renderHTML:e=>({"data-citation-locator":e.locator})},label:{default:"page",parseHTML:e=>e.getAttribute("data-citation-label")??"page",renderHTML:e=>({"data-citation-label":e.label})},mode:{default:"normal",parseHTML:e=>e.getAttribute("data-citation-mode")??"normal",renderHTML:e=>({"data-citation-mode":e.mode})},prefix:{default:""},suffix:{default:""}}},parseHTML(){return[{tag:'span[data-node-type="citation"]'}]},renderHTML({HTMLAttributes:e}){return["span",Fe(e,{"data-node-type":"citation",class:"docs-citation"}),""]},addNodeView(){return e=>{const t=e.editor,n=e.node??e,i=document.createElement("span");i.className="docs-citation",i.setAttribute("data-node-type","citation");const r=()=>{const l=Ui(t),c=n.attrs.citationId,u=l&&c?l.renderCluster(c):"";u?(i.innerHTML=u,i.classList.remove("docs-citation--missing")):(i.textContent="[?]",i.classList.add("docs-citation--missing")),i.setAttribute("data-citation-id",String(n.attrs.citationId??"")),i.setAttribute("data-citation-source-id",String(n.attrs.sourceId??""))};r();const a=Ui(t),o=a==null?void 0:a.onChange(r);return{dom:i,update(l){var c;if(((c=l==null?void 0:l.type)==null?void 0:c.name)!=="citation")return!1;try{Object.assign(n.attrs,l.attrs),r()}catch{}return!0},destroy(){o==null||o()}}}}});function Gd(e,t,n){const i=hh(t,n);return i.type==="footnote"&&!e.schema.nodes.footnote?!1:e.chain().focus().insertContent({type:i.type,attrs:i.attrs}).run()}Ee.definePlugin({id:"citation",tiptapExtensions:[_5,S5,w5],toolbar:[{id:"insert-citation",label:"Citation",action:"insertCitation",iconComponent:"Quote"}],slashCommands:[{name:"Citation",command:"insertCitation"},{name:"Bibliography",command:"insertBibliography"}],commands:{insertCitation:(e,...t)=>{var o;const n=Ui(e);if(!n)return console.warn("[citation] no citation engine — inject the CitationPort to enable citations"),!1;const i=t[0];if(i!=null&&i.sourceId)return Gd(e,n,{sourceId:i.sourceId,locator:i.locator});const r=e.storage.editorContext,a=(o=r==null?void 0:r.citation)==null?void 0:o.onSourceRequest;return a?(a().then(l=>{l&&Gd(e,n,{sourceId:l})}),!0):!1},insertBibliography:e=>{let t=!1;return e.state.doc.descendants(n=>(n.type.name==="bibliography"&&(t=!0),!t)),t?!1:e.chain().focus().insertContent({type:"bibliography"}).run()},setCitationStyle:(e,...t)=>{const n=Ui(e),i=t[0];return!n||!i?!1:(n.setStyle(i),!0)}},hooks:{onInit(e){const t=e.storage.editorContext,n=t==null?void 0:t.citation;if(!n)return;const i=typeof n.sources=="function"?n.sources():n.sources,r=new k5({sources:i,style:n.style});e.storage.citationEngine.engine=r},onDestroy(e){e.storage.citationEngine.engine=null}}});function C5(e){const t=e.storage.markdown;if(!t||typeof t!="object")return;const n=t.parser;if(!(!n||typeof n!="object"||!("parse"in n)))return n}function bh(e,t,n){const i=C5(e);if(!i)return null;let r;try{r=i.parse(t,{inline:n.inline})}catch{return null}if(typeof r!="string")return null;const a=Pi(r,e.schema,{slice:!0,parseOptions:{preserveWhitespace:"full"}});if(a instanceof J)return a;const o=a;return o&&typeof o.forEach=="function"&&typeof o.size=="number"?o:J.from(a)}function E5(e,t,n){const i=e.steps.length-1;if(i<t)return;const r=e.steps[i];if(!(r instanceof Ze||r instanceof Ye))return;const a=e.mapping.maps[i];let o=0;a.forEach((l,c,u,f)=>{o===0&&(o=f)}),e.setSelection(ke.near(e.doc.resolve(o),n))}function Kd(e,t,n,i,r){const a=bh(e,r,{inline:!1});if(!a){t.dispatch(t.state.tr.insertText(r,n,i));return}const o=t.state.tr;let l=n,c=i;if(l===c){let f=!0;if(a.forEach(m=>{m.isBlock||(f=!1)}),f){const p=o.doc.resolve(l).parent;p.isTextblock&&!p.type.spec.code&&!p.childCount&&(l-=1,c+=1)}}let u=!0;if(a.forEach(f=>{(!f.isText||f.marks.length>0)&&(u=!1)}),u){let f="";a.forEach(m=>{m.isText&&(f+=m.text??"")}),o.insertText(f,l,c)}else o.replaceWith(l,c,a);E5(o,0,-1),t.dispatch(o)}var at=new rt("docflow-ai"),Xd=1500;function Nl(e){var t;return(t=e.storage.editorContext)==null?void 0:t.aiStream}function Jd(e,t,n){return{before:e.doc.textBetween(Math.max(0,t-Xd),t,`
|
|
15236
15236
|
`," "),after:e.doc.textBetween(n,Math.min(e.doc.content.size,n+Xd),`
|
|
15237
15237
|
`," ")}}function Zd(e,t,n){const i=Nl(e);i&&(async()=>{const r=a=>{n.signal.aborted||e.isDestroyed||e.view.dispatch(e.state.tr.setMeta(at,a))};try{for await(const a of i(t,n.signal)){if(n.signal.aborted||e.isDestroyed)return;r({type:"chunk",text:a})}r({type:"done"})}catch(a){r({type:"error",message:a instanceof Error?a.message:"AI request failed"})}})()}function Qd(e){var n;const t=e.storage.ai;(n=t.abort)==null||n.abort(),t.abort=null}var A5=Ke.create({name:"ai",addStorage(){return{preview:null,abort:null}},addCommands(){return{aiTransform:e=>({editor:t,state:n,dispatch:i})=>{if(at.getState(n))return!1;if(!Nl(t))return console.warn("[ai] no aiStream port injected — AI actions are inert"),!1;const{from:r,to:a,empty:o}=n.selection;if(o)return!1;const l=n.doc.textBetween(r,a,`
|
|
15238
15238
|
`," ");if(!l.trim())return!1;const c=new AbortController;t.storage.ai.abort=c,i==null||i(n.tr.setMeta(at,{type:"start",mode:"transform",status:"streaming",from:r,to:a,originalText:l,action:e.action}));const u={action:e.action,selection:l,context:Jd(n,r,a),...e.prompt?{prompt:e.prompt}:{}};return Zd(t,u,c),!0},aiGenerate:()=>({editor:e,state:t,dispatch:n})=>{if(at.getState(t))return!1;if(!Nl(e))return console.warn("[ai] no aiStream port injected — AI actions are inert"),!1;const i=t.selection.to;return n==null||n(t.tr.setMeta(at,{type:"start",mode:"generate",status:"prompt",from:i,to:i,originalText:"",action:"generate"})),!0},aiPromptSubmit:e=>({editor:t,state:n,dispatch:i})=>{var c;const r=at.getState(n);if(!r||r.mode!=="generate"||r.status!=="prompt")return!1;const a=(c=e.prompt)==null?void 0:c.trim();if(!a)return!1;const o=new AbortController;t.storage.ai.abort=o,i==null||i(n.tr.setMeta(at,{type:"start",mode:"generate",status:"streaming",from:r.from,to:r.to,originalText:"",action:"generate"}));const l={action:"generate",prompt:a,context:Jd(n,r.from,r.to)};return Zd(t,l,o),t.commands.focus(),!0},aiAccept:()=>({editor:e,state:t,dispatch:n})=>{const i=at.getState(t);if(!i||i.status==="prompt")return!1;if(Qd(e),!n)return!0;const r=t.tr;if(i.text.trim()){const a=bh(e,i.text,{inline:!0});a?r.replaceWith(i.from,i.to,a):r.replaceWith(i.from,i.to,t.schema.text(i.text))}return r.setMeta(at,{type:"clear"}),n(r),!0},aiReject:()=>({editor:e,state:t,dispatch:n})=>at.getState(t)?(Qd(e),n==null||n(t.tr.setMeta(at,{type:"clear"})),!0):!1}},addProseMirrorPlugins(){const e=this.editor;let t=null;function n(){if(t)return t;const r=document.createElement("span");r.className="docs-ai-prompt";const a=document.createElement("input");return a.type="text",a.className="docs-ai-prompt__input",a.placeholder="Ask AI to write… (Enter ⏎ · Esc cancel)",a.addEventListener("keydown",o=>{o.key==="Enter"?(o.preventDefault(),e.commands.aiPromptSubmit({prompt:a.value})):o.key==="Escape"&&(o.preventDefault(),e.commands.aiReject())}),a.addEventListener("blur",()=>{const o=at.getState(e.state);(o==null?void 0:o.status)==="prompt"&&e.commands.aiReject()}),r.appendChild(a),setTimeout(()=>a.focus(),0),t={dom:r,stopEvent:o=>o.target instanceof Node&&r.contains(o.target)},t}function i(r){const a=document.createElement("span");let o=null;if(r.status==="error")a.className="docs-ai-ghost docs-ai-ghost--error",a.textContent=` ${r.error??"AI error"} — press Esc`;else{a.className="docs-ai-ghost";const l=document.createElement("span");if(!r.text&&r.status==="streaming"?(l.textContent="AI writing…",l.className="docs-ai-ghost-placeholder"):l.textContent=r.text+(r.status==="streaming"?"▌":""),a.appendChild(l),r.status==="done"){o=document.createElement("span"),o.className="docs-ai-ghost-actions";const c=document.createElement("button");c.type="button",c.className="docs-ai-ghost-btn docs-ai-ghost-btn--accept",c.textContent="✓ Accept",c.title="Accept (Enter)",c.addEventListener("mousedown",f=>{f.preventDefault(),e.commands.aiAccept()});const u=document.createElement("button");u.type="button",u.className="docs-ai-ghost-btn docs-ai-ghost-btn--reject",u.textContent="✗ Reject",u.title="Reject (Esc)",u.addEventListener("mousedown",f=>{f.preventDefault(),e.commands.aiReject()}),o.appendChild(c),o.appendChild(u),a.appendChild(o)}}return{dom:a,stopEvent:l=>o!==null&&l.target instanceof Node&&o.contains(l.target)}}return[new ct({key:at,state:{init:()=>null,apply(r,a){const o=r.getMeta(at);if(o)switch(o.type){case"start":return{mode:o.mode,status:o.status,from:o.from,to:o.to,originalText:o.originalText,text:"",action:o.action};case"chunk":return a&&{...a,text:a.text+o.text};case"done":return a&&{...a,status:"done"};case"error":return a&&{...a,status:"error",error:o.message};case"clear":return null}if(!a)return a;if(a.status==="prompt"&&r.selectionSet)return null;if(r.docChanged){if(a.mode==="generate"){const u=r.mapping.map(a.from,1);return{...a,from:u,to:u}}const l=r.mapping.map(a.from,-1),c=r.mapping.map(a.to,1);return c<=l||r.doc.textBetween(l,c,`
|
package/dist/index.js
CHANGED
|
@@ -46330,6 +46330,20 @@ var dA = qe.create({
|
|
|
46330
46330
|
selectable: !0,
|
|
46331
46331
|
draggable: !0,
|
|
46332
46332
|
atom: !0,
|
|
46333
|
+
addAttributes() {
|
|
46334
|
+
return {
|
|
46335
|
+
showHeading: {
|
|
46336
|
+
default: !0,
|
|
46337
|
+
parseHTML: (e) => e.getAttribute("data-show-heading") !== "false",
|
|
46338
|
+
renderHTML: (e) => e.showHeading === !1 ? { "data-show-heading": "false" } : {}
|
|
46339
|
+
},
|
|
46340
|
+
headingText: {
|
|
46341
|
+
default: "Bibliography",
|
|
46342
|
+
parseHTML: (e) => e.getAttribute("data-heading-text") || "Bibliography",
|
|
46343
|
+
renderHTML: (e) => typeof e.headingText == "string" && e.headingText !== "Bibliography" ? { "data-heading-text": e.headingText } : {}
|
|
46344
|
+
}
|
|
46345
|
+
};
|
|
46346
|
+
},
|
|
46333
46347
|
parseHTML() {
|
|
46334
46348
|
return [{ tag: 'div[data-node-type="bibliography"]' }];
|
|
46335
46349
|
},
|
|
@@ -46347,36 +46361,43 @@ var dA = qe.create({
|
|
|
46347
46361
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46348
46362
|
addNodeView() {
|
|
46349
46363
|
return (e) => {
|
|
46364
|
+
var s;
|
|
46350
46365
|
const t = e.editor, i = document.createElement("div");
|
|
46351
46366
|
i.className = "docs-bibliography", i.setAttribute("data-node-type", "bibliography");
|
|
46352
|
-
|
|
46353
|
-
|
|
46354
|
-
|
|
46355
|
-
|
|
46356
|
-
|
|
46367
|
+
let n = ((s = e.node) == null ? void 0 : s.attrs) ?? {};
|
|
46368
|
+
const r = () => {
|
|
46369
|
+
const l = Sd(t), u = (l == null ? void 0 : l.getBibliography()) ?? [], f = n.showHeading !== !1, p = typeof n.headingText == "string" ? n.headingText : "Bibliography";
|
|
46370
|
+
if (i.innerHTML = "", u.length === 0) {
|
|
46371
|
+
if (!f) return;
|
|
46372
|
+
const m = document.createElement("p");
|
|
46373
|
+
m.className = "docs-bibliography__empty", m.textContent = p, i.appendChild(m);
|
|
46357
46374
|
return;
|
|
46358
46375
|
}
|
|
46359
|
-
|
|
46360
|
-
|
|
46361
|
-
|
|
46362
|
-
|
|
46363
|
-
|
|
46364
|
-
|
|
46365
|
-
|
|
46376
|
+
if (f) {
|
|
46377
|
+
const m = document.createElement("h2");
|
|
46378
|
+
m.className = "docs-bibliography__heading", m.textContent = p, i.appendChild(m);
|
|
46379
|
+
}
|
|
46380
|
+
const d = document.createElement("div");
|
|
46381
|
+
d.className = "docs-bibliography__entries";
|
|
46382
|
+
for (const m of u) {
|
|
46383
|
+
const b = document.createElement("p");
|
|
46384
|
+
b.className = "docs-bibliography__entry", b.innerHTML = m, d.appendChild(b);
|
|
46366
46385
|
}
|
|
46367
|
-
i.appendChild(
|
|
46386
|
+
i.appendChild(d);
|
|
46368
46387
|
};
|
|
46369
|
-
|
|
46370
|
-
const
|
|
46388
|
+
r();
|
|
46389
|
+
const a = Sd(t), o = a == null ? void 0 : a.onChange(r);
|
|
46371
46390
|
return {
|
|
46372
46391
|
dom: i,
|
|
46373
46392
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46374
|
-
update(
|
|
46375
|
-
var
|
|
46376
|
-
|
|
46393
|
+
update(l) {
|
|
46394
|
+
var p;
|
|
46395
|
+
if (((p = l == null ? void 0 : l.type) == null ? void 0 : p.name) !== "bibliography") return !1;
|
|
46396
|
+
const u = l.attrs ?? {}, f = u.showHeading !== n.showHeading || u.headingText !== n.headingText;
|
|
46397
|
+
return n = u, f && r(), !0;
|
|
46377
46398
|
},
|
|
46378
46399
|
destroy() {
|
|
46379
|
-
|
|
46400
|
+
o == null || o();
|
|
46380
46401
|
}
|
|
46381
46402
|
};
|
|
46382
46403
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kedataindo/docflow-vue",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.77",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"lucide-vue-next": "^1.0.0",
|
|
26
26
|
"prosemirror-model": "^1.25.11",
|
|
27
|
-
"@kedataindo/docflow-core": "0.0.
|
|
28
|
-
"@kedataindo/docflow-layout-engine": "0.0.
|
|
29
|
-
"@kedataindo/docflow-plugins": "0.0.
|
|
27
|
+
"@kedataindo/docflow-core": "0.0.74",
|
|
28
|
+
"@kedataindo/docflow-layout-engine": "0.0.73",
|
|
29
|
+
"@kedataindo/docflow-plugins": "0.0.76"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"vue": "^3.5.0"
|