@nlxai/touchpoint-ui 1.2.7-alpha.0 → 1.2.7-alpha.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.
Files changed (74) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/eslint.config.js +5 -0
  3. package/index.html +6 -6
  4. package/lib/components/Messages.d.ts +0 -1
  5. package/lib/index.js +21114 -18272
  6. package/lib/index.umd.js +121 -116
  7. package/lib/interface.d.ts +9 -2
  8. package/lib/types.d.ts +1 -1
  9. package/lib/website/ConnectChat.d.ts +9 -0
  10. package/lib/website/index.d.ts +1 -0
  11. package/package.json +15 -17
  12. package/tsdoc.json +15 -2
  13. package/vite.config.ts +8 -4
  14. package/.eslintrc.cjs +0 -5
  15. package/build/App.d.ts +0 -20
  16. package/build/ProviderStack.d.ts +0 -10
  17. package/build/assets/index-B9Yzt2if.js +0 -233
  18. package/build/assets/index-BbXI3y3Q.css +0 -1
  19. package/build/bidirectional/analyzePageForms.d.ts +0 -35
  20. package/build/bidirectional/automaticContext.d.ts +0 -12
  21. package/build/bidirectional/commandHandler.d.ts +0 -5
  22. package/build/bidirectional/debug.d.ts +0 -1
  23. package/build/components/ErrorMessage.d.ts +0 -4
  24. package/build/components/FeedbackComment.d.ts +0 -6
  25. package/build/components/FullscreenError.d.ts +0 -2
  26. package/build/components/FullscreenVoice.d.ts +0 -32
  27. package/build/components/Header.d.ts +0 -20
  28. package/build/components/Input.d.ts +0 -14
  29. package/build/components/Layout.d.ts +0 -23
  30. package/build/components/Messages.d.ts +0 -33
  31. package/build/components/Notice.d.ts +0 -4
  32. package/build/components/Ripple.d.ts +0 -9
  33. package/build/components/RiveAnimation.d.ts +0 -4
  34. package/build/components/SafeMarkdown.d.ts +0 -4
  35. package/build/components/Settings.d.ts +0 -10
  36. package/build/components/Theme.d.ts +0 -4
  37. package/build/components/VoiceMini.d.ts +0 -13
  38. package/build/components/VoiceModalities.d.ts +0 -11
  39. package/build/components/defaultModalities/DefaultCard.d.ts +0 -3
  40. package/build/components/defaultModalities/DefaultCarousel.d.ts +0 -6
  41. package/build/components/defaultModalities/DefaultDateInput.d.ts +0 -5
  42. package/build/components/defaultModalities/shared.d.ts +0 -20
  43. package/build/components/ui/Carousel.d.ts +0 -26
  44. package/build/components/ui/CustomCard.d.ts +0 -101
  45. package/build/components/ui/DateInput.d.ts +0 -30
  46. package/build/components/ui/IconButton.d.ts +0 -68
  47. package/build/components/ui/Icons.d.ts +0 -63
  48. package/build/components/ui/LaunchButton.d.ts +0 -13
  49. package/build/components/ui/LightDarkToggle.d.ts +0 -47
  50. package/build/components/ui/Loader.d.ts +0 -7
  51. package/build/components/ui/MessageButton.d.ts +0 -58
  52. package/build/components/ui/PicturesContainer.d.ts +0 -9
  53. package/build/components/ui/Radio.d.ts +0 -14
  54. package/build/components/ui/TextButton.d.ts +0 -46
  55. package/build/components/ui/Typography.d.ts +0 -29
  56. package/build/components/ui/ViewMediaModal.d.ts +0 -8
  57. package/build/design-system.d.ts +0 -1
  58. package/build/favicon.ico +0 -0
  59. package/build/feedback.d.ts +0 -38
  60. package/build/index.d.ts +0 -63
  61. package/build/index.html +0 -13
  62. package/build/interface.d.ts +0 -569
  63. package/build/mocks/MockText.d.ts +0 -10
  64. package/build/mocks/MockVoice.d.ts +0 -10
  65. package/build/mocks/MockVoiceMini.d.ts +0 -8
  66. package/build/mocks/shared.d.ts +0 -5
  67. package/build/preview.d.ts +0 -10
  68. package/build/types.d.ts +0 -5
  69. package/build/utils/useAppRoot.d.ts +0 -3
  70. package/build/utils/useCopy.d.ts +0 -4
  71. package/build/utils/useTailwindMediaQuery.d.ts +0 -1
  72. package/build/voice.d.ts +0 -70
  73. package/lib/design-system/index.d.ts +0 -1
  74. /package/lib/{design-system → website}/LightDarkToggle.d.ts +0 -0
