@mui/internal-docs-infra 0.1.1-alpha.9 → 0.1.1-canary.1

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 (276) hide show
  1. package/README.md +1 -3
  2. package/esm/package.json +1 -0
  3. package/esm/useCopier/index.d.ts +15 -0
  4. package/esm/useCopier/index.d.ts.map +1 -0
  5. package/esm/useCopier/index.js +62 -0
  6. package/esm/useDemo/index.d.ts +51 -0
  7. package/esm/useDemo/index.d.ts.map +1 -0
  8. package/esm/useDemo/index.js +104 -0
  9. package/package.json +31 -32
  10. package/useCopier/index.d.ts +1 -1
  11. package/useCopier/index.js +23 -15
  12. package/useDemo/index.d.ts +51 -6
  13. package/useDemo/index.js +112 -6
  14. package/CodeControllerContext/CodeControllerContext.d.ts +0 -22
  15. package/CodeControllerContext/CodeControllerContext.d.ts.map +0 -1
  16. package/CodeControllerContext/CodeControllerContext.js +0 -14
  17. package/CodeControllerContext/index.d.ts +0 -1
  18. package/CodeControllerContext/index.d.ts.map +0 -1
  19. package/CodeControllerContext/index.js +0 -1
  20. package/CodeExternalsContext/CodeExternalsContext.d.ts +0 -8
  21. package/CodeExternalsContext/CodeExternalsContext.d.ts.map +0 -1
  22. package/CodeExternalsContext/CodeExternalsContext.js +0 -7
  23. package/CodeExternalsContext/index.d.ts +0 -1
  24. package/CodeExternalsContext/index.d.ts.map +0 -1
  25. package/CodeExternalsContext/index.js +0 -1
  26. package/CodeHighlighter/CodeHighlighter.d.ts +0 -2
  27. package/CodeHighlighter/CodeHighlighter.d.ts.map +0 -1
  28. package/CodeHighlighter/CodeHighlighter.js +0 -470
  29. package/CodeHighlighter/CodeHighlighterClient.d.ts +0 -2
  30. package/CodeHighlighter/CodeHighlighterClient.d.ts.map +0 -1
  31. package/CodeHighlighter/CodeHighlighterClient.js +0 -837
  32. package/CodeHighlighter/CodeHighlighterContext.d.ts +0 -16
  33. package/CodeHighlighter/CodeHighlighterContext.d.ts.map +0 -1
  34. package/CodeHighlighter/CodeHighlighterContext.js +0 -14
  35. package/CodeHighlighter/CodeHighlighterFallbackContext.d.ts +0 -7
  36. package/CodeHighlighter/CodeHighlighterFallbackContext.d.ts.map +0 -1
  37. package/CodeHighlighter/CodeHighlighterFallbackContext.js +0 -13
  38. package/CodeHighlighter/applyTransform.d.ts +0 -19
  39. package/CodeHighlighter/applyTransform.d.ts.map +0 -1
  40. package/CodeHighlighter/applyTransform.js +0 -75
  41. package/CodeHighlighter/codeToFallbackProps.d.ts +0 -2
  42. package/CodeHighlighter/codeToFallbackProps.d.ts.map +0 -1
  43. package/CodeHighlighter/codeToFallbackProps.js +0 -73
  44. package/CodeHighlighter/errors.d.ts +0 -0
  45. package/CodeHighlighter/errors.d.ts.map +0 -1
  46. package/CodeHighlighter/errors.js +0 -1
  47. package/CodeHighlighter/hasAllVariants.d.ts +0 -2
  48. package/CodeHighlighter/hasAllVariants.d.ts.map +0 -1
  49. package/CodeHighlighter/hasAllVariants.js +0 -31
  50. package/CodeHighlighter/index.d.ts +0 -4
  51. package/CodeHighlighter/index.d.ts.map +0 -1
  52. package/CodeHighlighter/index.js +0 -4
  53. package/CodeHighlighter/loadFallbackCode.d.ts +0 -10
  54. package/CodeHighlighter/loadFallbackCode.d.ts.map +0 -1
  55. package/CodeHighlighter/loadFallbackCode.js +0 -632
  56. package/CodeHighlighter/loadVariant.d.ts +0 -12
  57. package/CodeHighlighter/loadVariant.d.ts.map +0 -1
  58. package/CodeHighlighter/loadVariant.js +0 -1083
  59. package/CodeHighlighter/maybeInitialData.d.ts +0 -10
  60. package/CodeHighlighter/maybeInitialData.d.ts.map +0 -1
  61. package/CodeHighlighter/maybeInitialData.js +0 -94
  62. package/CodeHighlighter/parseCode.d.ts +0 -6
  63. package/CodeHighlighter/parseCode.d.ts.map +0 -1
  64. package/CodeHighlighter/parseCode.js +0 -134
  65. package/CodeHighlighter/parseControlledCode.d.ts +0 -6
  66. package/CodeHighlighter/parseControlledCode.d.ts.map +0 -1
  67. package/CodeHighlighter/parseControlledCode.js +0 -87
  68. package/CodeHighlighter/transformCode.d.ts +0 -21
  69. package/CodeHighlighter/transformCode.d.ts.map +0 -1
  70. package/CodeHighlighter/transformCode.js +0 -263
  71. package/CodeHighlighter/transformParsedSource.d.ts +0 -3
  72. package/CodeHighlighter/transformParsedSource.d.ts.map +0 -1
  73. package/CodeHighlighter/transformParsedSource.js +0 -66
  74. package/CodeHighlighter/transformSource.d.ts +0 -2
  75. package/CodeHighlighter/transformSource.d.ts.map +0 -1
  76. package/CodeHighlighter/transformSource.js +0 -107
  77. package/CodeHighlighter/types.d.ts +0 -160
  78. package/CodeHighlighter/types.d.ts.map +0 -1
  79. package/CodeHighlighter/types.js +0 -1
  80. package/CodeProvider/CodeContext.d.ts +0 -12
  81. package/CodeProvider/CodeContext.d.ts.map +0 -1
  82. package/CodeProvider/CodeContext.js +0 -8
  83. package/CodeProvider/CodeProvider.d.ts +0 -13
  84. package/CodeProvider/CodeProvider.d.ts.map +0 -1
  85. package/CodeProvider/CodeProvider.js +0 -65
  86. package/CodeProvider/index.d.ts +0 -1
  87. package/CodeProvider/index.d.ts.map +0 -1
  88. package/CodeProvider/index.js +0 -1
  89. package/abstractCreateDemo/abstractCreateDemo.d.ts +0 -35
  90. package/abstractCreateDemo/abstractCreateDemo.d.ts.map +0 -1
  91. package/abstractCreateDemo/abstractCreateDemo.js +0 -91
  92. package/abstractCreateDemo/index.d.ts +0 -1
  93. package/abstractCreateDemo/index.d.ts.map +0 -1
  94. package/abstractCreateDemo/index.js +0 -1
  95. package/createDemoData/createDemoData.d.ts +0 -44
  96. package/createDemoData/createDemoData.d.ts.map +0 -1
  97. package/createDemoData/createDemoData.js +0 -75
  98. package/createDemoData/index.d.ts +0 -1
  99. package/createDemoData/index.d.ts.map +0 -1
  100. package/createDemoData/index.js +0 -1
  101. package/createDemoData/types.d.ts +0 -28
  102. package/createDemoData/types.d.ts.map +0 -1
  103. package/createDemoData/types.js +0 -1
  104. package/pipeline/hastUtils/hastUtils.d.ts +0 -11
  105. package/pipeline/hastUtils/hastUtils.d.ts.map +0 -1
  106. package/pipeline/hastUtils/hastUtils.js +0 -67
  107. package/pipeline/hastUtils/index.d.ts +0 -1
  108. package/pipeline/hastUtils/index.d.ts.map +0 -1
  109. package/pipeline/hastUtils/index.js +0 -1
  110. package/pipeline/loadPrecomputedCodeHighlighter/emitExternalsProvider.d.ts +0 -54
  111. package/pipeline/loadPrecomputedCodeHighlighter/emitExternalsProvider.d.ts.map +0 -1
  112. package/pipeline/loadPrecomputedCodeHighlighter/emitExternalsProvider.js +0 -465
  113. package/pipeline/loadPrecomputedCodeHighlighter/generateExternalsProvider.d.ts +0 -15
  114. package/pipeline/loadPrecomputedCodeHighlighter/generateExternalsProvider.d.ts.map +0 -1
  115. package/pipeline/loadPrecomputedCodeHighlighter/generateExternalsProvider.js +0 -253
  116. package/pipeline/loadPrecomputedCodeHighlighter/index.d.ts +0 -2
  117. package/pipeline/loadPrecomputedCodeHighlighter/index.d.ts.map +0 -1
  118. package/pipeline/loadPrecomputedCodeHighlighter/index.js +0 -4
  119. package/pipeline/loadPrecomputedCodeHighlighter/loadPrecomputedCodeHighlighter.d.ts +0 -20
  120. package/pipeline/loadPrecomputedCodeHighlighter/loadPrecomputedCodeHighlighter.d.ts.map +0 -1
  121. package/pipeline/loadPrecomputedCodeHighlighter/loadPrecomputedCodeHighlighter.js +0 -224
  122. package/pipeline/loadPrecomputedCodeHighlighter/parseCreateFactoryCall.d.ts +0 -31
  123. package/pipeline/loadPrecomputedCodeHighlighter/parseCreateFactoryCall.d.ts.map +0 -1
  124. package/pipeline/loadPrecomputedCodeHighlighter/parseCreateFactoryCall.js +0 -433
  125. package/pipeline/loadPrecomputedCodeHighlighter/parseFunctionParameters.d.ts +0 -19
  126. package/pipeline/loadPrecomputedCodeHighlighter/parseFunctionParameters.d.ts.map +0 -1
  127. package/pipeline/loadPrecomputedCodeHighlighter/parseFunctionParameters.js +0 -168
  128. package/pipeline/loadPrecomputedCodeHighlighter/replacePrecomputeValue.d.ts +0 -25
  129. package/pipeline/loadPrecomputedCodeHighlighter/replacePrecomputeValue.d.ts.map +0 -1
  130. package/pipeline/loadPrecomputedCodeHighlighter/replacePrecomputeValue.js +0 -73
  131. package/pipeline/loadServerCodeMeta/index.d.ts +0 -1
  132. package/pipeline/loadServerCodeMeta/index.d.ts.map +0 -1
  133. package/pipeline/loadServerCodeMeta/index.js +0 -1
  134. package/pipeline/loadServerCodeMeta/loadServerCodeMeta.d.ts +0 -24
  135. package/pipeline/loadServerCodeMeta/loadServerCodeMeta.d.ts.map +0 -1
  136. package/pipeline/loadServerCodeMeta/loadServerCodeMeta.js +0 -92
  137. package/pipeline/loadServerSource/index.d.ts +0 -1
  138. package/pipeline/loadServerSource/index.d.ts.map +0 -1
  139. package/pipeline/loadServerSource/index.js +0 -1
  140. package/pipeline/loadServerSource/loadServerSource.d.ts +0 -25
  141. package/pipeline/loadServerSource/loadServerSource.d.ts.map +0 -1
  142. package/pipeline/loadServerSource/loadServerSource.js +0 -135
  143. package/pipeline/loaderUtils/externalsToPackages.d.ts +0 -1
  144. package/pipeline/loaderUtils/externalsToPackages.d.ts.map +0 -1
  145. package/pipeline/loaderUtils/externalsToPackages.js +0 -46
  146. package/pipeline/loaderUtils/extractNameAndSlugFromUrl.d.ts +0 -34
  147. package/pipeline/loaderUtils/extractNameAndSlugFromUrl.d.ts.map +0 -1
  148. package/pipeline/loaderUtils/extractNameAndSlugFromUrl.js +0 -161
  149. package/pipeline/loaderUtils/getFileNameFromUrl.d.ts +0 -11
  150. package/pipeline/loaderUtils/getFileNameFromUrl.d.ts.map +0 -1
  151. package/pipeline/loaderUtils/getFileNameFromUrl.js +0 -32
  152. package/pipeline/loaderUtils/index.d.ts +0 -7
  153. package/pipeline/loaderUtils/index.d.ts.map +0 -1
  154. package/pipeline/loaderUtils/index.js +0 -7
  155. package/pipeline/loaderUtils/mergeExternals.d.ts +0 -32
  156. package/pipeline/loaderUtils/mergeExternals.d.ts.map +0 -1
  157. package/pipeline/loaderUtils/mergeExternals.js +0 -72
  158. package/pipeline/loaderUtils/parseImports.d.ts +0 -20
  159. package/pipeline/loaderUtils/parseImports.d.ts.map +0 -1
  160. package/pipeline/loaderUtils/parseImports.js +0 -307
  161. package/pipeline/loaderUtils/processRelativeImports.d.ts +0 -19
  162. package/pipeline/loaderUtils/processRelativeImports.d.ts.map +0 -1
  163. package/pipeline/loaderUtils/processRelativeImports.js +0 -329
  164. package/pipeline/loaderUtils/resolveModulePath.d.ts +0 -87
  165. package/pipeline/loaderUtils/resolveModulePath.d.ts.map +0 -1
  166. package/pipeline/loaderUtils/resolveModulePath.js +0 -1449
  167. package/pipeline/loaderUtils/resolveModulePathWithFs.d.ts +0 -47
  168. package/pipeline/loaderUtils/resolveModulePathWithFs.d.ts.map +0 -1
  169. package/pipeline/loaderUtils/resolveModulePathWithFs.js +0 -163
  170. package/pipeline/loaderUtils/rewriteImports.d.ts +0 -9
  171. package/pipeline/loaderUtils/rewriteImports.d.ts.map +0 -1
  172. package/pipeline/loaderUtils/rewriteImports.js +0 -35
  173. package/pipeline/parseSource/grammars.d.ts +0 -2
  174. package/pipeline/parseSource/grammars.d.ts.map +0 -1
  175. package/pipeline/parseSource/grammars.js +0 -27
  176. package/pipeline/parseSource/index.d.ts +0 -1
  177. package/pipeline/parseSource/index.d.ts.map +0 -1
  178. package/pipeline/parseSource/index.js +0 -1
  179. package/pipeline/parseSource/parseSource.d.ts +0 -3
  180. package/pipeline/parseSource/parseSource.d.ts.map +0 -1
  181. package/pipeline/parseSource/parseSource.js +0 -47
  182. package/pipeline/transformHtmlCode/index.d.ts +0 -2
  183. package/pipeline/transformHtmlCode/index.d.ts.map +0 -1
  184. package/pipeline/transformHtmlCode/index.js +0 -4
  185. package/pipeline/transformHtmlCode/transformHtmlCode.d.ts +0 -13
  186. package/pipeline/transformHtmlCode/transformHtmlCode.d.ts.map +0 -1
  187. package/pipeline/transformHtmlCode/transformHtmlCode.js +0 -303
  188. package/pipeline/transformMarkdownCode/index.d.ts +0 -2
  189. package/pipeline/transformMarkdownCode/index.d.ts.map +0 -1
  190. package/pipeline/transformMarkdownCode/index.js +0 -4
  191. package/pipeline/transformMarkdownCode/transformMarkdownCode.d.ts +0 -2
  192. package/pipeline/transformMarkdownCode/transformMarkdownCode.d.ts.map +0 -1
  193. package/pipeline/transformMarkdownCode/transformMarkdownCode.js +0 -514
  194. package/pipeline/transformTypescriptToJavascript/index.d.ts +0 -1
  195. package/pipeline/transformTypescriptToJavascript/index.d.ts.map +0 -1
  196. package/pipeline/transformTypescriptToJavascript/index.js +0 -1
  197. package/pipeline/transformTypescriptToJavascript/removeTypes.d.ts +0 -13
  198. package/pipeline/transformTypescriptToJavascript/removeTypes.d.ts.map +0 -1
  199. package/pipeline/transformTypescriptToJavascript/removeTypes.js +0 -134
  200. package/pipeline/transformTypescriptToJavascript/transformTypescriptToJavascript.d.ts +0 -3
  201. package/pipeline/transformTypescriptToJavascript/transformTypescriptToJavascript.d.ts.map +0 -1
  202. package/pipeline/transformTypescriptToJavascript/transformTypescriptToJavascript.js +0 -34
  203. package/useCode/index.d.ts +0 -1
  204. package/useCode/index.d.ts.map +0 -1
  205. package/useCode/index.js +0 -1
  206. package/useCode/useCode.d.ts +0 -39
  207. package/useCode/useCode.d.ts.map +0 -1
  208. package/useCode/useCode.js +0 -122
  209. package/useCode/useCodeUtils.d.ts +0 -45
  210. package/useCode/useCodeUtils.d.ts.map +0 -1
  211. package/useCode/useCodeUtils.js +0 -240
  212. package/useCode/useCopyFunctionality.d.ts +0 -17
  213. package/useCode/useCopyFunctionality.d.ts.map +0 -1
  214. package/useCode/useCopyFunctionality.js +0 -28
  215. package/useCode/useFileNavigation.d.ts +0 -48
  216. package/useCode/useFileNavigation.d.ts.map +0 -1
  217. package/useCode/useFileNavigation.js +0 -370
  218. package/useCode/useSourceEditing.d.ts +0 -19
  219. package/useCode/useSourceEditing.d.ts.map +0 -1
  220. package/useCode/useSourceEditing.js +0 -32
  221. package/useCode/useTransformManagement.d.ts +0 -28
  222. package/useCode/useTransformManagement.d.ts.map +0 -1
  223. package/useCode/useTransformManagement.js +0 -82
  224. package/useCode/useUIState.d.ts +0 -16
  225. package/useCode/useUIState.d.ts.map +0 -1
  226. package/useCode/useUIState.js +0 -21
  227. package/useCode/useVariantSelection.d.ts +0 -21
  228. package/useCode/useVariantSelection.d.ts.map +0 -1
  229. package/useCode/useVariantSelection.js +0 -84
  230. package/useCopier/index.d.ts.map +0 -1
  231. package/useDemo/createCodeSandbox.d.ts +0 -18
  232. package/useDemo/createCodeSandbox.d.ts.map +0 -1
  233. package/useDemo/createCodeSandbox.js +0 -48
  234. package/useDemo/createStackBlitz.d.ts +0 -22
  235. package/useDemo/createStackBlitz.d.ts.map +0 -1
  236. package/useDemo/createStackBlitz.js +0 -38
  237. package/useDemo/examineVariant.d.ts +0 -25
  238. package/useDemo/examineVariant.d.ts.map +0 -1
  239. package/useDemo/examineVariant.js +0 -134
  240. package/useDemo/exportVariant.d.ts +0 -110
  241. package/useDemo/exportVariant.d.ts.map +0 -1
  242. package/useDemo/exportVariant.js +0 -320
  243. package/useDemo/exportVariantAsCra.d.ts +0 -15
  244. package/useDemo/exportVariantAsCra.d.ts.map +0 -1
  245. package/useDemo/exportVariantAsCra.js +0 -56
  246. package/useDemo/flattenVariant.d.ts +0 -17
  247. package/useDemo/flattenVariant.d.ts.map +0 -1
  248. package/useDemo/flattenVariant.js +0 -206
  249. package/useDemo/index.d.ts.map +0 -1
  250. package/useDemo/useDemo.d.ts +0 -78
  251. package/useDemo/useDemo.d.ts.map +0 -1
  252. package/useDemo/useDemo.js +0 -174
  253. package/useLocalStorageState/index.d.ts +0 -2
  254. package/useLocalStorageState/index.d.ts.map +0 -1
  255. package/useLocalStorageState/index.js +0 -2
  256. package/useLocalStorageState/useLocalStorageState.d.ts +0 -14
  257. package/useLocalStorageState/useLocalStorageState.d.ts.map +0 -1
  258. package/useLocalStorageState/useLocalStorageState.js +0 -128
  259. package/useOnHydrate/index.d.ts +0 -1
  260. package/useOnHydrate/index.d.ts.map +0 -1
  261. package/useOnHydrate/index.js +0 -1
  262. package/useOnHydrate/useOnHydrate.d.ts +0 -1
  263. package/useOnHydrate/useOnHydrate.d.ts.map +0 -1
  264. package/useOnHydrate/useOnHydrate.js +0 -18
  265. package/useOnIdle/index.d.ts +0 -1
  266. package/useOnIdle/index.d.ts.map +0 -1
  267. package/useOnIdle/index.js +0 -1
  268. package/useOnIdle/useOnIdle.d.ts +0 -1
  269. package/useOnIdle/useOnIdle.d.ts.map +0 -1
  270. package/useOnIdle/useOnIdle.js +0 -39
  271. package/useUrlHashState/index.d.ts +0 -1
  272. package/useUrlHashState/index.d.ts.map +0 -1
  273. package/useUrlHashState/index.js +0 -1
  274. package/useUrlHashState/useUrlHashState.d.ts +0 -50
  275. package/useUrlHashState/useUrlHashState.d.ts.map +0 -1
  276. package/useUrlHashState/useUrlHashState.js +0 -113
