@hanzogui/static 7.0.0 → 7.3.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.
- package/LICENSE +40 -19
- package/dist/check-dep-versions.cjs +1 -1
- package/dist/checkDeps.cjs +11 -11
- package/dist/constants.cjs +2 -2
- package/dist/exports.cjs +2 -2
- package/dist/extractor/bundle.cjs +6 -6
- package/dist/extractor/bundleConfig.cjs +45 -45
- package/dist/extractor/createExtractor.cjs +39 -39
- package/dist/extractor/createLogger.cjs +1 -1
- package/dist/extractor/extractHelpers.cjs +1 -1
- package/dist/extractor/extractMediaStyle.cjs +7 -7
- package/dist/extractor/extractToClassNames.cjs +9 -9
- package/dist/extractor/extractToNative.cjs +7 -7
- package/dist/extractor/{getHanzoguiConfigPathFromOptionsConfig.cjs → getGuiConfigPathFromOptionsConfig.cjs} +5 -5
- package/dist/extractor/getPrefixLogs.cjs +1 -1
- package/dist/extractor/getStaticBindingsForScope.cjs +2 -2
- package/dist/extractor/{loadHanzogui.cjs → loadGui.cjs} +65 -65
- package/dist/extractor/regenerateConfig.cjs +20 -20
- package/dist/extractor/{watchHanzoguiConfig.cjs → watchGuiConfig.cjs} +15 -15
- package/dist/getPragmaOptions.cjs +6 -6
- package/dist/helpers/{requireHanzoguiCore.cjs → requireGuiCore.cjs} +12 -12
- package/dist/registerRequire.cjs +20 -20
- package/dist/worker.cjs +3 -3
- package/package.json +25 -24
- package/src/check-dep-versions.ts +1 -1
- package/src/checkDeps.ts +27 -27
- package/src/constants.ts +2 -2
- package/src/exports.ts +2 -2
- package/src/extractor/bundle.ts +9 -9
- package/src/extractor/bundleConfig.ts +56 -56
- package/src/extractor/createEvaluator.ts +2 -2
- package/src/extractor/createExtractor.ts +55 -55
- package/src/extractor/createLogger.ts +3 -3
- package/src/extractor/extractHelpers.ts +12 -12
- package/src/extractor/extractMediaStyle.ts +13 -13
- package/src/extractor/extractToClassNames.ts +11 -11
- package/src/extractor/extractToNative.ts +13 -13
- package/src/extractor/{getHanzoguiConfigPathFromOptionsConfig.ts → getGuiConfigPathFromOptionsConfig.ts} +3 -3
- package/src/extractor/getPrefixLogs.ts +3 -3
- package/src/extractor/getStaticBindingsForScope.ts +2 -2
- package/src/extractor/{loadHanzogui.ts → loadGui.ts} +85 -85
- package/src/extractor/regenerateConfig.ts +23 -23
- package/src/extractor/{watchHanzoguiConfig.ts → watchGuiConfig.ts} +10 -10
- package/src/getPragmaOptions.ts +6 -6
- package/src/helpers/requireGuiCore.ts +28 -0
- package/src/registerRequire.ts +27 -27
- package/src/server.ts +2 -2
- package/src/types.ts +10 -10
- package/src/worker.ts +7 -7
- package/types/constants.d.ts.map +1 -1
- package/types/exports.d.ts +2 -2
- package/types/exports.d.ts.map +1 -1
- package/types/extractor/bundle.d.ts +2 -2
- package/types/extractor/bundle.d.ts.map +1 -1
- package/types/extractor/bundleConfig.d.ts +12 -12
- package/types/extractor/bundleConfig.d.ts.map +1 -1
- package/types/extractor/createEvaluator.d.ts +2 -2
- package/types/extractor/createEvaluator.d.ts.map +1 -1
- package/types/extractor/createExtractor.d.ts +5 -5
- package/types/extractor/createExtractor.d.ts.map +1 -1
- package/types/extractor/createLogger.d.ts +2 -2
- package/types/extractor/createLogger.d.ts.map +1 -1
- package/types/extractor/extractHelpers.d.ts +8 -8
- package/types/extractor/extractHelpers.d.ts.map +1 -1
- package/types/extractor/extractMediaStyle.d.ts +4 -4
- package/types/extractor/extractMediaStyle.d.ts.map +1 -1
- package/types/extractor/extractToClassNames.d.ts +2 -2
- package/types/extractor/extractToClassNames.d.ts.map +1 -1
- package/types/extractor/extractToNative.d.ts +3 -3
- package/types/extractor/extractToNative.d.ts.map +1 -1
- package/types/extractor/getGuiConfigPathFromOptionsConfig.d.ts +3 -0
- package/types/extractor/getGuiConfigPathFromOptionsConfig.d.ts.map +1 -0
- package/types/extractor/getPrefixLogs.d.ts +2 -2
- package/types/extractor/getPrefixLogs.d.ts.map +1 -1
- package/types/extractor/loadGui.d.ts +22 -0
- package/types/extractor/loadGui.d.ts.map +1 -0
- package/types/extractor/regenerateConfig.d.ts +4 -4
- package/types/extractor/regenerateConfig.d.ts.map +1 -1
- package/types/extractor/watchGuiConfig.d.ts +5 -0
- package/types/extractor/watchGuiConfig.d.ts.map +1 -0
- package/types/helpers/requireGuiCore.d.ts +3 -0
- package/types/helpers/requireGuiCore.d.ts.map +1 -0
- package/types/registerRequire.d.ts +3 -3
- package/types/registerRequire.d.ts.map +1 -1
- package/types/server.d.ts +2 -2
- package/types/server.d.ts.map +1 -1
- package/types/types.d.ts +10 -10
- package/types/types.d.ts.map +1 -1
- package/types/worker.d.ts +4 -4
- package/types/worker.d.ts.map +1 -1
- package/src/helpers/requireHanzoguiCore.ts +0 -28
- package/types/extractor/getHanzoguiConfigPathFromOptionsConfig.d.ts +0 -3
- package/types/extractor/getHanzoguiConfigPathFromOptionsConfig.d.ts.map +0 -1
- package/types/extractor/loadHanzogui.d.ts +0 -22
- package/types/extractor/loadHanzogui.d.ts.map +0 -1
- package/types/extractor/watchHanzoguiConfig.d.ts +0 -5
- package/types/extractor/watchHanzoguiConfig.d.ts.map +0 -1
- package/types/helpers/requireHanzoguiCore.d.ts +0 -3
- package/types/helpers/requireHanzoguiCore.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { GuiOptionsWithFileInfo } from '../types';
|
|
4
4
|
export declare function createEvaluator({ props, staticNamespace, sourcePath, traversePath, shouldPrintDebug, }: {
|
|
5
|
-
props:
|
|
5
|
+
props: GuiOptionsWithFileInfo;
|
|
6
6
|
staticNamespace: Record<string, any>;
|
|
7
7
|
sourcePath?: string;
|
|
8
8
|
traversePath?: NodePath<t.JSXElement>;
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import type { ExtractorOptions, ExtractorParseProps,
|
|
4
|
-
import type {
|
|
3
|
+
import type { ExtractorOptions, ExtractorParseProps, GuiOptions } from '../types';
|
|
4
|
+
import type { GuiProjectInfo } from './bundleConfig';
|
|
5
5
|
import { cleanupBeforeExit } from './getStaticBindingsForScope';
|
|
6
6
|
export type Extractor = ReturnType<typeof createExtractor>;
|
|
7
7
|
type FileOrPath = NodePath<t.Program> | t.File;
|
|
@@ -10,9 +10,9 @@ export declare function createExtractor({ logger, platform }?: ExtractorOptions)
|
|
|
10
10
|
logger: import("../types").Logger;
|
|
11
11
|
};
|
|
12
12
|
cleanupBeforeExit: typeof cleanupBeforeExit;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
loadGui: (props: GuiOptions) => Promise<GuiProjectInfo | null>;
|
|
14
|
+
loadGuiSync: (props: GuiOptions) => GuiProjectInfo | null;
|
|
15
|
+
getGui(): import("@hanzogui/web").GuiInternalConfig | null | undefined;
|
|
16
16
|
parseSync: (f: FileOrPath, props: ExtractorParseProps) => {
|
|
17
17
|
styled: number;
|
|
18
18
|
flattened: number;
|
|
@@ -1 +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,
|
|
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;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;;;;;qBAsJnD,UAAU;yBAPZ,UAAU;;mBAwBlB,UAAU,SAAS,mBAAmB;;;;;;;eAKpC,UAAU,SAAS,mBAAmB;;;;;;;EA43E1D"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function createLogger(sourcePath: string, options:
|
|
1
|
+
import type { GuiOptions } from '../types';
|
|
2
|
+
export declare function createLogger(sourcePath: string, options: GuiOptions): (res: any) => void;
|
|
3
3
|
//# sourceMappingURL=createLogger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createLogger.d.ts","sourceRoot":"","sources":["../../src/extractor/createLogger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
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"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import type { ExtractedAttr,
|
|
3
|
+
import type { ExtractedAttr, GuiOptionsWithFileInfo, Ternary } from '../types';
|
|
4
4
|
export declare function isPresent<T extends object>(input: null | void | undefined | T): input is T;
|
|
5
5
|
export declare function isSimpleSpread(node: t.JSXSpreadAttribute): boolean;
|
|
6
6
|
export declare const attrStr: (attr?: ExtractedAttr) => string | t.JSXIdentifier;
|
|
7
7
|
export declare const objToStr: (obj: any, spacer?: string) => any;
|
|
8
8
|
export declare const ternaryStr: (x: Ternary) => string;
|
|
9
9
|
export declare function findComponentName(scope: any): string | undefined;
|
|
10
|
-
export declare function isValidThemeHook(props:
|
|
11
|
-
export declare const isInsideComponentPackage: (props:
|
|
12
|
-
export declare const isComponentPackage: (props:
|
|
13
|
-
export declare function getValidComponent(props:
|
|
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
14
|
staticConfig: import("@hanzogui/web").StaticConfig;
|
|
15
15
|
} | null;
|
|
16
|
-
export declare const isValidModule: (props:
|
|
16
|
+
export declare const isValidModule: (props: GuiOptionsWithFileInfo, moduleName: string) => {
|
|
17
17
|
isLocal: boolean;
|
|
18
18
|
isValid: any;
|
|
19
19
|
};
|
|
20
|
-
export declare const getValidImport: (props:
|
|
20
|
+
export declare const getValidImport: (props: GuiOptionsWithFileInfo, moduleName: string, componentName?: string) => {
|
|
21
21
|
staticConfig: import("@hanzogui/web").StaticConfig;
|
|
22
22
|
} | null;
|
|
23
|
-
export declare const isValidImport: (props:
|
|
23
|
+
export declare const isValidImport: (props: GuiOptionsWithFileInfo, moduleName: string, componentName?: string) => any;
|
|
24
24
|
export declare const getValidComponentsPaths: {
|
|
25
25
|
(...args: any[]): any;
|
|
26
26
|
cache: Map<any, any>;
|
|
@@ -1 +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,OAA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AAY,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"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
import * as t from '@babel/types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { GuiInternalConfig } from '@hanzogui/core';
|
|
4
4
|
import * as core from '@hanzogui/core';
|
|
5
|
-
import type {
|
|
6
|
-
export declare function extractMediaStyle(props:
|
|
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
7
|
mediaStyles: core.StyleObject[];
|
|
8
8
|
ternaryWithoutMedia: Ternary | null;
|
|
9
9
|
} | null;
|
|
10
|
-
export declare function isValidMediaCall(props:
|
|
10
|
+
export declare function isValidMediaCall(props: GuiOptionsWithFileInfo, jsxPath: NodePath<t.JSXElement>, init: t.Expression, sourcePath: string): boolean;
|
|
11
11
|
//# sourceMappingURL=extractMediaStyle.d.ts.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from '@babel/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { GuiOptions } from '../types';
|
|
3
3
|
import type { Extractor } from './createExtractor';
|
|
4
4
|
export type ExtractedResponse = {
|
|
5
5
|
js: string | Buffer;
|
|
@@ -18,7 +18,7 @@ export type ExtractToClassNamesProps = {
|
|
|
18
18
|
extractor: Extractor;
|
|
19
19
|
source: string | Buffer;
|
|
20
20
|
sourcePath?: string;
|
|
21
|
-
options:
|
|
21
|
+
options: GuiOptions;
|
|
22
22
|
shouldPrintDebug: boolean | 'verbose';
|
|
23
23
|
};
|
|
24
24
|
export declare function extractToClassNames({ extractor, source, sourcePath, options, shouldPrintDebug, }: ExtractToClassNamesProps): Promise<ExtractedResponse | null>;
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type BabelFileResult } from '@babel/core';
|
|
2
|
-
import type {
|
|
3
|
-
export declare function extractToNative(sourceFileName: string, sourceCode: string, options:
|
|
2
|
+
import type { GuiOptions } from '../types';
|
|
3
|
+
export declare function extractToNative(sourceFileName: string, sourceCode: string, options: GuiOptions): BabelFileResult;
|
|
4
4
|
export declare function getBabelPlugin(): any;
|
|
5
|
-
export declare function getBabelParseDefinition(options:
|
|
5
|
+
export declare function getBabelParseDefinition(options: GuiOptions): {
|
|
6
6
|
name: string;
|
|
7
7
|
visitor: {
|
|
8
8
|
Program: {
|
|
@@ -1 +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,
|
|
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;;;EAyYtB"}
|
|
@@ -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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function getPrefixLogs(options?:
|
|
1
|
+
import type { GuiOptions } from '../types';
|
|
2
|
+
export declare function getPrefixLogs(options?: GuiOptions): string;
|
|
3
3
|
//# sourceMappingURL=getPrefixLogs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPrefixLogs.d.ts","sourceRoot":"","sources":["../../src/extractor/getPrefixLogs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
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,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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GuiOptions } from '@hanzogui/types';
|
|
2
2
|
import type { BundledConfig } from './bundleConfig';
|
|
3
3
|
/**
|
|
4
4
|
* Sort of a super-set of bundleConfig(), this code needs some refactoring ideally
|
|
5
5
|
*/
|
|
6
|
-
export declare function regenerateConfig(
|
|
7
|
-
export declare function regenerateConfigSync(
|
|
8
|
-
export declare function
|
|
6
|
+
export declare function regenerateConfig(guiOptions: GuiOptions, configIn?: BundledConfig | null, rebuild?: boolean): Promise<void>;
|
|
7
|
+
export declare function regenerateConfigSync(_guiOptions: GuiOptions, config: BundledConfig): void;
|
|
8
|
+
export declare function generateGuiThemes(guiOptions: GuiOptions, force?: boolean): Promise<boolean | undefined>;
|
|
9
9
|
//# sourceMappingURL=regenerateConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regenerateConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/regenerateConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"regenerateConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/regenerateConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAKjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAMnD;;GAEG;AAEH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,UAAU,EACtB,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,EAC/B,OAAO,UAAQ,iBAmBhB;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,UAAU,EACvB,MAAM,EAAE,aAAa,QAiBtB;AAED,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,UAAU,EACtB,KAAK,UAAQ,gCA+Bd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watchGuiConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/watchGuiConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAMjD,wBAAsB,cAAc,CAAC,UAAU,EAAE,UAAU;;eAkD1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requireGuiCore.d.ts","sourceRoot":"","sources":["../../src/helpers/requireGuiCore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE3C,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,WAAW,EACrB,SAAS,GAAE,QAAkB,GAC5B,cAAc,gBAAgB,CAAC,CAoBjC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GuiPlatform } from './types';
|
|
2
2
|
export declare const getNameToPaths: () => {};
|
|
3
3
|
export declare function setRequireResult(name: string, result: any): void;
|
|
4
|
-
export declare function registerRequire(platform:
|
|
4
|
+
export declare function registerRequire(platform: GuiPlatform, { proxyWormImports }?: {
|
|
5
5
|
proxyWormImports: boolean;
|
|
6
6
|
}): {
|
|
7
|
-
|
|
7
|
+
guiRequire: (this: any, path: string) => any;
|
|
8
8
|
unregister: () => void;
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=registerRequire.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerRequire.d.ts","sourceRoot":"","sources":["../src/registerRequire.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"registerRequire.d.ts","sourceRoot":"","sources":["../src/registerRequire.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,eAAO,MAAM,cAAc,UAAoB,CAAA;AAa/C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,QAEzD;AAgCD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,WAAW,EACrB,EAAE,gBAAgB,EAAE;;CAEnB;uBAiDyB,GAAG,QAAQ,MAAM;;EAoJ5C"}
|
package/types/server.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function startServer(options:
|
|
1
|
+
import type { GuiOptions } from './types';
|
|
2
|
+
export declare function startServer(options: GuiOptions): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=server.d.ts.map
|
package/types/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAIzC,wBAAsB,WAAW,CAAC,OAAO,EAAE,UAAU,iBAmBpD"}
|
package/types/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { NodePath } from '@babel/traverse';
|
|
2
2
|
import type * as t from '@babel/types';
|
|
3
|
-
import type { PseudoStyles, StaticConfig,
|
|
3
|
+
import type { PseudoStyles, StaticConfig, GuiConfig } from '@hanzogui/core';
|
|
4
4
|
import type { StyleObject } from '@hanzogui/helpers';
|
|
5
|
-
import type {
|
|
5
|
+
import type { GuiOptions } from '@hanzogui/types';
|
|
6
6
|
import type { ViewStyle } from 'react-native';
|
|
7
7
|
import type { LoadedComponents } from './extractor/bundleConfig';
|
|
8
|
-
export type
|
|
9
|
-
export type {
|
|
8
|
+
export type GuiPlatform = 'native' | 'web';
|
|
9
|
+
export type { GuiOptions, GuiBuildOptions } from '@hanzogui/types';
|
|
10
10
|
export type { StyleObject } from '@hanzogui/helpers';
|
|
11
11
|
export type ClassNameObject = t.StringLiteral | t.Expression;
|
|
12
12
|
export interface CacheObject {
|
|
@@ -24,7 +24,7 @@ export interface Logger {
|
|
|
24
24
|
}
|
|
25
25
|
export type ExtractorOptions = {
|
|
26
26
|
logger?: Logger;
|
|
27
|
-
platform?:
|
|
27
|
+
platform?: GuiPlatform;
|
|
28
28
|
};
|
|
29
29
|
export type ExtractedAttrAttr = {
|
|
30
30
|
type: 'attr';
|
|
@@ -44,7 +44,7 @@ export type ExtractedTernaryAttr = {
|
|
|
44
44
|
};
|
|
45
45
|
export type ExtractedAttr = ExtractedAttrAttr | ExtractedTernaryAttr | ExtractedAttrStyle;
|
|
46
46
|
export type ExtractTagProps = {
|
|
47
|
-
parserProps:
|
|
47
|
+
parserProps: GuiOptionsWithFileInfo;
|
|
48
48
|
attrs: ExtractedAttr[];
|
|
49
49
|
node: t.JSXOpeningElement;
|
|
50
50
|
attemptEval: (exprNode: t.Node, evalFn?: ((node: t.Node) => any) | undefined) => any;
|
|
@@ -56,14 +56,14 @@ export type ExtractTagProps = {
|
|
|
56
56
|
filePath: string;
|
|
57
57
|
completeProps: Record<string, any>;
|
|
58
58
|
staticConfig: StaticConfig;
|
|
59
|
-
config:
|
|
59
|
+
config: GuiConfig;
|
|
60
60
|
};
|
|
61
|
-
export type
|
|
61
|
+
export type GuiOptionsWithFileInfo = GuiOptions & {
|
|
62
62
|
sourcePath?: string;
|
|
63
63
|
allLoadedComponents: LoadedComponents[];
|
|
64
64
|
};
|
|
65
|
-
export type ExtractorParseProps = Omit<
|
|
66
|
-
platform:
|
|
65
|
+
export type ExtractorParseProps = Omit<GuiOptionsWithFileInfo, 'allLoadedComponents'> & {
|
|
66
|
+
platform: GuiPlatform;
|
|
67
67
|
shouldPrintDebug?: boolean | 'verbose';
|
|
68
68
|
onExtractTag: (props: ExtractTagProps) => void;
|
|
69
69
|
getFlattenedNode?: (props: {
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,KAAK,CAAC,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,KAAK,CAAC,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAEhE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE1C,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAElE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,MAAM,eAAe,GAAG,C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K,MAAM,CAAA;IAC1E,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAElC,sBAAsB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CACvE,CAAA;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,CAAC,CAAC,UAAU,CAAA;IAClB,MAAM,EAAE,QAAQ,CAAA;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAC3B,CAAA;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,KAAK,GAAG,CAAA;CAC/D"}
|
package/types/worker.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Worker thread implementation for
|
|
2
|
+
* Worker thread implementation for Gui extraction
|
|
3
3
|
* Used by both piscina (async) and synckit (sync for babel)
|
|
4
4
|
*/
|
|
5
5
|
import type { BabelFileResult } from '@babel/core';
|
|
6
6
|
import type { ExtractedResponse } from './extractor/extractToClassNames';
|
|
7
|
-
import type {
|
|
7
|
+
import type { GuiOptions } from './types';
|
|
8
8
|
export interface ExtractToClassNamesTask {
|
|
9
9
|
type: 'extractToClassNames';
|
|
10
10
|
source: string;
|
|
11
11
|
sourcePath: string;
|
|
12
|
-
options:
|
|
12
|
+
options: GuiOptions;
|
|
13
13
|
shouldPrintDebug: boolean | 'verbose';
|
|
14
14
|
}
|
|
15
15
|
export interface ExtractToNativeTask {
|
|
16
16
|
type: 'extractToNative';
|
|
17
17
|
sourceFileName: string;
|
|
18
18
|
sourceCode: string;
|
|
19
|
-
options:
|
|
19
|
+
options: GuiOptions;
|
|
20
20
|
}
|
|
21
21
|
export interface ClearCacheTask {
|
|
22
22
|
type: 'clearCache';
|
package/types/worker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAGxE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAGxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAuBzC,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,UAAU,CAAA;IACnB,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,iBAAiB,CAAA;IACvB,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,UAAU,CAAA;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,MAAM,MAAM,UAAU,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,cAAc,CAAA;AAEvF,MAAM,MAAM,YAAY,GACpB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAAE,GACjD;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GACxC;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAErD;;;GAGG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAwErE;AAED;;;GAGG;AACH,eAAe,OAAO,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// this allows us to swap between core native and web in the same process:
|
|
2
|
-
|
|
3
|
-
import type { HanzoguiPlatform } from '../types'
|
|
4
|
-
|
|
5
|
-
export function requireHanzoguiCore(
|
|
6
|
-
platform: HanzoguiPlatform,
|
|
7
|
-
ogRequire: Function = require
|
|
8
|
-
): typeof import('@hanzogui/core') {
|
|
9
|
-
if (!platform) {
|
|
10
|
-
throw new Error(`No platform given to requireHanzoguiCore`)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// avoid tree shaking out themes
|
|
14
|
-
const og1 = process.env.TAMAGUI_IS_SERVER
|
|
15
|
-
const og2 = process.env.TAMAGUI_KEEP_THEMES
|
|
16
|
-
process.env.TAMAGUI_IS_SERVER ||= '1'
|
|
17
|
-
process.env.TAMAGUI_KEEP_THEMES ||= '1'
|
|
18
|
-
|
|
19
|
-
const exported = ogRequire(
|
|
20
|
-
platform === 'native' ? '@hanzogui/core/native' : '@hanzogui/core'
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
// restore back
|
|
24
|
-
process.env.TAMAGUI_IS_SERVER = og1
|
|
25
|
-
process.env.TAMAGUI_KEEP_THEMES = og2
|
|
26
|
-
|
|
27
|
-
return exported
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loadHanzogui.d.ts","sourceRoot":"","sources":["../../src/extractor/loadHanzogui.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAS1F,OAAO,EACL,KAAK,mBAAmB,EAMzB,MAAM,gBAAgB,CAAA;AAkBvB,wBAAsB,YAAY,CAChC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAChC,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CA+CrC;AAKD,eAAO,MAAM,oBAAoB,GAAU,SAAS,eAAe,EAAE,eAAa,kBA6BjF,CAAA;AAQD;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,eAAe,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,GACpD,OAAO,CAAC,eAAe,CAAC,CAuD1B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,GA8BhD,eAAe,CACrB;AAGD,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,QAAQ,EACR,GAAG,OAAO,EACX,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,mBAAmB,CAgHtB;AAED,wBAAsB,UAAU,CAAC,EAC/B,IAAoB,EACpB,YAA8B,EAC9B,eAAe,EACf,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,mBAAmB,EAAE,CAAA;AAEnC,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,uBAyD3E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"watchHanzoguiConfig.d.ts","sourceRoot":"","sources":["../../src/extractor/watchHanzoguiConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAMtD,wBAAsB,mBAAmB,CAAC,eAAe,EAAE,eAAe;;eAkDzE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"requireHanzoguiCore.d.ts","sourceRoot":"","sources":["../../src/helpers/requireHanzoguiCore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,GAAE,QAAkB,GAC5B,cAAc,gBAAgB,CAAC,CAoBjC"}
|