@tscircuit/fake-snippets 0.0.120 → 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 +1 -2
- 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 -28
- 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/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/bun.lockb +0 -0
- 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/schema.ts +0 -502
- 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
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/fake-snippets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.122",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/tscircuit/tscircuit.com"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
9
12
|
"main": "dist/index.js",
|
|
10
13
|
"exports": {
|
|
11
14
|
".": "./dist/index.js",
|
package/.github/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @seveibar @imrishabh18 @tscircuit/core
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
|
2
|
-
name: Format Check
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
branches: [main]
|
|
7
|
-
pull_request:
|
|
8
|
-
branches: [main]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
format-check:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
|
|
17
|
-
- name: Setup bun
|
|
18
|
-
uses: oven-sh/setup-bun@v2
|
|
19
|
-
with:
|
|
20
|
-
bun-version: latest
|
|
21
|
-
|
|
22
|
-
- name: Install dependencies
|
|
23
|
-
run: bun install
|
|
24
|
-
|
|
25
|
-
- name: Run format check
|
|
26
|
-
run: bun run lint
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
|
2
|
-
name: Publish to npm
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
push:
|
|
6
|
-
branches:
|
|
7
|
-
- main
|
|
8
|
-
paths:
|
|
9
|
-
- 'fake-snippets-api/**'
|
|
10
|
-
jobs:
|
|
11
|
-
publish:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- name: Setup bun
|
|
16
|
-
uses: oven-sh/setup-bun@v2
|
|
17
|
-
with:
|
|
18
|
-
bun-version: latest
|
|
19
|
-
- uses: actions/setup-node@v5
|
|
20
|
-
with:
|
|
21
|
-
node-version: 20
|
|
22
|
-
registry-url: https://registry.npmjs.org/
|
|
23
|
-
- run: npm install -g pver
|
|
24
|
-
- run: bun install --frozen-lockfile
|
|
25
|
-
- run: bun run build:fake-api
|
|
26
|
-
- run: pver release
|
|
27
|
-
env:
|
|
28
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
|
2
|
-
name: Bun Test
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
pull_request:
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
test:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
timeout-minutes: 5
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout code
|
|
17
|
-
uses: actions/checkout@v4
|
|
18
|
-
|
|
19
|
-
- name: Setup bun
|
|
20
|
-
uses: oven-sh/setup-bun@v2
|
|
21
|
-
with:
|
|
22
|
-
bun-version: latest
|
|
23
|
-
|
|
24
|
-
- name: Install dependencies
|
|
25
|
-
run: bun install
|
|
26
|
-
|
|
27
|
-
- name: Run tests
|
|
28
|
-
run: bun test
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
|
|
2
|
-
name: Type Check
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
branches: [main]
|
|
7
|
-
pull_request:
|
|
8
|
-
branches: [main]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
type-check:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
|
|
17
|
-
- name: Setup bun
|
|
18
|
-
uses: oven-sh/setup-bun@v2
|
|
19
|
-
with:
|
|
20
|
-
bun-version: latest
|
|
21
|
-
|
|
22
|
-
- name: Install dependencies
|
|
23
|
-
run: bun i
|
|
24
|
-
|
|
25
|
-
- name: Run type check
|
|
26
|
-
run: bunx tsc --noEmit
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
name: Bundle Size Analysis
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: [main]
|
|
6
|
-
paths:
|
|
7
|
-
- 'package.json'
|
|
8
|
-
- 'bun.lockb'
|
|
9
|
-
- '.github/workflows/bundle-size-analysis.yml'
|
|
10
|
-
|
|
11
|
-
permissions:
|
|
12
|
-
contents: read
|
|
13
|
-
pull-requests: write
|
|
14
|
-
issues: write
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
build:
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
steps:
|
|
20
|
-
- uses: actions/checkout@v4
|
|
21
|
-
|
|
22
|
-
- name: Setup Bun
|
|
23
|
-
uses: oven-sh/setup-bun@v2
|
|
24
|
-
with:
|
|
25
|
-
bun-version: latest
|
|
26
|
-
|
|
27
|
-
- name: Install dependencies
|
|
28
|
-
run: bun install
|
|
29
|
-
|
|
30
|
-
- name: Build PR branch with stats
|
|
31
|
-
run: |
|
|
32
|
-
VITE_BUNDLE_ANALYZE=true bun run build --mode production
|
|
33
|
-
|
|
34
|
-
- name: Save stats as artifact
|
|
35
|
-
if: success()
|
|
36
|
-
uses: actions/upload-artifact@v4
|
|
37
|
-
with:
|
|
38
|
-
name: bundle-stats
|
|
39
|
-
path: dist/stats.html
|
|
40
|
-
|
|
41
|
-
- name: Checkout main branch
|
|
42
|
-
uses: actions/checkout@v4
|
|
43
|
-
with:
|
|
44
|
-
ref: main
|
|
45
|
-
path: main-branch
|
|
46
|
-
|
|
47
|
-
- name: Build main branch stats
|
|
48
|
-
run: |
|
|
49
|
-
cd main-branch
|
|
50
|
-
bun install
|
|
51
|
-
VITE_BUNDLE_ANALYZE=true bun run build --mode production
|
|
52
|
-
cd ..
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- name: Generate bundle stats
|
|
56
|
-
id: bundle-stats
|
|
57
|
-
run: |
|
|
58
|
-
node scripts/generate_bundle_stats.js dist/stats.html main-branch/dist/stats.html
|
|
59
|
-
echo 'STATS_CONTENT<<EOF' >> $GITHUB_ENV
|
|
60
|
-
cat dist/bundle_stats.md >> $GITHUB_ENV
|
|
61
|
-
echo 'EOF' >> $GITHUB_ENV
|
|
62
|
-
|
|
63
|
-
- name: Read and post stats
|
|
64
|
-
if: success()
|
|
65
|
-
uses: mshick/add-pr-comment@v2
|
|
66
|
-
with:
|
|
67
|
-
message: |
|
|
68
|
-
## 📊 Bundle Size Analysis
|
|
69
|
-
|
|
70
|
-
${{ env.STATS_CONTENT }}
|
|
71
|
-
|
|
72
|
-
<details>
|
|
73
|
-
<summary>What is this?</summary>
|
|
74
|
-
This is an automated bundle size report generated during the build process.
|
|
75
|
-
</details>
|
|
76
|
-
proxy-url: https://add-pr-comment-proxy-tscircuit.vercel.app/api
|
|
77
|
-
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
78
|
-
allow-repeats: false
|
|
79
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
name: Mark stale issues and pull requests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: '0 0 * * *' # Run daily at midnight UTC
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
stale:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
permissions:
|
|
11
|
-
issues: write
|
|
12
|
-
pull-requests: write
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/stale@v9
|
|
16
|
-
with:
|
|
17
|
-
# Issues config
|
|
18
|
-
days-before-stale: 60
|
|
19
|
-
days-before-close: 7
|
|
20
|
-
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
|
|
21
|
-
close-issue-message: 'This issue has been automatically closed due to inactivity. Please feel free to reopen it if you believe it still needs attention.'
|
|
22
|
-
|
|
23
|
-
# Pull request config
|
|
24
|
-
stale-pr-message: 'This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.'
|
|
25
|
-
close-pr-message: 'This PR was closed because it has been inactive for 1 day since being marked as stale.'
|
|
26
|
-
days-before-pr-stale: 2
|
|
27
|
-
days-before-pr-close: 1
|
|
28
|
-
|
|
29
|
-
# Labels
|
|
30
|
-
stale-issue-label: 'stale'
|
|
31
|
-
stale-pr-label: 'stale'
|
|
32
|
-
|
|
33
|
-
# Exempt labels
|
|
34
|
-
exempt-issue-labels: 'pinned,security,help wanted,good first issue,bug'
|
|
35
|
-
exempt-pr-labels: 'pinned,security,work in progress'
|
|
36
|
-
|
|
37
|
-
# Additional settings
|
|
38
|
-
exempt-all-milestones: true # Don't mark issues/PRs with milestones as stale
|
|
39
|
-
operations-per-run: 100 # Limit operations per run to avoid hitting API limits
|
|
40
|
-
remove-stale-when-updated: true # Remove stale label when updated
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# =============================================================================
|
|
2
|
-
# Do not change anything in this file.
|
|
3
|
-
# This workflow automatically updates @tscircuit packages when triggered by
|
|
4
|
-
# the source repository's trigger-dependent-repo-update.yml workflow.
|
|
5
|
-
# =============================================================================
|
|
6
|
-
|
|
7
|
-
name: Update @tscircuit Package
|
|
8
|
-
|
|
9
|
-
on:
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
inputs:
|
|
12
|
-
package_names:
|
|
13
|
-
description: 'Package names to update (comma-separated, e.g., @tscircuit/core,@tscircuit/props)'
|
|
14
|
-
required: true
|
|
15
|
-
type: string
|
|
16
|
-
default: '@tscircuit/eval'
|
|
17
|
-
|
|
18
|
-
env:
|
|
19
|
-
PACKAGE_NAMES: ${{ inputs.package_names }}
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
update-package:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
|
|
25
|
-
steps:
|
|
26
|
-
- uses: actions/checkout@v4
|
|
27
|
-
with:
|
|
28
|
-
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
29
|
-
- uses: oven-sh/setup-bun@v2
|
|
30
|
-
- name: Update packages
|
|
31
|
-
run: |
|
|
32
|
-
IFS=',' read -ra PACKAGES <<< "${{ env.PACKAGE_NAMES }}"
|
|
33
|
-
for package in "${PACKAGES[@]}"; do
|
|
34
|
-
if [[ -n "$package" ]]; then
|
|
35
|
-
bun update --latest "$package"
|
|
36
|
-
fi
|
|
37
|
-
done
|
|
38
|
-
- name: Close existing PRs
|
|
39
|
-
run: |
|
|
40
|
-
gh pr list --repo ${{ github.repository }} --state open --author "tscircuitbot" --json number,title --jq '.[] | select(.title | startswith("chore:")) | .number' | xargs -I{} gh pr close {} --comment "Closing in favor of a new update PR"
|
|
41
|
-
- name: Create Pull Request
|
|
42
|
-
id: create-pr
|
|
43
|
-
uses: peter-evans/create-pull-request@v5
|
|
44
|
-
with:
|
|
45
|
-
commit-message: "chore: update packages ${{ env.PACKAGE_NAMES }}"
|
|
46
|
-
title: "chore: update packages ${{ env.PACKAGE_NAMES }}"
|
|
47
|
-
body: "Automated package update"
|
|
48
|
-
branch: update-packages-${{ github.run_number }}
|
|
49
|
-
base: main
|
|
50
|
-
token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
51
|
-
committer: tscircuitbot <githubbot@tscircuit.com>
|
|
52
|
-
author: tscircuitbot <githubbot@tscircuit.com>
|
|
53
|
-
- name: Enable auto-merge with CI checks
|
|
54
|
-
if: steps.create-pr.outputs.pull-request-number != ''
|
|
55
|
-
run: |
|
|
56
|
-
gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} --auto --squash --delete-branch
|
|
57
|
-
env:
|
|
58
|
-
GH_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
name: Update Playwright Snapshots
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
issue_comment:
|
|
5
|
-
types: [created, edited]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: write
|
|
9
|
-
pull-requests: write
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
update-snapshots:
|
|
13
|
-
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update snapshots') }}
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
|
|
16
|
-
steps:
|
|
17
|
-
- name: React to the triggering comment
|
|
18
|
-
run: |
|
|
19
|
-
hub api repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions --raw-field 'content=+1'
|
|
20
|
-
env:
|
|
21
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
-
|
|
23
|
-
- name: Checkout code
|
|
24
|
-
uses: actions/checkout@v4
|
|
25
|
-
env:
|
|
26
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
-
|
|
28
|
-
- name: Setup bun
|
|
29
|
-
uses: oven-sh/setup-bun@v2
|
|
30
|
-
with:
|
|
31
|
-
bun-version: latest
|
|
32
|
-
|
|
33
|
-
- name: Install dependencies
|
|
34
|
-
run: bun install
|
|
35
|
-
|
|
36
|
-
- name: Install Playwright browsers
|
|
37
|
-
run: bunx playwright install
|
|
38
|
-
|
|
39
|
-
- name: Run tests
|
|
40
|
-
run: bun run playwright:update
|
|
41
|
-
|
|
42
|
-
# Commit the changes
|
|
43
|
-
- name: Commit changes
|
|
44
|
-
run: |
|
|
45
|
-
git config --global user.name 'github-actions'
|
|
46
|
-
git config --global user.email 'github-actions@github.com'
|
|
47
|
-
git add playwright-tests/snapshots
|
|
48
|
-
git commit -m 'chore(playwright): update snapshots'
|
|
49
|
-
git push
|
package/CLAUDE.md
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
|
|
7
|
-
tscircuit.com is a React-based web application for creating, sharing, and managing electronic circuit designs using TypeScript and React. It features a circuit editor, package management system, AI-assisted design tools, and visualization of PCB layouts and 3D models.
|
|
8
|
-
|
|
9
|
-
## Development Commands
|
|
10
|
-
|
|
11
|
-
- `bun run dev` - Start development server (builds fake API and runs on localhost:5173)
|
|
12
|
-
- `bun run build` - Full production build (generates images, sitemap, builds fake API, compiles TypeScript, and builds with Vite)
|
|
13
|
-
- `bun run typecheck` - Run TypeScript type checking without emitting files
|
|
14
|
-
- `bun run format` - Format code using Biome
|
|
15
|
-
- `bun run lint` - Check code formatting with Biome
|
|
16
|
-
- `bun run playwright` - Run Playwright end-to-end tests
|
|
17
|
-
- `bun run playwright:update` - Update Playwright test snapshots
|
|
18
|
-
- `bun run snapshot` - Interactive snapshot updating tool (prompts for specific test file)
|
|
19
|
-
|
|
20
|
-
### Fake API Development
|
|
21
|
-
- `bun run build:fake-api` - Build the complete fake API (TypeScript compilation, bundle generation, schema building)
|
|
22
|
-
- `bun run dev:registry` - Run dev server using registry API at localhost:3100
|
|
23
|
-
|
|
24
|
-
## Architecture
|
|
25
|
-
|
|
26
|
-
### Frontend Structure
|
|
27
|
-
- **React SPA** with Vite bundler, using Wouter for routing and lazy-loaded pages
|
|
28
|
-
- **State Management**: Zustand for global state, React Query for server state
|
|
29
|
-
- **UI Framework**: Tailwind CSS with Radix UI components and custom shadcn/ui components
|
|
30
|
-
- **Code Editor**: CodeMirror 6 with TypeScript support and AI completion
|
|
31
|
-
|
|
32
|
-
### API Architecture
|
|
33
|
-
- **Fake API**: Development API built with Winterspec, providing full backend simulation
|
|
34
|
-
- **Database Schema**: Zod-validated schemas for packages, builds, releases, snippets, accounts, orders
|
|
35
|
-
- **Authentication**: Session-based auth with GitHub integration
|
|
36
|
-
|
|
37
|
-
### Key Domains
|
|
38
|
-
- **Packages**: Reusable circuit components with versioning and releases
|
|
39
|
-
- **Package Builds**: Compilation artifacts with build status and logs
|
|
40
|
-
- **Package Releases**: Published versions with metadata and assets
|
|
41
|
-
- **Snippets**: Legacy circuit designs (being migrated to packages)
|
|
42
|
-
- **Circuit JSON**: Standard format for circuit data interchange
|
|
43
|
-
|
|
44
|
-
### File Organization
|
|
45
|
-
- `src/components/` - Reusable UI components
|
|
46
|
-
- `src/pages/` - Route-based page components
|
|
47
|
-
- `src/hooks/` - Custom React hooks for data fetching and state
|
|
48
|
-
- `src/lib/` - Utilities, constants, and helper functions
|
|
49
|
-
- `fake-snippets-api/` - Mock API implementation with Winterspec
|
|
50
|
-
- `playwright-tests/` - End-to-end tests with visual regression snapshots
|
|
51
|
-
|
|
52
|
-
## Testing Strategy
|
|
53
|
-
|
|
54
|
-
Uses Playwright for end-to-end testing with visual regression snapshots. Tests cover critical user flows including editor functionality, package management, authentication, and responsive design across viewport sizes.
|
|
55
|
-
|
|
56
|
-
## Key Technical Patterns
|
|
57
|
-
|
|
58
|
-
### Data Fetching
|
|
59
|
-
- React Query for server state with custom hooks (use-package-*, use-snippet-*, etc.)
|
|
60
|
-
- Fake API provides development backend with realistic data simulation
|
|
61
|
-
- SSR support via Vercel for SEO and performance
|
|
62
|
-
|
|
63
|
-
### Circuit Visualization
|
|
64
|
-
- Multiple viewers: PCB viewer, schematic viewer, 3D viewer, assembly viewer
|
|
65
|
-
- SVG-based rendering with interactive controls
|
|
66
|
-
- Real-time preview updates during code editing
|
|
67
|
-
|
|
68
|
-
### Code Compilation
|
|
69
|
-
- TypeScript compilation in browser using Monaco/TypeScript compiler API
|
|
70
|
-
- Circuit JSON generation from TypeScript code
|
|
71
|
-
- Error handling and display for compilation issues
|
|
72
|
-
|
|
73
|
-
### Package Management
|
|
74
|
-
- Package files with hierarchical structure
|
|
75
|
-
- Build artifacts and release management
|
|
76
|
-
- GitHub integration for repository linking
|
|
77
|
-
|
|
78
|
-
## Environment Variables
|
|
79
|
-
|
|
80
|
-
Development AI testing requires:
|
|
81
|
-
```bash
|
|
82
|
-
VITE_USE_DIRECT_AI_REQUESTS=true
|
|
83
|
-
VITE_ANTHROPIC_API_KEY=<your-key-here>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Build Tools
|
|
87
|
-
|
|
88
|
-
- **Bundler**: Vite with React plugin and image optimization
|
|
89
|
-
- **TypeScript**: Strict mode with path aliases (@/* → src/*)
|
|
90
|
-
- **Styling**: Tailwind CSS with custom design tokens
|
|
91
|
-
- **Code Quality**: Biome for formatting and linting
|
|
92
|
-
- **Package Manager**: Bun for fast installs and script execution
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Contributing to TSCircuit Snippets
|
|
2
|
-
|
|
3
|
-
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
|
|
4
|
-
|
|
5
|
-
- Reporting a bug
|
|
6
|
-
- Discussing the current state of the code
|
|
7
|
-
- Submitting a fix
|
|
8
|
-
- Proposing new features
|
|
9
|
-
- Becoming a maintainer
|
|
10
|
-
|
|
11
|
-
## We Develop with Github
|
|
12
|
-
|
|
13
|
-
We use github to host code, to track issues and feature requests, as well as accept pull requests.
|
|
14
|
-
|
|
15
|
-
## We Use [Github Flow](https://guides.github.com/introduction/flow/index.html), So All Code Changes Happen Through Pull Requests
|
|
16
|
-
|
|
17
|
-
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
|
|
18
|
-
|
|
19
|
-
1. Fork the repo and create your branch from `main`.
|
|
20
|
-
2. If you've added code that should be tested, add tests.
|
|
21
|
-
3. If you've changed APIs, update the documentation.
|
|
22
|
-
4. Ensure the test suite passes.
|
|
23
|
-
5. Make sure your code lints.
|
|
24
|
-
6. Issue that pull request!
|
|
25
|
-
|
|
26
|
-
## Any contributions you make will be under the MIT Software License
|
|
27
|
-
|
|
28
|
-
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
|
|
29
|
-
|
|
30
|
-
## Report bugs using Github's [issues](https://github.com/tscircuit/tscircuit.com/issues)
|
|
31
|
-
|
|
32
|
-
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/tscircuit/tscircuit.com/issues/new); it's that easy!
|
|
33
|
-
|
|
34
|
-
## Write bug reports with detail, background, and sample code
|
|
35
|
-
|
|
36
|
-
**Great Bug Reports** tend to have:
|
|
37
|
-
|
|
38
|
-
- A quick summary and/or background
|
|
39
|
-
- Steps to reproduce
|
|
40
|
-
- Be specific!
|
|
41
|
-
- Give sample code if you can.
|
|
42
|
-
- What you expected would happen
|
|
43
|
-
- What actually happens
|
|
44
|
-
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
|
|
45
|
-
|
|
46
|
-
People _love_ thorough bug reports. I'm not even kidding.
|
|
47
|
-
|
|
48
|
-
## Use a Consistent Coding Style
|
|
49
|
-
|
|
50
|
-
- 2 spaces for indentation rather than tabs
|
|
51
|
-
- You can try running `bun run lint` for style unification
|
|
52
|
-
|
|
53
|
-
## License
|
|
54
|
-
|
|
55
|
-
By contributing, you agree that your contributions will be licensed under its MIT License.
|
|
56
|
-
|
|
57
|
-
## References
|
|
58
|
-
|
|
59
|
-
This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
|