@typestyles/react 0.3.1 → 0.3.3
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 +1 -1
- package/dist/babel-plugin.cjs +14223 -152
- package/dist/babel-plugin.cjs.map +1 -1
- package/dist/babel-plugin.d.cts +10 -10
- package/dist/babel-plugin.d.cts.map +1 -0
- package/dist/babel-plugin.d.ts +10 -10
- package/dist/babel-plugin.d.ts.map +1 -0
- package/dist/babel-plugin.js +14223 -130
- package/dist/babel-plugin.js.map +1 -1
- package/dist/css-prop-DMDmFKhu.js +21 -0
- package/dist/css-prop-DMDmFKhu.js.map +1 -0
- package/dist/css-prop-DOMoNwJN.cjs +38 -0
- package/dist/css-prop-DOMoNwJN.cjs.map +1 -0
- package/dist/{css-prop-runtime-DHYMbbZm.d.ts → css-prop-runtime-zKybLO8E.d.cts} +7 -5
- package/dist/css-prop-runtime-zKybLO8E.d.cts.map +1 -0
- package/dist/{css-prop-runtime-DHYMbbZm.d.cts → css-prop-runtime-zKybLO8E.d.ts} +7 -5
- package/dist/css-prop-runtime-zKybLO8E.d.ts.map +1 -0
- package/dist/css-prop-runtime.cjs +6 -14
- package/dist/css-prop-runtime.cjs.map +1 -1
- package/dist/css-prop-runtime.d.cts +2 -2
- package/dist/css-prop-runtime.d.ts +2 -2
- package/dist/css-prop-runtime.js +8 -3
- package/dist/css-prop-runtime.js.map +1 -1
- package/dist/index.cjs +72 -110
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -23
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +23 -23
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +66 -78
- package/dist/index.js.map +1 -1
- package/dist/jsx-dev-runtime.cjs +19 -45
- package/dist/jsx-dev-runtime.cjs.map +1 -1
- package/dist/jsx-dev-runtime.d.cts +9 -11
- package/dist/jsx-dev-runtime.d.cts.map +1 -0
- package/dist/jsx-dev-runtime.d.ts +9 -11
- package/dist/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/jsx-dev-runtime.js +18 -25
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.cjs +22 -48
- package/dist/jsx-runtime.cjs.map +1 -1
- package/dist/jsx-runtime.d.cts +10 -12
- package/dist/jsx-runtime.d.cts.map +1 -0
- package/dist/jsx-runtime.d.ts +10 -12
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx-runtime.js +19 -27
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/resolve-hash-class-DuqLJq6S.cjs +14 -0
- package/dist/resolve-hash-class-DuqLJq6S.cjs.map +1 -0
- package/dist/resolve-hash-class-Rs_7aMMQ.js +9 -0
- package/dist/resolve-hash-class-Rs_7aMMQ.js.map +1 -0
- package/dist/types-DcDsqg2q.d.cts +10 -0
- package/dist/types-DcDsqg2q.d.cts.map +1 -0
- package/dist/types-DcDsqg2q.d.ts +10 -0
- package/dist/types-DcDsqg2q.d.ts.map +1 -0
- package/package.json +8 -10
- package/dist/chunk-IHZMLPG2.js +0 -22
- package/dist/chunk-IHZMLPG2.js.map +0 -1
- package/dist/chunk-KM65VQPZ.js +0 -11
- package/dist/chunk-KM65VQPZ.js.map +0 -1
- package/dist/chunk-TLEOUPD2.js +0 -10
- package/dist/chunk-TLEOUPD2.js.map +0 -1
- package/dist/types-_vEO6H8X.d.cts +0 -9
- package/dist/types-_vEO6H8X.d.ts +0 -9
package/dist/jsx-runtime.js
CHANGED
|
@@ -1,37 +1,29 @@
|
|
|
1
|
-
import { TypeStylesContext, resolveCssPropClass } from
|
|
2
|
-
import { resolveHashClass } from
|
|
3
|
-
import { useContext } from
|
|
4
|
-
import { Fragment as Fragment$1, jsx as jsx$1, jsxs as jsxs$1 } from
|
|
5
|
-
|
|
1
|
+
import { n as TypeStylesContext, t as resolveCssPropClass } from "./css-prop-DMDmFKhu.js";
|
|
2
|
+
import { t as resolveHashClass } from "./resolve-hash-class-Rs_7aMMQ.js";
|
|
3
|
+
import { useContext } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx as jsx$1, jsxs as jsxs$1 } from "react/jsx-runtime";
|
|
5
|
+
//#region src/jsx-runtime.ts
|
|
6
6
|
function processCssProp(props, hashClass) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
className: resolveCssPropClass(hashClass, css, className)
|
|
14
|
-
};
|
|
15
|
-
return nextProps;
|
|
7
|
+
if (props.css == null) return props;
|
|
8
|
+
const { css, className, ...rest } = props;
|
|
9
|
+
return {
|
|
10
|
+
...rest,
|
|
11
|
+
className: resolveCssPropClass(hashClass, css, className)
|
|
12
|
+
};
|
|
16
13
|
}
|
|
17
14
|
function wrapJsx(factory, type, props, key) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"[@typestyles/react] The `css` prop requires a `TypeStylesProvider` with a styles instance. Wrap your app in `<TypeStylesProvider styles={api}>` (from `createTypeStyles()`), or use the Babel plugin for zero-runtime css props."
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
const nextProps = styles ? processCssProp(props, resolveHashClass(styles)) : props;
|
|
25
|
-
return factory(type, nextProps, key);
|
|
15
|
+
const styles = useContext(TypeStylesContext);
|
|
16
|
+
if (props.css != null && styles == null) throw new Error("[@typestyles/react] The `css` prop requires a `TypeStylesProvider` with a styles instance. Wrap your app in `<TypeStylesProvider styles={api}>` (from `createTypeStyles()`), or use the Babel plugin for zero-runtime css props.");
|
|
17
|
+
return factory(type, styles ? processCssProp(props, resolveHashClass(styles)) : props, key);
|
|
26
18
|
}
|
|
27
|
-
|
|
19
|
+
const Fragment = Fragment$1;
|
|
28
20
|
function jsx(type, props, key) {
|
|
29
|
-
|
|
21
|
+
return wrapJsx(jsx$1, type, props, key);
|
|
30
22
|
}
|
|
31
23
|
function jsxs(type, props, key) {
|
|
32
|
-
|
|
24
|
+
return wrapJsx(jsxs$1, type, props, key);
|
|
33
25
|
}
|
|
34
|
-
|
|
26
|
+
//#endregion
|
|
35
27
|
export { Fragment, jsx, jsxs };
|
|
36
|
-
|
|
28
|
+
|
|
37
29
|
//# sourceMappingURL=jsx-runtime.js.map
|
package/dist/jsx-runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","names":["ReactFragment","reactJsx","reactJsxs"],"sources":["../src/jsx-runtime.ts"],"sourcesContent":["import { useContext, type ElementType, type ReactNode } from 'react';\nimport { jsx as reactJsx, jsxs as reactJsxs, Fragment as ReactFragment } from 'react/jsx-runtime';\nimport type { CSSProperties } from 'typestyles';\nimport { resolveCssPropClass } from './css-prop';\nimport { TypeStylesContext } from './context';\nimport { resolveHashClass } from './resolve-hash-class';\nimport type { WithCssProp } from './types';\n\nfunction processCssProp<P extends Record<string, unknown>>(\n props: WithCssProp<P>,\n hashClass: (properties: CSSProperties, label?: string) => string,\n): P {\n if (props.css == null) {\n return props as P;\n }\n\n const { css, className, ...rest } = props;\n const nextProps = {\n ...rest,\n className: resolveCssPropClass(hashClass, css, className),\n } as unknown as P;\n\n return nextProps;\n}\n\nfunction wrapJsx<P extends Record<string, unknown>>(\n factory: typeof reactJsx,\n type: ElementType,\n props: WithCssProp<P>,\n key?: React.Key,\n): React.ReactElement {\n const styles = useContext(TypeStylesContext);\n\n if (props.css != null && styles == null) {\n throw new Error(\n '[@typestyles/react] The `css` prop requires a `TypeStylesProvider` with a styles instance. ' +\n 'Wrap your app in `<TypeStylesProvider styles={api}>` (from `createTypeStyles()`), or use the Babel plugin for zero-runtime css props.',\n );\n }\n\n const nextProps = styles ? processCssProp(props, resolveHashClass(styles)) : (props as P);\n return factory(type, nextProps, key);\n}\n\nexport const Fragment = ReactFragment;\n\nexport function jsx<P extends Record<string, unknown>>(\n type: ElementType,\n props: WithCssProp<P>,\n key?: React.Key,\n): React.ReactElement {\n return wrapJsx(reactJsx, type, props, key);\n}\n\nexport function jsxs<P extends Record<string, unknown>>(\n type: ElementType,\n props: WithCssProp<P>,\n key?: React.Key,\n): React.ReactElement {\n return wrapJsx(reactJsxs, type, props, key);\n}\n\nexport type { ReactNode };\n"],"mappings":";;;;;AAQA,SAAS,eACP,OACA,WACG;CACH,IAAI,MAAM,OAAO,MACf,OAAO;CAGT,MAAM,EAAE,KAAK,WAAW,GAAG,SAAS;CAMpC,OAAO;EAJL,GAAG;EACH,WAAW,oBAAoB,WAAW,KAAK,SAAS;CAG3C;AACjB;AAEA,SAAS,QACP,SACA,MACA,OACA,KACoB;CACpB,MAAM,SAAS,WAAW,iBAAiB;CAE3C,IAAI,MAAM,OAAO,QAAQ,UAAU,MACjC,MAAM,IAAI,MACR,kOAEF;CAIF,OAAO,QAAQ,MADG,SAAS,eAAe,OAAO,iBAAiB,MAAM,CAAC,IAAK,OAC9C,GAAG;AACrC;AAEA,MAAa,WAAWA;AAExB,SAAgB,IACd,MACA,OACA,KACoB;CACpB,OAAO,QAAQC,OAAU,MAAM,OAAO,GAAG;AAC3C;AAEA,SAAgB,KACd,MACA,OACA,KACoB;CACpB,OAAO,QAAQC,QAAW,MAAM,OAAO,GAAG;AAC5C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/resolve-hash-class.ts
|
|
2
|
+
function resolveHashClass(api) {
|
|
3
|
+
if ("hash" in api && typeof api.hash === "function") return (properties, label) => api.hash(properties, { label });
|
|
4
|
+
return api.hashClass;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
Object.defineProperty(exports, "resolveHashClass", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function() {
|
|
10
|
+
return resolveHashClass;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=resolve-hash-class-DuqLJq6S.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-hash-class-DuqLJq6S.cjs","names":[],"sources":["../src/resolve-hash-class.ts"],"sourcesContent":["import type { CSSProperties, StylesApi, TypeStylesApi } from 'typestyles';\n\n/** Styles host for the css prop / TypeStylesProvider. */\nexport type CssStylesHost = Pick<TypeStylesApi, 'hash'> | StylesApi;\n\nexport type HashClassFn = (properties: CSSProperties, label?: string) => string;\n\n/** Normalize `hash` (createTypeStyles) and `hashClass` (createStyles). */\nexport function resolveHashClass(api: CssStylesHost): HashClassFn {\n if ('hash' in api && typeof api.hash === 'function') {\n return (properties, label) => api.hash(properties, { label });\n }\n return (api as StylesApi).hashClass;\n}\n"],"mappings":";AAQA,SAAgB,iBAAiB,KAAiC;CAChE,IAAI,UAAU,OAAO,OAAO,IAAI,SAAS,YACvC,QAAQ,YAAY,UAAU,IAAI,KAAK,YAAY,EAAE,MAAM,CAAC;CAE9D,OAAQ,IAAkB;AAC5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/resolve-hash-class.ts
|
|
2
|
+
function resolveHashClass(api) {
|
|
3
|
+
if ("hash" in api && typeof api.hash === "function") return (properties, label) => api.hash(properties, { label });
|
|
4
|
+
return api.hashClass;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { resolveHashClass as t };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=resolve-hash-class-Rs_7aMMQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-hash-class-Rs_7aMMQ.js","names":[],"sources":["../src/resolve-hash-class.ts"],"sourcesContent":["import type { CSSProperties, StylesApi, TypeStylesApi } from 'typestyles';\n\n/** Styles host for the css prop / TypeStylesProvider. */\nexport type CssStylesHost = Pick<TypeStylesApi, 'hash'> | StylesApi;\n\nexport type HashClassFn = (properties: CSSProperties, label?: string) => string;\n\n/** Normalize `hash` (createTypeStyles) and `hashClass` (createStyles). */\nexport function resolveHashClass(api: CssStylesHost): HashClassFn {\n if ('hash' in api && typeof api.hash === 'function') {\n return (properties, label) => api.hash(properties, { label });\n }\n return (api as StylesApi).hashClass;\n}\n"],"mappings":";AAQA,SAAgB,iBAAiB,KAAiC;CAChE,IAAI,UAAU,OAAO,OAAO,IAAI,SAAS,YACvC,QAAQ,YAAY,UAAU,IAAI,KAAK,YAAY,EAAE,MAAM,CAAC;CAE9D,OAAQ,IAAkB;AAC5B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from "typestyles";
|
|
2
|
+
//#region src/types.d.ts
|
|
3
|
+
type CssPropValue = CSSProperties | false | null | undefined;
|
|
4
|
+
type WithCssProp<P> = P & {
|
|
5
|
+
css?: CssPropValue;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { WithCssProp as n, CssPropValue as t };
|
|
10
|
+
//# sourceMappingURL=types-DcDsqg2q.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DcDsqg2q.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;KAEY,eAAe;KAEf,YAAY,KAAK;EAAM,MAAM;EAAc"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from "typestyles";
|
|
2
|
+
//#region src/types.d.ts
|
|
3
|
+
type CssPropValue = CSSProperties | false | null | undefined;
|
|
4
|
+
type WithCssProp<P> = P & {
|
|
5
|
+
css?: CssPropValue;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { WithCssProp as n, CssPropValue as t };
|
|
10
|
+
//# sourceMappingURL=types-DcDsqg2q.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DcDsqg2q.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;KAEY,eAAe;KAEf,YAAY,KAAK;EAAM,MAAM;EAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typestyles/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "React integration for typestyles — styled API and css prop",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"license": "Apache-2.0",
|
|
72
72
|
"repository": {
|
|
73
73
|
"type": "git",
|
|
74
|
-
"url": "https://github.com/
|
|
74
|
+
"url": "https://github.com/phthalo-dev/typestyles",
|
|
75
75
|
"directory": "packages/react"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
@@ -95,18 +95,16 @@
|
|
|
95
95
|
"@types/babel__core": "^7.20.5",
|
|
96
96
|
"@types/react": "^18.3.12",
|
|
97
97
|
"@types/react-dom": "^18.3.1",
|
|
98
|
-
"eslint": "^9.39.2",
|
|
99
98
|
"react": "^18.0.0",
|
|
100
99
|
"react-dom": "^18.0.0",
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"typestyles": "0.32.
|
|
100
|
+
"typescript": "^6.0.0",
|
|
101
|
+
"vitest": "5.0.5",
|
|
102
|
+
"vite-plus": "1.3.0",
|
|
103
|
+
"typestyles": "0.32.3"
|
|
105
104
|
},
|
|
106
105
|
"scripts": {
|
|
107
|
-
"build": "
|
|
108
|
-
"test": "
|
|
109
|
-
"lint": "eslint .",
|
|
106
|
+
"build": "vp pack",
|
|
107
|
+
"test": "vp test run",
|
|
110
108
|
"typecheck": "tsc --noEmit"
|
|
111
109
|
}
|
|
112
110
|
}
|
package/dist/chunk-IHZMLPG2.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { cx } from 'typestyles';
|
|
4
|
-
|
|
5
|
-
// src/context.tsx
|
|
6
|
-
var TypeStylesContext = createContext(null);
|
|
7
|
-
function TypeStylesProvider({
|
|
8
|
-
styles,
|
|
9
|
-
children
|
|
10
|
-
}) {
|
|
11
|
-
return /* @__PURE__ */ jsx(TypeStylesContext.Provider, { value: styles, children });
|
|
12
|
-
}
|
|
13
|
-
function resolveCssPropClass(hashClass, css, className) {
|
|
14
|
-
if (css && typeof css === "object") {
|
|
15
|
-
return cx(hashClass(css), className);
|
|
16
|
-
}
|
|
17
|
-
return cx(className);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { TypeStylesContext, TypeStylesProvider, resolveCssPropClass };
|
|
21
|
-
//# sourceMappingURL=chunk-IHZMLPG2.js.map
|
|
22
|
-
//# sourceMappingURL=chunk-IHZMLPG2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/context.tsx","../src/css-prop.ts"],"names":[],"mappings":";;;;;AAGO,IAAM,iBAAA,GAAoB,cAAoC,IAAI;AAElE,SAAS,kBAAA,CAAmB;AAAA,EACjC,MAAA;AAAA,EACA;AACF,CAAA,EAIsB;AACpB,EAAA,2BAAQ,iBAAA,CAAkB,QAAA,EAAlB,EAA2B,KAAA,EAAO,QAAS,QAAA,EAAS,CAAA;AAC9D;ACVO,SAAS,mBAAA,CACd,SAAA,EACA,GAAA,EACA,SAAA,EACQ;AACR,EAAA,IAAI,GAAA,IAAO,OAAO,GAAA,KAAQ,QAAA,EAAU;AAClC,IAAA,OAAO,EAAA,CAAG,SAAA,CAAU,GAAG,CAAA,EAAG,SAAS,CAAA;AAAA,EACrC;AACA,EAAA,OAAO,GAAG,SAAS,CAAA;AACrB","file":"chunk-IHZMLPG2.js","sourcesContent":["import { createContext, type ReactNode } from 'react';\nimport type { CssStylesHost } from './resolve-hash-class';\n\nexport const TypeStylesContext = createContext<CssStylesHost | null>(null);\n\nexport function TypeStylesProvider({\n styles,\n children,\n}: {\n /** Prefer a `createTypeStyles()` result; `createStyles()` instances also work. */\n styles: CssStylesHost;\n children: ReactNode;\n}): React.JSX.Element {\n return <TypeStylesContext.Provider value={styles}>{children}</TypeStylesContext.Provider>;\n}\n","import type { CSSProperties } from 'typestyles';\nimport { cx } from 'typestyles';\nimport type { CssPropValue } from './types';\n\nexport function resolveCssPropClass(\n hashClass: (properties: CSSProperties, label?: string) => string,\n css: CssPropValue | undefined,\n className?: string,\n): string {\n if (css && typeof css === 'object') {\n return cx(hashClass(css), className);\n }\n return cx(className);\n}\n"]}
|
package/dist/chunk-KM65VQPZ.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// src/resolve-hash-class.ts
|
|
2
|
-
function resolveHashClass(api) {
|
|
3
|
-
if ("hash" in api && typeof api.hash === "function") {
|
|
4
|
-
return (properties, label) => api.hash(properties, { label });
|
|
5
|
-
}
|
|
6
|
-
return api.hashClass;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { resolveHashClass };
|
|
10
|
-
//# sourceMappingURL=chunk-KM65VQPZ.js.map
|
|
11
|
-
//# sourceMappingURL=chunk-KM65VQPZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resolve-hash-class.ts"],"names":[],"mappings":";AAQO,SAAS,iBAAiB,GAAA,EAAiC;AAChE,EAAA,IAAI,MAAA,IAAU,GAAA,IAAO,OAAO,GAAA,CAAI,SAAS,UAAA,EAAY;AACnD,IAAA,OAAO,CAAC,YAAY,KAAA,KAAU,GAAA,CAAI,KAAK,UAAA,EAAY,EAAE,OAAO,CAAA;AAAA,EAC9D;AACA,EAAA,OAAQ,GAAA,CAAkB,SAAA;AAC5B","file":"chunk-KM65VQPZ.js","sourcesContent":["import type { CSSProperties, StylesApi, TypeStylesApi } from 'typestyles';\n\n/** Styles host for the css prop / TypeStylesProvider. */\nexport type CssStylesHost = Pick<TypeStylesApi, 'hash'> | StylesApi;\n\nexport type HashClassFn = (properties: CSSProperties, label?: string) => string;\n\n/** Normalize `hash` (createTypeStyles) and `hashClass` (createStyles). */\nexport function resolveHashClass(api: CssStylesHost): HashClassFn {\n if ('hash' in api && typeof api.hash === 'function') {\n return (properties, label) => api.hash(properties, { label });\n }\n return (api as StylesApi).hashClass;\n}\n"]}
|
package/dist/chunk-TLEOUPD2.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { resolveHashClass } from './chunk-KM65VQPZ.js';
|
|
2
|
-
|
|
3
|
-
// src/css-prop-runtime.ts
|
|
4
|
-
function cssProp(api, properties) {
|
|
5
|
-
return resolveHashClass(api)(properties);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export { cssProp };
|
|
9
|
-
//# sourceMappingURL=chunk-TLEOUPD2.js.map
|
|
10
|
-
//# sourceMappingURL=chunk-TLEOUPD2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/css-prop-runtime.ts"],"names":[],"mappings":";;;AAKO,SAAS,OAAA,CAAQ,KAAoB,UAAA,EAAmC;AAC7E,EAAA,OAAO,gBAAA,CAAiB,GAAG,CAAA,CAAE,UAAU,CAAA;AACzC","file":"chunk-TLEOUPD2.js","sourcesContent":["import type { CSSProperties } from 'typestyles';\nimport type { CssStylesHost } from './resolve-hash-class';\nimport { resolveHashClass } from './resolve-hash-class';\n\n/** Runtime helper used by the Babel plugin for static `css` props. */\nexport function cssProp(api: CssStylesHost, properties: CSSProperties): string {\n return resolveHashClass(api)(properties);\n}\n"]}
|
package/dist/types-_vEO6H8X.d.ts
DELETED