filecat 7.1.1 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/1149.e3a538a30556fbad25dd.js +1 -0
- package/build/dist/1384.8d1ae0401cf32bf88b83.js +1 -0
- package/build/dist/2091.5bc71c19b26140f00a48.js +1 -0
- package/build/dist/{3328.85aa4fcbe515c670f1ad.js → 3328.2d65fbe893d02787f48a.js} +1 -1
- package/build/dist/3659.97898b4c2bc7765a91f7.js +1 -0
- package/build/dist/4476.bd49273fea4a2679f45e.js +1 -0
- package/build/dist/4903.bf39a395daf5bc283e4a.js +1 -0
- package/build/dist/5308.bff6efb3c9335ad227da.js +1 -0
- package/build/dist/6805.6b181f3ae37028391d63.js +1 -0
- package/build/dist/7200.d4aa731754f2359a4f7b.js +1 -0
- package/build/dist/8603.d7eea8d253cff5aef62c.js +1 -0
- package/build/dist/8765.ca9ec23eec760dab2bec.js +1 -0
- package/build/dist/9299.4ee1fc7465badad59aa6.js +1 -0
- package/build/dist/9546.de5433de4cead0a0e4b1.js +1 -0
- package/build/dist/{3426.b4464d74998fb12ec5ac.js → 9878.39d098f7cdb90f45bbfd.js} +1 -1
- package/build/dist/index.html +1 -1
- package/build/dist/main.b8e4dd383adfa223d84e.js +2 -0
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/build/dist/1149.cbeaf4f434dffe8aa534.js +0 -1
- package/build/dist/1384.edbad9c24d883a59724d.js +0 -1
- package/build/dist/3659.f0dbf1eed0113cfeb0d2.js +0 -1
- package/build/dist/4903.72481ee04812f34d5e96.js +0 -1
- package/build/dist/5308.78bd4ed591fdfdcd82e7.js +0 -1
- package/build/dist/6805.e710a58739319eb7ae8a.js +0 -1
- package/build/dist/6966.2432063a0d9349aff6b4.js +0 -1
- package/build/dist/8603.5b96680516f93196c2c0.js +0 -1
- package/build/dist/8714.8fcad52f220ca72a1b6f.js +0 -1
- package/build/dist/8765.4b41dd887f09c4c1a556.js +0 -1
- package/build/dist/9546.421e124c9297955f5a4d.js +0 -1
- package/build/dist/main.d07c1bd328b47164e2a8.js +0 -2
- /package/build/dist/{main.d07c1bd328b47164e2a8.js.LICENSE.txt → main.b8e4dd383adfa223d84e.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[1149],{69918(e,t,n){n.d(t,{Ce:()=>d,FG:()=>i.FG,fy:()=>a,gC:()=>r});var i=n(18840),s=n(14284),c=n(53459);async function r(){try{const e=await s.XO.get("md_editor_setting/get");return{...i.FG,...e?.data??{}}}catch(e){return{...i.FG}}}async function a(e){const t=await s.XO.post("md_editor_setting/save",e);return t?.code!==c.m.Success?null:{...i.FG,...t.data??e}}function d(e,t){e&&(e.style.setProperty("--md-editor-max-width",t.content_max_width),e.style.setProperty("--md-editor-padding",t.content_padding),e.style.setProperty("--md-editor-font-size",t.font_size),e.style.setProperty("--md-editor-line-height",t.line_height))}},96763(e,t,n){n.d(t,{Kz:()=>r,P7:()=>o,_8:()=>h,_D:()=>m,bN:()=>c,sO:()=>l});var i=n(14284),s=n(53459);function c(e,t,n){const i="md-theme-style-"+e,s=document.getElementById(i);if(!t)return void s?.remove();let c=s;c||(c=document.createElement("style"),c.id=i,document.head.appendChild(c)),c.textContent=function(e,t){let n=String(e??"");return n=n.replace(/\/\*[\s\S]*?\*\//g,""),n=n.replace(/^\s*@include-when-export[^;]*;?/gim,""),n=n.replace(/^\s*@import[^;]*;?/gim,""),n.replace(/(^|})\s*([^{}@]+?)\s*\{/g,(e,n,i)=>`${n}\n${String(i).split(",").map(e=>e.trim()).filter(Boolean).map(e=>"#write"===e||"html"===e||"body"===e||":root"===e||"content"===e?t:e.startsWith("#write")?t+e.slice(6):/^(html|body)\b/.test(e)?t+e.replace(/^(html|body)/,""):`${t} ${e}`).join(", ")} {`)}(t,n)}async function r(){try{const e=await i.XO.get("md_theme/list");return e?.code===s.m.Success?e.data??[]:[]}catch(e){return[]}}const a="md-theme-change";function d(){window.dispatchEvent(new Event(a))}async function o(e){try{const t=await i.XO.get(`md_theme/get?id=${encodeURIComponent(e)}`);return t?.code===s.m.Success?t.data??"":""}catch(e){return""}}async function l(){try{const e=await i.XO.get("md_theme/active");return e?.code===s.m.Success?e.data??"":""}catch(e){return""}}async function m(e){const t=await i.XO.post("md_theme/save",e);return t?.code!==s.m.Success?null:(d(),t.data)}async function h(e){const t=await i.XO.post("md_theme/del",{id:e});return t?.code===s.m.Success&&(d(),!0)}n.d(t,["o3",0,a])},45907(e,t,n){n.d(t,{y:()=>c});var i=n(34843),s=n(82893);function c(){const[e,t]=(0,i.fp)(s.AG.confirm);return({sub_title:e,confirm_fun:n,title:i,context_div:s})=>{t({open:!0,sub_title:e,handle:()=>{n(),t({open:!1,handle:null})},title:i,context_div:s})}}},11149(e,t,n){n.r(t),n.d(t,{default:()=>w});var i=n(96540),s=n(86149),c=n(86090),r=n(85997),a=n(4412),d=n(75725),o=n(70447),l=n(61443),m=n(62042),h=n(78247),u=n(23430),p=n(87361),_=n(69918),y=n(96763),f=n(45907),x=n(34843),g=n(82893),v=n(74848);const j=[{key:"content_max_width",label:"正文最大宽度"},{key:"content_padding",label:"正文左右边距"},{key:"font_size",label:"正文字号"},{key:"line_height",label:"行高"}],k=/^\d+(\.\d+)?(px|%|rem|em|vw|vh|ch)?$/;function w(){const{t:e}=(0,s.B)(),t=(0,c.Zp)(),{check_user_auth:n}=(0,h.MH)(),w=(0,f.y)(),b=n(u.oV.md_editor_setting),[,C]=(0,x.fp)(g.AG.md_editor_setting),[,S]=(0,x.fp)(g.AG.md_theme_css),[F,G]=(0,i.useState)({}),[N,z]=(0,i.useState)(!0),[$,P]=(0,i.useState)(!1),[E,O]=(0,i.useState)([]),[A,X]=(0,i.useState)(_.FG.theme);(0,i.useEffect)(()=>{Promise.all([(0,_.gC)(),(0,y.Kz)()]).then(([e,t])=>{const n={};j.forEach(t=>n[t.key]=e[t.key]??""),G(n),X(e.theme??_.FG.theme),O(t)}).finally(()=>z(!1))},[]);const B=E.find(e=>e.id===A),I=e=>{const t=(F[e]??"").trim();return k.test(t)?t:_.FG[e]};return(0,v.jsxs)("div",{children:[(0,v.jsx)(a.aZ,{position:"right",children:(0,v.jsx)(r.rA,{icon:"arrow_back",title:e("上一页"),onClick:()=>t(-1)})}),(0,v.jsx)(d.jW,{isFull:!0,more:!0,children:(0,v.jsx)(d.NN,{children:(0,v.jsx)(d.xh,{children:(0,v.jsxs)(d.fI,{children:[(0,v.jsx)(d.VP,{widthPer:33,maxWidth:"30rem",children:(0,v.jsx)(o.Zp,{title:e("编辑器设置"),titleCom:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(r.C3,{text:e("恢复默认"),clickFun:()=>{const e={};j.forEach(t=>e[t.key]=_.FG[t.key]),G(e)}}),b&&(0,v.jsx)(r.$n,{text:e($?"保存中":"保存"),clickFun:()=>{$||(async()=>{for(const t of j){const n=(F[t.key]??"").trim();if(!k.test(n))return void(0,m.zN)(`${e(t.label)}: ${e("请输入合法的 CSS 值,例如 10px、3rem、80%")}`)}const t={};j.forEach(e=>t[e.key]=F[e.key].trim()),t.theme=A,P(!0);try{const n=await(0,_.fy)(t);if(n){(0,m.SK)(e("保存成功"));const t={};j.forEach(e=>t[e.key]=n[e.key]??""),G(t),X(n.theme??_.FG.theme),C({...n}),(0,y.sO)().then(S)}else(0,m.zN)(e("保存失败"))}finally{P(!1)}})()}})]}),children:N?(0,v.jsxs)("div",{className:"common-box common-box-center",children:[e("加载中"),"..."]}):(0,v.jsxs)("div",{className:"md-setting-form",children:[(0,v.jsx)(l.BC,{vertical:!0,label:e("主题"),children:(0,v.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.4rem"},children:[(0,v.jsx)(l.l6,{value:A,onChange:e=>X(e),disabled:!b,options:[{title:e("不使用主题"),value:""},...E.map(e=>({title:e.id,value:e.id}))]}),(0,v.jsx)(r.rA,{icon:"add",title:e("新建主题"),onClick:()=>t(p.o.md_theme_editor_page)}),(0,v.jsx)(r.rA,{icon:"edit",title:e("编辑主题"),onClick:()=>t(`${p.o.md_theme_editor_page}?id=${encodeURIComponent(A)}`)}),B&&(0,v.jsx)(r.rA,{icon:"delete",title:e("删除主题"),onClick:()=>{return t=B,void w({sub_title:e("确认删除这个主题吗?"),confirm_fun:async()=>{await(0,y._8)(t.id)?((0,m.SK)(e("删除成功")),O(await(0,y.Kz)()),A===t.id&&X(_.FG.theme)):(0,m.zN)(e("删除失败"))}});var t}})]})}),j.map(t=>(0,v.jsx)(l.BC,{vertical:!0,label:e(t.label),children:(0,v.jsx)("input",{className:"input input--block",type:"text",spellCheck:!1,disabled:!b,placeholder:_.FG[t.key],value:F[t.key]??"",onChange:e=>G(n=>({...n,[t.key]:e.target.value}))})},t.key)),!b&&(0,v.jsx)("p",{className:"md-editor-setting-page__desc",children:e("nprmtp")})]})})}),(0,v.jsx)(d.VP,{widthPer:50,maxWidth:"60rem",children:(0,v.jsx)(o.Zp,{title:e("预览"),children:(0,v.jsx)("div",{className:"md-editor-setting-page__preview",ref:e=>(0,_.Ce)(e,{content_max_width:I("content_max_width"),content_padding:I("content_padding"),font_size:I("font_size"),line_height:I("line_height")}),children:(0,v.jsxs)("div",{className:"md-editor-setting-page__preview-sheet",children:[(0,v.jsx)("h3",{children:e("标题")}),(0,v.jsx)("p",{children:e("这是一段用于预览正文宽度、边距、字号和行高的示例文字。调整左侧数值即可看到这里的变化,与实际编辑器使用的是同一套样式变量。")}),(0,v.jsx)("p",{children:e("第二段文字,用来更清楚地看出行高。")})]})})})})]})})})})]})}}}]);
|