@hanzogui/static 2.0.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 (207) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/check-dep-versions.cjs +267 -0
  4. package/dist/checkDeps.cjs +200 -0
  5. package/dist/constants.cjs +49 -0
  6. package/dist/exports.cjs +44 -0
  7. package/dist/extractor/accessSafe.cjs +46 -0
  8. package/dist/extractor/babelParse.cjs +54 -0
  9. package/dist/extractor/buildClassName.cjs +62 -0
  10. package/dist/extractor/bundle.cjs +185 -0
  11. package/dist/extractor/bundleConfig.cjs +513 -0
  12. package/dist/extractor/concatClassName.cjs +80 -0
  13. package/dist/extractor/createEvaluator.cjs +75 -0
  14. package/dist/extractor/createExtractor.cjs +1150 -0
  15. package/dist/extractor/createLogger.cjs +45 -0
  16. package/dist/extractor/detectModuleFormat.cjs +49 -0
  17. package/dist/extractor/ensureImportingConcat.cjs +48 -0
  18. package/dist/extractor/errors.cjs +26 -0
  19. package/dist/extractor/esbuildAliasPlugin.cjs +44 -0
  20. package/dist/extractor/esbuildTsconfigPaths.cjs +86 -0
  21. package/dist/extractor/evaluateAstNode.cjs +83 -0
  22. package/dist/extractor/extractHelpers.cjs +119 -0
  23. package/dist/extractor/extractMediaStyle.cjs +128 -0
  24. package/dist/extractor/extractToClassNames.cjs +321 -0
  25. package/dist/extractor/extractToNative.cjs +266 -0
  26. package/dist/extractor/findTopmostFunction.cjs +34 -0
  27. package/dist/extractor/generatedUid.cjs +47 -0
  28. package/dist/extractor/getGuiConfigPathFromOptionsConfig.cjs +35 -0
  29. package/dist/extractor/getPrefixLogs.cjs +29 -0
  30. package/dist/extractor/getPropValueFromAttributes.cjs +67 -0
  31. package/dist/extractor/getSourceModule.cjs +64 -0
  32. package/dist/extractor/getStaticBindingsForScope.cjs +150 -0
  33. package/dist/extractor/hoistClassNames.cjs +62 -0
  34. package/dist/extractor/literalToAst.cjs +84 -0
  35. package/dist/extractor/loadFile.cjs +11 -0
  36. package/dist/extractor/loadGui.cjs +322 -0
  37. package/dist/extractor/logLines.cjs +35 -0
  38. package/dist/extractor/normalizeTernaries.cjs +73 -0
  39. package/dist/extractor/propsToFontFamilyCache.cjs +38 -0
  40. package/dist/extractor/regenerateConfig.cjs +150 -0
  41. package/dist/extractor/removeUnusedHooks.cjs +76 -0
  42. package/dist/extractor/timer.cjs +43 -0
  43. package/dist/extractor/validHTMLAttributes.cjs +77 -0
  44. package/dist/extractor/watchGuiConfig.cjs +58 -0
  45. package/dist/getPragmaOptions.cjs +58 -0
  46. package/dist/helpers/memoize.cjs +37 -0
  47. package/dist/helpers/requireGuiCore.cjs +33 -0
  48. package/dist/index.cjs +40 -0
  49. package/dist/registerRequire.cjs +115 -0
  50. package/dist/server.cjs +75 -0
  51. package/dist/setup.cjs +0 -0
  52. package/dist/types.cjs +16 -0
  53. package/dist/worker.cjs +89 -0
  54. package/package.json +101 -0
  55. package/src/check-dep-versions.ts +738 -0
  56. package/src/checkDeps.ts +371 -0
  57. package/src/constants.ts +14 -0
  58. package/src/exports.ts +15 -0
  59. package/src/extractor/accessSafe.ts +22 -0
  60. package/src/extractor/babelParse.ts +37 -0
  61. package/src/extractor/buildClassName.ts +76 -0
  62. package/src/extractor/bundle.ts +277 -0
  63. package/src/extractor/bundleConfig.ts +958 -0
  64. package/src/extractor/concatClassName.ts +105 -0
  65. package/src/extractor/createEvaluator.ts +82 -0
  66. package/src/extractor/createExtractor.ts +2665 -0
  67. package/src/extractor/createLogger.ts +41 -0
  68. package/src/extractor/detectModuleFormat.ts +42 -0
  69. package/src/extractor/ensureImportingConcat.ts +36 -0
  70. package/src/extractor/errors.ts +1 -0
  71. package/src/extractor/esbuildAliasPlugin.ts +40 -0
  72. package/src/extractor/esbuildTsconfigPaths.ts +103 -0
  73. package/src/extractor/evaluateAstNode.ts +136 -0
  74. package/src/extractor/extractHelpers.ts +211 -0
  75. package/src/extractor/extractMediaStyle.ts +194 -0
  76. package/src/extractor/extractToClassNames.ts +631 -0
  77. package/src/extractor/extractToNative.ts +463 -0
  78. package/src/extractor/findTopmostFunction.ts +24 -0
  79. package/src/extractor/generatedUid.ts +41 -0
  80. package/src/extractor/getGuiConfigPathFromOptionsConfig.ts +24 -0
  81. package/src/extractor/getPrefixLogs.ts +9 -0
  82. package/src/extractor/getPropValueFromAttributes.ts +95 -0
  83. package/src/extractor/getSourceModule.ts +96 -0
  84. package/src/extractor/getStaticBindingsForScope.ts +237 -0
  85. package/src/extractor/hoistClassNames.ts +52 -0
  86. package/src/extractor/literalToAst.ts +85 -0
  87. package/src/extractor/loadFile.ts +17 -0
  88. package/src/extractor/loadGui.ts +487 -0
  89. package/src/extractor/logLines.ts +16 -0
  90. package/src/extractor/normalizeTernaries.ts +75 -0
  91. package/src/extractor/propsToFontFamilyCache.ts +18 -0
  92. package/src/extractor/regenerateConfig.ts +186 -0
  93. package/src/extractor/removeUnusedHooks.ts +83 -0
  94. package/src/extractor/timer.ts +25 -0
  95. package/src/extractor/validHTMLAttributes.ts +52 -0
  96. package/src/extractor/watchGuiConfig.ts +57 -0
  97. package/src/getPragmaOptions.ts +57 -0
  98. package/src/helpers/memoize.ts +24 -0
  99. package/src/helpers/requireGuiCore.ts +28 -0
  100. package/src/index.ts +4 -0
  101. package/src/registerRequire.ts +236 -0
  102. package/src/server.ts +43 -0
  103. package/src/setup.ts +0 -0
  104. package/src/types.ts +109 -0
  105. package/src/worker.ts +142 -0
  106. package/types/check-dep-versions.d.ts +37 -0
  107. package/types/check-dep-versions.d.ts.map +1 -0
  108. package/types/checkDeps.d.ts +19 -0
  109. package/types/checkDeps.d.ts.map +1 -0
  110. package/types/constants.d.ts +6 -0
  111. package/types/constants.d.ts.map +1 -0
  112. package/types/exports.d.ts +16 -0
  113. package/types/exports.d.ts.map +1 -0
  114. package/types/extractor/accessSafe.d.ts +3 -0
  115. package/types/extractor/accessSafe.d.ts.map +1 -0
  116. package/types/extractor/babelParse.d.ts +5 -0
  117. package/types/extractor/babelParse.d.ts.map +1 -0
  118. package/types/extractor/buildClassName.d.ts +7 -0
  119. package/types/extractor/buildClassName.d.ts.map +1 -0
  120. package/types/extractor/bundle.d.ts +121 -0
  121. package/types/extractor/bundle.d.ts.map +1 -0
  122. package/types/extractor/bundleConfig.d.ts +49 -0
  123. package/types/extractor/bundleConfig.d.ts.map +1 -0
  124. package/types/extractor/concatClassName.d.ts +8 -0
  125. package/types/extractor/concatClassName.d.ts.map +1 -0
  126. package/types/extractor/createEvaluator.d.ts +12 -0
  127. package/types/extractor/createEvaluator.d.ts.map +1 -0
  128. package/types/extractor/createExtractor.d.ts +32 -0
  129. package/types/extractor/createExtractor.d.ts.map +1 -0
  130. package/types/extractor/createLogger.d.ts +3 -0
  131. package/types/extractor/createLogger.d.ts.map +1 -0
  132. package/types/extractor/detectModuleFormat.d.ts +5 -0
  133. package/types/extractor/detectModuleFormat.d.ts.map +1 -0
  134. package/types/extractor/ensureImportingConcat.d.ts +4 -0
  135. package/types/extractor/ensureImportingConcat.d.ts.map +1 -0
  136. package/types/extractor/errors.d.ts +3 -0
  137. package/types/extractor/errors.d.ts.map +1 -0
  138. package/types/extractor/esbuildAliasPlugin.d.ts +18 -0
  139. package/types/extractor/esbuildAliasPlugin.d.ts.map +1 -0
  140. package/types/extractor/esbuildTsconfigPaths.d.ts +11 -0
  141. package/types/extractor/esbuildTsconfigPaths.d.ts.map +1 -0
  142. package/types/extractor/evaluateAstNode.d.ts +3 -0
  143. package/types/extractor/evaluateAstNode.d.ts.map +1 -0
  144. package/types/extractor/extractHelpers.d.ts +28 -0
  145. package/types/extractor/extractHelpers.d.ts.map +1 -0
  146. package/types/extractor/extractMediaStyle.d.ts +11 -0
  147. package/types/extractor/extractMediaStyle.d.ts.map +1 -0
  148. package/types/extractor/extractToClassNames.d.ts +25 -0
  149. package/types/extractor/extractToClassNames.d.ts.map +1 -0
  150. package/types/extractor/extractToNative.d.ts +13 -0
  151. package/types/extractor/extractToNative.d.ts.map +1 -0
  152. package/types/extractor/findTopmostFunction.d.ts +4 -0
  153. package/types/extractor/findTopmostFunction.d.ts.map +1 -0
  154. package/types/extractor/generatedUid.d.ts +5 -0
  155. package/types/extractor/generatedUid.d.ts.map +1 -0
  156. package/types/extractor/getGuiConfigPathFromOptionsConfig.d.ts +3 -0
  157. package/types/extractor/getGuiConfigPathFromOptionsConfig.d.ts.map +1 -0
  158. package/types/extractor/getPrefixLogs.d.ts +3 -0
  159. package/types/extractor/getPrefixLogs.d.ts.map +1 -0
  160. package/types/extractor/getPropValueFromAttributes.d.ts +19 -0
  161. package/types/extractor/getPropValueFromAttributes.d.ts.map +1 -0
  162. package/types/extractor/getSourceModule.d.ts +16 -0
  163. package/types/extractor/getSourceModule.d.ts.map +1 -0
  164. package/types/extractor/getStaticBindingsForScope.d.ts +5 -0
  165. package/types/extractor/getStaticBindingsForScope.d.ts.map +1 -0
  166. package/types/extractor/hoistClassNames.d.ts +6 -0
  167. package/types/extractor/hoistClassNames.d.ts.map +1 -0
  168. package/types/extractor/literalToAst.d.ts +4 -0
  169. package/types/extractor/literalToAst.d.ts.map +1 -0
  170. package/types/extractor/loadFile.d.ts +1 -0
  171. package/types/extractor/loadFile.d.ts.map +1 -0
  172. package/types/extractor/loadGui.d.ts +22 -0
  173. package/types/extractor/loadGui.d.ts.map +1 -0
  174. package/types/extractor/logLines.d.ts +2 -0
  175. package/types/extractor/logLines.d.ts.map +1 -0
  176. package/types/extractor/normalizeTernaries.d.ts +3 -0
  177. package/types/extractor/normalizeTernaries.d.ts.map +1 -0
  178. package/types/extractor/propsToFontFamilyCache.d.ts +4 -0
  179. package/types/extractor/propsToFontFamilyCache.d.ts.map +1 -0
  180. package/types/extractor/regenerateConfig.d.ts +9 -0
  181. package/types/extractor/regenerateConfig.d.ts.map +1 -0
  182. package/types/extractor/removeUnusedHooks.d.ts +3 -0
  183. package/types/extractor/removeUnusedHooks.d.ts.map +1 -0
  184. package/types/extractor/timer.d.ts +5 -0
  185. package/types/extractor/timer.d.ts.map +1 -0
  186. package/types/extractor/validHTMLAttributes.d.ts +52 -0
  187. package/types/extractor/validHTMLAttributes.d.ts.map +1 -0
  188. package/types/extractor/watchGuiConfig.d.ts +5 -0
  189. package/types/extractor/watchGuiConfig.d.ts.map +1 -0
  190. package/types/getPragmaOptions.d.ts +8 -0
  191. package/types/getPragmaOptions.d.ts.map +1 -0
  192. package/types/helpers/memoize.d.ts +8 -0
  193. package/types/helpers/memoize.d.ts.map +1 -0
  194. package/types/helpers/requireGuiCore.d.ts +3 -0
  195. package/types/helpers/requireGuiCore.d.ts.map +1 -0
  196. package/types/index.d.ts +4 -0
  197. package/types/index.d.ts.map +1 -0
  198. package/types/registerRequire.d.ts +10 -0
  199. package/types/registerRequire.d.ts.map +1 -0
  200. package/types/server.d.ts +3 -0
  201. package/types/server.d.ts.map +1 -0
  202. package/types/setup.d.ts +1 -0
  203. package/types/setup.d.ts.map +1 -0
  204. package/types/types.d.ts +92 -0
  205. package/types/types.d.ts.map +1 -0
  206. package/types/worker.d.ts +46 -0
  207. package/types/worker.d.ts.map +1 -0
