@v-tilt/browser 1.13.0 → 1.13.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/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.chat.js +2 -0
- package/dist/array.chat.js.map +1 -0
- package/dist/array.chat.no-external.js +2 -0
- package/dist/array.chat.no-external.js.map +1 -0
- package/dist/array.full.chat.js +2 -0
- package/dist/array.full.chat.js.map +1 -0
- package/dist/array.full.chat.no-external.js +2 -0
- package/dist/array.full.chat.no-external.js.map +1 -0
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +2 -0
- package/dist/array.full.no-external.js.map +1 -0
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/array.no-external.js.map +1 -1
- package/dist/chat.js +1 -1
- package/dist/chat.js.map +1 -1
- package/dist/entrypoints/all-external-dependencies.d.ts +10 -3
- package/dist/entrypoints/array.chat.d.ts +10 -0
- package/dist/entrypoints/array.chat.no-external.d.ts +6 -0
- package/dist/entrypoints/array.full.chat.d.ts +13 -0
- package/dist/entrypoints/array.full.chat.no-external.d.ts +7 -0
- package/dist/entrypoints/array.full.d.ts +5 -9
- package/dist/entrypoints/array.full.no-external.d.ts +12 -0
- package/dist/entrypoints/module.chat.es.d.ts +7 -0
- package/dist/entrypoints/module.full.chat.es.d.ts +12 -0
- package/dist/entrypoints/module.full.es.d.ts +12 -0
- package/dist/entrypoints/module.no-external.es.d.ts +1 -0
- package/dist/extensions/chat/bubble-drag.d.ts +20 -5
- package/dist/extensions/chat/chat-wrapper.d.ts +8 -2
- package/dist/extensions/chat/chat.d.ts +21 -351
- package/dist/extensions/chat/controller/__tests__/fakes/ably-realtime-fake.d.ts +84 -0
- package/dist/extensions/chat/controller/ably-client.d.ts +160 -0
- package/dist/extensions/chat/controller/ably-handlers.d.ts +95 -0
- package/dist/extensions/chat/controller/ably-token.d.ts +67 -0
- package/dist/extensions/chat/controller/chat-controller.d.ts +194 -0
- package/dist/extensions/chat/controller/message-delivery-status.d.ts +6 -0
- package/dist/extensions/chat/controller/message-order.d.ts +12 -0
- package/dist/extensions/chat/controller/message-stream.d.ts +49 -0
- package/dist/extensions/chat/lib/bubble-offset.d.ts +18 -0
- package/dist/extensions/chat/lib/merge-chat-config.d.ts +3 -0
- package/dist/extensions/chat/normalize-send-content.d.ts +2 -0
- package/dist/extensions/chat/outbox/message-delivery.d.ts +17 -0
- package/dist/extensions/chat/outbox/message-outbox.d.ts +57 -0
- package/dist/extensions/chat/store/chat-store.d.ts +122 -0
- package/dist/extensions/chat/types.d.ts +1 -19
- package/dist/extensions/chat/ui/ChannelItem.d.ts +12 -0
- package/dist/extensions/chat/ui/ChannelListView.d.ts +14 -0
- package/dist/extensions/chat/ui/ChatBubble.d.ts +14 -0
- package/dist/extensions/chat/ui/ChatHeader.d.ts +13 -0
- package/dist/extensions/chat/ui/ChatPanel.d.ts +14 -0
- package/dist/extensions/chat/ui/ChatRoot.d.ts +31 -0
- package/dist/extensions/chat/ui/ClosedBanner.d.ts +7 -0
- package/dist/extensions/chat/ui/ConnectionBanner.d.ts +32 -0
- package/dist/extensions/chat/ui/ConversationView.d.ts +14 -0
- package/dist/extensions/chat/ui/MessageBubble.d.ts +25 -0
- package/dist/extensions/chat/ui/MessageInput.d.ts +14 -0
- package/dist/extensions/chat/ui/MessageList.d.ts +19 -0
- package/dist/extensions/chat/ui/NewMessagesPill.d.ts +13 -0
- package/dist/extensions/chat/ui/Skeletons.d.ts +14 -0
- package/dist/extensions/chat/ui/TypingBubble.d.ts +23 -0
- package/dist/extensions/chat/ui/TypingIndicator.d.ts +12 -0
- package/dist/extensions/chat/ui/WidgetSlot.d.ts +20 -0
- package/dist/extensions/chat/ui/hooks/use-auto-mark-read.d.ts +18 -0
- package/dist/extensions/chat/ui/hooks/use-scroll-preservation.d.ts +33 -0
- package/dist/extensions/chat/ui/icons.d.ts +18 -0
- package/dist/extensions/chat/ui/message-render.d.ts +18 -0
- package/dist/extensions/chat/ui/shadow-styles.d.ts +13 -0
- package/dist/extensions/chat/ui/utils/mobile-body-scroll-lock.d.ts +14 -0
- package/dist/extensions/chat/widget-registry.d.ts +21 -5
- package/dist/extensions/chat/widgets/collect-email.d.ts +4 -2
- package/dist/extensions/chat/widgets/escalate-to-human.d.ts +2 -1
- package/dist/external-scripts-loader.js +1 -1
- package/dist/external-scripts-loader.js.map +1 -1
- package/dist/feature.d.ts +1 -0
- package/dist/lib/merge-vtilt-config.d.ts +9 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.chat.d.ts +1788 -0
- package/dist/module.chat.js +2 -0
- package/dist/module.chat.js.map +1 -0
- package/dist/module.d.ts +48 -3
- package/dist/module.full.chat.d.ts +1792 -0
- package/dist/module.full.chat.js +2 -0
- package/dist/module.full.chat.js.map +1 -0
- package/dist/module.full.d.ts +1793 -0
- package/dist/module.full.js +2 -0
- package/dist/module.full.js.map +1 -0
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.d.ts +48 -3
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/recorder.js.map +1 -1
- package/dist/snippet-stub-methods.d.ts +14 -0
- package/dist/utils/globals.d.ts +53 -27
- package/dist/utils/index.d.ts +8 -0
- package/dist/vtilt.d.ts +6 -1
- package/dist/web-vitals.js.map +1 -1
- package/package.json +74 -71
- package/dist/extensions/chat/chat-styles.d.ts +0 -27
- package/dist/extensions/chat/message-content-styles.d.ts +0 -1
- package/dist/extensions/chat/message-html.d.ts +0 -6
- package/dist/extensions/chat/message-markdown.d.ts +0 -8
- package/dist/extensions/ga4-proxy.d.ts +0 -59
- package/dist/utils/type-utils.d.ts +0 -4
- package/dist/web-vitals.d.ts +0 -81
|
@@ -37,6 +37,25 @@ interface SendChatMessageOptions {
|
|
|
37
37
|
* `markdown` and `html` use the same sanitized rendering as AI/agent messages.
|
|
38
38
|
*/
|
|
39
39
|
format?: "text" | "markdown" | "html";
|
|
40
|
+
/**
|
|
41
|
+
* Marks the message as automatically injected by your site (form submit, CTA,
|
|
42
|
+
* etc.) rather than typed by the visitor in the widget. Stored on the message
|
|
43
|
+
* as `message_source` metadata so the AI can respond appropriately — e.g.
|
|
44
|
+
* `source: "landing_form"`. Slug-like: letters, numbers, `_`, `-`, max 64 chars.
|
|
45
|
+
*/
|
|
46
|
+
source?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Pixel inset of the chat bubble from the viewport edges.
|
|
50
|
+
* Use to clear host floating buttons, cookie banners, or mobile tab bars.
|
|
51
|
+
*/
|
|
52
|
+
interface BubbleOffset {
|
|
53
|
+
/** Distance from the bottom edge (default: 20) */
|
|
54
|
+
bottom?: number;
|
|
55
|
+
/** Distance from the right edge when `position` is `bottom-right` (default: 20) */
|
|
56
|
+
right?: number;
|
|
57
|
+
/** Distance from the left edge when `position` is `bottom-left` (default: 20) */
|
|
58
|
+
left?: number;
|
|
40
59
|
}
|
|
41
60
|
/**
|
|
42
61
|
* Chat bubble appearance and behavior configuration
|
|
@@ -46,6 +65,12 @@ interface BubbleConfig {
|
|
|
46
65
|
draggable?: boolean;
|
|
47
66
|
/** Show the bubble on load (default: true). Set to false to control via vt.chat.show() */
|
|
48
67
|
visible?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Viewport inset in pixels. Prefer this over custom CSS so positioning
|
|
70
|
+
* survives widget UI updates. Pass `null` in `vt.updateConfig({ chat: { bubble: { offset: null } } })` to reset
|
|
71
|
+
* to SDK defaults (20px).
|
|
72
|
+
*/
|
|
73
|
+
offset?: BubbleOffset | null;
|
|
49
74
|
}
|
|
50
75
|
|
|
51
76
|
/**
|
|
@@ -1664,7 +1689,7 @@ declare class VTilt {
|
|
|
1664
1689
|
* Send a chat message. By default uses the active conversation; pass options to
|
|
1665
1690
|
* start a new conversation, target a channel, or open the widget panel.
|
|
1666
1691
|
*/
|
|
1667
|
-
sendChatMessage(content: SendChatMessageContent, options?: SendChatMessageOptions): void
|
|
1692
|
+
sendChatMessage(content: SendChatMessageContent, options?: SendChatMessageOptions): Promise<void>;
|
|
1668
1693
|
/**
|
|
1669
1694
|
* Raw `gtag(...)` passthrough. Queues calls made before the feature is
|
|
1670
1695
|
* enabled or before `gtag.js` has loaded, flushed FIFO once ready. Safe
|
|
@@ -1710,6 +1735,11 @@ declare class VTilt {
|
|
|
1710
1735
|
getDistinctId(): string;
|
|
1711
1736
|
getAnonymousId(): string;
|
|
1712
1737
|
toString(): string;
|
|
1738
|
+
/**
|
|
1739
|
+
* Merge a partial config patch into the live SDK config and notify all features.
|
|
1740
|
+
* Use for any post-`init()` change (autocapture, `chat`, persistence, etc.).
|
|
1741
|
+
* Top-level keys shallow-merge; nested `chat` deep-merges.
|
|
1742
|
+
*/
|
|
1713
1743
|
updateConfig(config: Partial<VTiltConfig>): void;
|
|
1714
1744
|
buildUrl(): string;
|
|
1715
1745
|
buildEndpointUrl(path: string): string;
|
|
@@ -1733,7 +1763,22 @@ declare class VTilt {
|
|
|
1733
1763
|
_dom_loaded(): void;
|
|
1734
1764
|
}
|
|
1735
1765
|
|
|
1766
|
+
/**
|
|
1767
|
+
* Method names registered on the inline `window.vt` stub before `array.js` loads.
|
|
1768
|
+
*
|
|
1769
|
+
* npm / ESM imports (`import { vt } from '@v-tilt/browser'`) do **not** use this
|
|
1770
|
+
* list — `vt` is the real SDK instance. Only the HTML snippet's loader IIFE
|
|
1771
|
+
* needs these names so calls queue in `window.vt._i` until the bundle loads.
|
|
1772
|
+
*
|
|
1773
|
+
* When adding a new public `vt.*` method that integrators may call before
|
|
1774
|
+
* `init()` completes, append it here and update public install docs.
|
|
1775
|
+
*/
|
|
1776
|
+
declare const VTILT_SNIPPET_STUB_METHOD_NAMES: readonly ["init", "capture", "identify", "setUserProperties", "resetUser", "getUserIdentity", "getDeviceId", "getUserState", "alias", "getConfig", "getSessionId", "updateConfig", "setConsent", "on", "once", "off", "startAutocapture", "stopAutocapture", "startSessionRecording", "stopSessionRecording", "openChat", "closeChat", "toggleChat", "showChat", "hideChat", "sendChatMessage", "gtag", "setGoogleUserData"];
|
|
1777
|
+
/** Space-separated stub method string for the minified install snippet. */
|
|
1778
|
+
declare const VTILT_SNIPPET_STUB_METHODS: string;
|
|
1779
|
+
type VtiltSnippetStubMethodName = (typeof VTILT_SNIPPET_STUB_METHOD_NAMES)[number];
|
|
1780
|
+
|
|
1736
1781
|
declare const vt: VTilt;
|
|
1737
1782
|
|
|
1738
|
-
export { ALL_WEB_VITALS_METRICS, DEFAULT_WEB_VITALS_METRICS, VTilt, vt as default, vt };
|
|
1739
|
-
export type { AutocaptureOptions, CaptureOptions, CapturePerformanceConfig, CaptureResult, ChatWidgetConfig, EventPayload, FeatureFlagsConfig, GeolocationData, GoogleAdsConversionMapping, GoogleConsentOverride, GoogleConsentValue, GoogleTagClientConfig, GoogleTagEventMapping, GoogleTagParamMapping, GoogleTagProxyMode, GroupsConfig, IdentityUpdate, PersistenceMethod, Properties, Property, PropertyOperations, RemoteConfig, RequestOptions, SessionData, SessionIdChangedCallback, SessionRecordingMaskInputOptions, SessionRecordingOptions, SupportedWebVitalsMetric, TrackingEvent, UserIdentity, UserProperties, VTiltConfig, WebVitalMetric };
|
|
1783
|
+
export { ALL_WEB_VITALS_METRICS, DEFAULT_WEB_VITALS_METRICS, VTILT_SNIPPET_STUB_METHODS, VTILT_SNIPPET_STUB_METHOD_NAMES, VTilt, vt as default, vt };
|
|
1784
|
+
export type { AutocaptureOptions, CaptureOptions, CapturePerformanceConfig, CaptureResult, ChatWidgetConfig, EventPayload, FeatureFlagsConfig, GeolocationData, GoogleAdsConversionMapping, GoogleConsentOverride, GoogleConsentValue, GoogleTagClientConfig, GoogleTagEventMapping, GoogleTagParamMapping, GoogleTagProxyMode, GroupsConfig, IdentityUpdate, PersistenceMethod, Properties, Property, PropertyOperations, RemoteConfig, RequestOptions, SessionData, SessionIdChangedCallback, SessionRecordingMaskInputOptions, SessionRecordingOptions, SupportedWebVitalsMetric, TrackingEvent, UserIdentity, UserProperties, VTiltConfig, VtiltSnippetStubMethodName, WebVitalMetric };
|