@hanzogui/static 2.0.0-rc.41-hanzoai.5

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 (211) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/check-dep-versions.cjs +372 -0
  4. package/dist/checkDeps.cjs +271 -0
  5. package/dist/constants.cjs +51 -0
  6. package/dist/exports.cjs +46 -0
  7. package/dist/extractor/accessSafe.cjs +48 -0
  8. package/dist/extractor/babelParse.cjs +56 -0
  9. package/dist/extractor/buildClassName.cjs +86 -0
  10. package/dist/extractor/bundle.cjs +224 -0
  11. package/dist/extractor/bundleConfig.cjs +716 -0
  12. package/dist/extractor/concatClassName.cjs +92 -0
  13. package/dist/extractor/createEvaluator.cjs +88 -0
  14. package/dist/extractor/createExtractor.cjs +1827 -0
  15. package/dist/extractor/createLogger.cjs +50 -0
  16. package/dist/extractor/detectModuleFormat.cjs +55 -0
  17. package/dist/extractor/ensureImportingConcat.cjs +54 -0
  18. package/dist/extractor/errors.cjs +28 -0
  19. package/dist/extractor/esbuildAliasPlugin.cjs +56 -0
  20. package/dist/extractor/esbuildTsconfigPaths.cjs +108 -0
  21. package/dist/extractor/evaluateAstNode.cjs +128 -0
  22. package/dist/extractor/extractHelpers.cjs +182 -0
  23. package/dist/extractor/extractMediaStyle.cjs +169 -0
  24. package/dist/extractor/extractToClassNames.cjs +427 -0
  25. package/dist/extractor/extractToNative.cjs +361 -0
  26. package/dist/extractor/findTopmostFunction.cjs +43 -0
  27. package/dist/extractor/generatedUid.cjs +58 -0
  28. package/dist/extractor/getHanzoguiConfigPathFromOptionsConfig.cjs +41 -0
  29. package/dist/extractor/getPrefixLogs.cjs +31 -0
  30. package/dist/extractor/getPropValueFromAttributes.cjs +85 -0
  31. package/dist/extractor/getSourceModule.cjs +100 -0
  32. package/dist/extractor/getStaticBindingsForScope.cjs +213 -0
  33. package/dist/extractor/hasTopLevelAwait.cjs +62 -0
  34. package/dist/extractor/hoistClassNames.cjs +76 -0
  35. package/dist/extractor/literalToAst.cjs +109 -0
  36. package/dist/extractor/loadFile.cjs +17 -0
  37. package/dist/extractor/loadHanzogui.cjs +367 -0
  38. package/dist/extractor/logLines.cjs +43 -0
  39. package/dist/extractor/normalizeTernaries.cjs +95 -0
  40. package/dist/extractor/propsToFontFamilyCache.cjs +42 -0
  41. package/dist/extractor/regenerateConfig.cjs +178 -0
  42. package/dist/extractor/removeUnusedHooks.cjs +108 -0
  43. package/dist/extractor/timer.cjs +52 -0
  44. package/dist/extractor/validHTMLAttributes.cjs +79 -0
  45. package/dist/extractor/watchHanzoguiConfig.cjs +70 -0
  46. package/dist/getPragmaOptions.cjs +73 -0
  47. package/dist/helpers/memoize.cjs +45 -0
  48. package/dist/helpers/requireHanzoguiCore.cjs +40 -0
  49. package/dist/index.cjs +42 -0
  50. package/dist/registerRequire.cjs +208 -0
  51. package/dist/server.cjs +82 -0
  52. package/dist/setup.cjs +0 -0
  53. package/dist/types.cjs +18 -0
  54. package/dist/worker.cjs +111 -0
  55. package/package.json +101 -0
  56. package/src/check-dep-versions.ts +738 -0
  57. package/src/checkDeps.ts +371 -0
  58. package/src/constants.ts +14 -0
  59. package/src/exports.ts +15 -0
  60. package/src/extractor/accessSafe.ts +22 -0
  61. package/src/extractor/babelParse.ts +38 -0
  62. package/src/extractor/buildClassName.ts +76 -0
  63. package/src/extractor/bundle.ts +277 -0
  64. package/src/extractor/bundleConfig.ts +958 -0
  65. package/src/extractor/concatClassName.ts +105 -0
  66. package/src/extractor/createEvaluator.ts +82 -0
  67. package/src/extractor/createExtractor.ts +2680 -0
  68. package/src/extractor/createLogger.ts +41 -0
  69. package/src/extractor/detectModuleFormat.ts +42 -0
  70. package/src/extractor/ensureImportingConcat.ts +36 -0
  71. package/src/extractor/errors.ts +1 -0
  72. package/src/extractor/esbuildAliasPlugin.ts +40 -0
  73. package/src/extractor/esbuildTsconfigPaths.ts +103 -0
  74. package/src/extractor/evaluateAstNode.ts +136 -0
  75. package/src/extractor/extractHelpers.ts +211 -0
  76. package/src/extractor/extractMediaStyle.ts +194 -0
  77. package/src/extractor/extractToClassNames.ts +631 -0
  78. package/src/extractor/extractToNative.ts +489 -0
  79. package/src/extractor/findTopmostFunction.ts +24 -0
  80. package/src/extractor/generatedUid.ts +41 -0
  81. package/src/extractor/getHanzoguiConfigPathFromOptionsConfig.ts +24 -0
  82. package/src/extractor/getPrefixLogs.ts +9 -0
  83. package/src/extractor/getPropValueFromAttributes.ts +95 -0
  84. package/src/extractor/getSourceModule.ts +96 -0
  85. package/src/extractor/getStaticBindingsForScope.ts +237 -0
  86. package/src/extractor/hasTopLevelAwait.ts +28 -0
  87. package/src/extractor/hoistClassNames.ts +52 -0
  88. package/src/extractor/literalToAst.ts +85 -0
  89. package/src/extractor/loadFile.ts +17 -0
  90. package/src/extractor/loadHanzogui.ts +487 -0
  91. package/src/extractor/logLines.ts +16 -0
  92. package/src/extractor/normalizeTernaries.ts +75 -0
  93. package/src/extractor/propsToFontFamilyCache.ts +18 -0
  94. package/src/extractor/regenerateConfig.ts +186 -0
  95. package/src/extractor/removeUnusedHooks.ts +83 -0
  96. package/src/extractor/timer.ts +25 -0
  97. package/src/extractor/validHTMLAttributes.ts +52 -0
  98. package/src/extractor/watchHanzoguiConfig.ts +57 -0
  99. package/src/getPragmaOptions.ts +57 -0
  100. package/src/helpers/memoize.ts +24 -0
  101. package/src/helpers/requireHanzoguiCore.ts +28 -0
  102. package/src/index.ts +4 -0
  103. package/src/registerRequire.ts +283 -0
  104. package/src/server.ts +43 -0
  105. package/src/setup.ts +0 -0
  106. package/src/types.ts +109 -0
  107. package/src/worker.ts +142 -0
  108. package/types/check-dep-versions.d.ts +37 -0
  109. package/types/check-dep-versions.d.ts.map +1 -0
  110. package/types/checkDeps.d.ts +19 -0
  111. package/types/checkDeps.d.ts.map +1 -0
  112. package/types/constants.d.ts +6 -0
  113. package/types/constants.d.ts.map +1 -0
  114. package/types/exports.d.ts +16 -0
  115. package/types/exports.d.ts.map +1 -0
  116. package/types/extractor/accessSafe.d.ts +3 -0
  117. package/types/extractor/accessSafe.d.ts.map +1 -0
  118. package/types/extractor/babelParse.d.ts +5 -0
  119. package/types/extractor/babelParse.d.ts.map +1 -0
  120. package/types/extractor/buildClassName.d.ts +7 -0
  121. package/types/extractor/buildClassName.d.ts.map +1 -0
  122. package/types/extractor/bundle.d.ts +121 -0
  123. package/types/extractor/bundle.d.ts.map +1 -0
  124. package/types/extractor/bundleConfig.d.ts +49 -0
  125. package/types/extractor/bundleConfig.d.ts.map +1 -0
  126. package/types/extractor/concatClassName.d.ts +8 -0
  127. package/types/extractor/concatClassName.d.ts.map +1 -0
  128. package/types/extractor/createEvaluator.d.ts +12 -0
  129. package/types/extractor/createEvaluator.d.ts.map +1 -0
  130. package/types/extractor/createExtractor.d.ts +32 -0
  131. package/types/extractor/createExtractor.d.ts.map +1 -0
  132. package/types/extractor/createLogger.d.ts +3 -0
  133. package/types/extractor/createLogger.d.ts.map +1 -0
  134. package/types/extractor/detectModuleFormat.d.ts +5 -0
  135. package/types/extractor/detectModuleFormat.d.ts.map +1 -0
  136. package/types/extractor/ensureImportingConcat.d.ts +4 -0
  137. package/types/extractor/ensureImportingConcat.d.ts.map +1 -0
  138. package/types/extractor/errors.d.ts +3 -0
  139. package/types/extractor/errors.d.ts.map +1 -0
  140. package/types/extractor/esbuildAliasPlugin.d.ts +18 -0
  141. package/types/extractor/esbuildAliasPlugin.d.ts.map +1 -0
  142. package/types/extractor/esbuildTsconfigPaths.d.ts +11 -0
  143. package/types/extractor/esbuildTsconfigPaths.d.ts.map +1 -0
  144. package/types/extractor/evaluateAstNode.d.ts +3 -0
  145. package/types/extractor/evaluateAstNode.d.ts.map +1 -0
  146. package/types/extractor/extractHelpers.d.ts +28 -0
  147. package/types/extractor/extractHelpers.d.ts.map +1 -0
  148. package/types/extractor/extractMediaStyle.d.ts +11 -0
  149. package/types/extractor/extractMediaStyle.d.ts.map +1 -0
  150. package/types/extractor/extractToClassNames.d.ts +25 -0
  151. package/types/extractor/extractToClassNames.d.ts.map +1 -0
  152. package/types/extractor/extractToNative.d.ts +13 -0
  153. package/types/extractor/extractToNative.d.ts.map +1 -0
  154. package/types/extractor/findTopmostFunction.d.ts +4 -0
  155. package/types/extractor/findTopmostFunction.d.ts.map +1 -0
  156. package/types/extractor/generatedUid.d.ts +5 -0
  157. package/types/extractor/generatedUid.d.ts.map +1 -0
  158. package/types/extractor/getHanzoguiConfigPathFromOptionsConfig.d.ts +3 -0
  159. package/types/extractor/getHanzoguiConfigPathFromOptionsConfig.d.ts.map +1 -0
  160. package/types/extractor/getPrefixLogs.d.ts +3 -0
  161. package/types/extractor/getPrefixLogs.d.ts.map +1 -0
  162. package/types/extractor/getPropValueFromAttributes.d.ts +19 -0
  163. package/types/extractor/getPropValueFromAttributes.d.ts.map +1 -0
  164. package/types/extractor/getSourceModule.d.ts +16 -0
  165. package/types/extractor/getSourceModule.d.ts.map +1 -0
  166. package/types/extractor/getStaticBindingsForScope.d.ts +5 -0
  167. package/types/extractor/getStaticBindingsForScope.d.ts.map +1 -0
  168. package/types/extractor/hasTopLevelAwait.d.ts +2 -0
  169. package/types/extractor/hasTopLevelAwait.d.ts.map +1 -0
  170. package/types/extractor/hoistClassNames.d.ts +6 -0
  171. package/types/extractor/hoistClassNames.d.ts.map +1 -0
  172. package/types/extractor/literalToAst.d.ts +4 -0
  173. package/types/extractor/literalToAst.d.ts.map +1 -0
  174. package/types/extractor/loadFile.d.ts +1 -0
  175. package/types/extractor/loadFile.d.ts.map +1 -0
  176. package/types/extractor/loadHanzogui.d.ts +22 -0
  177. package/types/extractor/loadHanzogui.d.ts.map +1 -0
  178. package/types/extractor/logLines.d.ts +2 -0
  179. package/types/extractor/logLines.d.ts.map +1 -0
  180. package/types/extractor/normalizeTernaries.d.ts +3 -0
  181. package/types/extractor/normalizeTernaries.d.ts.map +1 -0
  182. package/types/extractor/propsToFontFamilyCache.d.ts +4 -0
  183. package/types/extractor/propsToFontFamilyCache.d.ts.map +1 -0
  184. package/types/extractor/regenerateConfig.d.ts +9 -0
  185. package/types/extractor/regenerateConfig.d.ts.map +1 -0
  186. package/types/extractor/removeUnusedHooks.d.ts +3 -0
  187. package/types/extractor/removeUnusedHooks.d.ts.map +1 -0
  188. package/types/extractor/timer.d.ts +5 -0
  189. package/types/extractor/timer.d.ts.map +1 -0
  190. package/types/extractor/validHTMLAttributes.d.ts +52 -0
  191. package/types/extractor/validHTMLAttributes.d.ts.map +1 -0
  192. package/types/extractor/watchHanzoguiConfig.d.ts +5 -0
  193. package/types/extractor/watchHanzoguiConfig.d.ts.map +1 -0
  194. package/types/getPragmaOptions.d.ts +8 -0
  195. package/types/getPragmaOptions.d.ts.map +1 -0
  196. package/types/helpers/memoize.d.ts +8 -0
  197. package/types/helpers/memoize.d.ts.map +1 -0
  198. package/types/helpers/requireHanzoguiCore.d.ts +3 -0
  199. package/types/helpers/requireHanzoguiCore.d.ts.map +1 -0
  200. package/types/index.d.ts +4 -0
  201. package/types/index.d.ts.map +1 -0
  202. package/types/registerRequire.d.ts +10 -0
  203. package/types/registerRequire.d.ts.map +1 -0
  204. package/types/server.d.ts +3 -0
  205. package/types/server.d.ts.map +1 -0
  206. package/types/setup.d.ts +1 -0
  207. package/types/setup.d.ts.map +1 -0
  208. package/types/types.d.ts +92 -0
  209. package/types/types.d.ts.map +1 -0
  210. package/types/worker.d.ts +46 -0
  211. package/types/worker.d.ts.map +1 -0
