feat: 增强功能批量入库 - 双色彩引擎/抖动/杂色清理/品牌色板/PDF导出/编辑工具/分享/i18n 等验收代码

This commit is contained in:
Sisyphus (主代理) committed 2026-08-14 00:20:40 +08:00
1 parent 02762400fb
commit f846fabfc6
77 files changed
+11372 -226

No files matched your search

@@ -0,0 +1,2 @@
import{r,j as e,a as E,v as Sr}from"./framework-flIpXurr.js";import{q as ls,o as cs,L as xa,M as wn,N as Cn,A as ds,U as Yt,Q as Wa,z as yt,c as Xt,d as Ba,e as La,f as Zt,g as qt,h as us,V as kr,t as ms,W as Fr,s as ps,v as hs,Y as Ar,Z as fs,S as Dr,E as Pr,a as Rr,X as vt,_ as Nn,$ as jn,C as Sn,a0 as Tr,n as _r,G as Ir,a1 as Mr,a2 as Ha,k as xs,a3 as Br,a4 as Lr,a5 as kn,a6 as Or,a7 as Fn,F as Gr,a8 as zr,a9 as Ur,w as Wr,B as Hr,x as $r,aa as Vr}from"./image-upload-DvZZvEi_.js";import{d as gs,L as Yr,P as Xr,I as Vt,k as An,l as Zr,m as qr,e as Kr,U as Qr,R as Jr,u as eo,c as to,n as ao,b as Dn,a as no,o as so,s as ro,S as Pn,h as Rn,F as gt,f as Tn,i as oo,j as io}from"./pattern-export-source-DAXqKyAF.js";import{b as ga,n as de,F as Oa,H as lo,D as _n,P as bs,I as ys,B as ke,w as $a,r as ha,L as co,c as ne,a as uo,y as mo,J as po,Z as ho,l as In,t as fo,v as xo}from"./rectangle-selection-overlay-Bblq5p9_.js";import{BeadGridCanvas as go}from"./bead-grid-canvas-BiNMzuMo.js";import{d as Je,e as et,f as vs,S as tt,b as at}from"./sheet-T4tIXgn9.js";import{c as Es,d as Ut,a as bo,u as yo,s as vo}from"./use-media-query-1yxTUMF5.js";import{ImageCropper as Eo}from"./image-cropper-D4xq9yaF.js";import{b as wo,c as Co,d as No,e as jo}from"./index-j6j51b9x.js";import{a as So}from"./saved-pattern-BLI9vXUR.js";const ws=ga("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const ko=ga("FlipHorizontal2",[["path",{d:"m3 7 5 5-5 5V7",key:"couhi7"}],["path",{d:"m21 7-5 5 5 5V7",key:"6ouia7"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 2v2",key:"tus03m"}]]);const Fo=ga("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Ga=ga("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),Ao={id:"simplified",maxColors:8,analysisPixelsPerCell:4,minimumForegroundCoverage:.28,outlineDarkLuminance:.34,outlineDarkRatio:.22,outlineContrast:.18,outlineWeight:3,backgroundSeedDeltaE:8,backgroundFillDeltaE:13,backgroundMinimumConfidence:.85,cleanupMinimumNeighbors:4,cellSamplingMode:"dominant-bucket",colorBucketBits:4,paletteSelectionMode:"fixed-palette-greedy",colorDistanceMode:"oklab",ditheringMode:"none",spatialRegularizationIterations:2,spatialSmoothness:3,spatialEdgeSigma:8},Do={id:"standard",maxColors:10,analysisPixelsPerCell:4,minimumForegroundCoverage:.2,outlineDarkLuminance:.32,outlineDarkRatio:.2,outlineContrast:.16,outlineWeight:2.5,backgroundSeedDeltaE:8,backgroundFillDeltaE:14,backgroundMinimumConfidence:.85,cleanupMinimumNeighbors:5,cellSamplingMode:"dominant-bucket",colorBucketBits:4,paletteSelectionMode:"fixed-palette-greedy",colorDistanceMode:"oklab",ditheringMode:"none",spatialRegularizationIterations:2,spatialSmoothness:2,spatialEdgeSigma:10},Po={id:"detailed",maxColors:16,analysisPixelsPerCell:4,minimumForegroundCoverage:.12,outlineDarkLuminance:.28,outlineDarkRatio:.3,outlineContrast:.22,outlineWeight:1.5,backgroundSeedDeltaE:8,backgroundFillDeltaE:13,backgroundMinimumConfidence:.88,cleanupMinimumNeighbors:7,cellSamplingMode:"dominant-bucket",colorBucketBits:5,paletteSelectionMode:"fixed-palette-greedy",colorDistanceMode:"ciede2000",ditheringMode:"floyd-steinberg",spatialRegularizationIterations:1,spatialSmoothness:1,spatialEdgeSigma:12},Ro={id:"legacy",maxColors:null,analysisPixelsPerCell:1,minimumForegroundCoverage:0,outlineDarkLuminance:0,outlineDarkRatio:1,outlineContrast:1,outlineWeight:1,backgroundSeedDeltaE:0,backgroundFillDeltaE:0,backgroundMinimumConfidence:1,cleanupMinimumNeighbors:null,cellSamplingMode:"average",colorBucketBits:null,paletteSelectionMode:"cluster-then-snap",colorDistanceMode:"oklab",ditheringMode:"none",spatialRegularizationIterations:0,spatialSmoothness:0,spatialEdgeSigma:1},To={id:"zippland",maxColors:null,analysisPixelsPerCell:1,minimumForegroundCoverage:0,outlineDarkLuminance:0,outlineDarkRatio:1,outlineContrast:1,outlineWeight:1,backgroundSeedDeltaE:0,backgroundFillDeltaE:0,backgroundMinimumConfidence:1,cleanupMinimumNeighbors:null,cellSamplingMode:"aveLine truncated
`);function da(t){return t.label!==void 0}var ui=3,mi="32px",pi="16px",Hn=4e3,hi=356,fi=14,xi=20,gi=200;function We(...t){return t.filter(Boolean).join(" ")}function bi(t){let[a,n]=t.split("-"),o=[];return a&&o.push(a),n&&o.push(n),o}var yi=t=>{var a,n,o,l,i,c,h,u,m,y,F;let{invert:A,toast:d,unstyled:k,interacting:v,setHeights:N,visibleToasts:O,heights:f,index:x,toasts:M,expanded:D,removeToast:_,defaultRichColors:$,closeButton:L,style:p,cancelButtonStyle:g,actionButtonStyle:j,className:V="",descriptionClassName:K="",duration:te,position:T,gap:w,loadingIcon:I,expandByDefault:Z,classNames:S,icons:ae,closeButtonAriaLabel:re="Close toast",pauseWhenPageIsHidden:G}=t,[q,Y]=E.useState(null),[J,me]=E.useState(null),[X,be]=E.useState(!1),[Ae,Ie]=E.useState(!1),[ce,De]=E.useState(!1),[rt,Le]=E.useState(!1),[Pe,Re]=E.useState(!1),[Te,Ye]=E.useState(0),[_e,Xe]=E.useState(0),ye=E.useRef(d.duration||te||Hn),P=E.useRef(null),z=E.useRef(null),ve=x===0,Ee=x+1<=O,pe=d.type,ue=d.dismissible!==!1,Rt=d.className||"",U=d.descriptionClassName||"",we=E.useMemo(()=>f.findIndex(B=>B.toastId===d.id)||0,[f,d.id]),Et=E.useMemo(()=>{var B;return(B=d.closeButton)!=null?B:L},[d.closeButton,L]),Tt=E.useMemo(()=>d.duration||te||Hn,[d.duration,te]),_t=E.useRef(0),Ce=E.useRef(0),It=E.useRef(0),ot=E.useRef(null),[Mt,ie]=T.split("-"),wt=E.useMemo(()=>f.reduce((B,W,ee)=>ee>=we?B:B+W.height,0),[f,we]),mt=ni(),it=d.invert||A,Bt=pe==="loading";Ce.current=E.useMemo(()=>we*w+wt,[we,wt]),E.useEffect(()=>{ye.current=Tt},[Tt]),E.useEffect(()=>{be(!0)},[]),E.useEffect(()=>{let B=z.current;if(B){let W=B.getBoundingClientRect().height;return Xe(W),N(ee=>[{toastId:d.id,height:W,position:d.position},...ee]),()=>N(ee=>ee.filter(oe=>oe.toastId!==d.id))}},[N,d.id]),E.useLayoutEffect(()=>{if(!X)return;let B=z.current,W=B.style.height;B.style.height="auto";let ee=B.getBoundingClientRect().height;B.style.height=W,Xe(ee),N(oe=>oe.find(Ne=>Ne.toastId===d.id)?oe.map(Ne=>Ne.toastId===d.id?{...Ne,height:ee}:Ne):[{toastId:d.id,height:ee,position:d.position},...oe])},[X,d.title,d.description,N,d.id]);let Oe=E.useCallback(()=>{Ie(!0),Ye(Ce.current),N(B=>B.filter(W=>W.toastId!==d.id)),setTimeout(()=>{_(d)},gi)},[d,_,N,Ce]);E.useEffect(()=>{if(d.promise&&pe==="loading"||d.duration===1/0||d.type==="loading")return;let B;return D||v||G&&mt?(()=>{if(It.current<_t.current){let W=new Date().getTime()-_t.current;ye.current=ye.current-W}It.current=new Date().getTime()})():ye.current!==1/0&&(_t.current=new Date().getTime(),B=setTimeout(()=>{var W;(W=d.onAutoClose)==null||W.call(d,d),Oe()},ye.current)),()=>clearTimeout(B)},[D,v,d,pe,G,mt,Oe]),E.useEffect(()=>{d.delete&&Oe()},[Oe,d.delete]);function Ct(){var B,W,ee;return ae!=null&&ae.loading?E.createElement("div",{className:We(S?.loader,(B=d?.classNames)==null?void 0:B.loader,"sonner-loader"),"data-visible":pe==="loading"},ae.loading):I?E.createElement("div",{className:We(S?.loader,(W=d?.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":pe==="loading"},I):E.createElement(Ko,{className:We(S?.loader,(ee=d?.classNames)==null?void 0:ee.loader),visible:pe==="loading"})}return E.createElement("li",{tabIndex:0,ref:z,className:We(V,Rt,S?.toast,(a=d?.classNames)==null?void 0:a.toast,S?.default,S?.[pe],(n=d?.classNames)==null?void 0:n[pe]),"data-sonner-toast":"","data-rich-colors":(o=d.richColors)!=null?o:$,"data-styled":!(d.jsx||d.unstyled||k),"data-mounted":X,"data-promise":!!d.promise,"data-swiped":Pe,"data-removed":Ae,"data-visible":Ee,"data-y-position":Mt,"data-x-position":ie,"data-index":x,"data-front":ve,"data-swiping":ce,"data-dismissible":ue,"data-type":pe,"data-invert":it,"data-swipe-out":rt,"data-swipe-direction":J,"data-expanded":!!(D||Z&&X),style:{"--index":x,"--toasts-before":x,"--z-index":M.length-x,"--offset":`${Ae?Te:Ce.current}px`,"--initial-height":Z?"auto":`${_e}px`,...p,...d.style},onDragEnd:()=>{De(!1),Y(null),ot.current=null},onPointerDown:B=>{Bt||!ue||(P.current=new Date,Ye(Ce.current),B.target.setPointerCapture(B.pointerId),B.target.tagName!=="BUTTON"&&(De(!0),ot.current={x:B.clientX,y:B.clientY}))},onPointerUp:()=>{var B,W,ee,oe;if(rt||!ue)return;ot.current=null;let Ne=Number(((B=z.current)==null?void 0:B.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ge=Number(((W=z.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ze=new Date().getTime()-((ee=P.current)==null?void 0:ee.getTime()),he=q==="x"?Ne:Ge,Me=Math.abs(he)/ze;if(Math.abs(he)>=xi||Me>.11){Ye(Ce.current),(oe=d.onDismiss)==null||oe.call(d,d),me(q==="x"?Ne>0?"right":"left":Ge>0?"down":"up"),Oe(),Le(!0),Re(!1);return}De(!1),Y(null)},onPointerMove:B=>{var W,ee,oe,Ne;if(!ot.current||!ue||((W=window.getSelection())==null?void 0:W.toString().length)>0)return;let Ge=B.clientY-ot.current.y,ze=B.clientX-ot.current.x,he=(ee=t.swipeDirections)!=null?ee:bi(T);!q&&(Math.abs(ze)>1||Math.abs(Ge)>1)&&Y(Math.abs(ze)>Math.abs(Ge)?"x":"y");let Me={x:0,y:0};q==="y"?(he.includes("top")||he.includes("bottom"))&& Line truncated