@preply/ds-rn-core
Advanced tools
Comparing version 0.17.1 to 0.18.0
@@ -1,2 +0,3 @@ | ||
import type { ThemeName, ThemeTokenMap, Token, TokenValue } from '@preply/ds-core'; | ||
import type { ThemeName } from '@preply/ds-core'; | ||
import type { ThemeTokenMap, Token, TokenValue } from '@preply/ds-core-types'; | ||
import { ColorSchemeInterface } from '../../color-scheme'; | ||
@@ -3,0 +4,0 @@ import type { ThemeInterface } from '../types'; |
@@ -1,2 +0,2 @@ | ||
import { TOKEN_ID_FIELD, TOKEN_COLOR_SCHEME_AWARE_FIELD } from '@preply/ds-core'; | ||
import { TOKEN_ID_FIELD, TOKEN_COLOR_SCHEME_AWARE_FIELD } from '@preply/ds-core-types'; | ||
@@ -47,2 +47,2 @@ class Theme { | ||
export { Theme }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGhlbWUuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90aGVtZS9jbGFzc2VzL1RoZW1lLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVGhlbWVOYW1lLCBUaGVtZVRva2VuTWFwLCBUb2tlbiwgVG9rZW5WYWx1ZSB9IGZyb20gJ0BwcmVwbHkvZHMtY29yZSc7XG5pbXBvcnQgeyBUT0tFTl9DT0xPUl9TQ0hFTUVfQVdBUkVfRklFTEQsIFRPS0VOX0lEX0ZJRUxEIH0gZnJvbSAnQHByZXBseS9kcy1jb3JlJztcblxuaW1wb3J0IHsgQ29sb3JTY2hlbWVJbnRlcmZhY2UgfSBmcm9tICcuLi8uLi9jb2xvci1zY2hlbWUnO1xuaW1wb3J0IHR5cGUgeyBUaGVtZUludGVyZmFjZSB9IGZyb20gJy4uL3R5cGVzJztcblxuZXhwb3J0IGNsYXNzIFRoZW1lIGltcGxlbWVudHMgVGhlbWVJbnRlcmZhY2Uge1xuICAgIHByaXZhdGUgdG9rZW5zPzogVGhlbWVUb2t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BDLEtBQW9CLENBQUM7UUFFNUIsSUFBSSxPQUFPLEtBQUssS0FBSyxXQUFXLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRTtZQUM3QyxPQUFPLElBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQyxFQUFFLFdBQVcsQ0FBQyxDQUFDO1NBQzlDO1FBRUQsT0FBTyxLQUFLLENBQUM7S0FDaEI7Ozs7OyJ9 |
@@ -1,2 +0,3 @@ | ||
import { ThemeName, Token, TokenValue } from '@preply/ds-core'; | ||
import { ThemeName } from '@preply/ds-core'; | ||
import { Token, TokenValue } from '@preply/ds-core-types'; | ||
import { ColorSchemeInterface } from '../color-scheme'; | ||
@@ -3,0 +4,0 @@ export interface ThemeInterface { |
@@ -1,2 +0,2 @@ | ||
import type { Token, TokenValue } from '@preply/ds-core'; | ||
import type { Token, TokenValue } from '@preply/ds-core-types'; | ||
export declare function useToken<T extends TokenValue>(token: Token): T; |
@@ -15,2 +15,2 @@ import { getToken } from '../private/getToken.js'; | ||
export { useToken }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlVG9rZW4uanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90b2tlbi9ob29rcy91c2VUb2tlbi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFRva2VuLCBUb2tlblZhbHVlIH0gZnJvbSAnQHByZXBseS9kcy1jb3JlJztcblxuaW1wb3J0IHsgdXNlQ29sb3JTY2hlbWUgfSBmcm9tICcuLi8uLi9jb2xvci1zY2hlbWUnO1xuaW1wb3J0IHsgdXNlVGhlbWUgfSBmcm9tICcuLi8uLi90aGVtZSc7XG5pbXBvcnQgeyBnZXRUb2tlbiB9IGZyb20gJy4uL3ByaXZhdGUvZ2V0VG9rZW4nO1xuXG5leHBvcnQgZnVuY3Rpb24gdXNlVG9rZW48VCBleHRlbmRzIFRva2VuVmFsdWU+KHRva2Vu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0IHsgdXNlVGhlbWUgfSBmcm9tICcuLi8uLi90aGVtZSc7XG5pbXBvcnQgeyBnZXRUb2tlbiB9IGZyb20gJy4uL3ByaXZhdGUvZ2V0VG9rZW4nO1xuXG5leHBvcnQgZnVuY3Rpb24gdXNlVG9rZW48VCBleHRlbmRzIFRva2VuVmFsdWU+KHRva2VuOiBUb2tlbik6IFQge1xuICAgIGNvbnN0IHsgdGhlbWUgfSA9IHVzZVRoZW1lKCk7XG4gICAgY29uc3QgeyBjb2xvclNjaGVtZSB9ID0gdXNlQ29sb3JTY2hlbWUoKTtcblxuICAgIGlmICghdGhlbWUpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1c2VUb2tlbigpIG11c3QgYmUgdXNlZCB3aXRoaW4gYSBUaGVtZVByb3ZpZGVyJyk7XG4gICAgfVxuXG4gICAgcmV0dXJuIGdldFRva2VuKHRva2VuLCB0aGVtZSwgY29sb3JTY2hlbWUpIGFzIFQ7XG59XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztTQU1nQixRQUFRLENBQXVCLEtBQVk7SUFDdkQsTUFBTSxFQUFFLEtBQUssRUFBRSxHQUFHLFFBQVEsRUFBRSxDQUFDO0lBQzdCLE1BQU0sRUFBRSxXQUFXLEVBQUUsR0FBRyxjQUFjLEVBQUUsQ0FBQztJQUV6QyxJQUFJLENBQUMsS0FBSyxFQUFFO1FBQ1IsTUFBTSxJQUFJLEtBQUssQ0FBQyxnREFBZ0QsQ0FBQyxDQUFDO0tBQ3JFO0lBRUQsT0FBTyxRQUFRLENBQUMsS0FBSyxFQUFFLEtBQUssRUFBRSxXQUFXLENBQU0sQ0FBQztBQUNwRDs7OzsifQ== |
@@ -1,4 +0,5 @@ | ||
import { GetToken, Token, TokenValue } from '@preply/ds-core'; | ||
import { GetToken } from '@preply/ds-core'; | ||
import { Token, TokenValue } from '@preply/ds-core-types'; | ||
import { ColorSchemeInterface, ThemeInterface } from '../..'; | ||
export declare const getToken: (token: Token, theme: ThemeInterface, colorScheme: ColorSchemeInterface) => TokenValue; | ||
export declare const createGetToken: (theme: ThemeInterface, colorScheme: ColorSchemeInterface) => GetToken; |
@@ -1,2 +0,3 @@ | ||
import { isToken, TOKEN_ID_FIELD } from '@preply/ds-core'; | ||
import { isToken } from '@preply/ds-core'; | ||
import { TOKEN_ID_FIELD } from '@preply/ds-core-types'; | ||
@@ -23,2 +24,2 @@ const ERROR_MESSAGE = 'Please check the last call of useToken() or getToken(). Are you using indexes? Example: "tokens.action.size[size]". Make sure it resolves to a token.'; | ||
export { createGetToken, getToken }; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VG9rZW4uanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90b2tlbi9wcml2YXRlL2dldFRva2VuLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEdldFRva2VuLCBUT0tFTl9JRF9GSUVMRCwgVG9rZW4sIFRva2VuVmFsdWUsIGlzVG9rZW4gfSBmcm9tICdAcHJlcGx5L2RzLWNvcmUnO1xuXG5pbXBvcnQgeyBDb2xvclNjaGVtZUludGVyZmFjZSwgVGhlbWVJbnRlcmZhY2UgfSBmcm9tICcuLi8uLic7XG5cbmNvbnN0IEVSUk9SX01FU1NBR0UgPVxuICAgICdQbGVhc2UgY2hlY2sgdGhlIGxhc3QgY2FsbCBvZiB1c2VUb2tlbigpIG9yIGdldFRva2VuKCkuIEFyZSB5b3UgdXNpbmcgaW5kZXhlcz8gRXhhbXBsZTogXCJ0b2tlbnMuYWN0aW9uLnNpemVbc2l6ZV1cIi4gTWFrZSBzdXJlIGl0IHJlc29sdmVzIHRvIGEgdG9rZW4uJztcblxuZXhwb3J0IGNvbnN0IGdldFRva2VuID0gKFxuICAgIHRva2VuOiBUb2tlbixcbiAgICB0aGVtZTogVGhlbWVJbnRlcmZhY2UsXG4gICAgY29sb3JTY2hlbWU6IENvbG9y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0FBQyxDQUFDO0FBQ2pFOzs7OyJ9 |
{ | ||
"name": "@preply/ds-rn-core", | ||
"version": "0.17.1", | ||
"version": "0.18.0", | ||
"publishConfig": { | ||
@@ -21,10 +21,12 @@ "access": "public" | ||
"dependencies": { | ||
"@preply/ds-core": "0.17.1" | ||
"@preply/ds-core": "0.18.0", | ||
"@preply/ds-core-types": "0.18.0" | ||
}, | ||
"peerDependencies": { | ||
"@preply/ds-core": "0.17.1", | ||
"@preply/ds-core": "0.18.0", | ||
"@preply/ds-core-types": "0.18.0", | ||
"react": "^16.8.3", | ||
"react-dom": "^16.8.3" | ||
}, | ||
"gitHead": "82db2b157dadae387f8023473cb5f7f12afde569" | ||
"gitHead": "34c20b9a5af334de00047237a481821443bbf3bc" | ||
} |
# `@preply/ds-rn-core` | ||
> React Native support and context providers for themes, color schemes and tokens. | ||
> React Native support and providers (React). | ||
@@ -5,0 +5,0 @@ ## Using the Design System in your application or library? |
40786
426
6
+ Added@preply/ds-core-types@0.18.0
+ Added@preply/ds-core@0.18.0(transitive)
+ Added@preply/ds-core-types@0.18.0(transitive)
- Removed@preply/ds-core@0.17.1(transitive)
Updated@preply/ds-core@0.18.0