feat: 增强功能批量入库 - 双色彩引擎/抖动/杂色清理/品牌色板/PDF导出/编辑工具/分享/i18n 等验收代码
This commit is contained in:
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
|
||||
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BaseLink-B__aGnko.js","assets/rectangle-selection-overlay-Bblq5p9_.js","assets/framework-flIpXurr.js","assets/use-media-query-1yxTUMF5.js","assets/OptimizedImage-D4ODw_wZ.js","assets/NextIntlClientProvider-CA2x2m8u.js","assets/image-upload-DvZZvEi_.js","assets/PixelBeadGenerator-C4oOWXAT.js","assets/pattern-export-source-DAXqKyAF.js","assets/sheet-T4tIXgn9.js","assets/bead-grid-canvas-BiNMzuMo.js","assets/image-cropper-D4xq9yaF.js","assets/saved-pattern-BLI9vXUR.js","assets/PixelBeadGenerator-kalVaOoE.css"])))=>i.map(i=>d[i]);
|
||||
import{d as Xn,r as it,e as $n,b as Ln}from"./framework-flIpXurr.js";function Wn(o,s){const l=((...d)=>d[0]),h=new Map;return function(...d){const S=l(...d),p=h.get(S);if(typeof p<"u")return p;const g=o.apply(this,d);return h.set(S,g),g}}const Fn="$$server:";function qn(o){return o.split("$$cache=")[0]}function Hn(){globalThis.__vite_rsc_require__=o=>o.startsWith(Fn)?(o=o.slice(9),globalThis.__vite_rsc_server_require__(o)):globalThis.__vite_rsc_client_require__(o)}let Jt=!1;function Bn(o){if(Jt)return;Jt=!0;const s=Wn(l=>o.load(qn(l)));globalThis.__vite_rsc_client_require__=s,Hn()}var It={exports:{}},J={};var zt;function Gn(){if(zt)return J;zt=1;var o=Xn(),s={stream:!0},l=Object.prototype.hasOwnProperty;function h(t,n){if(t){var e=t[n[0]];if(t=e&&e[n[2]])e=t.name;else{if(t=e&&e["*"],!t)throw Error('Could not find the module "'+n[0]+'" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.');e=n[2]}return n.length===4?[t.id,t.chunks,e,1]:[t.id,t.chunks,e]}return n}function d(t,n){var e="",r=t[n];if(r)e=r.name;else{var i=n.lastIndexOf("#");if(i!==-1&&(e=n.slice(i+1),r=t[n.slice(0,i)]),!r)throw Error('Could not find the module "'+n+'" in the React Server Manifest. This is probably a bug in the React Server Components bundler.')}return r.async?[r.id,r.chunks,e,1]:[r.id,r.chunks,e]}var S=new Map;function p(t){var n=__vite_rsc_require__(t);return typeof n.then!="function"||n.status==="fulfilled"?null:(n.then(function(e){n.status="fulfilled",n.value=e},function(e){n.status="rejected",n.reason=e}),n)}function g(){}function V(t){for(var n=t[1],e=[],r=0;r<n.length;){var i=n[r++],a=n[r++],u=S.get(i);u===void 0?(M.set(i,a),a=__webpack_chunk_load__(i),e.push(a),u=S.set.bind(S,i,null),a.then(u,g),S.set(i,a)):u!==null&&e.push(u)}return t.length===4?e.length===0?p(t[0]):Promise.all(e).then(function(){return p(t[0])}):0<e.length?Promise.all(e):null}function N(t){var n=__vite_rsc_require__(t[0]);if(t.length===4&&typeof n.then=="function")if(n.status==="fulfilled")n=n.value;else throw n.reason;if(t[2]==="*")return n;if(t[2]==="")return n.__esModule?n.default:n;if(l.call(n,t[2]))return n[t[2]]}var M=new Map,D=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Symbol.for("react.transitional.element"),O=Symbol.for("react.lazy"),q=Symbol.iterator;function dt(t){return t===null||typeof t!="object"?null:(t=q&&t[q]||t["@@iterator"],typeof t=="function"?t:null)}var Y=Symbol.asyncIterator,hn=Array.isArray,Dt=Object.getPrototypeOf,wn=Object.prototype,ht=new WeakMap;function pn(t){return Number.isFinite(t)?t===0&&1/t===-1/0?"$-0":t:t===1/0?"$Infinity":t===-1/0?"$-Infinity":"$NaN"}function mn(t,n,e,r,i){function a(_,c){c=new Blob([new Uint8Array(c.buffer,c.byteOffset,c.byteLength)]);var w=T++;return m===null&&(m=new FormData),m.append(n+w,c),"$"+_+w.toString(16)}function u(_){function c(U){U.done?(U=T++,w.append(n+U,new Blob(W)),w.append(n+X,'"$o'+U.toString(16)+'"'),w.append(n+X,"C"),I--,I===0&&r(w)):(W.push(U.value),_.read(new Uint8Array(1024)).then(c,i))}m===null&&(m=new FormData);var w=m;I++;var X=T++,W=[];return _.read(new Uint8Array(1024)).then(c,i),"$r"+X.toString(16)}function f(_){function c(W){if(W.done)w.append(n+X,"C"),I--,I===0&&r(w);else try{var U=JSON.stringify(W.value,E);w.append(n+X,U),_.read().then(c,i)}catch(et){i(et)}}m===null&&(m=new FormData);var w=m;I++;var X=T++;return _.read().then(c,i),"$R"+X.toString(16)}function v(_){try{var c=_.getReader({mode:"byob"})}catch{return f(_.getReader())}return u(c)}function y(_,c){function w(U){if(U.done){if(U.value===void 0)X.append(n+W,"C");else try{var et=JSON.stringify(U.value,E);X.append(n+W,"C"+et)}catch(Z){i(Z);return}I--,I===0&&r(X)}else try{var rt=JSON.stringify(U.value,E);X.append(n+W,rt),c.next().then(w,i)}catch(Z){i(Z)}}m===null&&(m=new FormData);var X=m;I++;var W=T++;return _=_===c,c.next().then(w,i),"$"+(_?"x":"X")+W.toString(16)}function E(_,c){if(c===null)return null;if(typeof c=="object"){switch(c.$$typeof){case A:if(e!==void 0&&_.indexOf(":")===-1){var w=b.get(this);if(w!==void 0)return e.set(w+":"+_,c),"$T"}throw Error("React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options.");case O:w=c._payload;var X=c._init;m===null&&(m=new FormData),I++;try{var W=X(w),U=T++,et=x(W,U);return m.append(n+U,et),"$"+U.toString(16)}catch($){if(typeof $=="object"&&$!==null&&typeof $.then=="function"){I++;var rt=T++;return w=function(){try{var Q=x(c,rt),ct=m;ct.append(n+rt,Q),I--,I===0&&r(ct)}catch(Nt){i(Nt)}},$.then(w,w),"$"+rt.toString(16)}return i($),null}finally{I--}}if(w=b.get(c),typeof c.then=="function"){if(w!==void 0)if(G===c)G=null;else return w;m===null&&(m=new FormData),I++;var Z=T++;return _="$@"+Z.toString(16),b.set(c,_),c.then(function($){try{var Q=b.get($),ct=Q!==void 0?JSON.stringify(Q):x($,Z);$=m,$.append(n+Z,ct),I--,I===0&&r($)}catch(Nt){i(Nt)}},i),_}if(w!==void 0)if(G===c)G=null;else return w;else _.indexOf(":")===Line truncated
|
||||
Reference in new issue
Block a user