diff --git a/.eslintrc.js b/.eslintrc.js index 068c15c..e1478a8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -45,6 +45,7 @@ module.exports = { 'jsdoc/require-param': 'off', 'jsdoc/require-returns-type': 'off', 'jsdoc/require-jsdoc': 'off', + 'jsdoc/check-tag-names': ['warn', { definedTags: ['pattern'] }], 'jest/expect-expect': ['warn', { assertFunctionNames: ['expect', 'expectObservable'] }], 'import/order': [ 'error', diff --git a/package.json b/package.json index 5ed9aa9..67a30a2 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\" \"storybook/**/*.{ts,tsx}\"", "clean": "rm -rf dist/ && rm -rf web-build/", - "build": "tsc --p tsconfig.build.json && tsc", + "build": "yarn build:schemas && tsc --p tsconfig.build.json && tsc", + "build:schemas": "typescript-json-schema --required tsconfig.json ThemeJson -o src/theme/__GENERATED__/theme-schema.json --noExtraProps && yarn prettier src/theme/__GENERATED__/theme-schema.json --write && ajv -s src/theme/__GENERATED__/theme-schema.json -d \"src/theme/*.json\"", "build-storybook": "yarn build && build-storybook -c storybook/web -o web-build", "test": "jest", "start": "start-storybook -c storybook/web -p 9009 -s public", @@ -65,6 +66,7 @@ "@types/react-test-renderer": "^16.9.2", "@typescript-eslint/eslint-plugin": "^3.3.0", "@typescript-eslint/parser": "^3.3.0", + "ajv-cli": "^3.2.1", "babel-loader": "^8.1.0", "chromatic": "^4.0.3", "eslint": "^7.1.0", @@ -88,6 +90,7 @@ "react-test-renderer": "16.9.0", "ts-jest": "^25.5.1", "typescript": "^3.9.2", + "typescript-json-schema": "^0.42.0", "webpack": "^4.43.0" }, "license": "MIT", diff --git a/src/theme/__GENERATED__/theme-schema.json b/src/theme/__GENERATED__/theme-schema.json new file mode 100644 index 0000000..139bae0 --- /dev/null +++ b/src/theme/__GENERATED__/theme-schema.json @@ -0,0 +1,536 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "definitions": { + "ComplexColor": { + "additionalProperties": false, + "description": "Represents a complex color that has a base, light and dark value.", + "properties": { + "darker": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "default": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "lighter": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + } + }, + "required": ["darker", "default", "lighter"], + "type": "object" + }, + "Easing": { + "enum": ["ease-in", "ease-in-out", "ease-out"], + "type": "string" + }, + "FontSize": { + "additionalProperties": false, + "properties": { + "height": { + "type": "number" + }, + "size": { + "type": "number" + } + }, + "required": ["height", "size"], + "type": "object" + }, + "FontWeight": { + "description": "Type for a font-weight.", + "enum": ["100", "200", "300", "400", "500", "600", "700", "800", "900", "bold", "normal"], + "type": "string" + } + }, + "description": "Structure of a Theme.", + "properties": { + "$schema": { + "type": "string" + }, + "animation": { + "additionalProperties": false, + "properties": { + "duration": { + "additionalProperties": false, + "properties": { + "default": { + "type": "number" + }, + "longer": { + "type": "number" + }, + "shorter": { + "type": "number" + } + }, + "required": ["default", "longer", "shorter"], + "type": "object" + }, + "easing": { + "additionalProperties": false, + "properties": { + "enter": { + "$ref": "#/definitions/Easing" + }, + "exit": { + "$ref": "#/definitions/Easing" + }, + "move": { + "$ref": "#/definitions/Easing" + } + }, + "required": ["enter", "exit", "move"], + "type": "object" + } + }, + "required": ["duration", "easing"], + "type": "object" + }, + "border": { + "additionalProperties": false, + "properties": { + "none": { + "type": "number" + }, + "small": { + "type": "number" + }, + "thinner": { + "type": "number" + } + }, + "required": ["none", "small", "thinner"], + "type": "object" + }, + "colors": { + "additionalProperties": false, + "properties": { + "destructive": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "fill": { + "additionalProperties": false, + "properties": { + "accent": { + "$ref": "#/definitions/ComplexColor" + }, + "accentSecondary": { + "$ref": "#/definitions/ComplexColor" + }, + "background": { + "additionalProperties": false, + "properties": { + "darker": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "default": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "inverse": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "lighter": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + } + }, + "required": ["darker", "default", "inverse", "lighter"], + "type": "object" + }, + "divider": { + "$ref": "#/definitions/ComplexColor" + }, + "primary": { + "$ref": "#/definitions/ComplexColor" + } + }, + "required": ["accent", "accentSecondary", "background", "divider", "primary"], + "type": "object" + }, + "negative": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "positive": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "status": { + "additionalProperties": false, + "properties": { + "error": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "success": { + "$ref": "#/definitions/ComplexColor" + }, + "warning": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + } + }, + "required": ["error", "success", "warning"], + "type": "object" + }, + "text": { + "additionalProperties": false, + "properties": { + "accent": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "inverse": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "primary": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + }, + "subdued": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + } + }, + "required": ["accent", "inverse", "primary", "subdued"], + "type": "object" + }, + "transparent": { + "description": "Type for a color. Used for readability purpose.", + "pattern": "^(#[A-Fa-f0-9]{6}|transparent|rgba\\((\\d+(\\.\\d+)?,){3}(\\d+(\\.\\d+)?)\\))$", + "type": "string" + } + }, + "required": ["destructive", "fill", "negative", "positive", "status", "text", "transparent"], + "type": "object" + }, + "elevation": { + "additionalProperties": false, + "properties": { + "z0": { + "additionalProperties": false, + "description": "Type representing an Elevation.", + "properties": { + "elevation": { + "description": "Sets the elevation of a view, using Android's underlying\n[elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation).\nThis adds a drop shadow to the item and affects z-order for overlapping views.\nOnly supported on Android 5.0+, has no effect on earlier versions.", + "type": "number" + }, + "shadowColor": { + "type": "string" + }, + "shadowOffset": { + "additionalProperties": false, + "properties": { + "height": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": ["height", "width"], + "type": "object" + }, + "shadowOpacity": { + "type": "number" + }, + "shadowRadius": { + "type": "number" + } + }, + "required": ["elevation"], + "type": "object" + }, + "z2": { + "additionalProperties": false, + "description": "Type representing an Elevation.", + "properties": { + "elevation": { + "description": "Sets the elevation of a view, using Android's underlying\n[elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation).\nThis adds a drop shadow to the item and affects z-order for overlapping views.\nOnly supported on Android 5.0+, has no effect on earlier versions.", + "type": "number" + }, + "shadowColor": { + "type": "string" + }, + "shadowOffset": { + "additionalProperties": false, + "properties": { + "height": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": ["height", "width"], + "type": "object" + }, + "shadowOpacity": { + "type": "number" + }, + "shadowRadius": { + "type": "number" + } + }, + "required": ["elevation"], + "type": "object" + }, + "z4": { + "additionalProperties": false, + "description": "Type representing an Elevation.", + "properties": { + "elevation": { + "description": "Sets the elevation of a view, using Android's underlying\n[elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation).\nThis adds a drop shadow to the item and affects z-order for overlapping views.\nOnly supported on Android 5.0+, has no effect on earlier versions.", + "type": "number" + }, + "shadowColor": { + "type": "string" + }, + "shadowOffset": { + "additionalProperties": false, + "properties": { + "height": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": ["height", "width"], + "type": "object" + }, + "shadowOpacity": { + "type": "number" + }, + "shadowRadius": { + "type": "number" + } + }, + "required": ["elevation"], + "type": "object" + }, + "z8": { + "additionalProperties": false, + "description": "Type representing an Elevation.", + "properties": { + "elevation": { + "description": "Sets the elevation of a view, using Android's underlying\n[elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation).\nThis adds a drop shadow to the item and affects z-order for overlapping views.\nOnly supported on Android 5.0+, has no effect on earlier versions.", + "type": "number" + }, + "shadowColor": { + "type": "string" + }, + "shadowOffset": { + "additionalProperties": false, + "properties": { + "height": { + "type": "number" + }, + "width": { + "type": "number" + } + }, + "required": ["height", "width"], + "type": "object" + }, + "shadowOpacity": { + "type": "number" + }, + "shadowRadius": { + "type": "number" + } + }, + "required": ["elevation"], + "type": "object" + } + }, + "required": ["z0", "z2", "z4", "z8"], + "type": "object" + }, + "font": { + "additionalProperties": false, + "properties": { + "family": { + "description": "Type for a font-family. Used for readability purpose.", + "type": "string" + }, + "size": { + "additionalProperties": false, + "properties": { + "large": { + "$ref": "#/definitions/FontSize" + }, + "regular": { + "$ref": "#/definitions/FontSize" + }, + "small": { + "$ref": "#/definitions/FontSize" + } + }, + "required": ["large", "regular", "small"], + "type": "object" + }, + "weights": { + "additionalProperties": false, + "properties": { + "regular": { + "$ref": "#/definitions/FontWeight" + }, + "strong": { + "$ref": "#/definitions/FontWeight" + } + }, + "required": ["regular", "strong"], + "type": "object" + } + }, + "required": ["family", "size", "weights"], + "type": "object" + }, + "opacity": { + "additionalProperties": false, + "properties": { + "disabled": { + "type": "number" + } + }, + "required": ["disabled"], + "type": "object" + }, + "radius": { + "additionalProperties": false, + "properties": { + "circle": { + "type": "number" + }, + "large": { + "type": "number" + }, + "medium": { + "type": "number" + }, + "none": { + "type": "number" + }, + "small": { + "type": "number" + } + }, + "required": ["circle", "large", "medium", "none", "small"], + "type": "object" + }, + "size": { + "additionalProperties": false, + "properties": { + "avatar": { + "additionalProperties": false, + "properties": { + "default": { + "type": "number" + }, + "small": { + "type": "number" + } + }, + "required": ["default", "small"], + "type": "object" + }, + "bullet": { + "type": "number" + }, + "divider": { + "type": "number" + }, + "icon": { + "additionalProperties": false, + "properties": { + "default": { + "type": "number" + }, + "large": { + "type": "number" + }, + "small": { + "type": "number" + }, + "xLarge": { + "type": "number" + } + }, + "required": ["default", "large", "small", "xLarge"], + "type": "object" + }, + "minTouchArea": { + "type": "number" + } + }, + "required": ["avatar", "bullet", "divider", "icon", "minTouchArea"], + "type": "object" + }, + "spacing": { + "additionalProperties": false, + "properties": { + "large": { + "type": "number" + }, + "medium": { + "type": "number" + }, + "none": { + "type": "number" + }, + "small": { + "type": "number" + }, + "xLarge": { + "type": "number" + }, + "xSmall": { + "type": "number" + }, + "xxLarge": { + "type": "number" + } + }, + "required": ["large", "medium", "none", "small", "xLarge", "xSmall", "xxLarge"], + "type": "object" + } + }, + "required": [ + "$schema", + "animation", + "border", + "colors", + "elevation", + "font", + "opacity", + "radius", + "size", + "spacing" + ], + "type": "object" +} diff --git a/src/theme/dark-theme.json b/src/theme/dark-theme.json new file mode 100644 index 0000000..486be39 --- /dev/null +++ b/src/theme/dark-theme.json @@ -0,0 +1,161 @@ +{ + "$schema": "./__GENERATED__/theme-schema.json", + "colors": { + "fill": { + "primary": { + "default": "#5B6275", + "lighter": "#FFFFFF", + "darker": "#FFFFFF" + }, + "accent": { + "default": "#EE5D71", + "lighter": "#FFFFFF", + "darker": "#FFFFFF" + }, + "accentSecondary": { + "default": "#F7B5A1", + "lighter": "#FFE6DE", + "darker": "#EA947A" + }, + "background": { + "default": "#383838", + "lighter": "#000000", + "darker": "#EDE9E4", + "inverse": "#FCF8F7" + }, + "divider": { + "default": "#282828", + "lighter": "#282828", + "darker": "#282828" + } + }, + "text": { + "primary": "#EEEEEE", + "accent": "#EE5D71", + "subdued": "#888888", + "inverse": "#383838" + }, + "transparent": "transparent", + "destructive": "#FF0000", + "positive": "#63A84C", + "negative": "#D32F2F", + "status": { + "success": { + "default": "#A5DBCA", + "lighter": "#D3E3DE", + "darker": "#6BBFA5" + }, + "warning": "#FAD1A2", + "error": "#FF0000" + } + }, + + "font": { + "family": "System", + "size": { + "large": { + "size": 24, + "height": 32 + }, + "regular": { + "size": 16, + "height": 24 + }, + "small": { + "size": 12, + "height": 16 + } + }, + "weights": { + "regular": "400", + "strong": "700" + } + }, + + "opacity": { + "disabled": 0.6 + }, + + "border": { + "thinner": 1, + "small": 2, + "none": 0 + }, + + "elevation": { + "z0": { + "shadowOpacity": 0, + "shadowRadius": 0, + "shadowColor": "#000", + "elevation": 0 + }, + "z2": { + "shadowOffset": { "width": 0, "height": 1 }, + "shadowOpacity": 0.2, + "shadowRadius": 1.5, + "shadowColor": "#000", + "elevation": 2 + }, + "z4": { + "shadowOffset": { "width": 0, "height": 2 }, + "shadowOpacity": 0.22, + "shadowRadius": 2.5, + "shadowColor": "#000", + "elevation": 4 + }, + "z8": { + "shadowOffset": { "width": 0, "height": 3 }, + "shadowOpacity": 0.22, + "shadowRadius": 4.5, + "shadowColor": "#000", + "elevation": 8 + } + }, + + "size": { + "minTouchArea": 48, + "icon": { + "default": 24, + "small": 16, + "large": 48, + "xLarge": 64 + }, + "avatar": { + "default": 40, + "small": 32 + }, + "divider": 1, + "bullet": 8 + }, + + "spacing": { + "xxLarge": 40, + "xLarge": 32, + "large": 24, + "medium": 16, + "small": 8, + "xSmall": 4, + "none": 0 + }, + + "radius": { + "circle": 9999, + "small": 2, + "medium": 4, + "large": 8, + "none": 0 + }, + + "animation": { + "duration": { + "default": 300, + "shorter": 150, + "longer": 400 + }, + "easing": { + "enter": "ease-out", + "exit": "ease-in", + "move": "ease-in-out" + } + } +} diff --git a/src/theme/light-theme.json b/src/theme/light-theme.json new file mode 100644 index 0000000..059afef --- /dev/null +++ b/src/theme/light-theme.json @@ -0,0 +1,161 @@ +{ + "$schema": "./__GENERATED__/theme-schema.json", + "colors": { + "fill": { + "primary": { + "default": "#5B6275", + "lighter": "#FFFFFF", + "darker": "#FFFFFF" + }, + "accent": { + "default": "#EE5D71", + "lighter": "#FFFFFF", + "darker": "#FFFFFF" + }, + "accentSecondary": { + "default": "#F7B5A1", + "lighter": "#FFE6DE", + "darker": "#EA947A" + }, + "background": { + "default": "#FCF8F7", + "lighter": "#FFFFFF", + "darker": "#EDE9E4", + "inverse": "#5B6275" + }, + "divider": { + "default": "rgba(0,0,0,0.10)", + "lighter": "rgba(0,0,0,0.05)", + "darker": "#303131" + } + }, + "text": { + "primary": "#454B59", + "accent": "#EE5D71", + "subdued": "#888888", + "inverse": "#FFFFFF" + }, + "transparent": "transparent", + "destructive": "#FF0000", + "positive": "#63A84C", + "negative": "#D32F2F", + "status": { + "success": { + "default": "#A5DBCA", + "lighter": "#D3E3DE", + "darker": "#6BBFA5" + }, + "warning": "#FAD1A2", + "error": "#FF0000" + } + }, + + "font": { + "family": "System", + "size": { + "large": { + "size": 24, + "height": 32 + }, + "regular": { + "size": 16, + "height": 24 + }, + "small": { + "size": 12, + "height": 16 + } + }, + "weights": { + "regular": "400", + "strong": "700" + } + }, + + "opacity": { + "disabled": 0.6 + }, + + "border": { + "thinner": 1, + "small": 2, + "none": 0 + }, + + "elevation": { + "z0": { + "shadowOpacity": 0, + "shadowRadius": 0, + "shadowColor": "#000", + "elevation": 0 + }, + "z2": { + "shadowOffset": { "width": 0, "height": 1 }, + "shadowOpacity": 0.2, + "shadowRadius": 1.5, + "shadowColor": "#000", + "elevation": 2 + }, + "z4": { + "shadowOffset": { "width": 0, "height": 2 }, + "shadowOpacity": 0.22, + "shadowRadius": 2.5, + "shadowColor": "#000", + "elevation": 4 + }, + "z8": { + "shadowOffset": { "width": 0, "height": 3 }, + "shadowOpacity": 0.22, + "shadowRadius": 4.5, + "shadowColor": "#000", + "elevation": 8 + } + }, + + "size": { + "minTouchArea": 48, + "icon": { + "default": 24, + "small": 16, + "large": 48, + "xLarge": 64 + }, + "avatar": { + "default": 40, + "small": 32 + }, + "divider": 1, + "bullet": 8 + }, + + "spacing": { + "xxLarge": 40, + "xLarge": 32, + "large": 24, + "medium": 16, + "small": 8, + "xSmall": 4, + "none": 0 + }, + + "radius": { + "circle": 9999, + "small": 2, + "medium": 4, + "large": 8, + "none": 0 + }, + + "animation": { + "duration": { + "default": 300, + "shorter": 150, + "longer": 400 + }, + "easing": { + "enter": "ease-out", + "exit": "ease-in", + "move": "ease-in-out" + } + } +} diff --git a/src/theme/theme-types.ts b/src/theme/theme-types.ts index 2e68d75..1dbeaec 100644 --- a/src/theme/theme-types.ts +++ b/src/theme/theme-types.ts @@ -3,13 +3,17 @@ import { TextStyle, ShadowStyleIOS, ViewStyle, EasingFunction } from 'react-nati /** * Type for a color. Used for readability purpose. + * + * @pattern ^(#[A-Fa-f0-9]{6}|transparent|rgba\((\d+(\.\d+)?,){3}(\d+(\.\d+)?)\))$ */ export type ColorHex = string /** * Type for a font-family. Used for readability purpose. */ -export type FontFamily = string | undefined +export type FontFamily = string + +export type Easing = 'ease-in' | 'ease-out' | 'ease-in-out' /** * Type for a font-weight. @@ -38,7 +42,9 @@ export interface ComplexColor { /** * Structure of a Theme. */ -export interface Theme { +export interface ThemeJson { + $schema: string + // COLORS colors: { fill: { @@ -148,13 +154,19 @@ export interface Theme { longer: number } easing: { - enter: EasingFunction - exit: EasingFunction - move: EasingFunction + enter: Easing + exit: Easing + move: Easing } } } +export type Theme = Omit & { + animation: Omit & { + easing: Record + } +} + /** * Typescript Utility type for providing an object where all properties (root and deep), are optional. */ diff --git a/src/theme/themes.ts b/src/theme/themes.ts index 7e01ca0..2ab7740 100644 --- a/src/theme/themes.ts +++ b/src/theme/themes.ts @@ -1,201 +1,32 @@ -import _ from 'lodash' -import { Easing } from 'react-native' -import { DeepPartial, Theme } from './theme-types' - -const lightTheme: Theme = { - // COLORS - colors: { - fill: { - primary: { - default: '#5B6275', - lighter: '#FFFFFF', - darker: '#FFFFFF', - }, - accent: { - default: '#EE5D71', - lighter: '#FFFFFF', - darker: '#FFFFFF', - }, - accentSecondary: { - default: '#F7B5A1', - lighter: '#FFE6DE', - darker: '#EA947A', - }, - background: { - default: '#FCF8F7', - lighter: '#FFF', - darker: '#EDE9E4', - inverse: '#5B6275', - }, - divider: { - default: 'rgba(0,0,0,0.10)', - lighter: 'rgba(0,0,0,0.05)', - darker: '#303131', - }, - }, - text: { - primary: '#454B59', - accent: '#EE5D71', - subdued: '#888888', - inverse: '#FFFFFF', - }, - transparent: 'transparent', - destructive: '#FF0000', - positive: '#63A84C', - negative: '#D32F2F', - status: { - success: { - default: '#A5DBCA', - lighter: '#D3E3DE', - darker: '#6BBFA5', - }, - warning: '#FAD1A2', - error: '#F00', - }, - }, - - // FONT - font: { - family: undefined, - size: { - large: { - size: 24, - height: 32, - }, - regular: { - size: 16, - height: 24, - }, - small: { - size: 12, - height: 16, - }, - }, - weights: { - regular: '400', - strong: '700', - }, - }, - - // OPACITY - opacity: { - disabled: 0.6, - }, - - // BORDERS SIZE - border: { - thinner: 1, - small: 2, - none: 0, - }, - - // ELEVATION - elevation: { - z0: { - shadowOffset: undefined, - shadowOpacity: 0, - shadowRadius: 0, - shadowColor: '#000', - elevation: 0, - }, - // For cards - z2: { - shadowOffset: { width: 0, height: 1 }, - shadowOpacity: 0.2, - shadowRadius: 1.5, - shadowColor: '#000', - elevation: 2, - }, - z4: { - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.22, - shadowRadius: 2.5, - shadowColor: '#000', - elevation: 4, - }, - z8: { - shadowOffset: { width: 0, height: 3 }, - shadowOpacity: 0.22, - shadowRadius: 4.5, - shadowColor: '#000', - elevation: 8, - }, - }, - - // SIZING - size: { - minTouchArea: 48, - icon: { - default: 24, - small: 16, - large: 48, - xLarge: 64, - }, - avatar: { - small: 32, - default: 40, - }, - divider: 1, - bullet: 8, - }, - - // SPACING - spacing: { - xxLarge: 40, - xLarge: 32, - large: 24, - medium: 16, - small: 8, - xSmall: 4, - none: 0, - }, - - // RADIUS - radius: { - circle: 9999, - small: 2, - medium: 4, - large: 8, - none: 0, - }, +import { EasingFunction, Easing } from 'react-native' +import lightTheme from './light-theme.json' +import darkTheme from './dark-theme.json' +import { ThemeJson, Theme, Easing as EasingEnum } from './theme-types' +const _buildTheme = (theme: ThemeJson): Theme => ({ + ...theme, animation: { - duration: { - default: 300, - shorter: 150, - longer: 400, - }, + ...theme.animation, easing: { - enter: Easing.out(Easing.ease), // Ease out - exit: Easing.ease, // Ease in - move: Easing.inOut(Easing.ease), // Ease in-out - }, - }, + enter: _getEasing(theme.animation.easing.enter), + exit: _getEasing(theme.animation.easing.exit), + move: _getEasing(theme.animation.easing.move), + }, + }, +}) + +const _getEasing = (easing: EasingEnum): EasingFunction => { + switch (easing) { + case 'ease-in': + return Easing.ease + case 'ease-out': + return Easing.out(Easing.ease) + case 'ease-in-out': + return Easing.inOut(Easing.ease) + } } -export const buildTheme: (theme: DeepPartial) => Theme = theme => - _.defaultsDeep(theme, lightTheme) - export const themes = { - light: lightTheme, - dark: buildTheme({ - colors: { - fill: { - background: { - lighter: '#000000', - default: '#383838', - inverse: '#FCF8F7', - }, - divider: { - default: '#282828', - lighter: '#282828', - darker: '#282828', - }, - }, - text: { - primary: '#EEEEEE', - inverse: '#383838', - }, - }, - }), + light: _buildTheme(lightTheme as ThemeJson), + dark: _buildTheme(darkTheme as ThemeJson), } diff --git a/yarn.lock b/yarn.lock index 1fcaf37..cecb8cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3068,6 +3068,11 @@ abab@^2.0.0, abab@^2.0.3: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -3187,6 +3192,20 @@ airbnb-js-shims@^2.2.1: string.prototype.padstart "^3.0.0" symbol.prototype.description "^1.0.0" +ajv-cli@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ajv-cli/-/ajv-cli-3.2.1.tgz#fb7bf9480c324345ca00f003afb96dda68b03bd5" + integrity sha512-EZW2fqkQVMvp3oPfVrUZnh4nl/sENKpSG1q+R5wHqaM71EU7JAxzxYzvkjcgIRer6Y4HFkY1uCEHT/DMWE5apw== + dependencies: + ajv "^6.7.0" + ajv-pack "^0.3.0" + fast-json-patch "^2.0.0" + glob "^7.1.0" + js-yaml "^3.13.1" + json-schema-migrate "^0.2.0" + json5 "^2.1.3" + minimist "^1.2.0" + ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -3197,7 +3216,25 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.5.5: +ajv-pack@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/ajv-pack/-/ajv-pack-0.3.1.tgz#b72c4d4219e3928e62842d742ded93bf50796560" + integrity sha1-tyxNQhnjko5ihC10Le2Tv1B5ZWA= + dependencies: + js-beautify "^1.6.4" + require-from-string "^1.2.0" + +ajv@^5.0.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.5.5, ajv@^6.7.0: version "6.12.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== @@ -5038,6 +5075,14 @@ concat-stream@^1.5.0, concat-stream@^1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" +config-chain@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" + integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + connect@^3.6.5: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" @@ -5831,6 +5876,16 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +editorconfig@^0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" + integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g== + dependencies: + commander "^2.19.0" + lru-cache "^4.1.5" + semver "^5.6.0" + sigmund "^1.0.1" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -6587,6 +6642,16 @@ fancy-log@^1.3.2: parse-node-version "^1.0.0" time-stamp "^1.0.0" +fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + fast-deep-equal@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -6614,6 +6679,13 @@ fast-json-parse@^1.0.3: resolved "https://registry.yarnpkg.com/fast-json-parse/-/fast-json-parse-1.0.3.tgz#43e5c61ee4efa9265633046b770fb682a7577c4d" integrity sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw== +fast-json-patch@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-2.2.1.tgz#18150d36c9ab65c7209e7d4eb113f4f8eaabe6d9" + integrity sha512-4j5uBaTnsYAV5ebkidvxiLUYOwjQ+JSFljeqfTxCrH9bDmlCQaOJFS84oDJ2rAXZq2yskmk3ORfoP9DCwqFNig== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -7192,7 +7264,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.0.0, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.4: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -7778,7 +7850,7 @@ inherits@2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@^1.3.5: +ini@^1.3.4, ini@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -8889,6 +8961,17 @@ jetifier@^1.6.2: resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.6.tgz#fec8bff76121444c12dc38d2dad6767c421dab68" integrity sha512-JNAkmPeB/GS2tCRqUzRPsTOHpGDah7xP18vGJfIjZC+W2sxEHbxgJxetIjIqhjQ3yYbYNEELkM/spKLtwoOSUQ== +js-beautify@^1.6.4: + version "1.11.0" + resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.11.0.tgz#afb873dc47d58986360093dcb69951e8bcd5ded2" + integrity sha512-a26B+Cx7USQGSWnz9YxgJNMmML/QG2nqIaL7VVYPCXbqiKz8PN0waSNvroMtvAK6tY7g/wPdNWGEP+JTNIBr6A== + dependencies: + config-chain "^1.1.12" + editorconfig "^0.15.3" + glob "^7.1.3" + mkdirp "~1.0.3" + nopt "^4.0.3" + js-string-escape@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" @@ -9035,6 +9118,18 @@ json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-schema-migrate@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/json-schema-migrate/-/json-schema-migrate-0.2.0.tgz#ba47a5b0072fc72396460e1bd60b44d52178bbc6" + integrity sha1-ukelsAcvxyOWRg4b1gtE1SF4u8Y= + dependencies: + ajv "^5.0.0" + +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -9062,7 +9157,7 @@ json-stringify-safe@5.0.x, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@2.x, json5@^2.1.1, json5@^2.1.2: +json5@2.x, json5@^2.1.1, json5@^2.1.2, json5@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== @@ -10087,7 +10182,7 @@ mkdirp@0.x, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: dependencies: minimist "^1.2.5" -mkdirp@^1.0.3, mkdirp@^1.0.4: +mkdirp@^1.0.3, mkdirp@^1.0.4, mkdirp@~1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -10311,6 +10406,14 @@ node-stream-zip@^1.9.1: resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.11.2.tgz#5d0124b80e2942afd7f5853a36ceb0d65c1d9e77" integrity sha512-cowCX+OyzS3tN2i4BMMFxCr/pE6cQlEMTbVCugmos0TNEJQNtcG04tR41CY8lumO1I7F5GFiLaU4WavomJthaA== +nopt@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + normalize-css-color@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/normalize-css-color/-/normalize-css-color-1.0.2.tgz#02991e97cccec6623fe573afbbf0de6a1f3e9f8d" @@ -10613,11 +10716,24 @@ os-browserify@^0.3.0: resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + overlayscrollbars@^1.10.2: version "1.12.0" resolved "https://registry.yarnpkg.com/overlayscrollbars/-/overlayscrollbars-1.12.0.tgz#e3e257bbb8a179760c2c712ad08ac2c78583c9f6" @@ -11290,6 +11406,11 @@ property-information@^5.0.0, property-information@^5.3.0: dependencies: xtend "^4.0.0" +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + proxy-addr@~2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" @@ -12318,6 +12439,11 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= +require-from-string@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -12788,6 +12914,11 @@ side-channel@^1.0.2: es-abstract "^1.17.0-next.1" object-inspect "^1.7.0" +sigmund@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + integrity sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -13836,7 +13967,18 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.9.2: +typescript-json-schema@^0.42.0: + version "0.42.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.42.0.tgz#695f212a72d91d47c0605371dc697597b7817c1b" + integrity sha512-9WO+lVmlph7Ecb7lPd9tU84XFUQh44kpAf3cWe/Ym4G5EKw/SS6XGpi1DZDthvxqkIdNSDlWi7FhKfxuIV/3yw== + dependencies: + "@types/json-schema" "^7.0.3" + glob "~7.1.4" + json-stable-stringify "^1.0.1" + typescript "^3.5.3" + yargs "^14.0.0" + +typescript@^3.5.3, typescript@^3.9.2: version "3.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36" integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==