@astral/ui 3.93.0 → 3.93.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 +29 -0
- package/node/index.d.ts +3 -0
- package/node/index.js +19 -0
- package/node/server/index.d.ts +1 -0
- package/node/server/index.js +17 -0
- package/package.json +15 -7
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
- [Playground](#playground)
|
|
14
14
|
- [Getting started with Next.js](#getting-started-with-nextjs)
|
|
15
15
|
- [Migration guide](#migration-guide)
|
|
16
|
+
- [Troubleshooting](#troubleshooting)
|
|
17
|
+
- [Медленно выполняются vitest тесты при импорте пакета](#медленно-выполняются-vitest-тесты-при-импорте-пакета)
|
|
16
18
|
|
|
17
19
|
# [Storybook](https://main--61baeff6f06230003a88ef8a.chromatic.com/)
|
|
18
20
|
[Storybook](https://main--61baeff6f06230003a88ef8a.chromatic.com/) содержит документацию компонентов ```@astral/ui```.
|
|
@@ -329,3 +331,30 @@ import { QuitOutlineMd } from '@astral/ui';
|
|
|
329
331
|
|
|
330
332
|
### DatePickerProvider
|
|
331
333
|
Компонент был удален, используйте ConfigProvider.
|
|
334
|
+
|
|
335
|
+
# Troubleshooting
|
|
336
|
+
|
|
337
|
+
## Медленно выполняются vitest тесты при импорте пакета
|
|
338
|
+
|
|
339
|
+
Для того чтобы ускорить выполнение vitest тестов, необходимо добавить следующий параметр `conditions` в `vitest.config.ts`:
|
|
340
|
+
|
|
341
|
+
```ts
|
|
342
|
+
/// <reference types="vitest" />
|
|
343
|
+
|
|
344
|
+
import react from '@vitejs/plugin-react';
|
|
345
|
+
import { defineConfig } from 'vitest/config';
|
|
346
|
+
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
347
|
+
|
|
348
|
+
export default defineConfig({
|
|
349
|
+
plugins: [react(), tsconfigPaths()],
|
|
350
|
+
resolve: {
|
|
351
|
+
conditions: ['vitest'],
|
|
352
|
+
},
|
|
353
|
+
test: {
|
|
354
|
+
environment: 'jsdom',
|
|
355
|
+
},
|
|
356
|
+
});
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
В пакете есть специальное свойство `exports.vitest`, оптимизирующее парсинг пакета для vitest.
|
|
360
|
+
Исходна проблема: vitest плохо работает с barrel files.
|
package/node/index.d.ts
ADDED
package/node/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("@astral/components"), exports);
|
|
18
|
+
__exportStar(require("@astral/icons"), exports);
|
|
19
|
+
__exportStar(require("@astral/form"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@astral/components/server';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("@astral/components/server"), exports);
|
package/package.json
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "3.93.
|
|
3
|
+
"version": "3.93.2",
|
|
4
4
|
"browser": "./index.js",
|
|
5
|
-
"main": "./index.js",
|
|
5
|
+
"main": "./node/index.js",
|
|
6
6
|
"exports": {
|
|
7
|
-
".":
|
|
8
|
-
|
|
7
|
+
".": {
|
|
8
|
+
"vitest": "./node/index.js",
|
|
9
|
+
"module": "./index.js",
|
|
10
|
+
"require": "./node/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./server": {
|
|
13
|
+
"vitest": "./node/server/index.js",
|
|
14
|
+
"module": "./server/index.js",
|
|
15
|
+
"require": "./node/server/index.js"
|
|
16
|
+
},
|
|
9
17
|
"./fonts/*": "./fonts/*",
|
|
10
18
|
"./illustrations/*": "./illustrations/*"
|
|
11
19
|
},
|
|
12
20
|
"dependencies": {
|
|
13
|
-
"@astral/icons": "^3.93.
|
|
14
|
-
"@astral/components": "^3.93.
|
|
15
|
-
"@astral/form": "^3.93.
|
|
21
|
+
"@astral/icons": "^3.93.2",
|
|
22
|
+
"@astral/components": "^3.93.2",
|
|
23
|
+
"@astral/form": "^3.93.2"
|
|
16
24
|
},
|
|
17
25
|
"peerDependencies": {
|
|
18
26
|
"react": ">=17.0.0"
|