sandlot 0.1.0

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.
Files changed (47) hide show
  1. package/README.md +616 -0
  2. package/dist/bundler.d.ts +148 -0
  3. package/dist/bundler.d.ts.map +1 -0
  4. package/dist/commands.d.ts +179 -0
  5. package/dist/commands.d.ts.map +1 -0
  6. package/dist/fs.d.ts +125 -0
  7. package/dist/fs.d.ts.map +1 -0
  8. package/dist/index.d.ts +16 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +2920 -0
  11. package/dist/internal.d.ts +74 -0
  12. package/dist/internal.d.ts.map +1 -0
  13. package/dist/internal.js +1897 -0
  14. package/dist/loader.d.ts +164 -0
  15. package/dist/loader.d.ts.map +1 -0
  16. package/dist/packages.d.ts +199 -0
  17. package/dist/packages.d.ts.map +1 -0
  18. package/dist/react.d.ts +159 -0
  19. package/dist/react.d.ts.map +1 -0
  20. package/dist/react.js +149 -0
  21. package/dist/sandbox-manager.d.ts +249 -0
  22. package/dist/sandbox-manager.d.ts.map +1 -0
  23. package/dist/sandbox.d.ts +193 -0
  24. package/dist/sandbox.d.ts.map +1 -0
  25. package/dist/shared-modules.d.ts +129 -0
  26. package/dist/shared-modules.d.ts.map +1 -0
  27. package/dist/shared-resources.d.ts +105 -0
  28. package/dist/shared-resources.d.ts.map +1 -0
  29. package/dist/ts-libs.d.ts +98 -0
  30. package/dist/ts-libs.d.ts.map +1 -0
  31. package/dist/typechecker.d.ts +127 -0
  32. package/dist/typechecker.d.ts.map +1 -0
  33. package/package.json +64 -0
  34. package/src/bundler.ts +513 -0
  35. package/src/commands.ts +733 -0
  36. package/src/fs.ts +935 -0
  37. package/src/index.ts +149 -0
  38. package/src/internal.ts +116 -0
  39. package/src/loader.ts +229 -0
  40. package/src/packages.ts +936 -0
  41. package/src/react.tsx +331 -0
  42. package/src/sandbox-manager.ts +490 -0
  43. package/src/sandbox.ts +402 -0
  44. package/src/shared-modules.ts +210 -0
  45. package/src/shared-resources.ts +169 -0
  46. package/src/ts-libs.ts +320 -0
  47. package/src/typechecker.ts +635 -0
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Sandlot Internal APIs
3
+ *
4
+ * These exports are for advanced use cases and may change without notice.
5
+ * Import from 'sandlot/internal' only when the main API doesn't meet your needs.
6
+ *
7
+ * @module sandlot/internal
8
+ */
9
+ /**
10
+ * Create a blob URL for a bundle. Prefer `loadModule` from 'sandlot' instead.
11
+ * Remember to call `revokeModuleUrl()` when done to free memory.
12
+ */
13
+ export { createModuleUrl, revokeModuleUrl } from "./loader";
14
+ /**
15
+ * Parse a package specifier like "lodash@4.17.21" into name and version.
16
+ */
17
+ export { parsePackageSpec } from "./packages";
18
+ /**
19
+ * Resolve an import path to an esm.sh URL using installed package versions.
20
+ */
21
+ export { resolveToEsmUrl } from "./packages";
22
+ /**
23
+ * Parse an import path into package name and subpath.
24
+ */
25
+ export { parseImportPath } from "./packages";
26
+ /**
27
+ * In-memory cache for package types (DTS files from esm.sh).
28
+ */
29
+ export { InMemoryTypesCache } from "./packages";
30
+ /**
31
+ * Parse `/// <reference lib="..." />` directives from TypeScript source.
32
+ */
33
+ export { parseLibReferences } from "./ts-libs";
34
+ /**
35
+ * Convert a lib name (e.g., "ES2020") to its filename (e.g., "lib.es2020.d.ts").
36
+ */
37
+ export { libNameToFileName } from "./ts-libs";
38
+ /**
39
+ * Extract the lib name from a filename (e.g., "lib.es2020.d.ts" -> "ES2020").
40
+ */
41
+ export { extractLibName } from "./ts-libs";
42
+ /**
43
+ * Fetch a single TypeScript lib file from CDN.
44
+ */
45
+ export { fetchLibFile } from "./ts-libs";
46
+ /**
47
+ * Fetch multiple TypeScript lib files, resolving dependencies.
48
+ */
49
+ export { fetchAllLibs } from "./ts-libs";
50
+ /**
51
+ * Cache for TypeScript lib files.
52
+ */
53
+ export { LibCache } from "./ts-libs";
54
+ /**
55
+ * The SharedModuleRegistry class. Prefer `registerSharedModules` from 'sandlot'.
56
+ */
57
+ export { SharedModuleRegistry } from "./shared-modules";
58
+ /**
59
+ * Get the global shared module registry instance.
60
+ */
61
+ export { getSharedModuleRegistry } from "./shared-modules";
62
+ /**
63
+ * Check if the global registry exists.
64
+ */
65
+ export { hasSharedModuleRegistry } from "./shared-modules";
66
+ /**
67
+ * Get the runtime code for accessing a shared module.
68
+ */
69
+ export { getSharedModuleRuntimeCode } from "./shared-modules";
70
+ /**
71
+ * Format esbuild messages for display.
72
+ */
73
+ export { formatEsbuildMessages } from "./commands";
74
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;GAGG;AACH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAM5D;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMhD;;GAEG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAMrC;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;GAEG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;GAEG;AACH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAM9D;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC"}