@n8n/chat 0.6.0 → 0.6.1
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/{src/App.vue → App.vue} +2 -2
- package/README.md +27 -4
- package/__stories__/App.stories.d.ts +16 -0
- package/__stories__/App.stories.js +38 -0
- package/__stories__/App.stories.mjs +32 -0
- package/__tests__/index.spec.d.ts +1 -0
- package/__tests__/index.spec.js +146 -0
- package/__tests__/index.spec.mjs +172 -0
- package/__tests__/setup.js +3 -0
- package/__tests__/setup.mjs +1 -0
- package/__tests__/utils/create.d.ts +5 -0
- package/__tests__/utils/create.js +16 -0
- package/__tests__/utils/create.mjs +10 -0
- package/__tests__/utils/fetch.d.ts +3 -0
- package/__tests__/utils/fetch.js +20 -0
- package/__tests__/utils/fetch.mjs +9 -0
- package/__tests__/utils/index.js +38 -0
- package/__tests__/utils/index.mjs +3 -0
- package/__tests__/utils/selectors.d.ts +12 -0
- package/__tests__/utils/selectors.js +58 -0
- package/__tests__/utils/selectors.mjs +41 -0
- package/api/generic.d.ts +6 -0
- package/api/generic.js +68 -0
- package/api/generic.mjs +54 -0
- package/api/index.js +27 -0
- package/api/index.mjs +2 -0
- package/api/message.d.ts +3 -0
- package/api/message.js +33 -0
- package/api/message.mjs +30 -0
- package/chat.bundle.es.js +10753 -0
- package/chat.bundle.umd.js +18 -0
- package/chat.es.js +6864 -0
- package/chat.umd.js +18 -0
- package/components/Button.vue +34 -0
- package/{src/components → components}/Chat.vue +19 -15
- package/components/ChatWindow.vue +104 -0
- package/components/GetStarted.vue +24 -0
- package/{src/components → components}/GetStartedFooter.vue +4 -4
- package/{src/components → components}/Input.vue +35 -40
- package/components/Layout.vue +66 -0
- package/components/Message.vue +94 -0
- package/components/MessageTyping.vue +101 -0
- package/{src/components → components}/MessagesList.vue +8 -8
- package/{src/components → components}/PoweredBy.vue +6 -7
- package/components/index.js +76 -0
- package/components/index.mjs +10 -0
- package/composables/index.js +38 -0
- package/composables/index.mjs +3 -0
- package/composables/useChat.d.ts +1 -0
- package/composables/useChat.js +11 -0
- package/composables/useChat.mjs +5 -0
- package/composables/useI18n.d.ts +4 -0
- package/composables/useI18n.js +23 -0
- package/composables/useI18n.mjs +12 -0
- package/composables/useOptions.d.ts +3 -0
- package/composables/useOptions.js +14 -0
- package/composables/useOptions.mjs +8 -0
- package/constants/defaults.d.ts +3 -0
- package/constants/defaults.js +32 -0
- package/constants/defaults.mjs +26 -0
- package/constants/index.js +38 -0
- package/constants/index.mjs +3 -0
- package/constants/localStorage.d.ts +2 -0
- package/constants/localStorage.js +8 -0
- package/{src/constants/localStorage.ts → constants/localStorage.mjs} +1 -1
- package/constants/symbols.d.ts +3 -0
- package/constants/symbols.js +8 -0
- package/constants/symbols.mjs +2 -0
- package/css/index.css +31 -0
- package/event-buses/chatEventBus.d.ts +1 -0
- package/event-buses/chatEventBus.js +8 -0
- package/event-buses/chatEventBus.mjs +2 -0
- package/event-buses/index.js +16 -0
- package/event-buses/index.mjs +1 -0
- package/index.d.ts +3 -0
- package/index.js +43 -0
- package/index.mjs +36 -0
- package/main.css +151 -0
- package/package.json +41 -5
- package/plugins/chat.d.ts +3 -0
- package/plugins/chat.js +85 -0
- package/plugins/chat.mjs +83 -0
- package/plugins/index.js +16 -0
- package/plugins/index.mjs +1 -0
- package/style.css +1 -0
- package/types/App.vue.d.ts +8 -0
- package/types/__stories__/App.stories.d.ts +17 -0
- package/types/__tests__/index.spec.d.ts +1 -0
- package/types/__tests__/setup.d.ts +0 -0
- package/types/__tests__/utils/create.d.ts +5 -0
- package/types/__tests__/utils/fetch.d.ts +4 -0
- package/types/__tests__/utils/index.d.ts +3 -0
- package/types/__tests__/utils/selectors.d.ts +12 -0
- package/types/api/generic.d.ts +6 -0
- package/types/api/index.d.ts +2 -0
- package/types/api/message.d.ts +3 -0
- package/types/chat.d.ts +11 -0
- package/types/chat.js +1 -0
- package/types/chat.mjs +0 -0
- package/types/components/Button.vue.d.ts +9 -0
- package/types/components/Chat.vue.d.ts +2 -0
- package/types/components/ChatWindow.vue.d.ts +2 -0
- package/types/components/GetStarted.vue.d.ts +2 -0
- package/types/components/GetStartedFooter.vue.d.ts +2 -0
- package/types/components/Input.vue.d.ts +2 -0
- package/types/components/Layout.vue.d.ts +11 -0
- package/types/components/Message.vue.d.ts +21 -0
- package/types/components/MessageTyping.vue.d.ts +15 -0
- package/types/components/MessagesList.vue.d.ts +14 -0
- package/types/components/PoweredBy.vue.d.ts +2 -0
- package/types/components/index.d.ts +10 -0
- package/types/composables/index.d.ts +3 -0
- package/types/composables/useChat.d.ts +2 -0
- package/types/composables/useI18n.d.ts +4 -0
- package/types/composables/useOptions.d.ts +4 -0
- package/types/constants/defaults.d.ts +3 -0
- package/types/constants/index.d.ts +3 -0
- package/types/constants/localStorage.d.ts +2 -0
- package/types/constants/symbols.d.ts +4 -0
- package/types/event-buses/chatEventBus.d.ts +1 -0
- package/types/event-buses/index.d.ts +1 -0
- package/types/index.js +49 -0
- package/types/index.mjs +4 -0
- package/types/messages.d.ts +6 -0
- package/types/messages.js +1 -0
- package/types/messages.mjs +0 -0
- package/types/options.d.ts +25 -0
- package/types/options.js +1 -0
- package/types/options.mjs +0 -0
- package/types/plugins/chat.d.ts +3 -0
- package/types/plugins/index.d.ts +1 -0
- package/types/types/chat.d.ts +11 -0
- package/types/types/index.d.ts +4 -0
- package/types/types/messages.d.ts +6 -0
- package/types/types/options.d.ts +25 -0
- package/types/types/webhook.d.ts +15 -0
- package/types/utils/event-bus.d.ts +8 -0
- package/types/utils/mount.d.ts +1 -0
- package/types/webhook.d.ts +15 -0
- package/types/webhook.js +1 -0
- package/types/webhook.mjs +0 -0
- package/utils/event-bus.d.ts +8 -0
- package/utils/event-bus.js +38 -0
- package/utils/event-bus.mjs +32 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +27 -0
- package/utils/index.mjs +2 -0
- package/utils/mount.d.ts +1 -0
- package/utils/mount.js +19 -0
- package/utils/mount.mjs +13 -0
- package/.eslintignore +0 -2
- package/.eslintrc.cjs +0 -51
- package/.np-config.json +0 -5
- package/.storybook/main.ts +0 -27
- package/.storybook/preview.scss +0 -4
- package/.storybook/preview.ts +0 -16
- package/.vscode/extensions.json +0 -3
- package/env.d.ts +0 -1
- package/index.html +0 -13
- package/resources/workflow.json +0 -293
- package/scripts/pack.js +0 -11
- package/scripts/postbuild.js +0 -16
- package/src/__stories__/App.stories.ts +0 -43
- package/src/__tests__/index.spec.ts +0 -223
- package/src/__tests__/utils/create.ts +0 -16
- package/src/__tests__/utils/fetch.ts +0 -18
- package/src/__tests__/utils/selectors.ts +0 -53
- package/src/api/generic.ts +0 -64
- package/src/api/message.ts +0 -31
- package/src/components/Button.vue +0 -41
- package/src/components/ChatWindow.vue +0 -125
- package/src/components/GetStarted.vue +0 -24
- package/src/components/Layout.vue +0 -82
- package/src/components/Message.vue +0 -97
- package/src/components/MessageTyping.vue +0 -109
- package/src/composables/useChat.ts +0 -7
- package/src/composables/useI18n.ts +0 -16
- package/src/composables/useOptions.ts +0 -11
- package/src/constants/defaults.ts +0 -25
- package/src/constants/symbols.ts +0 -8
- package/src/event-buses/chatEventBus.ts +0 -3
- package/src/index.ts +0 -42
- package/src/main.scss +0 -40
- package/src/plugins/chat.ts +0 -101
- package/src/types/chat.ts +0 -12
- package/src/types/messages.ts +0 -6
- package/src/types/options.ts +0 -23
- package/src/types/webhook.ts +0 -17
- package/src/utils/event-bus.ts +0 -51
- package/src/utils/mount.ts +0 -16
- package/tsconfig.json +0 -27
- package/vite.config.ts +0 -51
- package/vitest.config.ts +0 -20
- /package/{src/__tests__/setup.ts → __tests__/setup.d.ts} +0 -0
- /package/{src/__tests__/utils/index.ts → __tests__/utils/index.d.ts} +0 -0
- /package/{src/api/index.ts → api/index.d.ts} +0 -0
- /package/{src/components/index.ts → components/index.d.ts} +0 -0
- /package/{src/composables/index.ts → composables/index.d.ts} +0 -0
- /package/{src/constants/index.ts → constants/index.d.ts} +0 -0
- /package/{src/event-buses/index.ts → event-buses/index.d.ts} +0 -0
- /package/{public/favicon.ico → favicon.ico} +0 -0
- /package/{src/plugins/index.ts → plugins/index.d.ts} +0 -0
- /package/{src/shims.d.ts → shims.d.ts} +0 -0
- /package/{src/types/index.ts → types/index.d.ts} +0 -0
- /package/{src/utils/index.ts → types/utils/index.d.ts} +0 -0
package/tsconfig.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": ".",
|
|
5
|
-
"outDir": "dist",
|
|
6
|
-
"target": "esnext",
|
|
7
|
-
"module": "esnext",
|
|
8
|
-
"allowJs": true,
|
|
9
|
-
"importHelpers": true,
|
|
10
|
-
"incremental": false,
|
|
11
|
-
"allowSyntheticDefaultImports": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"baseUrl": ".",
|
|
14
|
-
"types": ["vitest/globals", "unplugin-icons/types/vue"],
|
|
15
|
-
"paths": {
|
|
16
|
-
"@/*": ["src/*"],
|
|
17
|
-
"n8n-design-system/*": ["../design-system/src/*"]
|
|
18
|
-
},
|
|
19
|
-
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
|
|
20
|
-
// TODO: remove all options below this line
|
|
21
|
-
"noUnusedLocals": false,
|
|
22
|
-
"useUnknownInCatchVariables": false
|
|
23
|
-
},
|
|
24
|
-
"include": ["src/**/*.ts", "src/**/*.vue", "**/*.d.ts"]
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
package/vite.config.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath, URL } from 'node:url';
|
|
2
|
-
|
|
3
|
-
import { defineConfig } from 'vite';
|
|
4
|
-
import { resolve } from 'path';
|
|
5
|
-
import vue from '@vitejs/plugin-vue';
|
|
6
|
-
import icons from 'unplugin-icons/vite';
|
|
7
|
-
import dts from 'vite-plugin-dts';
|
|
8
|
-
|
|
9
|
-
const includeVue = process.env.INCLUDE_VUE === 'true';
|
|
10
|
-
|
|
11
|
-
// https://vitejs.dev/config/
|
|
12
|
-
export default defineConfig({
|
|
13
|
-
plugins: [
|
|
14
|
-
vue(),
|
|
15
|
-
icons({
|
|
16
|
-
compiler: 'vue3',
|
|
17
|
-
}),
|
|
18
|
-
dts(),
|
|
19
|
-
],
|
|
20
|
-
resolve: {
|
|
21
|
-
alias: {
|
|
22
|
-
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
define: {
|
|
26
|
-
'process.env.NODE_ENV': process.env.NODE_ENV ? `"${process.env.NODE_ENV}"` : '"development"',
|
|
27
|
-
},
|
|
28
|
-
build: {
|
|
29
|
-
emptyOutDir: !includeVue,
|
|
30
|
-
lib: {
|
|
31
|
-
entry: resolve(__dirname, 'src', 'index.ts'),
|
|
32
|
-
name: 'N8nChat',
|
|
33
|
-
fileName: (format) => (includeVue ? `chat.bundle.${format}.js` : `chat.${format}.js`),
|
|
34
|
-
},
|
|
35
|
-
rollupOptions: {
|
|
36
|
-
// make sure to externalize deps that shouldn't be bundled
|
|
37
|
-
// into your library
|
|
38
|
-
external: includeVue ? [] : ['vue'],
|
|
39
|
-
output: {
|
|
40
|
-
exports: 'named',
|
|
41
|
-
// Provide global variables to use in the UMD build
|
|
42
|
-
// for externalized deps
|
|
43
|
-
globals: includeVue
|
|
44
|
-
? {}
|
|
45
|
-
: {
|
|
46
|
-
vue: 'Vue',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
});
|
package/vitest.config.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
-
import { mergeConfig, defineConfig } from 'vite';
|
|
3
|
-
import { configDefaults } from 'vitest/config';
|
|
4
|
-
import viteConfig from './vite.config';
|
|
5
|
-
|
|
6
|
-
export default mergeConfig(
|
|
7
|
-
viteConfig,
|
|
8
|
-
defineConfig({
|
|
9
|
-
test: {
|
|
10
|
-
globals: true,
|
|
11
|
-
environment: 'jsdom',
|
|
12
|
-
exclude: [...configDefaults.exclude, 'e2e/*'],
|
|
13
|
-
root: fileURLToPath(new URL('./', import.meta.url)),
|
|
14
|
-
setupFiles: ['./src/__tests__/setup.ts'],
|
|
15
|
-
transformMode: {
|
|
16
|
-
web: [/\.[jt]sx$/],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
}),
|
|
20
|
-
);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|