@immediately-run/sandpack-react 2.20.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 (582) hide show
  1. package/README.md +60 -0
  2. package/dist/.ir-build-stamp.json +6 -0
  3. package/dist/index.d.ts +1771 -0
  4. package/dist/index.js +5544 -0
  5. package/dist/index.mjs +5440 -0
  6. package/dist/src/components/CodeEditor/CodeMirror.d.ts +50 -0
  7. package/dist/src/components/CodeEditor/CodeMirror.d.ts.map +1 -0
  8. package/dist/src/components/CodeEditor/highlightDecorators.d.ts +4 -0
  9. package/dist/src/components/CodeEditor/highlightDecorators.d.ts.map +1 -0
  10. package/dist/src/components/CodeEditor/highlightInlineError.d.ts +3 -0
  11. package/dist/src/components/CodeEditor/highlightInlineError.d.ts.map +1 -0
  12. package/dist/src/components/CodeEditor/index.d.ts +50 -0
  13. package/dist/src/components/CodeEditor/index.d.ts.map +1 -0
  14. package/dist/src/components/CodeEditor/languages-mocks.d.ts +9 -0
  15. package/dist/src/components/CodeEditor/languages-mocks.d.ts.map +1 -0
  16. package/dist/src/components/CodeEditor/styles.css.d.ts +6 -0
  17. package/dist/src/components/CodeEditor/styles.css.d.ts.map +1 -0
  18. package/dist/src/components/CodeEditor/useSyntaxHighlight.d.ts +7 -0
  19. package/dist/src/components/CodeEditor/useSyntaxHighlight.d.ts.map +1 -0
  20. package/dist/src/components/CodeEditor/utils.d.ts +16 -0
  21. package/dist/src/components/CodeEditor/utils.d.ts.map +1 -0
  22. package/dist/src/components/CodeViewer/index.d.ts +28 -0
  23. package/dist/src/components/CodeViewer/index.d.ts.map +1 -0
  24. package/dist/src/components/Console/ConsoleList.css.d.ts +29 -0
  25. package/dist/src/components/Console/ConsoleList.css.d.ts.map +1 -0
  26. package/dist/src/components/Console/ConsoleList.d.ts +6 -0
  27. package/dist/src/components/Console/ConsoleList.d.ts.map +1 -0
  28. package/dist/src/components/Console/Header.css.d.ts +5 -0
  29. package/dist/src/components/Console/Header.css.d.ts.map +1 -0
  30. package/dist/src/components/Console/Header.d.ts +7 -0
  31. package/dist/src/components/Console/Header.d.ts.map +1 -0
  32. package/dist/src/components/Console/SandpackConsole.css.d.ts +4 -0
  33. package/dist/src/components/Console/SandpackConsole.css.d.ts.map +1 -0
  34. package/dist/src/components/Console/SandpackConsole.d.ts +27 -0
  35. package/dist/src/components/Console/SandpackConsole.d.ts.map +1 -0
  36. package/dist/src/components/Console/StdoutList.css.d.ts +2 -0
  37. package/dist/src/components/Console/StdoutList.css.d.ts.map +1 -0
  38. package/dist/src/components/Console/StdoutList.d.ts +8 -0
  39. package/dist/src/components/Console/StdoutList.d.ts.map +1 -0
  40. package/dist/src/components/Console/index.d.ts +3 -0
  41. package/dist/src/components/Console/index.d.ts.map +1 -0
  42. package/dist/src/components/Console/useSandpackConsole.d.ts +16 -0
  43. package/dist/src/components/Console/useSandpackConsole.d.ts.map +1 -0
  44. package/dist/src/components/Console/utils/constraints.d.ts +14 -0
  45. package/dist/src/components/Console/utils/constraints.d.ts.map +1 -0
  46. package/dist/src/components/Console/utils/fromConsoleToString.d.ts +13 -0
  47. package/dist/src/components/Console/utils/fromConsoleToString.d.ts.map +1 -0
  48. package/dist/src/components/Console/utils/getType.d.ts +8 -0
  49. package/dist/src/components/Console/utils/getType.d.ts.map +1 -0
  50. package/dist/src/components/Console/utils/transformers.d.ts +5 -0
  51. package/dist/src/components/Console/utils/transformers.d.ts.map +1 -0
  52. package/dist/src/components/FileExplorer/File.css.d.ts +2 -0
  53. package/dist/src/components/FileExplorer/File.css.d.ts.map +1 -0
  54. package/dist/src/components/FileExplorer/File.d.ts +11 -0
  55. package/dist/src/components/FileExplorer/File.d.ts.map +1 -0
  56. package/dist/src/components/FileExplorer/FileExplorer.css.d.ts +2 -0
  57. package/dist/src/components/FileExplorer/FileExplorer.css.d.ts.map +1 -0
  58. package/dist/src/components/FileExplorer/ModuleList.d.ts +25 -0
  59. package/dist/src/components/FileExplorer/ModuleList.d.ts.map +1 -0
  60. package/dist/src/components/FileExplorer/index.d.ts +13 -0
  61. package/dist/src/components/FileExplorer/index.d.ts.map +1 -0
  62. package/dist/src/components/FileExplorer/utils.d.ts +17 -0
  63. package/dist/src/components/FileExplorer/utils.d.ts.map +1 -0
  64. package/dist/src/components/FileTabs/FileTabs.css.d.ts +6 -0
  65. package/dist/src/components/FileTabs/FileTabs.css.d.ts.map +1 -0
  66. package/dist/src/components/FileTabs/index.d.ts +19 -0
  67. package/dist/src/components/FileTabs/index.d.ts.map +1 -0
  68. package/dist/src/components/Navigator/Navigator.css.d.ts +4 -0
  69. package/dist/src/components/Navigator/Navigator.css.d.ts.map +1 -0
  70. package/dist/src/components/Navigator/index.d.ts +8 -0
  71. package/dist/src/components/Navigator/index.d.ts.map +1 -0
  72. package/dist/src/components/Navigator/utils.d.ts +2 -0
  73. package/dist/src/components/Navigator/utils.d.ts.map +1 -0
  74. package/dist/src/components/Preview/Preview.css.d.ts +4 -0
  75. package/dist/src/components/Preview/Preview.css.d.ts.map +1 -0
  76. package/dist/src/components/Preview/index.d.ts +31 -0
  77. package/dist/src/components/Preview/index.d.ts.map +1 -0
  78. package/dist/src/components/ReactDevTools/ReactDevTools.css.d.ts +2 -0
  79. package/dist/src/components/ReactDevTools/ReactDevTools.css.d.ts.map +1 -0
  80. package/dist/src/components/ReactDevTools/index.d.ts +8 -0
  81. package/dist/src/components/ReactDevTools/index.d.ts.map +1 -0
  82. package/dist/src/components/Tests/Describes.css.d.ts +3 -0
  83. package/dist/src/components/Tests/Describes.css.d.ts.map +1 -0
  84. package/dist/src/components/Tests/Describes.d.ts +11 -0
  85. package/dist/src/components/Tests/Describes.d.ts.map +1 -0
  86. package/dist/src/components/Tests/FormattedError.css.d.ts +2 -0
  87. package/dist/src/components/Tests/FormattedError.css.d.ts.map +1 -0
  88. package/dist/src/components/Tests/FormattedError.d.ts +9 -0
  89. package/dist/src/components/Tests/FormattedError.d.ts.map +1 -0
  90. package/dist/src/components/Tests/Header.css.d.ts +5 -0
  91. package/dist/src/components/Tests/Header.css.d.ts.map +1 -0
  92. package/dist/src/components/Tests/Header.d.ts +18 -0
  93. package/dist/src/components/Tests/Header.d.ts.map +1 -0
  94. package/dist/src/components/Tests/RunButton.d.ts +5 -0
  95. package/dist/src/components/Tests/RunButton.d.ts.map +1 -0
  96. package/dist/src/components/Tests/SandpackTests.css.d.ts +4 -0
  97. package/dist/src/components/Tests/SandpackTests.css.d.ts.map +1 -0
  98. package/dist/src/components/Tests/SandpackTests.d.ts +18 -0
  99. package/dist/src/components/Tests/SandpackTests.d.ts.map +1 -0
  100. package/dist/src/components/Tests/Specs.css.d.ts +9 -0
  101. package/dist/src/components/Tests/Specs.css.d.ts.map +1 -0
  102. package/dist/src/components/Tests/Specs.d.ts +17 -0
  103. package/dist/src/components/Tests/Specs.d.ts.map +1 -0
  104. package/dist/src/components/Tests/Summary.css.d.ts +4 -0
  105. package/dist/src/components/Tests/Summary.css.d.ts.map +1 -0
  106. package/dist/src/components/Tests/Summary.d.ts +20 -0
  107. package/dist/src/components/Tests/Summary.d.ts.map +1 -0
  108. package/dist/src/components/Tests/Tests.css.d.ts +6 -0
  109. package/dist/src/components/Tests/Tests.css.d.ts.map +1 -0
  110. package/dist/src/components/Tests/Tests.d.ts +17 -0
  111. package/dist/src/components/Tests/Tests.d.ts.map +1 -0
  112. package/dist/src/components/Tests/index.d.ts +2 -0
  113. package/dist/src/components/Tests/index.d.ts.map +1 -0
  114. package/dist/src/components/Tests/style.css.d.ts +8 -0
  115. package/dist/src/components/Tests/style.css.d.ts.map +1 -0
  116. package/dist/src/components/Tests/style.d.ts +3 -0
  117. package/dist/src/components/Tests/style.d.ts.map +1 -0
  118. package/dist/src/components/Tests/utils.d.ts +14 -0
  119. package/dist/src/components/Tests/utils.d.ts.map +1 -0
  120. package/dist/src/components/TranspiledCode/TranspiledCode.css.d.ts +2 -0
  121. package/dist/src/components/TranspiledCode/TranspiledCode.css.d.ts.map +1 -0
  122. package/dist/src/components/TranspiledCode/index.d.ts +4 -0
  123. package/dist/src/components/TranspiledCode/index.d.ts.map +1 -0
  124. package/dist/src/components/common/DependenciesProgress.css.d.ts +2 -0
  125. package/dist/src/components/common/DependenciesProgress.css.d.ts.map +1 -0
  126. package/dist/src/components/common/DependenciesProgress.d.ts +4 -0
  127. package/dist/src/components/common/DependenciesProgress.d.ts.map +1 -0
  128. package/dist/src/components/common/ErrorOverlay.d.ts +6 -0
  129. package/dist/src/components/common/ErrorOverlay.d.ts.map +1 -0
  130. package/dist/src/components/common/Layout.css.d.ts +2 -0
  131. package/dist/src/components/common/Layout.css.d.ts.map +1 -0
  132. package/dist/src/components/common/Layout.d.ts +8 -0
  133. package/dist/src/components/common/Layout.d.ts.map +1 -0
  134. package/dist/src/components/common/Loading.css.d.ts +4 -0
  135. package/dist/src/components/common/Loading.css.d.ts.map +1 -0
  136. package/dist/src/components/common/Loading.d.ts +5 -0
  137. package/dist/src/components/common/Loading.d.ts.map +1 -0
  138. package/dist/src/components/common/LoadingOverlay.css.d.ts +5 -0
  139. package/dist/src/components/common/LoadingOverlay.css.d.ts.map +1 -0
  140. package/dist/src/components/common/LoadingOverlay.d.ts +12 -0
  141. package/dist/src/components/common/LoadingOverlay.d.ts.map +1 -0
  142. package/dist/src/components/common/OpenInCodeSandboxButton/OpenInCodeSandboxButton.d.ts +3 -0
  143. package/dist/src/components/common/OpenInCodeSandboxButton/OpenInCodeSandboxButton.d.ts.map +1 -0
  144. package/dist/src/components/common/OpenInCodeSandboxButton/UnstyledOpenInCodeSandboxButton.d.ts +7 -0
  145. package/dist/src/components/common/OpenInCodeSandboxButton/UnstyledOpenInCodeSandboxButton.d.ts.map +1 -0
  146. package/dist/src/components/common/OpenInCodeSandboxButton/index.d.ts +3 -0
  147. package/dist/src/components/common/OpenInCodeSandboxButton/index.d.ts.map +1 -0
  148. package/dist/src/components/common/RoundedButton.d.ts +3 -0
  149. package/dist/src/components/common/RoundedButton.d.ts.map +1 -0
  150. package/dist/src/components/common/RunButton.css.d.ts +2 -0
  151. package/dist/src/components/common/RunButton.css.d.ts.map +1 -0
  152. package/dist/src/components/common/RunButton.d.ts +3 -0
  153. package/dist/src/components/common/RunButton.d.ts.map +1 -0
  154. package/dist/src/components/common/Stack.css.d.ts +2 -0
  155. package/dist/src/components/common/Stack.css.d.ts.map +1 -0
  156. package/dist/src/components/common/Stack.d.ts +7 -0
  157. package/dist/src/components/common/Stack.d.ts.map +1 -0
  158. package/dist/src/components/common/index.d.ts +9 -0
  159. package/dist/src/components/common/index.d.ts.map +1 -0
  160. package/dist/src/components/icons/index.d.ts +16 -0
  161. package/dist/src/components/icons/index.d.ts.map +1 -0
  162. package/dist/src/components/index.d.ts +10 -0
  163. package/dist/src/components/index.d.ts.map +1 -0
  164. package/dist/src/contexts/sandpackContext.d.ts +11 -0
  165. package/dist/src/contexts/sandpackContext.d.ts.map +1 -0
  166. package/dist/src/contexts/utils/testHelpers.d.ts +9 -0
  167. package/dist/src/contexts/utils/testHelpers.d.ts.map +1 -0
  168. package/dist/src/contexts/utils/useAppState.d.ts +15 -0
  169. package/dist/src/contexts/utils/useAppState.d.ts.map +1 -0
  170. package/dist/src/contexts/utils/useClient.d.ts +32 -0
  171. package/dist/src/contexts/utils/useClient.d.ts.map +1 -0
  172. package/dist/src/contexts/utils/useFiles.d.ts +41 -0
  173. package/dist/src/contexts/utils/useFiles.d.ts.map +1 -0
  174. package/dist/src/hooks/index.d.ts +12 -0
  175. package/dist/src/hooks/index.d.ts.map +1 -0
  176. package/dist/src/hooks/useActiveCode.d.ts +21 -0
  177. package/dist/src/hooks/useActiveCode.d.ts.map +1 -0
  178. package/dist/src/hooks/useErrorMessage.d.ts +5 -0
  179. package/dist/src/hooks/useErrorMessage.d.ts.map +1 -0
  180. package/dist/src/hooks/useLoadingOverlayState.d.ts +7 -0
  181. package/dist/src/hooks/useLoadingOverlayState.d.ts.map +1 -0
  182. package/dist/src/hooks/useSandpack.d.ts +14 -0
  183. package/dist/src/hooks/useSandpack.d.ts.map +1 -0
  184. package/dist/src/hooks/useSandpackClient.d.ts +23 -0
  185. package/dist/src/hooks/useSandpackClient.d.ts.map +1 -0
  186. package/dist/src/hooks/useSandpackNavigation.d.ts +9 -0
  187. package/dist/src/hooks/useSandpackNavigation.d.ts.map +1 -0
  188. package/dist/src/hooks/useSandpackPreviewProgress.d.ts +5 -0
  189. package/dist/src/hooks/useSandpackPreviewProgress.d.ts.map +1 -0
  190. package/dist/src/hooks/useSandpackShell.d.ts +8 -0
  191. package/dist/src/hooks/useSandpackShell.d.ts.map +1 -0
  192. package/dist/src/hooks/useSandpackShellStdout.d.ts +12 -0
  193. package/dist/src/hooks/useSandpackShellStdout.d.ts.map +1 -0
  194. package/dist/src/hooks/useSandpackTheme.d.ts +10 -0
  195. package/dist/src/hooks/useSandpackTheme.d.ts.map +1 -0
  196. package/dist/src/hooks/useTranspiledCode.d.ts +5 -0
  197. package/dist/src/hooks/useTranspiledCode.d.ts.map +1 -0
  198. package/dist/src/index.d.ts +15 -0
  199. package/dist/src/index.d.ts.map +1 -0
  200. package/dist/src/presets/Sandpack.css.d.ts +20 -0
  201. package/dist/src/presets/Sandpack.css.d.ts.map +1 -0
  202. package/dist/src/presets/Sandpack.d.ts +3 -0
  203. package/dist/src/presets/Sandpack.d.ts.map +1 -0
  204. package/dist/src/presets/index.d.ts +2 -0
  205. package/dist/src/presets/index.d.ts.map +1 -0
  206. package/dist/src/setup.jest.d.ts +2 -0
  207. package/dist/src/setup.jest.d.ts.map +1 -0
  208. package/dist/src/styles/__generated__/cssText.d.ts +7 -0
  209. package/dist/src/styles/__generated__/cssText.d.ts.map +1 -0
  210. package/dist/src/styles/constants.d.ts +10 -0
  211. package/dist/src/styles/constants.d.ts.map +1 -0
  212. package/dist/src/styles/getSandpackCssText.d.ts +16 -0
  213. package/dist/src/styles/getSandpackCssText.d.ts.map +1 -0
  214. package/dist/src/styles/index.d.ts +65 -0
  215. package/dist/src/styles/index.d.ts.map +1 -0
  216. package/dist/src/styles/shared.css.d.ts +22 -0
  217. package/dist/src/styles/shared.css.d.ts.map +1 -0
  218. package/dist/src/styles/themeContext.css.d.ts +17 -0
  219. package/dist/src/styles/themeContext.css.d.ts.map +1 -0
  220. package/dist/src/styles/themeContext.d.ts +21 -0
  221. package/dist/src/styles/themeContext.d.ts.map +1 -0
  222. package/dist/src/styles/vars.css.d.ts +98 -0
  223. package/dist/src/styles/vars.css.d.ts.map +1 -0
  224. package/dist/src/templates/common.d.ts +6 -0
  225. package/dist/src/templates/common.d.ts.map +1 -0
  226. package/dist/src/templates/index.d.ts +549 -0
  227. package/dist/src/templates/index.d.ts.map +1 -0
  228. package/dist/src/templates/node/astro.d.ts +22 -0
  229. package/dist/src/templates/node/astro.d.ts.map +1 -0
  230. package/dist/src/templates/node/nexjs.d.ts +22 -0
  231. package/dist/src/templates/node/nexjs.d.ts.map +1 -0
  232. package/dist/src/templates/node/node.d.ts +13 -0
  233. package/dist/src/templates/node/node.d.ts.map +1 -0
  234. package/dist/src/templates/node/vite-preact-ts.d.ts +34 -0
  235. package/dist/src/templates/node/vite-preact-ts.d.ts.map +1 -0
  236. package/dist/src/templates/node/vite-preact.d.ts +25 -0
  237. package/dist/src/templates/node/vite-preact.d.ts.map +1 -0
  238. package/dist/src/templates/node/vite-react-ts.d.ts +34 -0
  239. package/dist/src/templates/node/vite-react-ts.d.ts.map +1 -0
  240. package/dist/src/templates/node/vite-react.d.ts +25 -0
  241. package/dist/src/templates/node/vite-react.d.ts.map +1 -0
  242. package/dist/src/templates/node/vite-svelte-ts.d.ts +37 -0
  243. package/dist/src/templates/node/vite-svelte-ts.d.ts.map +1 -0
  244. package/dist/src/templates/node/vite-svelte.d.ts +25 -0
  245. package/dist/src/templates/node/vite-svelte.d.ts.map +1 -0
  246. package/dist/src/templates/node/vite-vue-ts.d.ts +34 -0
  247. package/dist/src/templates/node/vite-vue-ts.d.ts.map +1 -0
  248. package/dist/src/templates/node/vite-vue.d.ts +25 -0
  249. package/dist/src/templates/node/vite-vue.d.ts.map +1 -0
  250. package/dist/src/templates/node/vite.d.ts +19 -0
  251. package/dist/src/templates/node/vite.d.ts.map +1 -0
  252. package/dist/src/templates/runtime/angular.d.ts +31 -0
  253. package/dist/src/templates/runtime/angular.d.ts.map +1 -0
  254. package/dist/src/templates/runtime/react-typescript.d.ts +25 -0
  255. package/dist/src/templates/runtime/react-typescript.d.ts.map +1 -0
  256. package/dist/src/templates/runtime/react.d.ts +22 -0
  257. package/dist/src/templates/runtime/react.d.ts.map +1 -0
  258. package/dist/src/templates/runtime/solid.d.ts +22 -0
  259. package/dist/src/templates/runtime/solid.d.ts.map +1 -0
  260. package/dist/src/templates/runtime/svelte.d.ts +22 -0
  261. package/dist/src/templates/runtime/svelte.d.ts.map +1 -0
  262. package/dist/src/templates/runtime/tests-ts.d.ts +20 -0
  263. package/dist/src/templates/runtime/tests-ts.d.ts.map +1 -0
  264. package/dist/src/templates/runtime/vanilla-typescript.d.ts +22 -0
  265. package/dist/src/templates/runtime/vanilla-typescript.d.ts.map +1 -0
  266. package/dist/src/templates/runtime/vanilla.d.ts +19 -0
  267. package/dist/src/templates/runtime/vanilla.d.ts.map +1 -0
  268. package/dist/src/templates/runtime/vue-ts.d.ts +26 -0
  269. package/dist/src/templates/runtime/vue-ts.d.ts.map +1 -0
  270. package/dist/src/templates/runtime/vue.d.ts +22 -0
  271. package/dist/src/templates/runtime/vue.d.ts.map +1 -0
  272. package/dist/src/templates/static.d.ts +16 -0
  273. package/dist/src/templates/static.d.ts.map +1 -0
  274. package/dist/src/themes/index.d.ts +14 -0
  275. package/dist/src/themes/index.d.ts.map +1 -0
  276. package/dist/src/types.d.ts +477 -0
  277. package/dist/src/types.d.ts.map +1 -0
  278. package/dist/src/utils/ansi-to-react.d.ts +13 -0
  279. package/dist/src/utils/ansi-to-react.d.ts.map +1 -0
  280. package/dist/src/utils/array.d.ts +2 -0
  281. package/dist/src/utils/array.d.ts.map +1 -0
  282. package/dist/src/utils/classNames.d.ts +6 -0
  283. package/dist/src/utils/classNames.d.ts.map +1 -0
  284. package/dist/src/utils/createSandpackFS.d.ts +35 -0
  285. package/dist/src/utils/createSandpackFS.d.ts.map +1 -0
  286. package/dist/src/utils/storyHelpers.d.ts +9 -0
  287. package/dist/src/utils/storyHelpers.d.ts.map +1 -0
  288. package/dist/src/utils/stringUtils.d.ts +10 -0
  289. package/dist/src/utils/stringUtils.d.ts.map +1 -0
  290. package/dist/src/utils/useAsyncSandpackId.d.ts +9 -0
  291. package/dist/src/utils/useAsyncSandpackId.d.ts.map +1 -0
  292. package/dist/styles.css +890 -0
  293. package/dist/unstyled/index.js +5942 -0
  294. package/dist/unstyled/index.mjs +5838 -0
  295. package/dist/unstyled/src/components/CodeEditor/CodeMirror.d.ts +50 -0
  296. package/dist/unstyled/src/components/CodeEditor/CodeMirror.d.ts.map +1 -0
  297. package/dist/unstyled/src/components/CodeEditor/highlightDecorators.d.ts +4 -0
  298. package/dist/unstyled/src/components/CodeEditor/highlightDecorators.d.ts.map +1 -0
  299. package/dist/unstyled/src/components/CodeEditor/highlightInlineError.d.ts +3 -0
  300. package/dist/unstyled/src/components/CodeEditor/highlightInlineError.d.ts.map +1 -0
  301. package/dist/unstyled/src/components/CodeEditor/index.d.ts +50 -0
  302. package/dist/unstyled/src/components/CodeEditor/index.d.ts.map +1 -0
  303. package/dist/unstyled/src/components/CodeEditor/languages-mocks.d.ts +9 -0
  304. package/dist/unstyled/src/components/CodeEditor/languages-mocks.d.ts.map +1 -0
  305. package/dist/unstyled/src/components/CodeEditor/styles.css.d.ts +6 -0
  306. package/dist/unstyled/src/components/CodeEditor/styles.css.d.ts.map +1 -0
  307. package/dist/unstyled/src/components/CodeEditor/useSyntaxHighlight.d.ts +7 -0
  308. package/dist/unstyled/src/components/CodeEditor/useSyntaxHighlight.d.ts.map +1 -0
  309. package/dist/unstyled/src/components/CodeEditor/utils.d.ts +16 -0
  310. package/dist/unstyled/src/components/CodeEditor/utils.d.ts.map +1 -0
  311. package/dist/unstyled/src/components/CodeViewer/index.d.ts +28 -0
  312. package/dist/unstyled/src/components/CodeViewer/index.d.ts.map +1 -0
  313. package/dist/unstyled/src/components/Console/ConsoleList.css.d.ts +29 -0
  314. package/dist/unstyled/src/components/Console/ConsoleList.css.d.ts.map +1 -0
  315. package/dist/unstyled/src/components/Console/ConsoleList.d.ts +6 -0
  316. package/dist/unstyled/src/components/Console/ConsoleList.d.ts.map +1 -0
  317. package/dist/unstyled/src/components/Console/Header.css.d.ts +5 -0
  318. package/dist/unstyled/src/components/Console/Header.css.d.ts.map +1 -0
  319. package/dist/unstyled/src/components/Console/Header.d.ts +7 -0
  320. package/dist/unstyled/src/components/Console/Header.d.ts.map +1 -0
  321. package/dist/unstyled/src/components/Console/SandpackConsole.css.d.ts +4 -0
  322. package/dist/unstyled/src/components/Console/SandpackConsole.css.d.ts.map +1 -0
  323. package/dist/unstyled/src/components/Console/SandpackConsole.d.ts +27 -0
  324. package/dist/unstyled/src/components/Console/SandpackConsole.d.ts.map +1 -0
  325. package/dist/unstyled/src/components/Console/StdoutList.css.d.ts +2 -0
  326. package/dist/unstyled/src/components/Console/StdoutList.css.d.ts.map +1 -0
  327. package/dist/unstyled/src/components/Console/StdoutList.d.ts +8 -0
  328. package/dist/unstyled/src/components/Console/StdoutList.d.ts.map +1 -0
  329. package/dist/unstyled/src/components/Console/index.d.ts +3 -0
  330. package/dist/unstyled/src/components/Console/index.d.ts.map +1 -0
  331. package/dist/unstyled/src/components/Console/useSandpackConsole.d.ts +16 -0
  332. package/dist/unstyled/src/components/Console/useSandpackConsole.d.ts.map +1 -0
  333. package/dist/unstyled/src/components/Console/utils/constraints.d.ts +14 -0
  334. package/dist/unstyled/src/components/Console/utils/constraints.d.ts.map +1 -0
  335. package/dist/unstyled/src/components/Console/utils/fromConsoleToString.d.ts +13 -0
  336. package/dist/unstyled/src/components/Console/utils/fromConsoleToString.d.ts.map +1 -0
  337. package/dist/unstyled/src/components/Console/utils/getType.d.ts +8 -0
  338. package/dist/unstyled/src/components/Console/utils/getType.d.ts.map +1 -0
  339. package/dist/unstyled/src/components/Console/utils/transformers.d.ts +5 -0
  340. package/dist/unstyled/src/components/Console/utils/transformers.d.ts.map +1 -0
  341. package/dist/unstyled/src/components/FileExplorer/File.css.d.ts +2 -0
  342. package/dist/unstyled/src/components/FileExplorer/File.css.d.ts.map +1 -0
  343. package/dist/unstyled/src/components/FileExplorer/File.d.ts +11 -0
  344. package/dist/unstyled/src/components/FileExplorer/File.d.ts.map +1 -0
  345. package/dist/unstyled/src/components/FileExplorer/FileExplorer.css.d.ts +2 -0
  346. package/dist/unstyled/src/components/FileExplorer/FileExplorer.css.d.ts.map +1 -0
  347. package/dist/unstyled/src/components/FileExplorer/ModuleList.d.ts +25 -0
  348. package/dist/unstyled/src/components/FileExplorer/ModuleList.d.ts.map +1 -0
  349. package/dist/unstyled/src/components/FileExplorer/index.d.ts +13 -0
  350. package/dist/unstyled/src/components/FileExplorer/index.d.ts.map +1 -0
  351. package/dist/unstyled/src/components/FileExplorer/utils.d.ts +17 -0
  352. package/dist/unstyled/src/components/FileExplorer/utils.d.ts.map +1 -0
  353. package/dist/unstyled/src/components/FileTabs/FileTabs.css.d.ts +6 -0
  354. package/dist/unstyled/src/components/FileTabs/FileTabs.css.d.ts.map +1 -0
  355. package/dist/unstyled/src/components/FileTabs/index.d.ts +19 -0
  356. package/dist/unstyled/src/components/FileTabs/index.d.ts.map +1 -0
  357. package/dist/unstyled/src/components/Navigator/Navigator.css.d.ts +4 -0
  358. package/dist/unstyled/src/components/Navigator/Navigator.css.d.ts.map +1 -0
  359. package/dist/unstyled/src/components/Navigator/index.d.ts +8 -0
  360. package/dist/unstyled/src/components/Navigator/index.d.ts.map +1 -0
  361. package/dist/unstyled/src/components/Navigator/utils.d.ts +2 -0
  362. package/dist/unstyled/src/components/Navigator/utils.d.ts.map +1 -0
  363. package/dist/unstyled/src/components/Preview/Preview.css.d.ts +4 -0
  364. package/dist/unstyled/src/components/Preview/Preview.css.d.ts.map +1 -0
  365. package/dist/unstyled/src/components/Preview/index.d.ts +31 -0
  366. package/dist/unstyled/src/components/Preview/index.d.ts.map +1 -0
  367. package/dist/unstyled/src/components/ReactDevTools/ReactDevTools.css.d.ts +2 -0
  368. package/dist/unstyled/src/components/ReactDevTools/ReactDevTools.css.d.ts.map +1 -0
  369. package/dist/unstyled/src/components/ReactDevTools/index.d.ts +8 -0
  370. package/dist/unstyled/src/components/ReactDevTools/index.d.ts.map +1 -0
  371. package/dist/unstyled/src/components/Tests/Describes.css.d.ts +3 -0
  372. package/dist/unstyled/src/components/Tests/Describes.css.d.ts.map +1 -0
  373. package/dist/unstyled/src/components/Tests/Describes.d.ts +11 -0
  374. package/dist/unstyled/src/components/Tests/Describes.d.ts.map +1 -0
  375. package/dist/unstyled/src/components/Tests/FormattedError.css.d.ts +2 -0
  376. package/dist/unstyled/src/components/Tests/FormattedError.css.d.ts.map +1 -0
  377. package/dist/unstyled/src/components/Tests/FormattedError.d.ts +9 -0
  378. package/dist/unstyled/src/components/Tests/FormattedError.d.ts.map +1 -0
  379. package/dist/unstyled/src/components/Tests/Header.css.d.ts +5 -0
  380. package/dist/unstyled/src/components/Tests/Header.css.d.ts.map +1 -0
  381. package/dist/unstyled/src/components/Tests/Header.d.ts +18 -0
  382. package/dist/unstyled/src/components/Tests/Header.d.ts.map +1 -0
  383. package/dist/unstyled/src/components/Tests/RunButton.d.ts +5 -0
  384. package/dist/unstyled/src/components/Tests/RunButton.d.ts.map +1 -0
  385. package/dist/unstyled/src/components/Tests/SandpackTests.css.d.ts +4 -0
  386. package/dist/unstyled/src/components/Tests/SandpackTests.css.d.ts.map +1 -0
  387. package/dist/unstyled/src/components/Tests/SandpackTests.d.ts +18 -0
  388. package/dist/unstyled/src/components/Tests/SandpackTests.d.ts.map +1 -0
  389. package/dist/unstyled/src/components/Tests/Specs.css.d.ts +9 -0
  390. package/dist/unstyled/src/components/Tests/Specs.css.d.ts.map +1 -0
  391. package/dist/unstyled/src/components/Tests/Specs.d.ts +17 -0
  392. package/dist/unstyled/src/components/Tests/Specs.d.ts.map +1 -0
  393. package/dist/unstyled/src/components/Tests/Summary.css.d.ts +4 -0
  394. package/dist/unstyled/src/components/Tests/Summary.css.d.ts.map +1 -0
  395. package/dist/unstyled/src/components/Tests/Summary.d.ts +20 -0
  396. package/dist/unstyled/src/components/Tests/Summary.d.ts.map +1 -0
  397. package/dist/unstyled/src/components/Tests/Tests.css.d.ts +6 -0
  398. package/dist/unstyled/src/components/Tests/Tests.css.d.ts.map +1 -0
  399. package/dist/unstyled/src/components/Tests/Tests.d.ts +17 -0
  400. package/dist/unstyled/src/components/Tests/Tests.d.ts.map +1 -0
  401. package/dist/unstyled/src/components/Tests/index.d.ts +2 -0
  402. package/dist/unstyled/src/components/Tests/index.d.ts.map +1 -0
  403. package/dist/unstyled/src/components/Tests/style.css.d.ts +8 -0
  404. package/dist/unstyled/src/components/Tests/style.css.d.ts.map +1 -0
  405. package/dist/unstyled/src/components/Tests/style.d.ts +3 -0
  406. package/dist/unstyled/src/components/Tests/style.d.ts.map +1 -0
  407. package/dist/unstyled/src/components/Tests/utils.d.ts +14 -0
  408. package/dist/unstyled/src/components/Tests/utils.d.ts.map +1 -0
  409. package/dist/unstyled/src/components/TranspiledCode/TranspiledCode.css.d.ts +2 -0
  410. package/dist/unstyled/src/components/TranspiledCode/TranspiledCode.css.d.ts.map +1 -0
  411. package/dist/unstyled/src/components/TranspiledCode/index.d.ts +4 -0
  412. package/dist/unstyled/src/components/TranspiledCode/index.d.ts.map +1 -0
  413. package/dist/unstyled/src/components/common/DependenciesProgress.css.d.ts +2 -0
  414. package/dist/unstyled/src/components/common/DependenciesProgress.css.d.ts.map +1 -0
  415. package/dist/unstyled/src/components/common/DependenciesProgress.d.ts +4 -0
  416. package/dist/unstyled/src/components/common/DependenciesProgress.d.ts.map +1 -0
  417. package/dist/unstyled/src/components/common/ErrorOverlay.d.ts +6 -0
  418. package/dist/unstyled/src/components/common/ErrorOverlay.d.ts.map +1 -0
  419. package/dist/unstyled/src/components/common/Layout.css.d.ts +2 -0
  420. package/dist/unstyled/src/components/common/Layout.css.d.ts.map +1 -0
  421. package/dist/unstyled/src/components/common/Layout.d.ts +8 -0
  422. package/dist/unstyled/src/components/common/Layout.d.ts.map +1 -0
  423. package/dist/unstyled/src/components/common/Loading.css.d.ts +4 -0
  424. package/dist/unstyled/src/components/common/Loading.css.d.ts.map +1 -0
  425. package/dist/unstyled/src/components/common/Loading.d.ts +5 -0
  426. package/dist/unstyled/src/components/common/Loading.d.ts.map +1 -0
  427. package/dist/unstyled/src/components/common/LoadingOverlay.css.d.ts +5 -0
  428. package/dist/unstyled/src/components/common/LoadingOverlay.css.d.ts.map +1 -0
  429. package/dist/unstyled/src/components/common/LoadingOverlay.d.ts +12 -0
  430. package/dist/unstyled/src/components/common/LoadingOverlay.d.ts.map +1 -0
  431. package/dist/unstyled/src/components/common/OpenInCodeSandboxButton/OpenInCodeSandboxButton.d.ts +3 -0
  432. package/dist/unstyled/src/components/common/OpenInCodeSandboxButton/OpenInCodeSandboxButton.d.ts.map +1 -0
  433. package/dist/unstyled/src/components/common/OpenInCodeSandboxButton/UnstyledOpenInCodeSandboxButton.d.ts +7 -0
  434. package/dist/unstyled/src/components/common/OpenInCodeSandboxButton/UnstyledOpenInCodeSandboxButton.d.ts.map +1 -0
  435. package/dist/unstyled/src/components/common/OpenInCodeSandboxButton/index.d.ts +3 -0
  436. package/dist/unstyled/src/components/common/OpenInCodeSandboxButton/index.d.ts.map +1 -0
  437. package/dist/unstyled/src/components/common/RoundedButton.d.ts +3 -0
  438. package/dist/unstyled/src/components/common/RoundedButton.d.ts.map +1 -0
  439. package/dist/unstyled/src/components/common/RunButton.css.d.ts +2 -0
  440. package/dist/unstyled/src/components/common/RunButton.css.d.ts.map +1 -0
  441. package/dist/unstyled/src/components/common/RunButton.d.ts +3 -0
  442. package/dist/unstyled/src/components/common/RunButton.d.ts.map +1 -0
  443. package/dist/unstyled/src/components/common/Stack.css.d.ts +2 -0
  444. package/dist/unstyled/src/components/common/Stack.css.d.ts.map +1 -0
  445. package/dist/unstyled/src/components/common/Stack.d.ts +7 -0
  446. package/dist/unstyled/src/components/common/Stack.d.ts.map +1 -0
  447. package/dist/unstyled/src/components/common/index.d.ts +9 -0
  448. package/dist/unstyled/src/components/common/index.d.ts.map +1 -0
  449. package/dist/unstyled/src/components/icons/index.d.ts +16 -0
  450. package/dist/unstyled/src/components/icons/index.d.ts.map +1 -0
  451. package/dist/unstyled/src/components/index.d.ts +10 -0
  452. package/dist/unstyled/src/components/index.d.ts.map +1 -0
  453. package/dist/unstyled/src/contexts/sandpackContext.d.ts +11 -0
  454. package/dist/unstyled/src/contexts/sandpackContext.d.ts.map +1 -0
  455. package/dist/unstyled/src/contexts/utils/testHelpers.d.ts +9 -0
  456. package/dist/unstyled/src/contexts/utils/testHelpers.d.ts.map +1 -0
  457. package/dist/unstyled/src/contexts/utils/useAppState.d.ts +15 -0
  458. package/dist/unstyled/src/contexts/utils/useAppState.d.ts.map +1 -0
  459. package/dist/unstyled/src/contexts/utils/useClient.d.ts +32 -0
  460. package/dist/unstyled/src/contexts/utils/useClient.d.ts.map +1 -0
  461. package/dist/unstyled/src/contexts/utils/useFiles.d.ts +41 -0
  462. package/dist/unstyled/src/contexts/utils/useFiles.d.ts.map +1 -0
  463. package/dist/unstyled/src/hooks/index.d.ts +12 -0
  464. package/dist/unstyled/src/hooks/index.d.ts.map +1 -0
  465. package/dist/unstyled/src/hooks/useActiveCode.d.ts +21 -0
  466. package/dist/unstyled/src/hooks/useActiveCode.d.ts.map +1 -0
  467. package/dist/unstyled/src/hooks/useErrorMessage.d.ts +5 -0
  468. package/dist/unstyled/src/hooks/useErrorMessage.d.ts.map +1 -0
  469. package/dist/unstyled/src/hooks/useLoadingOverlayState.d.ts +7 -0
  470. package/dist/unstyled/src/hooks/useLoadingOverlayState.d.ts.map +1 -0
  471. package/dist/unstyled/src/hooks/useSandpack.d.ts +14 -0
  472. package/dist/unstyled/src/hooks/useSandpack.d.ts.map +1 -0
  473. package/dist/unstyled/src/hooks/useSandpackClient.d.ts +23 -0
  474. package/dist/unstyled/src/hooks/useSandpackClient.d.ts.map +1 -0
  475. package/dist/unstyled/src/hooks/useSandpackNavigation.d.ts +9 -0
  476. package/dist/unstyled/src/hooks/useSandpackNavigation.d.ts.map +1 -0
  477. package/dist/unstyled/src/hooks/useSandpackPreviewProgress.d.ts +5 -0
  478. package/dist/unstyled/src/hooks/useSandpackPreviewProgress.d.ts.map +1 -0
  479. package/dist/unstyled/src/hooks/useSandpackShell.d.ts +8 -0
  480. package/dist/unstyled/src/hooks/useSandpackShell.d.ts.map +1 -0
  481. package/dist/unstyled/src/hooks/useSandpackShellStdout.d.ts +12 -0
  482. package/dist/unstyled/src/hooks/useSandpackShellStdout.d.ts.map +1 -0
  483. package/dist/unstyled/src/hooks/useSandpackTheme.d.ts +10 -0
  484. package/dist/unstyled/src/hooks/useSandpackTheme.d.ts.map +1 -0
  485. package/dist/unstyled/src/hooks/useTranspiledCode.d.ts +5 -0
  486. package/dist/unstyled/src/hooks/useTranspiledCode.d.ts.map +1 -0
  487. package/dist/unstyled/src/index.d.ts +15 -0
  488. package/dist/unstyled/src/index.d.ts.map +1 -0
  489. package/dist/unstyled/src/presets/Sandpack.css.d.ts +20 -0
  490. package/dist/unstyled/src/presets/Sandpack.css.d.ts.map +1 -0
  491. package/dist/unstyled/src/presets/Sandpack.d.ts +3 -0
  492. package/dist/unstyled/src/presets/Sandpack.d.ts.map +1 -0
  493. package/dist/unstyled/src/presets/index.d.ts +2 -0
  494. package/dist/unstyled/src/presets/index.d.ts.map +1 -0
  495. package/dist/unstyled/src/setup.jest.d.ts +2 -0
  496. package/dist/unstyled/src/setup.jest.d.ts.map +1 -0
  497. package/dist/unstyled/src/styles/__generated__/cssText.d.ts +7 -0
  498. package/dist/unstyled/src/styles/__generated__/cssText.d.ts.map +1 -0
  499. package/dist/unstyled/src/styles/constants.d.ts +10 -0
  500. package/dist/unstyled/src/styles/constants.d.ts.map +1 -0
  501. package/dist/unstyled/src/styles/getSandpackCssText.d.ts +16 -0
  502. package/dist/unstyled/src/styles/getSandpackCssText.d.ts.map +1 -0
  503. package/dist/unstyled/src/styles/index.d.ts +65 -0
  504. package/dist/unstyled/src/styles/index.d.ts.map +1 -0
  505. package/dist/unstyled/src/styles/shared.css.d.ts +22 -0
  506. package/dist/unstyled/src/styles/shared.css.d.ts.map +1 -0
  507. package/dist/unstyled/src/styles/themeContext.css.d.ts +17 -0
  508. package/dist/unstyled/src/styles/themeContext.css.d.ts.map +1 -0
  509. package/dist/unstyled/src/styles/themeContext.d.ts +21 -0
  510. package/dist/unstyled/src/styles/themeContext.d.ts.map +1 -0
  511. package/dist/unstyled/src/styles/vars.css.d.ts +98 -0
  512. package/dist/unstyled/src/styles/vars.css.d.ts.map +1 -0
  513. package/dist/unstyled/src/templates/common.d.ts +6 -0
  514. package/dist/unstyled/src/templates/common.d.ts.map +1 -0
  515. package/dist/unstyled/src/templates/index.d.ts +549 -0
  516. package/dist/unstyled/src/templates/index.d.ts.map +1 -0
  517. package/dist/unstyled/src/templates/node/astro.d.ts +22 -0
  518. package/dist/unstyled/src/templates/node/astro.d.ts.map +1 -0
  519. package/dist/unstyled/src/templates/node/nexjs.d.ts +22 -0
  520. package/dist/unstyled/src/templates/node/nexjs.d.ts.map +1 -0
  521. package/dist/unstyled/src/templates/node/node.d.ts +13 -0
  522. package/dist/unstyled/src/templates/node/node.d.ts.map +1 -0
  523. package/dist/unstyled/src/templates/node/vite-preact-ts.d.ts +34 -0
  524. package/dist/unstyled/src/templates/node/vite-preact-ts.d.ts.map +1 -0
  525. package/dist/unstyled/src/templates/node/vite-preact.d.ts +25 -0
  526. package/dist/unstyled/src/templates/node/vite-preact.d.ts.map +1 -0
  527. package/dist/unstyled/src/templates/node/vite-react-ts.d.ts +34 -0
  528. package/dist/unstyled/src/templates/node/vite-react-ts.d.ts.map +1 -0
  529. package/dist/unstyled/src/templates/node/vite-react.d.ts +25 -0
  530. package/dist/unstyled/src/templates/node/vite-react.d.ts.map +1 -0
  531. package/dist/unstyled/src/templates/node/vite-svelte-ts.d.ts +37 -0
  532. package/dist/unstyled/src/templates/node/vite-svelte-ts.d.ts.map +1 -0
  533. package/dist/unstyled/src/templates/node/vite-svelte.d.ts +25 -0
  534. package/dist/unstyled/src/templates/node/vite-svelte.d.ts.map +1 -0
  535. package/dist/unstyled/src/templates/node/vite-vue-ts.d.ts +34 -0
  536. package/dist/unstyled/src/templates/node/vite-vue-ts.d.ts.map +1 -0
  537. package/dist/unstyled/src/templates/node/vite-vue.d.ts +25 -0
  538. package/dist/unstyled/src/templates/node/vite-vue.d.ts.map +1 -0
  539. package/dist/unstyled/src/templates/node/vite.d.ts +19 -0
  540. package/dist/unstyled/src/templates/node/vite.d.ts.map +1 -0
  541. package/dist/unstyled/src/templates/runtime/angular.d.ts +31 -0
  542. package/dist/unstyled/src/templates/runtime/angular.d.ts.map +1 -0
  543. package/dist/unstyled/src/templates/runtime/react-typescript.d.ts +25 -0
  544. package/dist/unstyled/src/templates/runtime/react-typescript.d.ts.map +1 -0
  545. package/dist/unstyled/src/templates/runtime/react.d.ts +22 -0
  546. package/dist/unstyled/src/templates/runtime/react.d.ts.map +1 -0
  547. package/dist/unstyled/src/templates/runtime/solid.d.ts +22 -0
  548. package/dist/unstyled/src/templates/runtime/solid.d.ts.map +1 -0
  549. package/dist/unstyled/src/templates/runtime/svelte.d.ts +22 -0
  550. package/dist/unstyled/src/templates/runtime/svelte.d.ts.map +1 -0
  551. package/dist/unstyled/src/templates/runtime/tests-ts.d.ts +20 -0
  552. package/dist/unstyled/src/templates/runtime/tests-ts.d.ts.map +1 -0
  553. package/dist/unstyled/src/templates/runtime/vanilla-typescript.d.ts +22 -0
  554. package/dist/unstyled/src/templates/runtime/vanilla-typescript.d.ts.map +1 -0
  555. package/dist/unstyled/src/templates/runtime/vanilla.d.ts +19 -0
  556. package/dist/unstyled/src/templates/runtime/vanilla.d.ts.map +1 -0
  557. package/dist/unstyled/src/templates/runtime/vue-ts.d.ts +26 -0
  558. package/dist/unstyled/src/templates/runtime/vue-ts.d.ts.map +1 -0
  559. package/dist/unstyled/src/templates/runtime/vue.d.ts +22 -0
  560. package/dist/unstyled/src/templates/runtime/vue.d.ts.map +1 -0
  561. package/dist/unstyled/src/templates/static.d.ts +16 -0
  562. package/dist/unstyled/src/templates/static.d.ts.map +1 -0
  563. package/dist/unstyled/src/themes/index.d.ts +14 -0
  564. package/dist/unstyled/src/themes/index.d.ts.map +1 -0
  565. package/dist/unstyled/src/types.d.ts +477 -0
  566. package/dist/unstyled/src/types.d.ts.map +1 -0
  567. package/dist/unstyled/src/utils/ansi-to-react.d.ts +13 -0
  568. package/dist/unstyled/src/utils/ansi-to-react.d.ts.map +1 -0
  569. package/dist/unstyled/src/utils/array.d.ts +2 -0
  570. package/dist/unstyled/src/utils/array.d.ts.map +1 -0
  571. package/dist/unstyled/src/utils/classNames.d.ts +6 -0
  572. package/dist/unstyled/src/utils/classNames.d.ts.map +1 -0
  573. package/dist/unstyled/src/utils/createSandpackFS.d.ts +35 -0
  574. package/dist/unstyled/src/utils/createSandpackFS.d.ts.map +1 -0
  575. package/dist/unstyled/src/utils/storyHelpers.d.ts +9 -0
  576. package/dist/unstyled/src/utils/storyHelpers.d.ts.map +1 -0
  577. package/dist/unstyled/src/utils/stringUtils.d.ts +10 -0
  578. package/dist/unstyled/src/utils/stringUtils.d.ts.map +1 -0
  579. package/dist/unstyled/src/utils/useAsyncSandpackId.d.ts +9 -0
  580. package/dist/unstyled/src/utils/useAsyncSandpackId.d.ts.map +1 -0
  581. package/dist/unstyled.d.ts +1 -0
  582. package/package.json +108 -0
