@tscircuit/fake-snippets 0.0.121 → 0.0.122
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/bundle.js +9287 -0
- package/dist/index.d.ts +2190 -0
- package/dist/index.js +3826 -0
- package/dist/schema.d.ts +3142 -0
- package/{fake-snippets-api/lib/db/schema.ts → dist/schema.js} +147 -195
- package/package.json +4 -1
- package/.github/CODEOWNERS +0 -1
- package/.github/workflows/bun-formatcheck.yml +0 -26
- package/.github/workflows/bun-pver-release.yml +0 -53
- package/.github/workflows/bun-test.yml +0 -28
- package/.github/workflows/bun-typecheck.yml +0 -26
- package/.github/workflows/bundle-size-analysis.yml +0 -79
- package/.github/workflows/stale.yml +0 -40
- package/.github/workflows/update-package.yml +0 -58
- package/.github/workflows/update-snapshots.yml +0 -49
- package/CLAUDE.md +0 -92
- package/CONTRIBUTING.md +0 -59
- package/api/generated-index.js +0 -456
- package/biome.json +0 -67
- package/bun-tests/fake-snippets-api/fixtures/get-test-server.ts +0 -141
- package/bun-tests/fake-snippets-api/fixtures/preload.ts +0 -18
- package/bun-tests/fake-snippets-api/fixtures/start-server.ts +0 -48
- package/bun-tests/fake-snippets-api/routes/accounts/get.test.ts +0 -64
- package/bun-tests/fake-snippets-api/routes/accounts/get_account_balance.test.ts +0 -14
- package/bun-tests/fake-snippets-api/routes/ai_reviews/create.test.ts +0 -21
- package/bun-tests/fake-snippets-api/routes/ai_reviews/get.test.ts +0 -16
- package/bun-tests/fake-snippets-api/routes/ai_reviews/list.test.ts +0 -14
- package/bun-tests/fake-snippets-api/routes/ai_reviews/process_review.test.ts +0 -16
- package/bun-tests/fake-snippets-api/routes/bug_reports/create.test.ts +0 -37
- package/bun-tests/fake-snippets-api/routes/bug_reports/upload_file.test.ts +0 -89
- package/bun-tests/fake-snippets-api/routes/datasheets/create.test.ts +0 -16
- package/bun-tests/fake-snippets-api/routes/datasheets/get.test.ts +0 -54
- package/bun-tests/fake-snippets-api/routes/datasheets/list.test.ts +0 -49
- package/bun-tests/fake-snippets-api/routes/datasheets/process_all_datasheets.test.ts +0 -22
- package/bun-tests/fake-snippets-api/routes/datasheets/run_async_tasks.test.ts +0 -19
- package/bun-tests/fake-snippets-api/routes/health.test.ts +0 -9
- package/bun-tests/fake-snippets-api/routes/order_files/get.test.ts +0 -48
- package/bun-tests/fake-snippets-api/routes/order_files/upload.test.ts +0 -77
- package/bun-tests/fake-snippets-api/routes/order_quotes/create.test.ts +0 -33
- package/bun-tests/fake-snippets-api/routes/orders/create.test.ts +0 -17
- package/bun-tests/fake-snippets-api/routes/orders/get.test.ts +0 -199
- package/bun-tests/fake-snippets-api/routes/orders/list.test.ts +0 -30
- package/bun-tests/fake-snippets-api/routes/orgs/add_member.test.ts +0 -26
- package/bun-tests/fake-snippets-api/routes/orgs/create.test.ts +0 -37
- package/bun-tests/fake-snippets-api/routes/orgs/get.test.ts +0 -53
- package/bun-tests/fake-snippets-api/routes/orgs/get_member.test.ts +0 -110
- package/bun-tests/fake-snippets-api/routes/orgs/list.test.ts +0 -17
- package/bun-tests/fake-snippets-api/routes/orgs/list_members.test.ts +0 -24
- package/bun-tests/fake-snippets-api/routes/orgs/remove_member.test.ts +0 -81
- package/bun-tests/fake-snippets-api/routes/orgs/update.test.ts +0 -151
- package/bun-tests/fake-snippets-api/routes/package_builds/get.test.ts +0 -279
- package/bun-tests/fake-snippets-api/routes/package_builds/list.test.ts +0 -292
- package/bun-tests/fake-snippets-api/routes/package_files/create.test.ts +0 -320
- package/bun-tests/fake-snippets-api/routes/package_files/create_or_update.test.ts +0 -603
- package/bun-tests/fake-snippets-api/routes/package_files/delete.test.ts +0 -233
- package/bun-tests/fake-snippets-api/routes/package_files/download.test.ts +0 -248
- package/bun-tests/fake-snippets-api/routes/package_files/get.test.ts +0 -230
- package/bun-tests/fake-snippets-api/routes/package_files/list.test.ts +0 -212
- package/bun-tests/fake-snippets-api/routes/package_releases/create.test.ts +0 -171
- package/bun-tests/fake-snippets-api/routes/package_releases/get.test.ts +0 -181
- package/bun-tests/fake-snippets-api/routes/package_releases/get_image_generation_fields.test.ts +0 -38
- package/bun-tests/fake-snippets-api/routes/package_releases/list.test.ts +0 -149
- package/bun-tests/fake-snippets-api/routes/package_releases/update.test.ts +0 -160
- package/bun-tests/fake-snippets-api/routes/packages/add_star.test.ts +0 -129
- package/bun-tests/fake-snippets-api/routes/packages/create.test.ts +0 -67
- package/bun-tests/fake-snippets-api/routes/packages/delete.test.ts +0 -74
- package/bun-tests/fake-snippets-api/routes/packages/fork.test.ts +0 -132
- package/bun-tests/fake-snippets-api/routes/packages/get.test.ts +0 -112
- package/bun-tests/fake-snippets-api/routes/packages/images.test.ts +0 -72
- package/bun-tests/fake-snippets-api/routes/packages/list-1.test.ts +0 -145
- package/bun-tests/fake-snippets-api/routes/packages/list-2.test.ts +0 -48
- package/bun-tests/fake-snippets-api/routes/packages/list_latest.test.ts +0 -110
- package/bun-tests/fake-snippets-api/routes/packages/list_trending.test.ts +0 -103
- package/bun-tests/fake-snippets-api/routes/packages/remove_star.test.ts +0 -131
- package/bun-tests/fake-snippets-api/routes/packages/update.test.ts +0 -217
- package/bun-tests/fake-snippets-api/routes/proxy.test.ts +0 -42
- package/bun.lock +0 -2724
- package/bunfig.toml +0 -3
- package/components.json +0 -20
- package/dist/assets/404-CnNkOMw-.js +0 -1
- package/dist/assets/Analytics-DIw7l2gi.js +0 -84
- package/dist/assets/BuildsList-CeqVVhbz.js +0 -1
- package/dist/assets/CodeAndPreview-Dycd0s15.js +0 -722
- package/dist/assets/DownloadButtonAndMenu-OIUhbKkj.js +0 -194
- package/dist/assets/FileSaver.min-BDsOlqKl.js +0 -1
- package/dist/assets/Footer-DU-HdqGk.js +0 -1
- package/dist/assets/GithubAvatarWithFallback-CQhrBiKP.js +0 -6
- package/dist/assets/Header-CI4GZVOv.js +0 -1
- package/dist/assets/Header2-CrMDmo3P.js +0 -5
- package/dist/assets/NotFound-DaXtEPsC.js +0 -1
- package/dist/assets/OrganizationCard-Bs2dw-AL.js +0 -1
- package/dist/assets/PackageBreadcrumb-DpOpPbGc.js +0 -6
- package/dist/assets/PackageCard-ejE2dLlA.js +0 -16
- package/dist/assets/PackageSearchResults-BI3Rtmr2.js +0 -1
- package/dist/assets/ProfileRouter-4xNgtXr5.js +0 -6
- package/dist/assets/alert-dialog-DrOB4Tui.js +0 -1
- package/dist/assets/authorize-D-5R3QHA.js +0 -16
- package/dist/assets/badge-Bk-k6kyg.js +0 -1
- package/dist/assets/card-CzXDit7x.js +0 -1
- package/dist/assets/circle-alert-Du9-4of0.js +0 -6
- package/dist/assets/circle-check-big-KaRyRsht.js +0 -6
- package/dist/assets/cpu-BnvjzmIA.js +0 -6
- package/dist/assets/create-organization-BHNFvE7B.js +0 -1
- package/dist/assets/dashboard-DDH4V91X.js +0 -11
- package/dist/assets/datasheet-DqKtWt-O.js +0 -1
- package/dist/assets/datasheets-4W6pEMf3.js +0 -1
- package/dist/assets/dev-login-CbHdDthp.js +0 -1
- package/dist/assets/editor-bqg9Yv91.js +0 -1
- 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 +0 -6
- package/dist/assets/fallback-image.svg +0 -1
- package/dist/assets/favicon-BwEjZKGP.ico +0 -0
- package/dist/assets/formatTimeAgo-CawXna5h.js +0 -6
- package/dist/assets/github-DjKGjbX1.js +0 -6
- package/dist/assets/github-dark-DHJKELXO.js +0 -1
- package/dist/assets/github-light-DAi9KRSo.js +0 -1
- package/dist/assets/hash-DfKYpqTm.js +0 -6
- package/dist/assets/index-B17tE1vy.js +0 -1
- package/dist/assets/index-BQPj88OW.js +0 -6051
- package/dist/assets/index-DvNLZBaq.js +0 -6
- package/dist/assets/keyboard-4b_qLHIF.js +0 -11
- package/dist/assets/label-CTudXc4q.js +0 -1
- package/dist/assets/landing-Cjvvx-9q.js +0 -11
- package/dist/assets/latest-DMk4BmXW.js +0 -1
- package/dist/assets/layers-BJ1iwaVM.js +0 -6
- package/dist/assets/load-prettier-DgbV1Jgu.js +0 -1
- package/dist/assets/lock-BOZRJdUv.js +0 -6
- package/dist/assets/main-DPEM9abA.js +0 -26
- package/dist/assets/main-MTKdI4FA.css +0 -1
- package/dist/assets/my-orders-B7lEyNR9.js +0 -1
- package/dist/assets/organization-settings-rNvhYFgZ.js +0 -6
- package/dist/assets/package-editor-T4WIRP49.js +0 -1
- package/dist/assets/pen-D54fxNRf.js +0 -6
- package/dist/assets/plus-KkE_6Dq2.js +0 -6
- package/dist/assets/preview-release-DWhKHFWp.js +0 -1
- package/dist/assets/quickstart-WF3HR9Dc.js +0 -1
- package/dist/assets/refresh-cw-aWASTRku.js +0 -6
- package/dist/assets/release-builds-COa5ndHa.js +0 -1
- package/dist/assets/release-detail-iclJPUO-.js +0 -6
- package/dist/assets/releases-Clsyp-7n.js +0 -1
- package/dist/assets/role-badge-BGF_IMlO.js +0 -16
- package/dist/assets/search-CwH23pAU.js +0 -1
- package/dist/assets/select-BN8AF1J7.js +0 -1
- package/dist/assets/settings-B2bMEtS4.js +0 -6
- package/dist/assets/skeleton-DLAS40-y.js +0 -1
- package/dist/assets/svg-to-png-BX4YEHCP-JcDm8Hc5.js +0 -1
- package/dist/assets/svg-to-png-BX4YEHCP-pNo9Afg8.js +0 -1
- package/dist/assets/tabs-Ce0NFuwd.js +0 -1
- package/dist/assets/timeAgo-VY0F2EV9.js +0 -10
- package/dist/assets/tooltip-C1pwvC0K.js +0 -11
- package/dist/assets/trash-2-BW3eClHz.js +0 -6
- package/dist/assets/trending-C8246HGf.js +0 -1
- package/dist/assets/triangle-alert-BMIBEO1D.js +0 -6
- package/dist/assets/tsx-COt5Ahok.js +0 -1
- package/dist/assets/use-create-datasheet-B7TDsTUt.js +0 -1
- package/dist/assets/use-delete-package-DLKtoTOj.js +0 -1
- package/dist/assets/use-download-zip-CAOKjGXW.js +0 -1
- package/dist/assets/use-list-user-orgs-CgJIT7N4.js +0 -1
- package/dist/assets/use-organization-XwYYTFck.js +0 -1
- package/dist/assets/use-package-builds-Bx8rfxi1.js +0 -1
- package/dist/assets/use-package-by-package-name-1s1Pcarw.js +0 -1
- package/dist/assets/use-package-files-CmmWVuGn.js +0 -1
- package/dist/assets/use-package-release-by-id-or-version-BuuXcSZq.js +0 -1
- package/dist/assets/use-package-release-images-BMaZtvmk.js +0 -1
- package/dist/assets/use-packages-base-api-url-DA1hucM7.js +0 -1
- package/dist/assets/useQueries-BJ7Ue7HV.js +0 -1
- package/dist/assets/user-settings-BqO5FkMf.js +0 -1
- package/dist/assets/view-package-C-OvJr_Q.js +0 -165
- package/dist/assets/vitesse-light-CVO1_9PV.js +0 -1
- package/dist/assets/wasm-CG6Dc4jp.js +0 -1
- package/dist/index.html +0 -127
- package/dist/landing.html +0 -34
- package/dist/robots.txt +0 -9
- package/dist/sitemap.xml +0 -118
- package/dist/stats.html +0 -4949
- package/docs/CIRCUIT_JSON_SOURCE_COMPONENT_OVERVIEW.md +0 -151
- package/fake-snippets-api/README.md +0 -6
- package/fake-snippets-api/biome.json +0 -47
- package/fake-snippets-api/lib/db/autoload-dev-packages.ts +0 -222
- package/fake-snippets-api/lib/db/autoload-packages.json +0 -8
- package/fake-snippets-api/lib/db/db-client.ts +0 -1857
- package/fake-snippets-api/lib/db/seed.ts +0 -1843
- package/fake-snippets-api/lib/index.ts +0 -3
- package/fake-snippets-api/lib/middleware/with-ctx-error.ts +0 -26
- package/fake-snippets-api/lib/middleware/with-db.ts +0 -15
- package/fake-snippets-api/lib/middleware/with-error-handling.ts +0 -24
- package/fake-snippets-api/lib/middleware/with-optional-session-auth.ts +0 -53
- package/fake-snippets-api/lib/middleware/with-request-logging.ts +0 -54
- package/fake-snippets-api/lib/middleware/with-session-auth.ts +0 -102
- package/fake-snippets-api/lib/middleware/with-winter-spec.ts +0 -24
- package/fake-snippets-api/lib/package_file/generate-fs-sha.ts +0 -20
- package/fake-snippets-api/lib/package_file/get-package-file-id-from-file-descriptor.ts +0 -173
- package/fake-snippets-api/lib/package_release/find-package-release-id.ts +0 -120
- package/fake-snippets-api/lib/public-mapping/public-map-org.ts +0 -34
- package/fake-snippets-api/lib/public-mapping/public-map-package-build.ts +0 -48
- package/fake-snippets-api/lib/public-mapping/public-map-package-release.ts +0 -88
- package/fake-snippets-api/lib/public-mapping/public-map-package.ts +0 -60
- package/fake-snippets-api/lib/with-winter-spec.ts +0 -1
- package/fake-snippets-api/next-env.d.ts +0 -5
- package/fake-snippets-api/routes/api/_fake/ai_reviews/process_review.ts +0 -31
- package/fake-snippets-api/routes/api/_fake/datasheets/process_all_datasheets.ts +0 -38
- package/fake-snippets-api/routes/api/_fake/db.ts +0 -11
- package/fake-snippets-api/routes/api/_fake/move_orders_forward.ts +0 -65
- package/fake-snippets-api/routes/api/_fake/received_quotes.ts +0 -112
- package/fake-snippets-api/routes/api/_fake/run_async_tasks.ts +0 -12
- package/fake-snippets-api/routes/api/_fake/seed.ts +0 -13
- package/fake-snippets-api/routes/api/accounts/get.ts +0 -35
- package/fake-snippets-api/routes/api/accounts/get_account_balance.ts +0 -22
- package/fake-snippets-api/routes/api/accounts/search.ts +0 -20
- package/fake-snippets-api/routes/api/accounts/update.ts +0 -32
- package/fake-snippets-api/routes/api/ai/[...anyroute].ts +0 -31
- package/fake-snippets-api/routes/api/ai.ts +0 -2
- package/fake-snippets-api/routes/api/ai_reviews/create.ts +0 -44
- package/fake-snippets-api/routes/api/ai_reviews/get.ts +0 -24
- package/fake-snippets-api/routes/api/ai_reviews/list.ts +0 -14
- package/fake-snippets-api/routes/api/aistream/[...anyroute].ts +0 -65
- package/fake-snippets-api/routes/api/autocomplete/create_autocomplete.ts +0 -16
- package/fake-snippets-api/routes/api/bug_reports/create.ts +0 -43
- package/fake-snippets-api/routes/api/bug_reports/upload_file.ts +0 -113
- package/fake-snippets-api/routes/api/datasheets/create.ts +0 -18
- package/fake-snippets-api/routes/api/datasheets/get.ts +0 -35
- package/fake-snippets-api/routes/api/datasheets/list.ts +0 -29
- package/fake-snippets-api/routes/api/github/installations/create_new_installation_redirect.ts +0 -75
- package/fake-snippets-api/routes/api/github/repos/list_available.ts +0 -91
- package/fake-snippets-api/routes/api/github/repos/refresh.ts +0 -44
- package/fake-snippets-api/routes/api/health.ts +0 -9
- package/fake-snippets-api/routes/api/internal/sessions/create_without_auth.ts +0 -63
- package/fake-snippets-api/routes/api/order_files/get.ts +0 -28
- package/fake-snippets-api/routes/api/order_files/upload.ts +0 -46
- package/fake-snippets-api/routes/api/order_quotes/create.ts +0 -60
- package/fake-snippets-api/routes/api/order_quotes/create_all_vendor_quotes.ts +0 -30
- package/fake-snippets-api/routes/api/order_quotes/get.ts +0 -29
- package/fake-snippets-api/routes/api/orders/create.ts +0 -70
- package/fake-snippets-api/routes/api/orders/get.ts +0 -168
- package/fake-snippets-api/routes/api/orders/list.ts +0 -15
- package/fake-snippets-api/routes/api/orgs/add_member.ts +0 -52
- package/fake-snippets-api/routes/api/orgs/create.ts +0 -48
- package/fake-snippets-api/routes/api/orgs/get.ts +0 -39
- package/fake-snippets-api/routes/api/orgs/get_member.ts +0 -67
- package/fake-snippets-api/routes/api/orgs/list.ts +0 -31
- package/fake-snippets-api/routes/api/orgs/list_members.ts +0 -106
- package/fake-snippets-api/routes/api/orgs/remove_member.ts +0 -46
- package/fake-snippets-api/routes/api/orgs/update.ts +0 -118
- package/fake-snippets-api/routes/api/package_builds/get.ts +0 -70
- package/fake-snippets-api/routes/api/package_builds/list.ts +0 -97
- package/fake-snippets-api/routes/api/package_files/create.ts +0 -135
- package/fake-snippets-api/routes/api/package_files/create_or_update.ts +0 -194
- package/fake-snippets-api/routes/api/package_files/delete.ts +0 -109
- package/fake-snippets-api/routes/api/package_files/download.ts +0 -87
- package/fake-snippets-api/routes/api/package_files/get.ts +0 -68
- package/fake-snippets-api/routes/api/package_files/list.ts +0 -54
- package/fake-snippets-api/routes/api/package_releases/create.ts +0 -109
- package/fake-snippets-api/routes/api/package_releases/get.ts +0 -137
- package/fake-snippets-api/routes/api/package_releases/list.ts +0 -85
- package/fake-snippets-api/routes/api/package_releases/rebuild.ts +0 -66
- package/fake-snippets-api/routes/api/package_releases/update.ts +0 -122
- package/fake-snippets-api/routes/api/packages/add_star.ts +0 -84
- package/fake-snippets-api/routes/api/packages/create.ts +0 -136
- package/fake-snippets-api/routes/api/packages/delete.ts +0 -41
- package/fake-snippets-api/routes/api/packages/fork.ts +0 -165
- package/fake-snippets-api/routes/api/packages/generate_from_jlcpcb.ts +0 -111
- package/fake-snippets-api/routes/api/packages/get.ts +0 -81
- package/fake-snippets-api/routes/api/packages/images/[owner_github_username]/[unscoped_name]/[view_format].ts +0 -119
- package/fake-snippets-api/routes/api/packages/list.ts +0 -105
- package/fake-snippets-api/routes/api/packages/list_latest.ts +0 -29
- package/fake-snippets-api/routes/api/packages/list_trending.ts +0 -43
- package/fake-snippets-api/routes/api/packages/remove_star.ts +0 -70
- package/fake-snippets-api/routes/api/packages/search.ts +0 -19
- package/fake-snippets-api/routes/api/packages/update.ts +0 -112
- package/fake-snippets-api/routes/api/packages/update_ai_description.ts +0 -37
- package/fake-snippets-api/routes/api/proxy.ts +0 -128
- package/fake-snippets-api/routes/api/snippets/add_star.ts +0 -62
- package/fake-snippets-api/routes/api/snippets/create.ts +0 -184
- package/fake-snippets-api/routes/api/snippets/delete.ts +0 -41
- package/fake-snippets-api/routes/api/snippets/download.ts +0 -162
- package/fake-snippets-api/routes/api/snippets/generate_from_jlcpcb.ts +0 -48
- package/fake-snippets-api/routes/api/snippets/get.ts +0 -83
- package/fake-snippets-api/routes/api/snippets/get_image.ts +0 -65
- package/fake-snippets-api/routes/api/snippets/images/[author]/[snippet_name]/[typeFormat].ts +0 -80
- package/fake-snippets-api/routes/api/snippets/list.ts +0 -151
- package/fake-snippets-api/routes/api/snippets/list_latest.ts +0 -13
- package/fake-snippets-api/routes/api/snippets/list_trending.ts +0 -38
- package/fake-snippets-api/routes/api/snippets/remove_star.ts +0 -42
- package/fake-snippets-api/routes/api/snippets/search.ts +0 -18
- package/fake-snippets-api/routes/api/snippets/update.ts +0 -114
- package/fake-snippets-api/utils/normalizeProjectFilePath.ts +0 -60
- package/fake-snippets-api/utils/order-steps.ts +0 -20
- package/favicon.ico +0 -0
- package/index.html +0 -125
- package/landing.html +0 -23
- package/playwright-tests/ai-page.spec.ts +0 -19
- package/playwright-tests/circuit-json-import.spec.ts +0 -133
- package/playwright-tests/cmd-click.spec.ts +0 -43
- package/playwright-tests/dashboard-page.spec.ts +0 -10
- package/playwright-tests/editor-page.spec.ts +0 -15
- package/playwright-tests/exampleCircuitJson.ts +0 -498
- package/playwright-tests/files-dialog.spec.ts +0 -19
- package/playwright-tests/footprint-dialog/footprint-dialog.spec.ts +0 -27
- package/playwright-tests/footprint-dialog/footprint-insertion.spec.ts +0 -38
- package/playwright-tests/footprint-dialog/footprint-preview.spec.ts +0 -34
- package/playwright-tests/footprint-dialog/footprint-selection.spec.ts +0 -29
- package/playwright-tests/handle-manual-edits.spec.ts +0 -55
- package/playwright-tests/home-page.spec.ts +0 -10
- package/playwright-tests/images.spec.ts +0 -17
- package/playwright-tests/manual-edits.spec.ts +0 -89
- package/playwright-tests/preview-page.spec.ts +0 -7
- package/playwright-tests/profile-page.spec.ts +0 -108
- package/playwright-tests/quickstart-page.spec.ts +0 -10
- package/playwright-tests/search-links.spec.ts +0 -21
- package/playwright-tests/search.spec.ts +0 -27
- package/playwright-tests/snapshots/ai-page.spec.ts-AI-Page-lg.png +0 -0
- package/playwright-tests/snapshots/ai-page.spec.ts-AI-Page-md.png +0 -0
- package/playwright-tests/snapshots/ai-page.spec.ts-AI-Page-xs.png +0 -0
- package/playwright-tests/snapshots/cmd-click.spec.ts-underlined-imports.png +0 -0
- package/playwright-tests/snapshots/dashboard-page.spec.ts-Dashboard-page-lg.png +0 -0
- package/playwright-tests/snapshots/dashboard-page.spec.ts-Dashboard-page-md.png +0 -0
- package/playwright-tests/snapshots/dashboard-page.spec.ts-Dashboard-page-xs.png +0 -0
- package/playwright-tests/snapshots/editor-page.spec.ts-editor-with-snippet.png +0 -0
- package/playwright-tests/snapshots/error-fallback.spec.ts-error-fallback-lg.png +0 -0
- package/playwright-tests/snapshots/error-fallback.spec.ts-error-fallback-md.png +0 -0
- package/playwright-tests/snapshots/error-fallback.spec.ts-error-fallback-xs.png +0 -0
- package/playwright-tests/snapshots/files-dialog.spec.ts-view-snippet-files.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-dialog.spec.ts-footprint-preview-lg.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-dialog.spec.ts-footprint-preview-md.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-dialog.spec.ts-footprint-preview-xs.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-insertion.spec.ts-footprint-insertion-lg.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-insertion.spec.ts-footprint-insertion-md.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-insertion.spec.ts-footprint-insertion-xs.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-preview.spec.ts-footprint-preview-lg.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-preview.spec.ts-footprint-preview-md.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-preview.spec.ts-footprint-preview-xs.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-selection.spec.ts-footprint-preview-lg.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-selection.spec.ts-footprint-preview-md.png +0 -0
- package/playwright-tests/snapshots/footprint-dialog/footprint-selection.spec.ts-footprint-preview-xs.png +0 -0
- package/playwright-tests/snapshots/handle-manual-edits.spec.ts-handle-manual-edits.png +0 -0
- package/playwright-tests/snapshots/home-page.spec.ts-Home-page-lg.png +0 -0
- package/playwright-tests/snapshots/home-page.spec.ts-Home-page-md.png +0 -0
- package/playwright-tests/snapshots/home-page.spec.ts-Home-page-xs.png +0 -0
- package/playwright-tests/snapshots/images.spec.ts-pcb-image.png +0 -0
- package/playwright-tests/snapshots/images.spec.ts-schematic-image.png +0 -0
- package/playwright-tests/snapshots/manual-edits.spec.ts-editor-manual-edits.png +0 -0
- package/playwright-tests/snapshots/manual-edits.spec.ts-manual-edits-view.png +0 -0
- package/playwright-tests/snapshots/preview-page.spec.ts-preview-snippet-pcb.png +0 -0
- package/playwright-tests/snapshots/profile-page.spec.ts-profile-page-before-delete.png +0 -0
- package/playwright-tests/snapshots/profile-page.spec.ts-profile-page-delete-dialog.png +0 -0
- package/playwright-tests/snapshots/profile-page.spec.ts-profile-page-dropdown-open.png +0 -0
- package/playwright-tests/snapshots/profile-page.spec.ts-profile-page-snippets-tab.png +0 -0
- package/playwright-tests/snapshots/profile-page.spec.ts-profile-page-starred-tab.png +0 -0
- package/playwright-tests/snapshots/profile-page.spec.ts-snippet-page-open-after-star-click.png +0 -0
- package/playwright-tests/snapshots/quickstart-page.spec.ts-Quickstart-Pagelg.png +0 -0
- package/playwright-tests/snapshots/quickstart-page.spec.ts-Quickstart-Pagemd.png +0 -0
- package/playwright-tests/snapshots/quickstart-page.spec.ts-Quickstart-Pagexs.png +0 -0
- package/playwright-tests/snapshots/search-links.spec.ts-search-links.png +0 -0
- package/playwright-tests/snapshots/search.spec.ts-search-lg.png +0 -0
- package/playwright-tests/snapshots/search.spec.ts-search-md.png +0 -0
- package/playwright-tests/snapshots/search.spec.ts-search-xs.png +0 -0
- package/playwright-tests/snapshots/star.spec.ts-remove-star-button.png +0 -0
- package/playwright-tests/snapshots/star.spec.ts-star-button.png +0 -0
- package/playwright-tests/snapshots/update-description.spec.ts-update-description.png +0 -0
- package/playwright-tests/snapshots/view-snippet.spec.ts-view-snippet-after-lg.png +0 -0
- package/playwright-tests/snapshots/view-snippet.spec.ts-view-snippet-after-md.png +0 -0
- package/playwright-tests/snapshots/view-snippet.spec.ts-view-snippet-after-xs.png +0 -0
- package/playwright-tests/snapshots/view-snippet.spec.ts-view-snippet-before-lg.png +0 -0
- package/playwright-tests/snapshots/view-snippet.spec.ts-view-snippet-before-md.png +0 -0
- package/playwright-tests/snapshots/view-snippet.spec.ts-view-snippet-before-xs.png +0 -0
- package/playwright-tests/snapshots/view-snippet.spec.ts-view-snippet-files.png +0 -0
- package/playwright-tests/star.spec.ts +0 -40
- package/playwright-tests/update-description.spec.ts +0 -18
- package/playwright-tests/view-snippet.spec.ts +0 -35
- package/playwright-tests/viewports.ts +0 -5
- package/playwright.config.ts +0 -27
- package/postcss.config.js +0 -6
- package/public/robots.txt +0 -9
- package/renovate.json +0 -25
- package/scripts/generate-image-sizes.ts +0 -57
- package/scripts/generate-sitemap.ts +0 -103
- package/scripts/generate_bundle_stats.js +0 -208
- package/scripts/snapshot.ts +0 -35
- package/src/App.tsx +0 -314
- package/src/ContextProviders.tsx +0 -94
- package/src/assets/originals/editor_example_1.webp +0 -0
- package/src/assets/originals/editor_example_1_more_square.webp +0 -0
- package/src/assets/originals/editor_example_2.webp +0 -0
- package/src/assets/originals/example_schematic.webp +0 -0
- package/src/components/AiChatMessage.tsx +0 -86
- package/src/components/Analytics.tsx +0 -23
- package/src/components/BomTable.tsx +0 -69
- package/src/components/ChatInput.tsx +0 -53
- package/src/components/CircuitJsonImportDialog.tsx +0 -269
- package/src/components/CircuitToSvgWithMouseControl.tsx +0 -78
- package/src/components/CmdKMenu.tsx +0 -809
- package/src/components/CreateNewSnippetWithAiHero.tsx +0 -81
- package/src/components/CreateReleaseDialog.tsx +0 -124
- package/src/components/DownloadButtonAndMenu.tsx +0 -443
- package/src/components/ErrorFallback.tsx +0 -25
- package/src/components/ErrorOutline.tsx +0 -35
- package/src/components/ErrorTabContent.tsx +0 -122
- package/src/components/ExpandableText.tsx +0 -29
- package/src/components/FAQ.tsx +0 -189
- package/src/components/FileSidebar.tsx +0 -271
- package/src/components/Footer.tsx +0 -144
- package/src/components/GithubAvatarWithFallback.tsx +0 -35
- package/src/components/Header.tsx +0 -202
- package/src/components/Header2.tsx +0 -202
- package/src/components/HeaderDropdown.tsx +0 -88
- package/src/components/HeaderLogin.tsx +0 -105
- package/src/components/HiddenFilesDropdown.tsx +0 -42
- package/src/components/ImageWithFallback.tsx +0 -37
- package/src/components/LatestSnippets.tsx +0 -39
- package/src/components/NotFound.tsx +0 -37
- package/src/components/OptimizedImage.tsx +0 -100
- package/src/components/PackageBreadcrumb.tsx +0 -105
- package/src/components/PackageBuildsPage/ErrorObject.ts +0 -12
- package/src/components/PackageBuildsPage/capitalCase.ts +0 -4
- package/src/components/PackageBuildsPage/getColorForDisplayStatus.ts +0 -17
- package/src/components/PackageCard.tsx +0 -191
- package/src/components/PackageCardSkeleton.tsx +0 -17
- package/src/components/PackageLink.tsx +0 -29
- package/src/components/PackageSearchResults.tsx +0 -81
- package/src/components/PackagesList.tsx +0 -71
- package/src/components/PcbViewerWithContainerHeight.tsx +0 -47
- package/src/components/PrefetchPageLink.tsx +0 -114
- package/src/components/PreviewEmptyState.tsx +0 -16
- package/src/components/ProfileRouter.tsx +0 -30
- package/src/components/RunButton.tsx +0 -27
- package/src/components/SearchComponent.tsx +0 -282
- package/src/components/SentryNotFoundReporter.tsx +0 -44
- package/src/components/SnippetTypeIcon.tsx +0 -60
- package/src/components/StaticPreviewContent.tsx +0 -89
- package/src/components/StaticViewSnippetSidebar.tsx +0 -100
- package/src/components/SuspenseRunFrame.tsx +0 -28
- package/src/components/TableViewer/CircuitJsonTableViewer.tsx +0 -316
- package/src/components/TableViewer/ClickableText.tsx +0 -21
- package/src/components/TableViewer/HeaderCell.tsx +0 -27
- package/src/components/TableViewer/Modal.tsx +0 -39
- package/src/components/TrendingPackagesCarousel.tsx +0 -79
- package/src/components/TypeBadge.tsx +0 -31
- package/src/components/UserCard.tsx +0 -80
- package/src/components/ViewPackagePage/components/ShikiCodeViewer.tsx +0 -49
- package/src/components/ViewPackagePage/components/build-status.tsx +0 -38
- package/src/components/ViewPackagePage/components/important-files-view.tsx +0 -611
- package/src/components/ViewPackagePage/components/main-content-header.tsx +0 -181
- package/src/components/ViewPackagePage/components/main-content-view-selector.tsx +0 -167
- package/src/components/ViewPackagePage/components/markdown-viewer.tsx +0 -88
- package/src/components/ViewPackagePage/components/mobile-sidebar.tsx +0 -301
- package/src/components/ViewPackagePage/components/package-header.tsx +0 -264
- package/src/components/ViewPackagePage/components/preview-image-squares.tsx +0 -47
- package/src/components/ViewPackagePage/components/repo-page-content.tsx +0 -266
- package/src/components/ViewPackagePage/components/sidebar-about-section.tsx +0 -223
- package/src/components/ViewPackagePage/components/sidebar-packages-section.tsx +0 -16
- package/src/components/ViewPackagePage/components/sidebar-releases-section.tsx +0 -126
- package/src/components/ViewPackagePage/components/sidebar.tsx +0 -29
- package/src/components/ViewPackagePage/components/tab-views/3d-view.tsx +0 -43
- package/src/components/ViewPackagePage/components/tab-views/bom-view.tsx +0 -30
- package/src/components/ViewPackagePage/components/tab-views/files-view.tsx +0 -295
- package/src/components/ViewPackagePage/components/tab-views/pcb-view.tsx +0 -35
- package/src/components/ViewPackagePage/components/tab-views/schematic-view.tsx +0 -38
- package/src/components/ViewPackagePage/components/theme-toggle.tsx +0 -40
- package/src/components/ViewPackagePage/hooks/use-current-package-circuit-json.ts +0 -46
- package/src/components/ViewPackagePage/hooks/use-mobile.tsx +0 -19
- package/src/components/ViewPackagePage/hooks/use-toast.tsx +0 -69
- package/src/components/ViewPackagePage/utils/fuzz-search.ts +0 -121
- package/src/components/ViewPackagePage/utils/get-license-content.ts +0 -119
- package/src/components/ViewPackagePage/utils/is-hidden-file.ts +0 -55
- package/src/components/ViewPackagePage/utils/is-package-file-important.ts +0 -35
- package/src/components/ViewPackagePage/utils/is-within-directory.ts +0 -32
- package/src/components/dialogs/GitHubRepositorySelector.tsx +0 -300
- package/src/components/dialogs/confirm-delete-package-dialog.tsx +0 -74
- package/src/components/dialogs/confirm-discard-changes-dialog.tsx +0 -73
- package/src/components/dialogs/create-use-dialog.tsx +0 -40
- package/src/components/dialogs/edit-description-dialog.tsx +0 -96
- package/src/components/dialogs/edit-package-details-dialog.tsx +0 -474
- package/src/components/dialogs/files-dialog.tsx +0 -70
- package/src/components/dialogs/import-component-dialog.tsx +0 -32
- package/src/components/dialogs/import-package-dialog.tsx +0 -90
- package/src/components/dialogs/new-package-save-prompt-dialog.tsx +0 -199
- package/src/components/dialogs/package-visibility-settings-dialog.tsx +0 -93
- package/src/components/dialogs/pcb-download-dialog.tsx +0 -113
- package/src/components/dialogs/rename-package-dialog.tsx +0 -86
- package/src/components/dialogs/rename-snippet-dialog.tsx +0 -81
- package/src/components/dialogs/update-package-description-dialog.tsx +0 -96
- package/src/components/dialogs/view-ts-files-dialog.tsx +0 -664
- package/src/components/organization/OrganizationCard.tsx +0 -202
- package/src/components/organization/OrganizationCardSkeleton.tsx +0 -55
- package/src/components/organization/OrganizationHeader.tsx +0 -140
- package/src/components/organization/OrganizationMembers.tsx +0 -117
- package/src/components/package-port/CodeAndPreview.tsx +0 -253
- package/src/components/package-port/CodeEditor.tsx +0 -866
- package/src/components/package-port/CodeEditorHeader.tsx +0 -427
- package/src/components/package-port/EditorNav.tsx +0 -606
- package/src/components/package-port/GlobalFindReplace.tsx +0 -681
- package/src/components/package-port/QuickOpen.tsx +0 -241
- package/src/components/preview/BuildsList.tsx +0 -237
- package/src/components/preview/ConnectedPackagesList.tsx +0 -229
- package/src/components/preview/ConnectedRepoOverview.tsx +0 -588
- package/src/components/preview/PackageReleasesDashboard.tsx +0 -228
- package/src/components/preview/index.tsx +0 -54
- package/src/components/ui/accordion.tsx +0 -55
- package/src/components/ui/alert-dialog.tsx +0 -139
- package/src/components/ui/alert.tsx +0 -59
- package/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/components/ui/avatar.tsx +0 -48
- package/src/components/ui/badge.tsx +0 -36
- package/src/components/ui/breadcrumb.tsx +0 -118
- package/src/components/ui/button.tsx +0 -58
- package/src/components/ui/calendar.tsx +0 -73
- package/src/components/ui/card.tsx +0 -76
- package/src/components/ui/carousel.tsx +0 -260
- package/src/components/ui/chart.tsx +0 -363
- package/src/components/ui/checkbox.tsx +0 -28
- package/src/components/ui/collapsible.tsx +0 -9
- package/src/components/ui/combobox.tsx +0 -178
- package/src/components/ui/command.tsx +0 -151
- package/src/components/ui/context-menu.tsx +0 -202
- package/src/components/ui/dialog.tsx +0 -120
- package/src/components/ui/drawer.tsx +0 -116
- package/src/components/ui/dropdown-menu.tsx +0 -203
- package/src/components/ui/form.tsx +0 -182
- package/src/components/ui/hover-card.tsx +0 -27
- package/src/components/ui/input.tsx +0 -25
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/menubar.tsx +0 -238
- package/src/components/ui/navigation-menu.tsx +0 -129
- package/src/components/ui/pagination.tsx +0 -121
- package/src/components/ui/popover.tsx +0 -31
- package/src/components/ui/progress.tsx +0 -26
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/resizable.tsx +0 -43
- package/src/components/ui/role-badge.tsx +0 -27
- package/src/components/ui/scroll-area.tsx +0 -46
- package/src/components/ui/searchable-select.tsx +0 -94
- package/src/components/ui/select.tsx +0 -162
- package/src/components/ui/separator.tsx +0 -29
- package/src/components/ui/sheet.tsx +0 -141
- package/src/components/ui/skeleton.tsx +0 -18
- package/src/components/ui/slider.tsx +0 -26
- package/src/components/ui/sonner.tsx +0 -30
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -120
- package/src/components/ui/tabs.tsx +0 -53
- package/src/components/ui/textarea.tsx +0 -24
- package/src/components/ui/toast.tsx +0 -128
- package/src/components/ui/toaster.tsx +0 -1
- package/src/components/ui/toggle-group.tsx +0 -59
- package/src/components/ui/toggle.tsx +0 -43
- package/src/components/ui/tooltip.tsx +0 -28
- package/src/components/ui/tree-view.tsx +0 -563
- package/src/entry-server.tsx +0 -12
- package/src/hooks/use-account-balance.ts +0 -25
- package/src/hooks/use-add-org-member-mutation.ts +0 -51
- package/src/hooks/use-ai-api.ts +0 -35
- package/src/hooks/use-ai-review.ts +0 -31
- package/src/hooks/use-axios.ts +0 -20
- package/src/hooks/use-code-completion-ai-api.ts +0 -11
- package/src/hooks/use-copy-to-clipboard.ts +0 -26
- package/src/hooks/use-create-datasheet.ts +0 -30
- package/src/hooks/use-create-org-mutation.ts +0 -38
- package/src/hooks/use-create-package-files-mutation.ts +0 -76
- package/src/hooks/use-create-package-mutation.ts +0 -54
- package/src/hooks/use-create-package-release-mutation.ts +0 -107
- package/src/hooks/use-create-release-dialog.ts +0 -160
- package/src/hooks/use-create-snippet-mutation.ts +0 -65
- package/src/hooks/use-current-package-id.ts +0 -16
- package/src/hooks/use-current-package-info.ts +0 -32
- package/src/hooks/use-current-package-release.ts +0 -48
- package/src/hooks/use-current-snippet-id.ts +0 -78
- package/src/hooks/use-current-snippet.ts +0 -24
- package/src/hooks/use-datasheet.ts +0 -18
- package/src/hooks/use-debounce.ts +0 -17
- package/src/hooks/use-delete-package.ts +0 -45
- package/src/hooks/use-download-zip.ts +0 -50
- package/src/hooks/use-fork-package-mutation.ts +0 -61
- package/src/hooks/use-global-store.ts +0 -36
- package/src/hooks/use-hotkey.ts +0 -116
- package/src/hooks/use-hydration.ts +0 -30
- package/src/hooks/use-is-using-fake-api.ts +0 -3
- package/src/hooks/use-jlcpcb-component-import.tsx +0 -164
- package/src/hooks/use-list-org-members.ts +0 -32
- package/src/hooks/use-list-user-orgs.ts +0 -25
- package/src/hooks/use-now.ts +0 -12
- package/src/hooks/use-org-by-github-handle.ts +0 -24
- package/src/hooks/use-org.ts +0 -24
- package/src/hooks/use-organization.ts +0 -42
- package/src/hooks/use-package-as-snippet.ts +0 -81
- package/src/hooks/use-package-builds.ts +0 -91
- package/src/hooks/use-package-by-package-id.ts +0 -24
- package/src/hooks/use-package-by-package-name.ts +0 -29
- package/src/hooks/use-package-details-form.ts +0 -146
- package/src/hooks/use-package-files.ts +0 -122
- package/src/hooks/use-package-release-by-id-or-version.ts +0 -45
- package/src/hooks/use-package-release-images.ts +0 -105
- package/src/hooks/use-package-release.ts +0 -124
- package/src/hooks/use-package-stars.ts +0 -163
- package/src/hooks/use-package.ts +0 -24
- package/src/hooks/use-packages-base-api-url.ts +0 -3
- package/src/hooks/use-preview-images.ts +0 -78
- package/src/hooks/use-rebuild-package-release-mutation.ts +0 -41
- package/src/hooks/use-remove-org-member-mutation.ts +0 -32
- package/src/hooks/use-request-ai-review-mutation.ts +0 -54
- package/src/hooks/use-run-tsx/eval-compiled-js.ts +0 -9
- package/src/hooks/use-shiki-highlighter.ts +0 -33
- package/src/hooks/use-sign-in.ts +0 -24
- package/src/hooks/use-snippet-by-name.ts +0 -25
- package/src/hooks/use-snippet.ts +0 -24
- package/src/hooks/use-toast.tsx +0 -90
- package/src/hooks/use-update-ai-description-mutation.ts +0 -42
- package/src/hooks/use-update-org-mutation.ts +0 -41
- package/src/hooks/use-url-params.ts +0 -31
- package/src/hooks/use-warn-user-on-page-change.ts +0 -90
- package/src/hooks/useFileManagement.ts +0 -602
- package/src/hooks/useForkPackageMutation.ts +0 -50
- package/src/hooks/useForkSnippetMutation.ts +0 -53
- package/src/hooks/useOptimizedPackageFilesLoader.ts +0 -136
- package/src/hooks/usePackageFilesLoader.ts +0 -58
- package/src/hooks/useUpdatePackageFilesMutation.ts +0 -131
- package/src/hooks/useUpdatePackageMutation.ts +0 -63
- package/src/index.css +0 -108
- package/src/lib/__tests__/constants.test.ts +0 -66
- package/src/lib/base64ToBytes.ts +0 -5
- package/src/lib/bytesToBase64.ts +0 -4
- package/src/lib/codemirror/basic-setup.ts +0 -67
- package/src/lib/constants.ts +0 -23
- package/src/lib/decodeUrlHashToFsMap.ts +0 -17
- package/src/lib/decodeUrlHashToText.ts +0 -15
- package/src/lib/defaultCodeForBlankCode.tsx +0 -7
- package/src/lib/download-fns/createBlobURL.ts +0 -4
- package/src/lib/download-fns/download-assembly-svg.ts +0 -12
- package/src/lib/download-fns/download-circuit-json-fn.ts +0 -12
- package/src/lib/download-fns/download-circuit-png.ts +0 -96
- package/src/lib/download-fns/download-dsn-file-fn.ts +0 -12
- package/src/lib/download-fns/download-fabrication-files.ts +0 -233
- package/src/lib/download-fns/download-gltf-from-circuit-json.ts +0 -44
- package/src/lib/download-fns/download-gltf.ts +0 -43
- package/src/lib/download-fns/download-kicad-files.ts +0 -38
- package/src/lib/download-fns/download-pcb-svg.ts +0 -35
- package/src/lib/download-fns/download-png-utils.ts +0 -31
- package/src/lib/download-fns/download-readable-netlist.ts +0 -12
- package/src/lib/download-fns/download-schematic-svg.ts +0 -12
- package/src/lib/download-fns/download-simple-route-json.ts +0 -17
- package/src/lib/download-fns/download-spice-file.ts +0 -13
- package/src/lib/download-fns/download-step.ts +0 -12
- package/src/lib/encodeFsMapToUrlHash.ts +0 -13
- package/src/lib/encodeTextToUrlHash.ts +0 -17
- package/src/lib/get-snippet-template.ts +0 -26
- package/src/lib/getLicenseFromLicenseContent.ts +0 -67
- package/src/lib/handleManualEditsImport.tsx +0 -65
- package/src/lib/handleManualEditsImportWithSupportForMultipleFiles.ts +0 -67
- package/src/lib/normalize-svg-for-tile.ts +0 -50
- package/src/lib/populate-query-cache-with-ssr-data.ts +0 -53
- package/src/lib/posthog.ts +0 -17
- package/src/lib/react-query-api-failure-tracking.ts +0 -148
- package/src/lib/sentry.ts +0 -14
- package/src/lib/templates/blank-3d-model-template.ts +0 -12
- package/src/lib/templates/blank-circuit-board-template.ts +0 -20
- package/src/lib/templates/blank-footprint-template.ts +0 -29
- package/src/lib/templates/blank-package-template.ts +0 -21
- package/src/lib/templates/blinking-led-board-template.ts +0 -64
- package/src/lib/templates/usb-c-led-flashlight-template.ts +0 -22
- package/src/lib/ts-lib-cache.ts +0 -162
- package/src/lib/types.ts +0 -31
- package/src/lib/utils/checkIfManualEditsImported.ts +0 -20
- package/src/lib/utils/findTargetFile.ts +0 -97
- package/src/lib/utils/formatTimeAgo.ts +0 -10
- package/src/lib/utils/getPackagePreviewImageUrl.ts +0 -15
- package/src/lib/utils/index.ts +0 -6
- package/src/lib/utils/isComponentExported.ts +0 -10
- package/src/lib/utils/isUuid.ts +0 -5
- package/src/lib/utils/isValidFileName.ts +0 -17
- package/src/lib/utils/load-prettier.ts +0 -23
- package/src/lib/utils/member-role.tsx +0 -61
- package/src/lib/utils/package-utils.ts +0 -7
- package/src/lib/utils/parseJsonOrNull.ts +0 -8
- package/src/lib/utils/pcbManualEditEventHandler.ts +0 -156
- package/src/lib/utils/resolveRelativePath.ts +0 -40
- package/src/lib/utils/timeAgo.ts +0 -20
- package/src/lib/utils/toastManualEditConflicts.tsx +0 -39
- package/src/lib/utils/transformFilesToTreeData.tsx +0 -195
- package/src/main.tsx +0 -15
- package/src/pages/404.tsx +0 -23
- package/src/pages/authorize.tsx +0 -208
- package/src/pages/create-organization.tsx +0 -169
- package/src/pages/dashboard.tsx +0 -254
- package/src/pages/datasheet.tsx +0 -198
- package/src/pages/datasheets.tsx +0 -148
- package/src/pages/dev-login.tsx +0 -68
- package/src/pages/editor.tsx +0 -54
- package/src/pages/landing.tsx +0 -237
- package/src/pages/latest.tsx +0 -145
- package/src/pages/my-orders.tsx +0 -54
- package/src/pages/organization-profile.tsx +0 -197
- package/src/pages/organization-settings.tsx +0 -571
- package/src/pages/package-editor.tsx +0 -60
- package/src/pages/preview-release.tsx +0 -209
- package/src/pages/quickstart.tsx +0 -258
- package/src/pages/release-builds.tsx +0 -99
- package/src/pages/release-detail.tsx +0 -211
- package/src/pages/releases.tsx +0 -55
- package/src/pages/search.tsx +0 -288
- package/src/pages/settings-redirect.tsx +0 -44
- package/src/pages/trending.tsx +0 -201
- package/src/pages/user-profile.tsx +0 -330
- package/src/pages/user-settings.tsx +0 -161
- package/src/pages/view-package.tsx +0 -90
- package/src/types/package.ts +0 -4
- package/src/vite-env.d.ts +0 -1
- package/tailwind.config.js +0 -47
- package/tsconfig.json +0 -30
- package/vercel.json +0 -50
- package/vite.config.ts +0 -236
- package/winterspec.config.ts +0 -6
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f={exports:{}},x=f.exports,E;function L(){return E||(E=1,(function(R,j){var c={};(function(v,i){i()})(x,function(){function v(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function i(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){u(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function w(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function l(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof c=="object"&&c.global===c?c:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,r){var n=a.URL||a.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?l(o):w(o.href)?i(e,t,r):l(o,o.target="_blank")):(o.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(o.href)},4e4),setTimeout(function(){l(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(v(e,r),t);else if(w(e))i(e,t,r);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){l(n)})}}:function(e,t,r,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return i(e,t,r);var o=e.type==="application/octet-stream",b=/constructor/i.test(a.HTMLElement)||a.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||o&&b||m)&&typeof FileReader<"u"){var d=new FileReader;d.onloadend=function(){var s=d.result;s=y?s:s.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=s:location=s,n=null},d.readAsDataURL(e)}else{var h=a.URL||a.webkitURL,p=h.createObjectURL(e);n?n.location=p:location.href=p,n=null,setTimeout(function(){h.revokeObjectURL(p)},4e4)}});a.saveAs=u.saveAs=u,R.exports=u})})(f)),f.exports}var S=L();export{S as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as l,j as e,H as i,l as c}from"./index-BQPj88OW.js";function n(){const a=l(s=>s.session),r=!!a;return e.jsx("footer",{className:"bg-white text-black py-12 border-t mt-8",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(i,{className:"h-6 w-6"}),e.jsx("span",{className:"text-lg font-bold",children:"tscircuit"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"The New Foundation for Electronic Design"})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-2 lg:grid-cols-4 gap-8 text-sm text-gray-600 mt-8",children:[e.jsx("div",{className:"space-y-4",children:e.jsxs("footer",{className:"flex flex-col space-y-2",children:[[{name:"Home",href:"/"},{name:"Dashboard",href:"/dashboard"},{name:"Editor",href:"/editor"},{name:"My Profile",href:`/${a==null?void 0:a.github_username}`,hidden:!r}].filter(s=>!s.hidden).map(s=>e.jsx(c,{href:s.href,className:"hover:underline",children:s.name},s.name)),e.jsx("a",{href:"https://chat.tscircuit.com",className:"hover:underline",target:"_blank",children:"Create with AI"})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-semibold uppercase",children:"Explore"}),e.jsxs("footer",{className:"flex flex-col space-y-2",children:[e.jsx(c,{href:"/latest",className:"hover:underline",children:"Latest Packages"}),e.jsx(c,{href:"/trending",className:"hover:underline",children:"Trending Packages"}),e.jsx(c,{href:"/search",className:"hover:underline",children:"Search Packages"}),e.jsx("a",{href:"https://docs.tscircuit.com",className:"hover:underline",children:"Docs"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-semibold uppercase",children:"Follow"}),e.jsxs("footer",{className:"flex flex-col space-y-2",children:[e.jsx("a",{href:"https://blog.tscircuit.com",className:"hover:underline",children:"Blog"}),e.jsx("a",{href:"https://x.com/tscircuit",className:"hover:underline",children:"Twitter"}),e.jsx("a",{href:"https://tscircuit.com/join",className:"hover:underline",children:"Discord"}),e.jsx("a",{href:"https://github.com/tscircuit/tscircuit",className:"hover:underline",children:"GitHub"}),e.jsx("a",{href:"https://youtube.com/@seveibar",className:"hover:underline",children:"YouTube"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-semibold uppercase",children:"Company"}),e.jsxs("nav",{className:"flex flex-col space-y-2",children:[e.jsx("a",{href:"https://tscircuit.com/legal/terms-of-service",className:"hover:underline",children:"Terms of Service"}),e.jsx("a",{href:"https://tscircuit.com/legal/privacy-policy",className:"hover:underline",children:"Privacy Policy"}),e.jsx("a",{href:"mailto:contact@tscircuit.com",className:"hover:underline",children:"contact@tscircuit.com"}),e.jsx("div",{className:"flex-grow"}),e.jsxs("div",{className:"text-xs text-gray-500",children:["we are inspired by"," ",e.jsx("a",{href:"https://val.town",className:"underline",children:"val.town"}),","," ",e.jsx("a",{href:"https://codesandbox.io/",className:"underline",children:"codesandbox"})," ","and"," ",e.jsx("a",{href:"https://v0.dev",className:"underline",children:"v0.dev"})]}),e.jsxs("div",{className:"text-xs text-gray-500",children:["© ",new Date().getFullYear()," tscircuit Inc."]})]})]})]})]})})}export{n as F};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{k as i,j as t}from"./index-BQPj88OW.js";import{A as p,e as l,g as h}from"./Analytics-DIw7l2gi.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 n=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],k=i("users",n),m=({username:a,fallback:s,className:c,fallbackClassName:r,size:e})=>t.jsxs(p,{className:c,children:[t.jsx(l,{src:`https://github.com/${a}.png${e?`?size=${e}`:""}`,alt:`${a||s} avatar`,className:"object-cover"}),t.jsx(h,{className:`bg-blue-100 text-blue-600 ${r}`,children:(a||s||"").split(" ").map(o=>o[0]).join("").toUpperCase().slice(0,2)})]});export{m as G,k as U};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as h,u as x,j as s,l as d,B as i,bP as m,G as f,h as g,n as o}from"./index-BQPj88OW.js";import{F as b,H as j,G as u,X as p,M as N,J as v,K as w}from"./Analytics-DIw7l2gi.js";const r=({href:e,children:l,className:t,alsoHighlightForUrl:n})=>{const[a]=g();return/^(https?|mailto|tel):\/?\//i.test(e)?s.jsx("a",{className:o("header-button",t),href:e,target:"_blank",rel:"noopener noreferrer",children:s.jsx(i,{className:t,variant:"ghost",children:l})}):a===e||a===n?s.jsx(d,{className:o("header-button",t),href:e,children:s.jsx(i,{variant:"ghost",className:`border-b-2 rounded-none border-blue-600 header-button ${t}`,children:l})}):s.jsx(d,{className:o("header-button",t),href:e,children:s.jsx(i,{className:t,variant:"ghost",children:l})})};function H(){const[e,l]=h.useState(!1),t=x(a=>!!a.session),n=x(a=>{var c;return(c=a.session)==null?void 0:c.token});return h.useEffect(()=>{window.TSCIRCUIT_REGISTRY_TOKEN=n??""},[n]),s.jsxs("header",{className:"px-4 py-3",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(d,{href:"/",className:"text-lg font-semibold whitespace-nowrap select-none",children:s.jsx("span",{className:"bg-blue-500 px-2 py-1 rounded-md text-white",children:"tscircuit"})}),s.jsx("div",{className:"hidden md:flex items-center space-x-4",children:s.jsx("nav",{children:s.jsxs("ul",{className:"flex items-center gap-2 ml-2",children:[t&&s.jsx("li",{children:s.jsx(r,{href:"/dashboard",children:"Dashboard"})}),s.jsx("li",{children:s.jsx(r,{href:"/quickstart",alsoHighlightForUrl:"/editor",children:"Editor"})}),s.jsx("li",{children:s.jsx("a",{href:"https://chat.tscircuit.com",children:s.jsx(i,{variant:"ghost",children:"AI"})})}),s.jsx("li",{children:s.jsx("a",{href:"https://docs.tscircuit.com",children:s.jsx(i,{variant:"ghost",children:"Docs"})})})]})})}),s.jsx("div",{className:"flex-grow"}),s.jsx("a",{href:"https://tscircuit.com/join",target:"_blank",className:"lg:mr-2",children:s.jsx(i,{variant:"ghost",children:s.jsx(m,{className:"text-gray-400 hidden lg:block hover:text-gray-600 transition-colors w-4 h-4"})})}),s.jsx("a",{href:"https://github.com/tscircuit/tscircuit",target:"_blank",className:"lg:mr-4","aria-label":"View TSCircuit on GitHub",children:s.jsx(f,{className:"hidden lg:block text-gray-400 hover:text-gray-600 transition-colors"})}),s.jsxs("div",{className:"hidden md:flex items-center space-x-4",children:[s.jsx(b,{}),s.jsx(j,{}),s.jsx(u,{})]}),s.jsx("button",{className:"md:hidden",onClick:()=>l(!e),"aria-label":e?"Close menu":"Open menu",children:e?s.jsx(p,{size:24}):s.jsx(N,{size:24})})]}),e&&s.jsxs("div",{className:"md:hidden mt-4",children:[s.jsx("nav",{className:"mb-4",children:s.jsxs("ul",{className:"flex flex-col gap-2 w-full",children:[t&&s.jsx("li",{children:s.jsx(r,{className:"w-full justify-start",href:"/dashboard",children:"Dashboard"})}),s.jsx("li",{children:s.jsx(r,{className:"w-full justify-start",href:"/quickstart",alsoHighlightForUrl:"/editor",children:"Editor"})}),s.jsx("li",{children:s.jsx(r,{className:"w-full justify-start",href:"https://chat.tscircuit.com",children:"AI"})}),s.jsx("li",{children:s.jsx(r,{className:"w-full justify-start",href:"https://docs.tscircuit.com",children:"Docs"})}),s.jsx("li",{children:s.jsx(r,{className:"w-full justify-start",href:"/search",children:"Search"})})]})}),s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(j,{}),s.jsx(u,{})]})]}),s.jsx(v,{}),s.jsx(w,{})]})}export{H};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{g as Q,r as pe,i as me,R as _,b as se,u as he,j as u,l as P,B as H,q as W}from"./index-BQPj88OW.js";import{H as J,G as D,X as Te,M as ve,J as ge,K as ye,F as be}from"./Analytics-DIw7l2gi.js";var q={exports:{}},U,Z;function Ee(){if(Z)return U;Z=1;var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return U=o,U}var B,K;function Ae(){if(K)return B;K=1;var o=Ee();function e(){}function r(){}return r.resetWarningCache=e,B=function(){function t(f,a,i,c,l,d){if(d!==o){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}t.isRequired=t;function n(){return t}var s={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},B}var ee;function xe(){return ee||(ee=1,q.exports=Ae()()),q.exports}var Se=xe();const T=Q(Se);var Y,te;function Ce(){if(te)return Y;te=1;function o(a){return a&&typeof a=="object"&&"default"in a?a.default:a}var e=pe(),r=o(e);function t(a,i,c){return i in a?Object.defineProperty(a,i,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[i]=c,a}function n(a,i){a.prototype=Object.create(i.prototype),a.prototype.constructor=a,a.__proto__=i}var s=!!(typeof window<"u"&&window.document&&window.document.createElement);function f(a,i,c){if(typeof a!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof i!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof c<"u"&&typeof c!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function l(d){return d.displayName||d.name||"Component"}return function(m){if(typeof m!="function")throw new Error("Expected WrappedComponent to be a React component.");var h=[],g;function A(){g=a(h.map(function(b){return b.props})),y.canUseDOM?i(g):c&&(g=c(g))}var y=(function(b){n(x,b);function x(){return b.apply(this,arguments)||this}x.peek=function(){return g},x.rewind=function(){if(x.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var F=g;return g=void 0,h=[],F};var O=x.prototype;return O.UNSAFE_componentWillMount=function(){h.push(this),A()},O.componentDidUpdate=function(){A()},O.componentWillUnmount=function(){var F=h.indexOf(this);h.splice(F,1),A()},O.render=function(){return r.createElement(m,this.props)},x})(e.PureComponent);return t(y,"displayName","SideEffect("+l(m)+")"),t(y,"canUseDOM",s),y}}return Y=f,Y}var Oe=Ce();const je=Q(Oe);/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/var G,re;function we(){if(re)return G;re=1;var o=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function t(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function n(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var f={},a=0;a<10;a++)f["_"+String.fromCharCode(a)]=a;var i=Object.getOwnPropertyNames(f).map(function(l){return f[l]});if(i.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(l){c[l]=l}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return G=n()?Object.assign:function(s,f){for(var a,i=t(s),c,l=1;l<arguments.length;l++){a=Object(arguments[l]);for(var d in a)e.call(a,d)&&(i[d]=a[d]);if(o){c=o(a);for(var m=0;m<c.length;m++)r.call(a,c[m])&&(i[c[m]]=a[c[m]])}}return i},G}var Pe=we();const Ne=Q(Pe);var ce={},w={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},p={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(p).map(function(o){return p[o]});var v={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},M={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},Re=Object.keys(k).reduce(function(o,e){return o[k[e]]=e,o},{}),Ie=[p.NOSCRIPT,p.SCRIPT,p.STYLE],S="data-react-helmet",Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_e=function(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")},Me=(function(){function o(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,r,t){return r&&o(e.prototype,r),t&&o(e,t),e}})(),E=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(o[t]=r[t])}return o},He=function(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(o,e):o.__proto__=e)},ne=function(o,e){var r={};for(var t in o)e.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t]);return r},ke=function(o,e){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:o},$=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},Fe=function(e){var r=R(e,p.TITLE),t=R(e,M.TITLE_TEMPLATE);if(t&&r)return t.replace(/%s/g,function(){return Array.isArray(r)?r.join(""):r});var n=R(e,M.DEFAULT_TITLE);return r||n||void 0},De=function(e){return R(e,M.ON_CHANGE_CLIENT_STATE)||function(){}},z=function(e,r){return r.filter(function(t){return typeof t[e]<"u"}).map(function(t){return t[e]}).reduce(function(t,n){return E({},t,n)},{})},qe=function(e,r){return r.filter(function(t){return typeof t[p.BASE]<"u"}).map(function(t){return t[p.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var s=Object.keys(n),f=0;f<s.length;f++){var a=s[f],i=a.toLowerCase();if(e.indexOf(i)!==-1&&n[i])return t.concat(n)}return t},[])},I=function(e,r,t){var n={};return t.filter(function(s){return Array.isArray(s[e])?!0:(typeof s[e]<"u"&&Ge("Helmet: "+e+' should be of type "Array". Instead found type "'+Le(s[e])+'"'),!1)}).map(function(s){return s[e]}).reverse().reduce(function(s,f){var a={};f.filter(function(m){for(var h=void 0,g=Object.keys(m),A=0;A<g.length;A++){var y=g[A],b=y.toLowerCase();r.indexOf(b)!==-1&&!(h===v.REL&&m[h].toLowerCase()==="canonical")&&!(b===v.REL&&m[b].toLowerCase()==="stylesheet")&&(h=b),r.indexOf(y)!==-1&&(y===v.INNER_HTML||y===v.CSS_TEXT||y===v.ITEM_PROP)&&(h=y)}if(!h||!m[h])return!1;var x=m[h].toLowerCase();return n[h]||(n[h]={}),a[h]||(a[h]={}),n[h][x]?!1:(a[h][x]=!0,!0)}).reverse().forEach(function(m){return s.push(m)});for(var i=Object.keys(a),c=0;c<i.length;c++){var l=i[c],d=Ne({},n[l],a[l]);n[l]=d}return s},[]).reverse()},R=function(e,r){for(var t=e.length-1;t>=0;t--){var n=e[t];if(n.hasOwnProperty(r))return n[r]}return null},Ue=function(e){return{baseTag:qe([v.HREF,v.TARGET],e),bodyAttributes:z(w.BODY,e),defer:R(e,M.DEFER),encode:R(e,M.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:z(w.HTML,e),linkTags:I(p.LINK,[v.REL,v.HREF],e),metaTags:I(p.META,[v.NAME,v.CHARSET,v.HTTPEQUIV,v.PROPERTY,v.ITEM_PROP],e),noscriptTags:I(p.NOSCRIPT,[v.INNER_HTML],e),onChangeClientState:De(e),scriptTags:I(p.SCRIPT,[v.SRC,v.INNER_HTML],e),styleTags:I(p.STYLE,[v.CSS_TEXT],e),title:Fe(e),titleAttributes:z(w.TITLE,e)}},X=(function(){var o=Date.now();return function(e){var r=Date.now();r-o>16?(o=r,e(r)):setTimeout(function(){X(e)},0)}})(),ae=function(e){return clearTimeout(e)},Be=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||X:ce.requestAnimationFrame||X,Ye=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||ae:ce.cancelAnimationFrame||ae,Ge=function(e){return console&&typeof console.warn=="function"&&console.warn(e)},L=null,ze=function(e){L&&Ye(L),e.defer?L=Be(function(){oe(e,function(){L=null})}):(oe(e),L=null)},oe=function(e,r){var t=e.baseTag,n=e.bodyAttributes,s=e.htmlAttributes,f=e.linkTags,a=e.metaTags,i=e.noscriptTags,c=e.onChangeClientState,l=e.scriptTags,d=e.styleTags,m=e.title,h=e.titleAttributes;V(p.BODY,n),V(p.HTML,s),We(m,h);var g={baseTag:N(p.BASE,t),linkTags:N(p.LINK,f),metaTags:N(p.META,a),noscriptTags:N(p.NOSCRIPT,i),scriptTags:N(p.SCRIPT,l),styleTags:N(p.STYLE,d)},A={},y={};Object.keys(g).forEach(function(b){var x=g[b],O=x.newTags,j=x.oldTags;O.length&&(A[b]=O),j.length&&(y[b]=g[b].oldTags)}),r&&r(),c(e,A,y)},le=function(e){return Array.isArray(e)?e.join(""):e},We=function(e,r){typeof e<"u"&&document.title!==e&&(document.title=le(e)),V(p.TITLE,r)},V=function(e,r){var t=document.getElementsByTagName(e)[0];if(t){for(var n=t.getAttribute(S),s=n?n.split(","):[],f=[].concat(s),a=Object.keys(r),i=0;i<a.length;i++){var c=a[i],l=r[c]||"";t.getAttribute(c)!==l&&t.setAttribute(c,l),s.indexOf(c)===-1&&s.push(c);var d=f.indexOf(c);d!==-1&&f.splice(d,1)}for(var m=f.length-1;m>=0;m--)t.removeAttribute(f[m]);s.length===f.length?t.removeAttribute(S):t.getAttribute(S)!==a.join(",")&&t.setAttribute(S,a.join(","))}},N=function(e,r){var t=document.head||document.querySelector(p.HEAD),n=t.querySelectorAll(e+"["+S+"]"),s=Array.prototype.slice.call(n),f=[],a=void 0;return r&&r.length&&r.forEach(function(i){var c=document.createElement(e);for(var l in i)if(i.hasOwnProperty(l))if(l===v.INNER_HTML)c.innerHTML=i.innerHTML;else if(l===v.CSS_TEXT)c.styleSheet?c.styleSheet.cssText=i.cssText:c.appendChild(document.createTextNode(i.cssText));else{var d=typeof i[l]>"u"?"":i[l];c.setAttribute(l,d)}c.setAttribute(S,"true"),s.some(function(m,h){return a=h,c.isEqualNode(m)})?s.splice(a,1):f.push(c)}),s.forEach(function(i){return i.parentNode.removeChild(i)}),f.forEach(function(i){return t.appendChild(i)}),{oldTags:s,newTags:f}},ue=function(e){return Object.keys(e).reduce(function(r,t){var n=typeof e[t]<"u"?t+'="'+e[t]+'"':""+t;return r?r+" "+n:n},"")},$e=function(e,r,t,n){var s=ue(t),f=le(r);return s?"<"+e+" "+S+'="true" '+s+">"+$(f,n)+"</"+e+">":"<"+e+" "+S+'="true">'+$(f,n)+"</"+e+">"},Xe=function(e,r,t){return r.reduce(function(n,s){var f=Object.keys(s).filter(function(c){return!(c===v.INNER_HTML||c===v.CSS_TEXT)}).reduce(function(c,l){var d=typeof s[l]>"u"?l:l+'="'+$(s[l],t)+'"';return c?c+" "+d:d},""),a=s.innerHTML||s.cssText||"",i=Ie.indexOf(e)===-1;return n+"<"+e+" "+S+'="true" '+f+(i?"/>":">"+a+"</"+e+">")},"")},fe=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[k[n]||n]=e[n],t},r)},Ve=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[Re[n]||n]=e[n],t},r)},Qe=function(e,r,t){var n,s=(n={key:r},n[S]=!0,n),f=fe(t,s);return[_.createElement(p.TITLE,f,r)]},Je=function(e,r){return r.map(function(t,n){var s,f=(s={key:n},s[S]=!0,s);return Object.keys(t).forEach(function(a){var i=k[a]||a;if(i===v.INNER_HTML||i===v.CSS_TEXT){var c=t.innerHTML||t.cssText;f.dangerouslySetInnerHTML={__html:c}}else f[i]=t[a]}),_.createElement(e,f)})},C=function(e,r,t){switch(e){case p.TITLE:return{toComponent:function(){return Qe(e,r.title,r.titleAttributes)},toString:function(){return $e(e,r.title,r.titleAttributes,t)}};case w.BODY:case w.HTML:return{toComponent:function(){return fe(r)},toString:function(){return ue(r)}};default:return{toComponent:function(){return Je(e,r)},toString:function(){return Xe(e,r,t)}}}},de=function(e){var r=e.baseTag,t=e.bodyAttributes,n=e.encode,s=e.htmlAttributes,f=e.linkTags,a=e.metaTags,i=e.noscriptTags,c=e.scriptTags,l=e.styleTags,d=e.title,m=d===void 0?"":d,h=e.titleAttributes;return{base:C(p.BASE,r,n),bodyAttributes:C(w.BODY,t,n),htmlAttributes:C(w.HTML,s,n),link:C(p.LINK,f,n),meta:C(p.META,a,n),noscript:C(p.NOSCRIPT,i,n),script:C(p.SCRIPT,c,n),style:C(p.STYLE,l,n),title:C(p.TITLE,{title:m,titleAttributes:h},n)}},Ze=function(e){var r,t;return t=r=(function(n){He(s,n);function s(){return _e(this,s),ke(this,n.apply(this,arguments))}return s.prototype.shouldComponentUpdate=function(a){return!me(this.props,a)},s.prototype.mapNestedChildrenToProps=function(a,i){if(!i)return null;switch(a.type){case p.SCRIPT:case p.NOSCRIPT:return{innerHTML:i};case p.STYLE:return{cssText:i}}throw new Error("<"+a.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},s.prototype.flattenArrayTypeChildren=function(a){var i,c=a.child,l=a.arrayTypeChildren,d=a.newChildProps,m=a.nestedChildren;return E({},l,(i={},i[c.type]=[].concat(l[c.type]||[],[E({},d,this.mapNestedChildrenToProps(c,m))]),i))},s.prototype.mapObjectTypeChildren=function(a){var i,c,l=a.child,d=a.newProps,m=a.newChildProps,h=a.nestedChildren;switch(l.type){case p.TITLE:return E({},d,(i={},i[l.type]=h,i.titleAttributes=E({},m),i));case p.BODY:return E({},d,{bodyAttributes:E({},m)});case p.HTML:return E({},d,{htmlAttributes:E({},m)})}return E({},d,(c={},c[l.type]=E({},m),c))},s.prototype.mapArrayTypeChildrenToProps=function(a,i){var c=E({},i);return Object.keys(a).forEach(function(l){var d;c=E({},c,(d={},d[l]=a[l],d))}),c},s.prototype.warnOnInvalidChildren=function(a,i){return!0},s.prototype.mapChildrenToProps=function(a,i){var c=this,l={};return _.Children.forEach(a,function(d){if(!(!d||!d.props)){var m=d.props,h=m.children,g=ne(m,["children"]),A=Ve(g);switch(c.warnOnInvalidChildren(d,h),d.type){case p.LINK:case p.META:case p.NOSCRIPT:case p.SCRIPT:case p.STYLE:l=c.flattenArrayTypeChildren({child:d,arrayTypeChildren:l,newChildProps:A,nestedChildren:h});break;default:i=c.mapObjectTypeChildren({child:d,newProps:i,newChildProps:A,nestedChildren:h});break}}}),i=this.mapArrayTypeChildrenToProps(l,i),i},s.prototype.render=function(){var a=this.props,i=a.children,c=ne(a,["children"]),l=E({},c);return i&&(l=this.mapChildrenToProps(i,l)),_.createElement(e,l)},Me(s,null,[{key:"canUseDOM",set:function(a){e.canUseDOM=a}}]),s})(_.Component),r.propTypes={base:T.object,bodyAttributes:T.object,children:T.oneOfType([T.arrayOf(T.node),T.node]),defaultTitle:T.string,defer:T.bool,encodeSpecialCharacters:T.bool,htmlAttributes:T.object,link:T.arrayOf(T.object),meta:T.arrayOf(T.object),noscript:T.arrayOf(T.object),onChangeClientState:T.func,script:T.arrayOf(T.object),style:T.arrayOf(T.object),title:T.string,titleAttributes:T.object,titleTemplate:T.string},r.defaultProps={defer:!0,encodeSpecialCharacters:!0},r.peek=e.peek,r.rewind=function(){var n=e.rewind();return n||(n=de({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),n},t},Ke=function(){return null},et=je(Ue,ze,de)(Ke),ie=Ze(et);ie.renderStatic=ie.rewind;const tt=()=>{const[o,e]=se.useState(!1);return u.jsx("div",{className:"relative",children:o?u.jsx("div",{className:"flex items-center gap-2 ml-8",children:u.jsx("div",{className:"absolute -top-4 right-3 bg-white",children:u.jsx(be,{autofocus:!0,closeOnClick:()=>{e(!1)}})})}):u.jsxs(u.Fragment,{children:[u.jsx(H,{variant:"ghost",size:"icon",onClick:()=>e(!0),className:"h-8 w-8 hidden sm:flex","aria-label":"Open search",children:u.jsx(W,{className:"size-4"})}),u.jsx(H,{variant:"ghost",size:"icon",onClick:()=>window.location.href="/search",className:"h-8 w-8 flex sm:hidden","aria-label":"Go to search",children:u.jsx(W,{className:"size-4"})})]})})},at=()=>{const[o,e]=se.useState(!1),r=he(t=>!!t.session);return u.jsxs(u.Fragment,{children:[u.jsxs("header",{className:"sticky top-0 z-50 w-full border-b bg-white md:bg-white/80 md:backdrop-blur supports-[backdrop-filter]:md:bg-white/60",children:[u.jsxs("div",{className:"container mx-auto flex h-16 items-center justify-between px-2 md:px-6",children:[u.jsx(P,{href:"/",className:"flex select-none items-center",children:u.jsx("span",{className:"bg-blue-500 px-2 py-1 rounded-md text-white text-sm font-semibold sm:text-base",children:"tscircuit"})}),u.jsxs("nav",{className:"hidden md:flex gap-6",children:[r&&u.jsx(P,{className:"text-sm font-medium hover:underline underline-offset-4",href:"/dashboard",children:"Dashboard"}),u.jsx(P,{className:"text-sm font-medium hover:underline underline-offset-4",href:"/quickstart",children:"Editor"}),u.jsx("a",{className:"text-sm font-medium hover:underline underline-offset-4",href:"https://docs.tscircuit.com",children:"Docs"}),u.jsx("a",{className:"text-sm font-medium hover:underline underline-offset-4",href:"https://tscircuit.com/join",children:"Discord"}),u.jsx("a",{className:"text-sm font-medium hover:underline underline-offset-4",href:"mailto:hello@tscircuit.com",children:"Contact"})]}),u.jsxs("div",{className:"hidden md:flex items-center gap-4",children:[u.jsx(tt,{}),r&&u.jsx(J,{}),u.jsx(D,{})]}),u.jsxs("div",{className:"flex md:hidden items-center gap-2",children:[u.jsx(H,{variant:"ghost",size:"icon",onClick:()=>window.location.href="/search",className:"h-8 w-8","aria-label":"Go to search",children:u.jsx(W,{className:"size-4"})}),r?u.jsx(D,{}):u.jsx(P,{href:"/quickstart",children:u.jsx(H,{size:"sm",className:"text-xs px-3 py-1",children:"Get Started"})}),u.jsx("button",{className:"p-2",onClick:()=>e(!o),"aria-label":o?"Close menu":"Open menu",children:o?u.jsx(Te,{size:20}):u.jsx(ve,{size:20})})]})]}),o&&u.jsx("div",{className:"md:hidden border-t bg-white ",children:u.jsxs("div",{className:"container mx-auto px-4 py-3",children:[u.jsx("nav",{className:"mb-4",children:u.jsxs("div",{className:"flex flex-col items-center gap-1",children:[r&&u.jsx(P,{className:"text-sm font-medium hover:underline underline-offset-4 py-2 w-full text-center",href:"/dashboard",onClick:()=>e(!1),children:"Dashboard"}),u.jsx(P,{className:"text-sm font-medium hover:underline underline-offset-4 py-2 w-full text-center",href:"/quickstart",onClick:()=>e(!1),children:"Editor"}),u.jsx("a",{className:"text-sm font-medium hover:underline underline-offset-4 py-2 w-full text-center",href:"https://docs.tscircuit.com",children:"Docs"}),u.jsx("a",{className:"text-sm font-medium hover:underline underline-offset-4 py-2 w-full text-center",href:"https://tscircuit.com/join",children:"Discord"}),u.jsx("a",{className:"text-sm font-medium hover:underline underline-offset-4 py-2 w-full text-center",href:"mailto:hello@tscircuit.com",children:"Contact"})]})}),u.jsx("div",{className:"flex flex-col items-center gap-4 pt-4 border-t border-gray-200",children:r?u.jsx("div",{className:"w-full flex justify-center",children:u.jsx(J,{})}):u.jsx("div",{className:"w-full flex justify-center",children:u.jsx(D,{})})})]})})]}),u.jsx(ge,{}),u.jsx(ye,{})]})};export{ie as H,at as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,l as s,B as t}from"./index-BQPj88OW.js";function r({heading:l="Page not found"}){return e.jsx("section",{className:"flex-1 flex items-center justify-center min-h-[90vh]",children:e.jsxs("div",{className:"container px-4 md:px-6 py-12 flex flex-col items-center text-center max-w-3xl",children:[e.jsx("div",{className:"mb-8 flex flex-col items-center justify-center",children:e.jsx("div",{className:"mb-2",children:e.jsx("span",{className:"text-3xl font-bold text-white bg-blue-500 px-4 py-2 rounded-md shadow-md inline-block",children:"404"})})}),e.jsx("h1",{className:"text-4xl font-extrabold tracking-tight lg:text-5xl mb-4",children:l}),e.jsx("p",{className:"text-xl text-muted-foreground mb-8",children:"The page you're looking for doesn't exist or has been moved to another address."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsx(s,{href:"/",children:e.jsx(t,{size:"lg",className:"bg-blue-500 hover:bg-blue-600",children:"Return Home"})}),e.jsx(s,{href:"/search",children:e.jsx(t,{size:"lg",variant:"outline",children:"Search Packages"})})]})]})})}export{r as N};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as N,j as s,B as w,P as b,l as _}from"./index-BQPj88OW.js";import{D as v,h as C,i as k,j as m}from"./Analytics-DIw7l2gi.js";import{G as D,t as S}from"./timeAgo-VY0F2EV9.js";import{u as P,S as y}from"./PackageCard-ejE2dLlA.js";import{G,U as M}from"./GithubAvatarWithFallback-CQhrBiKP.js";import{E as O}from"./tooltip-C1pwvC0K.js";import{S as $}from"./settings-B2bMEtS4.js";import{L as F}from"./lock-BOZRJdUv.js";const V=({organization:e,showMembers:d=!0,showStats:o=!0,onClick:l,className:x="",withLink:t=!0,renderActions:c})=>{var i;const{copyToClipboard:h}=P(),{session:r}=N(),p=e.owner_account_id===(r==null?void 0:r.account_id)||((i=e.user_permissions)==null?void 0:i.can_manage_org),j=a=>{l&&!t&&(a.preventDefault(),l(e))},u=a=>{a.preventDefault(),a.stopPropagation();const g=`${window.location.origin}/${e.name}`;h(g)},f=a=>{a.preventDefault(),a.stopPropagation(),window.location.href=e.is_personal_org?"/settings":`/${e.name}/settings`},n=s.jsx("div",{className:`border p-4 rounded-md hover:shadow-md transition-shadow flex flex-col gap-4 h-full ${x}`,onClick:j,children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx(G,{username:e.is_personal_org?e.github_handle||e.name:e.github_handle,fallback:e.name,fallbackClassName:" font-semibold text-lg",size:40})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex justify-between items-start mb-1",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx("h2",{className:"text-md font-semibold text-gray-900 truncate pr-8",children:e.name})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(v,{children:[s.jsx(C,{asChild:!0,children:s.jsx(w,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:a=>a.stopPropagation(),children:s.jsx(O,{className:"h-4 w-4"})})}),s.jsxs(k,{align:"end",children:[s.jsxs(m,{className:"text-xs cursor-pointer",onClick:u,children:[s.jsx(y,{className:"mr-2 h-3 w-3"}),"Share Organization"]}),p&&s.jsxs(m,{className:"text-xs cursor-pointer",onClick:f,children:[s.jsx($,{className:"mr-2 h-3 w-3"}),"Organization Settings"]})]})]}),c&&c(e)]})]}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500 mb-1",children:[s.jsx("div",{className:"flex items-center gap-1",children:e.is_personal_org?s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"h-3 w-3"}),s.jsx("span",{children:"Personal"})]}):s.jsxs(s.Fragment,{children:[s.jsx(D,{className:"h-3 w-3"}),s.jsx("span",{children:"Public"})]})}),o&&s.jsxs(s.Fragment,{children:[d&&!e.is_personal_org&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(M,{className:"h-3 w-3"}),s.jsxs("span",{children:[e.member_count," members"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(b,{className:"h-3 w-3"}),s.jsxs("span",{children:[e.package_count," packages"]})]})]})]}),s.jsx("div",{className:"text-xs text-gray-400",children:s.jsxs("span",{children:["Created ",S(new Date(e.created_at))]})})]})]})});return t?s.jsx(_,{href:`/${e.name}`,className:"block h-full",children:n},e.org_id):n};export{V as O};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{k as a,j as s,l}from"./index-BQPj88OW.js";import{B as m,l as t,m as i,n as c,o as n,p as h}from"./use-package-builds-Bx8rfxi1.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=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],p=a("git-commit-horizontal",o);function y({author:x,packageName:e,unscopedName:j,currentPage:r,releaseVersion:d}){return s.jsx(m,{className:"mb-4",children:s.jsxs(t,{children:[s.jsx(i,{children:s.jsx(c,{asChild:!0,children:s.jsx(l,{href:`/${x}`,children:x})})}),s.jsx(n,{children:s.jsx("span",{children:"/"})}),s.jsx(i,{children:s.jsx(c,{asChild:!0,children:s.jsx(l,{href:`/${e}`,children:j||e})})}),s.jsx(n,{children:s.jsx("span",{children:"/"})}),(r==="releases"||d||r==="builds")&&s.jsxs(s.Fragment,{children:[s.jsx(i,{children:r==="releases"?s.jsx(h,{children:"releases"}):s.jsx(c,{asChild:!0,children:s.jsx(l,{href:`/${e}/releases`,children:"releases"})})}),s.jsx(n,{children:s.jsx("span",{children:"/"})})]}),d&&s.jsxs(s.Fragment,{children:[s.jsx(i,{children:r==="builds"?s.jsx(c,{asChild:!0,children:s.jsx(l,{href:`/${e}/releases/${d}`,children:d})}):s.jsx(h,{children:d})}),r==="builds"&&s.jsxs(s.Fragment,{children:[s.jsx(n,{children:s.jsx("span",{children:"/"})}),s.jsx(i,{children:s.jsx(h,{children:"builds"})})]})]}),r&&!["releases","builds"].includes(r)&&s.jsx(i,{children:s.jsx(h,{children:r})})]})})}export{p as G,y as P};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{k as l,j as e,n as b,H as h,b as _,ah as T,B as C,ai as P,l as k}from"./index-BQPj88OW.js";import{l as $,D as S,h as D,i as I,j as x}from"./Analytics-DIw7l2gi.js";import{T as M,a as L,b as E,c as B,E as q,P as F}from"./tooltip-C1pwvC0K.js";import{L as U}from"./layers-BJ1iwaVM.js";import{G as A,t as G}from"./timeAgo-VY0F2EV9.js";import{T as R}from"./trash-2-BW3eClHz.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 V=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],z=l("box",V);/**
|
|
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 H=[["path",{d:"M16.466 7.5C15.643 4.237 13.952 2 12 2 9.239 2 7 6.477 7 12s2.239 10 5 10c.342 0 .677-.069 1-.2",key:"10n0gc"}],["path",{d:"m15.194 13.707 3.814 1.86-1.86 3.814",key:"16shm9"}],["path",{d:"M19 15.57c-1.804.885-4.274 1.43-7 1.43-5.523 0-10-2.239-10-5s4.477-5 10-5c4.838 0 8.873 1.718 9.8 4",key:"1lxi77"}]],Z=l("rotate-3d",H);/**
|
|
12
|
-
* @license lucide-react v0.488.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const J=[["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"}]],K=l("share-2",J),ie=()=>e.jsx("div",{className:"border p-4 rounded-md animate-pulse",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"h-16 w-16 flex-shrink-0 rounded-md bg-slate-200"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-5 bg-slate-200 rounded w-3/4 mb-2"}),e.jsx("div",{className:"h-4 bg-slate-200 rounded w-1/2 mb-2"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"h-3 bg-slate-200 rounded w-16"}),e.jsx("div",{className:"h-3 bg-slate-200 rounded w-16"})]})]})]})}),m={board:e.jsx(h,{className:"w-4 h-4"}),package:e.jsx(z,{className:"w-4 h-4"}),footprint:e.jsx(U,{className:"w-4 h-4"}),model:e.jsx(Z,{className:"w-4 h-4"})},O={board:"text-blue-500",package:"text-green-500",footprint:"text-purple-500",model:"text-indigo-500"},Q={board:"Board",package:"Package",footprint:"Footprint",model:"Model"},W=({type:s,className:t})=>!s||!(s in m)?null:e.jsx(M,{children:e.jsxs(L,{children:[e.jsx(E,{asChild:!0,children:e.jsx("span",{className:b("flex items-center",O[s],t),children:m[s]})}),e.jsx(B,{children:e.jsx("p",{children:Q[s]})})]})}),X=()=>{const{toast:s}=$();return{copyToClipboard:_.useCallback(async i=>{try{await navigator.clipboard.writeText(i),s({title:"Copied to clipboard!",description:"The text has been copied successfully."})}catch{s({title:"Failed to copy",description:"There was an error copying the text."})}},[s])}},Y=(s,t="pcb")=>{switch(t){case"schematic":return s.latest_sch_preview_image_url;case"3d":return s.latest_cad_preview_image_url;default:return s.latest_pcb_preview_image_url}},le=({pkg:s,showOwner:t=!1,isCurrentUserPackage:i=!1,onDeleteClick:r,className:p="",imageSize:u="h-16 w-16",imageTransform:j="transition-transform duration-300 -rotate-45 hover:rotate-0 hover:scale-110 scale-150",withLink:f=!0,renderActions:n})=>{const g=a=>{a.preventDefault(),r&&r(a,s)},{copyToClipboard:w}=X(),y=a=>{a.preventDefault();const c=`${window.location.origin}/${s.name}`;w(c)},v=["pcb","schematic","assembly","3d"],N=Y(s,s.default_view),o=e.jsx("div",{className:`border p-4 rounded-md hover:shadow-md transition-shadow flex flex-col gap-4 ${p}`,children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsxs("div",{className:`${u} flex-shrink-0 rounded-md overflow-hidden bg-gray-50 border flex items-center justify-center`,children:[e.jsx("img",{src:String(N),alt:`${s.unscoped_name} ${v.includes(s.default_view||"")?s.default_view:"3D"} view`,className:`object-cover h-full w-full ${j}`,onError:a=>{var c,d;a.currentTarget.style.display="none",(c=a.currentTarget.nextElementSibling)==null||c.classList.remove("hidden"),(d=a.currentTarget.nextElementSibling)==null||d.classList.add("flex")}}),e.jsx("div",{className:"hidden items-center justify-center h-full w-full",children:e.jsx(h,{className:"w-6 h-6 text-gray-300"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex justify-between items-start mb-[2px] -mt-[3px]",children:[e.jsxs("h2",{className:"text-md font-semibold truncate pr-[30px]",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-700 text-md",children:s.owner_github_username}),e.jsx("span",{className:"mx-1",children:"/"})]}),e.jsx("span",{className:"text-gray-900",children:s.unscoped_name})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{type:s.snippet_type,className:"pt-[2.5px]"}),e.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[e.jsx(T,{className:"w-4 h-4 pt-[2.5px]"}),e.jsx("span",{className:"text-[16px]",children:s.star_count||0})]}),e.jsxs(S,{children:[e.jsx(D,{asChild:!0,children:e.jsx(C,{variant:"ghost",size:"icon",className:"h-[1.5rem] w-[1.5rem]",children:e.jsx(q,{className:"h-4 w-4"})})}),e.jsxs(I,{children:[e.jsxs(x,{className:"text-xs cursor-pointer",onClick:y,children:[e.jsx(K,{className:"mr-2 h-3 w-3"}),"Share Package"]})," ",i&&r&&e.jsxs(x,{className:"text-xs text-red-600",onClick:g,children:[e.jsx(R,{className:"mr-2 h-3 w-3"}),"Delete Package"]})]})]}),n&&n(s)]})]}),e.jsx("p",{className:`${!s.description&&"h-[1.25rem]"} text-sm text-gray-500 mb-1 truncate max-w-xs`,children:s.description?s.description:" "}),e.jsxs("div",{className:"flex items-center gap-4",children:[s.is_private?e.jsxs("div",{className:"flex items-center text-xs gap-1 text-gray-500",children:[e.jsx(P,{height:12,width:12}),e.jsx("span",{children:"Private"})]}):e.jsxs("div",{className:"flex items-center text-xs gap-1 text-gray-500",children:[e.jsx(A,{height:12,width:12}),e.jsx("span",{children:"Public"})]}),e.jsxs("div",{className:"flex items-center text-xs gap-1 text-gray-500",children:[e.jsx(F,{height:12,width:12}),e.jsx("span",{children:G(new Date(s.updated_at))})]})]})]})]})});return f?e.jsx(k,{href:`/${s.name}`,children:o},s.package_id):o};export{z as B,ie as P,K as S,le as a,X as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s,q as t}from"./index-BQPj88OW.js";import{P as c,a as x}from"./PackageCard-ejE2dLlA.js";const i=({packages:e})=>s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(a=>s.jsx(x,{pkg:a,showOwner:!0},a.package_id))}),n=()=>s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((e,a)=>s.jsx(c,{},a))}),m=()=>s.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 p-6 rounded-xl shadow-sm max-w-2xl mx-auto",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"mr-4 bg-red-100 p-2 rounded-full",children:s.jsx(t,{className:"w-6 h-6 text-red-600"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Error Loading packages"}),s.jsx("p",{className:"text-red-600",children:"We couldn't load the trending packages. Please try again later."})]})]})}),o=({message:e})=>s.jsxs("div",{className:"text-center py-12 px-4",children:[s.jsx("div",{className:"bg-slate-50 inline-flex rounded-full p-4 mb-4",children:s.jsx(t,{className:"w-8 h-8 text-slate-400"})}),s.jsx("h3",{className:"text-xl font-medium text-slate-900 mb-2",children:"No Matching Packages"}),e&&s.jsx("p",{className:"text-slate-500 max-w-md mx-auto mb-6",children:e})]}),j=({isLoading:e,error:a,filteredPackages:r,apiBaseUrl:l,emptyStateMessage:d})=>e?s.jsx(n,{}):a?s.jsx(m,{}):r!=null&&r.length?s.jsx(i,{packages:r,baseUrl:l}):s.jsx(o,{message:d});export{n as L,j as P};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{k as ie,j as e,n as L,L as oe,l as k,u as U,b as g,m as C,B as A,w as D,G as de}from"./index-BQPj88OW.js";import{H as $}from"./Header-CI4GZVOv.js";import{F as B}from"./Footer-DU-HdqGk.js";import{u as me,g as xe,R as ue,O as ge,B as he}from"./role-badge-BGF_IMlO.js";import{A as T,e as G,g as V,u as R,I as H,S as pe}from"./Analytics-DIw7l2gi.js";import{t as je}from"./timeAgo-VY0F2EV9.js";import{U as fe}from"./GithubAvatarWithFallback-CQhrBiKP.js";import{P as Q,a as I,B as W}from"./PackageCard-ejE2dLlA.js";import{T as Z,a as E,b as f}from"./tabs-Ce0NFuwd.js";import{S as Y,a as q,b as J,c as K,d as m}from"./select-BN8AF1J7.js";import{u as be,a as Ne}from"./use-list-user-orgs-CgJIT7N4.js";import{NotFoundPage as X}from"./404-CnNkOMw-.js";import{C as ee}from"./card-CzXDit7x.js";import{B as ve}from"./badge-Bk-k6kyg.js";import{f as _e,G as ye}from"./formatTimeAgo-CawXna5h.js";import{u as we,g as ke,S as Ce,a as Le,b as Se}from"./use-package-builds-Bx8rfxi1.js";import{G as ze}from"./github-DjKGjbX1.js";import{O as Pe}from"./OrganizationCard-Bs2dw-AL.js";import{F as Ae}from"./main-DPEM9abA.js";import{u as Oe}from"./use-organization-XwYYTFck.js";import"./settings-B2bMEtS4.js";import"./use-packages-base-api-url-DA1hucM7.js";import"./tooltip-C1pwvC0K.js";import"./layers-BJ1iwaVM.js";import"./trash-2-BW3eClHz.js";import"./use-delete-package-DLKtoTOj.js";import"./Header2-CrMDmo3P.js";import"./NotFound-DaXtEPsC.js";import"./FileSaver.min-BDsOlqKl.js";import"./circle-alert-Du9-4of0.js";import"./circle-check-big-KaRyRsht.js";import"./lock-BOZRJdUv.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 Fe=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Me=ie("rocket",Fe),Ue=({organization:a,className:t})=>{const{data:s=[],isLoading:l}=me({orgId:a.org_id});return l?e.jsxs("div",{className:L("bg-white rounded-lg border border-gray-200 p-4 sm:p-6",t),children:[e.jsx("div",{className:"mb-4",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 flex items-center gap-2",children:"Members"})}),e.jsxs("div",{className:"text-center py-20 text-gray-500 grid place-items-center",children:[e.jsx(oe,{className:"w-8 h-8 text-blue-600 dark:text-blue-400 animate-spin"}),e.jsx("p",{className:"mt-2 text-sm select-none",children:"Loading members..."})]})]}):e.jsxs("div",{className:L("bg-white rounded-lg border border-gray-200 p-4 sm:p-6",t),children:[e.jsx("div",{className:"mb-4",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 flex items-center gap-2",children:["Members (",s.length,")"]})}),e.jsx("div",{className:"space-y-2 sm:space-y-3",children:s.map(n=>{const i=xe(a,n.account_id);return e.jsx(k,{href:`/${n.github_username}`,className:"block",children:e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsxs(T,{className:"h-10 w-10 sm:h-12 sm:w-12 flex-shrink-0",children:[e.jsx(G,{src:`https://github.com/${n.github_username}.png`,alt:`${n.github_username} avatar`}),e.jsx(V,{className:"text-sm font-medium",children:n.github_username.split(" ").map(h=>h[0]).join("").toUpperCase().slice(0,2)})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{className:"font-medium text-gray-900 truncate",children:n.github_username}),e.jsx(ue,{role:i})]}),e.jsxs("p",{className:"text-sm text-gray-500 truncate",children:["@",n.github_username]})]})]}),n.joined_at&&e.jsx("div",{className:"text-right flex-shrink-0 hidden sm:block",children:e.jsxs("p",{className:"text-xs text-gray-500",children:["Joined ",je(new Date(n.joined_at))]})})]})},n.account_id||n.github_username)})}),s.length===0&&e.jsxs("div",{className:"text-center py-6 sm:py-8 text-gray-500",children:[e.jsx(fe,{className:"h-10 w-10 sm:h-12 sm:w-12 mx-auto mb-3 text-gray-300"}),e.jsx("p",{className:"text-sm sm:text-base",children:"No members found"})]})]})},De=({org:a})=>{var p;const t=U(o=>o.session),s=R(),[l,n]=g.useState(""),[i,h]=g.useState("packages"),[b,S]=g.useState("most-recent"),[v,_]=g.useState(!1),y=(t==null?void 0:t.account_id)===a.owner_account_id,{data:N,isLoading:z}=C(["userPackages",a.name],async()=>(await s.post("/packages/list",{owner_github_username:a.name})).data.packages,{enabled:!!a.name,refetchOnWindowFocus:!1}),c=(p=N==null?void 0:N.filter(o=>!l||o.unscoped_name.toLowerCase().includes(l.toLowerCase().trim())))==null?void 0:p.sort((o,x)=>{switch(b){case"most-recent":return x.updated_at.localeCompare(o.updated_at);case"least-recent":return o.updated_at.localeCompare(x.updated_at);case"most-starred":return(x.star_count||0)-(o.star_count||0);case"a-z":return o.unscoped_name.localeCompare(x.unscoped_name);case"z-a":return x.unscoped_name.localeCompare(o.unscoped_name);default:return 0}});return e.jsxs("div",{className:"min-h-screen",children:[e.jsx($,{}),e.jsx(ge,{organization:a,isCurrentUserOrganization:y}),e.jsx("div",{className:"container mx-auto px-4 py-8",children:e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:"w-full",children:[e.jsx(Z,{defaultValue:"packages",onValueChange:h,className:"mb-6",children:e.jsxs(E,{children:[e.jsx(f,{value:"packages",className:"flex items-center gap-2",children:"Packages"}),e.jsx(f,{value:"members",className:"flex items-center gap-2",children:"Members"})]})}),i==="packages"&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 mb-6",children:[e.jsx(H,{type:"text",placeholder:"Search packages...",value:l,onChange:o=>n(o.target.value),className:"flex-1"}),e.jsxs(Y,{value:b,onValueChange:S,children:[e.jsx(q,{className:"w-full sm:w-[180px]",children:e.jsx(J,{placeholder:"Sort by"})}),e.jsxs(K,{children:[e.jsx(m,{value:"most-recent",children:"Most Recent"}),e.jsx(m,{value:"least-recent",children:"Least Recent"}),e.jsx(m,{value:"most-starred",children:"Most Starred"}),e.jsx(m,{value:"a-z",children:"A-Z"}),e.jsx(m,{value:"z-a",children:"Z-A"})]})]})]}),z?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((o,x)=>e.jsx(Q,{},x))}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:(c==null?void 0:c.length)!==0?c==null?void 0:c.map(o=>e.jsx(I,{pkg:o,showOwner:!1,isCurrentUserPackage:y},o.package_id)):e.jsx("div",{className:"col-span-full flex justify-center",children:e.jsxs("div",{className:"flex flex-col items-center py-20 text-gray-500",children:[e.jsx(W,{className:"mb-2",size:24}),e.jsx("span",{className:"text-lg font-medium",children:l.trim()?`No packages matching '${l.trim()}'`:"No packages available"})]})})})]}),i==="members"&&e.jsx("div",{children:e.jsx(Ue,{organization:a})})]})})}),e.jsx(B,{})]})},$e=()=>e.jsxs(ee,{className:L("group relative overflow-hidden","border border-gray-200","hover:border-gray-300","bg-white shadow-none","p-6","flex flex-col","min-h-[200px]","animate-pulse"),children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx("div",{className:"h-6 w-32 bg-gray-200 rounded"})}),e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("div",{className:"w-16 h-5 bg-gray-200 rounded-full"}),e.jsx("div",{className:"w-4 h-4 bg-gray-200 rounded-full"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-4 h-4 bg-gray-200 rounded"}),e.jsx("div",{className:"w-48 h-5 bg-gray-200 rounded"})]}),e.jsxs("div",{className:"mb-6 flex-1",children:[e.jsx("div",{className:"h-5 w-3/4 bg-gray-200 rounded mb-2"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"w-3 h-3 bg-gray-200 rounded"}),e.jsx("div",{className:"w-16 h-4 bg-gray-200 rounded-full"})]})]})]}),e.jsxs("div",{className:"flex gap-2 w-full mt-auto",children:[e.jsx("div",{className:"w-full h-9 bg-gray-200 rounded"}),e.jsx("div",{className:"w-full h-9 bg-gray-200 rounded"})]})]}),Be=a=>{const{data:t,isLoading:s}=Le(a),{data:l,isLoading:n}=Se((t==null?void 0:t.latest_package_build_id)||null);return{data:l,isLoading:s||(t==null?void 0:t.latest_package_build_id)&&n}},Te=({pkg:a,className:t})=>{const{data:s,isLoading:l}=Be(a.package_id),{data:n}=we(s==null?void 0:s.package_release_id);if(l&&!s)return e.jsx($e,{});const{status:i,label:h}=s?ke(s):{status:"pending",label:"Pending"};return e.jsxs(ee,{className:L("group relative overflow-hidden","border border-gray-200","hover:border-gray-300","bg-white shadow-none","p-6","flex flex-col","min-h-[200px]",t),children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(k,{href:`/${a.name}`,className:"text-lg font-semibold text-gray-900 hover:text-blue-600 transition-colors",children:a.unscoped_name})}),e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx(ve,{variant:i==="success"?"default":i==="error"?"destructive":"secondary",className:"text-xs flex items-center",children:h}),e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Ce,{status:i})})]})]}),e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(ze,{className:"w-4 h-4 text-gray-600"}),e.jsx("a",{href:`https://github.com/${a.github_repo_full_name}`,className:"text-sm font-medium text-gray-700 hover:text-blue-600 transition-colors",children:a.github_repo_full_name})]}),e.jsxs("div",{className:"mb-6 flex-1",children:[(n==null?void 0:n.commit_message)&&e.jsx("h4",{title:n.commit_message,className:"text-sm font-medium truncate text-gray-900 mb-2",children:n.commit_message}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[e.jsxs("span",{children:[_e(String(s==null?void 0:s.created_at))," on"]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(ye,{className:"w-3 h-3"}),e.jsx("span",{className:"bg-blue-100 text-blue-800 px-2 py-0.5 rounded-full font-medium",children:(n==null?void 0:n.branch_name)||"main"})]})]})]}),e.jsxs("div",{className:"flex gap-2 w-full mt-auto",children:[e.jsx(k,{className:"w-full",href:`/${a.name}/releases`,children:e.jsx(A,{size:"sm",className:"bg-blue-600 w-full hover:bg-blue-700 text-white px-4 py-2",children:"View"})}),(s==null?void 0:s.preview_url)&&(s==null?void 0:s.package_build_id)&&i==="success"&&e.jsx(k,{className:"w-full",href:`/${a.name}/releases/${s.package_release_id}/preview`,children:e.jsx(A,{size:"sm",variant:"outline",className:"px-4 py-2 w-full",children:"Preview"})})]})]})},Ge=({packages:a})=>a.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-black",children:[e.jsx(Me,{className:"w-12 h-12 mb-4 text-black"}),e.jsx("h3",{className:"text-xl font-semibold mb-3",children:"No Connected Repositories"}),e.jsx("p",{className:"text-sm text-center max-w-md text-gray-600",children:"Connect your GitHub repositories to start building and deploying your circuits. Your connected repositories and builds will appear here."})]}):e.jsx("div",{className:"space-y-4",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:a.map(t=>e.jsx(Te,{pkg:t},t.package_id))})}),Ve=()=>{var O,F,M;const{username:a}=D(),t=R(),{data:s}=be(a),[l,n]=g.useState(""),[i,h]=g.useState("all"),[b,S]=g.useState("most-recent"),v=U(r=>r.session),{data:_,error:y,isLoading:N,isFetched:z}=C(["account",a],async()=>(await t.post("/accounts/get",{github_username:a})).data,{retry:!1,refetchOnWindowFocus:!1}),c=((O=_==null?void 0:_.account)==null?void 0:O.github_username)||a,p=c===(v==null?void 0:v.github_username),{Dialog:o,openDialog:x}=Ne(),[w,se]=g.useState(null),{data:d,isLoading:ae,refetch:re}=C(["userPackages",c],async()=>(await t.post("/packages/list",{owner_github_username:c})).data.packages,{enabled:!!c,refetchOnWindowFocus:!1}),{data:te,isLoading:ne}=C(["starredPackages",c],async()=>(await t.post("/packages/list",{starred_by:c})).data.packages,{enabled:i==="starred"&&!!c,refetchOnWindowFocus:!1});if(!z)return null;if(y)return e.jsx(X,{heading:"User Not Found"});const P=i==="starred"?te:d,le=N||(i==="starred"?ne:ae),j=(F=P==null?void 0:P.filter(r=>!l||r.unscoped_name.toLowerCase().includes(l.toLowerCase().trim())))==null?void 0:F.sort((r,u)=>{switch(b){case"most-recent":return u.updated_at.localeCompare(r.updated_at);case"least-recent":return r.updated_at.localeCompare(u.updated_at);case"most-starred":return(u.star_count||0)-(r.star_count||0);case"a-z":return r.unscoped_name.localeCompare(u.unscoped_name);case"z-a":return u.unscoped_name.localeCompare(r.unscoped_name);default:return 0}}),ce=(r,u)=>{r.preventDefault(),se(u),x()};return e.jsxs("div",{children:[e.jsx($,{}),e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsxs(T,{className:"h-16 w-16",children:[e.jsx(G,{src:`https://github.com/${c}.png?size=300`,draggable:!1}),e.jsx(V,{className:"select-none",children:(M=c==null?void 0:c[0])==null?void 0:M.toUpperCase()})]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold",children:p?"My Profile":`${c}'s Profile`}),e.jsxs("div",{className:"text-gray-600 mt-1",children:[(d==null?void 0:d.length)||0," packages"]})]})]}),e.jsx("div",{className:"mb-6",children:e.jsx("a",{href:`https://github.com/${c}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center",children:e.jsxs(A,{variant:"outline",children:[e.jsx(de,{className:"mr-2"}),"View GitHub Profile"]})})}),e.jsx(Z,{defaultValue:"all",onValueChange:h,className:"mb-4 select-none overflow-x-auto no-scrollbar",children:e.jsxs(E,{children:[e.jsx(f,{value:"all",children:"Packages"}),e.jsx(f,{value:"starred",children:"Starred Packages"}),s&&s.length>0&&e.jsx(f,{value:"organizations",children:"Organizations"}),p&&((d==null?void 0:d.filter(r=>!!r.github_repo_full_name))??[]).length>0&&e.jsx(f,{value:"repos",children:"Connected Repositories"})]})}),i!=="repos"&&e.jsxs("div",{className:"flex gap-4 mb-4",children:[e.jsx(H,{type:"text",placeholder:"Searching User Packages...",value:l,onChange:r=>n(r.target.value),className:"mb-4"}),e.jsxs(Y,{value:b,onValueChange:S,children:[e.jsx(q,{className:"w-[180px]",children:e.jsx(J,{placeholder:"Sort by"})}),e.jsxs(K,{children:[e.jsx(m,{value:"most-recent",children:"Most Recent"}),e.jsx(m,{value:"least-recent",children:"Least Recent"}),e.jsx(m,{value:"most-starred",children:"Most Starred"}),e.jsx(m,{value:"a-z",children:"A-Z"}),e.jsx(m,{value:"z-a",children:"Z-A"})]})]})]}),i==="repos"?e.jsx(Ge,{packages:(d==null?void 0:d.filter(r=>!!r.github_repo_full_name))??[]}):i==="organizations"?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:s&&s.length>0?s==null?void 0:s.filter(r=>!(!p&&r.is_personal_org)).map(r=>e.jsx(Pe,{organization:r,withLink:!0,showStats:!0,showMembers:!0,className:"p-3"},r.org_id)):e.jsx("div",{className:"col-span-full flex justify-center",children:e.jsxs("div",{className:"flex flex-col items-center py-12 text-gray-500",children:[e.jsx(he,{className:"mb-2",size:24}),e.jsx("span",{className:"text-lg font-medium",children:"No organizations"}),e.jsx("span",{className:"text-sm",children:"You're not a member of any organizations yet."})]})})}):le?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((r,u)=>e.jsx(Q,{},u))}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:(j==null?void 0:j.length)!==0?j==null?void 0:j.map(r=>e.jsx(I,{pkg:r,showOwner:i==="starred",isCurrentUserPackage:p&&i==="all",onDeleteClick:ce},r.package_id)):e.jsx("div",{className:"col-span-full flex justify-center",children:e.jsx("div",{className:"flex flex-col items-center py-20 text-gray-500",children:i==="starred"?e.jsxs(e.Fragment,{children:[e.jsx(pe,{className:"mb-2",size:24}),e.jsx("span",{className:"text-lg font-medium",children:l.trim()?`No starred packages matching '${l.trim()}'`:"No starred packages"})]}):e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"mb-2",size:24}),e.jsx("span",{className:"text-lg font-medium",children:l.trim()?`No packages matching '${l.trim()}'`:"No packages available"})]})})})})]}),w&&e.jsx(o,{packageId:w.package_id,packageName:w.unscoped_name,packageOwner:w.owner_github_username??"",refetchUserPackages:re}),e.jsx(B,{})]})},Ns=()=>{const{username:a}=D(),{organization:t,isLoading:s,error:l}=Oe({orgName:a});return a?s?e.jsx(Ae,{}):t&&!t.is_personal_org&&!l?e.jsx(De,{org:t}):e.jsx(Ve,{}):e.jsx(X,{heading:"Username Not Provided"})};export{Ns as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bG as x,b as o,j as s,bH as N,bI as d,n as l,bJ as i,bK as r,bL as n,bM as m,bN as c,bO as f}from"./index-BQPj88OW.js";const v=x,g=N,p=o.forwardRef(({className:a,...e},t)=>s.jsx(f,{className:l("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e,ref:t}));p.displayName=f.displayName;const b=o.forwardRef(({className:a,...e},t)=>s.jsxs(g,{children:[s.jsx(p,{}),s.jsx(d,{ref:t,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-slate-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-slate-800 dark:bg-slate-950",a),...e})]}));b.displayName=d.displayName;const y=({className:a,...e})=>s.jsx("div",{className:l("flex flex-col space-y-2 text-center sm:text-left",a),...e});y.displayName="AlertDialogHeader";const A=({className:a,...e})=>s.jsx("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});A.displayName="AlertDialogFooter";const u=o.forwardRef(({className:a,...e},t)=>s.jsx(i,{ref:t,className:l("text-lg font-semibold",a),...e}));u.displayName=i.displayName;const D=o.forwardRef(({className:a,...e},t)=>s.jsx(r,{ref:t,className:l("text-sm text-slate-500 dark:text-slate-400",a),...e}));D.displayName=r.displayName;const j=o.forwardRef(({className:a,...e},t)=>s.jsx(c,{ref:t,className:l(m(),a),...e}));j.displayName=c.displayName;const w=o.forwardRef(({className:a,...e},t)=>s.jsx(n,{ref:t,className:l(m({variant:"outline"}),"mt-2 sm:mt-0",a),...e}));w.displayName=n.displayName;export{v as A,b as a,y as b,u as c,D as d,A as e,w as f,j as g};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{j as e,h,u as g,b as u,L as f}from"./index-BQPj88OW.js";import{H as j}from"./Header-CI4GZVOv.js";import{F as p}from"./Footer-DU-HdqGk.js";import{C as b}from"./circle-alert-Du9-4of0.js";import{C as y}from"./circle-check-big-KaRyRsht.js";import"./Analytics-DIw7l2gi.js";import"./use-packages-base-api-url-DA1hucM7.js";const w=(r,n)=>{if(r)try{const t=decodeURIComponent(r);if(t.startsWith("/")){window.location.href=t;return}const s=new URL(t);if(s.origin===window.location.origin){window.location.href=s.href;return}}catch{console.warn("Invalid redirect URL:",r)}n()},N=()=>{const[r,n]=h(),t=g(c=>c.setSession),[s,m]=u.useState("logging you in..."),o=new URLSearchParams(window.location.search.split("?")[1]),x=o.get("session_token"),l=o.get("redirect"),i=s.includes("error")||s.includes("couldn't"),a=s.includes("success")||s.includes("redirecting");return u.useEffect(()=>{async function c(){{t({account_id:"account-1234",github_username:"testuser",token:"1234",session_id:"session-1234"}),w(l,()=>n("/"));return}}c().catch(d=>{m(`error logging you in: ${d.message||d.toString()}`)})},[x,l]),e.jsxs("div",{className:"min-h-screen bg-white flex items-center justify-center px-4",children:[e.jsxs("div",{className:"w-full max-w-md",children:[e.jsx("div",{className:"bg-gray-50/20 rounded-2xl shadow-xl border border-gray-200 p-8",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-6",children:i?e.jsx("div",{className:"mx-auto w-16 h-16 bg-red-100 rounded-full flex items-center justify-center",children:e.jsx(b,{className:"h-8 w-8 text-red-500"})}):a?e.jsx("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center",children:e.jsx(y,{className:"h-8 w-8 text-green-500"})}):e.jsx("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center",children:e.jsx(f,{className:"h-8 w-8 text-blue-500 animate-spin"})})}),e.jsx("h1",{className:"text-2xl font-semibold text-gray-900 mb-3",children:i?"Authentication Failed":a?"Success!":"Signing You In"}),e.jsx("div",{className:"text-gray-600",children:i?e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-left",children:[e.jsx("p",{className:"text-red-800 font-medium mb-2",children:"Authentication Error"}),e.jsx("p",{className:"text-red-700 text-sm break-words",children:s}),e.jsx("div",{className:"mt-4 pt-3 border-t border-red-200",children:e.jsx("p",{className:"text-red-600 text-xs",children:"Please try signing in again or contact support if the problem persists."})})]}):a?e.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[e.jsx("p",{className:"text-green-800 font-medium",children:"Authentication successful!"}),e.jsx("p",{className:"text-green-700 text-sm mt-1",children:"Redirecting you now..."})]}):e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-600 mb-4",children:"Please wait while we authenticate your account and redirect you to your destination."}),e.jsxs("div",{className:"flex items-center justify-center text-sm text-gray-500",children:[e.jsxs("div",{className:"flex space-x-1",children:[e.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-bounce"}),e.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),e.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]}),e.jsx("span",{className:"ml-2",children:"Processing"})]})]})})]})}),e.jsxs("div",{className:"text-center mt-6 text-xs text-gray-500",children:["If you encounter any issues, please report them on our"," ",e.jsx("a",{href:"https://github.com/tscircuit/tscircuit/issues",className:"text-blue-500 underline",children:"GitHub Issues page"}),"."]})]}),e.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
2
|
-
@keyframes pulse-loading {
|
|
3
|
-
0% {
|
|
4
|
-
width: 0%;
|
|
5
|
-
}
|
|
6
|
-
50% {
|
|
7
|
-
width: 60%;
|
|
8
|
-
}
|
|
9
|
-
100% {
|
|
10
|
-
width: 100%;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
.animate-pulse-loading {
|
|
14
|
-
animation: pulse-loading 2s ease-in-out infinite;
|
|
15
|
-
}
|
|
16
|
-
`}})]})},_=()=>e.jsxs("div",{children:[e.jsx(j,{}),e.jsx(N,{}),e.jsx(p,{})]});export{_ as AuthorizePage,_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,n as s,al as d}from"./index-BQPj88OW.js";const o=d("inline-flex items-center rounded-md border border-slate-200 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 dark:border-slate-800 dark:focus:ring-slate-300",{variants:{variant:{default:"border-transparent bg-slate-900 text-slate-50 shadow hover:bg-slate-900/80 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/80",secondary:"border-transparent bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",destructive:"border-transparent bg-red-500 text-slate-50 shadow hover:bg-red-500/80 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/80",outline:"text-slate-950 dark:text-slate-50"}},defaultVariants:{variant:"default"}});function l({className:e,variant:t,...a}){return r.jsx("div",{className:s(o({variant:t}),e),...a})}export{l as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r,j as t,n as d}from"./index-BQPj88OW.js";const o=r.forwardRef(({className:a,...e},s)=>t.jsx("div",{ref:s,className:d("rounded-xl border border-slate-200 bg-white text-slate-950 shadow dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",a),...e}));o.displayName="Card";const l=r.forwardRef(({className:a,...e},s)=>t.jsx("div",{ref:s,className:d("flex flex-col space-y-1.5 p-6",a),...e}));l.displayName="CardHeader";const i=r.forwardRef(({className:a,...e},s)=>t.jsx("h3",{ref:s,className:d("font-semibold leading-none tracking-tight",a),...e}));i.displayName="CardTitle";const n=r.forwardRef(({className:a,...e},s)=>t.jsx("p",{ref:s,className:d("text-sm text-slate-500 dark:text-slate-400",a),...e}));n.displayName="CardDescription";const c=r.forwardRef(({className:a,...e},s)=>t.jsx("div",{ref:s,className:d("p-6 pt-0",a),...e}));c.displayName="CardContent";const p=r.forwardRef(({className:a,...e},s)=>t.jsx("div",{ref:s,className:d("flex items-center p-6 pt-0",a),...e}));p.displayName="CardFooter";export{o as C,c as a,l as b,i as c};
|
|
@@ -1,6 +0,0 @@
|
|
|
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 c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=e("circle-alert",c);export{y as C};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{k as c}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:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],t=c("circle-check-big",e);export{t as C};
|
|
@@ -1,6 +0,0 @@
|
|
|
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 t=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],d=e("cpu",t);export{d as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as N,v as w,h as v,b as u,j as e,B as O,z as f}from"./index-BQPj88OW.js";import{H as C}from"./main-DPEM9abA.js";import{H as E}from"./Header-CI4GZVOv.js";import{u as L,I as F}from"./Analytics-DIw7l2gi.js";import{L as S}from"./label-CTudXc4q.js";import"./use-packages-base-api-url-DA1hucM7.js";const H=({onSuccess:r}={})=>{const s=L(),l=N(a=>a.session);return w(["createOrg"],async({name:a})=>{if(!l)throw new Error("No session");const{data:{org:o}}=await s.post("/orgs/create",{name:a});if(!o)throw new Error("Failed to create organization");return o},{onSuccess:a=>{r==null||r(a)},onError:a=>{console.error("Error creating organization:",a)}})},B=()=>{const[,r]=v(),[s,l]=u.useState({name:""}),[a,o]=u.useState({}),[m,c]=u.useState(!1),{mutate:p,isLoading:d}=H({onSuccess:t=>{f.success(`Organization "${t.name||s.name}" created successfully!`),r(`/${t.name||s.name}`),c(!1)}}),j=()=>{const t={};return s.name?s.name.length>30?t.name="Organization name must be less than 30 characters":/^[a-zA-Z0-9-_]+$/.test(s.name)||(t.name="Organization name can only contain letters, numbers, hyphens, and underscores"):t.name="Organization name is required",o(t),Object.keys(t).length===0},y=async t=>{t.preventDefault(),j()&&(c(!0),p({name:s.name},{onError:n=>{var i,x,g,h,b;console.error("Failed to create organization:",n),f.error(((g=(x=(i=n==null?void 0:n.response)==null?void 0:i.data)==null?void 0:x.error)==null?void 0:g.message)||((b=(h=n==null?void 0:n.data)==null?void 0:h.error)==null?void 0:b.message)||"Failed to create organization. Please try again."),c(!1)}}))},z=t=>{const n=t.target.value;l(i=>({...i,name:n})),a.name&&o({})};return e.jsxs("div",{className:"min-h-screen bg-white",children:[e.jsxs(C,{children:[e.jsx("title",{children:"Create Organization - tscircuit"}),e.jsx("meta",{name:"description",content:"Create a new organization to collaborate with others and manage shared projects."})]}),e.jsx(E,{}),e.jsx("div",{className:"flex items-center justify-center min-h-[calc(100vh-80px)] px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"w-full max-w-lg mx-auto",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-semibold text-gray-900 mb-2",children:"Set up your organization"}),e.jsx("p",{className:"text-gray-600 text-sm",children:"Tell us about your organization"})]}),e.jsxs("form",{onSubmit:y,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(S,{htmlFor:"org-name",className:"text-sm font-semibold text-gray-900",children:["Organization Name",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(F,{spellCheck:!1,id:"org-handle",type:"text",placeholder:"tscircuit",value:s.name,onChange:z,className:`h-10 sm:h-11 ${a.name?"border-red-300 focus:border-red-500 focus:ring-red-500":"border-gray-300 focus:border-blue-500 focus:ring-blue-500"}`,disabled:m||d}),a.name&&e.jsx("p",{className:"text-sm text-red-600",children:a.name}),e.jsxs("p",{className:"text-xs text-gray-500",children:["This will be the name of your organization on tscircuit.",e.jsx("br",{}),"Your URL will be:"," ",e.jsxs("span",{className:"font-mono text-gray-700",children:["tscircuit.com/",s.name||"orgname"]})]})]}),e.jsx("div",{children:e.jsx(O,{type:"submit",disabled:m||d||!s.name,className:"w-full h-10 sm:h-11 bg-blue-600 hover:bg-blue-700 text-white font-medium text-sm sm:text-base",children:m||d?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin mr-2"}),"Creating organization..."]}):"Create organization"})})]})]})})]})};export{B as CreateOrganizationPage,B as default};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{k as N,j as e,B as u,l as h,u as C,b as x,m as g}from"./index-BQPj88OW.js";import{C as L,S as O,u as z,a as A}from"./Analytics-DIw7l2gi.js";import{H as T}from"./Header-CI4GZVOv.js";import{F}from"./Footer-DU-HdqGk.js";import{H as R}from"./main-DPEM9abA.js";import{u as I,a as U}from"./use-list-user-orgs-CgJIT7N4.js";import{P as H,a as M}from"./PackageCard-ejE2dLlA.js";import{O as $}from"./OrganizationCard-Bs2dw-AL.js";import{P as B}from"./pen-D54fxNRf.js";import"./use-packages-base-api-url-DA1hucM7.js";import"./use-delete-package-DLKtoTOj.js";import"./tooltip-C1pwvC0K.js";import"./layers-BJ1iwaVM.js";import"./timeAgo-VY0F2EV9.js";import"./trash-2-BW3eClHz.js";import"./GithubAvatarWithFallback-CQhrBiKP.js";import"./settings-B2bMEtS4.js";import"./lock-BOZRJdUv.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:"m18 15-6-6-6 6",key:"153udz"}]],V=N("chevron-up",E);/**
|
|
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 Y=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],W=N("key-round",Y),b=({title:c,packages:a=[],showAll:n=!1,onToggleShowAll:i,maxItems:o=5})=>{const d=n?a:a.slice(0,o);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-bold text-gray-700",children:c}),a.length>o&&i&&e.jsx(u,{variant:"ghost",size:"sm",onClick:i,className:"text-blue-600 hover:text-blue-700 hover:bg-transparent",children:n?e.jsxs(e.Fragment,{children:["Show less ",e.jsx(V,{className:"w-3 h-3 ml-1"})]}):e.jsxs(e.Fragment,{children:["Show more ",e.jsx(L,{className:"w-3 h-3 ml-1"})]})})]}),e.jsx("div",{className:"border-b border-gray-200"}),a&&e.jsx("ul",{className:"space-y-1 mt-2",children:d.map(l=>e.jsx("li",{children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(h,{href:`/${l.name}`,className:"text-blue-600 hover:underline text-sm",children:l.name}),l.star_count>0&&e.jsxs("span",{className:"ml-2 text-gray-500 text-xs flex items-center",children:[e.jsx(O,{className:"w-3 h-3 mr-1"}),l.star_count]})]})},l.package_id))})]})},he=()=>{const c=z(),{data:a}=I(),n=C(s=>{var t;return(t=s.session)==null?void 0:t.github_username}),i=!!n,o=A(),[d,l]=x.useState(!1),[p,w]=x.useState(!1),[m,k]=x.useState(null),{Dialog:v,openDialog:y}=U(),{data:r,isLoading:j,error:G,refetch:_}=g(["userPackages",n],async()=>(await c.post("/packages/list",{owner_github_username:n})).data.packages,{enabled:i,select:s=>[...s].sort((t,f)=>new Date(f.updated_at||f.created_at).getTime()-new Date(t.updated_at||t.created_at).getTime())}),{data:D}=g("trendingPackages",async()=>(await c.get("/packages/list_trending")).data.packages,{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),{data:P}=g("latestPackages",async()=>(await c.get("/packages/list_latest",{params:{limit:10}})).data.packages,{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),S=(s,t)=>{s.preventDefault(),k(t),y()};return e.jsxs("div",{children:[e.jsx(R,{children:e.jsx("title",{children:"Dashboard - tscircuit"})}),e.jsx(T,{}),e.jsxs("div",{className:"container mx-auto px-4 py-8 min-h-[80vh]",children:[e.jsx("div",{className:"flex items-center justify-between mb-6",children:e.jsx("h1",{className:"text-3xl font-bold",children:"Dashboard"})}),e.jsxs("div",{className:"flex md:flex-row flex-col",children:[e.jsx("div",{className:"md:w-3/4 p-0 md:pr-6",children:i?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-6 mb-4",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("h2",{className:"text-sm text-gray-600 whitespace-nowrap",children:"Edit Recent"}),e.jsx("div",{className:"flex gap-2 items-center overflow-x-scroll md:overflow-hidden",children:r&&r.slice(0,3).map(s=>e.jsx("div",{children:e.jsx(h,{href:`/editor?package_id=${s.package_id}`,className:"text-blue-600 hover:underline",children:e.jsxs(u,{variant:"ghost",size:"sm",className:"font-medium",children:[s.unscoped_name,e.jsx(B,{className:"w-3 h-3 ml-2"})]})})},s.package_id))})]})}),e.jsx("h2",{className:"text-sm font-bold mb-2 text-gray-700 border-b border-gray-200",children:"Your Recent Packages"}),j&&e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((s,t)=>e.jsx(H,{},t))}),r&&r.length>0?e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:r.slice(0,10).map(s=>e.jsx(M,{pkg:s,isCurrentUserPackage:s.owner_github_username===n,onDeleteClick:S},s.package_id))}):!j&&(r==null?void 0:r.length)===0&&e.jsx("span",{className:"font-medium text-sm text-gray-500",children:"No packages found"}),r&&r.length>10&&e.jsx(h,{href:`/${n}`,className:"text-sm text-blue-600 hover:underline mt-2 inline-block",children:"View all packages"}),a&&a.length>0&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h2",{className:"text-sm font-bold mb-2 text-gray-700 border-b border-gray-200",children:"Your Organizations"}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:a==null?void 0:a.slice(0,4).map((s,t)=>e.jsx($,{organization:s,withLink:!0,showStats:!0,showMembers:!0},t))}),a&&a.length>4&&e.jsx(h,{href:"/organizations",className:"text-sm text-blue-600 hover:underline mt-2 inline-block",children:"View all organizations"})]})]}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-64 rounded-md p-4 mt-[40px] mb-2 sm:mb-4",children:[e.jsx("div",{className:"p-4 mb-4 rounded-full bg-blue-50 border border-blue-100 shadow-sm",children:e.jsx(W,{className:"text-blue-500",size:32})}),e.jsx("h2",{className:"text-xl sm:text-2xl font-bold text-gray-800 mb-3",children:"You're not logged in"}),e.jsx("p",{className:"text-gray-600 mb-6 text-center max-w-md text-sm sm:text-base",children:"Log in to access your dashboard and manage your packages."}),e.jsx(u,{onClick:()=>o(),variant:"outline",children:"Log In"})]})}),e.jsxs("div",{className:"md:w-1/4",children:[e.jsx(b,{title:"Trending Packages",packages:D,showAll:d,onToggleShowAll:()=>l(!d)}),e.jsx("div",{className:"mt-8",children:e.jsx(b,{title:"Latest Packages",packages:P,showAll:p,onToggleShowAll:()=>w(!p)})})]})]}),m&&e.jsx(v,{packageId:m.package_id,packageName:m.unscoped_name,packageOwner:m.owner_github_username??"",refetchUserPackages:_})]}),e.jsx(F,{})]})};export{he as DashboardPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as c,b as o,j as e,w as x,aa as m,L as i,B as h}from"./index-BQPj88OW.js";import{u as p}from"./Analytics-DIw7l2gi.js";import{u as f}from"./use-create-datasheet-B7TDsTUt.js";import{H as j}from"./Header-CI4GZVOv.js";import{F as b}from"./Footer-DU-HdqGk.js";import{C as u,b as N,c as g,a as y}from"./card-CzXDit7x.js";import{C as d}from"./circle-alert-Du9-4of0.js";import"./use-packages-base-api-url-DA1hucM7.js";const w=s=>{const a=p();return c(["datasheet",s],async()=>{if(!s)throw new Error("chip name required");const{data:r}=await a.get("/datasheets/get",{params:{chip_name:s}});return r.datasheet},{enabled:!!s,retry:!1,refetchOnWindowFocus:!1})},_=({text:s,maxChars:a=30})=>{const[r,n]=o.useState(!1);return s.length<=a?e.jsx("span",{children:s}):e.jsxs("span",{children:[r?s:`${s.slice(0,a)}...`,e.jsx("button",{className:"text-blue-600 underline ml-1",type:"button",onClick:()=>n(t=>!t),children:r?"Show less":"Show more"})]})},l=({title:s,children:a})=>e.jsxs(u,{className:"mb-6",children:[e.jsx(N,{className:"pb-2",children:e.jsx(g,{className:"text-xl font-semibold",children:s})}),e.jsx(y,{children:a})]}),S=()=>{const{chipName:s}=x(),a=w(s),r=f(),n=()=>{s&&r.mutate({chip_name:s})};return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(j,{}),e.jsxs("main",{className:"flex-grow mx-auto px-4 md:px-20 lg:px-28 py-8 w-full",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("h1",{className:"text-3xl md:text-4xl font-bold text-gray-900 mb-2 break-words",children:[s," Datasheet"]}),e.jsxs("p",{className:"text-lg text-gray-600 mb-4",children:["View and download the datasheet for"," ",e.jsx("span",{className:"font-semibold text-gray-800",children:s}),". If the datasheet is not available, you can request its creation."]}),e.jsxs("a",{href:`https://api.tscircuit.com/datasheets/get?chip_name=${encodeURIComponent(s)}`,className:"inline-flex items-center gap-1 text-blue-600 hover:underline text-sm font-medium",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(m,{className:"w-4 h-4"})," Download JSON"]})]}),a.isLoading?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20",children:[e.jsx(i,{className:"w-10 h-10 animate-spin text-blue-500 mb-4"}),e.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Loading Datasheet..."}),e.jsxs("p",{className:"text-gray-500 max-w-md text-center",children:["Please wait while we fetch the datasheet information for"," ",e.jsx("span",{className:"font-semibold",children:s}),"."]})]}):a.data?e.jsxs(e.Fragment,{children:[!(a.data.pin_information||a.data.datasheet_pdf_urls)&&e.jsx(l,{title:"Processing",children:e.jsxs("div",{className:"flex items-center gap-3 text-yellow-700",children:[e.jsx(i,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Datasheet is processing. Please check back later."})]})}),e.jsx(l,{title:"Description",children:a.data.ai_description?e.jsx("div",{className:"flex items-center gap-3 text-gray-500",children:e.jsx("span",{children:a.data.ai_description})}):e.jsx("p",{className:"text-gray-500",children:"No description available."})}),e.jsx(l,{title:"PDFs",children:a.data.datasheet_pdf_urls&&a.data.datasheet_pdf_urls.length>0?e.jsx("ul",{className:"list-disc pl-5 space-y-2",children:a.data.datasheet_pdf_urls.map(t=>e.jsx("li",{children:e.jsx("a",{href:t,className:"text-blue-600 underline break-all",target:"_blank",rel:"noopener noreferrer",children:t})},t))}):e.jsx("p",{className:"text-gray-500",children:"No datasheet PDFs available."})}),e.jsx(l,{title:"Pin Information",children:a.data.pin_information&&a.data.pin_information.length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full border-collapse text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"border-b px-3 py-2 text-left font-semibold",children:"Pin"}),e.jsx("th",{className:"border-b px-3 py-2 text-left font-semibold",children:"Name"}),e.jsx("th",{className:"border-b px-3 py-2 text-left font-semibold",children:"Description"}),e.jsx("th",{className:"border-b px-3 py-2 text-left font-semibold",children:"Capabilities"})]})}),e.jsx("tbody",{children:a.data.pin_information.map(t=>e.jsxs("tr",{className:"hover:bg-gray-50",children:[e.jsx("td",{className:"border-b px-3 py-2 font-mono",children:t.pin_number}),e.jsx("td",{className:"border-b px-3 py-2",children:t.name}),e.jsx("td",{className:"border-b px-3 py-2",children:t.description}),e.jsx("td",{className:"border-b px-3 py-2",children:e.jsx(_,{text:t.capabilities.join(", "),maxChars:30})})]},t.pin_number))})]})}):e.jsx("p",{className:"text-gray-500",children:"No pin information available."})})]}):a.error&&a.error.status===404?e.jsx(l,{title:"No Datasheet Found",children:e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx(d,{className:"w-8 h-8 text-red-500"}),e.jsxs("p",{className:"text-gray-700 text-center",children:["No datasheet found for"," ",e.jsx("span",{className:"font-semibold",children:s}),".",e.jsx("br",{}),"You can request its creation below."]}),e.jsx(h,{className:"mt-2",onClick:n,disabled:r.isLoading,size:"lg",children:r.isLoading?"Creating...":"Create Datasheet"})]})}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-16",children:[e.jsx(d,{className:"w-10 h-10 text-red-500 mb-4"}),e.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Error loading datasheet"}),e.jsxs("p",{className:"text-gray-500 max-w-md text-center",children:["There was an error loading the datasheet for"," ",e.jsx("span",{className:"font-semibold",children:s}),". Please try again later."]})]})]}),e.jsx(b,{})]})};export{S as DatasheetPage,S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,b as x,m as p,j as e,q as l,L as u,l as g}from"./index-BQPj88OW.js";import{u as j,I as f}from"./Analytics-DIw7l2gi.js";import{u as N}from"./use-create-datasheet-B7TDsTUt.js";import{H as b}from"./Header-CI4GZVOv.js";import{F as v}from"./Footer-DU-HdqGk.js";import"./use-packages-base-api-url-DA1hucM7.js";const C=()=>{const i=j(),[,c]=h(),t=N({onSuccess:a=>c(`/datasheets/${a.chip_name}`)}),[s,d]=x.useState(""),{data:r,isLoading:n,error:o}=p(["datasheetList",s],async()=>{const a=new URLSearchParams;s?a.append("chip_name",s):a.append("is_popular","true");const{data:m}=await i.get(`/datasheets/list?${a.toString()}`);return m.datasheets},{keepPreviousData:!0});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:"Datasheets"})}),e.jsx("p",{className:"text-lg text-gray-600 mb-4",children:"Explore datasheets for popular electronic components and chips. Search to find specific ones."})]}),e.jsx("div",{className:"mb-6",children:e.jsx("div",{className:"flex flex-col sm:flex-row gap-4 mb-4",children:e.jsxs("div",{className:"relative flex-grow",children:[e.jsx(l,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),e.jsx(f,{type:"search",placeholder:"Search datasheets...",className:"pl-10",value:s,onChange:a=>d(a.target.value),"aria-label":"Search datasheets",role:"searchbox"})]})})}),n?e.jsxs("div",{className:"text-center py-20 px-4",children:[e.jsx("div",{className:"bg-slate-50 inline-flex rounded-full p-4 mb-4",children:e.jsx(u,{className:"size-8 animate-spin text-slate-400"})}),e.jsx("h3",{className:"text-xl font-medium text-slate-900 mb-2",children:"Loading Datasheets"}),e.jsx("p",{className:"text-slate-500 max-w-md mx-auto mb-6",children:"Please wait while we fetch the datasheets..."})]}):o?e.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 p-6 rounded-xl shadow-sm max-w-2xl mx-auto",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"mr-4 bg-red-100 p-2 rounded-full",children:e.jsx(l,{className:"w-6 h-6 text-red-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Error Loading Datasheets"}),e.jsx("p",{className:"text-red-600",children:"We couldn't load the datasheets. Please try again later."})]})]})}):r&&r.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(a=>e.jsx(g,{href:`/datasheets/${a.chip_name}`,className:"block p-4 bg-white rounded-lg shadow hover:shadow-md transition-shadow",children:e.jsx("h3",{className:"font-semibold text-gray-900",children:a.chip_name})},a.datasheet_id))}):e.jsxs("div",{className:"text-center py-12 px-4",children:[e.jsx("div",{className:"bg-slate-50 inline-flex rounded-full p-4 mb-4",children:e.jsx(l,{className:"w-8 h-8 text-slate-400"})}),e.jsx("h3",{className:"text-xl font-medium text-slate-900 mb-2",children:"No Matching Datasheets"}),e.jsx("p",{className:"text-slate-500 max-w-md mx-auto mb-6",children:s?`No datasheets match your search for "${s}".`:"There are no popular datasheets at the moment."}),s&&e.jsx("button",{className:"mt-2 px-4 py-2 bg-blue-600 text-white rounded",onClick:()=>t.mutate({chip_name:s}),disabled:t.isLoading,children:t.isLoading?"Creating...":`Create Datasheet for ${s}`})]})]}),e.jsx(v,{})]})};export{C as DatasheetsPage,C as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as u,u as d,h as p,j as s}from"./index-BQPj88OW.js";import{u as m}from"./use-packages-base-api-url-DA1hucM7.js";const g=()=>{const r=m(),[o,a]=u.useState(""),i=d(e=>e.setSession),[,c]=p(),l=async()=>{try{const t=await(await fetch(`${r}/sessions/create_passwordless`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({github_username:o})})).json(),n=t.session.token;if(!n)throw new Error("No token received from server");i({token:n,account_id:t.session.account_id,session_id:t.session.session_id,github_username:o}),c("/")}catch(e){console.error("Dev login failed:",e)}};return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gray-100",children:[s.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Development Login"}),s.jsx("input",{type:"text",value:o,onChange:e=>a(e.target.value),placeholder:"Enter GitHub username",className:"mb-4 p-2 border border-gray-300 rounded"}),s.jsx("button",{onClick:l,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Login"})]})};export{g as DevLoginPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./index-BQPj88OW.js";import{C as m}from"./CodeAndPreview-Dycd0s15.js";import{F as s}from"./Footer-DU-HdqGk.js";import{H as a}from"./Header-CI4GZVOv.js";import{H as c}from"./main-DPEM9abA.js";import{u as n}from"./DownloadButtonAndMenu-OIUhbKkj.js";import"./Analytics-DIw7l2gi.js";import"./use-packages-base-api-url-DA1hucM7.js";import"./use-package-files-CmmWVuGn.js";import"./select-BN8AF1J7.js";import"./tooltip-C1pwvC0K.js";import"./triangle-alert-BMIBEO1D.js";import"./index-DvNLZBaq.js";import"./index-B17tE1vy.js";import"./trash-2-BW3eClHz.js";import"./plus-KkE_6Dq2.js";import"./hash-DfKYpqTm.js";import"./badge-Bk-k6kyg.js";import"./refresh-cw-aWASTRku.js";import"./FileSaver.min-BDsOlqKl.js";import"./use-list-user-orgs-CgJIT7N4.js";import"./use-delete-package-DLKtoTOj.js";import"./label-CTudXc4q.js";import"./circle-alert-Du9-4of0.js";import"./pen-D54fxNRf.js";import"./eye-B_NMTTT7.js";import"./useQueries-BJ7Ue7HV.js";import"./use-package-by-package-name-1s1Pcarw.js";const B=()=>{const{packageInfo:e,error:r}=n(),o=e?`https://tscircuit.com/${e.name}`:void 0,i=(e==null?void 0:e.latest_pcb_preview_image_url)??(e==null?void 0:e.latest_sch_preview_image_url)??(e==null?void 0:e.latest_cad_preview_image_url)??void 0;return t.jsxs("div",{className:"overflow-x-hidden",children:[t.jsxs(c,{children:[t.jsx("title",{children:e?`${e.unscoped_name} - tscircuit`:"tscircuit editor"}),e&&t.jsxs(t.Fragment,{children:[t.jsx("meta",{property:"og:title",content:`${e.unscoped_name} - tscircuit`}),i&&t.jsxs(t.Fragment,{children:[t.jsx("meta",{property:"og:image",content:i}),t.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),t.jsx("meta",{name:"twitter:image",content:i})]})]})]}),t.jsx(a,{}),!r&&t.jsx(m,{pkg:e,projectUrl:o}),r&&r.status===404&&t.jsx("div",{className:"w-full h-[calc(100vh-20rem)] text-xl text-center flex justify-center items-center",children:"Package not found"}),r&&r.status!==404&&t.jsxs("div",{className:"flex flex-col",children:["Something strange happened",t.jsx("div",{children:r.message})]}),t.jsx(s,{})]})};export{B as EditorPage};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{k as c}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:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],r=c("eye",e);export{r as E};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 120 120"><path fill="#000" d="M0 0H120V120H0z"/><path stroke="gray" d="M30 30H90V90H30z"/></svg>
|
|
Binary file
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{k as c}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 n=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],i=c("git-branch",n),f=e=>{const t=new Date(e),o=Math.floor((new Date().getTime()-t.getTime())/1e3);return o<60?"just now":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:`${Math.floor(o/86400)}d ago`};export{i as G,f};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{k as c}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=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],e=c("github",o);export{e as G};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f9826c","activityBar.background":"#24292e","activityBar.border":"#1b1f23","activityBar.foreground":"#e1e4e8","activityBar.inactiveForeground":"#6a737d","activityBarBadge.background":"#0366d6","activityBarBadge.foreground":"#fff","badge.background":"#044289","badge.foreground":"#c8e1ff","breadcrumb.activeSelectionForeground":"#d1d5da","breadcrumb.focusForeground":"#e1e4e8","breadcrumb.foreground":"#959da5","breadcrumbPicker.background":"#2b3036","button.background":"#176f2c","button.foreground":"#dcffe4","button.hoverBackground":"#22863a","button.secondaryBackground":"#444d56","button.secondaryForeground":"#fff","button.secondaryHoverBackground":"#586069","checkbox.background":"#444d56","checkbox.border":"#1b1f23","debugToolBar.background":"#2b3036","descriptionForeground":"#959da5","diffEditor.insertedTextBackground":"#28a74530","diffEditor.removedTextBackground":"#d73a4930","dropdown.background":"#2f363d","dropdown.border":"#1b1f23","dropdown.foreground":"#e1e4e8","dropdown.listBackground":"#24292e","editor.background":"#24292e","editor.findMatchBackground":"#ffd33d44","editor.findMatchHighlightBackground":"#ffd33d22","editor.focusedStackFrameHighlightBackground":"#2b6a3033","editor.foldBackground":"#58606915","editor.foreground":"#e1e4e8","editor.inactiveSelectionBackground":"#3392FF22","editor.lineHighlightBackground":"#2b3036","editor.linkedEditingBackground":"#3392FF22","editor.selectionBackground":"#3392FF44","editor.selectionHighlightBackground":"#17E5E633","editor.selectionHighlightBorder":"#17E5E600","editor.stackFrameHighlightBackground":"#C6902625","editor.wordHighlightBackground":"#17E5E600","editor.wordHighlightBorder":"#17E5E699","editor.wordHighlightStrongBackground":"#17E5E600","editor.wordHighlightStrongBorder":"#17E5E666","editorBracketHighlight.foreground1":"#79b8ff","editorBracketHighlight.foreground2":"#ffab70","editorBracketHighlight.foreground3":"#b392f0","editorBracketHighlight.foreground4":"#79b8ff","editorBracketHighlight.foreground5":"#ffab70","editorBracketHighlight.foreground6":"#b392f0","editorBracketMatch.background":"#17E5E650","editorBracketMatch.border":"#17E5E600","editorCursor.foreground":"#c8e1ff","editorError.foreground":"#f97583","editorGroup.border":"#1b1f23","editorGroupHeader.tabsBackground":"#1f2428","editorGroupHeader.tabsBorder":"#1b1f23","editorGutter.addedBackground":"#28a745","editorGutter.deletedBackground":"#ea4a5a","editorGutter.modifiedBackground":"#2188ff","editorIndentGuide.activeBackground":"#444d56","editorIndentGuide.background":"#2f363d","editorLineNumber.activeForeground":"#e1e4e8","editorLineNumber.foreground":"#444d56","editorOverviewRuler.border":"#1b1f23","editorWarning.foreground":"#ffea7f","editorWhitespace.foreground":"#444d56","editorWidget.background":"#1f2428","errorForeground":"#f97583","focusBorder":"#005cc5","foreground":"#d1d5da","gitDecoration.addedResourceForeground":"#34d058","gitDecoration.conflictingResourceForeground":"#ffab70","gitDecoration.deletedResourceForeground":"#ea4a5a","gitDecoration.ignoredResourceForeground":"#6a737d","gitDecoration.modifiedResourceForeground":"#79b8ff","gitDecoration.submoduleResourceForeground":"#6a737d","gitDecoration.untrackedResourceForeground":"#34d058","input.background":"#2f363d","input.border":"#1b1f23","input.foreground":"#e1e4e8","input.placeholderForeground":"#959da5","list.activeSelectionBackground":"#39414a","list.activeSelectionForeground":"#e1e4e8","list.focusBackground":"#044289","list.hoverBackground":"#282e34","list.hoverForeground":"#e1e4e8","list.inactiveFocusBackground":"#1d2d3e","list.inactiveSelectionBackground":"#282e34","list.inactiveSelectionForeground":"#e1e4e8","notificationCenterHeader.background":"#24292e","notificationCenterHeader.foreground":"#959da5","notifications.background":"#2f363d","notifications.border":"#1b1f23","notifications.foreground":"#e1e4e8","notificationsErrorIcon.foreground":"#ea4a5a","notificationsInfoIcon.foreground":"#79b8ff","notificationsWarningIcon.foreground":"#ffab70","panel.background":"#1f2428","panel.border":"#1b1f23","panelInput.border":"#2f363d","panelTitle.activeBorder":"#f9826c","panelTitle.activeForeground":"#e1e4e8","panelTitle.inactiveForeground":"#959da5","peekViewEditor.background":"#1f242888","peekViewEditor.matchHighlightBackground":"#ffd33d33","peekViewResult.background":"#1f2428","peekViewResult.matchHighlightBackground":"#ffd33d33","pickerGroup.border":"#444d56","pickerGroup.foreground":"#e1e4e8","progressBar.background":"#0366d6","quickInput.background":"#24292e","quickInput.foreground":"#e1e4e8","scrollbar.shadow":"#0008","scrollbarSlider.activeBackground":"#6a737d88","scrollbarSlider.background":"#6a737d33","scrollbarSlider.hoverBackground":"#6a737d44","settings.headerForeground":"#e1e4e8","settings.modifiedItemIndicator":"#0366d6","sideBar.background":"#1f2428","sideBar.border":"#1b1f23","sideBar.foreground":"#d1d5da","sideBarSectionHeader.background":"#1f2428","sideBarSectionHeader.border":"#1b1f23","sideBarSectionHeader.foreground":"#e1e4e8","sideBarTitle.foreground":"#e1e4e8","statusBar.background":"#24292e","statusBar.border":"#1b1f23","statusBar.debuggingBackground":"#931c06","statusBar.debuggingForeground":"#fff","statusBar.foreground":"#d1d5da","statusBar.noFolderBackground":"#24292e","statusBarItem.prominentBackground":"#282e34","statusBarItem.remoteBackground":"#24292e","statusBarItem.remoteForeground":"#d1d5da","tab.activeBackground":"#24292e","tab.activeBorder":"#24292e","tab.activeBorderTop":"#f9826c","tab.activeForeground":"#e1e4e8","tab.border":"#1b1f23","tab.hoverBackground":"#24292e","tab.inactiveBackground":"#1f2428","tab.inactiveForeground":"#959da5","tab.unfocusedActiveBorder":"#24292e","tab.unfocusedActiveBorderTop":"#1b1f23","tab.unfocusedHoverBackground":"#24292e","terminal.ansiBlack":"#586069","terminal.ansiBlue":"#2188ff","terminal.ansiBrightBlack":"#959da5","terminal.ansiBrightBlue":"#79b8ff","terminal.ansiBrightCyan":"#56d4dd","terminal.ansiBrightGreen":"#85e89d","terminal.ansiBrightMagenta":"#b392f0","terminal.ansiBrightRed":"#f97583","terminal.ansiBrightWhite":"#fafbfc","terminal.ansiBrightYellow":"#ffea7f","terminal.ansiCyan":"#39c5cf","terminal.ansiGreen":"#34d058","terminal.ansiMagenta":"#b392f0","terminal.ansiRed":"#ea4a5a","terminal.ansiWhite":"#d1d5da","terminal.ansiYellow":"#ffea7f","terminal.foreground":"#d1d5da","terminal.tab.activeBorder":"#f9826c","terminalCursor.background":"#586069","terminalCursor.foreground":"#79b8ff","textBlockQuote.background":"#24292e","textBlockQuote.border":"#444d56","textCodeBlock.background":"#2f363d","textLink.activeForeground":"#c8e1ff","textLink.foreground":"#79b8ff","textPreformat.foreground":"#d1d5da","textSeparator.foreground":"#586069","titleBar.activeBackground":"#24292e","titleBar.activeForeground":"#e1e4e8","titleBar.border":"#1b1f23","titleBar.inactiveBackground":"#1f2428","titleBar.inactiveForeground":"#959da5","tree.indentGuidesStroke":"#2f363d","welcomePage.buttonBackground":"#2f363d","welcomePage.buttonHoverBackground":"#444d56"},"displayName":"GitHub Dark","name":"github-dark","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6a737d"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language"],"settings":{"foreground":"#79b8ff"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#b392f0"}},{"scope":"variable.parameter.function","settings":{"foreground":"#e1e4e8"}},{"scope":"entity.name.tag","settings":{"foreground":"#85e89d"}},{"scope":"keyword","settings":{"foreground":"#f97583"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#f97583"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#e1e4e8"}},{"scope":["string","punctuation.definition.string","string punctuation.section.embedded source"],"settings":{"foreground":"#9ecbff"}},{"scope":"support","settings":{"foreground":"#79b8ff"}},{"scope":"meta.property-name","settings":{"foreground":"#79b8ff"}},{"scope":"variable","settings":{"foreground":"#ffab70"}},{"scope":"variable.other","settings":{"foreground":"#e1e4e8"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#fdaeb7"}},{"scope":"carriage-return","settings":{"background":"#f97583","content":"^M","fontStyle":"italic underline","foreground":"#24292e"}},{"scope":"message.error","settings":{"foreground":"#fdaeb7"}},{"scope":"string variable","settings":{"foreground":"#79b8ff"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#dbedff"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#dbedff"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#85e89d"}},{"scope":"support.constant","settings":{"foreground":"#79b8ff"}},{"scope":"support.variable","settings":{"foreground":"#79b8ff"}},{"scope":"meta.module-reference","settings":{"foreground":"#79b8ff"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#ffab70"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"markup.quote","settings":{"foreground":"#85e89d"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#e1e4e8"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#e1e4e8"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#79b8ff"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#86181d","foreground":"#fdaeb7"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#144620","foreground":"#85e89d"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#c24e00","foreground":"#ffab70"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#79b8ff","foreground":"#2f363d"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#b392f0"}},{"scope":"meta.diff.header","settings":{"foreground":"#79b8ff"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#79b8ff"}},{"scope":"meta.output","settings":{"foreground":"#79b8ff"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#d1d5da"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#fdaeb7"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"fontStyle":"underline","foreground":"#dbedff"}}],"type":"dark"}'));export{e as default};
|