@spscommerce/max 0.4.0 → 0.5.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.
- package/lib/MaxPanel.d.ts +2 -1
- package/lib/api-service.d.ts +2 -1
- package/lib/components/ChatLoadingStatus.d.ts +7 -0
- package/lib/components/MaxPanelHeaderActions.d.ts +14 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/hooks/scrollStateMachine.d.ts +128 -0
- package/lib/hooks/useMaxChat.d.ts +2 -2
- package/lib/hooks/useMaxPanelScrollController.d.ts +30 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +12720 -12258
- package/lib/index.umd.cjs +153 -153
- package/lib/models/AdditionalContext.d.ts +2 -0
- package/lib/style.css +1 -1
- package/package.json +3 -1
- package/vitest.config.ts +20 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/max",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/sps-agent-ui",
|
|
@@ -94,6 +94,8 @@
|
|
|
94
94
|
"build:js": "vite build",
|
|
95
95
|
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib",
|
|
96
96
|
"watch": "vite build --watch",
|
|
97
|
+
"test": "vitest",
|
|
98
|
+
"test:ci": "vitest run",
|
|
97
99
|
"clean": "git clean -fdX",
|
|
98
100
|
"pub": "node ../../../scripts/publish-package.mjs"
|
|
99
101
|
}
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Node <19 doesn't expose globalThis.crypto; Vite 7 needs it during resolveConfig.
|
|
2
|
+
import { webcrypto } from "node:crypto";
|
|
3
|
+
if (!globalThis.crypto) {
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
globalThis.crypto = webcrypto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
import { defineConfig } from "vitest/config";
|
|
9
|
+
import react from "@vitejs/plugin-react";
|
|
10
|
+
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
plugins: [react()],
|
|
13
|
+
test: {
|
|
14
|
+
globals: true,
|
|
15
|
+
environment: "jsdom",
|
|
16
|
+
setupFiles: "./src/test/setup.ts",
|
|
17
|
+
css: false,
|
|
18
|
+
include: ["src/**/*.test.tsx", "src/**/*.test.ts"],
|
|
19
|
+
},
|
|
20
|
+
});
|