@inploi/plugin-chatbot 2.0.0 → 2.1.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.
Files changed (50) hide show
  1. package/cdn/index.js +56 -0
  2. package/{public → cdn}/mockServiceWorker.js +4 -9
  3. package/package.json +25 -5
  4. package/.env +0 -3
  5. package/.env.example +0 -3
  6. package/.eslintrc.cjs +0 -10
  7. package/CHANGELOG.md +0 -85
  8. package/bunfig.toml +0 -2
  9. package/happydom.ts +0 -10
  10. package/index.html +0 -28
  11. package/postcss.config.cjs +0 -7
  12. package/src/chatbot.api.ts +0 -46
  13. package/src/chatbot.constants.ts +0 -9
  14. package/src/chatbot.css +0 -107
  15. package/src/chatbot.dom.ts +0 -17
  16. package/src/chatbot.idb.ts +0 -17
  17. package/src/chatbot.state.ts +0 -89
  18. package/src/chatbot.ts +0 -54
  19. package/src/chatbot.utils.ts +0 -50
  20. package/src/index.cdn.ts +0 -12
  21. package/src/index.dev.ts +0 -36
  22. package/src/index.ts +0 -1
  23. package/src/interpreter/interpreter.test.ts +0 -69
  24. package/src/interpreter/interpreter.ts +0 -241
  25. package/src/mocks/browser.ts +0 -5
  26. package/src/mocks/example.flows.ts +0 -763
  27. package/src/mocks/handlers.ts +0 -28
  28. package/src/ui/chat-bubble.tsx +0 -52
  29. package/src/ui/chat-input/chat-input.boolean.tsx +0 -62
  30. package/src/ui/chat-input/chat-input.file.tsx +0 -213
  31. package/src/ui/chat-input/chat-input.multiple-choice.tsx +0 -117
  32. package/src/ui/chat-input/chat-input.text.tsx +0 -111
  33. package/src/ui/chat-input/chat-input.tsx +0 -81
  34. package/src/ui/chatbot-header.tsx +0 -98
  35. package/src/ui/chatbot.tsx +0 -105
  36. package/src/ui/input-error.tsx +0 -33
  37. package/src/ui/job-application-content.tsx +0 -145
  38. package/src/ui/job-application-messages.tsx +0 -64
  39. package/src/ui/loading-indicator.tsx +0 -37
  40. package/src/ui/send-button.tsx +0 -27
  41. package/src/ui/transition.tsx +0 -1
  42. package/src/ui/typing-indicator.tsx +0 -12
  43. package/src/ui/useChatService.ts +0 -75
  44. package/src/ui/useFocus.ts +0 -10
  45. package/src/vite-env.d.ts +0 -1
  46. package/tailwind.config.ts +0 -119
  47. package/tsconfig.json +0 -33
  48. package/tsconfig.node.json +0 -10
  49. package/types.d.ts +0 -2
  50. package/vite.config.ts +0 -18
