tailwind-to-style 2.10.0-beta.1 → 2.10.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/README.md +229 -15
- package/dist/index.browser.js +1436 -399
- package/dist/index.cjs +1424 -387
- package/dist/index.esm.js +1414 -388
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/react.cjs.js +8880 -0
- package/dist/react.d.ts +76 -0
- package/dist/react.esm.js +8868 -0
- package/package.json +1 -1
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
// Re-export core types
|
|
4
|
+
export * from './index';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* TWSX React Hook Options
|
|
8
|
+
*/
|
|
9
|
+
export interface UseTwsxOptions {
|
|
10
|
+
inject?: boolean;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* TWSX Configuration for Provider
|
|
16
|
+
*/
|
|
17
|
+
export interface TwsxConfig {
|
|
18
|
+
theme?: {
|
|
19
|
+
extend?: {
|
|
20
|
+
colors?: Record<string, any>;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
};
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
plugins?: any[];
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* TWSX Provider Props
|
|
31
|
+
*/
|
|
32
|
+
export interface TwsxProviderProps {
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
config?: TwsxConfig;
|
|
35
|
+
onConfigChange?: (config: TwsxConfig) => void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* TWSX Context Value
|
|
40
|
+
*/
|
|
41
|
+
export interface TwsxContextValue {
|
|
42
|
+
config: TwsxConfig | null;
|
|
43
|
+
updateConfig: (config: TwsxConfig) => void;
|
|
44
|
+
isConfigured: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* React hook for using TWSX in components
|
|
49
|
+
*/
|
|
50
|
+
export declare function useTwsx(
|
|
51
|
+
styles: any,
|
|
52
|
+
options?: UseTwsxOptions
|
|
53
|
+
): string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* TWSX Provider Component
|
|
57
|
+
*/
|
|
58
|
+
export declare function TwsxProvider(props: TwsxProviderProps): JSX.Element;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Hook to access TWSX context
|
|
62
|
+
*/
|
|
63
|
+
export declare function useTwsxContext(): TwsxContextValue;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Hook to get current TWSX configuration
|
|
67
|
+
*/
|
|
68
|
+
export declare function useTwsxConfig(): {
|
|
69
|
+
config: TwsxConfig | null;
|
|
70
|
+
isConfigured: boolean;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Hook to update TWSX configuration
|
|
75
|
+
*/
|
|
76
|
+
export declare function useUpdateTwsxConfig(): (config: TwsxConfig) => void;
|