@tscircuit/fake-snippets 0.0.193 → 0.0.195
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/README.md +0 -8
- package/dist/bundle.js +244 -88
- package/dist/index.d.ts +2 -8
- package/dist/index.js +143 -8
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -1730,12 +1730,9 @@ declare const createDatabase: ({ seed }?: {
|
|
|
1730
1730
|
searchSnippets: (query: string) => Snippet[];
|
|
1731
1731
|
searchPackages: (query: string, account_id?: string) => Package[];
|
|
1732
1732
|
searchAccounts: (query: string, limit?: number) => Account[];
|
|
1733
|
-
searchOrgs: (query: string, limit?: number
|
|
1734
|
-
account_id: string;
|
|
1735
|
-
}) => {
|
|
1733
|
+
searchOrgs: (query: string, limit?: number) => {
|
|
1736
1734
|
member_count: number;
|
|
1737
1735
|
package_count: number;
|
|
1738
|
-
can_manage_org: boolean;
|
|
1739
1736
|
created_at: string;
|
|
1740
1737
|
tscircuit_handle: string | null;
|
|
1741
1738
|
org_id: string;
|
|
@@ -2387,12 +2384,9 @@ declare const createDatabase: ({ seed }?: {
|
|
|
2387
2384
|
searchSnippets: (query: string) => Snippet[];
|
|
2388
2385
|
searchPackages: (query: string, account_id?: string) => Package[];
|
|
2389
2386
|
searchAccounts: (query: string, limit?: number) => Account[];
|
|
2390
|
-
searchOrgs: (query: string, limit?: number
|
|
2391
|
-
account_id: string;
|
|
2392
|
-
}) => {
|
|
2387
|
+
searchOrgs: (query: string, limit?: number) => {
|
|
2393
2388
|
member_count: number;
|
|
2394
2389
|
package_count: number;
|
|
2395
|
-
can_manage_org: boolean;
|
|
2396
2390
|
created_at: string;
|
|
2397
2391
|
tscircuit_handle: string | null;
|
|
2398
2392
|
org_id: string;
|
package/dist/index.js
CHANGED
|
@@ -3114,6 +3114,147 @@ export default () => (
|
|
|
3114
3114
|
});
|
|
3115
3115
|
} catch {
|
|
3116
3116
|
}
|
|
3117
|
+
db.addPackageFile({
|
|
3118
|
+
package_release_id: glbModelReleaseId,
|
|
3119
|
+
file_path: "dist/index/circuit.json",
|
|
3120
|
+
content_text: `[
|
|
3121
|
+
{
|
|
3122
|
+
"type": "source_project_metadata",
|
|
3123
|
+
"source_project_metadata_id": "source_project_metadata_0",
|
|
3124
|
+
"software_used_string": "@tscircuit/core@0.0.1013"
|
|
3125
|
+
},
|
|
3126
|
+
{
|
|
3127
|
+
"type": "source_group",
|
|
3128
|
+
"source_group_id": "source_group_0",
|
|
3129
|
+
"is_subcircuit": true,
|
|
3130
|
+
"was_automatically_named": true,
|
|
3131
|
+
"subcircuit_id": "subcircuit_source_group_0"
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
"type": "source_component",
|
|
3135
|
+
"source_component_id": "source_component_0",
|
|
3136
|
+
"ftype": "simple_chip",
|
|
3137
|
+
"name": "U1",
|
|
3138
|
+
"supplier_part_numbers": {},
|
|
3139
|
+
"source_group_id": "source_group_0"
|
|
3140
|
+
},
|
|
3141
|
+
{
|
|
3142
|
+
"type": "source_board",
|
|
3143
|
+
"source_board_id": "source_board_0",
|
|
3144
|
+
"source_group_id": "source_group_0"
|
|
3145
|
+
},
|
|
3146
|
+
{
|
|
3147
|
+
"type": "schematic_component",
|
|
3148
|
+
"schematic_component_id": "schematic_component_0",
|
|
3149
|
+
"center": {
|
|
3150
|
+
"x": 0,
|
|
3151
|
+
"y": 0
|
|
3152
|
+
},
|
|
3153
|
+
"rotation": 0,
|
|
3154
|
+
"size": {
|
|
3155
|
+
"width": 0.4,
|
|
3156
|
+
"height": 0.4
|
|
3157
|
+
},
|
|
3158
|
+
"pin_spacing": 0.2,
|
|
3159
|
+
"port_labels": {},
|
|
3160
|
+
"source_component_id": "source_component_0",
|
|
3161
|
+
"schematic_group_id": "schematic_group_0"
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"type": "schematic_text",
|
|
3165
|
+
"schematic_text_id": "schematic_text_0",
|
|
3166
|
+
"text": "",
|
|
3167
|
+
"schematic_component_id": "schematic_component_0",
|
|
3168
|
+
"anchor": "left",
|
|
3169
|
+
"rotation": 0,
|
|
3170
|
+
"position": {
|
|
3171
|
+
"x": -0.2,
|
|
3172
|
+
"y": -0.33
|
|
3173
|
+
},
|
|
3174
|
+
"color": "#006464",
|
|
3175
|
+
"font_size": 0.18
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
"type": "schematic_text",
|
|
3179
|
+
"schematic_text_id": "schematic_text_1",
|
|
3180
|
+
"text": "U1",
|
|
3181
|
+
"schematic_component_id": "schematic_component_0",
|
|
3182
|
+
"anchor": "left",
|
|
3183
|
+
"rotation": 0,
|
|
3184
|
+
"position": {
|
|
3185
|
+
"x": -0.2,
|
|
3186
|
+
"y": 0.33
|
|
3187
|
+
},
|
|
3188
|
+
"color": "#006464",
|
|
3189
|
+
"font_size": 0.18
|
|
3190
|
+
},
|
|
3191
|
+
{
|
|
3192
|
+
"type": "schematic_group",
|
|
3193
|
+
"schematic_group_id": "schematic_group_0",
|
|
3194
|
+
"is_subcircuit": true,
|
|
3195
|
+
"subcircuit_id": "subcircuit_source_group_0",
|
|
3196
|
+
"name": "unnamed_board1",
|
|
3197
|
+
"center": {
|
|
3198
|
+
"x": 0,
|
|
3199
|
+
"y": 0
|
|
3200
|
+
},
|
|
3201
|
+
"width": 0,
|
|
3202
|
+
"height": 0,
|
|
3203
|
+
"schematic_component_ids": [],
|
|
3204
|
+
"source_group_id": "source_group_0"
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
"type": "pcb_component",
|
|
3208
|
+
"pcb_component_id": "pcb_component_0",
|
|
3209
|
+
"center": {
|
|
3210
|
+
"x": 0,
|
|
3211
|
+
"y": 0
|
|
3212
|
+
},
|
|
3213
|
+
"width": 2,
|
|
3214
|
+
"height": 3,
|
|
3215
|
+
"layer": "top",
|
|
3216
|
+
"rotation": 0,
|
|
3217
|
+
"source_component_id": "source_component_0",
|
|
3218
|
+
"subcircuit_id": "subcircuit_source_group_0",
|
|
3219
|
+
"do_not_place": false,
|
|
3220
|
+
"obstructs_within_bounds": true
|
|
3221
|
+
},
|
|
3222
|
+
{
|
|
3223
|
+
"type": "pcb_board",
|
|
3224
|
+
"pcb_board_id": "pcb_board_0",
|
|
3225
|
+
"source_board_id": "source_board_0",
|
|
3226
|
+
"center": {
|
|
3227
|
+
"x": 0,
|
|
3228
|
+
"y": 0
|
|
3229
|
+
},
|
|
3230
|
+
"thickness": 1.4,
|
|
3231
|
+
"num_layers": 2,
|
|
3232
|
+
"width": 6,
|
|
3233
|
+
"height": 7,
|
|
3234
|
+
"material": "fr4"
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
"type": "cad_component",
|
|
3238
|
+
"cad_component_id": "cad_component_0",
|
|
3239
|
+
"position": {
|
|
3240
|
+
"x": 0,
|
|
3241
|
+
"y": 0,
|
|
3242
|
+
"z": 0.8999999999999999
|
|
3243
|
+
},
|
|
3244
|
+
"rotation": {
|
|
3245
|
+
"x": 0,
|
|
3246
|
+
"y": 0,
|
|
3247
|
+
"z": 0
|
|
3248
|
+
},
|
|
3249
|
+
"pcb_component_id": "pcb_component_0",
|
|
3250
|
+
"source_component_id": "source_component_0",
|
|
3251
|
+
"model_unit_to_mm_scale_factor": 1000,
|
|
3252
|
+
"model_glb_url": "./test.glb"
|
|
3253
|
+
}
|
|
3254
|
+
]`,
|
|
3255
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3256
|
+
is_text: true
|
|
3257
|
+
});
|
|
3117
3258
|
db.addPackageBuild({
|
|
3118
3259
|
package_release_id: glbModelReleaseId,
|
|
3119
3260
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -3990,7 +4131,7 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
|
|
|
3990
4131
|
}).slice(0, limit || 50);
|
|
3991
4132
|
return matchingAccounts;
|
|
3992
4133
|
},
|
|
3993
|
-
searchOrgs: (query, limit
|
|
4134
|
+
searchOrgs: (query, limit) => {
|
|
3994
4135
|
const state = get();
|
|
3995
4136
|
const lowercaseQuery = query.toLowerCase();
|
|
3996
4137
|
const matchingOrgs = state.organizations.filter((org) => {
|
|
@@ -4003,16 +4144,10 @@ var initializer = combine(databaseSchema.parse({}), (set, get) => ({
|
|
|
4003
4144
|
const package_count = state.packages.filter(
|
|
4004
4145
|
(pkg) => pkg.owner_org_id === org.org_id
|
|
4005
4146
|
).length;
|
|
4006
|
-
const orgAccount = state.orgAccounts.find(
|
|
4007
|
-
(oa) => oa.org_id === org.org_id && oa.account_id === auth?.account_id
|
|
4008
|
-
);
|
|
4009
|
-
const isOwner = org.owner_account_id === auth?.account_id;
|
|
4010
|
-
const can_manage_org = isOwner ? true : orgAccount?.can_manage_org || false;
|
|
4011
4147
|
return {
|
|
4012
4148
|
...org,
|
|
4013
4149
|
member_count,
|
|
4014
|
-
package_count
|
|
4015
|
-
can_manage_org
|
|
4150
|
+
package_count
|
|
4016
4151
|
};
|
|
4017
4152
|
});
|
|
4018
4153
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/fake-snippets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.195",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -82,16 +82,16 @@
|
|
|
82
82
|
"@resvg/resvg-wasm": "^2.6.2",
|
|
83
83
|
"@sentry/react": "^10.10.0",
|
|
84
84
|
"@tailwindcss/typography": "^0.5.16",
|
|
85
|
-
"@tscircuit/3d-viewer": "^0.0.
|
|
85
|
+
"@tscircuit/3d-viewer": "^0.0.512",
|
|
86
86
|
"@tscircuit/assembly-viewer": "^0.0.5",
|
|
87
87
|
"@tscircuit/create-snippet-url": "^0.0.8",
|
|
88
|
-
"@tscircuit/eval": "^0.0.
|
|
88
|
+
"@tscircuit/eval": "^0.0.629",
|
|
89
89
|
"@tscircuit/layout": "^0.0.29",
|
|
90
90
|
"@tscircuit/mm": "^0.0.8",
|
|
91
|
-
"@tscircuit/pcb-viewer": "1.11.
|
|
91
|
+
"@tscircuit/pcb-viewer": "1.11.335",
|
|
92
92
|
"@tscircuit/prompt-benchmarks": "^0.0.28",
|
|
93
93
|
"@tscircuit/props": "^0.0.433",
|
|
94
|
-
"@tscircuit/runframe": "^0.0.
|
|
94
|
+
"@tscircuit/runframe": "^0.0.1595",
|
|
95
95
|
"@tscircuit/schematic-viewer": "^2.0.56",
|
|
96
96
|
"@tscircuit/simple-3d-svg": "^0.0.41",
|
|
97
97
|
"@types/babel__standalone": "^7.1.7",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@vitejs/plugin-react": "^4.3.1",
|
|
114
114
|
"autoprefixer": "^10.4.20",
|
|
115
115
|
"circuit-json-to-bom-csv": "^0.0.7",
|
|
116
|
-
"circuit-json-to-gerber": "^0.0.
|
|
116
|
+
"circuit-json-to-gerber": "^0.0.47",
|
|
117
117
|
"circuit-json-to-gltf": "^0.0.14",
|
|
118
118
|
"circuit-json-to-kicad": "^0.0.34",
|
|
119
119
|
"circuit-json-to-lbrn": "^0.0.23",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"circuit-json-to-readable-netlist": "^0.0.13",
|
|
122
122
|
"circuit-json-to-simple-3d": "^0.0.7",
|
|
123
123
|
"circuit-json-to-spice": "^0.0.6",
|
|
124
|
-
"circuit-json-to-step": "^0.0.
|
|
124
|
+
"circuit-json-to-step": "^0.0.17",
|
|
125
125
|
"circuit-json-to-tscircuit": "^0.0.11",
|
|
126
126
|
"circuit-to-svg": "^0.0.319",
|
|
127
127
|
"class-variance-authority": "^0.7.1",
|