@react-email/tailwind 1.0.0-canary.1 → 1.0.0-canary.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/index.js +34 -2372
- package/dist/index.mjs +16498 -93155
- package/dist/tailwind.d.ts +5 -0
- package/dist/tailwind.d.ts.map +1 -1
- package/dist/utils/compatibility/convert-css-property-to-react-property.d.ts +2 -0
- package/dist/utils/compatibility/convert-css-property-to-react-property.d.ts.map +1 -0
- package/dist/utils/compatibility/sanitize-class-name.d.ts.map +1 -1
- package/dist/utils/css/make-inline-styles-for.d.ts +6 -0
- package/dist/utils/css/make-inline-styles-for.d.ts.map +1 -0
- package/dist/utils/css/make-inline-styles-for.spec.d.ts +2 -0
- package/dist/utils/css/make-inline-styles-for.spec.d.ts.map +1 -0
- package/dist/utils/css/media-queries/sanitize-media-queries.d.ts +17 -0
- package/dist/utils/css/media-queries/sanitize-media-queries.d.ts.map +1 -0
- package/dist/utils/css/media-queries/sanitize-media-queries.spec.d.ts +2 -0
- package/dist/utils/css/media-queries/sanitize-media-queries.spec.d.ts.map +1 -0
- package/dist/utils/css/resolve-all-css-variables.d.ts +3 -0
- package/dist/utils/css/resolve-all-css-variables.d.ts.map +1 -0
- package/dist/utils/css/resolve-all-css-variables.spec.d.ts +2 -0
- package/dist/utils/css/resolve-all-css-variables.spec.d.ts.map +1 -0
- package/dist/utils/css/sanitize-declarations.d.ts +10 -0
- package/dist/utils/css/sanitize-declarations.d.ts.map +1 -0
- package/dist/utils/react/is-component.d.ts +2 -0
- package/dist/utils/react/is-component.d.ts.map +1 -0
- package/dist/utils/react/map-react-tree.d.ts +15 -0
- package/dist/utils/react/map-react-tree.d.ts.map +1 -0
- package/dist/utils/react/map-react-tree.spec.d.ts +2 -0
- package/dist/utils/react/map-react-tree.spec.d.ts.map +1 -0
- package/dist/utils/tailwindcss/clone-element-with-inlined-styles.d.ts +10 -0
- package/dist/utils/tailwindcss/clone-element-with-inlined-styles.d.ts.map +1 -0
- package/dist/utils/tailwindcss/setup-tailwind-context.d.ts +4 -0
- package/dist/utils/tailwindcss/setup-tailwind-context.d.ts.map +1 -0
- package/dist/utils/tailwindcss/setup-tailwind.d.ts +5 -0
- package/dist/utils/tailwindcss/setup-tailwind.d.ts.map +1 -0
- package/dist/utils/tailwindcss/setup-tailwind.spec.d.ts +2 -0
- package/dist/utils/tailwindcss/setup-tailwind.spec.d.ts.map +1 -0
- package/dist/utils/text/from-dash-case-to-camel-case.d.ts +2 -0
- package/dist/utils/text/from-dash-case-to-camel-case.d.ts.map +1 -0
- package/package.json +14 -10
- package/dist/hooks/use-style-inlining.d.ts +0 -11
- package/dist/hooks/use-style-inlining.d.ts.map +0 -1
- package/dist/hooks/use-tailwind-styles.d.ts +0 -12
- package/dist/hooks/use-tailwind-styles.d.ts.map +0 -1
- package/dist/hooks/use-tailwind-styles.spec.d.ts +0 -2
- package/dist/hooks/use-tailwind-styles.spec.d.ts.map +0 -1
- package/dist/utils/compatibility/css-to-jsx-style.d.ts +0 -6
- package/dist/utils/compatibility/css-to-jsx-style.d.ts.map +0 -1
- package/dist/utils/compatibility/css-to-jsx-style.spec.d.ts +0 -2
- package/dist/utils/compatibility/css-to-jsx-style.spec.d.ts.map +0 -1
- package/dist/utils/compatibility/make-all-rule-properties-important.d.ts +0 -2
- package/dist/utils/compatibility/make-all-rule-properties-important.d.ts.map +0 -1
- package/dist/utils/compatibility/sanitize-rule-selector.d.ts +0 -2
- package/dist/utils/compatibility/sanitize-rule-selector.d.ts.map +0 -1
- package/dist/utils/compatibility/use-rgb-non-spaced-syntax.d.ts +0 -8
- package/dist/utils/compatibility/use-rgb-non-spaced-syntax.d.ts.map +0 -1
- package/dist/utils/compatibility/use-rgb-non-spaced-syntax.spec.d.ts +0 -2
- package/dist/utils/compatibility/use-rgb-non-spaced-syntax.spec.d.ts.map +0 -1
- package/dist/utils/css/css-variables-resolver.d.ts +0 -5
- package/dist/utils/css/css-variables-resolver.d.ts.map +0 -1
- package/dist/utils/css/css-variables-resolver.spec.d.ts +0 -2
- package/dist/utils/css/css-variables-resolver.spec.d.ts.map +0 -1
- package/dist/utils/css/media-queries/separate-media-queries-from-css.d.ts +0 -2
- package/dist/utils/css/media-queries/separate-media-queries-from-css.d.ts.map +0 -1
- package/dist/utils/css/media-queries/separate-media-queries-from-css.spec.d.ts +0 -2
- package/dist/utils/css/media-queries/separate-media-queries-from-css.spec.d.ts.map +0 -1
- package/dist/utils/css/rules-for.d.ts +0 -11
- package/dist/utils/css/rules-for.d.ts.map +0 -1
- package/dist/utils/quick-safe-render-to-string.d.ts +0 -13
- package/dist/utils/quick-safe-render-to-string.d.ts.map +0 -1
- package/dist/utils/quick-safe-render-to-string.spec.d.ts +0 -2
- package/dist/utils/quick-safe-render-to-string.spec.d.ts.map +0 -1
- package/dist/utils/tailwindcss/get-css-for-markup.d.ts +0 -6
- package/dist/utils/tailwindcss/get-css-for-markup.d.ts.map +0 -1
- package/dist/utils/tailwindcss/get-css-for-markup.spec.d.ts +0 -2
- package/dist/utils/tailwindcss/get-css-for-markup.spec.d.ts.map +0 -1
package/dist/tailwind.d.ts
CHANGED
|
@@ -5,5 +5,10 @@ export interface TailwindProps {
|
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
config?: TailwindConfig;
|
|
7
7
|
}
|
|
8
|
+
export interface EmailElementProps {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
8
13
|
export declare const Tailwind: React.FC<TailwindProps>;
|
|
9
14
|
//# sourceMappingURL=tailwind.d.ts.map
|
package/dist/tailwind.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../src/tailwind.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,IAAI,sBAAsB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../src/tailwind.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,IAAI,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAOpE,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,sBAAsB,EACpB,WAAW,GACX,QAAQ,GACR,WAAW,GACX,UAAU,GACV,WAAW,GACX,SAAS,GACT,QAAQ,GACR,cAAc,GACd,UAAU,GACV,OAAO,GACP,aAAa,GACb,SAAS,CACZ,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA8E5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-css-property-to-react-property.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/convert-css-property-to-react-property.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,SAAU,MAAM,WAY7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize-class-name.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/sanitize-class-name.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sanitize-class-name.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/sanitize-class-name.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,cAAe,MAAM,WAgBlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make-inline-styles-for.d.ts","sourceRoot":"","sources":["../../../src/utils/css/make-inline-styles-for.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,SAAS,CAAC;AAuB1C,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,IAAI;;;EA6BzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make-inline-styles-for.spec.d.ts","sourceRoot":"","sources":["../../../src/utils/css/make-inline-styles-for.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AtRule, Root } from "postcss";
|
|
2
|
+
/**
|
|
3
|
+
* This function goes through a few steps to ensure the best email client support and
|
|
4
|
+
* to ensure that the media queries are going to applied correctly alongisde
|
|
5
|
+
* the inline styles.
|
|
6
|
+
*
|
|
7
|
+
* What it does is:
|
|
8
|
+
* 1. Ignore all the rules that have any pseudo selectors
|
|
9
|
+
* 2. Converts all declarations in all rules into being important ones
|
|
10
|
+
* 3. Sanitizes all the selectors of all rules in the media queries
|
|
11
|
+
* 4. Merges at rules that have equivalent parameters
|
|
12
|
+
*/
|
|
13
|
+
export declare const sanitizeMediaQueries: (root: Root) => {
|
|
14
|
+
mediaQueryClasses: string[];
|
|
15
|
+
sanitizedAtRules: AtRule[];
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=sanitize-media-queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-media-queries.d.ts","sourceRoot":"","sources":["../../../../src/utils/css/media-queries/sanitize-media-queries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG5C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,SAAU,IAAI;;;CAgD9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-media-queries.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/css/media-queries/sanitize-media-queries.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-all-css-variables.d.ts","sourceRoot":"","sources":["../../../src/utils/css/resolve-all-css-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,EAQV,MAAM,SAAS,CAAC;AAwBjB,eAAO,MAAM,sBAAsB,SAAU,IAAI,SAkFhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-all-css-variables.spec.d.ts","sourceRoot":"","sources":["../../../src/utils/css/resolve-all-css-variables.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AtRule, Root, Rule } from "postcss";
|
|
2
|
+
/**
|
|
3
|
+
* Meant to do all the things necessary, in a per-declaration basis, to have the best email client
|
|
4
|
+
* support possible.
|
|
5
|
+
*
|
|
6
|
+
* Currently it only converts all `rgb` declaration values that use a space-based syntax
|
|
7
|
+
* into a command based one since the space-based isn't well supported.
|
|
8
|
+
*/
|
|
9
|
+
export declare const sanitizeDeclarations: (nodeContainingDeclarations: Rule | AtRule | Root) => void;
|
|
10
|
+
//# sourceMappingURL=sanitize-declarations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-declarations.d.ts","sourceRoot":"","sources":["../../../src/utils/css/sanitize-declarations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,+BACH,IAAI,GAAG,MAAM,GAAG,IAAI,SAcjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-component.d.ts","sourceRoot":"","sources":["../../../src/utils/react/is-component.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,YACb,MAAM,YAAY,kFAO5B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A function made for deep mapping a React tree from a node, even through its components.
|
|
4
|
+
* For all the components it finds, it renders them by directly calling them. This has a few issues
|
|
5
|
+
* with hooks, and the only solution is `renderAsync` here, which will probably be done in the future.
|
|
6
|
+
*
|
|
7
|
+
* @param process - The callback that will be called every time a new element has been reached.
|
|
8
|
+
*
|
|
9
|
+
* For components, this is going to be called, most of the time, two times. This is because the best
|
|
10
|
+
* approach is to process *both* before rendering the components (i.e. on the props.children of a component element)
|
|
11
|
+
* and after rendering them because the children themselves might have been modified in the component's
|
|
12
|
+
* rendering.
|
|
13
|
+
*/
|
|
14
|
+
export declare function mapReactTree(value: React.ReactNode, process: (node: React.ReactNode) => React.ReactNode): React.ReactNode;
|
|
15
|
+
//# sourceMappingURL=map-react-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-react-tree.d.ts","sourceRoot":"","sources":["../../../src/utils/react/map-react-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,EACtB,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,GAClD,KAAK,CAAC,SAAS,CAsCjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map-react-tree.spec.d.ts","sourceRoot":"","sources":["../../../src/utils/react/map-react-tree.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Node } from "postcss";
|
|
3
|
+
import type { EmailElementProps } from "../../tailwind";
|
|
4
|
+
import type { setupTailwind } from "./setup-tailwind";
|
|
5
|
+
export declare const cloneElementWithInlinedStyles: (element: React.ReactElement<EmailElementProps>, tailwind: ReturnType<typeof setupTailwind>) => {
|
|
6
|
+
elementWithInlinedStyles: React.ReactElement<EmailElementProps, string | React.JSXElementConstructor<any>>;
|
|
7
|
+
nonInlinableClasses: string[];
|
|
8
|
+
nonInlineStyleNodes: Node[];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=clone-element-with-inlined-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clone-element-with-inlined-styles.d.ts","sourceRoot":"","sources":["../../../src/utils/tailwindcss/clone-element-with-inlined-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,6BAA6B,YAC/B,MAAM,YAAY,CAAC,iBAAiB,CAAC,YACpC,WAAW,oBAAoB,CAAC;;;;CAgE3C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../src/utils/tailwindcss/tailwind-internals.d.ts" />
|
|
2
|
+
import type { TailwindConfig } from "../../tailwind";
|
|
3
|
+
export declare const setupTailwindContext: (config: TailwindConfig) => import("tailwindcss/lib/lib/setupContextUtils").JitContext;
|
|
4
|
+
//# sourceMappingURL=setup-tailwind-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-tailwind-context.d.ts","sourceRoot":"","sources":["../../../src/utils/tailwindcss/setup-tailwind-context.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,eAAO,MAAM,oBAAoB,WAAY,cAAc,+DAU1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-tailwind.d.ts","sourceRoot":"","sources":["../../../src/utils/tailwindcss/setup-tailwind.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAWrD,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc;sCAGd,MAAM,EAAE;EA2B7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-tailwind.spec.d.ts","sourceRoot":"","sources":["../../../src/utils/tailwindcss/setup-tailwind.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-dash-case-to-camel-case.d.ts","sourceRoot":"","sources":["../../../src/utils/text/from-dash-case-to-camel-case.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,SAAU,MAAM,WAEnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-email/tailwind",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.2",
|
|
4
4
|
"description": "A React component to wrap emails with Tailwind CSS",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -40,23 +40,27 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@responsive-email/react-email": "0.0.3",
|
|
43
|
+
"@types/shelljs": "0.8.15",
|
|
44
|
+
"@vitejs/plugin-react": "4.2.1",
|
|
43
45
|
"eslint-plugin-regex": "1.10.0",
|
|
44
|
-
"memfs": "4.6.0",
|
|
45
46
|
"postcss": "8.4.40",
|
|
46
|
-
"
|
|
47
|
+
"postcss-selector-parser": "6.0.16",
|
|
47
48
|
"react-dom": "19.0.0-rc-187dd6a7-20240806",
|
|
49
|
+
"shelljs": "0.8.5",
|
|
48
50
|
"tailwindcss": "3.4.10",
|
|
49
51
|
"tsup": "7.2.0",
|
|
50
52
|
"typescript": "5.1.6",
|
|
51
53
|
"vite": "5.0.13",
|
|
52
54
|
"vite-plugin-dts": "3.6.3",
|
|
53
|
-
"
|
|
55
|
+
"vitest": "1.1.1",
|
|
56
|
+
"yalc": "1.0.0-pre.53",
|
|
54
57
|
"@react-email/button": "^0.0.18-canary.0",
|
|
55
|
-
"@react-email/hr": "0.0.10",
|
|
56
|
-
"@react-email/head": "0.0.11",
|
|
57
58
|
"@react-email/heading": "0.0.14",
|
|
59
|
+
"@react-email/hr": "0.0.10",
|
|
58
60
|
"@react-email/html": "0.0.10",
|
|
59
|
-
"@react-email/
|
|
61
|
+
"@react-email/head": "0.0.11",
|
|
62
|
+
"@react-email/render": "1.0.2-canary.0",
|
|
63
|
+
"@react-email/link": "0.0.11-canary.0",
|
|
60
64
|
"eslint-config-custom": "0.0.0",
|
|
61
65
|
"tsconfig": "0.0.0"
|
|
62
66
|
},
|
|
@@ -64,11 +68,11 @@
|
|
|
64
68
|
"access": "public"
|
|
65
69
|
},
|
|
66
70
|
"scripts": {
|
|
67
|
-
"build": "tsc && vite build",
|
|
71
|
+
"build": "tsc && NODE_ENV=production vite build --mode production",
|
|
68
72
|
"dev": "vite build --watch",
|
|
69
73
|
"clean": "rm -rf dist",
|
|
70
74
|
"lint": "eslint .",
|
|
71
|
-
"test:watch": "vitest
|
|
72
|
-
"test": "vitest run
|
|
75
|
+
"test:watch": "vitest",
|
|
76
|
+
"test": "vitest run"
|
|
73
77
|
}
|
|
74
78
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a style inlining function that converts an element's className into inlined React styles - based on the
|
|
3
|
-
* {@link stylePerClass} map - for all classes also.
|
|
4
|
-
*
|
|
5
|
-
* Also returns residual classes that could not be found on the map.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useStyleInlining(stylePerClass: Record<string, React.CSSProperties>): (className: string) => {
|
|
8
|
-
styles: import("react").CSSProperties;
|
|
9
|
-
residualClassName: string;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=use-style-inlining.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-style-inlining.d.ts","sourceRoot":"","sources":["../../src/hooks/use-style-inlining.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,eAE/B,MAAM;;;EAsB1B"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { TailwindConfig } from "../tailwind";
|
|
3
|
-
/**
|
|
4
|
-
* Gets all the necessary information from the node and the Tailwind config to be able
|
|
5
|
-
* to apply all the Tailwind styles.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useTailwindStyles(node: React.ReactNode, config: TailwindConfig): {
|
|
8
|
-
stylePerClassMap: Record<string, React.CSSProperties>;
|
|
9
|
-
sanitizedMediaQueries: string[];
|
|
10
|
-
nonInlinableClasses: string[];
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=use-tailwind-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-tailwind-styles.d.ts","sourceRoot":"","sources":["../../src/hooks/use-tailwind-styles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAYlD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,KAAK,CAAC,SAAS,EACrB,MAAM,EAAE,cAAc;;;;EAyCvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-tailwind-styles.spec.d.ts","sourceRoot":"","sources":["../../src/hooks/use-tailwind-styles.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css-to-jsx-style.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/css-to-jsx-style.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,kBAAkB,YAAa,MAAM;;;GASjD,CAAC;AAEF,eAAO,MAAM,aAAa,YAAa,MAAM,2BAS5C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css-to-jsx-style.spec.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/css-to-jsx-style.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"make-all-rule-properties-important.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/make-all-rule-properties-important.ts"],"names":[],"mappings":"AAAA,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,MAAM,UASjE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize-rule-selector.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/sanitize-rule-selector.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,UAIzD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is to avoid problems on email clients that don't allow for spaced syntax on
|
|
3
|
-
* rgb.
|
|
4
|
-
*
|
|
5
|
-
* See https://www.caniemail.com/features/css-rgb/
|
|
6
|
-
*/
|
|
7
|
-
export declare const useRgbNonSpacedSyntax: (css: string) => string;
|
|
8
|
-
//# sourceMappingURL=use-rgb-non-spaced-syntax.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-rgb-non-spaced-syntax.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/use-rgb-non-spaced-syntax.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAS,MAAM,WAShD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-rgb-non-spaced-syntax.spec.d.ts","sourceRoot":"","sources":["../../../src/utils/compatibility/use-rgb-non-spaced-syntax.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css-variables-resolver.d.ts","sourceRoot":"","sources":["../../../src/utils/css/css-variables-resolver.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,oBAAoB;;;CA2GhC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css-variables-resolver.spec.d.ts","sourceRoot":"","sources":["../../../src/utils/css/css-variables-resolver.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"separate-media-queries-from-css.d.ts","sourceRoot":"","sources":["../../../../src/utils/css/media-queries/separate-media-queries-from-css.ts"],"names":[],"mappings":"AAAA,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,GACV,CAAC,sBAAsB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAc1D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"separate-media-queries-from-css.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/css/media-queries/separate-media-queries-from-css.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface Rule {
|
|
2
|
-
value: string;
|
|
3
|
-
selector: string;
|
|
4
|
-
content: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function rulesFor(cssWithRules: string): Generator<{
|
|
7
|
-
value: string;
|
|
8
|
-
selector: string;
|
|
9
|
-
content: string;
|
|
10
|
-
}, void, unknown>;
|
|
11
|
-
//# sourceMappingURL=rules-for.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rules-for.d.ts","sourceRoot":"","sources":["../../../src/utils/css/rules-for.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAiB,QAAQ,CAAC,YAAY,EAAE,MAAM;;;;kBAU7C"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* This was originally written due to react making sync `react-dom/server` APIs
|
|
4
|
-
* legacy and making it almost impossible for this component to be used on NextJS 14
|
|
5
|
-
* but this also makes the Tailwind component faster due to the fact that it runs through
|
|
6
|
-
* the elements and directly converts props into attributes and element names into
|
|
7
|
-
* tag names.
|
|
8
|
-
*
|
|
9
|
-
* This also renders the components by calling them directly and then using their returned value
|
|
10
|
-
* to compute the rest of the HTML markup tree.
|
|
11
|
-
*/
|
|
12
|
-
export declare const quickSafeRenderToString: (element: React.ReactNode) => string;
|
|
13
|
-
//# sourceMappingURL=quick-safe-render-to-string.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quick-safe-render-to-string.d.ts","sourceRoot":"","sources":["../../src/utils/quick-safe-render-to-string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,YAAa,MAAM,SAAS,KAAG,MA+ClE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quick-safe-render-to-string.spec.d.ts","sourceRoot":"","sources":["../../src/utils/quick-safe-render-to-string.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-css-for-markup.d.ts","sourceRoot":"","sources":["../../../src/utils/tailwindcss/get-css-for-markup.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,SAAS,EAAE,SAAS,CAAC;CAC1B;AAOD,eAAO,MAAM,eAAe,WAClB,MAAM,UACN,cAAc,GAAG,SAAS,oBA4BnC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-css-for-markup.spec.d.ts","sourceRoot":"","sources":["../../../src/utils/tailwindcss/get-css-for-markup.spec.tsx"],"names":[],"mappings":""}
|