@sorayasm/vietri-ds 0.2.1 → 0.2.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/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to Vietri DS are listed here. The project follows
4
4
  [Semantic Versioning](https://semver.org/); while the version is 0.x, a minor
5
5
  version may include breaking changes.
6
6
 
7
+ ## 0.2.2
8
+
9
+ ### Documentation
10
+
11
+ - README explains how to test an app that uses the library with Vitest
12
+ (`server.deps.inline`), because MUI 6 has no `exports` map.
13
+
7
14
  ## 0.2.1
8
15
 
9
16
  ### Fixed
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vietri DS
2
2
 
3
- A themeable design system built with React, TypeScript and MUI. It is the shared UI foundation for the projects in the [Soraya Sacaan](https://www.sorayasacaan.com) portfolio: the portfolio site, the streaming platform and the Mujeres del Blues Observatory.
3
+ A themeable design system built with React, TypeScript and MUI. It is the shared UI foundation for the projects in the [Soraya Sacaan](https://sorayasacaan.com) portfolio: the portfolio site, the streaming platform and the Mujeres del Blues Observatory.
4
4
 
5
5
  > **Status:** early development (v0.1). Foundations, themes, tooling and the first set of components are in place.
6
6
 
@@ -192,6 +192,19 @@ export function App() {
192
192
 
193
193
  **4. Translate the texts.** Every user-facing default ("Menu", "Close", "Copy"…) is a prop, so an app in another language passes its own.
194
194
 
195
+ **5. Testing an app that uses the library (Vitest).** MUI 6 has no `exports` map, so Node cannot import its folders (`@mui/material/Box`) from an ES module package. Running tests that render Vietri components fails with `Directory import '…/@mui/material/Box' is not supported`. Tell Vitest to process the design system with Vite, in the app's `vite.config.ts`:
196
+
197
+ ```ts
198
+ export default defineConfig({
199
+ test: {
200
+ environment: "jsdom",
201
+ server: { deps: { inline: ["@sorayasm/vietri-ds"] } },
202
+ },
203
+ });
204
+ ```
205
+
206
+ Builds and the dev server are not affected, only tests that run directly in Node.
207
+
195
208
  `react`, `react-dom`, `@mui/material` (6.x), `@emotion/react`, `@emotion/styled` and `lucide-react` are peer dependencies. The `theme.vietri` types are added to MUI automatically when `@sorayasm/vietri-ds` is imported.
196
209
 
197
210
  ## Project structure
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sorayasm/vietri-ds",
3
3
  "private": false,
4
- "version": "0.2.1",
4
+ "version": "0.2.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",