@@ -222,9 +222,16 @@ export type BidirectionalConfig = {
222
222
  */
223
223
  export interface TouchpointConfiguration {
224
224
  /**
225
- * Connection information for the \@nlxai/core conversation handler
225
+ * Connection information for the \@nlxai/core conversation handler.
226
+ * Required unless `conversationHandler` is provided.
226
227
  */
227
- config: Config;
228
+ config?: Config;
229
+ /**
230
+ * A pre-built conversation handler. When provided, Touchpoint will use this
231
+ * instead of creating one from `config`. This enables adapters like
232
+ * \@nlxai/connect-chat-adapter to power the Touchpoint UI.
233
+ */
234
+ conversationHandler?: ConversationHandler;
228
235
  /**
229
236
  * Optional window size for the chat window, defaults to `half`
230
237
  */
package/lib/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Config } from '@nlxai/core';
2
2
  import { TouchpointConfiguration } from './interface';
3
3
  export type NormalizedTouchpointConfiguration = TouchpointConfiguration & Required<Pick<TouchpointConfiguration, "initializeConversation" | "input">> & {
4
- config: Required<Pick<Config, "conversationId" | "userId" | "bidirectional">>;
4
+ config: Config & Required<Pick<Config, "conversationId" | "userId" | "bidirectional" | "languageCode">>;
5
5
  };
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "nlx-touchpoint": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ export declare const ConnectChat: FC;
@@ -0,0 +1 @@
1
+ export declare const renderWebsite: (element: HTMLElement) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nlxai/touchpoint-ui",
3
- "version": "1.2.7-alpha.0",
3
+ "version": "1.2.7-alpha.2",
4
4
  "description": "Web UI for Touchpoint",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -11,16 +11,13 @@
11
11
  "types": "lib/index.d.ts",
12
12
  "scripts": {
13
13
  "dev": "vite",
14
- "design-system": "vite --mode design-system",
15
- "build:design-system": "vite build --mode design-system",
14
+ "website": "vite --mode website",
15
+ "build:website": "vite build --mode website",
16
16
  "build": "tsc && vite build",
17
- "docs": "rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md",
18
- "lint:check": "eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",
17
+ "lint:check": "eslint src/",
19
18
  "prepublish": "npm run build",
20
- "lint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix",
19
+ "lint": "eslint src/ --fix",
21
20
  "format": "git ls-files | grep -E '\\.(js|jsx|ts|tsx|css|html)$' | xargs prettier --write",
22
- "preview-docs": "npm run docs && comrak --unsafe --gfm -o docs/index.html docs/index.md && open docs/index.html",
23
- "publish-docs": "npm run docs && mv docs/index.md ../website/src/content/touchpoint-ui-api-reference.md",
24
21
  "test": "typedoc --emit none && vitest run",
25
22
  "tsc": "tsc",
26
23
  "update-readme:docs": "rm -rf docs/ && typedoc --excludeExternals --externalPattern src/components/ui/Icons.tsx",
@@ -29,15 +26,16 @@
29
26
  },
30
27
  "dependencies": {
31
28
  "@base-ui/react": "^1.1.0",
32
- "@nlxai/core": "^1.2.6",
29
+ "@nlxai/connect-chat-adapter": "^1.2.7-alpha.2",
30
+ "@nlxai/core": "^1.2.7-alpha.2",
33
31
  "@react-hookz/web": "^25.0.1",
34
32
  "@react-input/mask": "^2.0.4",
35
33
  "@rive-app/webgl2": "^2.31.5",
36
34
  "@types/json-schema": "^7.0.15",
37
35
  "clsx": "^2.1.1",
38
- "dompurify": "^3.3.1",
36
+ "dompurify": "^3.4.11",
39
37
  "htm": "^3.1.1",
40
- "livekit-client": "^2.15.14",
38
+ "livekit-client": "^2.18.9",
41
39
  "marked": "^15.0.4",
42
40
  "ramda": "^0.32.0",
43
41
  "react": "^18.3.1",
@@ -47,6 +45,7 @@
47
45
  "react-textarea-autosize": "^8.5.6"
48
46
  },
49
47
  "devDependencies": {
48
+ "@livekit/throws-transformer": "^0.1.8",
50
49
  "@nlxai/eslint-config": "*",
51
50
  "@rollup/plugin-replace": "^6.0.2",
52
51
  "@tailwindcss/vite": "^4.1.16",
@@ -55,23 +54,22 @@
55
54
  "@types/ramda": "^0.31.1",
56
55
  "@types/react": "^18.3.1",
57
56
  "@types/react-dom": "^18.3.0",
58
- "@typescript-eslint/eslint-plugin": "^7.8.0",
59
- "@typescript-eslint/parser": "^7.8.0",
57
+ "@types/sdp-transform": "^2.4.9",
60
58
  "@vitejs/plugin-react": "^4.2.1",
61
- "@vitest/ui": "^3.2.4",
59
+ "@vitest/ui": "^4.1.0",
62
60
  "dom-accessibility-api": "^0.7.0",
63
61
  "jsdom": "^27.0.1",
64
62
  "tailwindcss": "^4.1.16",
65
63
  "typedoc": "^0.28.14",
66
64
  "typedoc-plugin-markdown": "^4.9.0",
67
65
  "typescript": "^5.4.5",
68
- "vite": "^6.0",
66
+ "vite": "^6.4.3",
69
67
  "vite-plugin-dts": "^4.5.0",
70
- "vitest": "^3.2.4",
68
+ "vitest": "^4.1.0",
71
69
  "zod": "^4.1.5"
72
70
  },
73
71
  "publishConfig": {
74
72
  "access": "public"
75
73
  },
76
- "gitHead": "e7790346d0425fceeb4a35708978251235550d5f"
74
+ "gitHead": "28deac5208ff64f99a3d038050172c1ac9a78630"
77
75
  }
