@codeandmoney/soelma 0.0.0-dev.1 → 0.0.0-dev.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/context.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DefaultTheme } from "./DefaultTheme";
3
2
  export declare const themeContext: import("react").Context<DefaultTheme | null>;
4
3
  export declare const ThemeProvider: import("react").Provider<DefaultTheme | null>, ThemeConsumer: import("react").Consumer<DefaultTheme | null>;
@@ -2,7 +2,7 @@ import { ScaledSize } from "react-native";
2
2
  export declare const createDimensionQueryHelper: <Value>(queryFunction: (options: {
3
3
  value: Value;
4
4
  dimensions: ScaledSize;
5
- }) => boolean) => <T>(value: Value, styles: T) => T | null;
5
+ }) => boolean) => <T>(value: Value, styles: T) => null | T;
6
6
  export declare const maxHeight: <T>(value: number, styles: T) => T | null;
7
7
  export declare const maxWidth: <T>(value: number, styles: T) => T | null;
8
8
  export declare const minHeight: <T>(value: number, styles: T) => T | null;
@@ -11,8 +11,8 @@ interface BreakpointsMatcher<TBreakpoints> {
11
11
  export declare function createBreakpointsMatcher<TBreakpoints extends Record<string, number>>(breakpoints: TBreakpoints, matchFunction?: <T>(value: number, styles: T) => T | null): BreakpointsMatcher<TBreakpoints>;
12
12
  export declare function createBreakpoints<TBreakpoints extends Record<string, number>>(breakpoints: TBreakpoints): {
13
13
  up: <T>(key: keyof TBreakpoints, value: T) => T | null;
14
- down: <T_1>(key: keyof TBreakpoints, value: T_1) => T_1 | null;
15
- only: <T_2>(key: keyof TBreakpoints, value: T_2) => T_2 | null;
16
- between: <T_3>(start: keyof TBreakpoints, end: keyof TBreakpoints, value: T_3) => T_3 | null;
14
+ down: <T>(key: keyof TBreakpoints, value: T) => T | null;
15
+ only: <T>(key: keyof TBreakpoints, value: T) => T | null;
16
+ between: <T>(start: keyof TBreakpoints, end: keyof TBreakpoints, value: T) => T | null;
17
17
  };
18
18
  export {};
@@ -15,7 +15,7 @@ const toOrderedBreakpointNames = (values, breakpoints, matchFunction) => {
15
15
  export function createBreakpointsMatcher(breakpoints, matchFunction = minWidth) {
16
16
  return function breakpointsMatcher(values) {
17
17
  /* istanbul ignore next */
18
- // @ts-expect-error: was removed
18
+ // @ts-expect-error
19
19
  if (process.env.NODE_ENV !== "production") {
20
20
  const invalidKeys = Object.keys(values).filter((key) => {
21
21
  return key !== "default" && breakpoints[key] === undefined;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.0.0-dev.1",
6
+ "version": "0.0.0-dev.2",
7
7
  "private": false,
8
8
  "main": "index.js",
9
9
  "types": "index.d.ts",
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { SafeAreaViewProps } from "./types";
3
- export declare function SafeAreaProvider(props: SafeAreaViewProps): JSX.Element | null;
3
+ export declare function SafeAreaProvider(props: SafeAreaViewProps): React.JSX.Element | null;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare function StylexSaveAreaConsumer(): JSX.Element | null;
1
+ import type React from "react";
2
+ export declare function StylexSaveAreaConsumer(): React.JSX.Element | null;
package/withStyles.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import React from "react";
1
+ import React, { ComponentType } from "react";
2
2
  interface InjectedStyledProps<Styles> {
3
3
  styles: Styles;
4
4
  }
5
5
  export type InferInjectedStyledProps<Fn extends (...args: any) => any> = InjectedStyledProps<ReturnType<Fn>>;
6
- export declare function withStyles<Styles>(useStyles: () => Styles): <TComponent extends React.ComponentType<any>>(Component: TComponent) => React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<React.ComponentProps<TComponent>, "styles">> & React.RefAttributes<React.ElementRef<TComponent>>>;
6
+ export declare function withStyles<Styles>(useStyles: () => Styles): <TComponent extends ComponentType<any>>(Component: TComponent) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.ComponentProps<TComponent>> & React.RefAttributes<React.ComponentRef<TComponent>>>;
7
7
  export {};
package/withStyles.js CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
1
  import React, { forwardRef, } from "react";
3
2
  export function withStyles(useStyles) {
4
3
  function WithStyles(Component) {
@@ -7,6 +6,7 @@ export function withStyles(useStyles) {
7
6
  // @ts-expect-error: 'ref' as never
8
7
  return <Component {...props} ref={ref} styles={styles}/>;
9
8
  };
9
+ // @ts-expect-error
10
10
  return forwardRef(renderComponent);
11
11
  }
12
12
  return WithStyles;