@nlxai/touchpoint-ui 1.0.4 → 1.0.5-alpha.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/index.html +97 -85
- package/lib/App.d.ts +10 -18
- package/lib/components/Header.d.ts +4 -2
- package/lib/components/Input.d.ts +1 -0
- package/lib/components/Messages.d.ts +1 -0
- package/lib/components/ui/CustomCard.d.ts +24 -0
- package/lib/components/ui/DateInput.d.ts +8 -2
- package/lib/components/ui/IconButton.d.ts +28 -2
- package/lib/components/ui/Icons.d.ts +12 -0
- package/lib/components/ui/TextButton.d.ts +20 -2
- package/lib/index.d.ts +24 -2
- package/lib/index.js +3214 -3003
- package/lib/index.umd.js +41 -41
- package/lib/types.d.ts +42 -1
- package/package.json +7 -7
- package/typedoc.cjs +14 -0
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BotMessage, ConversationHandler } from '@nlxai/chat-core';
|
|
1
|
+
import { Config, BotMessage, ConversationHandler } from '@nlxai/chat-core';
|
|
2
2
|
import { FC } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Window size configuration
|
|
@@ -38,6 +38,12 @@ export type CustomModalityComponent<Data> = FC<{
|
|
|
38
38
|
* Conversation handler instance
|
|
39
39
|
*/
|
|
40
40
|
conversationHandler: ConversationHandler;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the component is enabled
|
|
43
|
+
* We should probably use context and handle disabling interactive components automatically for the user
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
enabled: boolean;
|
|
41
47
|
}>;
|
|
42
48
|
/**
|
|
43
49
|
* The full theme expressed as CSS custom properties
|
|
@@ -144,3 +150,38 @@ export interface Theme {
|
|
|
144
150
|
*/
|
|
145
151
|
outerBorderRadius: string;
|
|
146
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Main Touchpoint creation properties object
|
|
155
|
+
*/
|
|
156
|
+
export interface TouchpointConfiguration {
|
|
157
|
+
/**
|
|
158
|
+
* Connection information for the \@nlxai/chat-core conversation handler
|
|
159
|
+
*/
|
|
160
|
+
config: Config;
|
|
161
|
+
/**
|
|
162
|
+
* Optional window size for the chat window, defaults to `half`
|
|
163
|
+
*/
|
|
164
|
+
windowSize?: WindowSize;
|
|
165
|
+
/**
|
|
166
|
+
* Optional color mode for the chat window, defaults to `dark`
|
|
167
|
+
*/
|
|
168
|
+
colorMode?: ColorMode;
|
|
169
|
+
/**
|
|
170
|
+
* URL of icon used to display the brand in the chat header
|
|
171
|
+
*/
|
|
172
|
+
brandIcon?: string;
|
|
173
|
+
/**
|
|
174
|
+
* URL of icon used on the launch icon in the bottom right when the experience is collapsed.
|
|
175
|
+
*
|
|
176
|
+
* When set to `false`, no launch button is shown at all. When not set or set to `true`, the default launch icon is rendered.
|
|
177
|
+
*/
|
|
178
|
+
launchIcon?: string | boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Optional theme object to override default theme values
|
|
181
|
+
*/
|
|
182
|
+
theme?: Partial<Theme>;
|
|
183
|
+
/**
|
|
184
|
+
* Optional custom modality components to render in Touchpoint
|
|
185
|
+
*/
|
|
186
|
+
customModalities?: Record<string, CustomModalityComponent<any>>;
|
|
187
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nlxai/touchpoint-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5-alpha.1",
|
|
4
4
|
"description": "Web UI for Touchpoint",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"dev": "vite",
|
|
14
14
|
"design-system": "vite --mode design-system",
|
|
15
15
|
"build": "tsc && vite build",
|
|
16
|
-
"docs": "
|
|
16
|
+
"docs": "rm -rf docs/ && typedoc && concat-md --decrease-title-levels --dir-name-as-title docs/ > docs/index.md",
|
|
17
17
|
"lint:check": "eslint src/ --ext .ts,.tsx,.js,.jsx --max-warnings 0",
|
|
18
18
|
"prepublish": "npm run build",
|
|
19
19
|
"lint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix",
|
|
20
20
|
"format": "git ls-files | grep -E '\\.(js|jsx|ts|tsx|css|html)$' | xargs prettier --write",
|
|
21
|
-
"preview-docs": "
|
|
22
|
-
"publish-docs": "
|
|
23
|
-
"test": "
|
|
21
|
+
"preview-docs": "npm run docs && comrak --unsafe --gfm -o docs/index.html docs/index.md && open docs/index.html",
|
|
22
|
+
"publish-docs": "npm run docs && mv docs/index.md ../website/src/content/touchpoint-ui-api-reference.md",
|
|
23
|
+
"test": "typedoc --emit none",
|
|
24
24
|
"tsc": "tsc"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@nlxai/chat-core": "^1.0.
|
|
27
|
+
"@nlxai/chat-core": "^1.0.5-alpha.0",
|
|
28
28
|
"@react-hookz/web": "^25.0.1",
|
|
29
29
|
"@react-input/mask": "^2.0.4",
|
|
30
30
|
"clsx": "^2.1.1",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "e0328435afc01c60e717f630d55299597989d70a"
|
|
60
60
|
}
|
package/typedoc.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @type { import('typedoc').TypeDocOptions & { hideInPageTOC?: boolean, hideBreadcrumbs?: boolean} } */
|
|
2
|
+
module.exports = {
|
|
3
|
+
excludeExternals: true,
|
|
4
|
+
entryPoints: ["./src/index.tsx"],
|
|
5
|
+
hideBreadcrumbs: true,
|
|
6
|
+
hideInPageTOC: true,
|
|
7
|
+
out: "docs",
|
|
8
|
+
plugin: ["typedoc-plugin-markdown"],
|
|
9
|
+
readme: "none",
|
|
10
|
+
sort: ["source-order", "kind", "instance-first", "alphabetical"],
|
|
11
|
+
treatValidationWarningsAsErrors: true,
|
|
12
|
+
treatWarningsAsErrors: true,
|
|
13
|
+
validation: { notExported: true, invalidLink: true, notDocumented: true },
|
|
14
|
+
};
|