package/tsdoc.json CHANGED
@@ -1,6 +1,19 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
3
- "extends": ["typedoc/tsdoc.json"],
4
3
  "noStandardTags": false,
5
- "tagDefinitions": []
4
+ "tagDefinitions": [
5
+ {
6
+ "tagName": "@category",
7
+ "syntaxKind": "block",
8
+ "allowMultiple": true
9
+ },
10
+ {
11
+ "tagName": "@hidden",
12
+ "syntaxKind": "modifier"
13
+ },
14
+ {
15
+ "tagName": "@inline",
16
+ "syntaxKind": "modifier"
17
+ }
18
+ ]
6
19
  }
package/vite.config.ts CHANGED
@@ -21,14 +21,17 @@ const designSystemEntryPoint = (): PluginOption => {
21
21
  <head>
22
22
  <meta charset="UTF-8" />
23
23
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
24
- <title>Design System</title>
24
+ <title>NLX SDK</title>
25
+ <style>
26
+ html, body, main, nlx-touchpoint { margin: 0; padding: 0px; height: 100%; }
27
+ </style>
25
28
  </head>
26
29
  <body>
27
30
  <main></main>
28
31
  <script type="module">
29
- import { renderDesignSystem } from "./src/design-system/index.tsx";
32
+ import { renderWebsite } from "./src/website/index.tsx";
30
33
 
31
- renderDesignSystem(document.querySelector("main"));
34
+ renderWebsite(document.querySelector("main"));
32
35
  </script>
33
36
  </body>
34
37
  </html>
@@ -55,9 +58,10 @@ const sharedPlugins = (command: "serve" | "build"): PluginOption[] => [
55
58
 
56
59
  // https://vitejs.dev/config/
57
60
  export default defineConfig(({ mode, command }) =>
58
- mode === "design-system"
61
+ mode === "website"
59
62
  ? {
60
63
  plugins: [designSystemEntryPoint(), ...sharedPlugins(command)],
64
+ base: "./",
61
65
  build: {
62
66
  outDir: "build",
63
67
  },
package/.eslintrc.cjs DELETED
@@ -1,5 +0,0 @@
1
- /** @type {import('eslint').Linter.Config } */
2
- module.exports = {
3
- root: true,
4
- extends: ["@nlxai/eslint-config", "@nlxai/eslint-config/documentation"],
5
- };
package/build/App.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import { ConversationHandler } from '@nlxai/core';
2
- import { BidirectionalCustomCommand } from './interface';
3
- import { NormalizedTouchpointConfiguration } from './types';
4
- /**
5
- * Main Touchpoint creation properties object
6
- */
7
- interface Props extends NormalizedTouchpointConfiguration {
8
- embedded: boolean;
9
- onClose: ((event: Event) => void) | null;
10
- enableSettings: boolean;
11
- enabled: boolean;
12
- }
13
- export interface AppRef {
14
- setExpanded: (val: boolean) => void;
15
- getExpanded: () => boolean;
16
- getConversationHandler: () => ConversationHandler;
17
- setCustomBidirectionalCommands: (commands: BidirectionalCustomCommand[]) => void;
18
- }
19
- declare const App: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<AppRef>>;
20
- export default App;
@@ -1,10 +0,0 @@
1
- import { FC, ReactNode } from 'react';
2
- import { Copy, ColorMode, Theme } from './interface';
3
- export declare const ProviderStack: FC<{
4
- colorMode: ColorMode;
5
- className?: string;
6
- theme?: Partial<Theme>;
7
- children?: ReactNode;
8
- languageCode: string;
9
- copy?: Partial<Copy>;
10
- }>;