@@ -0,0 +1,121 @@
1
+ import esbuild from 'esbuild';
2
+ import type { GuiPlatform } 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 esbundleGuiConfig(props: Props, platform: GuiPlatform, 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,WAAW,EAAE,MAAM,UAAU,CAAA;AAM3C,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;AA8MD,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,WAAW,EACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBjC"}
@@ -0,0 +1,49 @@
1
+ import { type StaticConfig, type GuiInternalConfig } from '@hanzogui/web';
2
+ import esbuild from 'esbuild';
3
+ import type { GuiOptions } 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 GuiProjectInfo = {
14
+ components?: LoadedComponents[];
15
+ guiConfig?: GuiInternalConfig | 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: () => GuiInternalConfig | null;
41
+ export declare function getBundledConfig(props: GuiOptions, rebuild?: boolean): Promise<any>;
42
+ export declare function bundleConfig(props: GuiOptions): Promise<any>;
43
+ export declare function writeGuiCSS(outputCSS: string, config: GuiInternalConfig): Promise<void>;
44
+ export declare function loadComponents(props: GuiOptions, forceExports?: boolean): Promise<LoadedComponents[]>;
45
+ export declare function loadComponentsSync(props: GuiOptions, forceExports?: boolean): LoadedComponents[];
46
+ export declare function loadComponentsInner(props: GuiOptions, forceExports?: boolean): Promise<null | LoadedComponents[]>;
47
+ export declare function loadComponentsInnerSync(props: GuiOptions, 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,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,OAAO,MAAM,SAAS,CAAA;AAI7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAwE1C,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,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC/B,SAAS,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IACpC,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAiGD,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,gCAAqB,CAAA;AAEjD,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,UAAQ,gBASxE;AAgBD,wBAAsB,YAAY,CAAC,KAAK,EAAE,UAAU,gBAmPnD;AAED,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,iBAmB7E;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,YAAY,UAAQ,+BAI3E;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,YAAY,UAAQ,sBAIzE;AAqBD,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,UAAU,EACjB,YAAY,UAAQ,GACnB,OAAO,CAAC,IAAI,GAAG,gBAAgB,EAAE,CAAC,CAyJpC;AAGD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,UAAU,EACjB,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 { GuiOptionsWithFileInfo } from '../types';
4
+ export declare function createEvaluator({ props, staticNamespace, sourcePath, traversePath, shouldPrintDebug, }: {
5
+ props: GuiOptionsWithFileInfo;
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,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAGtD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,eAAe,EACf,UAAU,EACV,YAAY,EACZ,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,sBAAsB,CAAA;IAC7B,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, GuiOptions } from '../types';
4
+ import type { GuiProjectInfo } 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
+ loadGui: (props: GuiOptions) => Promise<GuiProjectInfo | null>;
14
+ loadGuiSync: (props: GuiOptions) => GuiProjectInfo | null;
15
+ getGui(): import("@hanzogui/web").GuiInternalConfig | 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,UAAU,EAGX,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAoB,cAAc,EAAE,MAAM,gBAAgB,CAAA;AActE,OAAO,EAAE,iBAAiB,EAA6B,MAAM,6BAA6B,CAAA;AAmB1F,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;;;;;qBA0JnD,UAAU;yBAPZ,UAAU;;mBAwBlB,UAAU,SAAS,mBAAmB;;;;;;;eAKpC,UAAU,SAAS,mBAAmB;;;;;;;EA82E1D"}
@@ -0,0 +1,3 @@
1
+ import type { GuiOptions } from '../types';
2
+ export declare function createLogger(sourcePath: string, options: GuiOptions): (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,UAAU,EAAE,MAAM,UAAU,CAAA;AAG1C,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,IAQ1D,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, GuiOptionsWithFileInfo, 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: GuiOptionsWithFileInfo, jsxPath: NodePath<t.JSXElement>, n: t.MemberExpression, sourcePath?: string): boolean;
11
+ export declare const isInsideComponentPackage: (props: GuiOptionsWithFileInfo, moduleName: string) => any;
12
+ export declare const isComponentPackage: (props: GuiOptionsWithFileInfo, srcName: string) => any;
13
+ export declare function getValidComponent(props: GuiOptionsWithFileInfo, moduleName: string, componentName: string): false | {
14
+ staticConfig: import("@hanzogui/web").StaticConfig;
15
+ } | null;
16
+ export declare const isValidModule: (props: GuiOptionsWithFileInfo, moduleName: string) => {
17
+ isLocal: boolean;
18
+ isValid: any;
19
+ };
20
+ export declare const getValidImport: (props: GuiOptionsWithFileInfo, moduleName: string, componentName?: string) => {
21
+ staticConfig: import("@hanzogui/web").StaticConfig;
22
+ } | null;
23
+ export declare const isValidImport: (props: GuiOptionsWithFileInfo, 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,sBAAsB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAI9E,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,sBAAsB,EAC7B,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,sBAAsB,EAC7B,YAAY,MAAM,QAKnB,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,OAAO,sBAAsB,EAC7B,SAAS,MAAM,QAKhB,CAAA;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,sBAAsB,EAC7B,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM;;SAiBtB;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,sBAAsB,EAAE,YAAY,MAAM;;;CAW9E,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,OAAO,sBAAsB,EAC7B,YAAY,MAAM,EAClB,gBAAgB,MAAM;;QAOvB,CAAA;AAED,eAAO,MAAM,aAAa,GACxB,OAAO,sBAAsB,EAC7B,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 { GuiInternalConfig } from '@hanzogui/core';
4
+ import * as core from '@hanzogui/core';
5
+ import type { GuiOptionsWithFileInfo, Ternary } from '../types';
6
+ export declare function extractMediaStyle(props: GuiOptionsWithFileInfo, ternary: Ternary, jsxPath: NodePath<t.JSXElement>, guiConfig: GuiInternalConfig, sourcePath: string, importance?: number, shouldPrintDebug?: boolean | 'verbose'): {
7
+ mediaStyles: core.StyleObject[];
8
+ ternaryWithoutMedia: Ternary | null;
9
+ } | null;
10
+ export declare function isValidMediaCall(props: GuiOptionsWithFileInfo, 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,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AAItC,OAAO,KAAK,EAAe,sBAAsB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAG5E,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAC/B,SAAS,EAAE,iBAAiB,EAC5B,UAAU,EAAE,MAAM,EAClB,UAAU,SAAI,EACd,gBAAgB,GAAE,OAAO,GAAG,SAAiB;;;SAmE9C;AA0FD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,sBAAsB,EAC7B,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 { GuiOptions } 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: GuiOptions;
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,UAAU,EAAW,MAAM,UAAU,CAAA;AAEhE,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,UAAU,CAAA;IACnB,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 { GuiOptions } from '../types';
3
+ export declare function extractToNative(sourceFileName: string, sourceCode: string, options: GuiOptions): BabelFileResult;
4
+ export declare function getBabelPlugin(): any;
5
+ export declare function getBabelParseDefinition(options: GuiOptions): {
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,UAAU,EAAE,MAAM,UAAU,CAAA;AAsB1C,wBAAgB,eAAe,CAC7B,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,UAAU,GAClB,eAAe,CAoBjB;AAED,wBAAgB,cAAc,QAK7B;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,UAAU;;;;wBAMvC,GAAG;;;EA+WtB"}
@@ -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 { GuiOptions } from '../types';
2
+ export declare function getGuiConfigPathFromOptionsConfig(config: NonNullable<GuiOptions['config']>): string;
3
+ //# sourceMappingURL=getGuiConfigPathFromOptionsConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getGuiConfigPathFromOptionsConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/getGuiConfigPathFromOptionsConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,UAiB1C"}
@@ -0,0 +1,3 @@
1
+ import type { GuiOptions } from '../types';
2
+ export declare function getPrefixLogs(options?: GuiOptions): 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,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,UAAU,UAKjD"}
@@ -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,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, GuiOptions } from '@hanzogui/types';
2
+ import { type GuiProjectInfo } from './bundleConfig';
3
+ export declare function loadGui(propsIn: Partial<GuiOptions>): Promise<GuiProjectInfo | null>;
4
+ export declare const generateThemesAndLog: (options: GuiOptions, force?: boolean) => Promise<void>;
5
+ /**
6
+ * Load gui.build.ts config using esbuild-wasm transform
7
+ * Uses WASM to avoid native esbuild service lifecycle issues (EPIPE errors)
8
+ */
9
+ export declare function loadGuiBuildConfigAsync(guiOptions: Partial<GuiOptions> | undefined): Promise<GuiOptions>;
10
+ /**
11
+ * @deprecated Use loadGuiBuildConfigAsync instead to avoid EPIPE errors
12
+ */
13
+ export declare function loadGuiBuildConfigSync(guiOptions: Partial<GuiOptions> | undefined): GuiOptions;
14
+ export declare function loadGuiSync({ forceExports, cacheKey, ...propsIn }: Partial<GuiOptions> & {
15
+ forceExports?: boolean;
16
+ cacheKey?: string;
17
+ }): GuiProjectInfo;
18
+ export declare function getOptions({ root, tsconfigPath, guiOptions, host, debug, }?: Partial<CLIUserOptions>): Promise<CLIResolvedOptions>;
19
+ export declare function resolveWebOrNativeSpecificEntry(entry: string): string;
20
+ export type { GuiProjectInfo };
21
+ export declare function esbuildWatchFiles(entry: string, onChanged: () => void): Promise<() => void>;
22
+ //# sourceMappingURL=loadGui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadGui.d.ts","sourceRoot":"","sources":["../../src/extractor/loadGui.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AASrF,OAAO,EACL,KAAK,cAAc,EAMpB,MAAM,gBAAgB,CAAA;AAkBvB,wBAAsB,OAAO,CAC3B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAC3B,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CA+ChC;AAKD,eAAO,MAAM,oBAAoB,GAAU,SAAS,UAAU,EAAE,eAAa,kBA6B5E,CAAA;AAQD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS,GAC1C,OAAO,CAAC,UAAU,CAAC,CAuDrB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS,GA8BtC,UAAU,CAChB;AAGD,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,QAAQ,EACR,GAAG,OAAO,EACX,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,cAAc,CAgHjB;AAED,wBAAsB,UAAU,CAAC,EAC/B,IAAoB,EACpB,YAA8B,EAC9B,UAAU,EACV,IAAI,EACJ,KAAK,GACN,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAgC5D;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,UAW5D;AA0BD,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,uBAyD3E"}
@@ -0,0 +1,2 @@
1
+ export declare const logLines: (str: string, singleLine?: boolean) => string;
2
+ //# sourceMappingURL=logLines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logLines.d.ts","sourceRoot":"","sources":["../../src/extractor/logLines.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,EAAE,oBAAkB,WAavD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { Ternary } from '../types';
2
+ export declare function normalizeTernaries(ternaries: Ternary[]): Ternary[];
3
+ //# sourceMappingURL=normalizeTernaries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeTernaries.d.ts","sourceRoot":"","sources":["../../src/extractor/normalizeTernaries.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGvC,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,aAmEtD"}
@@ -0,0 +1,4 @@
1
+ export declare function setPropsToFontFamily(props: any, ff: string): void;
2
+ export declare function getFontFamilyNameFromProps(props: any): string | undefined;
3
+ export declare function forwardFontFamilyName(prev: any, next: any, fallback?: string): void;
4
+ //# sourceMappingURL=propsToFontFamilyCache.d.ts.map