@marketrix.ai/widget 3.8.346 → 3.8.359
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/README.md +11 -0
- package/dist/src/services/StorageService.d.ts +1 -7
- package/dist/src/services/ValidationService.d.ts +1 -6
- package/dist/widget.mjs +16 -16
- package/dist/widget.mjs.map +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -170,6 +170,17 @@ Returns the active configuration, or `null` if the widget isn't initialized.
|
|
|
170
170
|
|
|
171
171
|
Widget settings are managed in the dashboard. `widget_appearance: 'hidden'` keeps the widget initialized but suppresses its visible UI on the host page; previews remain visible. `widget_greeting_toast` controls the welcome toast, and `widget_recording` enables rrweb session recording. Recording is off by default.
|
|
172
172
|
|
|
173
|
+
#### Session recording privacy
|
|
174
|
+
|
|
175
|
+
When recording is enabled, **every input value is masked** — recordings capture that a field was typed into, never what was typed. To exclude more of your page, add either class to any element:
|
|
176
|
+
|
|
177
|
+
| Class | Effect |
|
|
178
|
+
| ------------------------ | ----------------------------------------------------------- |
|
|
179
|
+
| `mtx-mask` / `rr-mask` | Text content inside the element is masked |
|
|
180
|
+
| `mtx-block` / `rr-block` | The element is replaced by a placeholder and never recorded |
|
|
181
|
+
|
|
182
|
+
Both the `mtx-` and rrweb's native `rr-` prefixes are honoured, so existing `rr-block` / `rr-mask` markup keeps working.
|
|
183
|
+
|
|
173
184
|
### `MarketrixWidget` — React component (preview)
|
|
174
185
|
|
|
175
186
|
For previewing appearance inside a React app (e.g. a settings/configuration screen). Renders into its own Shadow DOM and makes no network calls.
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified widget localStorage under a single key (`marketrix_chat_context`): chat_id, messages, widget state, config.
|
|
3
|
-
*
|
|
4
|
-
* **Canonical implementation** of the `StorageService` mirror pair — the widget owns the read/write
|
|
5
|
-
* lifecycle; `app/src/services/StorageService.ts` must stay byte-identical (modulo its `'../types'`
|
|
6
|
-
* import path). Change storage semantics here first, then copy over to the app mirror.
|
|
7
|
-
*/
|
|
1
|
+
/** Unified widget localStorage (key `marketrix_chat_context`). Canonical StorageService — `app/src/services/StorageService.ts` must stay byte-identical (modulo its `'../types'` import); change semantics here first, then copy to the app mirror. */
|
|
8
2
|
import type { ChatMessage, InstructionType, MarketrixConfig } from '../types';
|
|
9
3
|
/** Serializable ChatMessage: timestamp as string, no videoStream. */
|
|
10
4
|
type StoredMessage = Omit<ChatMessage, 'videoStream' | 'timestamp'> & {
|
|
@@ -6,10 +6,5 @@ export interface WidgetValidationResult {
|
|
|
6
6
|
widget?: WidgetData;
|
|
7
7
|
application?: ApplicationData;
|
|
8
8
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Validates widget config: the widget (marketrix_id + marketrix_key) and its application exist.
|
|
11
|
-
*
|
|
12
|
-
* The keyless `mtxApp` mode is retired — an application id is a guessable integer, not a secret, so
|
|
13
|
-
* it authenticated nothing while granting full agent access under the owning workspace.
|
|
14
|
-
*/
|
|
9
|
+
/** Validates that the widget (marketrix_id + marketrix_key) and its application exist. Keyless `mtxApp` mode is retired — an application id is a guessable integer, so it authenticated nothing while granting full agent access under the workspace. */
|
|
15
10
|
export declare function validateConfig(config: MarketrixConfig): Promise<WidgetValidationResult>;
|