@tscircuit/fake-snippets 0.0.138 → 0.0.140

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/index.js CHANGED
@@ -445,6 +445,10 @@ var databaseSchema = z.object({
445
445
  bugReports: z.array(bugReportSchema).default([]),
446
446
  bugReportFiles: z.array(bugReportFileSchema).default([])
447
447
  });
448
+ var tscircuitHandleSchema = z.string().min(1).max(40).regex(
449
+ /^[0-9A-Za-z_-]+$/,
450
+ "tscircuit_handle may only contain letters, numbers, underscores, and hyphens"
451
+ );
448
452
 
449
453
  // fake-snippets-api/lib/db/autoload-dev-packages.ts
450
454
  import fs from "fs";
@@ -3474,6 +3478,10 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
3474
3478
  );
3475
3479
  if (accountIndex !== -1) {
3476
3480
  updatedAccount = { ...state.accounts[accountIndex] };
3481
+ if (updates.tscircuit_handle) {
3482
+ updatedAccount.tscircuit_handle = updates.tscircuit_handle;
3483
+ delete updates.tscircuit_handle;
3484
+ }
3477
3485
  if (updates.shippingInfo) {
3478
3486
  updatedAccount.shippingInfo = {
3479
3487
  ...updatedAccount.shippingInfo,
@@ -3844,7 +3852,7 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
3844
3852
  is_personal_org: organization.is_personal_org || false,
3845
3853
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
3846
3854
  org_display_name: organization.org_display_name ?? organization.name,
3847
- tscircuit_handle: organization.tscircuit_handle ?? null,
3855
+ tscircuit_handle: organization.tscircuit_handle || organization.name,
3848
3856
  ...organization
3849
3857
  };
3850
3858
  set((state) => ({
package/dist/schema.d.ts CHANGED
@@ -3285,5 +3285,6 @@ declare const databaseSchema: z.ZodObject<{
3285
3285
  }[] | undefined;
3286
3286
  }>;
3287
3287
  type DatabaseSchema = z.infer<typeof databaseSchema>;
3288
+ declare const tscircuitHandleSchema: z.ZodString;
3288
3289
 
3289
- export { type Account, type AccountPackage, type AccountSnippet, type AiReview, type BugReport, type BugReportFile, type DatabaseSchema, type Datasheet, type GithubInstallation, type JlcpcbOrderState, type JlcpcbOrderStepRun, type LoginPage, type Order, type OrderFile, type OrderQuote, type OrgAccount, type Organization, type Package, type PackageBuild, type PackageFile, type PackageRelease, type PublicAccount, type PublicOrgSchema, type QuotedComponent, type Session, type ShippingOption, type Snippet, type UserPermissions, accountPackageSchema, accountSchema, accountSnippetSchema, aiReviewSchema, bugReportFileResponseSchema, bugReportFileSchema, bugReportSchema, databaseSchema, datasheetPinInformationSchema, datasheetSchema, errorResponseSchema, errorSchema, githubInstallationSchema, jlcpcbOrderStateSchema, jlcpcbOrderStepRunSchema, loginPageSchema, orderFileSchema, orderQuoteSchema, orderSchema, orgAccountSchema, orgSchema, packageBuildSchema, packageFileSchema, packageReleaseSchema, packageSchema, publicAccountSchema, publicOrgSchema, quotedComponentSchema, sessionSchema, shippingInfoSchema, snippetSchema, userPermissionsSchema };
3290
+ export { type Account, type AccountPackage, type AccountSnippet, type AiReview, type BugReport, type BugReportFile, type DatabaseSchema, type Datasheet, type GithubInstallation, type JlcpcbOrderState, type JlcpcbOrderStepRun, type LoginPage, type Order, type OrderFile, type OrderQuote, type OrgAccount, type Organization, type Package, type PackageBuild, type PackageFile, type PackageRelease, type PublicAccount, type PublicOrgSchema, type QuotedComponent, type Session, type ShippingOption, type Snippet, type UserPermissions, accountPackageSchema, accountSchema, accountSnippetSchema, aiReviewSchema, bugReportFileResponseSchema, bugReportFileSchema, bugReportSchema, databaseSchema, datasheetPinInformationSchema, datasheetSchema, errorResponseSchema, errorSchema, githubInstallationSchema, jlcpcbOrderStateSchema, jlcpcbOrderStepRunSchema, loginPageSchema, orderFileSchema, orderQuoteSchema, orderSchema, orgAccountSchema, orgSchema, packageBuildSchema, packageFileSchema, packageReleaseSchema, packageSchema, publicAccountSchema, publicOrgSchema, quotedComponentSchema, sessionSchema, shippingInfoSchema, snippetSchema, tscircuitHandleSchema, userPermissionsSchema };
package/dist/schema.js CHANGED
@@ -439,6 +439,10 @@ var databaseSchema = z.object({
439
439
  bugReports: z.array(bugReportSchema).default([]),
440
440
  bugReportFiles: z.array(bugReportFileSchema).default([])
441
441
  });
442
+ var tscircuitHandleSchema = z.string().min(1).max(40).regex(
443
+ /^[0-9A-Za-z_-]+$/,
444
+ "tscircuit_handle may only contain letters, numbers, underscores, and hyphens"
445
+ );
442
446
  export {
443
447
  accountPackageSchema,
444
448
  accountSchema,
@@ -471,5 +475,6 @@ export {
471
475
  sessionSchema,
472
476
  shippingInfoSchema,
473
477
  snippetSchema,
478
+ tscircuitHandleSchema,
474
479
  userPermissionsSchema
475
480
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/fake-snippets",
3
- "version": "0.0.138",
3
+ "version": "0.0.140",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -81,13 +81,13 @@
81
81
  "@resvg/resvg-wasm": "^2.6.2",
82
82
  "@sentry/react": "^10.10.0",
83
83
  "@tailwindcss/typography": "^0.5.16",
84
- "@tscircuit/3d-viewer": "^0.0.426",
84
+ "@tscircuit/3d-viewer": "^0.0.435",
85
85
  "@tscircuit/assembly-viewer": "^0.0.5",
86
86
  "@tscircuit/create-snippet-url": "^0.0.8",
87
- "@tscircuit/eval": "^0.0.460",
87
+ "@tscircuit/eval": "^0.0.471",
88
88
  "@tscircuit/layout": "^0.0.29",
89
89
  "@tscircuit/mm": "^0.0.8",
90
- "@tscircuit/pcb-viewer": "^1.11.248",
90
+ "@tscircuit/pcb-viewer": "^1.11.256",
91
91
  "@tscircuit/prompt-benchmarks": "^0.0.28",
92
92
  "@tscircuit/runframe": "^0.0.1209",
93
93
  "@tscircuit/schematic-viewer": "^2.0.46",