creactive 0.0.134 → 0.0.135

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.
@@ -0,0 +1,9 @@
1
+ import { DimensionUnit } from './constants';
2
+ import type { DimensionValue } from './dimension.types';
3
+ export declare class Dimension {
4
+ static readonly Unit: typeof DimensionUnit;
5
+ private readonly unit;
6
+ private readonly value;
7
+ constructor(value: number, unit: DimensionUnit);
8
+ toValue(): DimensionValue;
9
+ }
@@ -0,0 +1 @@
1
+ export type DimensionValue = number | `${number}%`;
@@ -0,0 +1,2 @@
1
+ export { Dimension } from './dimension';
2
+ export type { DimensionValue } from './dimension.types';
@@ -1,5 +1,6 @@
1
+ import type { FractionValue } from './fraction.types';
1
2
  export declare class Fraction {
2
3
  private readonly value;
3
4
  constructor(value: number);
4
- toValue(): number;
5
+ toValue(): FractionValue;
5
6
  }
@@ -0,0 +1 @@
1
+ export type FractionValue = number;
@@ -1 +1,2 @@
1
1
  export { Fraction } from './fraction';
2
+ export type { FractionValue } from './fraction.types';
@@ -1,7 +1,6 @@
1
- export { Fraction } from '../helpers/fraction';
2
- export { Position } from '../helpers/position';
3
- export type { PositionValue } from '../helpers/position';
4
- export { Size } from '../helpers/size';
5
- export type { SizeValue } from '../helpers/size';
6
1
  export { renderReactNativeInitialStyle } from '../helpers/style';
7
2
  export type { RenderReactNativeInitialStyleHelper } from '../helpers/style';
3
+ export { Dimension } from './dimension';
4
+ export type { DimensionValue } from './dimension';
5
+ export { Fraction } from './fraction';
6
+ export type { FractionValue } from './fraction';
package/build/index.d.ts CHANGED
@@ -4,7 +4,6 @@ export { Overlay } from './components/overlay';
4
4
  export type { OverlayComponent, OverlayProps } from './components/overlay';
5
5
  export { View } from './components/view';
6
6
  export type { ViewComponent, ViewLayoutEvent, ViewProps, } from './components/view';
7
- export { Dimension } from './constants/dimension';
8
7
  export { FRACTION_MAX, FRACTION_MIN } from './constants/fraction';
9
8
  export { POSITION_MAX, POSITION_MIN } from './constants/position';
10
9
  export { SIZE_FULL } from './constants/size';
@@ -12,11 +11,9 @@ export { Media, MediaContextProvider, useMediaContext } from './contexts/media';
12
11
  export type { MediaComponent, MediaContextProviderComponent, MediaContextValue, MediaProps, } from './contexts/media';
13
12
  export { ThemeContextProvider, useThemeContext, useThemeStyleSheet, } from './contexts/theme';
14
13
  export type { ThemeContextProviderComponent, ThemeContextProviderProps, ThemeContextValue, } from './contexts/theme';
14
+ export { Dimension } from './helpers/dimension';
15
+ export type { DimensionValue } from './helpers/dimension';
15
16
  export { Fraction } from './helpers/fraction';
16
- export { Position } from './helpers/position';
17
- export type { PositionValue } from './helpers/position';
18
- export { Size } from './helpers/size';
19
- export type { SizeValue } from './helpers/size';
20
17
  export type { Color, FontWeight } from './types';
21
18
  export { Text } from './components';
22
- export type { TextComponent, TextProperties, TextReference } from './components';
19
+ export type { TextComponent, TextMeasureCallback, TextProperties, TextReference, } from './components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creactive",
3
- "version": "0.0.134",
3
+ "version": "0.0.135",
4
4
  "main": "build/default.js",
5
5
  "files": [
6
6
  "build/**"
@@ -36,6 +36,7 @@
36
36
  "@babel/preset-env": "^7.26.9",
37
37
  "@babel/preset-react": "^7.26.3",
38
38
  "@babel/preset-typescript": "^7.27.0",
39
+ "@emotion/jest": "^11.13.0",
39
40
  "@emotion/styled": "^11.14.0",
40
41
  "@expo/ngrok": "^4.1.3",
41
42
  "@faker-js/faker": "^9.2.0",
@@ -55,6 +56,7 @@
55
56
  "@typescript-eslint/parser": "^8.15.0",
56
57
  "babel-loader": "^8.4.1",
57
58
  "eslint-config-expo": "^8.0.1",
59
+ "eslint-import-resolver-typescript": "^4.4.4",
58
60
  "eslint-plugin-jest": "^28.9.0",
59
61
  "eslint-plugin-prettier": "^5.5.3",
60
62
  "expo": "^52.0.36",
@@ -1,8 +0,0 @@
1
- /**
2
- * Global dimension enumerated constants.
3
- * Can be used by multiple helpers and components.
4
- */
5
- export declare enum Dimension {
6
- PIXEL = 0,
7
- PERCENT = 1
8
- }
@@ -1,2 +0,0 @@
1
- export { Position } from './position';
2
- export type { PositionValue } from './position.types';
@@ -1,15 +0,0 @@
1
- import { Dimension } from '../../constants/dimension';
2
- import type { PositionValue } from './position.types';
3
- /**
4
- * Don't want to accept non-themed literal position values inside component.
5
- * This class may help to avoid magic numbers and strings when positioning.
6
- * Components are supposed to accept this class instances for positioning.
7
- * This may force us to create optimized and named global position constants.
8
- */
9
- export declare class Position {
10
- static readonly Dimension: typeof Dimension;
11
- private readonly amount;
12
- private readonly dimension;
13
- constructor(amount: number, dimension?: Dimension);
14
- toValue(): PositionValue;
15
- }
@@ -1 +0,0 @@
1
- export type PositionValue = number | `${number}px` | `${number}%`;
@@ -1,2 +0,0 @@
1
- export { Size } from './size';
2
- export type { SizeValue } from './size.types';
@@ -1,15 +0,0 @@
1
- import { Dimension } from '../../constants/dimension';
2
- import type { SizeValue } from './size.types';
3
- /**
4
- * Don't want to accept non-themed literal size values inside component.
5
- * This helper is an attempt to avoid magic numbers and strings when sizing.
6
- * Components are supposed to accept this class instances for sizing.
7
- * This may force us to create optimized and named global size constants.
8
- */
9
- export declare class Size {
10
- static readonly Dimension: typeof Dimension;
11
- private readonly amount;
12
- private readonly dimension;
13
- constructor(amount: number, dimension?: Dimension);
14
- toValue(): SizeValue;
15
- }
@@ -1 +0,0 @@
1
- export type SizeValue = number | `${number}px` | `${number}%`;