@botpress/webchat 4.3.2 → 4.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,30 +1,13 @@
1
- import { join, dirname } from 'path'
2
- import { withoutVitePlugins } from '@storybook/builder-vite'
3
- /**
4
- * This function is used to resolve the absolute path of a package.
5
- * It is needed in projects that use Yarn PnP or are set up within a monorepo.
6
- */
7
- function getAbsolutePath(value) {
8
- return dirname(require.resolve(join(value, 'package.json')))
1
+ import { defineMain } from '@storybook/react-vite/node'
2
+ import { fileURLToPath } from 'node:url'
3
+ import { dirname } from 'node:path'
4
+
5
+ function getAbsolutePath(value: string): any {
6
+ return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)))
9
7
  }
10
8
 
11
- /** @type { import('@storybook/react-vite').StorybookConfig } */
12
- const config = {
9
+ export default defineMain({
13
10
  stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
14
- addons: [
15
- getAbsolutePath('@storybook/addon-onboarding'),
16
- getAbsolutePath('@storybook/addon-essentials'),
17
- getAbsolutePath('@chromatic-com/storybook'),
18
- getAbsolutePath('@storybook/addon-interactions'),
19
- ],
20
- framework: {
21
- name: getAbsolutePath('@storybook/react-vite'),
22
- options: {},
23
- },
24
- async viteFinal(config) {
25
- config.plugins = await withoutVitePlugins(config.plugins, ['vite:dts'])
26
-
27
- return config
28
- },
29
- }
30
- export default config
11
+ framework: getAbsolutePath('@storybook/react-vite'),
12
+ addons: ['@storybook/addon-onboarding', '@storybook/addon-docs'],
13
+ })
@@ -1,5 +1,5 @@
1
1
  // import '../src/index.css' // This has to be imported as early as possible
2
- import { type Preview } from '@storybook/react'
2
+ import { type Preview } from '@storybook/react-vite'
3
3
  import React from 'react'
4
4
  import { Container } from '../src/components'
5
5
  import { StylesheetProvider } from '../src/providers'
@@ -31,7 +31,7 @@ const colorMap = {
31
31
  pink: '#ec4899',
32
32
  }
33
33
 
34
- /** @type { import('@storybook/react').Preview } */
34
+ /** @type { import('@storybook/react-vite').Preview } */
35
35
  const preview: Preview = {
36
36
  initialGlobals: {
37
37
  themeMode: 'light',
@@ -1,21 +1,21 @@
1
1
 
2
- > @botpress/webchat@4.3.2 build /home/runner/work/genisys/genisys/packages/webchat-components
2
+ > @botpress/webchat@4.4.0 build /home/runner/work/genisys/genisys/packages/webchat-components
3
3
  > vite build
4
4
 
5
5
  vite v5.4.8 building for production...
6
6
  transforming...
7
- ✓ 2383 modules transformed.
7
+ ✓ 2411 modules transformed.
8
8
  rendering chunks...
9
9
 
10
10
  [vite:dts] Start generate declaration files...
11
11
  computing gzip size...
12
- dist/style.css  54.01 kB │ gzip: 9.07 kB
13
- dist/index.js 678.97 kB │ gzip: 183.72 kB
12
+ dist/style.css  57.08 kB │ gzip: 9.49 kB
13
+ dist/index.js 876.84 kB │ gzip: 231.52 kB
14
14
  [vite:dts] Start rollup declaration files...
15
15
  Analysis will use the bundled TypeScript version 5.8.2
16
16
  *** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
17
- [vite:dts] Declaration files built in 19456ms.
17
+ [vite:dts] Declaration files built in 21112ms.
18
18
 
19
- dist/style.css  54.01 kB │ gzip: 9.07 kB
20
- dist/index.umd.cjs 451.15 kB │ gzip: 148.59 kB
21
- ✓ built in 24.07s
19
+ dist/style.css  57.08 kB │ gzip: 9.49 kB
20
+ dist/index.umd.cjs 537.49 kB │ gzip: 176.29 kB
21
+ ✓ built in 26.72s