@tamagui/static 1.0.0-alpha.5 → 1.0.0-alpha.9
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/extractor/createExtractor.js +74 -51
- package/dist/extractor/createExtractor.js.map +2 -2
- package/dist/extractor/extractToClassNames.js +11 -21
- package/dist/extractor/extractToClassNames.js.map +2 -2
- package/dist/extractor/logLines.js +17 -0
- package/dist/extractor/logLines.js.map +7 -0
- package/dist/index.cjs +118 -77
- package/dist/index.cjs.map +3 -3
- package/dist/patchReactNativeWeb.js +18 -3
- package/dist/patchReactNativeWeb.js.map +2 -2
- package/package.json +8 -7
- package/src/extractor/createExtractor.ts +94 -72
- package/src/extractor/extractToClassNames.ts +7 -21
- package/src/extractor/logLines.ts +11 -0
- package/src/patchReactNativeWeb.ts +21 -5
- package/src/types.ts +12 -3
- package/types.d.ts +12 -3
package/types.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export interface TamaguiOptions {
|
|
|
11
11
|
evaluateVars?: boolean;
|
|
12
12
|
importsWhitelist?: string[];
|
|
13
13
|
disableExtraction?: boolean;
|
|
14
|
+
disableDebugAttr?: boolean;
|
|
15
|
+
disableExtractInlineMedia?: boolean;
|
|
14
16
|
exclude?: RegExp;
|
|
15
17
|
logTimings?: boolean;
|
|
16
18
|
cssPath?: string;
|
|
@@ -25,6 +27,8 @@ export declare type ExtractedAttrAttr = {
|
|
|
25
27
|
export declare type ExtractedAttrStyle = {
|
|
26
28
|
type: "style";
|
|
27
29
|
value: Object;
|
|
30
|
+
attr?: t.JSXAttribute | t.JSXSpreadAttribute;
|
|
31
|
+
name?: string;
|
|
28
32
|
};
|
|
29
33
|
export declare type ExtractedAttr = ExtractedAttrAttr | {
|
|
30
34
|
type: "ternary";
|
|
@@ -49,7 +53,6 @@ export declare type ExtractorParseProps = TamaguiOptions & {
|
|
|
49
53
|
isTextView: boolean;
|
|
50
54
|
tag: string;
|
|
51
55
|
}) => string;
|
|
52
|
-
onDidFlatten?: () => void;
|
|
53
56
|
};
|
|
54
57
|
export interface Ternary {
|
|
55
58
|
test: t.Expression;
|
|
@@ -63,6 +66,7 @@ declare class Variable {
|
|
|
63
66
|
val: string | number;
|
|
64
67
|
variable: string | number;
|
|
65
68
|
constructor({ val, name }: VariableIn);
|
|
69
|
+
toString(): string | number;
|
|
66
70
|
}
|
|
67
71
|
export declare type VariableIn = {
|
|
68
72
|
val: string | number;
|
|
@@ -131,6 +135,7 @@ export declare type TamaguiInternalConfig<A extends GenericTokens = GenericToken
|
|
|
131
135
|
tokensParsed: CreateTokens<Variable>;
|
|
132
136
|
themeConfig: any;
|
|
133
137
|
getCSS: () => string;
|
|
138
|
+
parsed: boolean;
|
|
134
139
|
};
|
|
135
140
|
export declare type GenericFont = {
|
|
136
141
|
size: {
|
|
@@ -154,7 +159,7 @@ export declare type TamaguiProviderProps = Partial<Omit<ThemeProviderProps, "chi
|
|
|
154
159
|
};
|
|
155
160
|
export declare type Extractor = ReturnType<typeof createExtractor>;
|
|
156
161
|
export declare function createExtractor(): {
|
|
157
|
-
|
|
162
|
+
getTamagui(): TamaguiInternalConfig<import("@tamagui/core").CreateTokens<string | number | import("@tamagui/core").Variable>, {
|
|
158
163
|
[key: string]: {
|
|
159
164
|
bg: string | import("@tamagui/core").Variable;
|
|
160
165
|
bg2: string | import("@tamagui/core").Variable;
|
|
@@ -174,7 +179,11 @@ export declare function createExtractor(): {
|
|
|
174
179
|
[key: string]: string | number;
|
|
175
180
|
};
|
|
176
181
|
}>;
|
|
177
|
-
parse: (fileOrPath: NodePath<t.Program> | t.File, { config, importsWhitelist, evaluateVars, shouldPrintDebug, sourcePath, onExtractTag, getFlattenedNode,
|
|
182
|
+
parse: (fileOrPath: NodePath<t.Program> | t.File, { config, importsWhitelist, evaluateVars, shouldPrintDebug, sourcePath, onExtractTag, getFlattenedNode, disableExtraction, disableExtractInlineMedia, disableDebugAttr, ...props }: ExtractorParseProps) => {
|
|
183
|
+
flattened: number;
|
|
184
|
+
optimized: number;
|
|
185
|
+
modified: number;
|
|
186
|
+
} | null;
|
|
178
187
|
};
|
|
179
188
|
export declare function literalToAst(literal: any): t.Expression;
|
|
180
189
|
export declare const CSS_FILE_NAME = "__snack.css";
|