@oyat/editor 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/mention-kit.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU;;;;;;;
|
|
1
|
+
{"version":3,"file":"mention-kit.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/plugins/mention-kit.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU;;;;;;;eAQ4B,CAAC;;;iHADnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-combobox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/inline-combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAS,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EACL,KAAK,iBAAiB,EAEtB,aAAa,EACb,kBAAkB,EAElB,eAAe,EAMhB,MAAM,gBAAgB,CAAC;AAYxB,KAAK,QAAQ,GAAG,CACd,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5E,MAAM,EAAE,MAAM,KACX,OAAO,CAAC;AA6Bb,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,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,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;KAChD;;CA8CA,CAAC;AAIF,QAAA,MAAM,qBAAqB,EAAE,OAAO,eAgBnC,CAAC;AAiBF,QAAA,MAAM,kBAAkB,GAAI,uEAQzB;IACD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,iBAAiB,GACnB,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,mDA4B3C,CAAC;AAEF,QAAA,MAAM,mBAAmB,GAAI,0BAG1B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,mDAsBtC,CAAC;AAEF,QAAA,MAAM,iBAAiB,8IAAc,CAAC;AAEtC,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,2CAU5C;AAED,iBAAS,wBAAwB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,2CAUjD;AAED,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,GAClB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -466,7 +466,7 @@ return bl.jsxs("div",{className:_l("fixed top-0 left-0 z-50 h-screen w-screen se
|
|
|
466
466
|
/* @__PURE__ */bl.jsx("span",{children:"%"})]}):/* @__PURE__ */bl.jsx("span",{...u,children:100*r+"%"})}),
|
|
467
467
|
/* @__PURE__ */bl.jsx("button",{className:_l(Wu({variant:p?"disabled":"default"})),...x,type:"button",children:/* @__PURE__ */bl.jsx(Mr,{className:"size-4"})})]}),
|
|
468
468
|
/* @__PURE__ */bl.jsx("button",{className:_l(Wu()),type:"button",children:/* @__PURE__ */bl.jsx(Fr,{className:"size-4"})}),
|
|
469
|
-
/* @__PURE__ */bl.jsx("button",{...n,className:_l(Wu()),type:"button",children:/* @__PURE__ */bl.jsx(Lr,{className:"size-4"})})]})]})})]})},node:Fu}}),en.withComponent(Ru),dn.withComponent(Yu),un.withComponent(Su),mn.withComponent(Mu),Ks.configure({options:{disableEmptyPlaceholder:!0},render:{afterEditable:function(){return Ku(),null},node:Uu}}),Mo.configure({options:{query:{allow:[q.img,q.video,q.audio,q.file,q.mediaEmbed]}}})];const Qu=e.createContext(null),Ju=({group:e,keywords:t=[],label:r,value:s},n)=>{const o=new Set([s,...t,e,r].filter(Boolean));return Array.from(o).some(e=>ra(e,n))},Xu=({children:t,element:r,filter:s=Ju,hideWhenNoValue:n=!1,setValue:o,showTrigger:a=!0,trigger:l,value:i})=>{const c=m(),d=e.useRef(null),u=sa(d),[h,p]=e.useState(""),x=void 0!==i,f=x?i:h,g=e.useCallback(e=>{o?.(e),x||p(e)},[o,x]),
|
|
469
|
+
/* @__PURE__ */bl.jsx("button",{...n,className:_l(Wu()),type:"button",children:/* @__PURE__ */bl.jsx(Lr,{className:"size-4"})})]})]})})]})},node:Fu}}),en.withComponent(Ru),dn.withComponent(Yu),un.withComponent(Su),mn.withComponent(Mu),Ks.configure({options:{disableEmptyPlaceholder:!0},render:{afterEditable:function(){return Ku(),null},node:Uu}}),Mo.configure({options:{query:{allow:[q.img,q.video,q.audio,q.file,q.mediaEmbed]}}})];const Qu=e.createContext(null),Ju=({group:e,keywords:t=[],label:r,value:s},n)=>{const o=new Set([s,...t,e,r].filter(Boolean));return Array.from(o).some(e=>ra(e,n))},Xu=({children:t,element:r,filter:s=Ju,hideWhenNoValue:n=!1,setValue:o,showTrigger:a=!0,trigger:l,value:i})=>{const c=m(),d=e.useRef(null),u=sa(d),[h,p]=e.useState(""),x=void 0!==i,f=x?i:h,g=e.useMemo(()=>{const e=r.userId,t=c.meta.userId;return!e||e===t},[c.meta.userId,r]),b=e.useCallback(e=>{o?.(e),x||p(e)},[o,x]),j=e.useRef(null);e.useEffect(()=>{const e=c.api.findPath(r);if(!e)return;const t=c.api.before(e);if(!t)return;const s=c.api.pointRef(t);return j.current=s.current,()=>{s.unref()}},[c,r]);const{props:v,removeInput:y}=na({cancelInputOnBlur:!0,cursorState:u,autoFocus:g,ref:d,onCancelInput:e=>{"backspace"!==e&&c.tf.insertText(l+f,{at:j?.current??void 0}),"arrowLeft"!==e&&"arrowRight"!==e||c.tf.move({distance:1,reverse:"arrowLeft"===e})}}),[w,k]=e.useState(!1),N=e.useMemo(()=>({filter:s,inputProps:v,inputRef:d,removeInput:y,setHasEmpty:k,showTrigger:a,trigger:l}),[l,a,s,d,v,y,k]),C=Zo({setValue:t=>e.startTransition(()=>b(t))}),_=C.useState("items");return e.useEffect(()=>{C.getState().activeId||C.setActiveId(C.first())},[_,C]),/* @__PURE__ */bl.jsx("span",{contentEditable:!1,children:/* @__PURE__ */bl.jsx(Ko,{open:(_.length>0||w)&&(!n||f.length>0),store:C,children:/* @__PURE__ */bl.jsx(Qu.Provider,{value:N,children:t})})})},em=({className:t,ref:r,...s})=>{const{inputProps:n,inputRef:o,showTrigger:a,trigger:l}=e.useContext(Qu),i=Yo().useState("value"),c=A(r,o);/* @__PURE__ */
|
|
470
470
|
return bl.jsxs(bl.Fragment,{children:[a&&l,
|
|
471
471
|
/* @__PURE__ */bl.jsxs("span",{className:"relative min-h-[1lh]",children:[
|
|
472
472
|
/* @__PURE__ */bl.jsx("span",{className:"invisible overflow-hidden text-nowrap","aria-hidden":"true",children:i||""}),
|
|
@@ -766,9 +766,9 @@ return bl.jsxs(r,{...t,as:e?"th":"td",className:_l("h-full overflow-visible bord
|
|
|
766
766
|
/* @__PURE__ */bl.jsx("div",{className:"relative z-20 box-border h-full px-3 py-2",style:{minHeight:g},children:t.children}),!h&&/* @__PURE__ */bl.jsx("div",{className:"group absolute top-0 size-full select-none",contentEditable:!1,suppressContentEditableWarning:!0,children:!o&&/* @__PURE__ */bl.jsxs(bl.Fragment,{children:[
|
|
767
767
|
/* @__PURE__ */bl.jsx(Tu,{...N,className:"-top-2 -right-1 h-[calc(100%_+_8px)] w-2","data-col":x}),
|
|
768
768
|
/* @__PURE__ */bl.jsx(Tu,{...y,className:"-bottom-1 h-2"}),!w&&/* @__PURE__ */bl.jsx(Tu,{...k,className:"-left-1 top-0 w-2","data-resizer-left":0===x?"true":void 0}),
|
|
769
|
-
/* @__PURE__ */bl.jsx("div",{className:_l("absolute top-0 z-30 hidden h-full w-1 bg-ring","right-[-1.5px]",Gm({colIndex:x}))}),0===x&&/* @__PURE__ */bl.jsx("div",{className:_l("absolute top-0 z-30 h-full w-1 bg-ring","left-[-1.5px]",'fade-in hidden animate-in group-has-[[data-resizer-left]:hover]/table:block group-has-[[data-resizer-left][data-resizing="true"]]/table:block')})]})}),m&&/* @__PURE__ */bl.jsx("div",{className:Ml(),contentEditable:!1})]})}const Gm=tt("fade-in hidden animate-in",{variants:{colIndex:{0:'group-has-[[data-col="0"]:hover]/table:block group-has-[[data-col="0"][data-resizing="true"]]/table:block',1:'group-has-[[data-col="1"]:hover]/table:block group-has-[[data-col="1"][data-resizing="true"]]/table:block',2:'group-has-[[data-col="2"]:hover]/table:block group-has-[[data-col="2"][data-resizing="true"]]/table:block',3:'group-has-[[data-col="3"]:hover]/table:block group-has-[[data-col="3"][data-resizing="true"]]/table:block',4:'group-has-[[data-col="4"]:hover]/table:block group-has-[[data-col="4"][data-resizing="true"]]/table:block',5:'group-has-[[data-col="5"]:hover]/table:block group-has-[[data-col="5"][data-resizing="true"]]/table:block',6:'group-has-[[data-col="6"]:hover]/table:block group-has-[[data-col="6"][data-resizing="true"]]/table:block',7:'group-has-[[data-col="7"]:hover]/table:block group-has-[[data-col="7"][data-resizing="true"]]/table:block',8:'group-has-[[data-col="8"]:hover]/table:block group-has-[[data-col="8"][data-resizing="true"]]/table:block',9:'group-has-[[data-col="9"]:hover]/table:block group-has-[[data-col="9"][data-resizing="true"]]/table:block',10:'group-has-[[data-col="10"]:hover]/table:block group-has-[[data-col="10"][data-resizing="true"]]/table:block'}}}),Qm=[Gn.withComponent(Um),so.withComponent(function({children:e,...t}){const{element:o}=t,a=s(),l=n(),i=m(),c=d(ot,"isSelectionAreaVisible"),u=!a&&!c,{isDragging:h,
|
|
770
|
-
return bl.jsxs(r,{...t,ref:A(t.ref,p),as:"tr",className:_l("group/row",h&&"opacity-50"),attributes:{...t.attributes,"data-selected":l?"true":void 0},children:[u&&/* @__PURE__ */bl.jsxs("td",{className:"w-2 select-none",contentEditable:!1,children:[
|
|
771
|
-
/* @__PURE__ */bl.jsx(Zm,{dragRef:
|
|
769
|
+
/* @__PURE__ */bl.jsx("div",{className:_l("absolute top-0 z-30 hidden h-full w-1 bg-ring","right-[-1.5px]",Gm({colIndex:x}))}),0===x&&/* @__PURE__ */bl.jsx("div",{className:_l("absolute top-0 z-30 h-full w-1 bg-ring","left-[-1.5px]",'fade-in hidden animate-in group-has-[[data-resizer-left]:hover]/table:block group-has-[[data-resizer-left][data-resizing="true"]]/table:block')})]})}),m&&/* @__PURE__ */bl.jsx("div",{className:Ml(),contentEditable:!1})]})}const Gm=tt("fade-in hidden animate-in",{variants:{colIndex:{0:'group-has-[[data-col="0"]:hover]/table:block group-has-[[data-col="0"][data-resizing="true"]]/table:block',1:'group-has-[[data-col="1"]:hover]/table:block group-has-[[data-col="1"][data-resizing="true"]]/table:block',2:'group-has-[[data-col="2"]:hover]/table:block group-has-[[data-col="2"][data-resizing="true"]]/table:block',3:'group-has-[[data-col="3"]:hover]/table:block group-has-[[data-col="3"][data-resizing="true"]]/table:block',4:'group-has-[[data-col="4"]:hover]/table:block group-has-[[data-col="4"][data-resizing="true"]]/table:block',5:'group-has-[[data-col="5"]:hover]/table:block group-has-[[data-col="5"][data-resizing="true"]]/table:block',6:'group-has-[[data-col="6"]:hover]/table:block group-has-[[data-col="6"][data-resizing="true"]]/table:block',7:'group-has-[[data-col="7"]:hover]/table:block group-has-[[data-col="7"][data-resizing="true"]]/table:block',8:'group-has-[[data-col="8"]:hover]/table:block group-has-[[data-col="8"][data-resizing="true"]]/table:block',9:'group-has-[[data-col="9"]:hover]/table:block group-has-[[data-col="9"][data-resizing="true"]]/table:block',10:'group-has-[[data-col="10"]:hover]/table:block group-has-[[data-col="10"][data-resizing="true"]]/table:block'}}}),Qm=[Gn.withComponent(Um),so.withComponent(function({children:e,...t}){const{element:o}=t,a=s(),l=n(),i=m(),c=d(ot,"isSelectionAreaVisible"),u=!a&&!c,{isDragging:h,nodeRef:p,previewRef:x,handleRef:f}=os({element:o,type:o.type,canDropNode:({dragEntry:e,dropEntry:t})=>K.equals(K.parent(e[1]),K.parent(t[1])),onDropHandler:(e,{dragItem:t})=>{const r=t.element;r&&i.tf.select(r)}});/* @__PURE__ */
|
|
770
|
+
return bl.jsxs(r,{...t,ref:A(t.ref,x,p),as:"tr",className:_l("group/row",h&&"opacity-50"),attributes:{...t.attributes,"data-selected":l?"true":void 0},children:[u&&/* @__PURE__ */bl.jsxs("td",{className:"w-2 select-none",contentEditable:!1,children:[
|
|
771
|
+
/* @__PURE__ */bl.jsx(Zm,{dragRef:f}),
|
|
772
772
|
/* @__PURE__ */bl.jsx(Km,{})]}),e]})}),no.withComponent(Ym),oo.withComponent(function(e){/* @__PURE__ */
|
|
773
773
|
return bl.jsx(Ym,{...e,isHeader:!0})})],Jm=tt("block h-auto w-full cursor-pointer truncate rounded-none px-0.5 py-1.5 text-left font-medium text-muted-foreground underline decoration-[0.5px] underline-offset-4 hover:bg-accent hover:text-muted-foreground",{variants:{depth:{1:"pl-0.5",2:"pl-[26px]",3:"pl-[50px]"}}});const Xm=[za.configure({options:{topOffset:80}}).withComponent(function(e){const t=Ca(),{props:s}=_a(t),{headingList:n}=t;/* @__PURE__ */
|
|
774
774
|
return bl.jsxs(r,{...e,className:"mb-1 p-0",children:[
|