@@ -1,119 +0,0 @@
1
- // @ts-expect-error - there aren't any typings for this
2
- import touchPlugin from 'tailwindcss-touch';
3
- import plugin from 'tailwindcss/plugin';
4
- import { Config } from 'tailwindcss/types/config';
5
-
6
- const config: Config = {
7
- content: ['./**/*.{tsx,ts}'],
8
- theme: {
9
- colors: {
10
- transparent: 'transparent',
11
- lowest: 'hsl(var(--i-lowest) / <alpha-value>)',
12
- neutral: {
13
- 1: 'hsl(var(--i-n-1) / <alpha-value>)',
14
- 2: 'hsl(var(--i-n-2) / <alpha-value>)',
15
- 3: 'hsl(var(--i-n-3) / <alpha-value>)',
16
- 4: 'hsl(var(--i-n-4) / <alpha-value>)',
17
- 5: 'hsl(var(--i-n-5) / <alpha-value>)',
18
- 6: 'hsl(var(--i-n-6) / <alpha-value>)',
19
- 7: 'hsl(var(--i-n-7) / <alpha-value>)',
20
- 8: 'hsl(var(--i-n-8) / <alpha-value>)',
21
- 9: 'hsl(var(--i-n-9) / <alpha-value>)',
22
- 10: 'hsl(var(--i-n-10) / <alpha-value>)',
23
- 11: 'hsl(var(--i-n-11) / <alpha-value>)',
24
- 12: 'hsl(var(--i-n-12) / <alpha-value>)',
25
- },
26
-
27
- accent: {
28
- 1: 'hsl(var(--i-a-1) / <alpha-value>)',
29
- 2: 'hsl(var(--i-a-2) / <alpha-value>)',
30
- 3: 'hsl(var(--i-a-3) / <alpha-value>)',
31
- 4: 'hsl(var(--i-a-4) / <alpha-value>)',
32
- 5: 'hsl(var(--i-a-5) / <alpha-value>)',
33
- 6: 'hsl(var(--i-a-6) / <alpha-value>)',
34
- 7: 'hsl(var(--i-a-7) / <alpha-value>)',
35
- 8: 'hsl(var(--i-a-8) / <alpha-value>)',
36
- 9: 'hsl(var(--i-a-9) / <alpha-value>)',
37
- 10: 'hsl(var(--i-a-10) / <alpha-value>)',
38
- 11: 'hsl(var(--i-a-11) / <alpha-value>)',
39
- 12: 'hsl(var(--i-a-12) / <alpha-value>)',
40
- },
41
-
42
- error: {
43
- 1: 'hsl(var(--i-e-1) / <alpha-value>)',
44
- 2: 'hsl(var(--i-e-2) / <alpha-value>)',
45
- 3: 'hsl(var(--i-e-3) / <alpha-value>)',
46
- 4: 'hsl(var(--i-e-4) / <alpha-value>)',
47
- 5: 'hsl(var(--i-e-5) / <alpha-value>)',
48
- 6: 'hsl(var(--i-e-6) / <alpha-value>)',
49
- 7: 'hsl(var(--i-e-7) / <alpha-value>)',
50
- 8: 'hsl(var(--i-e-8) / <alpha-value>)',
51
- 9: 'hsl(var(--i-e-9) / <alpha-value>)',
52
- 10: 'hsl(var(--i-e-10) / <alpha-value>)',
53
- 11: 'hsl(var(--i-e-11) / <alpha-value>)',
54
- 12: 'hsl(var(--i-e-12) / <alpha-value>)',
55
- },
56
- },
57
-
58
- extend: {
59
- boxShadow: {
60
- 'surface-sm': '0px 3px 3px 0px hsl(var(--i-a-12) / 0.03), 0px 4px 4px 0px hsl(var(--i-a-12) / 0.02)',
61
- 'surface-md':
62
- '0px 3px 3px 0px hsl(var(--i-a-12) / 0.03), 0px 6px 4px 0px hsl(var(--i-a-12) / 0.02), 0px 6px 4px 0px hsl(var(--i-a-12) / 0.01)',
63
- 'surface-lg':
64
- '0px 3px 3px 0px hsl(var(--i-a-12) / 0.03), 0px 6px 4px 0px hsl(var(--i-a-12) / 0.02), 0px 11px 4px 0px hsl(var(--i-a-12) / 0.01), 0px 32px 24px -12px hsl(var(--i-a-12) / 0.06)',
65
- },
66
-
67
- keyframes: {
68
- overlayShow: {
69
- from: { opacity: '0' },
70
- to: { opacity: '1' },
71
- },
72
- },
73
- transitionTimingFunction: {
74
- 'expo-out': 'cubic-bezier(0.16, 1, 0.3, 1)',
75
- },
76
- animation: {
77
- overlayShow: 'overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1)',
78
- },
79
- },
80
- },
81
- corePlugins: {
82
- preflight: false,
83
- },
84
-
85
- plugins: [
86
- touchPlugin(),
87
- plugin(({ addUtilities }) => {
88
- addUtilities({
89
- '.gutter-stable': {
90
- 'scrollbar-gutter': 'stable',
91
- },
92
- '.hide-scrollbars': {
93
- '&::-webkit-scrollbar': {
94
- display: 'none',
95
- },
96
- scrollbarWidth: 'none',
97
- '-ms-overflow-style': 'none',
98
- },
99
- '.touch-hitbox': {
100
- '&::before': {
101
- content: "''",
102
- position: 'absolute',
103
- display: 'block',
104
- top: '50%',
105
- left: '50%',
106
- transform: 'translate(-50%, -50%)',
107
- width: '100%',
108
- height: '100%',
109
- minHeight: '44px',
110
- minWidth: '44px',
111
- zIndex: '9999',
112
- },
113
- },
114
- });
115
- }),
116
- ],
117
- };
118
-
119
- export default config;
package/tsconfig.json DELETED
@@ -1,33 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
5
- "module": "ESNext",
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "noEmit": true,
15
- "jsx": "react-jsx",
16
- "jsxImportSource": "preact",
17
-
18
- /* Linting */
19
- "strict": true,
20
- "noFallthroughCasesInSwitch": true,
21
- "noUncheckedIndexedAccess": true,
22
- "types": ["bun-types"],
23
-
24
- "baseUrl": ".",
25
- "paths": {
26
- "react": ["./node_modules/preact/compat/"],
27
- "react-dom": ["./node_modules/preact/compat/"],
28
- "~/*": ["./src/*"]
29
- }
30
- },
31
- "include": ["src", ".eslintrc.cjs", "tailwind.config.ts", "vite.config.ts"],
32
- "references": [{ "path": "./tsconfig.node.json" }]
33
- }
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true
8
- },
9
- "include": ["vite.config.ts"]
10
- }
package/types.d.ts DELETED
@@ -1,2 +0,0 @@
1
- /// <reference lib="dom" />
2
- /// <reference lib="dom.iterable" />
package/vite.config.ts DELETED
@@ -1,18 +0,0 @@
1
- import preact from '@preact/preset-vite';
2
- import { resolve } from 'path';
3
- import { visualizer } from 'rollup-plugin-visualizer';
4
- import { defineConfig } from 'vite';
5
- import tsconfigPaths from 'vite-tsconfig-paths';
6
-
7
- // https://vitejs.dev/config/
8
- export default defineConfig({
9
- build: {
10
- lib: {
11
- formats: ['es'],
12
- entry: resolve(__dirname, 'src/index.cdn.ts'),
13
- name: 'inploi.chatbotPlugin',
14
- },
15
- rollupOptions: {},
16
- },
17
- plugins: [preact(), visualizer(), tsconfigPaths()],
18
- });