reactjs-tiptap-editor 1.0.3 → 1.0.4
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/lib/{ActionMenuButton-BFepb5pA.js → ActionMenuButton-71gCEVbv.js} +11 -11
- package/lib/{ActionMenuButton-BjQpCWBy.cjs → ActionMenuButton-Bzr6ICxv.cjs} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +3 -3
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +3 -3
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +3 -3
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +3 -3
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +2 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +3 -3
- package/lib/CodeBlock.cjs +39 -39
- package/lib/CodeBlock.js +949 -841
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +3 -3
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +5 -5
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +3 -3
- package/lib/{Drawer-CSueBqcB.cjs → Drawer-DlX87Cl4.cjs} +1 -1
- package/lib/{Drawer-CJju6ecy.js → Drawer-GRyIh2y1.js} +13 -13
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +1 -1
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +12 -12
- package/lib/{Excalidraw-sf65kOJo.cjs → Excalidraw-Bkq1fXLL.cjs} +1 -1
- package/lib/{Excalidraw-C6LNBBPI.js → Excalidraw-BmyhdJCU.js} +19 -19
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +3 -3
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +3 -3
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +4 -4
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +4 -4
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +12 -12
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +5 -5
- package/lib/History.cjs +1 -1
- package/lib/History.js +3 -3
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +3 -3
- package/lib/{Icon-CNyAQ70L.js → Icon-1z7VnLgz.js} +1 -1
- package/lib/{Icon-CJomacaQ.cjs → Icon-ztD4g9N4.cjs} +1 -1
- package/lib/{Iframe-DjIPMesT.js → Iframe-AiP8qPGF.js} +11 -11
- package/lib/{Iframe-CkoadzVT.cjs → Iframe-DhUlC9-Y.cjs} +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +44 -44
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +7 -7
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.js +8 -8
- package/lib/{Indent-UDnZAurv.js → Indent-CBoQDISv.js} +3 -3
- package/lib/{Indent-08e09DMj.cjs → Indent-fphgO8Eo.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +3 -3
- package/lib/{Katex-zmcrp9k1.cjs → Katex-AfmTUUNS.cjs} +2 -2
- package/lib/{Katex-CXa45tyK.js → Katex-n2PVzaMd.js} +19 -19
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +1 -1
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +12 -12
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +1 -1
- package/lib/{LinkEditBlock-CB8dAmrf.js → LinkEditBlock-CoXwYHlj.js} +68 -68
- package/lib/{LinkEditBlock-Dif8KmZQ.cjs → LinkEditBlock-sADc32hF.cjs} +2 -2
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.js +20 -21
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +12 -12
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +3 -3
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +16 -16
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +11 -11
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +3 -3
- package/lib/{Table-BahHb0Ru.cjs → Table-BLb5576a.cjs} +1 -1
- package/lib/{Table-BnhgS_-w.js → Table-BshvoFRh.js} +4 -4
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +3 -3
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +15 -15
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +15 -15
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +3 -3
- package/lib/{Twitter-Cb2gasLV.js → Twitter-CLVet4OM.js} +17 -17
- package/lib/{Twitter-BWmvba2p.cjs → Twitter-DEKTLWO5.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +22 -22
- package/lib/bubble.cjs +1 -1
- package/lib/bubble.js +36 -36
- package/lib/{button-CG4usMxR.js → button-BnN1L5_T.js} +1 -1
- package/lib/{button-CIneI3CY.cjs → button-CjAogRMZ.cjs} +1 -1
- package/lib/{checkbox-D71Mb18N.cjs → checkbox-BFgaCetY.cjs} +1 -1
- package/lib/{checkbox-C_n_ksgm.js → checkbox-sSQSzjls.js} +1 -1
- package/lib/{dialog-DOqHbj83.cjs → dialog-CUP7QBaG.cjs} +1 -1
- package/lib/{dialog-NJmA61GX.js → dialog-CzZSyyxS.js} +1 -1
- package/lib/{dropdown-menu-C6sUfvGJ.cjs → dropdown-menu-CwHOwzLr.cjs} +1 -1
- package/lib/{dropdown-menu-Lfbfr4dW.js → dropdown-menu-y1rPk4dr.js} +1 -1
- package/lib/{index-BY7ivGJJ.js → index--XZPCi0O.js} +370 -483
- package/lib/index-CnbtiTqP.cjs +7 -0
- package/lib/index.cjs +1 -1
- package/lib/index.js +2 -2
- package/lib/{input-BP2Gxw3D.js → input-Byg4PPou.js} +1 -1
- package/lib/{input-gHDudt4e.cjs → input-Dikmsjjj.cjs} +1 -1
- package/lib/{label-DJJuWtqE.js → label-BX7OqM6p.js} +1 -1
- package/lib/{label-CVPLC4Zx.cjs → label-ChxDmW-K.cjs} +1 -1
- package/lib/{popover-BvQjtkQM.js → popover-CheVmqgb.js} +1 -1
- package/lib/{popover-MfEQQFJ7.cjs → popover-DVD1y8Z_.cjs} +1 -1
- package/lib/{separator-BJzi4Ghx.cjs → separator-CSuS-D6T.cjs} +1 -1
- package/lib/{separator-D_v6CJRt.js → separator-Y_Pbpi-5.js} +18 -18
- package/lib/{store-DXwTyDFS.js → store-BVm_SgvL.js} +1 -1
- package/lib/{store-D0HwYEZ6.cjs → store-DznMm4Ug.cjs} +1 -1
- package/lib/{tabs-CSLPqYK2.cjs → tabs-B9ooipwg.cjs} +1 -1
- package/lib/{tabs-C0zcytw3.js → tabs-p4pJGb6o.js} +1 -1
- package/lib/{textarea-Du5WiLd3.js → textarea-Byts1Pn0.js} +1 -1
- package/lib/{textarea-CoUGzfC4.cjs → textarea-L53EceuF.cjs} +1 -1
- package/lib/theme/theme.d.ts +1 -1
- package/lib/theme.cjs +1 -1
- package/lib/theme.js +1 -1
- package/lib/{toggle-Bdrb8AZg.cjs → toggle-DUPu3nnZ.cjs} +1 -1
- package/lib/{toggle-DifEFalS.js → toggle-WBgzE8Jm.js} +10 -10
- package/lib/{tooltip-CY18LQet.js → tooltip-BOMwAoO1.js} +1 -1
- package/lib/{tooltip-nFyTogij.cjs → tooltip-DD5Ii8qI.cjs} +1 -1
- package/lib/{useButtonProps-DEuoHLy_.js → useButtonProps-BIOoOg6h.js} +1 -1
- package/lib/{useButtonProps-5aSfh81v.cjs → useButtonProps-C4SCmCVo.cjs} +1 -1
- package/package.json +1 -1
- package/lib/index-B7WkxZXU.cjs +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const Ee=require("./index-DLqogznp.cjs"),E=require("react/jsx-runtime"),g=require("react"),ne=require("./index-D4d-0Hqh.cjs"),se=require("./theme.cjs"),R=require("./events.constant-B-VGURJp.cjs"),Q="-",Se=e=>{const t=ke(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const s=i.split(Q);return s[0]===""&&s.length!==1&&s.shift(),ue(s,t)||ze(i)},getConflictingClassGroupIds:(i,s)=>{const c=r[i]||[];return s&&o[i]?[...c,...o[i]]:c}}},ue=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),a=o?ue(e.slice(1),o):void 0;if(a)return a;if(t.validators.length===0)return;const n=e.join(Q);return(i=t.validators.find(({validator:s})=>s(n)))==null?void 0:i.classGroupId},ae=/^\[(.+)\]$/,ze=e=>{if(ae.test(e)){const t=ae.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},ke=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Re(Object.entries(e.classGroups),r).forEach(([n,i])=>{B(i,o,n,t)}),o},B=(e,t,r,o)=>{e.forEach(a=>{if(typeof a=="string"){const n=a===""?t:ie(t,a);n.classGroupId=r;return}if(typeof a=="function"){if(Ae(a)){B(a(o),t,r,o);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([n,i])=>{B(i,ie(t,n),r,o)})})},ie=(e,t)=>{let r=e;return t.split(Q).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ae=e=>e.isThemeGetter,Re=(e,t)=>t?e.map(([r,o])=>{const a=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,s])=>[t+i,s])):n);return[r,a]}):e,Me=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const a=(n,i)=>{r.set(n,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let i=r.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return a(n,i),i},set(n,i){r.has(n)?r.set(n,i):a(n,i)}}},pe="!",Ne=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,a=t[0],n=t.length,i=s=>{const c=[];let u=0,p=0,f;for(let x=0;x<s.length;x++){let y=s[x];if(u===0){if(y===a&&(o||s.slice(x,x+n)===t)){c.push(s.slice(p,x)),p=x+n;continue}if(y==="/"){f=x;continue}}y==="["?u++:y==="]"&&u--}const d=c.length===0?s:s.substring(p),h=d.startsWith(pe),v=h?d.substring(1):d,w=f&&f>p?f-p:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:w}};return r?s=>r({className:s,parseClassName:i}):i},Pe=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Te=e=>({cache:Me(e.cacheSize),parseClassName:Ne(e),...Se(e)}),Ge=/\s+/,je=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a}=t,n=[],i=e.trim().split(Ge);let s="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:p,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=r(u);let v=!!h,w=o(v?d.substring(0,h):d);if(!w){if(!v){s=u+(s.length>0?" "+s:s);continue}if(w=o(d),!w){s=u+(s.length>0?" "+s:s);continue}v=!1}const x=Pe(p).join(":"),y=f?x+pe:x,C=y+w;if(n.includes(C))continue;n.push(C);const T=a(w,v);for(let M=0;M<T.length;++M){const L=T[M];n.push(y+L)}s=u+(s.length>0?" "+s:s)}return s};function Ie(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=fe(t))&&(o&&(o+=" "),o+=r);return o}const fe=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=fe(e[o]))&&(r&&(r+=" "),r+=t);return r};function Le(e,...t){let r,o,a,n=i;function i(c){const u=t.reduce((p,f)=>f(p),e());return r=Te(u),o=r.cache.get,a=r.cache.set,n=s,s(c)}function s(c){const u=o(c);if(u)return u;const p=je(c,r);return a(c,p),p}return function(){return n(Ie.apply(null,arguments))}}const b=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},be=/^\[(?:([a-z-]+):)?(.+)\]$/i,$e=/^\d+\/\d+$/,Oe=new Set(["px","full","screen"]),_e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,We=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,He=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,z=e=>N(e)||Oe.has(e)||$e.test(e),k=e=>P(e,"length",Xe),N=e=>!!e&&!Number.isNaN(Number(e)),V=e=>P(e,"number",N),j=e=>!!e&&Number.isInteger(Number(e)),Ve=e=>e.endsWith("%")&&N(e.slice(0,-1)),l=e=>be.test(e),A=e=>_e.test(e),Ue=new Set(["length","size","percentage"]),Be=e=>P(e,Ue,ge),Je=e=>P(e,"position",ge),Qe=new Set(["image","url"]),Ye=e=>P(e,Qe,De),Ke=e=>P(e,"",Ze),I=()=>!0,P=(e,t,r)=>{const o=be.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Xe=e=>Fe.test(e)&&!qe.test(e),ge=()=>!1,Ze=e=>We.test(e),De=e=>He.test(e),et=()=>{const e=b("colors"),t=b("spacing"),r=b("blur"),o=b("brightness"),a=b("borderColor"),n=b("borderRadius"),i=b("borderSpacing"),s=b("borderWidth"),c=b("contrast"),u=b("grayscale"),p=b("hueRotate"),f=b("invert"),d=b("gap"),h=b("gradientColorStops"),v=b("gradientColorStopPositions"),w=b("inset"),x=b("margin"),y=b("opacity"),C=b("padding"),T=b("saturate"),M=b("scale"),L=b("sepia"),X=b("skew"),Z=b("space"),D=b("translate"),F=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",l,t],m=()=>[l,t],ee=()=>["",z,k],$=()=>["auto",N,l],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",l],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>[N,l];return{cacheSize:500,separator:":",theme:{colors:[I],spacing:[z,k],blur:["none","",A,l],brightness:S(),borderColor:[e],borderRadius:["none","","full",A,l],borderSpacing:m(),borderWidth:ee(),contrast:S(),grayscale:G(),hueRotate:S(),invert:G(),gap:m(),gradientColorStops:[e],gradientColorStopPositions:[Ve,k],inset:W(),margin:W(),opacity:S(),padding:m(),saturate:S(),scale:S(),sepia:G(),skew:S(),space:m(),translate:m()},classGroups:{aspect:[{aspect:["auto","square","video",l]}],container:["container"],columns:[{columns:[A]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),l]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",j,l]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",l]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",j,l]}],"grid-cols":[{"grid-cols":[I]}],"col-start-end":[{col:["auto",{span:["full",j,l]},l]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[I]}],"row-start-end":[{row:["auto",{span:[j,l]},l]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",l]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",l]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",l,t]}],"min-w":[{"min-w":[l,t,"min","max","fit"]}],"max-w":[{"max-w":[l,t,"none","full","min","max","fit","prose",{screen:[A]},A]}],h:[{h:[l,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[l,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[l,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[l,t,"auto","min","max","fit"]}],"font-size":[{text:["base",A,k]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",V]}],"font-family":[{font:[I]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",l]}],"line-clamp":[{"line-clamp":["none",N,V]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",z,l]}],"list-image":[{"list-image":["none",l]}],"list-style-type":[{list:["none","disc","decimal",l]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",z,k]}],"underline-offset":[{"underline-offset":["auto",z,l]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",l]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),Je]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Be]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ye]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:O()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[z,l]}],"outline-w":[{outline:[z,k]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[z,k]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",A,Ke]}],"shadow-color":[{shadow:[I]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...re(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",A,l]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[f]}],saturate:[{saturate:[T]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",l]}],duration:[{duration:S()}],ease:[{ease:["linear","in","out","in-out",l]}],delay:[{delay:S()}],animate:[{animate:["none","spin","ping","pulse","bounce",l]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[j,l]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[X]}],"skew-y":[{"skew-y":[X]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",l]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",l]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",l]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[z,k,V]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},tt=Le(et);function rt(...e){return tt(Ee.clsx(e))}const U=typeof window>"u";function le(e,t,r=window){const o=g.useRef(void 0);g.useEffect(()=>{o.current=t},[t]),g.useEffect(()=>{if(!(r&&r.addEventListener))return;const n=i=>{o.current&&o.current(i)};return r.addEventListener(e,n),()=>{r.removeEventListener(e,n)}},[e,r])}function _(e,t,r={}){const{initializeWithValue:o=!0}=r,a=g.useCallback(d=>r.serializer?r.serializer(d):JSON.stringify(d),[r]),n=g.useCallback(d=>{if(r.deserializer)return r.deserializer(d);if(d==="undefined")return;const h=t instanceof Function?t():t;let v;try{v=JSON.parse(d)}catch(w){return console.error("Error parsing JSON:",w),h}return v},[r,t]),i=g.useCallback(()=>{const d=t instanceof Function?t():t;if(U)return d;try{const h=window.localStorage.getItem(e);return h?n(h):d}catch(h){return console.warn(`Error reading localStorage key “${e}”:`,h),d}},[t,e,n]),[s,c]=g.useState(()=>o?i():t instanceof Function?t():t),u=g.useCallback(d=>{U&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const h=d instanceof Function?d(i()):d;window.localStorage.setItem(e,a(h)),c(h),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(h){console.warn(`Error setting localStorage key “${e}”:`,h)}},[e,a,i]),p=g.useCallback(()=>{U&&console.warn(`Tried removing localStorage key “${e}” even though environment is not a client`);const d=t instanceof Function?t():t;window.localStorage.removeItem(e),c(d),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))},[e,t]);g.useEffect(()=>{c(i())},[e]);const f=g.useCallback(d=>{d.key&&d.key!==e||c(i())},[e,i]);return le("storage",f),le("local-storage",f),[s,u,p]}function Y(e){function t(){const n=g.useRef(e),i=g.useCallback(()=>n.current,[]),s=g.useRef(new Set),c=g.useCallback(p=>{n.current={...n.current,...p},s.current.forEach(f=>f())},[]),u=g.useCallback(p=>(s.current.add(p),()=>s.current.delete(p)),[]);return{get:i,set:c,subscribe:u}}const r=g.createContext(null);function o({children:n}){return E.jsx(r.Provider,{value:t(),children:n})}function a(n){const i=g.useContext(r);if(!i)throw new Error("Store not found");return[g.useSyncExternalStore(i.subscribe,()=>n(i.get()),()=>n(e)),i.set]}return{Provider:o,useStore:a}}Y({value:!1});Y({value:!1});const{Provider:ot,useStore:me}=Y({value:!1});function nt(){const[e]=me(t=>t.value);return e}const ce="data-rc-order",de="data-rc-priority",st="rc-util-key",J=new Map;function at(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function he({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:st}function K(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function it(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function xe(e){return[...(J.get(e)||e).children].filter(t=>t.tagName==="STYLE")}function we(e,t={}){const{csp:r,prepend:o,priority:a=0}=t,n=it(o),i=n==="prependQueue",s=document.createElement("style");s.setAttribute(ce,n),i&&a&&s.setAttribute(de,`${a}`),r!=null&&r.nonce&&(s.nonce=r==null?void 0:r.nonce),s.innerHTML=e;const c=K(t),{firstChild:u}=c;if(o){if(i){const p=xe(c).filter(f=>{if(!["prepend","prependQueue"].includes(f.getAttribute(ce)))return!1;const d=Number(f.getAttribute(de)||0);return a>=d});if(p.length>0)return c.insertBefore(s,p.at(-1).nextSibling),s}u.before(s)}else c.append(s);return s}function ye(e,t={}){const r=K(t);return xe(r).find(o=>o.getAttribute(he(t))===e)}function ve(e,t={}){const r=ye(e,t);r&&r.remove()}function lt(e,t){const r=J.get(e);if(!r||!at(document,r)){const o=we("",t),{parentNode:a}=o;J.set(e,a),o.remove()}}function Ce(e,t,r={}){var i,s,c;const o=K(r);lt(o,r);const a=ye(t,r);if(a)return(i=r.csp)!=null&&i.nonce&&a.nonce!==((s=r.csp)==null?void 0:s.nonce)&&(a.nonce=(c=r.csp)==null?void 0:c.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;const n=we(e,r);return n.setAttribute(he(r),t),n}const ct=g.memo(({editor:e,children:t})=>{const[,r]=me(a=>a.value);g.useEffect(()=>{r({value:e==null?void 0:e.isEditable})},[e==null?void 0:e.isEditable]);const o=()=>{r({value:e==null?void 0:e.isEditable})};return g.useEffect(()=>(e&&e.on("update",o),()=>{e&&e.off("update",o)}),[e]),E.jsx(E.Fragment,{children:t})});function dt(){const[e,t]=ne.x(ne.atomLang),r=o=>{t({...e,currentLang:o.detail})};return g.useEffect(()=>{const o=R.listenEvent(R.EVENTS.CHANGE_LANGUAGE,r);return()=>{o()}},[]),E.jsx(E.Fragment,{})}function ut(){const[e,t]=_("richtext-theme","light"),[r,o]=_("richtext-color","default"),[a,n]=_("richtext-border-radius","0.65rem");g.useEffect(()=>{const u=e||"light",p=r||"default";let f=se.THEME[u][p];if(!f){f=se.THEME.light.default;return}return Ce(`
|
|
2
|
+
.reactjs-tiptap-editor, .reactjs-tiptap-editor *,
|
|
3
|
+
div[data-richtext-portal], div[data-richtext-portal] * {
|
|
4
|
+
${Object.entries(f).map(([d,h])=>typeof a=="string"&&d==="radius"?`--${d}: ${a};`:`--${d}: ${h};`).join(`
|
|
5
|
+
`)}
|
|
6
|
+
}
|
|
7
|
+
`,"richtext-theme",{priority:50}),()=>{ve("richtext-theme")}},[e,r,a]);const i=u=>{t(u.detail)},s=u=>{o(u.detail)},c=u=>{n(u.detail)};return g.useEffect(()=>{const u=R.listenEvent(R.EVENTS.CHANGE_THEME,i),p=R.listenEvent(R.EVENTS.CHANGE_COLOR,s),f=R.listenEvent(R.EVENTS.CHANGE_BORDER_RADIUS,c);return()=>{u(),p(),f()}},[]),E.jsx(E.Fragment,{})}function pt({editor:e,children:t,id:r}){return E.jsxs(ot,{children:[E.jsx(ct,{editor:e,id:r,children:t}),E.jsx(dt,{}),E.jsx(ut,{})]})}exports.ProviderUniqueId=pt;exports.cn=rt;exports.removeCSS=ve;exports.updateCSS=Ce;exports.useEditableEditor=nt;exports.useLocalStorage=_;
|
package/lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),o=require("./index-CnbtiTqP.cjs"),a=require("./index-DLqogznp.cjs"),s=require("./tooltip-DD5Ii8qI.cjs"),c=`
|
|
2
2
|
.reactjs-tiptap-editor {
|
|
3
3
|
button,
|
|
4
4
|
input:where([type=button]),
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, Fragment as n } from "react/jsx-runtime";
|
|
2
2
|
import { useId as a, useEffect as r } from "react";
|
|
3
|
-
import { u as s, r as p, P as l } from "./index
|
|
3
|
+
import { u as s, r as p, P as l } from "./index--XZPCi0O.js";
|
|
4
4
|
import { d as h } from "./index-nFjllrEl.js";
|
|
5
|
-
import { c } from "./tooltip-
|
|
5
|
+
import { c } from "./tooltip-BOMwAoO1.js";
|
|
6
6
|
const d = `
|
|
7
7
|
.reactjs-tiptap-editor {
|
|
8
8
|
button,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import { c as x } from "./index
|
|
3
|
+
import { c as x } from "./index--XZPCi0O.js";
|
|
4
4
|
const s = o.forwardRef(
|
|
5
5
|
({ className: t, type: e, ...r }, i) => /* @__PURE__ */ c(
|
|
6
6
|
"input",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),o=require("react"),s=require("./index-
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),o=require("react"),s=require("./index-CnbtiTqP.cjs");function u(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const x=u(o),c=x.forwardRef(({className:t,type:r,...e},i)=>n.jsx("input",{ref:i,type:r,className:s.cn("richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-1 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 ",t),...e}));c.displayName="Input";exports.Input=c;
|
|
@@ -2,7 +2,7 @@ import { jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-label";
|
|
4
4
|
import { c as m } from "./index-BQ17A_37.js";
|
|
5
|
-
import { c as s } from "./index
|
|
5
|
+
import { c as s } from "./index--XZPCi0O.js";
|
|
6
6
|
const c = m(
|
|
7
7
|
"richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
|
|
8
8
|
), l = i.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ a(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),s=require("react"),l=require("@radix-ui/react-label"),u=require("./index-DmOTQudI.cjs"),d=require("./index-
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),s=require("react"),l=require("@radix-ui/react-label"),u=require("./index-DmOTQudI.cjs"),d=require("./index-CnbtiTqP.cjs");function c(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const m=c(s),n=c(l),b=u.cva("richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),a=m.forwardRef(({className:e,...r},t)=>o.jsx(n.Root,{className:d.cn(b(),e),ref:t,...r}));a.displayName=n.Root.displayName;exports.Label=a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-popover";
|
|
4
|
-
import { c as s } from "./index
|
|
4
|
+
import { c as s } from "./index--XZPCi0O.js";
|
|
5
5
|
const x = t.Root, p = t.Trigger, n = c.forwardRef(({ className: o, align: r = "center", sideOffset: i = 4, ...a }, d) => /* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ e(
|
|
6
6
|
t.Content,
|
|
7
7
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-CnbtiTqP.cjs");function n(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const h=n(s),o=n(p),l=o.Root,m=o.Trigger,c=h.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},d)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:d,sideOffset:e,className:x.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2 !richtext-border-border",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=l;exports.PopoverContent=c;exports.PopoverTrigger=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("react"),y=require("lucide-react"),P=require("react-colorful"),b=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),a=require("react"),y=require("lucide-react"),P=require("react-colorful"),b=require("./index-CnbtiTqP.cjs"),v=require("./index-D4d-0Hqh.cjs"),h=require("./popover-DVD1y8Z_.cjs"),S=require("./input-Dikmsjjj.cjs"),O=require("@radix-ui/react-separator"),z=require("./button-CjAogRMZ.cjs");function g(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(o,n,x.get?x:{enumerable:!0,get:()=>r[n]})}}return o.default=r,Object.freeze(o)}const R=g(a),C=g(O);function q(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}function _(r){const{t:o}=v.useLocale(),{disabled:n=!1,value:x,onChange:i,colors:u=v.COLORS_LIST,highlight:d}=r,[s,m]=a.useState(!1),L=a.useMemo(()=>{const t=u,c=[];for(let l=0;l<t.length;l+=10)c.push(t.slice(l,l+10));return c},[u]),[p,N]=b.useLocalStorage(d?"richtext-recent-highlight":"richtext-recent-colors",[]),w=t=>{const c=[...p],l=c.indexOf(t);l!==-1&&c.splice(l,1),c.unshift(t),c.length>10&&c.pop(),N(c)};function f(t){if(t===void 0){i==null||i(t),m(!1);return}/^#([\da-f]{3}){1,2}$/i.test(t)&&(i==null||i(t),w(t),m(!1))}return e.jsxs(h.Popover,{modal:!0,onOpenChange:m,open:s,children:[e.jsx(h.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:n,children:r==null?void 0:r.children}),e.jsx(h.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{f(void 0)},children:[e.jsx(q,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:o(d?"editor.nofill":"editor.default")})]}),L.map((t,c)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:t.map((l,k)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>f(l),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:l},children:l===x?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${k}`))},`color-row-${c}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:o("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:p==null?void 0:p.map((t,c)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>f(t),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:t},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${c}`))})]}),e.jsx(M,{setColor:f})]})})]})}function M({setColor:r}){const{t:o}=v.useLocale(),[n,x]=a.useState(!1),[i,u]=a.useState("#000000"),d=a.useCallback(s=>{u(s)},[]);return e.jsxs(h.Popover,{onOpenChange:x,open:n,children:[e.jsx(h.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[o("editor.color.more"),"..."]})}),e.jsxs(h.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(P.HexColorPicker,{color:i,onChange:s=>{d(s)}}),e.jsx(S.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:s=>{s.preventDefault(),s.stopPropagation(),d(`#${s.target.value}`)}})]}),e.jsx(j,{className:"richtext-my-[10px]"}),e.jsx(z.Button,{className:"richtext-w-full",onClick:s=>{s.preventDefault(),s.stopPropagation(),r(i),x(!1)},children:e.jsx(y.Plus,{size:16})})]})]})}const j=R.forwardRef(({className:r,orientation:o="horizontal",decorative:n=!0,...x},i)=>e.jsx(C.Root,{ref:i,decorative:n,orientation:o,className:b.cn("richtext-shrink-0 richtext-bg-border",o==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",r),...x}));j.displayName=C.Root.displayName;exports.ColorPicker=_;exports.Separator=j;
|
|
@@ -3,21 +3,21 @@ import * as P from "react";
|
|
|
3
3
|
import { useState as f, useMemo as S, useCallback as M } from "react";
|
|
4
4
|
import { Plus as R } from "lucide-react";
|
|
5
5
|
import { HexColorPicker as O } from "react-colorful";
|
|
6
|
-
import { a as B, c as _ } from "./index
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import * as
|
|
11
|
-
import {
|
|
6
|
+
import { a as B, c as _ } from "./index--XZPCi0O.js";
|
|
7
|
+
import { u as v, C as $ } from "./index-DGihe-wH.js";
|
|
8
|
+
import { P as b, a as g, b as C } from "./popover-CheVmqgb.js";
|
|
9
|
+
import { I as j } from "./input-Byg4PPou.js";
|
|
10
|
+
import * as L from "@radix-ui/react-separator";
|
|
11
|
+
import { B as D } from "./button-BnN1L5_T.js";
|
|
12
12
|
function I() {
|
|
13
13
|
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z" }) });
|
|
14
14
|
}
|
|
15
15
|
function J(l) {
|
|
16
|
-
const { t: h } =
|
|
16
|
+
const { t: h } = v(), {
|
|
17
17
|
disabled: n = !1,
|
|
18
18
|
value: a,
|
|
19
19
|
onChange: i,
|
|
20
|
-
colors: d =
|
|
20
|
+
colors: d = $,
|
|
21
21
|
highlight: x
|
|
22
22
|
} = l, [c, u] = f(!1), w = S(() => {
|
|
23
23
|
const t = d, r = [];
|
|
@@ -36,14 +36,14 @@ function J(l) {
|
|
|
36
36
|
/^#([\da-f]{3}){1,2}$/i.test(t) && (i == null || i(t), y(t), u(!1));
|
|
37
37
|
}
|
|
38
38
|
return /* @__PURE__ */ s(
|
|
39
|
-
|
|
39
|
+
b,
|
|
40
40
|
{
|
|
41
41
|
modal: !0,
|
|
42
42
|
onOpenChange: u,
|
|
43
43
|
open: c,
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ e(
|
|
46
|
-
|
|
46
|
+
g,
|
|
47
47
|
{
|
|
48
48
|
asChild: !0,
|
|
49
49
|
className: "!richtext-p-0",
|
|
@@ -52,7 +52,7 @@ function J(l) {
|
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
54
|
/* @__PURE__ */ e(
|
|
55
|
-
|
|
55
|
+
C,
|
|
56
56
|
{
|
|
57
57
|
align: "start",
|
|
58
58
|
className: "richtext-size-full !richtext-p-2",
|
|
@@ -157,19 +157,19 @@ function J(l) {
|
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
159
|
function Z({ setColor: l }) {
|
|
160
|
-
const { t: h } =
|
|
160
|
+
const { t: h } = v(), [n, a] = f(!1), [i, d] = f("#000000"), x = M(
|
|
161
161
|
(c) => {
|
|
162
162
|
d(c);
|
|
163
163
|
},
|
|
164
164
|
[]
|
|
165
165
|
);
|
|
166
166
|
return /* @__PURE__ */ s(
|
|
167
|
-
|
|
167
|
+
b,
|
|
168
168
|
{
|
|
169
169
|
onOpenChange: a,
|
|
170
170
|
open: n,
|
|
171
171
|
children: [
|
|
172
|
-
/* @__PURE__ */ e(
|
|
172
|
+
/* @__PURE__ */ e(g, { asChild: !0, children: /* @__PURE__ */ s(
|
|
173
173
|
"div",
|
|
174
174
|
{
|
|
175
175
|
className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",
|
|
@@ -179,7 +179,7 @@ function Z({ setColor: l }) {
|
|
|
179
179
|
]
|
|
180
180
|
}
|
|
181
181
|
) }),
|
|
182
|
-
/* @__PURE__ */ s(
|
|
182
|
+
/* @__PURE__ */ s(C, { children: [
|
|
183
183
|
/* @__PURE__ */ s("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
|
|
184
184
|
/* @__PURE__ */ e(
|
|
185
185
|
O,
|
|
@@ -204,7 +204,7 @@ function Z({ setColor: l }) {
|
|
|
204
204
|
] }),
|
|
205
205
|
/* @__PURE__ */ e(N, { className: "richtext-my-[10px]" }),
|
|
206
206
|
/* @__PURE__ */ e(
|
|
207
|
-
|
|
207
|
+
D,
|
|
208
208
|
{
|
|
209
209
|
className: "richtext-w-full",
|
|
210
210
|
onClick: (c) => {
|
|
@@ -220,7 +220,7 @@ function Z({ setColor: l }) {
|
|
|
220
220
|
}
|
|
221
221
|
const N = P.forwardRef(
|
|
222
222
|
({ className: l, orientation: h = "horizontal", decorative: n = !0, ...a }, i) => /* @__PURE__ */ e(
|
|
223
|
-
|
|
223
|
+
L.Root,
|
|
224
224
|
{
|
|
225
225
|
ref: i,
|
|
226
226
|
decorative: n,
|
|
@@ -234,7 +234,7 @@ const N = P.forwardRef(
|
|
|
234
234
|
}
|
|
235
235
|
)
|
|
236
236
|
);
|
|
237
|
-
N.displayName =
|
|
237
|
+
N.displayName = L.Root.displayName;
|
|
238
238
|
export {
|
|
239
239
|
J as C,
|
|
240
240
|
N as S
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./index-
|
|
1
|
+
"use strict";require("./index-CnbtiTqP.cjs");const e=require("./events.constant-B-VGURJp.cjs"),a={setOpen:(t,n)=>{e.dispatchEvent(e.EVENTS.UPLOAD_IMAGE(t),n)}};exports.actionDialogImage=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),h=require("react"),d=require("@radix-ui/react-tabs"),s=require("./index-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),h=require("react"),d=require("@radix-ui/react-tabs"),s=require("./index-CnbtiTqP.cjs");function o(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return i.default=t,Object.freeze(i)}const n=o(h),r=o(d),l=r.Root,x=n.forwardRef(({className:t,...i},e)=>c.jsx(r.List,{ref:e,className:s.cn("richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",t),...i}));x.displayName=r.List.displayName;const f=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Trigger,{ref:e,className:s.cn("richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",t),...i}));f.displayName=r.Trigger.displayName;const u=n.forwardRef(({className:t,...i},e)=>c.jsx(r.Content,{ref:e,className:s.cn("richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",t),...i}));u.displayName=r.Content.displayName;exports.Tabs=l;exports.TabsContent=u;exports.TabsList=x;exports.TabsTrigger=f;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-tabs";
|
|
4
|
-
import { c as a } from "./index
|
|
4
|
+
import { c as a } from "./index--XZPCi0O.js";
|
|
5
5
|
const d = t.Root, o = c.forwardRef(({ className: e, ...i }, r) => /* @__PURE__ */ s(
|
|
6
6
|
t.List,
|
|
7
7
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("./index-
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("./index-CnbtiTqP.cjs");function s(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const x=s(o),c=x.forwardRef(({className:e,...r},t)=>n.jsx("textarea",{ref:t,className:a.cn("richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",e),...r}));c.displayName="Textarea";exports.Textarea=c;
|
package/lib/theme/theme.d.ts
CHANGED
package/lib/theme.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./events.constant-B-VGURJp.cjs"),e={light:{default:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},red:{radius:"0.65rem",background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"221.2 83.2% 53.3%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"221.2 83.2% 53.3%"},green:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"142.1 76.2% 36.3%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"142.1 76.2% 36.3%"},orange:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"24.6 95% 53.1%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%"},rose:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"262.1 83.3% 57.8%","primary-foreground":"210 20% 98%",secondary:"220 14.3% 95.9%","secondary-foreground":"220.9 39.3% 11%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220.9 39.3% 11%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 20% 98%",border:"220 13% 91%",input:"220 13% 91%",ring:"262.1 83.3% 57.8%"},yellow:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"20 14.3% 4.1"}},dark:{default:{radius:"0.65rem",background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 3.9%","card-foreground":"0 0% 98%",popover:"240 10% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"240 5.9% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"240 3.7% 15.9%","muted-foreground":"240 5% 64.9%",accent:"240 3.7% 15.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"240 4.9% 83.9%"},red:{radius:"0.65rem",background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"217.2 91.2% 59.8%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"},green:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"142.1 70.6% 45.3%","primary-foreground":"144.9 80.4% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"142.4 71.8% 29.2%"},orange:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"20.5 90.2% 48.2%","primary-foreground":"60 9.1% 97.8%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 72.2% 50.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"20.5 90.2% 48.2%"},rose:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"224 71.4% 4.1%",foreground:"210 20% 98%",card:"224 71.4% 4.1%","card-foreground":"210 20% 98%",popover:"224 71.4% 4.1%","popover-foreground":"210 20% 98%",primary:"263.4 70% 50.4%","primary-foreground":"210 20% 98%",secondary:"215 27.9% 16.9%","secondary-foreground":"210 20% 98%",muted:"215 27.9% 16.9%","muted-foreground":"217.9 10.6% 64.9%",accent:"215 27.9% 16.9%","accent-foreground":"210 20% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 20% 98%",border:"215 27.9% 16.9%",input:"215 27.9% 16.9%",ring:"263.4 70% 50.4%"},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./events.constant-B-VGURJp.cjs"),e={light:{default:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},red:{radius:"0.65rem",background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"221.2 83.2% 53.3%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"221.2 83.2% 53.3%"},green:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"142.1 76.2% 36.3%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"142.1 76.2% 36.3%"},orange:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"24.6 95% 53.1%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%"},rose:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"262.1 83.3% 57.8%","primary-foreground":"210 20% 98%",secondary:"220 14.3% 95.9%","secondary-foreground":"220.9 39.3% 11%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220.9 39.3% 11%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 20% 98%",border:"220 13% 91%",input:"220 13% 91%",ring:"262.1 83.3% 57.8%"},yellow:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"20 14.3% 4.1"}},dark:{default:{radius:"0.65rem",background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 3.9%","card-foreground":"0 0% 98%",popover:"240 10% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"240 5.9% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"240 3.7% 15.9%","muted-foreground":"240 5% 64.9%",accent:"240 3.7% 15.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"240 4.9% 83.9%"},red:{radius:"0.65rem",background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"217.2 91.2% 59.8%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"},green:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"142.1 70.6% 45.3%","primary-foreground":"144.9 80.4% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"142.4 71.8% 29.2%"},orange:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"20.5 90.2% 48.2%","primary-foreground":"60 9.1% 97.8%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 72.2% 50.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"20.5 90.2% 48.2%"},rose:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"224 71.4% 4.1%",foreground:"210 20% 98%",card:"224 71.4% 4.1%","card-foreground":"210 20% 98%",popover:"224 71.4% 4.1%","popover-foreground":"210 20% 98%",primary:"263.4 70% 50.4%","primary-foreground":"210 20% 98%",secondary:"215 27.9% 16.9%","secondary-foreground":"210 20% 98%",muted:"215 27.9% 16.9%","muted-foreground":"217.9 10.6% 64.9%",accent:"215 27.9% 16.9%","accent-foreground":"210 20% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 20% 98%",border:"215 27.9% 16.9%",input:"215 27.9% 16.9%",ring:"263.4 70% 50.4%"},yellow:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 62.8% 30.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"35.5 91.7% 32.9%"}}},d={setTheme:o=>{r.dispatchEvent(r.EVENTS.CHANGE_THEME,o)},setColor:o=>{r.dispatchEvent(r.EVENTS.CHANGE_COLOR,o)},setBorderRadius:o=>{r.dispatchEvent(r.EVENTS.CHANGE_BORDER_RADIUS,o)}};exports.THEME=e;exports.themeActions=d;
|
package/lib/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),x=require("react"),y=require("@radix-ui/react-slot"),d=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("react"),y=require("@radix-ui/react-slot"),d=require("./index-CnbtiTqP.cjs"),N=require("./useButtonProps-C4SCmCVo.cjs"),s=require("./tooltip-DD5Ii8qI.cjs"),C=require("@radix-ui/react-toggle"),h=require("./index-DmOTQudI.cjs");function u(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>t[i]})}}return r.default=t,Object.freeze(r)}const R=u(x),f=u(C),O=x.forwardRef((t,r)=>{const{icon:i=void 0,tooltip:o=void 0,disabled:n=!1,customClass:g="",loading:w=void 0,shortcutKeys:c=void 0,tooltipOptions:p={},action:m=void 0,isActive:z=void 0,children:v,asChild:b=!1,upload:P=!1,initialDisplayedColor:_=void 0,dataState:j=!1,...T}=t,l=h.icons[i],q=b?y.Slot:a;return e.jsxs(s.Tooltip,{children:[e.jsx(s.TooltipTrigger,{asChild:!0,children:e.jsxs(q,{className:d.cn("richtext-w-[32px] richtext-h-[32px]",g),"data-state":j?"on":"off",disabled:n,onClick:m,ref:r,size:"sm",...T,children:[l&&e.jsx(l,{className:"richtext-size-4"}),v]})}),o&&e.jsx(s.TooltipContent,{...p,className:"richtext-tooltip",children:e.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[e.jsx("div",{children:o}),!!(c!=null&&c.length)&&e.jsx("span",{children:N.getShortcutKeys(c)})]})})]})}),S=h.cva("richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",{variants:{variant:{default:"richtext-bg-transparent",outline:"richtext-border richtext-border-input richtext-bg-transparent hover:richtext-bg-accent hover:richtext-text-accent-foreground"},size:{default:"richtext-h-10 richtext-px-3",sm:"richtext-h-9 richtext-px-2",lg:"richtext-h-11 richtext-px-5"}},defaultVariants:{variant:"default",size:"default"}}),a=R.forwardRef(({className:t,variant:r,size:i,...o},n)=>e.jsx(f.Root,{ref:n,className:d.cn(S({variant:r,size:i,className:t})),...o}));a.displayName=f.Root.displayName;exports.ActionButton=O;exports.Toggle=a;
|
|
@@ -2,11 +2,11 @@ import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import C from "react";
|
|
4
4
|
import { Slot as T } from "@radix-ui/react-slot";
|
|
5
|
-
import { c as l } from "./index
|
|
5
|
+
import { c as l } from "./index--XZPCi0O.js";
|
|
6
|
+
import { g as N } from "./useButtonProps-BIOoOg6h.js";
|
|
7
|
+
import { T as R, a as y, b as w } from "./tooltip-BOMwAoO1.js";
|
|
6
8
|
import * as h from "@radix-ui/react-toggle";
|
|
7
|
-
import { i as
|
|
8
|
-
import { T as y, a as w, b as z } from "./tooltip-CY18LQet.js";
|
|
9
|
-
import { g as j } from "./useButtonProps-DEuoHLy_.js";
|
|
9
|
+
import { i as z, c as j } from "./index-BQ17A_37.js";
|
|
10
10
|
const G = C.forwardRef(
|
|
11
11
|
(r, o) => {
|
|
12
12
|
const {
|
|
@@ -27,9 +27,9 @@ const G = C.forwardRef(
|
|
|
27
27
|
initialDisplayedColor: _ = void 0,
|
|
28
28
|
dataState: u = !1,
|
|
29
29
|
...v
|
|
30
|
-
} = r, n =
|
|
31
|
-
return /* @__PURE__ */ s(
|
|
32
|
-
/* @__PURE__ */ t(
|
|
30
|
+
} = r, n = z[c];
|
|
31
|
+
return /* @__PURE__ */ s(R, { children: [
|
|
32
|
+
/* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ s(
|
|
33
33
|
g ? T : x,
|
|
34
34
|
{
|
|
35
35
|
className: l("richtext-w-[32px] richtext-h-[32px]", d),
|
|
@@ -46,19 +46,19 @@ const G = C.forwardRef(
|
|
|
46
46
|
}
|
|
47
47
|
) }),
|
|
48
48
|
e && /* @__PURE__ */ t(
|
|
49
|
-
|
|
49
|
+
w,
|
|
50
50
|
{
|
|
51
51
|
...f,
|
|
52
52
|
className: "richtext-tooltip",
|
|
53
53
|
children: /* @__PURE__ */ s("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
|
|
54
54
|
/* @__PURE__ */ t("div", { children: e }),
|
|
55
|
-
!!(i != null && i.length) && /* @__PURE__ */ t("span", { children:
|
|
55
|
+
!!(i != null && i.length) && /* @__PURE__ */ t("span", { children: N(i) })
|
|
56
56
|
] })
|
|
57
57
|
}
|
|
58
58
|
)
|
|
59
59
|
] });
|
|
60
60
|
}
|
|
61
|
-
), A =
|
|
61
|
+
), A = j(
|
|
62
62
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
|
|
63
63
|
{
|
|
64
64
|
variants: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-tooltip";
|
|
4
|
-
import { c } from "./index
|
|
4
|
+
import { c } from "./index--XZPCi0O.js";
|
|
5
5
|
const x = t.Provider, h = t.Root, p = t.Trigger, s = d.forwardRef(({ className: i, sideOffset: r = 4, ...e }, o) => /* @__PURE__ */ a(
|
|
6
6
|
t.Content,
|
|
7
7
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),d=require("react"),s=require("@radix-ui/react-tooltip"),l=require("./index-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),d=require("react"),s=require("@radix-ui/react-tooltip"),l=require("./index-CnbtiTqP.cjs");function n(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return i.default=t,Object.freeze(i)}const p=n(d),r=n(s),m=r.Provider,x=r.Root,h=r.Trigger,c=p.forwardRef(({className:t,sideOffset:i=4,...e},o)=>a.jsx(r.Content,{"data-richtext-portal":!0,ref:o,sideOffset:i,className:l.cn("richtext-z-50 richtext-overflow-hidden richtext-rounded-md richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2 !richtext-border-none",t),...e}));c.displayName=r.Content.displayName;exports.Tooltip=x;exports.TooltipContent=c;exports.TooltipProvider=m;exports.TooltipTrigger=h;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as E from "react";
|
|
2
2
|
import { useState as m, useEffect as b, useMemo as a } from "react";
|
|
3
|
-
import { b as S } from "./index
|
|
3
|
+
import { b as S } from "./index--XZPCi0O.js";
|
|
4
4
|
import { O as h, P as C } from "./index-nFjllrEl.js";
|
|
5
5
|
import { u as M } from "./index-DGihe-wH.js";
|
|
6
6
|
let l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react"),b=require("./index-
|
|
1
|
+
"use strict";const s=require("react"),b=require("./index-CnbtiTqP.cjs"),m=require("./index-DLqogznp.cjs"),M=require("./index-D4d-0Hqh.cjs");function h(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const x=h(s);let l;function p(){return l===void 0&&(l=navigator.platform.includes("Mac")),l}function g(t){return`${t}`.toLowerCase()==="mod"?p()?"⌘":"Ctrl":`${t}`.toLowerCase()==="alt"?p()?"⌥":"Alt":`${t}`.toLowerCase()==="shift"?p()?"⇧":"Shift":t}function y(t){return t.map(g).join(" ")}function C(t){const{editor:e}=m.useCurrentEditor(),n=x.useMemo(()=>e,[t,e]);return m.useEditorState({editor:n,selector(r){return r.editor?{editor:r.editor,editorState:r.editor.state,canCommand:r.editor.can}:{editor:null,editorState:void 0,canCommand:void 0}}})||{editor:null}}function f(){return C().editor}const S=()=>!1;function D(t=S){const e=b.useEditableEditor(),[n,o]=s.useState(()=>{const u=t();return typeof u=="boolean"?!u:u}),r=f();s.useEffect(()=>{if(!r||!t)return;const u=()=>{const c=t();o(typeof c=="boolean"?!c:c)};return u(),r.on("selectionUpdate",u),r.on("transaction",u),()=>{r.off("selectionUpdate",u),r.off("transaction",u)}},[r,t]);const a=s.useMemo(()=>!e||!r?!0:typeof n=="boolean"?n:!1,[e,r,n]),i=s.useMemo(()=>!e||!r,[e,r]);return{disabled:a,dataState:n,editorDisabled:i}}function N(t=S){const e=b.useEditableEditor(),[n,o]=s.useState({}),[r,a]=s.useState(t()),i=f();s.useEffect(()=>{if(!i||!t)return;const d=()=>{a(t())};return d(),i.on("selectionUpdate",d),()=>{i.off("selectionUpdate",d)}},[n,i,t]);const u=s.useMemo(()=>!e||!i,[e,i]),c=s.useMemo(()=>!e||!i,[e,i]);return{disabled:u,dataState:r,editorDisabled:c,update:()=>o({})}}function E(t){const e=f();return s.useMemo(()=>e?e.extensionManager.extensions.find(o=>o.name===t):null,[e,t])}function O(t,e,n){return t<e?e:t>n?n:t}const U=t=>typeof t=="number",P=t=>typeof t=="string",$=t=>typeof t=="function";function j(t,e="px"){if(!t)return t;const n=U(t)?String(t):t,o=Number.parseFloat(n),r=n.match(/[%a-z]+$/i),a=r?r[0]:e;return Number.isNaN(o)?t:o+a}function q(t,e){if(!t)return!1;const{extensions:n=[]}=(t==null?void 0:t.extensionManager)??{};return!!n.find(r=>r.name===e)}function w(t){return t.map(e=>P(e)?{value:e,name:e}:e)}function K(t){const e=f(),n=E(t),{t:o}=M.useLocale();return s.useMemo(()=>{if(!e||!n)return null;const{button:r}=n.options;return!r||!$(r)?null:r({editor:e,extension:n,t:o})},[e,n,o])}exports.clamp=O;exports.ensureNameValueOptions=w;exports.getCssUnitWithDefault=j;exports.getShortcutKey=g;exports.getShortcutKeys=y;exports.hasExtension=q;exports.useActive=D;exports.useButtonProps=K;exports.useEditorInstance=f;exports.useExtension=E;exports.useToggleActive=N;
|
package/package.json
CHANGED