@@ -0,0 +1,5 @@
1
+ import * as babelParser from '@babel/parser';
2
+ import type * as t from '@babel/types';
3
+ export declare const parserOptions: babelParser.ParserOptions;
4
+ export declare function babelParse(code: string | Buffer, fileName?: string): t.File;
5
+ //# sourceMappingURL=babelParse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babelParse.d.ts","sourceRoot":"","sources":["../../src/extractor/babelParse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,KAAK,CAAC,MAAM,cAAc,CAAA;AAkBtC,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,aAGtC,CAAA;AAIF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,CAW3E"}
@@ -0,0 +1,7 @@
1
+ import * as t from '@babel/types';
2
+ import type { ClassNameObject } from '../types';
3
+ type Builder = (objects: ClassNameObject[], extras?: string) => t.Expression | t.StringLiteral | null;
4
+ export declare const buildClassName: Builder;
5
+ export declare const buildClassNameLogic: Builder;
6
+ export {};
7
+ //# sourceMappingURL=buildClassName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildClassName.d.ts","sourceRoot":"","sources":["../../src/extractor/buildClassName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,KAAK,OAAO,GAAG,CACb,OAAO,EAAE,eAAe,EAAE,EAC1B,MAAM,CAAC,EAAE,MAAM,KACZ,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,aAAa,GAAG,IAAI,CAAA;AAE1C,eAAO,MAAM,cAAc,EAAE,OAU5B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAsDjC,CAAA"}
@@ -0,0 +1,121 @@
1
+ import esbuild from 'esbuild';
2
+ import type { HanzoguiPlatform } from '../types';
3
+ export declare const esbuildLoaderConfig: {
4
+ readonly '.js': "jsx";
5
+ readonly '.png': "dataurl";
6
+ readonly '.jpg': "dataurl";
7
+ readonly '.jpeg': "dataurl";
8
+ readonly '.svg': "dataurl";
9
+ readonly '.gif': "dataurl";
10
+ readonly '.webp': "dataurl";
11
+ readonly '.woff2': "dataurl";
12
+ readonly '.woff': "dataurl";
13
+ readonly '.eot': "dataurl";
14
+ readonly '.otf': "dataurl";
15
+ readonly '.ttf': "dataurl";
16
+ readonly '.mp4': "file";
17
+ readonly '.mpeg4': "file";
18
+ readonly '.mov': "file";
19
+ readonly '.avif': "file";
20
+ readonly '.wmv': "file";
21
+ readonly '.webm': "file";
22
+ readonly '.wav': "file";
23
+ readonly '.aac': "file";
24
+ readonly '.ogg': "file";
25
+ readonly '.flac': "file";
26
+ readonly '.node': "empty";
27
+ };
28
+ export declare const esbuildIgnoreFilesRegex: RegExp;
29
+ /**
30
+ * For internal loading of new files
31
+ */
32
+ type Props = Omit<Partial<esbuild.BuildOptions>, 'entryPoints'> & {
33
+ outfile: string;
34
+ entryPoints: string[];
35
+ resolvePlatformSpecificEntries?: boolean;
36
+ };
37
+ export declare function esbundleHanzoguiConfig(props: Props, platform: HanzoguiPlatform, aliases?: Record<string, string>): Promise<esbuild.BuildResult<{
38
+ outfile: string;
39
+ bundle?: boolean;
40
+ splitting?: boolean;
41
+ preserveSymlinks?: boolean;
42
+ metafile?: boolean;
43
+ outdir?: string;
44
+ outbase?: string;
45
+ external?: string[];
46
+ packages?: "bundle" | "external";
47
+ alias?: Record<string, string>;
48
+ loader?: {
49
+ [ext: string]: esbuild.Loader;
50
+ };
51
+ resolveExtensions?: string[];
52
+ mainFields?: string[];
53
+ conditions?: string[];
54
+ write?: boolean;
55
+ allowOverwrite?: boolean;
56
+ tsconfig?: string;
57
+ outExtension?: {
58
+ [ext: string]: string;
59
+ };
60
+ publicPath?: string;
61
+ entryNames?: string;
62
+ chunkNames?: string;
63
+ assetNames?: string;
64
+ inject?: string[];
65
+ banner?: {
66
+ [type: string]: string;
67
+ };
68
+ footer?: {
69
+ [type: string]: string;
70
+ };
71
+ entryPoints?: (string | {
72
+ in: string;
73
+ out: string;
74
+ })[] | Record<string, string>;
75
+ stdin?: esbuild.StdinOptions;
76
+ plugins?: esbuild.Plugin[];
77
+ absWorkingDir?: string;
78
+ nodePaths?: string[];
79
+ sourcemap?: boolean | "linked" | "inline" | "external" | "both";
80
+ legalComments?: "none" | "inline" | "eof" | "linked" | "external";
81
+ sourceRoot?: string;
82
+ sourcesContent?: boolean;
83
+ format?: esbuild.Format;
84
+ globalName?: string;
85
+ target?: string | string[];
86
+ supported?: Record<string, boolean>;
87
+ platform?: esbuild.Platform;
88
+ mangleProps?: RegExp;
89
+ reserveProps?: RegExp;
90
+ mangleQuoted?: boolean;
91
+ mangleCache?: Record<string, string | false>;
92
+ drop?: esbuild.Drop[];
93
+ dropLabels?: string[];
94
+ minify?: boolean;
95
+ minifyWhitespace?: boolean;
96
+ minifyIdentifiers?: boolean;
97
+ minifySyntax?: boolean;
98
+ lineLimit?: number;
99
+ charset?: esbuild.Charset;
100
+ treeShaking?: boolean;
101
+ ignoreAnnotations?: boolean;
102
+ jsx?: "transform" | "preserve" | "automatic";
103
+ jsxFactory?: string;
104
+ jsxFragment?: string;
105
+ jsxImportSource?: string;
106
+ jsxDev?: boolean;
107
+ jsxSideEffects?: boolean;
108
+ define?: {
109
+ [key: string]: string;
110
+ };
111
+ pure?: string[];
112
+ keepNames?: boolean;
113
+ absPaths?: esbuild.AbsPaths[];
114
+ color?: boolean;
115
+ logLevel?: esbuild.LogLevel;
116
+ logLimit?: number;
117
+ logOverride?: Record<string, esbuild.LogLevel>;
118
+ tsconfigRaw?: string | esbuild.TsconfigRaw;
119
+ }>>;
120
+ export {};
121
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/extractor/bundle.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAOhD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;CAwBtB,CAAA;AAQV,eAAO,MAAM,uBAAuB,QAAqD,CAAA;AAEzF;;GAEG;AAEH,KAAK,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC,GAAG;IAChE,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,CAAA;AA6MD,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBjC"}
@@ -0,0 +1,49 @@
1
+ import { type StaticConfig, type HanzoguiInternalConfig } from '@hanzogui/web';
2
+ import esbuild from 'esbuild';
3
+ import type { HanzoguiOptions } from '../types';
4
+ type NameToPaths = {
5
+ [key: string]: Set<string>;
6
+ };
7
+ export type LoadedComponents = {
8
+ moduleName: string;
9
+ nameToInfo: Record<string, {
10
+ staticConfig: StaticConfig;
11
+ }>;
12
+ };
13
+ export type HanzoguiProjectInfo = {
14
+ components?: LoadedComponents[];
15
+ hanzoguiConfig?: HanzoguiInternalConfig | null;
16
+ nameToPaths?: NameToPaths;
17
+ cached?: boolean;
18
+ };
19
+ export declare const esbuildOptions: {
20
+ define: {
21
+ __DEV__: string;
22
+ };
23
+ target: string;
24
+ format: "cjs";
25
+ jsx: "automatic";
26
+ platform: "node";
27
+ };
28
+ export declare const esbuildOptionsWithPlugins: {
29
+ plugins: esbuild.Plugin[];
30
+ define: {
31
+ __DEV__: string;
32
+ };
33
+ target: string;
34
+ format: "cjs";
35
+ jsx: "automatic";
36
+ platform: "node";
37
+ };
38
+ export type BundledConfig = Exclude<Awaited<ReturnType<typeof bundleConfig>>, undefined>;
39
+ export declare function hasBundledConfigChanged(): boolean;
40
+ export declare const getLoadedConfig: () => HanzoguiInternalConfig | null;
41
+ export declare function getBundledConfig(props: HanzoguiOptions, rebuild?: boolean): Promise<any>;
42
+ export declare function bundleConfig(props: HanzoguiOptions): Promise<any>;
43
+ export declare function writeHanzoguiCSS(outputCSS: string, config: HanzoguiInternalConfig): Promise<void>;
44
+ export declare function loadComponents(props: HanzoguiOptions, forceExports?: boolean): Promise<LoadedComponents[]>;
45
+ export declare function loadComponentsSync(props: HanzoguiOptions, forceExports?: boolean): LoadedComponents[];
46
+ export declare function loadComponentsInner(props: HanzoguiOptions, forceExports?: boolean): Promise<null | LoadedComponents[]>;
47
+ export declare function loadComponentsInnerSync(props: HanzoguiOptions, forceExports?: boolean): null | LoadedComponents[];
48
+ export {};
49
+ //# sourceMappingURL=bundleConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/bundleConfig.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,OAAO,MAAM,SAAS,CAAA;AAI7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAyE/C,KAAK,WAAW,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAChB,MAAM,EACN;QACE,YAAY,EAAE,YAAY,CAAA;KAC3B,CACF,CAAA;CACF,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC/B,cAAc,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;IAC9C,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAgGD,eAAO,MAAM,cAAc;;;;;;;;CAEK,CAAA;AAGhC,eAAO,MAAM,yBAAyB;;;;;;;;;CAGN,CAAA;AAEhC,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;AAQxF,wBAAgB,uBAAuB,YAMtC;AAID,eAAO,MAAM,eAAe,qCAAqB,CAAA;AAEjD,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,UAAQ,gBAS7E;AAgBD,wBAAsB,YAAY,CAAC,KAAK,EAAE,eAAe,gBAmPxD;AAED,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,iBAmBvF;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,eAAe,EAAE,YAAY,UAAQ,+BAIhF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAE,YAAY,UAAQ,sBAI9E;AAqBD,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,eAAe,EACtB,YAAY,UAAQ,GACnB,OAAO,CAAC,IAAI,GAAG,gBAAgB,EAAE,CAAC,CAyJpC;AAGD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,eAAe,EACtB,YAAY,UAAQ,GACnB,IAAI,GAAG,gBAAgB,EAAE,CAyI3B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * next - take objects:
3
+ *
4
+ * { _shorthand: 'postfix' }
5
+ *
6
+ */
7
+ export declare function concatClassName(...args: any[]): any;
8
+ //# sourceMappingURL=concatClassName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concatClassName.d.ts","sourceRoot":"","sources":["../../src/extractor/concatClassName.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,wBAAgB,eAAe,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { NodePath } from '@babel/traverse';
2
+ import * as t from '@babel/types';
3
+ import type { HanzoguiOptionsWithFileInfo } from '../types';
4
+ export declare function createEvaluator({ props, staticNamespace, sourcePath, traversePath, shouldPrintDebug, }: {
5
+ props: HanzoguiOptionsWithFileInfo;
6
+ staticNamespace: Record<string, any>;
7
+ sourcePath?: string;
8
+ traversePath?: NodePath<t.JSXElement>;
9
+ shouldPrintDebug: boolean | 'verbose';
10
+ }): (n: t.Node) => any;
11
+ export declare function createSafeEvaluator(attemptEval: (n: t.Node) => any): (n: t.Node) => any;
12
+ //# sourceMappingURL=createEvaluator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createEvaluator.d.ts","sourceRoot":"","sources":["../../src/extractor/createEvaluator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAIjC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAG3D,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,eAAe,EACf,UAAU,EACV,YAAY,EACZ,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,2BAA2B,CAAA;IAClC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;IACrC,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC,IA6CS,GAAG,CAAC,CAAC,IAAI,SAGlB;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,GAAG,IACzD,GAAG,CAAC,CAAC,IAAI,SAOlB"}
@@ -0,0 +1,32 @@
1
+ import type { NodePath } from '@babel/traverse';
2
+ import * as t from '@babel/types';
3
+ import type { ExtractorOptions, ExtractorParseProps, HanzoguiOptions } from '../types';
4
+ import type { HanzoguiProjectInfo } from './bundleConfig';
5
+ import { cleanupBeforeExit } from './getStaticBindingsForScope';
6
+ export type Extractor = ReturnType<typeof createExtractor>;
7
+ type FileOrPath = NodePath<t.Program> | t.File;
8
+ export declare function createExtractor({ logger, platform }?: ExtractorOptions): {
9
+ options: {
10
+ logger: import("../types").Logger;
11
+ };
12
+ cleanupBeforeExit: typeof cleanupBeforeExit;
13
+ loadHanzogui: (props: HanzoguiOptions) => Promise<HanzoguiProjectInfo | null>;
14
+ loadHanzoguiSync: (props: HanzoguiOptions) => HanzoguiProjectInfo | null;
15
+ getHanzogui(): import("@hanzogui/web").HanzoguiInternalConfig | null | undefined;
16
+ parseSync: (f: FileOrPath, props: ExtractorParseProps) => {
17
+ styled: number;
18
+ flattened: number;
19
+ optimized: number;
20
+ modified: number;
21
+ found: number;
22
+ } | null;
23
+ parse: (f: FileOrPath, props: ExtractorParseProps) => Promise<{
24
+ styled: number;
25
+ flattened: number;
26
+ optimized: number;
27
+ modified: number;
28
+ found: number;
29
+ } | null>;
30
+ };
31
+ export {};
32
+ //# sourceMappingURL=createExtractor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createExtractor.d.ts","sourceRoot":"","sources":["../../src/extractor/createExtractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AAEhE,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAmBjC,OAAO,KAAK,EAGV,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EAGhB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAoB,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAc3E,OAAO,EAAE,iBAAiB,EAA6B,MAAM,6BAA6B,CAAA;AAwB1F,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAE1D,KAAK,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAQ9C,wBAAgB,eAAe,CAC7B,EAAE,MAAgB,EAAE,QAAgB,EAAE,GAAE,gBAAsC;;;;;0BAsJnD,eAAe;8BAPjB,eAAe;;mBAwBvB,UAAU,SAAS,mBAAmB;;;;;;;eAKpC,UAAU,SAAS,mBAAmB;;;;;;;EA43E1D"}
@@ -0,0 +1,3 @@
1
+ import type { HanzoguiOptions } from '../types';
2
+ export declare function createLogger(sourcePath: string, options: HanzoguiOptions): (res: any) => void;
3
+ //# sourceMappingURL=createLogger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createLogger.d.ts","sourceRoot":"","sources":["../../src/extractor/createLogger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAG/C,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,IAQ/D,QAAG,UA2BZ"}
@@ -0,0 +1,5 @@
1
+ type ModuleFormat = 'cjs' | 'esm';
2
+ export declare function detectModuleFormat(filePath: string): ModuleFormat;
3
+ export declare function clearFormatCache(): void;
4
+ export {};
5
+ //# sourceMappingURL=detectModuleFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detectModuleFormat.d.ts","sourceRoot":"","sources":["../../src/extractor/detectModuleFormat.ts"],"names":[],"mappings":"AAGA,KAAK,YAAY,GAAG,KAAK,GAAG,KAAK,CAAA;AAKjC,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CA6BjE;AAED,wBAAgB,gBAAgB,SAE/B"}
@@ -0,0 +1,4 @@
1
+ import type { NodePath } from '@babel/traverse';
2
+ import * as t from '@babel/types';
3
+ export declare function ensureImportingConcat(path: NodePath<t.Program>): void;
4
+ //# sourceMappingURL=ensureImportingConcat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureImportingConcat.d.ts","sourceRoot":"","sources":["../../src/extractor/ensureImportingConcat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAIjC,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QA8B9D"}
@@ -0,0 +1,3 @@
1
+ export declare class BailOptimizationError extends Error {
2
+ }
3
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/extractor/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,qBAAsB,SAAQ,KAAK;CAAG"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * alias plugin
3
+ * @description
4
+ * config example:
5
+ * ```
6
+ * {
7
+ * '@lib': '/some/absolute/path'
8
+ * }
9
+ * ```
10
+ * then `import { something } from '@hanzogui/core'` will be transformed to
11
+ * `import { something } from '/some/absolute/path/xxx'`
12
+ * @param {object} config
13
+ */
14
+ export declare const esbuildAliasPlugin: (config: any) => {
15
+ name: string;
16
+ setup(build: any): void;
17
+ };
18
+ //# sourceMappingURL=esbuildAliasPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuildAliasPlugin.d.ts","sourceRoot":"","sources":["../../src/extractor/esbuildAliasPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAM;;;CA0BxC,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { Plugin } from 'esbuild';
2
+ interface Tsconfig {
3
+ compilerOptions?: {
4
+ baseUrl?: string;
5
+ paths?: Record<string, string[]>;
6
+ };
7
+ }
8
+ export declare function TsconfigPathsPlugin(): Plugin;
9
+ export declare function loadCompilerOptionsFromTsconfig(tsconfig?: Tsconfig | string): import("typescript").CompilerOptions;
10
+ export {};
11
+ //# sourceMappingURL=esbuildTsconfigPaths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuildTsconfigPaths.d.ts","sourceRoot":"","sources":["../../src/extractor/esbuildTsconfigPaths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAarC,UAAU,QAAQ;IAChB,eAAe,CAAC,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;KACjC,CAAA;CACF;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CA4C5C;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,wCAuB3E"}
@@ -0,0 +1,3 @@
1
+ import * as t from '@babel/types';
2
+ export declare function evaluateAstNode(exprNode: t.Node | undefined | null, evalFn?: (node: t.Node) => any, shouldPrintDebug?: boolean | 'verbose'): any;
3
+ //# sourceMappingURL=evaluateAstNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evaluateAstNode.d.ts","sourceRoot":"","sources":["../../src/extractor/evaluateAstNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAEjC,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,EACnC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,KAAK,GAAG,EAC9B,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,GACrC,GAAG,CAiIL"}
@@ -0,0 +1,28 @@
1
+ import type { NodePath } from '@babel/traverse';
2
+ import * as t from '@babel/types';
3
+ import type { ExtractedAttr, HanzoguiOptionsWithFileInfo, Ternary } from '../types';
4
+ export declare function isPresent<T extends object>(input: null | void | undefined | T): input is T;
5
+ export declare function isSimpleSpread(node: t.JSXSpreadAttribute): boolean;
6
+ export declare const attrStr: (attr?: ExtractedAttr) => string | t.JSXIdentifier;
7
+ export declare const objToStr: (obj: any, spacer?: string) => any;
8
+ export declare const ternaryStr: (x: Ternary) => string;
9
+ export declare function findComponentName(scope: any): string | undefined;
10
+ export declare function isValidThemeHook(props: HanzoguiOptionsWithFileInfo, jsxPath: NodePath<t.JSXElement>, n: t.MemberExpression, sourcePath?: string): boolean;
11
+ export declare const isInsideComponentPackage: (props: HanzoguiOptionsWithFileInfo, moduleName: string) => any;
12
+ export declare const isComponentPackage: (props: HanzoguiOptionsWithFileInfo, srcName: string) => any;
13
+ export declare function getValidComponent(props: HanzoguiOptionsWithFileInfo, moduleName: string, componentName: string): false | {
14
+ staticConfig: import("@hanzogui/web").StaticConfig;
15
+ } | null;
16
+ export declare const isValidModule: (props: HanzoguiOptionsWithFileInfo, moduleName: string) => {
17
+ isLocal: boolean;
18
+ isValid: any;
19
+ };
20
+ export declare const getValidImport: (props: HanzoguiOptionsWithFileInfo, moduleName: string, componentName?: string) => {
21
+ staticConfig: import("@hanzogui/web").StaticConfig;
22
+ } | null;
23
+ export declare const isValidImport: (props: HanzoguiOptionsWithFileInfo, moduleName: string, componentName?: string) => any;
24
+ export declare const getValidComponentsPaths: {
25
+ (...args: any[]): any;
26
+ cache: Map<any, any>;
27
+ };
28
+ //# sourceMappingURL=extractHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractHelpers.d.ts","sourceRoot":"","sources":["../../src/extractor/extractHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAIjC,OAAO,KAAK,EAAE,aAAa,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAInF,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EACxC,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,GACjC,KAAK,IAAI,CAAC,CAEZ;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,kBAAkB,WAExD;AAED,eAAO,MAAM,OAAO,GAAI,OAAO,aAAa,6BAQ3C,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,EAAE,eAAa,QAgB/C,CAAA;AASD,eAAO,MAAM,UAAU,GAAI,GAAG,OAAO,WAgBpC,CAAA;AAID,wBAAgB,iBAAiB,CAAC,KAAK,KAAA,sBAoBtC;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,2BAA2B,EAClC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,CAAC,EAAE,CAAC,CAAC,gBAAgB,EACrB,UAAU,CAAC,EAAE,MAAM,WAkBpB;AAED,eAAO,MAAM,wBAAwB,GACnC,OAAO,2BAA2B,EAClC,YAAY,MAAM,QAKnB,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,OAAO,2BAA2B,EAClC,SAAS,MAAM,QAKhB,CAAA;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,2BAA2B,EAClC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM;;SAiBtB;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,2BAA2B,EAAE,YAAY,MAAM;;;CAWnF,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,OAAO,2BAA2B,EAClC,YAAY,MAAM,EAClB,gBAAgB,MAAM;;QAOvB,CAAA;AAED,eAAO,MAAM,aAAa,GACxB,OAAO,2BAA2B,EAClC,YAAY,MAAM,EAClB,gBAAgB,MAAM,QAMvB,CAAA;AAOD,eAAO,MAAM,uBAAuB;;;CAMlC,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { NodePath } from '@babel/traverse';
2
+ import * as t from '@babel/types';
3
+ import type { HanzoguiInternalConfig } from '@hanzogui/core';
4
+ import * as core from '@hanzogui/core';
5
+ import type { HanzoguiOptionsWithFileInfo, Ternary } from '../types';
6
+ export declare function extractMediaStyle(props: HanzoguiOptionsWithFileInfo, ternary: Ternary, jsxPath: NodePath<t.JSXElement>, hanzoguiConfig: HanzoguiInternalConfig, sourcePath: string, importance?: number, shouldPrintDebug?: boolean | 'verbose'): {
7
+ mediaStyles: core.StyleObject[];
8
+ ternaryWithoutMedia: Ternary | null;
9
+ } | null;
10
+ export declare function isValidMediaCall(props: HanzoguiOptionsWithFileInfo, jsxPath: NodePath<t.JSXElement>, init: t.Expression, sourcePath: string): boolean;
11
+ //# sourceMappingURL=extractMediaStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractMediaStyle.d.ts","sourceRoot":"","sources":["../../src/extractor/extractMediaStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AACjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAItC,OAAO,KAAK,EAAe,2BAA2B,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGjF,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,2BAA2B,EAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,cAAc,EAAE,sBAAsB,EACtC,UAAU,EAAE,MAAM,EAClB,UAAU,SAAI,EACd,gBAAgB,GAAE,OAAO,GAAG,SAAiB;;;SAmE9C;AA0FD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,2BAA2B,EAClC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,IAAI,EAAE,CAAC,CAAC,UAAU,EAClB,UAAU,EAAE,MAAM,WAenB"}
@@ -0,0 +1,25 @@
1
+ import * as t from '@babel/types';
2
+ import type { HanzoguiOptions } from '../types';
3
+ import type { Extractor } from './createExtractor';
4
+ export type ExtractedResponse = {
5
+ js: string | Buffer;
6
+ styles: string;
7
+ stylesPath?: string;
8
+ ast: t.File;
9
+ map: any;
10
+ stats: {
11
+ styled: number;
12
+ flattened: number;
13
+ optimized: number;
14
+ found: number;
15
+ };
16
+ };
17
+ export type ExtractToClassNamesProps = {
18
+ extractor: Extractor;
19
+ source: string | Buffer;
20
+ sourcePath?: string;
21
+ options: HanzoguiOptions;
22
+ shouldPrintDebug: boolean | 'verbose';
23
+ };
24
+ export declare function extractToClassNames({ extractor, source, sourcePath, options, shouldPrintDebug, }: ExtractToClassNamesProps): Promise<ExtractedResponse | null>;
25
+ //# sourceMappingURL=extractToClassNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractToClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/extractToClassNames.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAKjC,OAAO,KAAK,EAAe,eAAe,EAAW,MAAM,UAAU,CAAA;AAErE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAYlD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,CAAC,CAAC,IAAI,CAAA;IACX,GAAG,EAAE,GAAG,CAAA;IACR,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,CAAA;QACjB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,eAAe,CAAA;IACxB,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC,CAAA;AAQD,wBAAsB,mBAAmB,CAAC,EACxC,SAAS,EACT,MAAM,EACN,UAAe,EACf,OAAO,EACP,gBAAgB,GACjB,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CA2gB9D"}
@@ -0,0 +1,13 @@
1
+ import { type BabelFileResult } from '@babel/core';
2
+ import type { HanzoguiOptions } from '../types';
3
+ export declare function extractToNative(sourceFileName: string, sourceCode: string, options: HanzoguiOptions): BabelFileResult;
4
+ export declare function getBabelPlugin(): any;
5
+ export declare function getBabelParseDefinition(options: HanzoguiOptions): {
6
+ name: string;
7
+ visitor: {
8
+ Program: {
9
+ enter(this: any, root: any): void;
10
+ };
11
+ };
12
+ };
13
+ //# sourceMappingURL=extractToNative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractToNative.d.ts","sourceRoot":"","sources":["../../src/extractor/extractToNative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAwB,MAAM,aAAa,CAAA;AAQxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAsB/C,wBAAgB,eAAe,CAC7B,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB,eAAe,CAoBjB;AAED,wBAAgB,cAAc,QAK7B;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe;;;;wBAM5C,GAAG;;;EAyYtB"}
@@ -0,0 +1,4 @@
1
+ import type { NodePath } from '@babel/traverse';
2
+ import type * as t from '@babel/types';
3
+ export declare function findTopmostFunction(jsxPath: NodePath<t.JSXElement>): NodePath<any> | null;
4
+ //# sourceMappingURL=findTopmostFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findTopmostFunction.d.ts","sourceRoot":"","sources":["../../src/extractor/findTopmostFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,KAAK,CAAC,MAAM,cAAc,CAAA;AAEtC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,wBAoBlE"}
@@ -0,0 +1,5 @@
1
+ declare module '@babel/types' {
2
+ function toIdentifier(input: string): string;
3
+ }
4
+ export declare function generateUid(scope: any, name: string): string;
5
+ //# sourceMappingURL=generatedUid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generatedUid.d.ts","sourceRoot":"","sources":["../../src/extractor/generatedUid.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,cAAc,CAAC;IAC5B,SAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACpD;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgC5D"}
@@ -0,0 +1,3 @@
1
+ import type { HanzoguiOptions } from '../types';
2
+ export declare function getHanzoguiConfigPathFromOptionsConfig(config: NonNullable<HanzoguiOptions['config']>): string;
3
+ //# sourceMappingURL=getHanzoguiConfigPathFromOptionsConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getHanzoguiConfigPathFromOptionsConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/getHanzoguiConfigPathFromOptionsConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,WAAW,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,UAiB/C"}
@@ -0,0 +1,3 @@
1
+ import type { HanzoguiOptions } from '../types';
2
+ export declare function getPrefixLogs(options?: HanzoguiOptions): string;
3
+ //# sourceMappingURL=getPrefixLogs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPrefixLogs.d.ts","sourceRoot":"","sources":["../../src/extractor/getPrefixLogs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,eAAe,UAKtD"}
@@ -0,0 +1,19 @@
1
+ import * as t from '@babel/types';
2
+ /**
3
+ * getPropValueFromAttributes gets a prop by name from a list of attributes and accounts for potential spread operators.
4
+ * Here's an example. Given this component:
5
+ * ```
6
+ * <Block coolProp="wow" {...spread1} neatProp="ok" {...spread2} />```
7
+ * getPropValueFromAttributes will return the following:
8
+ * - for propName `coolProp`:
9
+ * ```
10
+ * accessSafe(spread1, 'coolProp') || accessSafe(spread2, 'coolProp') || 'wow'```
11
+ * - for propName `neatProp`:
12
+ * ```
13
+ * accessSafe(spread2, 'neatProp') || 'ok'```
14
+ * - for propName `notPresent`: `null`
15
+ *
16
+ * The returned value should (obviously) be placed after spread operators.
17
+ */
18
+ export declare function getPropValueFromAttributes(propName: string, attrs: (t.JSXAttribute | t.JSXSpreadAttribute)[]): t.Expression | null;
19
+ //# sourceMappingURL=getPropValueFromAttributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPropValueFromAttributes.d.ts","sourceRoot":"","sources":["../../src/extractor/getPropValueFromAttributes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAIjC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,kBAAkB,CAAC,EAAE,GAC/C,CAAC,CAAC,UAAU,GAAG,IAAI,CAsErB"}
@@ -0,0 +1,16 @@
1
+ import * as t from '@babel/types';
2
+ export interface SourceModule {
3
+ sourceModule?: string;
4
+ imported?: string;
5
+ local?: string;
6
+ destructured?: boolean;
7
+ usesImportSyntax: boolean;
8
+ }
9
+ export declare function getSourceModule(itemName: string, itemBinding: {
10
+ constant?: boolean;
11
+ path: {
12
+ node: t.Node;
13
+ parent: any;
14
+ };
15
+ }): SourceModule | null;
16
+ //# sourceMappingURL=getSourceModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSourceModule.d.ts","sourceRoot":"","sources":["../../src/extractor/getSourceModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAEjC,MAAM,WAAW,YAAY;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE;QAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAAC,MAAM,EAAE,GAAG,CAAA;KAAE,CAAA;CACpC,GACA,YAAY,GAAG,IAAI,CA+ErB"}
@@ -0,0 +1,5 @@
1
+ import type { NodePath } from '@babel/traverse';
2
+ import * as t from '@babel/types';
3
+ export declare function cleanupBeforeExit(): void;
4
+ export declare function getStaticBindingsForScope(scope: NodePath<t.JSXElement>['scope'], whitelist: string[] | undefined, sourcePath: string, bindingCache: Record<string, string | null>, shouldPrintDebug: boolean | 'verbose'): Promise<Record<string, any>>;
5
+ //# sourceMappingURL=getStaticBindingsForScope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStaticBindingsForScope.d.ts","sourceRoot":"","sources":["../../src/extractor/getStaticBindingsForScope.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAW,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAuCjC,wBAAgB,iBAAiB,SAQhC;AA4CD,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EACtC,SAAS,EAAE,MAAM,EAAE,YAAK,EACxB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EAC3C,gBAAgB,EAAE,OAAO,GAAG,SAAS,GACpC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAsI9B"}
@@ -0,0 +1,2 @@
1
+ export declare function hasTopLevelAwait(contents: string, fileName?: string): boolean;
2
+ //# sourceMappingURL=hasTopLevelAwait.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasTopLevelAwait.d.ts","sourceRoot":"","sources":["../../src/extractor/hasTopLevelAwait.ts"],"names":[],"mappings":"AAGA,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,WAwBnE"}
@@ -0,0 +1,6 @@
1
+ import type { NodePath } from '@babel/traverse';
2
+ import * as t from '@babel/types';
3
+ export declare function hoistClassNames(path: NodePath<t.JSXElement>, existing: {
4
+ [key: string]: t.Identifier;
5
+ }, expr: t.Expression): any;
6
+ //# sourceMappingURL=hoistClassNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hoistClassNames.d.ts","sourceRoot":"","sources":["../../src/extractor/hoistClassNames.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAEjC,wBAAgB,eAAe,CAC7B,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC5B,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,UAAU,CAAA;CAAE,EACzC,IAAI,EAAE,CAAC,CAAC,UAAU,OA6CnB"}
@@ -0,0 +1,4 @@
1
+ import * as t from '@babel/types';
2
+ export declare function literalToAst(literal: any): t.Expression;
3
+ export declare function astToLiteral(node: any): any;
4
+ //# sourceMappingURL=literalToAst.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literalToAst.d.ts","sourceRoot":"","sources":["../../src/extractor/literalToAst.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAA;AAEjC,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,CAAC,UAAU,CA6BvD;AAID,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,OA4BrC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=loadFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadFile.d.ts","sourceRoot":"","sources":["../../src/extractor/loadFile.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ import type { CLIResolvedOptions, CLIUserOptions, HanzoguiOptions } from '@hanzogui/types';
2
+ import { type HanzoguiProjectInfo } from './bundleConfig';
3
+ export declare function loadHanzogui(propsIn: Partial<HanzoguiOptions>): Promise<HanzoguiProjectInfo | null>;
4
+ export declare const generateThemesAndLog: (options: HanzoguiOptions, force?: boolean) => Promise<void>;
5
+ /**
6
+ * Load hanzogui.build.ts config using esbuild-wasm transform
7
+ * Uses WASM to avoid native esbuild service lifecycle issues (EPIPE errors)
8
+ */
9
+ export declare function loadHanzoguiBuildConfigAsync(hanzoguiOptions: Partial<HanzoguiOptions> | undefined): Promise<HanzoguiOptions>;
10
+ /**
11
+ * @deprecated Use loadHanzoguiBuildConfigAsync instead to avoid EPIPE errors
12
+ */
13
+ export declare function loadHanzoguiBuildConfigSync(hanzoguiOptions: Partial<HanzoguiOptions> | undefined): HanzoguiOptions;
14
+ export declare function loadHanzoguiSync({ forceExports, cacheKey, ...propsIn }: Partial<HanzoguiOptions> & {
15
+ forceExports?: boolean;
16
+ cacheKey?: string;
17
+ }): HanzoguiProjectInfo;
18
+ export declare function getOptions({ root, tsconfigPath, hanzoguiOptions, host, debug, }?: Partial<CLIUserOptions>): Promise<CLIResolvedOptions>;
19
+ export declare function resolveWebOrNativeSpecificEntry(entry: string): string;
20
+ export type { HanzoguiProjectInfo };
21
+ export declare function esbuildWatchFiles(entry: string, onChanged: () => void): Promise<() => void>;
22
+ //# sourceMappingURL=loadHanzogui.d.ts.map