@tscircuit/fake-snippets 0.0.120 → 0.0.121
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/.github/workflows/bun-pver-release.yml +29 -4
- package/dist/assets/404-CnNkOMw-.js +1 -0
- package/dist/assets/Analytics-DIw7l2gi.js +84 -0
- package/dist/assets/BuildsList-CeqVVhbz.js +1 -0
- package/dist/assets/CodeAndPreview-Dycd0s15.js +722 -0
- package/dist/assets/DownloadButtonAndMenu-OIUhbKkj.js +194 -0
- package/dist/assets/FileSaver.min-BDsOlqKl.js +1 -0
- package/dist/assets/Footer-DU-HdqGk.js +1 -0
- package/dist/assets/GithubAvatarWithFallback-CQhrBiKP.js +6 -0
- package/dist/assets/Header-CI4GZVOv.js +1 -0
- package/dist/assets/Header2-CrMDmo3P.js +5 -0
- package/dist/assets/NotFound-DaXtEPsC.js +1 -0
- package/dist/assets/OrganizationCard-Bs2dw-AL.js +1 -0
- package/dist/assets/PackageBreadcrumb-DpOpPbGc.js +6 -0
- package/dist/assets/PackageCard-ejE2dLlA.js +16 -0
- package/dist/assets/PackageSearchResults-BI3Rtmr2.js +1 -0
- package/dist/assets/ProfileRouter-4xNgtXr5.js +6 -0
- package/dist/assets/alert-dialog-DrOB4Tui.js +1 -0
- package/dist/assets/authorize-D-5R3QHA.js +16 -0
- package/dist/assets/badge-Bk-k6kyg.js +1 -0
- package/dist/assets/card-CzXDit7x.js +1 -0
- package/dist/assets/circle-alert-Du9-4of0.js +6 -0
- package/dist/assets/circle-check-big-KaRyRsht.js +6 -0
- package/dist/assets/cpu-BnvjzmIA.js +6 -0
- package/dist/assets/create-organization-BHNFvE7B.js +1 -0
- package/dist/assets/dashboard-DDH4V91X.js +11 -0
- package/dist/assets/datasheet-DqKtWt-O.js +1 -0
- package/dist/assets/datasheets-4W6pEMf3.js +1 -0
- package/dist/assets/dev-login-CbHdDthp.js +1 -0
- package/dist/assets/editor-bqg9Yv91.js +1 -0
- package/dist/assets/editor_example_1-1000w.webp +0 -0
- package/dist/assets/editor_example_1-1200w.webp +0 -0
- package/dist/assets/editor_example_1-1600w.webp +0 -0
- package/dist/assets/editor_example_1-2000w.webp +0 -0
- package/dist/assets/editor_example_1-400w.webp +0 -0
- package/dist/assets/editor_example_1-600w.webp +0 -0
- package/dist/assets/editor_example_1-800w.webp +0 -0
- package/dist/assets/editor_example_1_more_square-1000w.webp +0 -0
- package/dist/assets/editor_example_1_more_square-1200w.webp +0 -0
- package/dist/assets/editor_example_1_more_square-1600w.webp +0 -0
- package/dist/assets/editor_example_1_more_square-2000w.webp +0 -0
- package/dist/assets/editor_example_1_more_square-400w.webp +0 -0
- package/dist/assets/editor_example_1_more_square-600w.webp +0 -0
- package/dist/assets/editor_example_1_more_square-800w.webp +0 -0
- package/dist/assets/editor_example_2-1000w.webp +0 -0
- package/dist/assets/editor_example_2-1200w.webp +0 -0
- package/dist/assets/editor_example_2-1600w.webp +0 -0
- package/dist/assets/editor_example_2-2000w.webp +0 -0
- package/dist/assets/editor_example_2-400w.webp +0 -0
- package/dist/assets/editor_example_2-600w.webp +0 -0
- package/dist/assets/editor_example_2-800w.webp +0 -0
- package/dist/assets/example_schematic-1000w.webp +0 -0
- package/dist/assets/example_schematic-1200w.webp +0 -0
- package/dist/assets/example_schematic-1600w.webp +0 -0
- package/dist/assets/example_schematic-2000w.webp +0 -0
- package/dist/assets/example_schematic-400w.webp +0 -0
- package/dist/assets/example_schematic-600w.webp +0 -0
- package/dist/assets/example_schematic-800w.webp +0 -0
- package/dist/assets/eye-B_NMTTT7.js +6 -0
- package/dist/assets/fallback-image.svg +1 -0
- package/dist/assets/favicon-BwEjZKGP.ico +0 -0
- package/dist/assets/formatTimeAgo-CawXna5h.js +6 -0
- package/dist/assets/github-DjKGjbX1.js +6 -0
- package/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/assets/hash-DfKYpqTm.js +6 -0
- package/dist/assets/index-B17tE1vy.js +1 -0
- package/dist/assets/index-BQPj88OW.js +6051 -0
- package/dist/assets/index-DvNLZBaq.js +6 -0
- package/dist/assets/keyboard-4b_qLHIF.js +11 -0
- package/dist/assets/label-CTudXc4q.js +1 -0
- package/dist/assets/landing-Cjvvx-9q.js +11 -0
- package/dist/assets/latest-DMk4BmXW.js +1 -0
- package/dist/assets/layers-BJ1iwaVM.js +6 -0
- package/dist/assets/load-prettier-DgbV1Jgu.js +1 -0
- package/dist/assets/lock-BOZRJdUv.js +6 -0
- package/dist/assets/main-DPEM9abA.js +26 -0
- package/dist/assets/main-MTKdI4FA.css +1 -0
- package/dist/assets/my-orders-B7lEyNR9.js +1 -0
- package/dist/assets/organization-settings-rNvhYFgZ.js +6 -0
- package/dist/assets/package-editor-T4WIRP49.js +1 -0
- package/dist/assets/pen-D54fxNRf.js +6 -0
- package/dist/assets/plus-KkE_6Dq2.js +6 -0
- package/dist/assets/preview-release-DWhKHFWp.js +1 -0
- package/dist/assets/quickstart-WF3HR9Dc.js +1 -0
- package/dist/assets/refresh-cw-aWASTRku.js +6 -0
- package/dist/assets/release-builds-COa5ndHa.js +1 -0
- package/dist/assets/release-detail-iclJPUO-.js +6 -0
- package/dist/assets/releases-Clsyp-7n.js +1 -0
- package/dist/assets/role-badge-BGF_IMlO.js +16 -0
- package/dist/assets/search-CwH23pAU.js +1 -0
- package/dist/assets/select-BN8AF1J7.js +1 -0
- package/dist/assets/settings-B2bMEtS4.js +6 -0
- package/dist/assets/skeleton-DLAS40-y.js +1 -0
- package/dist/assets/svg-to-png-BX4YEHCP-JcDm8Hc5.js +1 -0
- package/dist/assets/svg-to-png-BX4YEHCP-pNo9Afg8.js +1 -0
- package/dist/assets/tabs-Ce0NFuwd.js +1 -0
- package/dist/assets/timeAgo-VY0F2EV9.js +10 -0
- package/dist/assets/tooltip-C1pwvC0K.js +11 -0
- package/dist/assets/trash-2-BW3eClHz.js +6 -0
- package/dist/assets/trending-C8246HGf.js +1 -0
- package/dist/assets/triangle-alert-BMIBEO1D.js +6 -0
- package/dist/assets/tsx-COt5Ahok.js +1 -0
- package/dist/assets/use-create-datasheet-B7TDsTUt.js +1 -0
- package/dist/assets/use-delete-package-DLKtoTOj.js +1 -0
- package/dist/assets/use-download-zip-CAOKjGXW.js +1 -0
- package/dist/assets/use-list-user-orgs-CgJIT7N4.js +1 -0
- package/dist/assets/use-organization-XwYYTFck.js +1 -0
- package/dist/assets/use-package-builds-Bx8rfxi1.js +1 -0
- package/dist/assets/use-package-by-package-name-1s1Pcarw.js +1 -0
- package/dist/assets/use-package-files-CmmWVuGn.js +1 -0
- package/dist/assets/use-package-release-by-id-or-version-BuuXcSZq.js +1 -0
- package/dist/assets/use-package-release-images-BMaZtvmk.js +1 -0
- package/dist/assets/use-packages-base-api-url-DA1hucM7.js +1 -0
- package/dist/assets/useQueries-BJ7Ue7HV.js +1 -0
- package/dist/assets/user-settings-BqO5FkMf.js +1 -0
- package/dist/assets/view-package-C-OvJr_Q.js +165 -0
- package/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/index.html +127 -0
- package/dist/landing.html +34 -0
- package/dist/robots.txt +9 -0
- package/dist/sitemap.xml +118 -0
- package/dist/stats.html +4949 -0
- package/package.json +1 -1
- package/dist/bundle.js +0 -9288
- package/dist/index.d.ts +0 -2190
- package/dist/index.js +0 -3826
- package/dist/schema.d.ts +0 -3142
- package/dist/schema.js +0 -454
- package/fake-snippets-api/bun.lockb +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{k as F,R as l,j as n,az as J,X as O,Y as Q,aA as ee,Z as M,W as oe,ao as re,$ as te}from"./index-BQPj88OW.js";import{c as H,R as ne,T as ce,C as ae}from"./index-B17tE1vy.js";/**
|
|
2
|
+
* @license lucide-react v0.488.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const ie=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],ge=F("code-xml",ie);var d="Accordion",se=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[N,le,de]=J(d),[g]=Q(d,[de,H]),k=H(),V=l.forwardRef((o,c)=>{const{type:e,...t}=o,a=t,r=t;return n.jsx(N.Provider,{scope:o.__scopeAccordion,children:e==="multiple"?n.jsx(ve,{...r,ref:c}):n.jsx(fe,{...a,ref:c})})});V.displayName=d;var[z,pe]=g(d),[K,ue]=g(d,{collapsible:!1}),fe=l.forwardRef((o,c)=>{const{value:e,defaultValue:t,onValueChange:a=()=>{},collapsible:r=!1,...s}=o,[i,p]=O({prop:e,defaultProp:t??"",onChange:a,caller:d});return n.jsx(z,{scope:o.__scopeAccordion,value:l.useMemo(()=>i?[i]:[],[i]),onItemOpen:p,onItemClose:l.useCallback(()=>r&&p(""),[r,p]),children:n.jsx(K,{scope:o.__scopeAccordion,collapsible:r,children:n.jsx(L,{...s,ref:c})})})}),ve=l.forwardRef((o,c)=>{const{value:e,defaultValue:t,onValueChange:a=()=>{},...r}=o,[s,i]=O({prop:e,defaultProp:t??[],onChange:a,caller:d}),p=l.useCallback(m=>i((f=[])=>[...f,m]),[i]),v=l.useCallback(m=>i((f=[])=>f.filter(b=>b!==m)),[i]);return n.jsx(z,{scope:o.__scopeAccordion,value:s,onItemOpen:p,onItemClose:v,children:n.jsx(K,{scope:o.__scopeAccordion,collapsible:!0,children:n.jsx(L,{...r,ref:c})})})}),[me,I]=g(d),L=l.forwardRef((o,c)=>{const{__scopeAccordion:e,disabled:t,dir:a,orientation:r="vertical",...s}=o,i=l.useRef(null),p=oe(i,c),v=le(e),f=re(a)==="ltr",b=te(o.onKeyDown,C=>{var D;if(!se.includes(C.key))return;const $=C.target,h=v().filter(j=>{var T;return!((T=j.ref.current)!=null&&T.disabled)}),x=h.findIndex(j=>j.ref.current===$),S=h.length;if(x===-1)return;C.preventDefault();let u=x;const _=0,R=S-1,w=()=>{u=x+1,u>R&&(u=_)},P=()=>{u=x-1,u<_&&(u=R)};switch(C.key){case"Home":u=_;break;case"End":u=R;break;case"ArrowRight":r==="horizontal"&&(f?w():P());break;case"ArrowDown":r==="vertical"&&w();break;case"ArrowLeft":r==="horizontal"&&(f?P():w());break;case"ArrowUp":r==="vertical"&&P();break}const B=u%S;(D=h[B].ref.current)==null||D.focus()});return n.jsx(me,{scope:e,disabled:t,direction:a,orientation:r,children:n.jsx(N.Slot,{scope:e,children:n.jsx(M.div,{...s,"data-orientation":r,ref:p,onKeyDown:t?void 0:b})})})}),A="AccordionItem",[Ce,E]=g(A),G=l.forwardRef((o,c)=>{const{__scopeAccordion:e,value:t,...a}=o,r=I(A,e),s=pe(A,e),i=k(e),p=ee(),v=t&&s.value.includes(t)||!1,m=r.disabled||o.disabled;return n.jsx(Ce,{scope:e,open:v,disabled:m,triggerId:p,children:n.jsx(ne,{"data-orientation":r.orientation,"data-state":Z(v),...i,...a,ref:c,disabled:m,open:v,onOpenChange:f=>{f?s.onItemOpen(t):s.onItemClose(t)}})})});G.displayName=A;var U="AccordionHeader",X=l.forwardRef((o,c)=>{const{__scopeAccordion:e,...t}=o,a=I(d,e),r=E(U,e);return n.jsx(M.h3,{"data-orientation":a.orientation,"data-state":Z(r.open),"data-disabled":r.disabled?"":void 0,...t,ref:c})});X.displayName=U;var y="AccordionTrigger",Y=l.forwardRef((o,c)=>{const{__scopeAccordion:e,...t}=o,a=I(d,e),r=E(y,e),s=ue(y,e),i=k(e);return n.jsx(N.ItemSlot,{scope:e,children:n.jsx(ce,{"aria-disabled":r.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:r.triggerId,...i,...t,ref:c})})});Y.displayName=y;var q="AccordionContent",W=l.forwardRef((o,c)=>{const{__scopeAccordion:e,...t}=o,a=I(d,e),r=E(q,e),s=k(e);return n.jsx(ae,{role:"region","aria-labelledby":r.triggerId,"data-orientation":a.orientation,...s,...t,ref:c,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...o.style}})});W.displayName=q;function Z(o){return o?"open":"closed"}var Ie=V,be=G,he=X,_e=Y,Re=W;export{Re as C,he as H,be as I,Ie as R,_e as T,ge as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{k as e}from"./index-BQPj88OW.js";/**
|
|
2
|
+
* @license lucide-react v0.488.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const h=[["path",{d:"M18.8 4A6.3 8.7 0 0 1 20 9",key:"xve1fh"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["circle",{cx:"9",cy:"9",r:"7",key:"p2h5vp"}],["rect",{width:"10",height:"6",x:"4",y:"16",rx:"2",key:"17f3te"}],["path",{d:"M14 19c3 0 4.6-1.6 4.6-1.6",key:"n7odp6"}],["circle",{cx:"20",cy:"16",r:"2",key:"1v9bxh"}]],y=e("bell-electric",h);/**
|
|
7
|
+
* @license lucide-react v0.488.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const t=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],d=e("keyboard",t);export{y as B,d as K};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as s,j as l,Z as n,n as d,al as c}from"./index-BQPj88OW.js";var f="Label",o=s.forwardRef((e,t)=>l.jsx(n.label,{...e,ref:t,onMouseDown:a=>{var r;a.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));o.displayName=f;var i=o;const m=c("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),u=s.forwardRef(({className:e,...t},a)=>l.jsx(i,{ref:a,className:d(m(),e),...t}));u.displayName=i.displayName;export{u as L};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{k as w,b as c,j as e,n as p,C as _,m as T,l as b,o as O,u as z,B as m,p as R}from"./index-BQPj88OW.js";import{C as x,a as u}from"./card-CzXDit7x.js";import{B as A}from"./badge-Bk-k6kyg.js";import{H as E,a as P}from"./Header2-CrMDmo3P.js";import{F as q}from"./Footer-DU-HdqGk.js";import{u as L,a as B,Z as G}from"./Analytics-DIw7l2gi.js";import{R as $,I as F,H as J,T as N,C as y,a as M}from"./index-DvNLZBaq.js";import{C as j}from"./cpu-BnvjzmIA.js";import{L as W}from"./layers-BJ1iwaVM.js";import"./use-packages-base-api-url-DA1hucM7.js";import"./index-B17tE1vy.js";/**
|
|
2
|
+
* @license lucide-react v0.488.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const D=[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973",key:"1cez44"}],["path",{d:"m13 12-3 5h4l-3 5",key:"1t22er"}]],H=w("cloud-lightning",D);/**
|
|
7
|
+
* @license lucide-react v0.488.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Q=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],U=w("maximize-2",Q),Y=s=>{if(s.endsWith(".svg"))return{srcSet:s,sizes:"100vw"};const t=[400,600,800,1e3,1200,1600,2e3],i=s.substring(0,s.lastIndexOf(".")),a=s.substring(s.lastIndexOf("."));return{srcSet:t.map(n=>`${i}-${n}w${a} ${n}w`).join(", "),sizes:"(max-width: 400px) 400px, (max-width: 600px) 600px, (max-width: 800px) 800px, (max-width: 1000px) 1000px, (max-width: 1200px) 1200px, (max-width: 1600px) 1600px, 2000px"}};function h({src:s,alt:t,className:i,priority:a=!1,fallbackSrc:l="/assets/fallback-image.svg",...f}){const[n,I]=c.useState(s),[S,g]=c.useState(!0),{srcSet:o,sizes:d}=Y(n);return c.useEffect(()=>{if(a){const r=document.createElement("link");return r.rel="preload",r.as="image",r.href=s,r.type=s.endsWith(".svg")?"image/svg+xml":"image/webp",r.imageSrcset=o,r.imageSizes=d,document.head.appendChild(r),()=>{document.head.removeChild(r)}}},[s,a,o,d]),e.jsx("img",{src:n,srcSet:o,sizes:d,alt:t,loading:a?"eager":"lazy",decoding:a?"sync":"async",fetchPriority:a?"high":"auto",className:`${i} ${S?"animate-pulse bg-gray-200":""} object-contain`,onLoad:()=>g(!1),onError:()=>{console.error("Image failed to load:",n),I(l),g(!1)},...f})}const V=$,v=c.forwardRef(({className:s,...t},i)=>e.jsx(F,{ref:i,className:p("border-b",s),...t}));v.displayName="AccordionItem";const k=c.forwardRef(({className:s,children:t,...i},a)=>e.jsx(J,{className:"flex",children:e.jsxs(N,{ref:a,className:p("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",s),...i,children:[t,e.jsx(_,{className:"h-4 w-4 shrink-0 text-slate-500 transition-transform duration-200 dark:text-slate-400"})]})}));k.displayName=N.displayName;const C=c.forwardRef(({className:s,children:t,...i},a)=>e.jsx(y,{ref:a,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...i,children:e.jsx("div",{className:p("pb-4 pt-0",s),children:t})}));C.displayName=y.displayName;const Z=[{question:"Can I use tscircuit commercially?",answer:"You can use tscircuit for commercial purposes. tscircuit is under the same permissive MIT license as Node.js, React, and thousands of other popular projects you are likely already using! "},{question:"Can I import designs from other software?",answer:"tscircuit has some support for importing designs from other software, but it's not yet fully featured. You should file an issue on our Github if you'd like to see a specific format supported."},{question:"Can I use tscircuit locally?",answer:"Yes, you can use tscircuit locally using the tscircuit CLI, but we recommend starting with the web-based application for simplicity."},{question:"Can tscircuit make schematics? Is it extra effort?",answer:"tscircuit always renders both a schematic and PCB. Unlike traditional EDA where the schematic capture and PCB layout are separate processes, tscircuit combines them by allowing a user to specify constraints and automations. This means that you can design a schematic and then immediately see a PCB layout or vice versa."},{question:"What exactly is tscircuit?",answer:e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"mb-2",children:["tscircuit is a ",e.jsx("strong",{children:"React/TypeScript framework"})," for designing electronic circuits programmatically."]}),e.jsx("p",{className:"mb-2",children:'Instead of using traditional graphical interfaces, you write code to define components, their connections, and layout constraints. This "electronics design as code" approach unlocks powerful capabilities like reusable packages, continuous automation, parameterization, and integration with modern software development workflows (like version control with Git).'}),e.jsxs("p",{className:"mb-2",children:['While the core of tscircuit is the framework, the term "tscircuit" often refers to the broader ',e.jsx("strong",{children:"ecosystem"})," built around it. This includes:"]}),e.jsxs("ul",{className:"list-disc list-inside mb-2 pl-4",children:[e.jsx("li",{children:"The online development platform and registry (tscircuit.com)"}),e.jsxs("li",{children:["The"," ",e.jsx("a",{className:"text-blue-600 underline hover:text-blue-800",href:"https://docs.tscircuit.com/intro/quickstart-cli",children:"command-line interface (CLI)"})," ","for local development"]})]}),e.jsxs("p",{children:["tscircuit is a modern, web-first approach to hardware development. To learn more about the core concepts and architecture, visit the"," ",e.jsx("a",{href:"https://docs.tscircuit.com",target:"_blank",rel:"noopener noreferrer",className:"underline text-blue-600 hover:text-blue-800",children:"official documentation"}),"."]})]})},{question:"Can I use tscircuit programmatically?",answer:e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"Yes, you can use tscircuit programmatically with these packages:"}),e.jsxs("ul",{className:"list-disc list-inside mb-2 pl-4",children:[e.jsxs("li",{children:[e.jsx("a",{className:"text-blue-600 underline hover:text-blue-800",href:"https://github.com/tscircuit/core",children:"@tscircuit/core"})," ","- Execute tscircuit React code directly in Node, Bun or a browser to create Circuit JSON"]}),e.jsxs("li",{children:[e.jsx("a",{className:"text-blue-600 underline hover:text-blue-800",href:"https://github.com/tscircuit/eval",children:"@tscircuit/eval"})," ","- Dynamically run tscircuit code with automatic import handling and transpilation support builtin"]}),e.jsxs("li",{children:[e.jsx("a",{className:"text-blue-600 underline hover:text-blue-800",href:"https://github.com/tscircuit/runframe",children:"@tscircuit/runframe"})," ","- React components for viewing and running circuits in the browser"]})]})]})},{question:"How do I display tscircuit circuits on my website?",answer:e.jsxs("span",{children:["tscircuit code builds into"," ",e.jsx("a",{className:"text-blue-600 underline hover:text-blue-800",href:"https://github.com/tscircuit/circuit-json",children:"Circuit JSON"}),", you can then use the ",e.jsx("code",{children:"CircuitJsonViewer"})," component inside ",e.jsx("a",{className:"text-blue-600 underline hover:text-blue-800",href:"https://github.com/tscircuit/runframe",children:"@tscircuit/runframe"})," ","to display the Circuit JSON on your website as a Schematic, PCB, or 3D view."]})},{question:"What is Circuit JSON?",answer:e.jsxs("span",{children:[e.jsx("a",{className:"text-blue-600 underline hover:text-blue-800",href:"https://github.com/tscircuit/circuit-json",children:"Circuit JSON"})," ","is a JSON format for representing electronic circuits. It is a sort of assembly language electronic circuits. All tscircuit designs are compiled to Circuit JSON as the intermediary format."]})}],X=()=>e.jsx("section",{className:"w-full py-12 md:py-24 lg:py-32",id:"faq",children:e.jsxs("div",{className:"container px-4 md:px-6 mx-auto",children:[e.jsx("div",{className:"flex flex-col items-center justify-center space-y-4 text-center",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-3xl font-bold tracking-tighter md:text-4xl",children:"Frequently Asked Questions"}),e.jsx("p",{className:"max-w-[900px] text-muted-foreground md:text-xl",children:"Got questions? We've got answers."})]})}),e.jsx("div",{className:"mx-auto max-w-3xl space-y-4 py-12",children:e.jsx(V,{type:"single",collapsible:!0,children:Z.map((s,t)=>e.jsxs(v,{value:`item-${t+1}`,children:[e.jsx(k,{className:"text-left",children:s.question})," ",e.jsx(C,{children:s.answer})]},t))})})]})}),K=({pkg:s})=>{const t=s.latest_pcb_preview_image_url??s.latest_cad_preview_image_url??s.latest_sch_preview_image_url??void 0;return e.jsx(b,{href:`/${s.name}`,children:e.jsxs("div",{className:"flex-shrink-0 w-[200px] bg-white p-3 py-2 rounded-lg shadow-sm border border-gray-200 hover:border-gray-300 transition-colors",children:[e.jsx("div",{className:"font-medium text-blue-600 mb-1 truncate text-sm",children:s.name}),e.jsx("div",{className:"mb-2 h-24 w-full bg-black rounded overflow-hidden",children:t?e.jsx("img",{src:t,alt:"PCB preview",className:"w-full h-full object-contain p-2 scale-[3] rotate-45 hover:scale-[3.5] transition-transform"}):null}),e.jsxs("div",{className:"flex items-center text-xs text-gray-500",children:[e.jsx(O,{className:"w-3 h-3 mr-1"}),s.star_count||0," stars"]})]})})},ee=()=>{const s=L(),t=c.useRef(null),{data:i}=T("trendingPackages",async()=>(await s.get("/packages/list_trending")).data.packages,{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,staleTime:1e3*60*60*24});return e.jsx("div",{className:"w-full bg-gray-50 py-8 min-h-[280px]",children:i!=null&&i.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container mx-auto px-4",children:e.jsx("h2",{className:"text-2xl font-semibold mb-6",children:"Trending Packages"})}),e.jsx("div",{className:"flex gap-6 overflow-x-hidden relative",children:e.jsx("div",{ref:t,className:"flex gap-6 transition-transform duration-1000 animate-carousel-left",children:[...i??[],...i??[]].map((a,l)=>e.jsx(K,{pkg:a},`${a.package_id}-${l}`))})})]}):null})};function xe(){const s=B(),t=z(i=>!!i.session);return e.jsxs("div",{className:"flex min-h-screen flex-col",children:[e.jsxs(E,{children:[e.jsx("link",{rel:"preconnect",href:"https://img.shields.io"}),e.jsx("link",{rel:"dns-prefetch",href:"https://img.shields.io"}),e.jsx("link",{rel:"preconnect",href:"https://shields.io"}),e.jsx("link",{rel:"dns-prefetch",href:"https://shields.io"}),e.jsx("link",{rel:"preconnect",href:"https://tscircuit.com"}),e.jsx("link",{rel:"dns-prefetch",href:"https://tscircuit.com"}),e.jsx("link",{rel:"preconnect",href:"https://api.tscircuit.com"}),e.jsx("link",{rel:"dns-prefetch",href:"https://api.tscircuit.com"})]}),e.jsx(P,{}),e.jsxs("main",{className:"flex-1",children:[e.jsx("section",{className:"w-full py-8 md:py-12 lg:py-20 xl:py-36",children:e.jsx("div",{className:"container px-4 md:px-6 mx-auto",children:e.jsx("div",{className:"container mx-auto max-w-7xl",children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px] lg:gap-12 xl:grid-cols-[1fr_600px]",children:[e.jsxs("div",{className:"flex flex-col justify-center space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{variant:"secondary",className:"w-fit",children:"Open-Source, MIT Licensed"}),e.jsx("h1",{className:"text-3xl font-bold tracking-tight sm:text-5xl xl:text-6xl/none",children:"AI codes electronics with tscircuit"}),e.jsxs("p",{className:"max-w-[600px] text-muted-foreground md:text-xl",children:["Build electronics with code and AI tools.",e.jsx("br",{}),"Render code into schematics, PCBs, 3D, fabrication files, and more."]})]}),e.jsxs("div",{className:"flex flex-col items-center gap-2 min-[500px]:flex-row",children:[e.jsx("a",{href:"https://docs.tscircuit.com",className:"w-[70vw] min-[500px]:w-auto",children:e.jsx(m,{size:"lg","aria-label":"Get started with TSCircuit",className:"w-full min-[500px]:w-auto",children:"Get Started"})}),e.jsx(b,{href:"/seveibar/led-water-accelerometer#3d",className:"w-[70vw] min-[500px]:w-auto",children:e.jsx(m,{size:"lg",variant:"outline","aria-label":"Open online example of TSCircuit",className:"w-full min-[500px]:w-auto",children:"Open Online Example"})}),e.jsx("a",{href:"https://github.com/tscircuit/tscircuit",target:"_blank",rel:"noopener noreferrer",children:e.jsx("img",{alt:"GitHub stars",src:"https://img.shields.io/github/stars/tscircuit/tscircuit?style=social"})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:flex items-center w-full text-sm",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(G,{className:"h-4 w-4"}),e.jsx("span",{children:"Lightning Fast Autorouting"})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(j,{className:"h-4 w-4"}),e.jsx("span",{children:"Designed for AI"})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(W,{className:"h-4 w-4"}),e.jsx("span",{children:"Export & Manufacture"})]}),e.jsxs("div",{className:"flex items-center space-x-1 sm:hidden",children:[e.jsx(M,{className:"h-4 w-4"}),e.jsx("span",{children:"Open Web Standards"})]})]})]}),e.jsx("div",{className:"w-full aspect-video relative",children:e.jsx(h,{alt:"Product preview",className:"mx-auto overflow-hidden rounded-xl object-cover object-center absolute inset-0 w-full h-full mt-8 lg:mt-0",src:"/assets/editor_example_1_more_square.webp",priority:!0})})]})})})}),e.jsx(ee,{}),e.jsx("section",{className:"w-full py-12 md:py-24 lg:py-32 bg-gray-100 dark:bg-gray-800",id:"features",children:e.jsxs("div",{className:"container px-4 md:px-6 mx-auto",children:[e.jsx("div",{className:"flex flex-col items-center justify-center space-y-4 text-center",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-3xl font-bold tracking-tighter md:text-4xl",children:"The Modern Toolkit for Electronic Design"}),e.jsx("p",{className:"max-w-[900px] text-muted-foreground md:text-xl",children:"Typescript and React equipped with expertly-designed web-first electronics libraries"})]})}),e.jsxs("div",{className:"mx-auto grid max-w-5xl items-center gap-6 py-12 lg:grid-cols-3",children:[e.jsx(x,{className:"hover:shadow-lg transition-shadow duration-200 h-full",children:e.jsxs(u,{className:"p-6",children:[e.jsx(H,{className:"h-12 w-12 mb-4"}),e.jsx("h3",{className:"text-xl font-bold",children:"Version Control"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Collaborate on Github or wherever you keep source code. Utilize industry-standard continuous integration tooling"})]})}),e.jsx(x,{className:"hover:shadow-lg transition-shadow duration-200 h-full",children:e.jsxs(u,{className:"p-6",children:[e.jsx(j,{className:"h-12 w-12 mb-4"}),e.jsx("h3",{className:"text-xl font-bold",children:"Robust Autorouting"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Near-instant local and cloud autorouters to give you a functional circuit board fast"})]})}),e.jsx(x,{className:"hover:shadow-lg transition-shadow duration-200 h-full",children:e.jsxs(u,{className:"p-6",children:[e.jsx(U,{className:"h-12 w-12 mb-4"}),e.jsx("h3",{className:"text-xl font-bold",children:"Export & Manufacture"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Export to industry-standard formats like Gerber, SPICE netlists and more"})]})})]})]})}),e.jsx("div",{className:"md:mt-8",children:e.jsx(h,{alt:"Product preview",className:"mx-auto aspect-video overflow-hidden rounded-xl object-cover object-center",src:"/assets/editor_example_2.webp",height:310,width:800})}),e.jsx(X,{}),e.jsx("div",{className:"md:mt-8",children:e.jsx(h,{alt:"Product preview",className:"mx-auto aspect-video overflow-hidden rounded-xl object-cover object-center",src:"/assets/example_schematic.webp",height:310,width:800})}),e.jsx("section",{className:"w-full py-12 md:py-24 lg:py-32 bg-primary",id:"cta",children:e.jsx("div",{className:"container px-4 md:px-6 mx-auto",children:e.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-center text-primary-foreground",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-3xl font-bold tracking-tighter md:text-4xl",children:"Ready to build electronics with code?"}),e.jsx("p",{className:"max-w-[600px] text-primary-foreground/80 md:text-xl",children:"Join hundreds of engineers who are already using tscircuit to design complex electronics!"})]}),e.jsx("div",{className:"flex flex-col gap-2 min-[400px]:flex-row",children:e.jsx(m,{onClick:()=>{t?R("/dashboard"):s()},size:"lg",variant:"secondary","aria-label":"Get started with TSCircuit now",children:"Get Started"})})]})})})]}),e.jsx(q,{})]})}export{xe as LandingPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as m,m as v,j as e,q as y}from"./index-BQPj88OW.js";import{u as N,I as w}from"./Analytics-DIw7l2gi.js";import{H as b}from"./Header-CI4GZVOv.js";import{F as C}from"./Footer-DU-HdqGk.js";import{u as S}from"./use-packages-base-api-url-DA1hucM7.js";import{S as k,a as L,b as P,c as _,d as t}from"./select-BN8AF1J7.js";import{P as F}from"./PackageSearchResults-BI3Rtmr2.js";import{K as q,B}from"./keyboard-4b_qLHIF.js";import{C as E}from"./cpu-BnvjzmIA.js";import{L as A}from"./layers-BJ1iwaVM.js";import"./tooltip-C1pwvC0K.js";import"./PackageCard-ejE2dLlA.js";import"./timeAgo-VY0F2EV9.js";import"./trash-2-BW3eClHz.js";const X=()=>{var n;const x=N(),d=S(),[r,h]=m.useState(""),[a,p]=m.useState("all"),{data:c,isLoading:u,error:f}=v(["latestPackages",a],async()=>{const s=a!=="all"?{tag:a}:{};return(await x.get("/packages/list_latest",{params:s})).data.packages},{keepPreviousData:!0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),j=(n=c==null?void 0:c.filter(s=>{var i;if(!r)return!0;const l=r.toLowerCase().trim();return[s.unscoped_name.toLowerCase(),((i=s.owner_github_username)==null?void 0:i.toLowerCase())??"",(s.description||"").toLowerCase()].some(g=>l.split(/\s+/).filter(o=>o.length>0).every(o=>g.includes(o)))}))==null?void 0:n.sort((s,l)=>l.created_at.localeCompare(s.created_at));return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(b,{}),e.jsxs("main",{className:"flex-grow container mx-auto px-4 py-8 min-h-[80vh]",children:[e.jsxs("div",{className:"mb-8 max-w-3xl",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3",children:e.jsx("h1",{className:"text-4xl font-bold text-gray-900",children:"Latest Packages"})}),e.jsx("p",{className:"text-lg text-gray-600 mb-4",children:"Explore the latest circuit designs from our community. These fresh additions showcase new ideas and innovative approaches to circuit design."})]}),e.jsx("div",{className:"mb-6",children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 mb-4",children:[e.jsxs("div",{className:"relative flex-grow",children:[e.jsx(y,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),e.jsx(w,{type:"text",placeholder:"Search latest packages...",value:r,onChange:s=>h(s.target.value),className:"pl-10"})]}),e.jsxs(k,{value:a,onValueChange:p,children:[e.jsx(L,{className:"w-full sm:w-[180px]",children:e.jsx(P,{placeholder:"Category"})}),e.jsxs(_,{children:[e.jsx(t,{value:"all",children:"All Categories"}),e.jsx(t,{value:"keyboard",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(q,{className:"mr-2 h-4 w-4"}),e.jsx("span",{children:"Keyboards"})]})}),e.jsx(t,{value:"microcontroller",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(E,{className:"mr-2 h-4 w-4"}),e.jsx("span",{children:"Microcontrollers"})]})}),e.jsx(t,{value:"connector",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(A,{className:"mr-2 h-4 w-4"}),e.jsx("span",{children:"Connectors"})]})}),e.jsx(t,{value:"sensor",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(B,{className:"mr-2 h-4 w-4"}),e.jsx("span",{children:"Sensors"})]})})]})]})]})}),e.jsx(F,{isLoading:u,error:f,filteredPackages:j,apiBaseUrl:d,emptyStateMessage:r?`No packages match your search for "${r}".`:a!=="all"?`No ${a} packages found in the latest list.`:"There are no new packages at the moment."})]}),e.jsx(C,{})]})};export{X as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{k as a}from"./index-BQPj88OW.js";/**
|
|
2
|
+
* @license lucide-react v0.488.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],t=a("layers",e);export{t as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
async function p(){window.prettier||await Promise.all([e("https://cdn.jsdelivr.net/npm/prettier@2.8.8/standalone.js"),e("https://cdn.jsdelivr.net/npm/prettier@2.8.8/parser-typescript.js"),e("https://cdn.jsdelivr.net/npm/prettier@2.8.8/parser-markdown.js")])}function e(r){return new Promise((n,i)=>{const t=document.createElement("script");t.src=r,t.onload=()=>n(),t.onerror=i,document.head.appendChild(t)})}export{p as loadPrettier};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{k as e}from"./index-BQPj88OW.js";/**
|
|
2
|
+
* @license lucide-react v0.488.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const o=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],t=e("lock",o);export{t as L};
|