@saunos/restyle-components 0.0.1 → 0.2.0
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/Test.d.d.ts +3 -0
- package/dist/Test.d.js +7 -0
- package/dist/Test.d.ts +3 -0
- package/dist/Test.js +7 -0
- package/dist/jsx-runtime.d.ts +3 -3
- package/dist/jsx-runtime.js +2 -1
- package/dist/types.d.ts +16 -10
- package/package.json +7 -5
package/dist/Test.d.d.ts
ADDED
package/dist/Test.d.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "../jsx-runtime";
|
|
2
|
+
const Test = ({ className }) => {
|
|
3
|
+
return (_jsx("div", { className: className, css: { backgroundColor: 'red' }, children: "Test" }));
|
|
4
|
+
};
|
|
5
|
+
export default () => {
|
|
6
|
+
return _jsx(Test, { css: { backgroundColor: 'red' } });
|
|
7
|
+
};
|
package/dist/Test.d.ts
ADDED
package/dist/Test.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "../jsx-runtime";
|
|
2
|
+
const Test = ({ className }) => {
|
|
3
|
+
return (_jsx("div", { className: className, css: { backgroundColor: 'red' }, children: "Test" }));
|
|
4
|
+
};
|
|
5
|
+
export default () => {
|
|
6
|
+
return _jsx(Test, { css: { backgroundColor: 'red' } });
|
|
7
|
+
};
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type { RestyleComponentsJSX as JSX } from './types';
|
|
3
3
|
export declare const Fragment: React.ExoticComponent<{
|
|
4
4
|
children?: React.ReactNode | undefined;
|
|
5
5
|
}>;
|
|
6
|
-
export declare function jsx(type: React.ElementType, props: Record<string, any>, key: string): React.ReactElement<
|
|
7
|
-
export declare function jsxs(type: any, props: Record<string, any>, key: string): React.ReactElement<
|
|
6
|
+
export declare function jsx(type: React.ElementType, props: Record<string, any>, key: string): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
7
|
+
export declare function jsxs(type: any, props: Record<string, any>, key: string): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -3,7 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import ReactJSXRuntime from 'react/jsx-runtime';
|
|
4
4
|
import { createRestyleProps } from './create-restyle-props';
|
|
5
5
|
import { ForwardRefWrapper } from './forward-ref-wrapper';
|
|
6
|
-
export * from './types';
|
|
6
|
+
// export * from './types';
|
|
7
|
+
// import './types';
|
|
7
8
|
export const Fragment = ReactJSXRuntime.Fragment;
|
|
8
9
|
export function jsx(type, props, key) {
|
|
9
10
|
if (props.css) {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { CSSObject } from 'restyle';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare namespace RestyleComponentsJSX {
|
|
4
|
+
type Element = React.JSX.Element;
|
|
5
|
+
type ElementType = React.JSX.ElementType;
|
|
6
|
+
type ElementClass = React.JSX.ElementClass;
|
|
7
|
+
type ElementAttributesProperty = React.JSX.ElementAttributesProperty;
|
|
8
|
+
type ElementChildrenAttribute = React.JSX.ElementChildrenAttribute;
|
|
9
|
+
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
|
10
|
+
type IntrinsicAttributes = React.JSX.IntrinsicAttributes & {
|
|
11
|
+
css?: CSSObject;
|
|
12
|
+
};
|
|
13
|
+
type IntrinsicClassAttributes<T> = React.JSX.IntrinsicClassAttributes<T>;
|
|
14
|
+
type IntrinsicElements = {
|
|
15
|
+
[K in keyof React.JSX.IntrinsicElements]: React.JSX.IntrinsicElements[K] & {
|
|
5
16
|
css?: CSSObject;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
namespace React {
|
|
9
|
-
interface Attributes {
|
|
10
|
-
css?: CSSObject;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
17
|
+
};
|
|
18
|
+
};
|
|
13
19
|
}
|
|
14
20
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saunos/restyle-components",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "JSX source transformation for Restyle and React components",
|
|
6
6
|
"scripts": {
|
|
@@ -41,11 +41,13 @@
|
|
|
41
41
|
"node": ">=18"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/react": "^
|
|
45
|
-
"typescript": "^5.
|
|
44
|
+
"@types/react": "^19.0.1",
|
|
45
|
+
"typescript": "^5.7.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"react": "^18.3.1"
|
|
49
|
-
|
|
48
|
+
"react": "^18.3.1 || >=19.0.0"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"restyle": "^3.0.0"
|
|
50
52
|
}
|
|
51
53
|
}
|