@@ -0,0 +1,16 @@
1
+ export declare const STATIC_TEMPLATE: {
2
+ files: {
3
+ "/index.html": {
4
+ code: string;
5
+ };
6
+ "/package.json": {
7
+ code: string;
8
+ };
9
+ "/styles.css": {
10
+ code: string;
11
+ };
12
+ };
13
+ main: string;
14
+ environment: string;
15
+ };
16
+ //# sourceMappingURL=static.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../src/templates/static.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CA4B3B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { SandpackTheme, SandpackPredefinedTheme } from "../types";
2
+ /**
3
+ * @category Theme
4
+ */
5
+ export declare const defaultLight: SandpackTheme;
6
+ /**
7
+ * @category Theme
8
+ */
9
+ export declare const defaultDark: SandpackTheme;
10
+ /**
11
+ * @category Theme
12
+ */
13
+ export declare const SANDPACK_THEMES: Record<SandpackPredefinedTheme, SandpackTheme>;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/themes/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,aAkC1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,aAkCzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,uBAAuB,EAAE,aAAa,CAS1E,CAAC"}
@@ -0,0 +1,477 @@
1
+ import type { LanguageSupport } from "@codemirror/language";
2
+ import type { BundlerState, FileMetaMap, ListenerFunction, NpmRegistry, ReactDevToolsMode, SandpackClient, SandpackError, SandpackFS, SandpackMessage, SdkIntegrity, FsSnapshot, UnsubscribeFunction, SandpackLogLevel } from "@immediately-run/sandpack-client";
3
+ import type React from "react";
4
+ import type { ClientPropsOverride } from "./contexts/utils/useClient";
5
+ import type { SANDBOX_TEMPLATES } from "./templates";
6
+ import type { CodeEditorProps } from ".";
7
+ /**
8
+ * ------------------------ Public documentation ------------------------
9
+ *
10
+ * From this section on, all types are artificially created and maintained
11
+ * for public documentation purposes. So, this might not reflect precisely
12
+ * the component behavior, but it still needs to be reliable and clear for
13
+ * general usage.
14
+ */
15
+ export interface SandpackExportOptions {
16
+ /**
17
+ * Workspace API key from codesandbox.io/t/permissions.
18
+ * When set, the sandbox will be created inside the given workspace id.
19
+ */
20
+ apiToken: string;
21
+ /**
22
+ * The default visibility of the new sandboxes inside the workspace.
23
+ *
24
+ * @note Use `private` if there is a private registry or private NPM
25
+ * configured in your workspace.
26
+ */
27
+ privacy: "private" | "public";
28
+ }
29
+ export interface SandpackProps {
30
+ /**
31
+ * The fully-initialized filesystem to use as the source of truth.
32
+ * Create one with {@link createSandpackFS}.
33
+ */
34
+ fs: SandpackFS;
35
+ /**
36
+ * The theme specifies the color set of the components, syntax highlight,
37
+ * and typography. Use this prop in order to match the design aspect of your website.
38
+ *
39
+ * Set as `auto` to turn it color scheme sensitive
40
+ */
41
+ theme?: SandpackThemeProp;
42
+ /**
43
+ * Pass custom properties to customize the interface and the behavior
44
+ * of the sandbox, such as initialization mode, recompile mode, etc.
45
+ */
46
+ options?: SandpackOptions;
47
+ /**
48
+ * CodeSandbox team id: with this information, bundler can connect to CodeSandbox
49
+ * and unlock a few capabilities, like private dependencies.
50
+ */
51
+ teamId?: string;
52
+ /**
53
+ * Options for exporting the sandbox to CodeSandbox.
54
+ */
55
+ exportOptions?: SandpackExportOptions;
56
+ /**
57
+ * Custom npm registry configuration.
58
+ */
59
+ npmRegistries?: NpmRegistry[];
60
+ }
61
+ /**
62
+ * @category Setup
63
+ */
64
+ export interface SandpackOptions {
65
+ /**
66
+ * List of files that will be visible for the user interacts with.
67
+ * It defaults to the non-hidden files from the filesystem.
68
+ */
69
+ visibleFiles?: string[];
70
+ /**
71
+ * Use this to set a file as active by default in the editor component.
72
+ * It defaults to the first visible file.
73
+ */
74
+ activeFile?: string;
75
+ editorWidthPercentage?: number;
76
+ editorHeight?: React.CSSProperties["height"];
77
+ classes?: Record<string, string>;
78
+ /**
79
+ * right to left layout
80
+ * @default false
81
+ */
82
+ rtl?: boolean;
83
+ showNavigator?: boolean;
84
+ showLineNumbers?: boolean;
85
+ showInlineErrors?: boolean;
86
+ showRefreshButton?: boolean;
87
+ showTabs?: boolean;
88
+ showConsoleButton?: boolean;
89
+ showConsole?: boolean;
90
+ closableTabs?: boolean;
91
+ wrapContent?: boolean;
92
+ resizablePanels?: boolean;
93
+ codeEditor?: SandpackCodeOptions;
94
+ /**
95
+ * This disables editing of content by the user in all files.
96
+ */
97
+ readOnly?: boolean;
98
+ /**
99
+ * Controls the visibility of Read-only label, which will only
100
+ * appears when `readOnly` is `true`
101
+ */
102
+ showReadOnly?: boolean;
103
+ layout?: "preview" | "tests" | "console";
104
+ /**
105
+ * This provides a way to control how some components are going to
106
+ * be initialized on the page. The CodeEditor and the Preview components
107
+ * are quite expensive and might overload the memory usage, so this gives
108
+ * a certain control of when to initialize them.
109
+ */
110
+ initMode?: SandpackInitMode;
111
+ initModeObserverOptions?: IntersectionObserverInit;
112
+ /**
113
+ * Determines whether or not the bundling process should start automatically.
114
+ */
115
+ autorun?: boolean;
116
+ /**
117
+ * Determines whether or not the component should automatically reload when
118
+ * changes are made to the code.
119
+ */
120
+ autoReload?: boolean;
121
+ recompileMode?: "immediate" | "delayed";
122
+ recompileDelay?: number;
123
+ /**
124
+ * By default, Sandpack generates a random value to use as an id.
125
+ * Use this to override this value if you need predictable values.
126
+ */
127
+ id?: string;
128
+ logLevel?: SandpackLogLevel;
129
+ bundlerURL?: string;
130
+ babelWorkerURL?: string;
131
+ startRoute?: string;
132
+ skipEval?: boolean;
133
+ externalResources?: string[];
134
+ }
135
+ /**
136
+ * @category Setup
137
+ */
138
+ export interface SandpackSetup {
139
+ dependencies?: Record<string, string>;
140
+ devDependencies?: Record<string, string>;
141
+ entry?: string;
142
+ environment?: SandboxEnvironment;
143
+ npmRegistries?: NpmRegistry[];
144
+ exportOptions?: SandpackExportOptions;
145
+ }
146
+ /**
147
+ * @category Setup
148
+ */
149
+ export type SandboxEnvironment = "angular-cli" | "create-react-app" | "create-react-app-typescript" | "svelte" | "parcel" | "vue-cli" | "static" | "solid" | "node";
150
+ /**
151
+ * @category Setup
152
+ */
153
+ export type SandpackPredefinedTemplate = keyof typeof SANDBOX_TEMPLATES;
154
+ /**
155
+ * @category Setup
156
+ */
157
+ export interface SandpackFile {
158
+ code: string;
159
+ hidden?: boolean;
160
+ active?: boolean;
161
+ readOnly?: boolean;
162
+ }
163
+ export type SandpackFiles = Record<string, string | SandpackFile>;
164
+ /**
165
+ * `immediate`: It immediately mounts all components, such as the code-editor
166
+ * and the preview - this option might overload the memory usage
167
+ * and resource from the browser on a page with multiple instances;
168
+ *
169
+ * `lazy`: Only initialize the components when the user is about to scroll
170
+ * them to the viewport and keep these components mounted until the user
171
+ * leaves the page - this is the default value;
172
+ *
173
+ * `user-visible`: Only initialize the components when the user is about
174
+ * to scroll them to the viewport, but differently from lazy, this option
175
+ * unmounts those components once it's no longer in the viewport.
176
+ *
177
+ * @category Setup
178
+ */
179
+ export type SandpackInitMode = "immediate" | "lazy" | "user-visible";
180
+ /**
181
+ * @category Setup
182
+ */
183
+ export interface CustomLanguage {
184
+ name: string;
185
+ extensions: string[];
186
+ language: LanguageSupport;
187
+ }
188
+ /**
189
+ * @category Theme
190
+ */
191
+ export type SandpackPredefinedTheme = "light" | "dark" | "auto";
192
+ /**
193
+ * @category Theme
194
+ */
195
+ export interface SandpackTheme {
196
+ colors: {
197
+ surface1: string;
198
+ surface2: string;
199
+ surface3: string;
200
+ disabled: string;
201
+ base: string;
202
+ clickable: string;
203
+ hover: string;
204
+ accent: string;
205
+ error?: string;
206
+ errorSurface?: string;
207
+ warning?: string;
208
+ warningSurface?: string;
209
+ };
210
+ syntax: {
211
+ plain: string | SandpackSyntaxStyle;
212
+ comment: string | SandpackSyntaxStyle;
213
+ keyword: string | SandpackSyntaxStyle;
214
+ definition: string | SandpackSyntaxStyle;
215
+ punctuation: string | SandpackSyntaxStyle;
216
+ property: string | SandpackSyntaxStyle;
217
+ tag: string | SandpackSyntaxStyle;
218
+ static: string | SandpackSyntaxStyle;
219
+ string?: string | SandpackSyntaxStyle;
220
+ };
221
+ font: {
222
+ body: string;
223
+ mono: string;
224
+ size: string;
225
+ lineHeight: string;
226
+ };
227
+ }
228
+ /**
229
+ * @category Theme
230
+ */
231
+ interface SandpackSyntaxStyle {
232
+ color?: string;
233
+ fontStyle?: "normal" | "italic";
234
+ fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
235
+ textDecoration?: "none" | "underline" | "line-through" | "underline line-through";
236
+ }
237
+ /**
238
+ * @category Theme
239
+ */
240
+ export type SandpackThemeProp = SandpackPredefinedTheme | DeepPartial<SandpackTheme>;
241
+ /**
242
+ *
243
+ * ------------------------ Internal types ---------------------------
244
+ *
245
+ * From this section on, all types are hidden because most of them are
246
+ * strictly related to the internal typing system, and they are not
247
+ * helpful for public documentation.
248
+ *
249
+ * For public purpose use SandpackProps instead.
250
+ */
251
+ export interface SandpackInternal {
252
+ (props: SandpackInternalProps): React.ReactElement;
253
+ }
254
+ export interface SandpackInternalProvider {
255
+ (props: React.PropsWithChildren<SandpackProviderProps>): React.ReactElement<SandpackProviderProps, React.Provider<SandpackProviderState>> | null;
256
+ }
257
+ interface SandpackRootProps {
258
+ fs: SandpackFS;
259
+ theme?: SandpackThemeProp;
260
+ teamId?: string;
261
+ sandboxId?: string;
262
+ exportOptions?: SandpackExportOptions;
263
+ npmRegistries?: NpmRegistry[];
264
+ }
265
+ export interface SandpackInternalOptions {
266
+ visibleFiles?: string[];
267
+ activeFile?: string;
268
+ initMode?: SandpackInitMode;
269
+ initModeObserverOptions?: IntersectionObserverInit;
270
+ autorun?: boolean;
271
+ autoReload?: boolean;
272
+ recompileMode?: "immediate" | "delayed";
273
+ recompileDelay?: number;
274
+ id?: string;
275
+ logLevel?: SandpackLogLevel;
276
+ bundlerURL?: string;
277
+ babelWorkerURL?: string;
278
+ bundlerTimeOut?: number;
279
+ startRoute?: string;
280
+ skipEval?: boolean;
281
+ externalResources?: string[];
282
+ classes?: Record<string, string>;
283
+ experimental_enableServiceWorker?: boolean;
284
+ experimental_enableStableServiceWorkerId?: boolean;
285
+ /**
286
+ * Host-pinned SDK artifact integrity hashes (SDK_PACKAGING_SPEC §5.2),
287
+ * forwarded to the runtime client and on to the bundler for verify-before-
288
+ * evaluate. Absent ⇒ verification skipped.
289
+ */
290
+ sdkIntegrity?: SdkIntegrity;
291
+ /**
292
+ * The dirty set (PRETRANSPILED_ARTIFACTS_SPEC §5.2): repo-relative paths in the
293
+ * COW writable layer + the journal's deleted set, forwarded to the runtime
294
+ * client and on to the bundler so seeding skips artifacts for paths edited in a
295
+ * previous session. Absent ⇒ nothing dirty.
296
+ */
297
+ dirtyPaths?: string[];
298
+ /**
299
+ * R3-49b ZenFS batch hydration: a bulk snapshot of the mounted tree, forwarded to
300
+ * the runtime client and on to the bundler, which hydrates its read caches before
301
+ * the first compile so reads come from memory instead of per-file Port round-trips.
302
+ * Absent ⇒ reads cross the Port as before.
303
+ */
304
+ fsSnapshot?: FsSnapshot;
305
+ /**
306
+ * The chrome region this app instance occupies, e.g. `"panel.agent"` or
307
+ * `"stage.conversation"` (R3-114). Forwarded to the runtime client and on to the
308
+ * bundler, which surfaces it on the `__immediatelyRun__` runtime global for the
309
+ * SDK's `getRegion()`/`useRegion()`. Descriptive only — grants and gates nothing.
310
+ * Absent ⇒ the app reads no region.
311
+ */
312
+ region?: string;
313
+ }
314
+ interface SandpackInternalProps extends SandpackRootProps {
315
+ options?: SandpackInternalOptions & {
316
+ editorWidthPercentage?: number;
317
+ editorHeight?: React.CSSProperties["height"];
318
+ /**
319
+ * right to left layout
320
+ * @default false
321
+ */
322
+ rtl?: boolean;
323
+ showNavigator?: boolean;
324
+ showLineNumbers?: boolean;
325
+ showInlineErrors?: boolean;
326
+ showRefreshButton?: boolean;
327
+ showTabs?: boolean;
328
+ showConsoleButton?: boolean;
329
+ showConsole?: boolean;
330
+ closableTabs?: boolean;
331
+ wrapContent?: boolean;
332
+ resizablePanels?: boolean;
333
+ codeEditor?: SandpackCodeOptions;
334
+ /**
335
+ * This disables editing of content by the user in all files.
336
+ */
337
+ readOnly?: boolean;
338
+ /**
339
+ * Controls the visibility of Read-only label, which will only
340
+ * appears when `readOnly` is `true`
341
+ */
342
+ showReadOnly?: boolean;
343
+ layout?: "preview" | "tests" | "console";
344
+ };
345
+ }
346
+ export interface SandpackProviderProps extends SandpackRootProps, React.HTMLAttributes<HTMLDivElement> {
347
+ options?: SandpackInternalOptions;
348
+ children?: React.ReactNode;
349
+ }
350
+ export type SandpackClientDispatch = (msg: SandpackMessage, clientId?: string) => void;
351
+ export type SandpackClientListen = (listener: ListenerFunction, clientId?: string) => UnsubscribeFunction;
352
+ export type SandpackContext = SandpackState & {
353
+ dispatch: SandpackClientDispatch;
354
+ listen: SandpackClientListen;
355
+ };
356
+ export interface SandpackState {
357
+ bundlerState: BundlerState | undefined;
358
+ /**
359
+ * List the file path listed in the file tab,
360
+ * which will allow the user to interact with.
361
+ */
362
+ visibleFiles: string[];
363
+ /**
364
+ * List the file path listed in the file tab,
365
+ * Can only be changed through the properties of SandpackProvider (fs/options)
366
+ *
367
+ * @internal
368
+ */
369
+ visibleFilesFromProps: string[];
370
+ /**
371
+ * Path to the file will be open in the code editor
372
+ * when the component mounts
373
+ */
374
+ activeFile: string;
375
+ startRoute?: string;
376
+ autoReload: boolean;
377
+ /**
378
+ * Returns the current state of the editor, meaning that any
379
+ * changes from the original `files` must return a `dirty` value;
380
+ * otherwise, it'll return `pristine`
381
+ */
382
+ editorState: EditorState;
383
+ teamId?: string;
384
+ exportOptions?: SandpackExportOptions;
385
+ error: SandpackError | null;
386
+ /**
387
+ * The filesystem backing all files rendered inside Sandpack. Use this for
388
+ * async `readFile`/`writeFile`/`list` access.
389
+ */
390
+ fs: SandpackFS;
391
+ /**
392
+ * Snapshot of every file path known to {@link fs}, updated whenever the
393
+ * filesystem mutates.
394
+ */
395
+ fileList: string[];
396
+ /**
397
+ * Snapshot of the per-file UI metadata (`hidden`, `active`, `readOnly`)
398
+ * stored in the filesystem sidecar, updated whenever metadata changes.
399
+ */
400
+ fileMeta: FileMetaMap;
401
+ environment?: SandboxEnvironment;
402
+ status: SandpackStatus;
403
+ /**
404
+ * True while the async initialization of the filesystem is in flight.
405
+ * Consumers should treat `fileList` and `fileMeta` as not yet
406
+ * available while this is `true`.
407
+ */
408
+ isLoading: boolean;
409
+ initMode: SandpackInitMode;
410
+ clients: Record<string, InstanceType<typeof SandpackClient>>;
411
+ runSandpack: () => Promise<void>;
412
+ registerBundler: (iframe: HTMLIFrameElement, clientId: string, clientPropsOverride?: ClientPropsOverride) => Promise<void>;
413
+ unregisterBundler: (clientId: string) => void;
414
+ updateFile: (path: string, code: string, shouldUpdatePreview?: boolean) => Promise<void>;
415
+ addFile: (path: string, code: string, shouldUpdatePreview?: boolean) => Promise<void>;
416
+ updateCurrentFile: (newCode: string, shouldUpdatePreview?: boolean) => Promise<void>;
417
+ openFile: (path: string) => void;
418
+ closeFile: (path: string) => void;
419
+ deleteFile: (path: string, shouldUpdatePreview?: boolean) => Promise<void>;
420
+ setActiveFile: (path: string) => void;
421
+ resetFile: (path: string) => Promise<void>;
422
+ resetAllFiles: () => Promise<void>;
423
+ registerReactDevTools: (value: ReactDevToolsMode) => void;
424
+ /**
425
+ * Element refs
426
+ * Different components inside the SandpackProvider might register certain elements of interest for sandpack
427
+ * eg: lazy anchor - if no component registers this, then the sandpack runs on mount, without lazy mode
428
+ */
429
+ lazyAnchorRef: React.RefObject<HTMLDivElement | null>;
430
+ unsubscribeClientListenersRef: React.MutableRefObject<Record<string, Record<string, UnsubscribeFunction>>>;
431
+ queuedListenersRef: React.MutableRefObject<Record<string, Record<string, ListenerFunction>>>;
432
+ }
433
+ export type SandpackStatus = "initial" | "idle" | "running" | "timeout" | "done";
434
+ export type EditorState = "pristine" | "dirty";
435
+ /**
436
+ * Custom properties to be used in the SandpackCodeEditor component,
437
+ * some of which are exclusive to customize the CodeMirror instance.
438
+ * @hidden
439
+ */
440
+ export interface SandpackCodeOptions {
441
+ /**
442
+ * CodeMirror extensions for the editor state, which can
443
+ * provide extra features and functionalities to the editor component.
444
+ */
445
+ extensions?: CodeEditorProps["extensions"];
446
+ /**
447
+ * Property to register CodeMirror extension keymap.
448
+ */
449
+ extensionsKeymap?: CodeEditorProps["extensionsKeymap"];
450
+ /**
451
+ * Provides a way to add custom language modes by supplying a language
452
+ * type, applicable file extensions, and a LanguageSupport instance
453
+ * for that syntax mode
454
+ */
455
+ additionalLanguages?: CodeEditorProps["additionalLanguages"];
456
+ }
457
+ export type DeepPartial<Type> = {
458
+ [Property in keyof Type]?: DeepPartial<Type[Property]>;
459
+ };
460
+ export interface SandpackProviderState {
461
+ fs: SandpackFS;
462
+ fileList: string[];
463
+ fileMeta: FileMetaMap;
464
+ environment?: SandboxEnvironment;
465
+ visibleFiles: string[];
466
+ visibleFilesFromProps: string[];
467
+ activeFile: string;
468
+ startRoute?: string;
469
+ initMode: SandpackInitMode;
470
+ bundlerState?: BundlerState;
471
+ error: SandpackError | null;
472
+ sandpackStatus: SandpackStatus;
473
+ editorState: EditorState;
474
+ reactDevTools?: ReactDevToolsMode;
475
+ }
476
+ export {};
477
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,UAAU,EACV,eAAe,EACf,YAAY,EACZ,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4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master/src/index.ts
3
+ */
4
+ import * as React from "react";
5
+ declare interface Props {
6
+ children?: string;
7
+ linkify?: boolean;
8
+ className?: string;
9
+ useClasses?: boolean;
10
+ }
11
+ export default function Ansi(props: Props): React.JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=ansi-to-react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ansi-to-react.d.ts","sourceRoot":"","sources":["../../../../src/utils/ansi-to-react.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2J/B,OAAO,WAAW,KAAK;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAS5D"}
@@ -0,0 +1,2 @@
1
+ export declare const shallowEqual: (a: any[], b: any[]) => boolean;
2
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../src/utils/array.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAI,GAAG,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,KAAG,OAcjD,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const ClassNamesProvider: React.FC<React.PropsWithChildren<{
2
+ classes?: Record<string, string>;
3
+ }>>;
4
+ export declare const useClassNames: () => (customClassName: string, allClassNames?: any[]) => string;
5
+ export declare const joinClassNames: (...args: any[]) => string;
6
+ //# sourceMappingURL=classNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../../../src/utils/classNames.tsx"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CACvC,KAAK,CAAC,iBAAiB,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,CAK9D,CAAC;AAEF,eAAO,MAAM,aAAa,SAItB,iBAAiB,MAAM,EAEvB,gBAAe,GAAG,EAAO,KACxB,MAKJ,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,GAAG,MAAM,GAAG,EAAE,KAAG,MAE/C,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { SandpackFilesInput } from "@immediately-run/sandpack-client";
2
+ import { SandpackFS } from "@immediately-run/sandpack-client";
3
+ import type { SandboxEnvironment, SandpackFiles, SandpackPredefinedTemplate, SandpackSetup } from "../types";
4
+ import { BoundContext } from "@zenfs/core";
5
+ export interface SandboxTemplate {
6
+ files: SandpackFilesInput;
7
+ dependencies: Record<string, string>;
8
+ devDependencies?: Record<string, string>;
9
+ entry?: string;
10
+ main: string;
11
+ environment: SandboxEnvironment;
12
+ mode?: string;
13
+ }
14
+ export interface CreateSandpackFSOptions {
15
+ template?: SandpackPredefinedTemplate;
16
+ customSetup?: SandpackSetup;
17
+ files?: SandpackFiles;
18
+ }
19
+ /**
20
+ * Resolve a file path against a file map, trying various JS extensions.
21
+ * Returns the normalized path if found, or null.
22
+ */
23
+ export declare const resolveFile: (path: string, files: Record<string, unknown>) => string | null;
24
+ export declare const createSandpackFromFS: (fsContext: BoundContext, remotePortFactory: (onRemoteChange: (path: string) => void) => Promise<MessagePort>, onWrite?: (path: string) => void) => Promise<SandpackFS>;
25
+ /**
26
+ * Build a fully-initialized {@link SandpackFS} from the JS-object convenience
27
+ * inputs (template, customSetup, files). Consumers call this once and pass the
28
+ * result as the `fs` prop to `SandpackProvider`.
29
+ *
30
+ * `remotePortFactory` is supplied by the host app (it owns the port handoff to
31
+ * the preview iframe, e.g. site-main's `exportZenFS`), mirroring
32
+ * {@link createSandpackFromFS}.
33
+ */
34
+ export declare const createSandpackFS: (options: CreateSandpackFSOptions | undefined, remotePortFactory: (onRemoteChange: (path: string) => void) => Promise<MessagePort>) => Promise<SandpackFS>;
35
+ //# sourceMappingURL=createSandpackFS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSandpackFS.d.ts","sourceRoot":"","sources":["../../../../src/utils/createSandpackFS.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAO9D,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,0BAA0B,EAC1B,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,kBAAkB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAuFD;;;GAGG;AACH,eAAO,MAAM,WAAW,GACtB,MAAM,MAAM,EACZ,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,MAAM,GAAG,IAqBX,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,WAAW,YAAY,EACvB,mBAAmB,CACjB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KACnC,OAAO,CAAC,WAAW,CAAC,EAIzB,UAAU,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAC/B,OAAO,CAAC,UAAU,CAEpB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAC3B,SAAS,uBAAuB,YAAK,EACrC,mBAAmB,CACjB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KACnC,OAAO,CAAC,WAAW,CAAC,KACxB,OAAO,CAAC,UAAU,CAoBpB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { SandpackFS } from "@immediately-run/sandpack-client";
2
+ import type { CreateSandpackFSOptions } from "./createSandpackFS";
3
+ /**
4
+ * Async-resolving hook for story files. Creates a SandpackFS from the given
5
+ * options on mount. Returns null while initializing. (SandpackFS exposes no
6
+ * public disposal; its in-memory store is released on GC.)
7
+ */
8
+ export declare const useSandpackFS: (options?: CreateSandpackFSOptions) => SandpackFS | null;
9
+ //# sourceMappingURL=storyHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storyHelpers.d.ts","sourceRoot":"","sources":["../../../../src/utils/storyHelpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAGnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAWlE;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,UAAS,uBAA4B,KACpC,UAAU,GAAG,IAmBf,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const getFileName: (filePath: string) => string;
2
+ export declare const calculateNearestUniquePath: (currentPath: string, otherPaths: string[]) => string;
3
+ export declare const hexToRGB: (hex: string) => {
4
+ red: number;
5
+ green: number;
6
+ blue: number;
7
+ };
8
+ export declare const isDarkColor: (color: string) => boolean;
9
+ export declare const generateRandomId: () => string;
10
+ //# sourceMappingURL=stringUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/stringUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,MAG9C,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,aAAa,MAAM,EACnB,YAAY,MAAM,EAAE,KACnB,MA6CF,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,KAAK,MAAM,KACV;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAoB5C,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,OA6B3C,CAAC;AAIF,eAAO,MAAM,gBAAgB,QAAO,MAGnC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { SandpackFS } from "@immediately-run/sandpack-client";
2
+ export declare const useSandpackId: () => string;
3
+ /**
4
+ * Produces a stable id derived from the current filesystem contents. The
5
+ * snapshot is only materialized when the returned thunk is called, so we
6
+ * don't pay for the read unless a stable service-worker id is requested.
7
+ */
8
+ export declare const useAsyncSandpackId: (fileList: string[], fs: SandpackFS) => (() => Promise<string>) | (() => string);
9
+ //# sourceMappingURL=useAsyncSandpackId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAsyncSandpackId.d.ts","sourceRoot":"","sources":["../../../../src/utils/useAsyncSandpackId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAKnE,eAAO,MAAM,aAAa,cAOzB,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,EAAE,EAAE,IAAI,UAAU,6CAqBpE,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './unstyled/index';