@tscircuit/fake-snippets 0.0.139 → 0.0.141
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 +65 -9
- package/dist/index.d.ts +5 -0
- package/dist/index.js +10 -0
- package/dist/schema.d.ts +10 -1
- package/dist/schema.js +7 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -747,6 +747,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
747
747
|
package_release_id: z.ZodString;
|
|
748
748
|
file_path: z.ZodString;
|
|
749
749
|
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
+
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
751
|
created_at: z.ZodString;
|
|
751
752
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
753
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -757,6 +758,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
757
758
|
file_path: string;
|
|
758
759
|
package_file_id: string;
|
|
759
760
|
content_text?: string | null | undefined;
|
|
761
|
+
content_bytes?: string | null | undefined;
|
|
760
762
|
content_mimetype?: string | null | undefined;
|
|
761
763
|
is_release_tarball?: boolean | undefined;
|
|
762
764
|
npm_pack_output?: any;
|
|
@@ -766,6 +768,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
766
768
|
file_path: string;
|
|
767
769
|
package_file_id: string;
|
|
768
770
|
content_text?: string | null | undefined;
|
|
771
|
+
content_bytes?: string | null | undefined;
|
|
769
772
|
content_mimetype?: string | null | undefined;
|
|
770
773
|
is_release_tarball?: boolean | undefined;
|
|
771
774
|
npm_pack_output?: any;
|
|
@@ -1220,6 +1223,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1220
1223
|
file_path: string;
|
|
1221
1224
|
package_file_id: string;
|
|
1222
1225
|
content_text?: string | null | undefined;
|
|
1226
|
+
content_bytes?: string | null | undefined;
|
|
1223
1227
|
content_mimetype?: string | null | undefined;
|
|
1224
1228
|
is_release_tarball?: boolean | undefined;
|
|
1225
1229
|
npm_pack_output?: any;
|
|
@@ -1807,6 +1811,7 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1807
1811
|
file_path: string;
|
|
1808
1812
|
package_file_id: string;
|
|
1809
1813
|
content_text?: string | null | undefined;
|
|
1814
|
+
content_bytes?: string | null | undefined;
|
|
1810
1815
|
content_mimetype?: string | null | undefined;
|
|
1811
1816
|
is_release_tarball?: boolean | undefined;
|
|
1812
1817
|
npm_pack_output?: any;
|
package/dist/index.js
CHANGED
|
@@ -280,6 +280,8 @@ var packageFileSchema = z.object({
|
|
|
280
280
|
package_release_id: z.string(),
|
|
281
281
|
file_path: z.string(),
|
|
282
282
|
content_text: z.string().nullable().optional(),
|
|
283
|
+
content_bytes: z.string().nullable().optional(),
|
|
284
|
+
// Base64 encoded binary content for images/non-text files
|
|
283
285
|
created_at: z.string().datetime(),
|
|
284
286
|
content_mimetype: z.string().nullable().optional(),
|
|
285
287
|
is_release_tarball: z.boolean().optional(),
|
|
@@ -445,6 +447,10 @@ var databaseSchema = z.object({
|
|
|
445
447
|
bugReports: z.array(bugReportSchema).default([]),
|
|
446
448
|
bugReportFiles: z.array(bugReportFileSchema).default([])
|
|
447
449
|
});
|
|
450
|
+
var tscircuitHandleSchema = z.string().min(1).max(40).regex(
|
|
451
|
+
/^[0-9A-Za-z_-]+$/,
|
|
452
|
+
"tscircuit_handle may only contain letters, numbers, underscores, and hyphens"
|
|
453
|
+
);
|
|
448
454
|
|
|
449
455
|
// fake-snippets-api/lib/db/autoload-dev-packages.ts
|
|
450
456
|
import fs from "fs";
|
|
@@ -3474,6 +3480,10 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
|
|
|
3474
3480
|
);
|
|
3475
3481
|
if (accountIndex !== -1) {
|
|
3476
3482
|
updatedAccount = { ...state.accounts[accountIndex] };
|
|
3483
|
+
if (updates.tscircuit_handle) {
|
|
3484
|
+
updatedAccount.tscircuit_handle = updates.tscircuit_handle;
|
|
3485
|
+
delete updates.tscircuit_handle;
|
|
3486
|
+
}
|
|
3477
3487
|
if (updates.shippingInfo) {
|
|
3478
3488
|
updatedAccount.shippingInfo = {
|
|
3479
3489
|
...updatedAccount.shippingInfo,
|
package/dist/schema.d.ts
CHANGED
|
@@ -964,6 +964,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
964
964
|
package_release_id: z.ZodString;
|
|
965
965
|
file_path: z.ZodString;
|
|
966
966
|
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
|
+
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
967
968
|
created_at: z.ZodString;
|
|
968
969
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
969
970
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -974,6 +975,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
974
975
|
file_path: string;
|
|
975
976
|
package_file_id: string;
|
|
976
977
|
content_text?: string | null | undefined;
|
|
978
|
+
content_bytes?: string | null | undefined;
|
|
977
979
|
content_mimetype?: string | null | undefined;
|
|
978
980
|
is_release_tarball?: boolean | undefined;
|
|
979
981
|
npm_pack_output?: any;
|
|
@@ -983,6 +985,7 @@ declare const packageFileSchema: z.ZodObject<{
|
|
|
983
985
|
file_path: string;
|
|
984
986
|
package_file_id: string;
|
|
985
987
|
content_text?: string | null | undefined;
|
|
988
|
+
content_bytes?: string | null | undefined;
|
|
986
989
|
content_mimetype?: string | null | undefined;
|
|
987
990
|
is_release_tarball?: boolean | undefined;
|
|
988
991
|
npm_pack_output?: any;
|
|
@@ -1658,6 +1661,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1658
1661
|
package_release_id: z.ZodString;
|
|
1659
1662
|
file_path: z.ZodString;
|
|
1660
1663
|
content_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1664
|
+
content_bytes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1661
1665
|
created_at: z.ZodString;
|
|
1662
1666
|
content_mimetype: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1663
1667
|
is_release_tarball: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1668,6 +1672,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1668
1672
|
file_path: string;
|
|
1669
1673
|
package_file_id: string;
|
|
1670
1674
|
content_text?: string | null | undefined;
|
|
1675
|
+
content_bytes?: string | null | undefined;
|
|
1671
1676
|
content_mimetype?: string | null | undefined;
|
|
1672
1677
|
is_release_tarball?: boolean | undefined;
|
|
1673
1678
|
npm_pack_output?: any;
|
|
@@ -1677,6 +1682,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
1677
1682
|
file_path: string;
|
|
1678
1683
|
package_file_id: string;
|
|
1679
1684
|
content_text?: string | null | undefined;
|
|
1685
|
+
content_bytes?: string | null | undefined;
|
|
1680
1686
|
content_mimetype?: string | null | undefined;
|
|
1681
1687
|
is_release_tarball?: boolean | undefined;
|
|
1682
1688
|
npm_pack_output?: any;
|
|
@@ -2630,6 +2636,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
2630
2636
|
file_path: string;
|
|
2631
2637
|
package_file_id: string;
|
|
2632
2638
|
content_text?: string | null | undefined;
|
|
2639
|
+
content_bytes?: string | null | undefined;
|
|
2633
2640
|
content_mimetype?: string | null | undefined;
|
|
2634
2641
|
is_release_tarball?: boolean | undefined;
|
|
2635
2642
|
npm_pack_output?: any;
|
|
@@ -3003,6 +3010,7 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
3003
3010
|
file_path: string;
|
|
3004
3011
|
package_file_id: string;
|
|
3005
3012
|
content_text?: string | null | undefined;
|
|
3013
|
+
content_bytes?: string | null | undefined;
|
|
3006
3014
|
content_mimetype?: string | null | undefined;
|
|
3007
3015
|
is_release_tarball?: boolean | undefined;
|
|
3008
3016
|
npm_pack_output?: any;
|
|
@@ -3285,5 +3293,6 @@ declare const databaseSchema: z.ZodObject<{
|
|
|
3285
3293
|
}[] | undefined;
|
|
3286
3294
|
}>;
|
|
3287
3295
|
type DatabaseSchema = z.infer<typeof databaseSchema>;
|
|
3296
|
+
declare const tscircuitHandleSchema: z.ZodString;
|
|
3288
3297
|
|
|
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 };
|
|
3298
|
+
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
|
@@ -274,6 +274,8 @@ var packageFileSchema = z.object({
|
|
|
274
274
|
package_release_id: z.string(),
|
|
275
275
|
file_path: z.string(),
|
|
276
276
|
content_text: z.string().nullable().optional(),
|
|
277
|
+
content_bytes: z.string().nullable().optional(),
|
|
278
|
+
// Base64 encoded binary content for images/non-text files
|
|
277
279
|
created_at: z.string().datetime(),
|
|
278
280
|
content_mimetype: z.string().nullable().optional(),
|
|
279
281
|
is_release_tarball: z.boolean().optional(),
|
|
@@ -439,6 +441,10 @@ var databaseSchema = z.object({
|
|
|
439
441
|
bugReports: z.array(bugReportSchema).default([]),
|
|
440
442
|
bugReportFiles: z.array(bugReportFileSchema).default([])
|
|
441
443
|
});
|
|
444
|
+
var tscircuitHandleSchema = z.string().min(1).max(40).regex(
|
|
445
|
+
/^[0-9A-Za-z_-]+$/,
|
|
446
|
+
"tscircuit_handle may only contain letters, numbers, underscores, and hyphens"
|
|
447
|
+
);
|
|
442
448
|
export {
|
|
443
449
|
accountPackageSchema,
|
|
444
450
|
accountSchema,
|
|
@@ -471,5 +477,6 @@ export {
|
|
|
471
477
|
sessionSchema,
|
|
472
478
|
shippingInfoSchema,
|
|
473
479
|
snippetSchema,
|
|
480
|
+
tscircuitHandleSchema,
|
|
474
481
|
userPermissionsSchema
|
|
475
482
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/fake-snippets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.141",
|
|
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.
|
|
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.
|
|
87
|
+
"@tscircuit/eval": "^0.0.474",
|
|
88
88
|
"@tscircuit/layout": "^0.0.29",
|
|
89
89
|
"@tscircuit/mm": "^0.0.8",
|
|
90
|
-
"@tscircuit/pcb-viewer": "^1.11.
|
|
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",
|