@saunos/restyle-components 0.1.0 → 0.3.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.
@@ -1,6 +1,4 @@
1
1
  import * as React from 'react';
2
- export declare const Fragment: React.ExoticComponent<{
3
- children?: React.ReactNode | undefined;
4
- }>;
2
+ export declare const Fragment: React.ExoticComponent<React.FragmentProps>;
5
3
  /** Create a JSX element that accepts a `css` prop to generate atomic class names. */
6
4
  export declare function jsxDEV(type: React.ElementType, props: Record<string, any>, key: string, isStaticChildren: boolean, source: any, self: any): React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import ReactJSXRuntimeDev from 'react/jsx-dev-runtime';
2
- import { createRestyleProps } from './create-restyle-props';
3
- import { ForwardRefWrapper } from './forward-ref-wrapper';
2
+ import { createRestyleProps } from "./create-restyle-props.js";
3
+ import { ForwardRefWrapper } from "./forward-ref-wrapper.js";
4
4
  export const Fragment = ReactJSXRuntimeDev.Fragment;
5
5
  /** Create a JSX element that accepts a `css` prop to generate atomic class names. */
6
6
  export function jsxDEV(type, props, key, isStaticChildren, source, self) {
@@ -1,7 +1,5 @@
1
1
  import * as React from 'react';
2
- export * from './types';
3
- export declare const Fragment: React.ExoticComponent<{
4
- children?: React.ReactNode | undefined;
5
- }>;
6
- export declare function jsx(type: React.ElementType, props: Record<string, any>, key: string): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
7
- export declare function jsxs(type: any, props: Record<string, any>, key: string): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
2
+ export type { RestyleComponentsJSX as JSX } from './types.ts';
3
+ export declare const Fragment: React.ExoticComponent<React.FragmentProps>;
4
+ export declare function jsx(type: React.ElementType, props: Record<string, any>, key: string): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
5
+ export declare function jsxs(type: any, props: Record<string, any>, key: string): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
@@ -1,9 +1,8 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import * as React from 'react';
3
3
  import ReactJSXRuntime from 'react/jsx-runtime';
4
- import { createRestyleProps } from './create-restyle-props';
5
- import { ForwardRefWrapper } from './forward-ref-wrapper';
6
- export * from './types';
4
+ import { createRestyleProps } from "./create-restyle-props.js";
5
+ import { ForwardRefWrapper } from "./forward-ref-wrapper.js";
7
6
  export const Fragment = ReactJSXRuntime.Fragment;
8
7
  export function jsx(type, props, key) {
9
8
  if (props.css) {
package/dist/types.d.ts CHANGED
@@ -1,14 +1,20 @@
1
1
  import { CSSObject } from 'restyle';
2
- declare global {
3
- namespace JSX {
4
- interface IntrinsicAttributes {
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,10 +1,16 @@
1
1
  {
2
2
  "name": "@saunos/restyle-components",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "JSX source transformation for Restyle and React components",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/saunos/restyle-components.git"
9
+ },
6
10
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
11
+ "build": "tsc && node scripts/add-extensions.js",
12
+ "test": "echo \"Error: no test specified\" && exit 1",
13
+ "typecheck": "tsc --noEmit"
8
14
  },
9
15
  "module": "dist/index.js",
10
16
  "types": "dist/index.d.ts",
@@ -33,19 +39,27 @@
33
39
  "jsx-runtime",
34
40
  "jsx-dev-runtime"
35
41
  ],
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
36
45
  "sideEffects": false,
37
46
  "keywords": [],
38
47
  "author": "",
39
- "license": "ISC",
48
+ "license": "MIT",
40
49
  "engines": {
41
50
  "node": ">=18"
42
51
  },
43
52
  "devDependencies": {
44
- "@types/react": "^18.3.11",
45
- "typescript": "^5.6.2"
53
+ "@types/node": "^24.5.2",
54
+ "@types/react": "^19.1.13",
55
+ "tsx": "^4.20.5",
56
+ "typescript": "^5.9.2",
57
+ "typescript-transform-paths": "^3.5.5"
46
58
  },
47
59
  "peerDependencies": {
48
- "react": "^18.3.1",
49
- "restyle": "^2.4.0"
60
+ "react": "^18.3.1 || >=19.0.0"
61
+ },
62
+ "dependencies": {
63
+ "restyle": "^3.4.2"
50
64
  }
51
65
  }