@fraczled/sdk 1.11.0 → 1.12.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/dist/fraczled-sdk.es.js
CHANGED
package/dist/fraczled-sdk.umd.js
CHANGED
|
@@ -796,7 +796,7 @@ end`};e.events.push(["putFont",function(A){(function(o){var l=o.font,u=o.out,f=o
|
|
|
796
796
|
*
|
|
797
797
|
* This source code is licensed under the ISC license.
|
|
798
798
|
* See the LICENSE file in the root directory of this source tree.
|
|
799
|
-
*/const C7=_t("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),S7=({title:r="Untitled Design",onExport:e,onUndo:t,onRedo:n,canUndo:i,canRedo:A,onTitleChange:o,onToggleSettings:l,zoom:u,setZoom:f,showToolbar:g=!0,children:m,exportAccess:b,canSaveLoadJson:p=!0,upgradeUrl:E,onRequestUpgrade:x,onSaveDesign:N,onNewDesign:U})=>{const[L,M]=fe.useState(!1),[H,Ae]=fe.useState(!1),ce=fe.useRef(null),te=fe.useRef(null),re=g&&h.Children.count(m)>0,J=(b==null?void 0:b.web)!==!1,me=(b==null?void 0:b.print)!==!1,X=J||me||p||!!E;fe.useEffect(()=>{const z=P=>{ce.current&&!ce.current.contains(P.target)&&M(!1),te.current&&!te.current.contains(P.target)&&Ae(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]);const ee=z=>{z==="web"&&!J||z!=="web"&&!me||(e(z),M(!1))};return h.createElement("div",{className:"bg-white border-b border-gray-200 flex flex-col flex-shrink-0 z-[100] relative",style:{paddingTop:"env(safe-area-inset-top)"}},h.createElement("div",{className:"h-14 flex items-center gap-2 px-2 md:px-4"},h.createElement("div",{className:"flex items-center gap-2 md:gap-4 shrink-0"},h.createElement("button",{onClick:l,className:"p-2 hover:bg-gray-100 rounded-md transition-colors text-slate-700 hidden md:block",title:"Document Settings"},h.createElement(u7,{size:20})),h.createElement("button",{onClick:l,className:"md:hidden p-2 hover:bg-gray-100 rounded-full text-slate-600"},h.createElement(h7,{size:20})),h.createElement("div",{className:"flex items-center"},h.createElement("input",{type:"text",value:r,onChange:z=>o(z.target.value),className:"font-bold text-lg text-slate-800 hover:border-gray-300 border border-transparent rounded px-2 -ml-1 focus:border-slate-500 focus:outline-none bg-transparent transition-all w-40 sm:w-64 md:w-auto hidden sm:block"}))),h.createElement("div",{className:"hidden md:flex flex-1 min-w-0 items-center"},h.createElement("div",{className:"w-full overflow-x-auto overflow-y-visible"},h.createElement("div",{className:"flex items-center gap-3 px-2 min-w-max mx-auto"},m))),h.createElement("div",{className:"flex items-center gap-1 md:gap-3 shrink-0"},h.createElement("div",{className:"md:hidden relative",ref:te},h.createElement("button",{onClick:()=>Ae(!H),className:`p-2 hover:bg-gray-100 rounded-full transition-colors ${H?"bg-indigo-50 text-indigo-600":"text-slate-600"}`},h.createElement(C7,{size:20})),H&&h.createElement("div",{className:"absolute left-0 top-full mt-2 bg-white rounded-lg shadow-xl border border-gray-200 p-3 z-50 min-w-[200px]"},h.createElement("div",{className:"flex items-center gap-2 justify-center mb-3"},h.createElement("button",{onClick:()=>f(Math.max(10,u-10)),className:"p-2 hover:bg-gray-100 rounded text-slate-600"},h.createElement(Zp,{size:18})),h.createElement("span",{className:"text-sm font-medium w-12 text-center tabular-nums"},u,"%"),h.createElement("button",{onClick:()=>f(Math.min(200,u+10)),className:"p-2 hover:bg-gray-100 rounded text-slate-600"},h.createElement(no,{size:18}))),h.createElement("input",{type:"range",min:"10",max:"200",step:"5",value:u,onChange:z=>f(parseInt(z.target.value)),className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-indigo-600"}),h.createElement("div",{className:"flex justify-between text-[10px] text-slate-400 mt-1"},h.createElement("span",null,"10%"),h.createElement("span",null,"200%")))),h.createElement("div",{className:"flex md:hidden gap-0.5"},h.createElement("button",{onClick:t,disabled:!i,className:`p-2 rounded-full ${i?"text-slate-700 hover:bg-gray-100":"text-slate-300"}`},h.createElement(B7,{size:18})),h.createElement("button",{onClick:n,disabled:!A,className:`p-2 rounded-full ${A?"text-slate-700 hover:bg-gray-100":"text-slate-300"}`},h.createElement(s7,{size:18})),U&&h.createElement("button",{onClick:()=>U(),className:"p-2 rounded-full text-emerald-600 hover:bg-emerald-50",title:"New Design"},h.createElement(aB,{size:18}))),h.createElement("button",{className:"hidden md:flex items-center justify-center p-2 hover:opacity-80 transition-opacity group relative",style:{color:"#5046e5"},onClick:()=>N==null?void 0:N()},h.createElement(yl,{size:20}),h.createElement("div",{className:"absolute top-full mt-2 left-1/2 -translate-x-1/2 px-2 py-1 bg-slate-800 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-50 shadow-lg"},"Save Design")),h.createElement("button",{className:"hidden md:flex items-center justify-center p-2 hover:opacity-80 transition-opacity mr-2 group relative",style:{color:"#10b981"},onClick:()=>U==null?void 0:U()},h.createElement(aB,{size:20}),h.createElement("div",{className:"absolute top-full mt-2 left-1/2 -translate-x-1/2 px-2 py-1 bg-slate-800 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-50 shadow-lg"},"New Design")),h.createElement("div",{className:"relative",ref:ce},h.createElement("button",{onClick:()=>M(!L),disabled:!X,className:`flex items-center gap-2 px-2 py-1.5 md:px-4 md:py-2 bg-slate-900 hover:bg-slate-800 text-white rounded-lg font-medium text-sm transition-colors shadow-sm ${X?"":"opacity-60 cursor-not-allowed"}`},h.createElement(jk,{size:16}),h.createElement("span",{className:"hidden md:inline"},"Export"),h.createElement(hu,{size:14,className:"md:ml-1 opacity-70"})),L&&h.createElement("div",{className:"absolute right-0 top-full mt-2 w-64 bg-white rounded-xl shadow-xl border border-gray-100 p-1.5 animate-in fade-in zoom-in-95 duration-100 z-50"},h.createElement("button",{onClick:()=>ee("web"),disabled:!J,className:`w-full text-left px-3 py-2.5 rounded-lg hover:bg-gray-50 flex items-center gap-3 transition-colors group ${J?"":"opacity-60 cursor-not-allowed"}`},h.createElement("div",{className:"p-2 bg-blue-50 text-blue-600 rounded-md group-hover:bg-blue-100 transition-colors"},h.createElement(Fd,{size:18})),h.createElement("div",null,h.createElement("div",{className:"text-sm font-semibold text-slate-800"},"Export for Web"),h.createElement("div",{className:"text-xs text-slate-500"},"Fast Download (PNG)")),!J&&h.createElement("div",{className:"ml-auto text-[10px] font-semibold text-amber-600 flex items-center gap-1"},h.createElement(Lo,{size:12}),h.createElement("span",null,"Pro"))),h.createElement("div",{className:"my-1 border-t border-gray-100"}),h.createElement("div",{className:"px-3 py-1.5 text-[10px] font-bold text-slate-400 uppercase tracking-wider"},"Print Ready (300 DPI)"),h.createElement("button",{onClick:()=>ee("print_pdf"),disabled:!me,className:`w-full text-left px-3 py-2.5 rounded-lg hover:bg-gray-50 flex items-center gap-3 transition-colors group ${me?"":"opacity-60 cursor-not-allowed"}`},h.createElement("div",{className:"p-2 bg-red-50 text-red-600 rounded-md group-hover:bg-red-100 transition-colors"},h.createElement(Ff,{size:18})),h.createElement("div",null,h.createElement("div",{className:"text-sm font-semibold text-slate-800"},"Download PDF"),h.createElement("div",{className:"text-xs text-slate-500"},"Best for Documents")),!me&&h.createElement("div",{className:"ml-auto text-[10px] font-semibold text-amber-600 flex items-center gap-1"},h.createElement(Lo,{size:12}),h.createElement("span",null,"Pro"))),h.createElement("button",{onClick:()=>ee("print_png"),disabled:!me,className:`w-full text-left px-3 py-2.5 rounded-lg hover:bg-gray-50 flex items-center gap-3 transition-colors group ${me?"":"opacity-60 cursor-not-allowed"}`},h.createElement("div",{className:"p-2 bg-purple-50 text-purple-600 rounded-md group-hover:bg-purple-100 transition-colors"},h.createElement(tm,{size:18})),h.createElement("div",null,h.createElement("div",{className:"text-sm font-semibold text-slate-800"},"Download PNGs"),h.createElement("div",{className:"text-xs text-slate-500"},"High Quality Images")),!me&&h.createElement("div",{className:"ml-auto text-[10px] font-semibold text-amber-600 flex items-center gap-1"},h.createElement(Lo,{size:12}),h.createElement("span",null,"Pro"))),h.createElement("div",{className:"my-1 border-t border-gray-100"}),h.createElement("div",{className:"px-3 py-1.5 text-[10px] font-bold text-slate-400 uppercase tracking-wider"},"Backup"),h.createElement("button",{onClick:()=>ee("json"),disabled:!p,className:`w-full text-left px-3 py-2.5 rounded-lg hover:bg-gray-50 flex items-center gap-3 transition-colors group ${p?"":"opacity-60 cursor-not-allowed"}`},h.createElement("div",{className:"p-2 bg-emerald-50 text-emerald-600 rounded-md group-hover:bg-emerald-100 transition-colors"},h.createElement(yl,{size:18})),h.createElement("div",null,h.createElement("div",{className:"text-sm font-semibold text-slate-800"},"Save Design (JSON)"),h.createElement("div",{className:"text-xs text-slate-500"},"Download project file")),!p&&h.createElement("div",{className:"ml-auto text-[10px] font-semibold text-amber-600 flex items-center gap-1"},h.createElement(Lo,{size:12}),h.createElement("span",null,"Pro"))),!me&&h.createElement("div",{className:"mt-2 rounded-lg border border-amber-100 bg-amber-50 px-3 py-2 text-[11px] text-amber-700 flex items-center justify-between gap-2"},h.createElement("span",null,"Upgrade to unlock print exports."),x&&h.createElement("button",{onClick:()=>x("export-print"),className:"text-[11px] font-semibold text-amber-700 hover:text-amber-900"},"Upgrade")),!J&&h.createElement("div",{className:"mt-2 rounded-lg border border-amber-100 bg-amber-50 px-3 py-2 text-[11px] text-amber-700 flex items-center justify-between gap-2"},h.createElement("span",null,"Upgrade to unlock web exports."),x&&h.createElement("button",{onClick:()=>x("export-web"),className:"text-[11px] font-semibold text-amber-700 hover:text-amber-900"},"Upgrade")))))),re&&h.createElement("div",{"data-mobile-toolbar":"true",className:"md:hidden fixed left-0 right-0 border-t border-gray-100 bg-white/95 backdrop-blur-sm shadow-lg z-[50]",style:{top:"calc(56px + env(safe-area-inset-top))"}},h.createElement("div",{className:"overflow-x-auto overflow-y-visible"},h.createElement("div",{className:"flex items-center gap-2 px-2 py-1.5 min-w-max"},m))))};var Vt=(r=>(r.TEMPLATES="Templates",r.DESIGN="Design",r.ELEMENTS="Elements",r.TEXT="Text",r.BRAND="Brand",r.UPLOADS="Uploads",r.IMAGES="Images",r.DRAW="Draw",r.PROJECTS="Projects",r.LAYERS="Layers",r.QR_CODE="QR Code",r.POSITION="Position",r.COLOR="Color",r.FONT="Font",r.EFFECTS="Effects",r))(Vt||{});const N7=({activeTool:r,setActiveTool:e,featureAccess:t={},onRequestUpgrade:n,isLicenseValid:i=!0,customPanels:A})=>{const o=[{id:Vt.TEMPLATES,icon:no,label:"Create",feature:"templates"},{id:Vt.DESIGN,icon:xc,label:"Design",feature:"design"},{id:Vt.ELEMENTS,icon:f7,label:"Elements",feature:"elements"},{id:Vt.DRAW,icon:lB,label:"Draw"},{id:Vt.TEXT,icon:_d,label:"Text",feature:"text"},{id:Vt.IMAGES,icon:Fd,label:"Images",feature:"images"},{id:Vt.BRAND,icon:em,label:"Brand",feature:"brand"},{id:Vt.UPLOADS,icon:Rk,label:"Uploads",feature:"uploads"},{id:Vt.QR_CODE,icon:_f,label:"QR Code",feature:"qrcode"},{id:Vt.LAYERS,icon:Jp,label:"Layers",feature:"layers"}],l=(A||[]).filter(f=>(f==null?void 0:f.id)&&(f==null?void 0:f.label)).map(f=>({id:f.id,icon:f.icon||A7,label:f.label,feature:f.feature})),u=o.concat(l);return h.createElement("div",{className:`
|
|
799
|
+
*/const C7=_t("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),S7=({title:r="Untitled Design",onExport:e,onUndo:t,onRedo:n,canUndo:i,canRedo:A,onTitleChange:o,onToggleSettings:l,zoom:u,setZoom:f,showToolbar:g=!0,children:m,exportAccess:b,canSaveLoadJson:p=!0,upgradeUrl:E,onRequestUpgrade:x,onSaveDesign:N,onNewDesign:U})=>{const[L,M]=fe.useState(!1),[H,Ae]=fe.useState(!1),ce=fe.useRef(null),te=fe.useRef(null),re=g&&h.Children.count(m)>0,J=(b==null?void 0:b.web)!==!1,me=(b==null?void 0:b.print)!==!1,X=J||me||p||!!E;fe.useEffect(()=>{const z=P=>{ce.current&&!ce.current.contains(P.target)&&M(!1),te.current&&!te.current.contains(P.target)&&Ae(!1)};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]);const ee=z=>{z==="web"&&!J||z!=="web"&&!me||(e(z),M(!1))};return h.createElement("div",{className:"bg-white border-b border-gray-200 flex flex-col flex-shrink-0 z-[100] relative",style:{paddingTop:"env(safe-area-inset-top)"}},h.createElement("div",{className:"h-14 flex items-center gap-2 px-2 md:px-4"},h.createElement("div",{className:"flex items-center gap-2 md:gap-4 shrink-0"},h.createElement("button",{onClick:l,className:"p-2 hover:bg-gray-100 rounded-md transition-colors text-slate-700 hidden md:block",title:"Document Settings"},h.createElement(u7,{size:20})),h.createElement("button",{onClick:l,className:"md:hidden p-2 hover:bg-gray-100 rounded-full text-slate-600"},h.createElement(h7,{size:20})),h.createElement("div",{className:"flex items-center"},h.createElement("input",{type:"text",value:r,onChange:z=>o(z.target.value),className:"font-bold text-lg text-slate-800 hover:border-gray-300 border border-transparent rounded px-2 -ml-1 focus:border-slate-500 focus:outline-none bg-transparent transition-all w-40 sm:w-64 md:w-auto hidden sm:block"}))),h.createElement("div",{className:"hidden md:flex flex-1 min-w-0 items-center"},h.createElement("div",{className:"w-full overflow-x-auto overflow-y-visible"},h.createElement("div",{className:"flex items-center gap-3 px-2 min-w-max mx-auto"},m))),h.createElement("div",{className:"flex items-center gap-1 md:gap-3 shrink-0"},h.createElement("div",{className:"md:hidden relative",ref:te},h.createElement("button",{onClick:()=>Ae(!H),className:`p-2 hover:bg-gray-100 rounded-full transition-colors ${H?"bg-indigo-50 text-indigo-600":"text-slate-600"}`},h.createElement(C7,{size:20})),H&&h.createElement("div",{className:"absolute left-0 top-full mt-2 bg-white rounded-lg shadow-xl border border-gray-200 p-3 z-50 min-w-[200px]"},h.createElement("div",{className:"flex items-center gap-2 justify-center mb-3"},h.createElement("button",{onClick:()=>f(Math.max(10,u-10)),className:"p-2 hover:bg-gray-100 rounded text-slate-600"},h.createElement(Zp,{size:18})),h.createElement("span",{className:"text-sm font-medium w-12 text-center tabular-nums"},u,"%"),h.createElement("button",{onClick:()=>f(Math.min(200,u+10)),className:"p-2 hover:bg-gray-100 rounded text-slate-600"},h.createElement(no,{size:18}))),h.createElement("input",{type:"range",min:"10",max:"200",step:"5",value:u,onChange:z=>f(parseInt(z.target.value)),className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-indigo-600"}),h.createElement("div",{className:"flex justify-between text-[10px] text-slate-400 mt-1"},h.createElement("span",null,"10%"),h.createElement("span",null,"200%")))),h.createElement("div",{className:"flex md:hidden gap-0.5"},h.createElement("button",{onClick:t,disabled:!i,className:`p-2 rounded-full ${i?"text-slate-700 hover:bg-gray-100":"text-slate-300"}`},h.createElement(B7,{size:18})),h.createElement("button",{onClick:n,disabled:!A,className:`p-2 rounded-full ${A?"text-slate-700 hover:bg-gray-100":"text-slate-300"}`},h.createElement(s7,{size:18})),U&&h.createElement("button",{onClick:()=>U(),className:"p-2 rounded-full text-emerald-600 hover:bg-emerald-50",title:"New Design"},h.createElement(aB,{size:18}))),h.createElement("button",{className:"hidden md:flex items-center justify-center p-2 hover:opacity-80 transition-opacity group relative",style:{color:"#5046e5"},onClick:()=>N==null?void 0:N()},h.createElement(yl,{size:20}),h.createElement("div",{className:"absolute top-full mt-2 left-1/2 -translate-x-1/2 px-2 py-1 bg-slate-800 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-50 shadow-lg"},"Save Design")),h.createElement("button",{className:"hidden md:flex items-center justify-center p-2 hover:opacity-80 transition-opacity mr-2 group relative",style:{color:"#10b981"},onClick:()=>U==null?void 0:U()},h.createElement(aB,{size:20}),h.createElement("div",{className:"absolute top-full mt-2 left-1/2 -translate-x-1/2 px-2 py-1 bg-slate-800 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-50 shadow-lg"},"New Design")),h.createElement("div",{className:"relative",ref:ce},h.createElement("button",{onClick:()=>M(!L),disabled:!X,className:`flex items-center gap-2 px-2 py-1.5 md:px-4 md:py-2 bg-slate-900 hover:bg-slate-800 text-white rounded-lg font-medium text-sm transition-colors shadow-sm ${X?"":"opacity-60 cursor-not-allowed"}`},h.createElement(jk,{size:16}),h.createElement("span",{className:"hidden md:inline"},"Export"),h.createElement(hu,{size:14,className:"md:ml-1 opacity-70"})),L&&h.createElement("div",{className:"absolute right-0 top-full mt-2 w-64 bg-white rounded-xl shadow-xl border border-gray-100 p-1.5 animate-in fade-in zoom-in-95 duration-100 z-50"},h.createElement("button",{onClick:()=>ee("web"),disabled:!J,className:`w-full text-left px-3 py-2.5 rounded-lg hover:bg-gray-50 flex items-center gap-3 transition-colors group ${J?"":"opacity-60 cursor-not-allowed"}`},h.createElement("div",{className:"p-2 bg-blue-50 text-blue-600 rounded-md group-hover:bg-blue-100 transition-colors"},h.createElement(Fd,{size:18})),h.createElement("div",null,h.createElement("div",{className:"text-sm font-semibold text-slate-800"},"Export for Web"),h.createElement("div",{className:"text-xs text-slate-500"},"Fast Download (PNG)")),!J&&h.createElement("div",{className:"ml-auto text-[10px] font-semibold text-amber-600 flex items-center gap-1"},h.createElement(Lo,{size:12}),h.createElement("span",null,"Pro"))),h.createElement("div",{className:"my-1 border-t border-gray-100"}),h.createElement("div",{className:"px-3 py-1.5 text-[10px] font-bold text-slate-400 uppercase tracking-wider"},"Print Ready (300 DPI)"),h.createElement("button",{onClick:()=>ee("print_pdf"),disabled:!me,className:`w-full text-left px-3 py-2.5 rounded-lg hover:bg-gray-50 flex items-center gap-3 transition-colors group ${me?"":"opacity-60 cursor-not-allowed"}`},h.createElement("div",{className:"p-2 bg-red-50 text-red-600 rounded-md group-hover:bg-red-100 transition-colors"},h.createElement(Ff,{size:18})),h.createElement("div",null,h.createElement("div",{className:"text-sm font-semibold text-slate-800"},"Download PDF"),h.createElement("div",{className:"text-xs text-slate-500"},"Best for Documents")),!me&&h.createElement("div",{className:"ml-auto text-[10px] font-semibold text-amber-600 flex items-center gap-1"},h.createElement(Lo,{size:12}),h.createElement("span",null,"Pro"))),h.createElement("button",{onClick:()=>ee("print_png"),disabled:!me,className:`w-full text-left px-3 py-2.5 rounded-lg hover:bg-gray-50 flex items-center gap-3 transition-colors group ${me?"":"opacity-60 cursor-not-allowed"}`},h.createElement("div",{className:"p-2 bg-purple-50 text-purple-600 rounded-md group-hover:bg-purple-100 transition-colors"},h.createElement(tm,{size:18})),h.createElement("div",null,h.createElement("div",{className:"text-sm font-semibold text-slate-800"},"Download PNGs"),h.createElement("div",{className:"text-xs text-slate-500"},"High Quality Images")),!me&&h.createElement("div",{className:"ml-auto text-[10px] font-semibold text-amber-600 flex items-center gap-1"},h.createElement(Lo,{size:12}),h.createElement("span",null,"Pro"))),h.createElement("div",{className:"my-1 border-t border-gray-100"}),h.createElement("div",{className:"px-3 py-1.5 text-[10px] font-bold text-slate-400 uppercase tracking-wider"},"Backup"),h.createElement("button",{onClick:()=>ee("json"),disabled:!p,className:`w-full text-left px-3 py-2.5 rounded-lg hover:bg-gray-50 flex items-center gap-3 transition-colors group ${p?"":"opacity-60 cursor-not-allowed"}`},h.createElement("div",{className:"p-2 bg-emerald-50 text-emerald-600 rounded-md group-hover:bg-emerald-100 transition-colors"},h.createElement(yl,{size:18})),h.createElement("div",null,h.createElement("div",{className:"text-sm font-semibold text-slate-800"},"Save Design (JSON)"),h.createElement("div",{className:"text-xs text-slate-500"},"Download project file")),!p&&h.createElement("div",{className:"ml-auto text-[10px] font-semibold text-amber-600 flex items-center gap-1"},h.createElement(Lo,{size:12}),h.createElement("span",null,"Pro"))),!me&&h.createElement("div",{className:"mt-2 rounded-lg border border-amber-100 bg-amber-50 px-3 py-2 text-[11px] text-amber-700 flex items-center justify-between gap-2"},h.createElement("span",null,"Upgrade to unlock print exports."),x&&h.createElement("button",{onClick:()=>x("export-print"),className:"text-[11px] font-semibold text-amber-700 hover:text-amber-900"},"Upgrade")),!J&&h.createElement("div",{className:"mt-2 rounded-lg border border-amber-100 bg-amber-50 px-3 py-2 text-[11px] text-amber-700 flex items-center justify-between gap-2"},h.createElement("span",null,"Upgrade to unlock web exports."),x&&h.createElement("button",{onClick:()=>x("export-web"),className:"text-[11px] font-semibold text-amber-700 hover:text-amber-900"},"Upgrade")))))),re&&h.createElement("div",{"data-mobile-toolbar":"true",className:"md:hidden fixed left-0 right-0 border-t border-gray-100 bg-white/95 backdrop-blur-sm shadow-lg z-[50]",style:{top:"calc(56px + env(safe-area-inset-top))"}},h.createElement("div",{className:"overflow-x-auto overflow-y-visible"},h.createElement("div",{className:"flex items-center gap-2 px-2 py-1.5 min-w-max"},m))))};var Vt=(r=>(r.TEMPLATES="Templates",r.DESIGN="Design",r.ELEMENTS="Elements",r.TEXT="Text",r.BRAND="Brand",r.UPLOADS="Uploads",r.IMAGES="Images",r.DRAW="Draw",r.PROJECTS="Projects",r.LAYERS="Layers",r.QR_CODE="QR Code",r.POSITION="Position",r.COLOR="Color",r.FONT="Font",r.EFFECTS="Effects",r))(Vt||{});const N7=({activeTool:r,setActiveTool:e,featureAccess:t={},onRequestUpgrade:n,isLicenseValid:i=!0,customPanels:A})=>{const o=[{id:Vt.TEMPLATES,icon:no,label:"Create",feature:"templates"},{id:Vt.DESIGN,icon:xc,label:"Design",feature:"design"},{id:Vt.ELEMENTS,icon:f7,label:"Elements",feature:"elements"},{id:Vt.DRAW,icon:lB,label:"Draw",feature:"draw"},{id:Vt.TEXT,icon:_d,label:"Text",feature:"text"},{id:Vt.IMAGES,icon:Fd,label:"Images",feature:"images"},{id:Vt.BRAND,icon:em,label:"Brand",feature:"brand"},{id:Vt.UPLOADS,icon:Rk,label:"Uploads",feature:"uploads"},{id:Vt.QR_CODE,icon:_f,label:"QR Code",feature:"qrcode"},{id:Vt.LAYERS,icon:Jp,label:"Layers",feature:"layers"}],l=(A||[]).filter(f=>(f==null?void 0:f.id)&&(f==null?void 0:f.label)).map(f=>({id:f.id,icon:f.icon||A7,label:f.label,feature:f.feature})),u=o.concat(l);return h.createElement("div",{className:`
|
|
800
800
|
w-full min-h-[72px] border-t
|
|
801
801
|
md:w-[72px] md:h-full md:border-r md:border-t-0
|
|
802
802
|
bg-white border-gray-200
|
|
@@ -10594,7 +10594,7 @@ endobj\r
|
|
|
10594
10594
|
var u = d.getContext("2d");
|
|
10595
10595
|
u.fillStyle = "#fff", u.fillRect(0, 0, d.width, d.height);
|
|
10596
10596
|
var p = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, y = this;
|
|
10597
|
-
return (Xt.canvg ? Promise.resolve(Xt.canvg) : import("./index.es-
|
|
10597
|
+
return (Xt.canvg ? Promise.resolve(Xt.canvg) : import("./index.es-DTVTDW9M.js")).catch(function(N) {
|
|
10598
10598
|
return Promise.reject(new Error("Could not load canvg: " + N));
|
|
10599
10599
|
}).then(function(N) {
|
|
10600
10600
|
return N.default ? N.default : N;
|
|
@@ -13015,7 +13015,7 @@ const ey = ({ activeTool: t, setActiveTool: e, featureAccess: n = {}, onRequestU
|
|
|
13015
13015
|
{ id: Et.TEMPLATES, icon: Ba, label: "Create", feature: "templates" },
|
|
13016
13016
|
{ id: Et.DESIGN, icon: Yi, label: "Design", feature: "design" },
|
|
13017
13017
|
{ id: Et.ELEMENTS, icon: bb, label: "Elements", feature: "elements" },
|
|
13018
|
-
{ id: Et.DRAW, icon: tf, label: "Draw" },
|
|
13018
|
+
{ id: Et.DRAW, icon: tf, label: "Draw", feature: "draw" },
|
|
13019
13019
|
{ id: Et.TEXT, icon: xl, label: "Text", feature: "text" },
|
|
13020
13020
|
{ id: Et.IMAGES, icon: vl, label: "Images", feature: "images" },
|
|
13021
13021
|
{ id: Et.BRAND, icon: Qc, label: "Brand", feature: "brand" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fraczled/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Fraczled Design Studio SDK - Embed a powerful design editor in your application",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vite build --config ../vite.sdk.config.ts && vite build --config ../vite.sdk.umd.config.ts",
|