@rescui/typography 0.3.0 → 0.4.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,19 +1,19 @@
1
1
  import './any';
2
2
  import { Theme } from '@rescui/ui-contexts';
3
3
  import './styles';
4
- export declare type TTexts = 'rs-text-1' | 'rs-text-2' | 'rs-text-3';
5
- export declare type TLink = 'rs-link';
6
- export declare type TOthers = 'rs-super-hero' | 'rs-digits' | 'rs-hero' | 'rs-subtitle-1' | 'rs-h1' | 'rs-subtitle-2' | 'rs-h2' | 'rs-h3' | 'rs-h4' | 'rs-h5' | 'rs-overline' | 'rs-pre' | 'rs-code' | 'rs-link' | 'rs-article';
7
- export interface ITexts {
4
+ export declare type Texts = 'rs-text-1' | 'rs-text-2' | 'rs-text-3';
5
+ export declare type Link = 'rs-link';
6
+ export declare type Others = 'rs-super-hero' | 'rs-digits' | 'rs-hero' | 'rs-subtitle-1' | 'rs-h1' | 'rs-subtitle-2' | 'rs-h2' | 'rs-h3' | 'rs-h4' | 'rs-h5' | 'rs-overline' | 'rs-pre' | 'rs-code' | 'rs-link' | 'rs-article';
7
+ export interface TextsParams {
8
8
  paragraphOffsetAuto?: boolean;
9
9
  hardness?: 'average' | 'hard' | 'pale';
10
10
  }
11
- export interface ILink extends Omit<ITexts, 'paragraphOffsetAuto'> {
11
+ export interface LinkParams extends Omit<TextsParams, 'paragraphOffsetAuto'> {
12
12
  external?: boolean;
13
13
  mode?: 'text' | 'clear' | 'standalone';
14
14
  }
15
15
  export declare function createTextCn(theme: Theme): {
16
- (type: TTexts, params?: ITexts): string;
17
- (type: TLink, params?: ILink): string;
18
- (type: TOthers): string;
16
+ (type: Texts, params?: TextsParams): string;
17
+ (type: Link, params?: LinkParams): string;
18
+ (type: Others): string;
19
19
  };
@@ -1,21 +1,21 @@
1
1
  /* Light weight */
2
2
  @font-face {
3
3
  font-family: 'JetBrains Sans';
4
- src: url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-Light.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-Light.woff') format('woff');
4
+ src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Light.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Light.woff') format('woff');
5
5
  font-weight: 300;
6
6
  font-style: normal;
7
7
  }
8
8
  /* Regular weight */
9
9
  @font-face {
10
10
  font-family: 'JetBrains Sans';
11
- src: url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-Regular.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-Regular.woff') format('woff');
11
+ src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Regular.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Regular.woff') format('woff');
12
12
  font-weight: 400;
13
13
  font-style: normal;
14
14
  }
15
15
  /* SemiBold weight */
16
16
  @font-face {
17
17
  font-family: 'JetBrains Sans';
18
- src: url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-SemiBold.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-SemiBold.woff') format('woff');
18
+ src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-SemiBold.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-SemiBold.woff') format('woff');
19
19
  font-weight: 600;
20
20
  font-style: normal;
21
21
  }
@@ -23,9 +23,9 @@
23
23
  @supports (font-variation-settings: normal) {
24
24
  @font-face {
25
25
  font-family: 'JetBrains Sans';
26
- src: url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans.woff2') format('woff2 supports variations'),
27
- url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans.woff2') format('woff2-variations'),
28
- url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans.woff') format('woff-variations');
26
+ src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff2') format('woff2 supports variations'),
27
+ url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff2') format('woff2-variations'),
28
+ url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff') format('woff-variations');
29
29
  font-weight: 100 900;
30
30
  font-style: normal;
31
31
  }
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: 'JetBrains Sans';
3
- src: url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans.woff2') format('woff2 supports variations'),
4
- url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans.woff2') format('woff2-variations'),
5
- url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans.woff') format('woff-variations');
3
+ src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff2') format('woff2 supports variations'),
4
+ url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff2') format('woff2-variations'),
5
+ url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans.woff') format('woff-variations');
6
6
  font-weight: 100 900;
7
7
  font-style: normal;
8
8
  }
@@ -1,21 +1,21 @@
1
1
  /* Light weight */
2
2
  @font-face {
3
3
  font-family: 'JetBrains Sans';
4
- src: url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-Light.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-Light.woff') format('woff');
4
+ src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Light.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Light.woff') format('woff');
5
5
  font-weight: 300;
6
6
  font-style: normal;
7
7
  }
8
8
  /* Regular weight */
9
9
  @font-face {
10
10
  font-family: 'JetBrains Sans';
11
- src: url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-Regular.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-Regular.woff') format('woff');
11
+ src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Regular.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-Regular.woff') format('woff');
12
12
  font-weight: 400;
13
13
  font-style: normal;
14
14
  }
15
15
  /* SemiBold weight */
16
16
  @font-face {
17
17
  font-family: 'JetBrains Sans';
18
- src: url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-SemiBold.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/products/fonts/JetBrainsSans-SemiBold.woff') format('woff');
18
+ src: url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-SemiBold.woff2') format('woff2'), url('https://resources.jetbrains.com/storage/jetbrains-sans/JetBrainsSans-SemiBold.woff') format('woff');
19
19
  font-weight: 600;
20
20
  font-style: normal;
21
21
  }
package/lib/hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export declare const useTextStyles: () => {
2
- (type: import("./create-text-cn").TTexts, params?: import("./create-text-cn").ITexts): string;
3
- (type: "rs-link", params?: import("./create-text-cn").ILink): string;
4
- (type: import("./create-text-cn").TOthers): string;
2
+ (type: import("./create-text-cn").Texts, params?: import("./create-text-cn").TextsParams): string;
3
+ (type: "rs-link", params?: import("./create-text-cn").LinkParams): string;
4
+ (type: import("./create-text-cn").Others): string;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescui/typography",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@babel/runtime-corejs3": "^7.14.0",
22
- "@rescui/colors": "^0.0.5",
22
+ "@rescui/colors": "^0.0.6",
23
23
  "bem-cn-fast": "^1.0.2",
24
24
  "inter-ui": "^3.15.1"
25
25
  },
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@rescui/postcss-preset-library": "^0.0.4",
32
- "@rescui/scripts": "^0.1.3",
32
+ "@rescui/scripts": "^0.1.4",
33
33
  "@rescui/visual-regression": "^0.0.1",
34
34
  "case": "^1.6.3",
35
35
  "fs-extra": "^7.0.1",
@@ -40,5 +40,5 @@
40
40
  "build": "rescui-scripts build --no-css-modules && yarn run build-mixins && shx cp src/font-*.css lib",
41
41
  "build-mixins": "rescui-scripts postcss --glob mixins.pcss --config ./.postcssrc-mixins.js --no-clean-out && shx mv lib/mixins.css lib/mixins.pcss && shx rm lib/mixins.css.map"
42
42
  },
43
- "gitHead": "11daffddcc420a78b5708443363da65c55f28103"
43
+ "gitHead": "6b1d206de2641861028760d73f33dee214c07911"
44
44
  }