@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/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.4",
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": "echo \"todo\"",
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": "echo \"todo\"",
22
- "publish-docs": "echo \"todo\"",
23
- "test": "echo \"todo\"",
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.4",
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": "27ff05880575d5e4656c5d22dd85d29e9490d9d2"
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
+ };