@@ -1,47 +0,0 @@
1
- import { type DirectoryEntry, type DirectoryReader, type ResolveModulePathOptions, type TypeAwareResolveResult } from "./resolveModulePath.js";
2
- /**
3
- * Resolves a module path using Node.js filesystem APIs.
4
- * This is a convenience wrapper around the generic resolveModulePath function.
5
- *
6
- * @param modulePath - The module path to resolve (without file extension)
7
- * @param options - Configuration options
8
- * @param includeTypeDefs - If true, returns both import and typeImport paths with different extension priorities
9
- * @returns Promise<string | TypeAwareResolveResult> - The resolved file path(s), or throws if not found
10
- */
11
- export declare function resolveModulePathWithFs(modulePath: string, options?: ResolveModulePathOptions): Promise<string>;
12
- export declare function resolveModulePathWithFs(modulePath: string, options: ResolveModulePathOptions, includeTypeDefs: true): Promise<TypeAwareResolveResult>;
13
- /**
14
- * Resolves multiple module paths using Node.js filesystem APIs.
15
- * This is a convenience wrapper around the generic resolveModulePaths function.
16
- *
17
- * @param modulePaths - Array of module paths to resolve (without file extensions)
18
- * @param options - Configuration options
19
- * @returns Promise<Map<string, string>> - Map from input path to resolved file path
20
- */
21
- export declare function resolveModulePathsWithFs(modulePaths: string[], options?: ResolveModulePathOptions): Promise<Map<string, string>>;
22
- /**
23
- * Resolves import result by separating JavaScript modules from static assets,
24
- * only resolving JavaScript modules and returning a combined map.
25
- * This is a convenience wrapper around the generic resolveImportResult function
26
- * that uses Node.js filesystem APIs.
27
- *
28
- * @param importResult - The result from parseImports containing all imports
29
- * @param options - Configuration options for module resolution
30
- * @returns Promise<Map<string, string>> - Map from import path to resolved file path
31
- */
32
- export declare function resolveImportResultWithFs(importResult: Record<string, {
33
- path: string;
34
- names: string[];
35
- includeTypeDefs?: true;
36
- }>, options?: ResolveModulePathOptions): Promise<Map<string, string>>;
37
- /**
38
- * Resolves variant paths from a variants object mapping variant names to their file paths.
39
- * This is a convenience wrapper around the generic resolveVariantPaths function
40
- * that uses Node.js filesystem APIs.
41
- *
42
- * @param variants - Object mapping variant names to their file paths
43
- * @param options - Configuration options for module resolution
44
- * @returns Promise<Map<string, string>> - Map from variant name to resolved file URL
45
- */
46
- export declare function resolveVariantPathsWithFs(variants: Record<string, string>, options?: ResolveModulePathOptions): Promise<Map<string, string>>;
47
- export type { DirectoryEntry, DirectoryReader, ResolveModulePathOptions };
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolveModulePathWithFs.d.ts","sourceRoot":"","sources":["../../../src/pipeline/loaderUtils/resolveModulePathWithFs.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAe7B;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,MAAM,CAAC,CAAC;AACnB,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,wBAAwB,EACjC,eAAe,EAAE,IAAI,GACpB,OAAO,CAAC,sBAAsB,CAAC,CAAC;AASnC;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAE9B;AAED;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAC7C,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,EACvF,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAE9B;AAED;;;;;;;;GAQG;AACH,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAE9B;AAGD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,163 +0,0 @@
1
- import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
- import { readdir } from 'node:fs/promises';
4
- import { resolveModulePath, resolveModulePaths, resolveImportResult, resolveVariantPaths } from "./resolveModulePath.js";
5
-
6
- /**
7
- * Node.js filesystem-based directory reader that converts Dirent objects
8
- * to the DirectoryEntry interface expected by the resolver functions.
9
- */
10
- var nodeDirectoryReader = /*#__PURE__*/function () {
11
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(path) {
12
- var entries;
13
- return _regeneratorRuntime().wrap(function _callee$(_context) {
14
- while (1) switch (_context.prev = _context.next) {
15
- case 0:
16
- _context.next = 2;
17
- return readdir(path, {
18
- withFileTypes: true
19
- });
20
- case 2:
21
- entries = _context.sent;
22
- return _context.abrupt("return", entries.map(function (entry) {
23
- return {
24
- name: entry.name,
25
- isFile: entry.isFile(),
26
- isDirectory: entry.isDirectory()
27
- };
28
- }));
29
- case 4:
30
- case "end":
31
- return _context.stop();
32
- }
33
- }, _callee);
34
- }));
35
- return function nodeDirectoryReader(_x) {
36
- return _ref.apply(this, arguments);
37
- };
38
- }();
39
-
40
- /**
41
- * Resolves a module path using Node.js filesystem APIs.
42
- * This is a convenience wrapper around the generic resolveModulePath function.
43
- *
44
- * @param modulePath - The module path to resolve (without file extension)
45
- * @param options - Configuration options
46
- * @param includeTypeDefs - If true, returns both import and typeImport paths with different extension priorities
47
- * @returns Promise<string | TypeAwareResolveResult> - The resolved file path(s), or throws if not found
48
- */
49
-
50
- export function resolveModulePathWithFs(_x2) {
51
- return _resolveModulePathWithFs.apply(this, arguments);
52
- }
53
-
54
- /**
55
- * Resolves multiple module paths using Node.js filesystem APIs.
56
- * This is a convenience wrapper around the generic resolveModulePaths function.
57
- *
58
- * @param modulePaths - Array of module paths to resolve (without file extensions)
59
- * @param options - Configuration options
60
- * @returns Promise<Map<string, string>> - Map from input path to resolved file path
61
- */
62
- function _resolveModulePathWithFs() {
63
- _resolveModulePathWithFs = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(modulePath) {
64
- var options,
65
- includeTypeDefs,
66
- _args2 = arguments;
67
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
68
- while (1) switch (_context2.prev = _context2.next) {
69
- case 0:
70
- options = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {};
71
- includeTypeDefs = _args2.length > 2 ? _args2[2] : undefined;
72
- return _context2.abrupt("return", resolveModulePath(modulePath, nodeDirectoryReader, options, includeTypeDefs));
73
- case 3:
74
- case "end":
75
- return _context2.stop();
76
- }
77
- }, _callee2);
78
- }));
79
- return _resolveModulePathWithFs.apply(this, arguments);
80
- }
81
- export function resolveModulePathsWithFs(_x3) {
82
- return _resolveModulePathsWithFs.apply(this, arguments);
83
- }
84
-
85
- /**
86
- * Resolves import result by separating JavaScript modules from static assets,
87
- * only resolving JavaScript modules and returning a combined map.
88
- * This is a convenience wrapper around the generic resolveImportResult function
89
- * that uses Node.js filesystem APIs.
90
- *
91
- * @param importResult - The result from parseImports containing all imports
92
- * @param options - Configuration options for module resolution
93
- * @returns Promise<Map<string, string>> - Map from import path to resolved file path
94
- */
95
- function _resolveModulePathsWithFs() {
96
- _resolveModulePathsWithFs = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(modulePaths) {
97
- var options,
98
- _args3 = arguments;
99
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
100
- while (1) switch (_context3.prev = _context3.next) {
101
- case 0:
102
- options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
103
- return _context3.abrupt("return", resolveModulePaths(modulePaths, nodeDirectoryReader, options));
104
- case 2:
105
- case "end":
106
- return _context3.stop();
107
- }
108
- }, _callee3);
109
- }));
110
- return _resolveModulePathsWithFs.apply(this, arguments);
111
- }
112
- export function resolveImportResultWithFs(_x4) {
113
- return _resolveImportResultWithFs.apply(this, arguments);
114
- }
115
-
116
- /**
117
- * Resolves variant paths from a variants object mapping variant names to their file paths.
118
- * This is a convenience wrapper around the generic resolveVariantPaths function
119
- * that uses Node.js filesystem APIs.
120
- *
121
- * @param variants - Object mapping variant names to their file paths
122
- * @param options - Configuration options for module resolution
123
- * @returns Promise<Map<string, string>> - Map from variant name to resolved file URL
124
- */
125
- function _resolveImportResultWithFs() {
126
- _resolveImportResultWithFs = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(importResult) {
127
- var options,
128
- _args4 = arguments;
129
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
130
- while (1) switch (_context4.prev = _context4.next) {
131
- case 0:
132
- options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
133
- return _context4.abrupt("return", resolveImportResult(importResult, nodeDirectoryReader, options));
134
- case 2:
135
- case "end":
136
- return _context4.stop();
137
- }
138
- }, _callee4);
139
- }));
140
- return _resolveImportResultWithFs.apply(this, arguments);
141
- }
142
- export function resolveVariantPathsWithFs(_x5) {
143
- return _resolveVariantPathsWithFs.apply(this, arguments);
144
- }
145
-
146
- // Re-export types for convenience
147
- function _resolveVariantPathsWithFs() {
148
- _resolveVariantPathsWithFs = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(variants) {
149
- var options,
150
- _args5 = arguments;
151
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
152
- while (1) switch (_context5.prev = _context5.next) {
153
- case 0:
154
- options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
155
- return _context5.abrupt("return", resolveVariantPaths(variants, nodeDirectoryReader, options));
156
- case 2:
157
- case "end":
158
- return _context5.stop();
159
- }
160
- }, _callee5);
161
- }));
162
- return _resolveVariantPathsWithFs.apply(this, arguments);
163
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Rewrites relative imports in source code based on a provided mapping.
3
- * Converts imports like '../utils/helper' or './components/Button' to their mapped equivalents
4
- *
5
- * @param source - The source code to process
6
- * @param importPathMapping - Map from original import paths to new import paths (without extensions)
7
- * @returns The source code with rewritten imports
8
- */
9
- export declare function rewriteImportsToSameDirectory(source: string, importPathMapping: Map<string, string>): string;
@@ -1 +0,0 @@
1
- {"version":3,"file":"rewriteImports.d.ts","sourceRoot":"","sources":["../../../src/pipeline/loaderUtils/rewriteImports.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACrC,MAAM,CA+BR"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Rewrites relative imports in source code based on a provided mapping.
3
- * Converts imports like '../utils/helper' or './components/Button' to their mapped equivalents
4
- *
5
- * @param source - The source code to process
6
- * @param importPathMapping - Map from original import paths to new import paths (without extensions)
7
- * @returns The source code with rewritten imports
8
- */
9
- export function rewriteImportsToSameDirectory(source, importPathMapping) {
10
- // Handle both types of imports:
11
- // 1. import [something] from 'path' (including import type)
12
- // 2. import 'path' (side-effect imports like CSS)
13
-
14
- return source.replace(/import\s+((?:type\s+)?(?:\w+|\*\s+as\s+\w+|{[^}]+})\s+from\s+)['"]([^'"]+)['"]/g, function (match, importPart, modulePath) {
15
- // Only process relative imports
16
- if (modulePath.startsWith('.')) {
17
- // Check if we have a mapping for this import path
18
- if (importPathMapping.has(modulePath)) {
19
- var newPath = importPathMapping.get(modulePath);
20
- return "import ".concat(importPart, "'").concat(newPath, "'");
21
- }
22
- }
23
- return match;
24
- }).replace(/import\s+['"]([^'"]+)['"]/g, function (match, modulePath) {
25
- // Only process relative imports
26
- if (modulePath.startsWith('.')) {
27
- // Check if we have a mapping for this import path
28
- if (importPathMapping.has(modulePath)) {
29
- var newPath = importPathMapping.get(modulePath);
30
- return "import '".concat(newPath, "'");
31
- }
32
- }
33
- return match;
34
- });
35
- }
@@ -1,2 +0,0 @@
1
- export declare const grammars: import("@wooorm/starry-night").Grammar[];
2
- export declare const extensionMap: Record<string, string>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"grammars.d.ts","sourceRoot":"","sources":["../../../src/pipeline/parseSource/grammars.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,QAAQ,0CAWpB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAY/C,CAAC"}
@@ -1,27 +0,0 @@
1
- import sourceJs from '@wooorm/starry-night/source.js';
2
- import sourceTs from '@wooorm/starry-night/source.ts';
3
- import sourceTsx from '@wooorm/starry-night/source.tsx';
4
- import sourceJson from '@wooorm/starry-night/source.json';
5
- import textMd from '@wooorm/starry-night/text.md';
6
- import sourceMdx from '@wooorm/starry-night/source.mdx';
7
- import textHtmlBasic from '@wooorm/starry-night/text.html.basic';
8
- import sourceCss from '@wooorm/starry-night/source.css';
9
- import sourceShell from '@wooorm/starry-night/source.shell';
10
- import sourceYaml from '@wooorm/starry-night/source.yaml';
11
- export var grammars = [sourceJs, sourceTs, sourceTsx, sourceJson, textMd, sourceMdx,
12
- // needs sourceTsx
13
- textHtmlBasic, sourceCss, sourceShell, sourceYaml];
14
- export var extensionMap = {
15
- '.js': 'source.js',
16
- '.ts': 'source.ts',
17
- '.jsx': 'source.tsx',
18
- // TODO: is there a JSX grammar?
19
- '.tsx': 'source.tsx',
20
- '.json': 'source.json',
21
- '.md': 'text.md',
22
- '.mdx': 'source.mdx',
23
- '.html': 'text.html.basic',
24
- '.css': 'source.css',
25
- '.sh': 'source.shell',
26
- '.yaml': 'source.yaml'
27
- };
@@ -1 +0,0 @@
1
- export * from "./parseSource.js";
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pipeline/parseSource/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- export * from "./parseSource.js";
@@ -1,3 +0,0 @@
1
- import { ParseSource } from "../../CodeHighlighter/index.js";
2
- export declare const parseSource: ParseSource;
3
- export declare const createParseSource: () => Promise<ParseSource>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseSource.d.ts","sourceRoot":"","sources":["../../../src/pipeline/parseSource/parseSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOpD,eAAO,MAAM,WAAW,EAAE,WAsBzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAa,OAAO,CAAC,WAAW,CAM7D,CAAC"}
@@ -1,47 +0,0 @@
1
- import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
- import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
- import { createStarryNight } from '@wooorm/starry-night';
4
- import { grammars, extensionMap } from "./grammars.js";
5
- var starryNight = null;
6
- export var parseSource = function parseSource(source, fileName) {
7
- if (!starryNight) {
8
- throw new Error('Starry Night not initialized. Use createParseSource to create an initialized parseSource function.');
9
- }
10
- var fileType = fileName.slice(fileName.lastIndexOf('.'));
11
- if (!extensionMap[fileType]) {
12
- // Return a basic HAST root node with the source text for unsupported file types
13
- return {
14
- type: 'root',
15
- children: [{
16
- type: 'text',
17
- value: source
18
- }]
19
- };
20
- }
21
- return starryNight.highlight(source, extensionMap[fileType]);
22
- };
23
- export var createParseSource = /*#__PURE__*/function () {
24
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
25
- return _regeneratorRuntime().wrap(function _callee$(_context) {
26
- while (1) switch (_context.prev = _context.next) {
27
- case 0:
28
- if (starryNight) {
29
- _context.next = 4;
30
- break;
31
- }
32
- _context.next = 3;
33
- return createStarryNight(grammars);
34
- case 3:
35
- starryNight = _context.sent;
36
- case 4:
37
- return _context.abrupt("return", parseSource);
38
- case 5:
39
- case "end":
40
- return _context.stop();
41
- }
42
- }, _callee);
43
- }));
44
- return function createParseSource() {
45
- return _ref.apply(this, arguments);
46
- };
47
- }();
@@ -1,2 +0,0 @@
1
- import { transformHtmlCode } from "./transformHtmlCode.js";
2
- export default transformHtmlCode;
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pipeline/transformHtmlCode/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAe,iBAAiB,CAAC"}
@@ -1,4 +0,0 @@
1
- // This is the export format expected by a remark plugin.
2
-
3
- import { transformHtmlCode } from "./transformHtmlCode.js";
4
- export default transformHtmlCode;
@@ -1,13 +0,0 @@
1
- import type { Plugin } from 'unified';
2
- /**
3
- * Rehype plugin that transforms pre > code elements to use loadVariant
4
- *
5
- * This plugin:
6
- * 1. Finds pre elements in the HTML AST
7
- * 2. Collects all code children within each pre element
8
- * 3. Creates variants from multiple code elements or single Default variant
9
- * 4. Uses loadVariant to process each variant
10
- * 5. Stores the combined precompute data on the pre element
11
- * 6. Clears all code element contents
12
- */
13
- export declare const transformHtmlCode: Plugin;
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformHtmlCode.d.ts","sourceRoot":"","sources":["../../../src/pipeline/transformHtmlCode/transformHtmlCode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AA4KtC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAoF/B,CAAC"}