@hanzogui/types 8.3.0 → 8.3.2
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/dist/cjs/index.js +3 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +18 -4
- package/types/index.d.ts +163 -0
- package/types/index.d.ts.map +1 -0
- /package/{types.ts → src/index.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/types",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.2",
|
|
4
4
|
"files": [
|
|
5
|
-
"types
|
|
5
|
+
"types",
|
|
6
|
+
"dist",
|
|
7
|
+
"src"
|
|
6
8
|
],
|
|
7
9
|
"type": "module",
|
|
8
10
|
"sideEffects": false,
|
|
9
|
-
"
|
|
11
|
+
"main": "./dist/cjs/index.js",
|
|
12
|
+
"module": "./dist/esm/index.js",
|
|
13
|
+
"types": "./types/index.d.ts",
|
|
10
14
|
"exports": {
|
|
15
|
+
"./package.json": "./package.json",
|
|
11
16
|
".": {
|
|
12
|
-
"types": "./types.ts"
|
|
17
|
+
"types": "./types/index.d.ts",
|
|
18
|
+
"react-native": "./dist/esm/index.js",
|
|
19
|
+
"browser": "./dist/esm/index.js",
|
|
20
|
+
"module": "./dist/esm/index.js",
|
|
21
|
+
"import": "./dist/esm/index.js",
|
|
22
|
+
"require": "./dist/cjs/index.js",
|
|
23
|
+
"default": "./dist/esm/index.js"
|
|
13
24
|
}
|
|
14
25
|
},
|
|
15
26
|
"publishConfig": {
|
|
16
27
|
"access": "public"
|
|
17
28
|
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "hanzogui-build --skip-native"
|
|
31
|
+
},
|
|
18
32
|
"repository": {
|
|
19
33
|
"type": "git",
|
|
20
34
|
"url": "git+https://github.com/hanzoai/gui.git",
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
export interface GuiBuildOptions {
|
|
2
|
+
/**
|
|
3
|
+
* module paths you want to compile with hanzogui (for example ['hanzogui'])
|
|
4
|
+
* */
|
|
5
|
+
components?: string[];
|
|
6
|
+
/**
|
|
7
|
+
* relative path to your hanzogui.config.ts
|
|
8
|
+
*/
|
|
9
|
+
config?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Use the new ThemeBuilder in `@hanzogui/create-theme` to create beautiful theme sets,
|
|
12
|
+
* see docs at https://hanzogui.dev/docs/guides/theme-builder
|
|
13
|
+
* This helps you automate generating the build themes typescript file which loads fastere
|
|
14
|
+
* and has smaller bundle size.
|
|
15
|
+
*/
|
|
16
|
+
themeBuilder?: {
|
|
17
|
+
input: string;
|
|
18
|
+
output: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Emit design system related CSS during build step for usage with frameworks
|
|
22
|
+
*/
|
|
23
|
+
outputCSS?: string | null | false;
|
|
24
|
+
/**
|
|
25
|
+
* (Experimental) outputs themes using CSS Nesting https://caniuse.com/css-nesting
|
|
26
|
+
* Which can cut them in half due to no media query duplication.
|
|
27
|
+
*/
|
|
28
|
+
useCSSNesting?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Gui can follow imports and evaluate them when parsing styles, leading to
|
|
31
|
+
* higher percent of flattened / optimized views. We normalize this to be the
|
|
32
|
+
* full path of the file, always ending in ".js".
|
|
33
|
+
*
|
|
34
|
+
* So to have Gui partially evaluate "app/src/constants.tsx" you can put
|
|
35
|
+
* ["app/src/constants.js"].
|
|
36
|
+
*/
|
|
37
|
+
importsWhitelist?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Installed packages whose styles the compiler extracts statically. A file
|
|
40
|
+
* under `node_modules` is only read if its package is named here — matching
|
|
41
|
+
* a whole scope with `@scope/*`, or one package exactly. The compiler cannot
|
|
42
|
+
* afford to parse every installed JS file, so nothing is read by default.
|
|
43
|
+
*
|
|
44
|
+
* `DEFAULT_EXTRACT_PACKAGES` from `@hanzogui/static-worker` is the
|
|
45
|
+
* design-system list (`@hanzo/ui`, `@hanzo/gui`, `@hanzogui/*`). Read its
|
|
46
|
+
* doc comment before turning it on: today it grows the cached sheet without
|
|
47
|
+
* shrinking what the runtime injects, because a published package ships no
|
|
48
|
+
* JSX to flatten.
|
|
49
|
+
*
|
|
50
|
+
* @default []
|
|
51
|
+
*/
|
|
52
|
+
extractPackages?: string[];
|
|
53
|
+
/**
|
|
54
|
+
* Whitelist file extensions to evaluate
|
|
55
|
+
*
|
|
56
|
+
* @default ['.tsx', '.jsx']
|
|
57
|
+
*/
|
|
58
|
+
includeExtensions?: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Web-only. Allows you to trim the bundle size of react-native-web.
|
|
61
|
+
* Pass in values like ['Switch', 'Modal'].
|
|
62
|
+
*/
|
|
63
|
+
excludeReactNativeWebExports?: string[];
|
|
64
|
+
/**
|
|
65
|
+
* Enable logging the time it takes to extract.
|
|
66
|
+
*
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
logTimings?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Custom prefix for the timing logs
|
|
72
|
+
*/
|
|
73
|
+
prefixLogs?: string;
|
|
74
|
+
/**
|
|
75
|
+
* (Advanced) Enables Gui to try and evaluate components outside the `components` option.
|
|
76
|
+
* When true, Gui will bundle and load components as its running across every file,
|
|
77
|
+
* if it loads them successfully it will perform all optimiziations inline.
|
|
78
|
+
*/
|
|
79
|
+
enableDynamicEvaluation?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Completely disable hanzogui for these files
|
|
82
|
+
*/
|
|
83
|
+
disable?: boolean | string[];
|
|
84
|
+
/**
|
|
85
|
+
* Disable just optimization for these files, but enable helpful debug attributes.
|
|
86
|
+
*/
|
|
87
|
+
disableExtraction?: boolean | string[];
|
|
88
|
+
/**
|
|
89
|
+
* Disable just the addition of data- attributes that are added in dev mode to help
|
|
90
|
+
* tie DOM to your filename/component-name.
|
|
91
|
+
*/
|
|
92
|
+
disableDebugAttr?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* (Advanced) Disable evaluation of useMedia() hook
|
|
95
|
+
*/
|
|
96
|
+
disableExtractInlineMedia?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* (Advanced) Disable just view flattening.
|
|
99
|
+
*/
|
|
100
|
+
disableFlattening?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* (Advanced) Disable extracting to theme variables.
|
|
103
|
+
*/
|
|
104
|
+
disableExtractVariables?: boolean | 'theme';
|
|
105
|
+
/**
|
|
106
|
+
* (Advanced) Disables the initial build and attempts to load from the .hanzogui directory
|
|
107
|
+
*/
|
|
108
|
+
disableInitialBuild?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* If you have a hanzogui.build.ts file that describes your compiler setup, you can set it here
|
|
111
|
+
*/
|
|
112
|
+
buildFile?: string;
|
|
113
|
+
evaluateVars?: boolean;
|
|
114
|
+
cssPath?: string;
|
|
115
|
+
cssData?: any;
|
|
116
|
+
deoptProps?: Set<string>;
|
|
117
|
+
excludeProps?: Set<string>;
|
|
118
|
+
inlineProps?: Set<string>;
|
|
119
|
+
/**
|
|
120
|
+
* Use react-native-web-lite for better tree shaking on web.
|
|
121
|
+
* Set to 'without-animated' to exclude animated components.
|
|
122
|
+
*/
|
|
123
|
+
useReactNativeWebLite?: boolean | 'without-animated';
|
|
124
|
+
disableWatchGuiConfig?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* (Experimental) Flatten theme access on native for better performance
|
|
127
|
+
*/
|
|
128
|
+
experimentalFlattenThemesOnNative?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface GuiOptions extends GuiBuildOptions {
|
|
131
|
+
platform?: 'native' | 'web';
|
|
132
|
+
}
|
|
133
|
+
export type CLIUserOptions = {
|
|
134
|
+
root?: string;
|
|
135
|
+
host?: string;
|
|
136
|
+
tsconfigPath?: string;
|
|
137
|
+
hanzoguiOptions: Partial<GuiOptions>;
|
|
138
|
+
debug?: boolean | 'verbose';
|
|
139
|
+
loadGuiOptions?: boolean;
|
|
140
|
+
};
|
|
141
|
+
export type CLIResolvedOptions = {
|
|
142
|
+
root: string;
|
|
143
|
+
port?: number;
|
|
144
|
+
host?: string;
|
|
145
|
+
mode: 'development' | 'production';
|
|
146
|
+
debug?: CLIUserOptions['debug'];
|
|
147
|
+
tsconfigPath: string;
|
|
148
|
+
hanzoguiOptions: GuiOptions;
|
|
149
|
+
pkgJson: {
|
|
150
|
+
name?: string;
|
|
151
|
+
main?: string;
|
|
152
|
+
module?: string;
|
|
153
|
+
source?: string;
|
|
154
|
+
exports?: Record<string, Record<string, string>>;
|
|
155
|
+
};
|
|
156
|
+
paths: {
|
|
157
|
+
root: string;
|
|
158
|
+
dotDir: string;
|
|
159
|
+
conf: string;
|
|
160
|
+
types: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;SAEK;IACL,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;;OAKG;IACH,YAAY,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IAED;;OAEG;IACH,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