@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.
- package/.claude/settings.local.json +7 -0
- package/eslint.config.js +5 -0
- package/index.html +6 -6
- package/lib/components/Messages.d.ts +0 -1
- package/lib/index.js +21114 -18272
- package/lib/index.umd.js +121 -116
- package/lib/interface.d.ts +9 -2
- package/lib/types.d.ts +1 -1
- package/lib/website/ConnectChat.d.ts +9 -0
- package/lib/website/index.d.ts +1 -0
- package/package.json +15 -17
- package/tsdoc.json +15 -2
- package/vite.config.ts +8 -4
- package/.eslintrc.cjs +0 -5
- package/build/App.d.ts +0 -20
- package/build/ProviderStack.d.ts +0 -10
- package/build/assets/index-B9Yzt2if.js +0 -233
- package/build/assets/index-BbXI3y3Q.css +0 -1
- package/build/bidirectional/analyzePageForms.d.ts +0 -35
- package/build/bidirectional/automaticContext.d.ts +0 -12
- package/build/bidirectional/commandHandler.d.ts +0 -5
- package/build/bidirectional/debug.d.ts +0 -1
- package/build/components/ErrorMessage.d.ts +0 -4
- package/build/components/FeedbackComment.d.ts +0 -6
- package/build/components/FullscreenError.d.ts +0 -2
- package/build/components/FullscreenVoice.d.ts +0 -32
- package/build/components/Header.d.ts +0 -20
- package/build/components/Input.d.ts +0 -14
- package/build/components/Layout.d.ts +0 -23
- package/build/components/Messages.d.ts +0 -33
- package/build/components/Notice.d.ts +0 -4
- package/build/components/Ripple.d.ts +0 -9
- package/build/components/RiveAnimation.d.ts +0 -4
- package/build/components/SafeMarkdown.d.ts +0 -4
- package/build/components/Settings.d.ts +0 -10
- package/build/components/Theme.d.ts +0 -4
- package/build/components/VoiceMini.d.ts +0 -13
- package/build/components/VoiceModalities.d.ts +0 -11
- package/build/components/defaultModalities/DefaultCard.d.ts +0 -3
- package/build/components/defaultModalities/DefaultCarousel.d.ts +0 -6
- package/build/components/defaultModalities/DefaultDateInput.d.ts +0 -5
- package/build/components/defaultModalities/shared.d.ts +0 -20
- package/build/components/ui/Carousel.d.ts +0 -26
- package/build/components/ui/CustomCard.d.ts +0 -101
- package/build/components/ui/DateInput.d.ts +0 -30
- package/build/components/ui/IconButton.d.ts +0 -68
- package/build/components/ui/Icons.d.ts +0 -63
- package/build/components/ui/LaunchButton.d.ts +0 -13
- package/build/components/ui/LightDarkToggle.d.ts +0 -47
- package/build/components/ui/Loader.d.ts +0 -7
- package/build/components/ui/MessageButton.d.ts +0 -58
- package/build/components/ui/PicturesContainer.d.ts +0 -9
- package/build/components/ui/Radio.d.ts +0 -14
- package/build/components/ui/TextButton.d.ts +0 -46
- package/build/components/ui/Typography.d.ts +0 -29
- package/build/components/ui/ViewMediaModal.d.ts +0 -8
- package/build/design-system.d.ts +0 -1
- package/build/favicon.ico +0 -0
- package/build/feedback.d.ts +0 -38
- package/build/index.d.ts +0 -63
- package/build/index.html +0 -13
- package/build/interface.d.ts +0 -569
- package/build/mocks/MockText.d.ts +0 -10
- package/build/mocks/MockVoice.d.ts +0 -10
- package/build/mocks/MockVoiceMini.d.ts +0 -8
- package/build/mocks/shared.d.ts +0 -5
- package/build/preview.d.ts +0 -10
- package/build/types.d.ts +0 -5
- package/build/utils/useAppRoot.d.ts +0 -3
- package/build/utils/useCopy.d.ts +0 -4
- package/build/utils/useTailwindMediaQuery.d.ts +0 -1
- package/build/voice.d.ts +0 -70
- package/lib/design-system/index.d.ts +0 -1
- /package/lib/{design-system → website}/LightDarkToggle.d.ts +0 -0
package/lib/interface.d.ts
CHANGED
|
@@ -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
|
|
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 @@
|
|
|
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.
|
|
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
|
-
"
|
|
15
|
-
"build:
|
|
14
|
+
"website": "vite --mode website",
|
|
15
|
+
"build:website": "vite build --mode website",
|
|
16
16
|
"build": "tsc && vite build",
|
|
17
|
-
"
|
|
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/ --
|
|
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/
|
|
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.
|
|
36
|
+
"dompurify": "^3.4.11",
|
|
39
37
|
"htm": "^3.1.1",
|
|
40
|
-
"livekit-client": "^2.
|
|
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
|
-
"@
|
|
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": "^
|
|
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.
|
|
66
|
+
"vite": "^6.4.3",
|
|
69
67
|
"vite-plugin-dts": "^4.5.0",
|
|
70
|
-
"vitest": "^
|
|
68
|
+
"vitest": "^4.1.0",
|
|
71
69
|
"zod": "^4.1.5"
|
|
72
70
|
},
|
|
73
71
|
"publishConfig": {
|
|
74
72
|
"access": "public"
|
|
75
73
|
},
|
|
76
|
-
"gitHead": "
|
|
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>
|
|
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 {
|
|
32
|
+
import { renderWebsite } from "./src/website/index.tsx";
|
|
30
33
|
|
|
31
|
-
|
|
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 === "
|
|
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
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;
|
package/build/ProviderStack.d.ts
DELETED
|
@@ -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
|
-
}>;
|