@tscircuit/fake-snippets 0.0.200 → 0.0.202
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 -1
- package/dist/index.js +64 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -829,6 +829,15 @@ var seed = (db) => {
|
|
|
829
829
|
tscircuit_handle: "seveibar",
|
|
830
830
|
email: "example@tscircuit.com"
|
|
831
831
|
});
|
|
832
|
+
db.githubInstallations.push({
|
|
833
|
+
github_installation_id: "1234567890",
|
|
834
|
+
account_id,
|
|
835
|
+
installation_id: "1234567890",
|
|
836
|
+
github_username: "testuser",
|
|
837
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
838
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
839
|
+
is_active: true
|
|
840
|
+
});
|
|
832
841
|
if (process.env.AUTOLOAD_PACKAGES === "true") {
|
|
833
842
|
loadAutoloadPackages(db);
|
|
834
843
|
}
|
|
@@ -1684,6 +1693,61 @@ export const DEFAULT_RESISTANCE = 50`,
|
|
|
1684
1693
|
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1685
1694
|
is_text: true
|
|
1686
1695
|
});
|
|
1696
|
+
const { package_release_id: test2PackageReleaseId5 } = db.addPackageRelease({
|
|
1697
|
+
package_id: test2Package.package_id,
|
|
1698
|
+
version: "0.0.6",
|
|
1699
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1700
|
+
is_latest: false,
|
|
1701
|
+
is_locked: false,
|
|
1702
|
+
has_transpiled: true,
|
|
1703
|
+
transpilation_error: null
|
|
1704
|
+
});
|
|
1705
|
+
db.addPackageFile({
|
|
1706
|
+
package_release_id: test2PackageReleaseId5,
|
|
1707
|
+
file_path: "index.tsx",
|
|
1708
|
+
content_text: `import { formatResistance, DEFAULT_RESISTANCE } from "./utils"
|
|
1709
|
+
import type { ComponentProps } from "./types"
|
|
1710
|
+
|
|
1711
|
+
export const TestComponent = ({ name, value = DEFAULT_RESISTANCE }: ComponentProps) => (
|
|
1712
|
+
<resistor name={name} resistance={formatResistance(value)} />
|
|
1713
|
+
)`,
|
|
1714
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1715
|
+
is_text: true
|
|
1716
|
+
});
|
|
1717
|
+
db.addPackageFile({
|
|
1718
|
+
package_release_id: test2PackageReleaseId5,
|
|
1719
|
+
file_path: "utils.ts",
|
|
1720
|
+
content_text: `export const formatResistance = (value: number) => \`\${value}k\`
|
|
1721
|
+
export const DEFAULT_RESISTANCE = 50`,
|
|
1722
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1723
|
+
is_text: true
|
|
1724
|
+
});
|
|
1725
|
+
db.addPackageFile({
|
|
1726
|
+
package_release_id: test2PackageReleaseId5,
|
|
1727
|
+
file_path: "types.ts",
|
|
1728
|
+
content_text: `export interface ComponentProps {
|
|
1729
|
+
name: string
|
|
1730
|
+
value?: number
|
|
1731
|
+
}`,
|
|
1732
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1733
|
+
is_text: true
|
|
1734
|
+
});
|
|
1735
|
+
db.addPackageFile({
|
|
1736
|
+
package_release_id: test2PackageReleaseId5,
|
|
1737
|
+
file_path: "README.md",
|
|
1738
|
+
content_text: `# Test2 Package v0.0.6
|
|
1739
|
+
|
|
1740
|
+
Unreleased version - not marked as latest.
|
|
1741
|
+
|
|
1742
|
+
## Usage
|
|
1743
|
+
\`\`\`tsx
|
|
1744
|
+
import { TestComponent } from "@tsci/testuser.test2-package"
|
|
1745
|
+
|
|
1746
|
+
<TestComponent name="R1" value={50} />
|
|
1747
|
+
\`\`\``,
|
|
1748
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1749
|
+
is_text: true
|
|
1750
|
+
});
|
|
1687
1751
|
db.updatePackage(test2Package.package_id, {
|
|
1688
1752
|
latest_package_release_id: test2PackageReleaseId4
|
|
1689
1753
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/fake-snippets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.202",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -82,17 +82,17 @@
|
|
|
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.525",
|
|
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.658",
|
|
89
89
|
"@tscircuit/layout": "^0.0.29",
|
|
90
90
|
"@tscircuit/mm": "^0.0.8",
|
|
91
91
|
"@tscircuit/pcb-viewer": "1.11.343",
|
|
92
92
|
"@tscircuit/prompt-benchmarks": "^0.0.28",
|
|
93
93
|
"@tscircuit/props": "^0.0.433",
|
|
94
|
-
"@tscircuit/runframe": "^0.0.
|
|
95
|
-
"@tscircuit/schematic-viewer": "^2.0.
|
|
94
|
+
"@tscircuit/runframe": "^0.0.1651",
|
|
95
|
+
"@tscircuit/schematic-viewer": "^2.0.57",
|
|
96
96
|
"@tscircuit/simple-3d-svg": "^0.0.41",
|
|
97
97
|
"@types/babel__standalone": "^7.1.7",
|
|
98
98
|
"@types/bun": "^1.1.10",
|