@astral/ui 3.247.1 → 3.248.0-rc.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/README.md CHANGED
@@ -17,6 +17,7 @@
17
17
  - [Migration guide](#migration-guide)
18
18
  - [Troubleshooting](#troubleshooting)
19
19
  - [Медленно выполняются vitest тесты при импорте пакета](#медленно-выполняются-vitest-тесты-при-импорте-пакета)
20
+ - [utils](#utils)
20
21
 
21
22
  # [Storybook](https://main--61baeff6f06230003a88ef8a.chromatic.com/)
22
23
  [Storybook](https://main--61baeff6f06230003a88ef8a.chromatic.com/) содержит документацию компонентов ```@astral/ui```.
@@ -102,37 +103,10 @@ import {
102
103
  createTheme,
103
104
  } from '@astral/ui';
104
105
  import { createStylesCache as createStylesServerCache } from '@astral/ui/server';
105
- import UbuntuBoldWoff from '@astral/ui/fonts/UbuntuBold.woff';
106
- import UbuntuBoldWoff2 from '@astral/ui/fonts/UbuntuBold.woff2';
107
- import UbuntuLightWoff from '@astral/ui/fonts/UbuntuLight.woff';
108
- import UbuntuLightWoff2 from '@astral/ui/fonts/UbuntuLight.woff2';
109
- import UbuntuRegularWoff from '@astral/ui/fonts/UbuntuRegular.woff';
110
- import UbuntuRegularWoff2 from '@astral/ui/fonts/UbuntuRegular.woff2';
111
- import UbuntuMediumWoff from '@astral/ui/fonts/UbuntuMedium.woff';
112
- import UbuntuMediumWoff2 from '@astral/ui/fonts/UbuntuMedium.woff2';
113
106
 
114
107
  import { MainLayout } from '@example/modules/LayoutModule';
115
108
 
116
- const fontsUrls = {
117
- bold: {
118
- woff: UbuntuBoldWoff,
119
- woff2: UbuntuBoldWoff2,
120
- },
121
- light: {
122
- woff: UbuntuLightWoff,
123
- woff2: UbuntuLightWoff2,
124
- },
125
- regular: {
126
- woff: UbuntuRegularWoff,
127
- woff2: UbuntuRegularWoff2,
128
- },
129
- medium: {
130
- woff: UbuntuMediumWoff,
131
- woff2: UbuntuMediumWoff2,
132
- },
133
- };
134
-
135
- export const theme = createTheme({ brand: Brand.DEFAULT, fontsUrls });
109
+ export const theme = createTheme({ brand: Brand.DEFAULT });
136
110
 
137
111
  const stylesCache = createStylesServerCache({ key: 'next' });
138
112
 
@@ -167,6 +141,18 @@ export default App;
167
141
 
168
142
  # Migration guide
169
143
 
144
+ ## 3.0.0 -> 4.0.0
145
+
146
+ ### Fonts
147
+
148
+ Подключение шрифтов через объект `theme` больше не поддерживается.
149
+
150
+ Шрифты необходимо подключать через [сервис для хранения статичных файлов](https://frontend-static.astral.ru/)
151
+
152
+ [Инструкция для подключения шрифтов](https://main--61baeff6f06230003a88ef8a.chromatic.com/?path=/docs/getting-started-fonts--docs)
153
+
154
+ ⚠️ Для подключения шрифтов необходимо настроить **Content Security Policy**.
155
+
170
156
  ## 2.0.0 -> 3.0.0
171
157
 
172
158
  ### ConfigProvider
@@ -362,3 +348,26 @@ export default defineConfig({
362
348
 
363
349
  В пакете есть специальное свойство `exports.vitest`, оптимизирующее парсинг пакета для vitest.
364
350
  Исходна проблема: vitest плохо работает с barrel files.
351
+
352
+
353
+ # utils
354
+
355
+ Table of contents
356
+
357
+ - [redirectToLink](#redirectToLink)
358
+
359
+
360
+ ## redirectToLink
361
+
362
+ Утилита для перехода по ссылке
363
+
364
+ ```ts
365
+ import { redirectToLink } from '@astral/ui';
366
+
367
+ // Открытие ссылки в текущей вкладке или фрейме
368
+ redirectToLink('/');
369
+
370
+ // Открытие ссылки в новой вкладке
371
+ redirectToLink('/', '_blank')
372
+
373
+ ```
@@ -0,0 +1 @@
1
+ export { PdfViewer, type PdfViewerOnLoadSuccessProps, PdfViewerPagination, type PdfViewerPaginationProps, type PdfViewerProps, pdfViewerClassnames, } from '@astral/components/PdfViewer';
@@ -0,0 +1 @@
1
+ export { PdfViewer, PdfViewerPagination, pdfViewerClassnames, } from '@astral/components/PdfViewer';
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from '@astral/components';
2
- export * from '@astral/icons';
3
2
  export * from '@astral/form';
3
+ export * from '@astral/icons';
package/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from '@astral/components';
2
- export * from '@astral/icons';
3
2
  export * from '@astral/form';
3
+ export * from '@astral/icons';
@@ -0,0 +1 @@
1
+ export { PdfViewer, type PdfViewerOnLoadSuccessProps, PdfViewerPagination, type PdfViewerPaginationProps, type PdfViewerProps, pdfViewerClassnames, } from '@astral/components/PdfViewer';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pdfViewerClassnames = exports.PdfViewerPagination = exports.PdfViewer = void 0;
4
+ var PdfViewer_1 = require("@astral/components/PdfViewer");
5
+ Object.defineProperty(exports, "PdfViewer", { enumerable: true, get: function () { return PdfViewer_1.PdfViewer; } });
6
+ Object.defineProperty(exports, "PdfViewerPagination", { enumerable: true, get: function () { return PdfViewer_1.PdfViewerPagination; } });
7
+ Object.defineProperty(exports, "pdfViewerClassnames", { enumerable: true, get: function () { return PdfViewer_1.pdfViewerClassnames; } });
package/node/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from '@astral/components';
2
- export * from '@astral/icons';
3
2
  export * from '@astral/form';
3
+ export * from '@astral/icons';
package/node/index.js CHANGED
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("@astral/components"), exports);
18
- __exportStar(require("@astral/icons"), exports);
19
18
  __exportStar(require("@astral/form"), exports);
19
+ __exportStar(require("@astral/icons"), exports);
package/package.json CHANGED
@@ -1,46 +1,49 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "3.247.1",
3
+ "version": "3.248.0-rc.2",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
+ "dependencies": {
7
+ "@astral/icons": "3.248.0-rc.2",
8
+ "@astral/components": "3.248.0-rc.2",
9
+ "@astral/form": "3.248.0-rc.2"
10
+ },
11
+ "peerDependencies": {
12
+ "react": "^17.0.0 || ^18.0.0",
13
+ "react-dom": "^17.0.0 || ^18.0.0",
14
+ "@types/react": "^17.0.0 || ^18.0.0"
15
+ },
6
16
  "exports": {
7
17
  ".": {
8
- "vitest": "./node/index.js",
9
18
  "module": "./index.js",
10
- "require": "./node/index.js"
19
+ "require": "./node/index.js",
20
+ "types": "./index.d.ts"
11
21
  },
12
22
  "./server": {
13
- "vitest": "./node/server/index.js",
14
23
  "module": "./server/index.js",
15
- "require": "./node/server/index.js"
24
+ "require": "./node/server/index.js",
25
+ "types": "./server/index.d.ts"
16
26
  },
17
27
  "./next": {
18
- "vitest": "./node/next.js",
19
28
  "module": "./next.js",
20
- "require": "./node/next.js"
29
+ "require": "./node/next.js",
30
+ "types": "./next.d.ts"
21
31
  },
22
32
  "./fonts/*": "./fonts/*",
23
- "./illustrations/*": "./illustrations/*"
24
- },
25
- "dependencies": {
26
- "@astral/icons": "3.247.1",
27
- "@astral/components": "3.247.1",
28
- "@astral/form": "3.247.1"
29
- },
30
- "peerDependencies": {
31
- "react": ">=17.0.0 <19.0.0"
33
+ "./illustrations/*": "./illustrations/*",
34
+ "./components/PdfViewer": {
35
+ "module": "./components/PdfViewer.js",
36
+ "require": "./node/components/PdfViewer.js",
37
+ "types": "./components/PdfViewer.d.ts"
38
+ }
32
39
  },
33
40
  "author": "Astral.Soft",
34
41
  "license": "MIT",
35
42
  "repository": {
36
43
  "type": "git",
37
- "url": "git+https://github.com/kaluga-astral/frontend"
38
- },
39
- "bugs": {
40
- "url": "https://github.com/kaluga-astral/frontend/issues"
44
+ "url": "https://git.astralnalog.ru/frontend.shared/ui"
41
45
  },
42
- "keywords": [],
43
- "sideEffects": false,
44
46
  "types": "./index.d.ts",
45
- "module": "./index.js"
47
+ "module": "./index.js",
48
+ "sideEffects": false
46
49
  }