@appcues/web-sdk 7.5.0

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.
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600";html{font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif}html *{box-sizing:border-box}a{cursor:pointer}html body{margin:0}@keyframes nps-enter{0%{opacity:0;transform:translateY(10px)}30%{opacity:0}to{opacity:1;transform:translateY(0)}}@keyframes nps-complete{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(10px) scale(0)}}.appcues-nps{text-align:center;position:fixed;bottom:0;box-shadow:0 0 30px #0000001a;margin-left:auto;margin-right:auto;width:75%;right:0;left:0;border-radius:5px 5px 0 0;padding-right:0;z-index:10000001}.nps-modal{padding-top:40px;text-align:center;width:100%;border-radius:5px 5px 0 0}.nps-modal.collapsed{height:0}.nps-modal.qualitative{height:225px}.ask-me-later{font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;position:absolute;justify-content:center;align-items:center;display:flex;top:0;left:0;font-size:15px;padding:8px 16px 10px;border-top-left-radius:5px;border-bottom-right-radius:5px;background-color:#ccc2;min-width:130px}.ask-me-later:hover{background-color:#ccc5}.close-icon{display:flex;font-size:16px;padding-right:8px}.ask-me-later-text{display:flex}.back-to-nps{font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;position:absolute;justify-content:center;align-items:center;display:flex;top:0;right:0;font-size:15px;padding:8px 16px 10px;border-top-right-radius:5px;border-bottom-left-radius:5px;background-color:#ccc2;min-width:130px}.back-to-nps:hover{background-color:#0003}.quantitative-question{font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;font-size:18px;height:100%;width:100%;margin-left:auto;margin-right:auto;max-width:700px;overflow-y:auto;padding-bottom:12px;text-align:center}.qualitative-question{font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;font-size:18px;height:100%;width:95%;margin-left:auto;margin-right:auto;max-width:600px;overflow-y:auto}.question-text{font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;font-size:18px;padding:0 5px}.qualitative-question textarea{font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;font-size:14px;height:90px;margin:8px 0 12px;width:100%;border-radius:3px;border:2px solid rgba(199,199,199,.3333333333);background-color:#c7c7c722;padding:.5rem}.nps-number-option{position:relative}.nps-number-input{position:absolute;opacity:0;margin-left:auto;margin-right:auto;left:0;right:0;height:100%;margin-top:0}.nps-number-input:focus+.nps-number-link{outline:#0000EE auto 1px}.nps-number-link{margin:auto 1px;padding:5px 0;border-radius:3px;font-weight:700;text-decoration:none;width:34px;height:33px;opacity:.9;transition:opacity .1s ease-out,transform .15s ease-out,box-shadow .15s ease-out;text-align:center;display:block;cursor:pointer}.nps-number-link:hover{background-color:#fff;opacity:1;box-shadow:0 4px #fff3;transform:translateY(-3px) scale(1.06)}.selected-nps{background-color:#fff}.nps-options{display:flex;justify-content:space-between;text-align:center;width:100%;max-width:500px;margin:1.5em auto 8px;border:none;padding:0}.buttons{display:flex;justify-content:space-between;align-items:center}.buttons a{text-decoration:none;padding:7px 14px;border-radius:3px;font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;font-weight:600;font-size:15px;color:#fff;opacity:.9}.buttons a:hover{opacity:1}.appcues-powdered-by-wrapper{display:inline-block;width:200px}.buttons .appcues-powered-by-text{text-align:left;padding-bottom:2px}.buttons .appcues-powered-by-text a{padding:0;color:#bebebe;mix-blend-mode:luminosity;font-size:14px;font-weight:400;opacity:.5}.buttons .appcues-powered-by-text a span{margin-left:4px}.feedback-tab{bottom:0;right:0;margin:0;display:none;overflow:hidden}.feedback-tab.collapsed{display:block}.satisfaction-feedback{padding:8px;float:left;width:125px;height:40px;border-radius:5px 5px 0 0;text-align:center;box-shadow:0 0 1px #0003}.character-count{padding:12px;font-size:13px;font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;display:inline-block}.numerator-character-count.disabled{font-weight:700}.confirmation-toast{margin:7px;padding-left:8px;padding-right:8px;height:25px;font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;font-size:15px;line-height:25px;text-align:center;border-radius:5px;float:left;box-shadow:0 0 1px #0003;opacity:0;position:absolute;right:0}.feedback-link{text-decoration:none;margin:0;width:125px;height:40px;flex-grow:1;color:#fff;display:block}.frame-container{position:relative;margin:0 -4px;border:0px solid;padding-bottom:65%;height:0}.context-hints{max-width:520px;display:flex;justify-content:space-between;margin-left:auto;margin-right:auto;padding-bottom:10px}.not-likely-hint{text-align:left;padding-left:15px;padding-top:0;font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;font-size:13px;flex-grow:0}.very-likely-hint{text-align:right;padding-right:15px;padding-top:0;font-family:Source Sans Pro,Helvetica Neue,Helvetica,sans-serif;font-size:13px;flex-grow:0}.submit-button{padding:8px 20px}.submit-button.disabled{pointer-events:none;cursor:default;opacity:.6}@media (max-width: 1175px){.appcues-nps{border-radius:0;margin-left:0;margin-right:0;width:100%}}@media (max-width: 670px){.not-likely-hint,.very-likely-hint{padding-top:0}.ask-me-later{font-size:12px;padding:8px;min-width:100px}.back-to-nps{min-height:36px;font-size:12px;padding:8px;min-width:100px}.confirmation-toast{display:none}}@media (max-width: 500px){.appcues-nps{border-radius:0;margin-left:0;margin-right:0}.appcues-nps.qualitative{padding-top:40px;height:270px}.confirmation-toast{display:none}.nps-number-link{width:32px}.not-likely-hint{padding-left:5px}.very-likely-hint{padding-right:5px}}
@@ -0,0 +1 @@
1
+ .banner-wrapper{position:fixed;bottom:0;width:100%;display:flex;justify-content:center}.banner-background{display:flex;align-items:center;justify-content:space-between;background-color:#ffaa39;min-width:500px;padding:1rem 1.5rem;border-radius:6px 6px 0 0;box-shadow:2px 4px 8px #00000080;color:#fff;font-size:16px;font-family:Helvetica,sans-serif}.banner-content{display:flex}.banner-header{padding-right:1rem}.clickable{display:flex;align-items:center;cursor:pointer;color:#fff;text-shadow:-.25px -.25px 0 transparent,.25px .25px transparent;font-weight:300}.clickable:hover{text-shadow:-.25px -.25px 0 white,.25px .25px white}.doc-link{font-size:12px;text-decoration:none}.restart{margin-right:1rem}
@@ -0,0 +1 @@
1
+ code,pre{font-family:Menlo,Monaco,monospace,sans-serif}div,p,ul,ol,table,dl,blockquote,pre{font-size:14px;line-height:1.6em}a[href],a[data-step]{color:#15c;text-decoration:none;cursor:pointer}object,embed,video,img{max-width:100%;width:auto}video,img{height:auto}p,ul,ol,table,dl,figure,blockquote,pre{margin:0 0 15px;border:none;background:none;box-shadow:none}hr{margin-bottom:15px}blockquote{margin-left:1.6em!important;padding-left:0;color:#777;font-style:italic}ul,ol{padding-left:2em}ul ul,ol ol,ul ol,ol ul{margin:2px;padding:0 0 0 2em;border:none}dl dt{font-weight:700}dd{margin-left:1em}table{border-collapse:collapse;font-size:1em;width:100%}table td,table th{padding:5px;border:1px solid #ddd;vertical-align:top}table thead td,table th{font-weight:700;border-bottom-color:#888}code{background-color:#d8d7d7}pre{overflow:auto;padding:1em;border:1px solid #ddd;border-radius:3px;background:#f8f8f8;white-space:pre;font-size:90%;color:#888}hr{display:block;height:1px;border:0;border-top:1px solid #ccc}h1,h2,h3,h4,h5,h6{font-weight:700;color:#000;padding:0;background:none;text-rendering:optimizeLegibility;margin:0 0 .5em}h1,h2,h3,h4{line-height:1.3}h1{font-size:36px}h2{font-size:24px;margin-bottom:.7em}h3{font-size:21px}h4{font-size:18px}h5{font-size:16px}h6{font-size:12px;text-transform:uppercase}.sr-only{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;margin:-1px}.appcues-button{background-color:#ccc;cursor:pointer;padding:8px 18px;color:#fff;font-weight:700;display:inline-block;position:relative;-webkit-font-smoothing:auto;text-decoration:none;border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:background-color .2s ease-out,color .2s ease-out;-moz-transition:background-color .2s ease-out,color .2s ease-out;transition:background-color .2s ease-out,color .2s ease-out}.appcues-button:hover{text-decoration:none;color:#000;background-color:#dedede}.appcues-button.appcues-button-success{background-color:#5cb85c}.appcues-button.appcues-button-success:hover{background-color:#75c375;text-decoration:unset}.appcues-button.appcues-button-success.disabled{background-color:#eaf6ea}.appcues-button[data-step],.appcues-button[href]{color:#fff}html,body{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;display:block;line-height:1;box-shadow:none;opacity:1;box-sizing:content-box;outline:none;border-radius:0;overflow-x:visible;overflow-y:visible;overflow:hidden}body{background:none;font-family:Helvetica Neue,Helvetica,sans-serif;font-size:13px;line-height:1.3}small{font-size:85%}strong,b{font-weight:700}em,i{font-style:italic}.text-muted{color:#888}.appcues-skip,a.appcues-skip[data-step]{font-size:11px;cursor:pointer;color:#888;-webkit-transition:color .2s ease-out;-moz-transition:color .2s ease-out;transition:color .2s ease-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.appcues-skip:hover,a.appcues-skip[data-step]:hover{color:#4baad4}.tooltip{display:table;width:100%;overflow-wrap:break-word}.tooltip p{margin:0 0 15px;line-height:1.6em;font-size:14px;border:none;background:none;box-shadow:none}.tooltip p:last-child{margin-bottom:0}.content{color:#333;display:table-cell}.content.content-top{text-align:center;vertical-align:bottom}.content.content-top .panel{margin-bottom:15px}.content.content-top .panel:before{top:100%;left:50%;position:absolute;height:0;width:0;content:"";z-index:2;border-top:10px solid #ddd;border-left:10px solid transparent;border-right:10px solid transparent;margin-left:-10px}.content.content-top-right{text-align:left;vertical-align:bottom}.content.content-top-right .panel{margin-bottom:15px}.content.content-top-right .panel:before{top:100%;left:10px;position:absolute;height:0;width:0;content:"";z-index:2;border-top:10px solid #ddd;border-left:10px solid transparent;border-right:10px solid transparent}.content.content-top-left{text-align:right;vertical-align:bottom}.content.content-top-left .panel{margin-bottom:15px}.content.content-top-left .panel:before{top:100%;right:10px;position:absolute;height:0;width:0;content:"";z-index:2;border-top:10px solid #ddd;border-left:10px solid transparent;border-right:10px solid transparent}.content.content-right{text-align:left;vertical-align:bottom}.content.content-right .panel{margin-left:15px}.content.content-right .panel:before{top:50%;right:100%;position:absolute;height:0;width:0;content:"";z-index:2;border-right:10px solid #ddd;border-bottom:10px solid transparent;border-top:10px solid transparent;margin-top:-10px}.content.content-right-top{text-align:left;vertical-align:bottom}.content.content-right-top .panel{margin-left:15px}.content.content-right-top .panel:before{right:100%;bottom:10px;position:absolute;height:0;width:0;content:"";z-index:2;border-right:10px solid #ddd;border-bottom:10px solid transparent;border-top:10px solid transparent}.content.content-right-bottom{text-align:left;vertical-align:bottom}.content.content-right-bottom .panel{margin-left:15px}.content.content-right-bottom .panel:before{top:10px;right:100%;position:absolute;height:0;width:0;content:"";z-index:2;border-right:10px solid #ddd;border-bottom:10px solid transparent;border-top:10px solid transparent}.content.content-bottom{text-align:center;vertical-align:top}.content.content-bottom .panel{margin-top:15px}.content.content-bottom .panel:before{bottom:100%;left:50%;position:absolute;height:0;width:0;content:"";z-index:2;border-bottom:10px solid #ddd;border-left:10px solid transparent;border-right:10px solid transparent;margin-left:-10px}.content.content-bottom-right{text-align:left;vertical-align:bottom}.content.content-bottom-right .panel{margin-top:15px}.content.content-bottom-right .panel:before{bottom:100%;left:10px;position:absolute;height:0;width:0;content:"";z-index:2;border-bottom:10px solid #ddd;border-left:10px solid transparent;border-right:10px solid transparent}.content.content-bottom-left{text-align:right;vertical-align:bottom}.content.content-bottom-left .panel{margin-top:15px}.content.content-bottom-left .panel:before{right:10px;bottom:100%;position:absolute;height:0;width:0;content:"";z-index:2;border-bottom:10px solid #ddd;border-left:10px solid transparent;border-right:10px solid transparent}.content.content-left{text-align:right;vertical-align:bottom}.content.content-left .panel{margin-right:15px}.content.content-left .panel:before{top:50%;left:100%;position:absolute;height:0;width:0;content:"";z-index:2;border-left:10px solid #ddd;border-bottom:10px solid transparent;border-top:10px solid transparent;margin-top:-10px}.content.content-left-top{text-align:right;vertical-align:bottom}.content.content-left-top .panel{margin-right:15px}.content.content-left-top .panel:before{bottom:10px;left:100%;position:absolute;height:0;width:0;content:"";z-index:2;border-left:10px solid #ddd;border-bottom:10px solid transparent;border-top:10px solid transparent}.content.content-left-bottom{text-align:right;vertical-align:bottom}.content.content-left-bottom .panel{margin-right:15px}.content.content-left-bottom .panel:before{top:10px;left:100%;position:absolute;height:0;width:0;content:"";z-index:2;border-left:10px solid #ddd;border-bottom:10px solid transparent;border-top:10px solid transparent}.content img{max-width:100%}.content .panel{display:inline-block;min-width:250px;margin-bottom:0;position:relative;text-align:left}.panel{border:1px solid #ddd;background-color:#fff;padding:5px}.panel.panel-default{box-shadow:3px 2px #eee9;margin-left:3px;margin-right:3px;margin-bottom:2px;border-radius:3px}.panel .panel-content{padding:5px}.panel .panel-content-actions{display:table;width:100%;padding:0}.panel .panel-content-actions .appcues-actions-right,.panel .panel-content-actions .appcues-actions-left{display:table-cell;width:50%;padding-top:5px;padding-bottom:5px;vertical-align:middle}.panel .panel-content-actions .appcues-actions-left{text-align:left;font-size:13px;padding-left:5px}.panel .panel-content-actions .appcues-actions-right{text-align:right;padding-right:5px}.panel .panel-content-actions .appcues-skip{cursor:pointer;color:#888;opacity:.5;overflow-wrap:normal}.panel .panel-content-actions .appcues-skip:hover{opacity:1}.panel .panel-content-actions .appcues-button{font-size:85%;padding:5px 14px}.appcues-powered-by-text{text-align:right;padding:5px;line-height:1}.appcues-powered-by-text a{font-family:Helvetica Neue,Helvetica,sans-serif!important;cursor:pointer!important;text-decoration:none!important;color:#888!important;font-size:10px!important}.appcues-powered-by-text a svg{vertical-align:bottom}.appcues-powered-by-text a svg>g,.appcues-powered-by-text a span{-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.appcues-powered-by-text a span{position:relative;margin-left:3px}.appcues-powered-by-text a span:before{content:"";position:absolute;width:100%;height:1px;bottom:-1px;left:0;visibility:hidden;background:#4baad4;-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);-o-transform:scaleX(0);transform:scaleX(0);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.appcues-powered-by-text a:hover,.appcues-powered-by-text a:active,.appcues-powered-by-text a:focus{color:#4baad4}.appcues-powered-by-text a:hover svg>g,.appcues-powered-by-text a:active svg>g,.appcues-powered-by-text a:focus svg>g{fill:#4baad4}.appcues-powered-by-text a:hover span:before,.appcues-powered-by-text a:active span:before,.appcues-powered-by-text a:focus span:before{visibility:visible;-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1);transform:scaleX(1)}.appcues-powered-by-badge{font-family:Helvetica Neue,Helvetica,sans-serif!important;background:#fff6;position:fixed;bottom:16px;left:16px;padding:6px 8px 7px;border-radius:3px;border:1px solid transparent;display:block;z-index:2147483547;box-shadow:0 1px 5px #0003;cursor:pointer;box-sizing:border-box;overflow:hidden;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.appcues-powered-by-badge:before{background-color:#fff;content:"";position:absolute;z-index:-1;top:50%;left:50%;width:100%;height:0;opacity:0;-webkit-transform:translateX(-50%) translateY(-50%) rotate(45deg);-moz-transform:translateX(-50%) translateY(-50%) rotate(45deg);-ms-transform:translateX(-50%) translateY(-50%) rotate(45deg);-o-transform:translateX(-50%) translateY(-50%) rotate(45deg);transform:translate(-50%) translateY(-50%) rotate(45deg);-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;transition:all .2s ease-out}.appcues-powered-by-badge:hover{border-color:#4baad4}.appcues-powered-by-badge:hover:before{height:90px;opacity:1}.appcues-powered-by-badge:hover .appcues-powered-by-content{color:#4baad4!important}.appcues-powered-by-badge:hover .appcues-powered-by-content svg>g{fill:#4baad4}.appcues-powered-by-badge a{cursor:pointer!important;text-decoration:none!important}.appcues-powered-by-badge .appcues-powered-by-content{font-family:Helvetica Neue,Helvetica,sans-serif!important;display:table-row;color:#555!important;-webkit-transition:color .2s ease-in-out;-moz-transition:color .2s ease-in-out;transition:color .2s ease-in-out}.appcues-powered-by-badge .appcues-powered-by-content svg>g{-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.appcues-powered-by-badge .appcues-powered-by-content .logo-container,.appcues-powered-by-badge .appcues-powered-by-content .text-container{display:table-cell;vertical-align:middle;height:20px}.appcues-powered-by-badge .appcues-powered-by-content .logo-container{text-align:center;width:20px}.appcues-powered-by-badge .appcues-powered-by-content .text-container{font-size:12px!important;padding-left:3px;line-height:1}.appcues-powered-by-badge .appcues-powered-by-content .text-container>small{font-size:6px!important;text-transform:uppercase;display:block}.exit-tooltip-container{position:absolute;top:0;right:10px}.exit-tooltip-container .exit-tooltip{color:#888;cursor:pointer;opacity:.5}.exit-tooltip-container .exit-tooltip:hover{opacity:1}
@@ -0,0 +1,295 @@
1
+ import { PUBLIC_ANALYTICS_EVENTS } from './utils/constants';
2
+ declare global {
3
+ interface Window {
4
+ Appcues: AppcuesStub;
5
+ AppcuesBundleSettings?: AppcuesBundleSettings;
6
+ }
7
+ }
8
+ export interface AppcuesSettings {
9
+ version: string;
10
+ release_id: string;
11
+ generic_bundle_path: string;
12
+ generic_bundle_integrity: string;
13
+ styling: unknown;
14
+ integrations: unknown;
15
+ account: unknown;
16
+ custom_events: unknown;
17
+ api_hostname: string;
18
+ }
19
+ export interface AppcuesBundleSettings {
20
+ accountId: string;
21
+ VERSION: string;
22
+ RELEASE_ID: string;
23
+ GENERIC_BUNDLE_DOMAIN: string;
24
+ GENERIC_BUNDLE_PATH: string;
25
+ GENERIC_BUNDLE_INTEGRITY: string;
26
+ API_HOSTNAME: string;
27
+ styling: unknown;
28
+ integrations: unknown;
29
+ account: unknown;
30
+ events: unknown;
31
+ }
32
+ /**
33
+ * All event names you can listen for with `on()`, `off()`, and `once()`.
34
+ * Use `'all'` to listen to every event that fires.
35
+ *
36
+ * @example
37
+ * Appcues.on('flow_completed', () => {});
38
+ * Appcues.on('all', () => {}); // Listen to everything
39
+ */
40
+ export type AppcuesEventName = 'all' | typeof PUBLIC_ANALYTICS_EVENTS[number];
41
+ /**
42
+ * Core Appcues SDK methods
43
+ */
44
+ export interface AppcuesCore {
45
+ /**
46
+ * Identify a user and associate them with properties.
47
+ *
48
+ * @param userId - Unique identifier for the user
49
+ * @param properties - User traits like name, email, plan, etc.
50
+ * @example
51
+ * Appcues.identify('user-123', {
52
+ * name: 'John Doe',
53
+ * email: 'john@example.com'
54
+ * });
55
+ */
56
+ identify(userId: string, properties?: Record<string, any>): void;
57
+ /**
58
+ * Track a custom event with optional properties.
59
+ *
60
+ * @param eventName - Name of the event
61
+ * @param eventProperties - Additional event data
62
+ * @example
63
+ * Appcues.track('button_clicked', { buttonId: 'signup' });
64
+ */
65
+ track(eventName: string, eventProperties?: Record<string, any>): void;
66
+ /**
67
+ * Track a page view. Call this on route changes in SPAs.
68
+ *
69
+ * @param pageName - Optional name for the page
70
+ * @param properties - Additional page properties
71
+ * @example
72
+ * Appcues.page('/dashboard');
73
+ */
74
+ page(pageName?: string, properties?: Record<string, any>): void;
75
+ /**
76
+ * Start an anonymous session without identifying a user.
77
+ *
78
+ * @example
79
+ * Appcues.anonymous();
80
+ */
81
+ anonymous(): void;
82
+ /**
83
+ * Show specific content by its ID.
84
+ *
85
+ * @param contentId - The ID of the flow or checklist to show
86
+ * @example
87
+ * Appcues.show('flow-abc-123');
88
+ */
89
+ show(contentId: string): void;
90
+ /**
91
+ * Clear any currently visible content.
92
+ *
93
+ * @example
94
+ * Appcues.clearShow();
95
+ */
96
+ clearShow(): void;
97
+ /**
98
+ * Listen for SDK events like flow completions or step interactions.
99
+ *
100
+ * @param name - Event name to listen for (use 'all' for all events)
101
+ * @param callback - Function called when the event fires
102
+ * @param context - Optional context for the callback
103
+ * @example
104
+ * Appcues.on('flow_completed', (event) => {
105
+ * console.log('Flow completed:', event.flowName);
106
+ * });
107
+ */
108
+ on(name: AppcuesEventName, callback: (...args: any[]) => void, context?: any): void;
109
+ /**
110
+ * Remove an event listener.
111
+ *
112
+ * @param name - Event name to stop listening for
113
+ * @param callback - The original callback function
114
+ * @param context - The original context (if provided)
115
+ * @example
116
+ * const handler = (event) => console.log(event);
117
+ * Appcues.on('flow_completed', handler);
118
+ * Appcues.off('flow_completed', handler);
119
+ */
120
+ off(name: AppcuesEventName, callback: (...args: any[]) => void, context?: any): void;
121
+ /**
122
+ * Listen for an event only once. Automatically removed after firing.
123
+ *
124
+ * @param name - Event name to listen for
125
+ * @param callback - Function called when the event fires
126
+ * @param context - Optional context for the callback
127
+ * @example
128
+ * Appcues.once('flow_completed', () => {
129
+ * console.log('First flow completed!');
130
+ * });
131
+ */
132
+ once(name: AppcuesEventName, callback: (...args: any[]) => void, context?: any): void;
133
+ /**
134
+ * Reset the SDK and clear the current user's session.
135
+ *
136
+ * @example
137
+ * // Call when user logs out
138
+ * Appcues.reset();
139
+ */
140
+ reset(): void;
141
+ /**
142
+ * Toggle debug mode to see SDK logs in the console.
143
+ *
144
+ * @param on - Enable (true) or disable (false) debug mode
145
+ * @example
146
+ * Appcues.debug(true);
147
+ */
148
+ debug(on?: boolean): void;
149
+ /**
150
+ * Load a launchpad widget into a container element.
151
+ *
152
+ * @param selector - CSS selector for the container element
153
+ * @param options - Configuration options for the launchpad
154
+ * @example
155
+ * Appcues.loadLaunchpad('#help-menu', { position: 'bottom-right' });
156
+ */
157
+ loadLaunchpad(selector: string, options?: Record<string, any>): void;
158
+ /**
159
+ * Identify a group (company, organization) and associate properties.
160
+ *
161
+ * @param groupId - Unique identifier for the group
162
+ * @param properties - Group traits like name, plan, employee count, etc.
163
+ * @example
164
+ * Appcues.group('company-456', {
165
+ * name: 'Acme Corp',
166
+ * plan: 'enterprise'
167
+ * });
168
+ */
169
+ group(groupId: string, properties?: Record<string, any>): void;
170
+ /**
171
+ * Get the current user's properties.
172
+ *
173
+ * @param defer - If true, waits for user to be identified before resolving
174
+ * @returns User properties object or Promise resolving to properties
175
+ * @example
176
+ * // Get current user immediately
177
+ * const user = Appcues.user(false);
178
+ *
179
+ * // Wait for identification
180
+ * const user = await Appcues.user();
181
+ */
182
+ user(defer?: false): Record<string, any>;
183
+ user(defer: true): Promise<Record<string, any>>;
184
+ /**
185
+ * Get the current SDK and account settings.
186
+ *
187
+ * @returns SDK and account configuration object
188
+ * @example
189
+ * const settings = Appcues.settings();
190
+ */
191
+ settings(): Record<string, any>;
192
+ /**
193
+ * Get information about the current content state.
194
+ *
195
+ * @returns Object containing content, ordered content, and current content
196
+ * @example
197
+ * const { currentContent } = Appcues.content();
198
+ */
199
+ content(): {
200
+ content: Record<string, any>;
201
+ orderedContent: any[];
202
+ currentContent: Record<string, any>;
203
+ };
204
+ }
205
+ /**
206
+ * Integration methods for third-party analytics and tracking tools.
207
+ * These automatically sync Appcues events to your connected tools.
208
+ *
209
+ * @example
210
+ * // Enable Segment integration
211
+ * Appcues.initSegment();
212
+ */
213
+ export interface AppcuesIntegrations {
214
+ /** Sync Appcues events to Mixpanel */
215
+ initMixpanel(): void;
216
+ /** Sync Appcues events to Heap */
217
+ initHeap(): void;
218
+ /** Sync Appcues events to Intercom */
219
+ initIntercom(): void;
220
+ /** Sync Appcues events to Customer.io */
221
+ initCIO(): void;
222
+ /** Sync Appcues events to Vero */
223
+ initVero(): void;
224
+ /** Sync Appcues events to Woopra */
225
+ initWoopra(): void;
226
+ /** Sync Appcues events to Amplitude */
227
+ initAmplitude(): void;
228
+ /** Sync Appcues events to Klaviyo */
229
+ initKlaviyo(): void;
230
+ /** Sync Appcues events to Treasure Data */
231
+ initTD(): void;
232
+ /** Sync Appcues events to Lucky Orange */
233
+ initLl(): void;
234
+ /** Sync Appcues events to Calq */
235
+ initCalq(): void;
236
+ /** Sync Appcues events to Kissmetrics */
237
+ initKM(): void;
238
+ /** Sync Appcues events to Google Analytics */
239
+ initGA(): void;
240
+ /** Sync Appcues events to Google Tag Manager */
241
+ initGTM(): void;
242
+ /** Sync Appcues events to Segment */
243
+ initSegment(): void;
244
+ /** Sync Appcues events to Rudderstack */
245
+ initRudderstack(): void;
246
+ /** Sync Appcues events to Braze */
247
+ initBraze(): void;
248
+ /** Sync Appcues events to FullStory */
249
+ initFullStory(): void;
250
+ /** Sync Appcues events to Hotjar */
251
+ initHotjar(): void;
252
+ /** Sync Appcues events to LogRocket */
253
+ initLogRocket(): void;
254
+ }
255
+ export interface AppcuesStub extends Array<any[]>, AppcuesCore, AppcuesIntegrations {
256
+ invoked?: boolean;
257
+ SNIPPET_VERSION?: string;
258
+ [key: string]: any;
259
+ }
260
+ export type SetupOptions = {
261
+ bundleDomain?: string;
262
+ apiHostName?: string;
263
+ };
264
+ export type RequiredSetupOptions = Required<SetupOptions>;
265
+ /**
266
+ * The Appcues SDK public interface.
267
+ * Import and use these methods to integrate Appcues into your app.
268
+ */
269
+ export type AppcuesSDK = AppcuesCore & AppcuesIntegrations & {
270
+ /**
271
+ * Initialize the Appcues SDK with your account ID.
272
+ * Call this once on app startup before identifying users.
273
+ *
274
+ * @param accountId - Your Appcues account ID (found in Settings)
275
+ * @param options - Optional configuration
276
+ * @param options.bundleDomain - Custom bundle domain for self-hosting or pointing to a different region
277
+ * @param options.apiHostName - Custom API hostname when self-hosting
278
+ * @returns Promise that resolves when SDK is ready
279
+ *
280
+ * @example
281
+ * // Basic setup
282
+ * import Appcues from '@appcues/web-sdk';
283
+ *
284
+ * await Appcues.setup('88539');
285
+ * Appcues.identify('user-123');
286
+ *
287
+ * @example
288
+ * // With custom options
289
+ * await Appcues.setup('88539', {
290
+ * apiHostName: 'api.custom-domain.com'
291
+ * });
292
+ */
293
+ setup(accountId: string, options?: SetupOptions): Promise<void>;
294
+ };
295
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/scripts/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE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;IACxB,mCAAmC;IACnC,SAAS,IAAI,IAAI,CAAC;IAClB,uCAAuC;IACvC,aAAa,IAAI,IAAI,CAAC;IACtB,oCAAoC;IACpC,UAAU,IAAI,IAAI,CAAC;IACnB,uCAAuC;IACvC,aAAa,IAAI,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,GAAG,EAAE,CAAC,EAClB,WAAW,EACX,mBAAmB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAClC,mBAAmB,GAAG;IACpB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE,CAAC"}
@@ -0,0 +1,150 @@
1
+ export declare function def<T extends readonly string[]>(names: T): {
2
+ [K in T[number]]: K;
3
+ };
4
+ export declare const WHITELISTED_PROPERTIES: string[];
5
+ export declare const PUBLIC_ANALYTICS_EVENTS: readonly ["flow_started", "flow_completed", "flow_skipped", "flow_aborted", "step_started", "step_completed", "step_skipped", "step_interacted", "step_aborted", "form_submitted", "form_field_submitted", "nps_feedback", "nps_score", "nps_clicked_update_nps_score", "nps_ask_me_later_selected_at", "nps_survey_started", "checklist_shown", "checklist_completed", "checklist_skipped", "checklist_dismissed", "checklist_item_started", "checklist_item_completed", "appcues_custom", "experiment_entered", "v2:experience_started", "v2:step_seen", "v2:icon_seen", "v2:step_interaction", "v2:button_pin_seen"];
6
+ export declare const FORM_PROPERTIES_PREFIX = "_appcuesForm_";
7
+ export declare const USER_SATISFACTION_PREFIX = "_appcuesSatisfaction_";
8
+ export declare const GLOBAL_SETTINGS_KEY = "AppcuesSettings";
9
+ export declare const USER_ID_KEY = "apc_user_id";
10
+ export declare const GROUP_ID_KEY = "apc_group_id";
11
+ export declare const LOCAL_ID_KEY = "apc_local_id";
12
+ export declare const NEXT_CONTENT_ID_KEY = "apc_next_content_id";
13
+ export declare const USER_PROPERTIES_KEY = "apc_user";
14
+ export declare const DEBUG_KEY = "apc_debug_enabled";
15
+ export declare const DEBUG_URL_KEY = "apc_debug_url";
16
+ export declare const ANNOTATIONS_ERROR_KEY = "apc_ann_errors";
17
+ export declare const CURRENT_FLOW_KEY = "apc_curr_flow";
18
+ export declare const CURRENT_CHECKLIST_KEY = "apc_curr_checklist";
19
+ export declare const CHECKLIST_PREFIX = "apc_cl:";
20
+ export declare const FOLLOWED_TEST_LINK_KEY = "apc_followed_test_link";
21
+ export declare const LOCAL_STORAGE = "localStorage";
22
+ export declare const SESSION_STORAGE = "sessionStorage";
23
+ export declare const ANNOTATION_ERROR_EXPIRY_IN_S: number;
24
+ export declare const SpecialEvents: {
25
+ PAGE_VIEW: string;
26
+ };
27
+ export declare const ContentStatus: {
28
+ PENDING: "PENDING";
29
+ STARTED: "STARTED";
30
+ CALCULATING_POSITIONS: "CALCULATING_POSITIONS";
31
+ READY: "READY";
32
+ WILL_SHOW: "WILL_SHOW";
33
+ SHOWING: "SHOWING";
34
+ WILL_CLOSE: "WILL_CLOSE";
35
+ ERROR: "ERROR";
36
+ FETCHING: "FETCHING";
37
+ RUNNING: "RUNNING";
38
+ DISMISSED: "DISMISSED";
39
+ HIDING: "HIDING";
40
+ };
41
+ export declare const VisibleContentStatus: ("READY" | "WILL_SHOW" | "SHOWING" | "WILL_CLOSE")[];
42
+ export declare const CloseType: {
43
+ COMPLETED: "COMPLETED";
44
+ SKIPPED: "SKIPPED";
45
+ SHOWING_OTHER_CONTENT: "SHOWING_OTHER_CONTENT";
46
+ CLEAR: "CLEAR";
47
+ };
48
+ export declare const QualificationReason: {
49
+ EVENT_TRIGGER: string;
50
+ PAGE_VIEW: string;
51
+ };
52
+ export declare const ContentType: {
53
+ MODAL: string;
54
+ HOTSPOTS: string;
55
+ SEQUENTIAL_HOTSPOTS: string;
56
+ DEBUGGER: string;
57
+ JOURNEY: string;
58
+ ACTION: string;
59
+ SATISFACTION_SURVEY: string;
60
+ CHECKLIST: string;
61
+ TEST_MODE: string;
62
+ WIDGET: string;
63
+ ANNOTATION: string[];
64
+ };
65
+ export declare const ActionStepType: {
66
+ REDIRECT: string;
67
+ WAIT_FOR_PAGE: string;
68
+ SHOW_FLOW: string;
69
+ };
70
+ export declare const DEFAULT_PAGE_CHECK_LIMIT = 2;
71
+ export declare const ChecklistProgress: {
72
+ NEW: string;
73
+ STARTED: string;
74
+ COMPLETED: string;
75
+ DISMISSED: string;
76
+ SHOWN_MANUALLY: string;
77
+ };
78
+ export declare const ChecklistViewState: {
79
+ EXPANDED: string;
80
+ COLLAPSED: string;
81
+ FIRSTVIEW: string;
82
+ };
83
+ export declare const ChecklistOpenBehavior: {
84
+ OPENED: string;
85
+ CLOSED: string;
86
+ OPEN_ONCE: string;
87
+ };
88
+ export declare const IGNORE_ERRORS_ACCOUNTS: string[];
89
+ export declare const INTERFACE_FUNCTIONS: string[];
90
+ export declare const PROMISE_INTERFACE_FUNCTIONS: string[];
91
+ export declare const SCROLL_PADDING = 200;
92
+ export declare const SCROLL_INCREMENT = 20;
93
+ export declare const MIN_SCROLL_DURATION = 300;
94
+ export declare const MAX_SCROLL_DURATION = 700;
95
+ export declare const MAX_Z_INDEX = 2147483647;
96
+ export declare const BEACON_WIDTH_PX = 24;
97
+ export declare const ARROW_WIDTH_PX = 20;
98
+ export declare const ARROW_OFFSET = 10;
99
+ export declare const TOOLTIP_BORDER_WIDTH_PX = 1;
100
+ export declare const TOOLTIP_SHADOW_WIDTH_PX = 3;
101
+ export declare const TaskNames: {
102
+ CALCULATE: string;
103
+ };
104
+ export declare const ConditionType: {
105
+ WAIT_FOR_ONE_ELEMENT: "WAIT_FOR_ONE_ELEMENT";
106
+ WAIT_FOR_MOUSE_EVENT: "WAIT_FOR_MOUSE_EVENT";
107
+ };
108
+ export declare const ELEMENT_POLL_RATE = 200;
109
+ export declare const FlowLifecycleEvents: {
110
+ STEP_ATTEMPTED: "STEP_ATTEMPTED";
111
+ STEP_SHOWN: "STEP_SHOWN";
112
+ STEP_COMPLETED: "STEP_COMPLETED";
113
+ STEP_SKIPPED: "STEP_SKIPPED";
114
+ STEP_END: "STEP_END";
115
+ STEP_INTERACTED: "STEP_INTERACTED";
116
+ STEP_ERRORED: "STEP_ERRORED";
117
+ CHILD_ACTIVATED: "CHILD_ACTIVATED";
118
+ CHILD_DEACTIVATED: "CHILD_DEACTIVATED";
119
+ CHILDREN_ERRORED: "CHILDREN_ERRORED";
120
+ CHILDREN_RECOVERED: "CHILDREN_RECOVERED";
121
+ CHILD_NEXT: "CHILD_NEXT";
122
+ CHILD_RUN: "CHILD_RUN";
123
+ CSS_LOADED: "CSS_LOADED";
124
+ STEP_REVEALED: "STEP_REVEALED";
125
+ };
126
+ export declare const ANNOTATION_SETTLED_TIMEOUT = 1000;
127
+ export declare const DEFAULT_TRANSITION_DURATION = 300;
128
+ export declare const EXIT_TRANSITION_DURATION = 500;
129
+ export declare const ACTIVITY_BATCH_PERIOD_MS = 50;
130
+ export declare const CLOSE_WAIT_TIMEOUT_MS = 3000;
131
+ export declare const BS_URL = "---redacted---";
132
+ export declare const BS_VER = "3.0.7";
133
+ export declare const TOOLTIP_SKIPPABLE_DISPLAY_TYPES: {
134
+ TEXT: string;
135
+ EXIT_SYMBOL: string;
136
+ };
137
+ export declare const ACCESSIBILITY_ATTRIBUTES: {
138
+ LABEL_HOTSPOTS_TOOLTIPS: string;
139
+ LABEL_HOTSPOT: string;
140
+ LABEL_TOOLTIP: string;
141
+ LABEL_CHECKLIST: string;
142
+ ROLE_CONTAINER: string;
143
+ ROLE_TOOLTIP: string;
144
+ HASPOPUP_TOOLTIP: string;
145
+ };
146
+ export declare const NEXT_CONTENT_TIMEOUT = 60000;
147
+ export declare const SESSION_KEY = "apc_session";
148
+ export declare const DEFAULT_SESSION_DURATION = 30;
149
+ export declare const LAUNCHPAD_SEARCH_EVENT = "launchpad_kb_search";
150
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/scripts/utils/constants.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,MAAM,EAAE,EAC7C,KAAK,EAAE,CAAC,GACP;KAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;CAAE,CAKzB;AAID,eAAO,MAAM,sBAAsB,UAoBlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,ylBA8B1B,CAAC;AAEX,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,wBAAwB,0BAA0B,CAAC;AAGhE,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,SAAS,sBAAsB,CAAC;AAC7C,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AACtD,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,qBAAqB,uBAAuB,CAAC;AAC1D,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAG/D,e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;;;;;;;;;;;;;;CAgBrB,CAAC;AAEZ,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAC/C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAG5C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAI3C,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAK1C,eAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,eAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,eAAO,MAAM,+BAA+B;;;CAG3C,CAAC;AAIF,eAAO,MAAM,wBAAwB;;;;;;;;CAQpC,CAAC;AAGF,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAG1C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAG3C,eAAO,MAAM,sBAAsB,wBAAwB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "@appcues/web-sdk",
3
+ "version": "7.5.0",
4
+ "description": "The Appcues Javascript SDK",
5
+ "main": "build/index.npm.js",
6
+ "types": "build/index.npm.d.ts",
7
+ "engines": {
8
+ "node": ">=23",
9
+ "npm": ">=8"
10
+ },
11
+ "files": [
12
+ "build/**/**",
13
+ "./CHANGELOG.md"
14
+ ],
15
+ "exports": {
16
+ ".": {
17
+ "types": "./build/index.npm.d.ts",
18
+ "default": "./build/index.npm.js"
19
+ },
20
+ "./injectable": "./build/appcues.injectable.js",
21
+ "./modal.css": "./build/modal.css",
22
+ "./tooltip.css": "./build/tooltip.css",
23
+ "./container.css": "./build/container.css",
24
+ "./modal-step-legacy-render.css": "./build/modal-step-legacy-render.css"
25
+ },
26
+ "scripts": {
27
+ "start:sdk:dev": "APPCUES_APP=javascript-sdk DEBUG=true AWS_REGION=us-west-2 saml2aws exec -- vite dev --mode development",
28
+ "build:sdk": "APPCUES_APP=javascript-sdk vite build",
29
+ "build:sdk:npm": "APPCUES_APP=javascript-sdk NPM_BUILD=true vite build && npm run build:types",
30
+ "build:types": "tsc --emitDeclarationOnly --declaration --declarationMap --skipLibCheck --outDir build src/scripts/index.npm.ts",
31
+ "build": "APPCUES_FACET=main PACKAGE=true APPCUES_APP=javascript-sdk vite build",
32
+ "start:sdk:injectable": "DEBUG=true APPCUES_FACET=main PACKAGE=true APPCUES_APP=javascript-sdk AWS_REGION=us-west-2 saml2aws exec -- vite build --mode development --watch & npx servor ./build/ . 8082 --secure",
33
+ "e2e": "turbo run build:sdk --env-mode=loose && concurrently \"servor ./build/$APPCUES_ENV/ index.html 8082 --secure\" \"playwright test\"",
34
+ "e2e:ci": "concurrently --kill-others --success first \"servor ./build/$APPCUES_ENV/ index.html 8082 --secure\" \"playwright test\"",
35
+ "e2e:ui": "turbo run build:sdk --env-mode=loose && concurrently \"servor ./build/$APPCUES_ENV/ index.html 8082 --secure\" \"playwright test --ui\"",
36
+ "test": "./test_all.sh",
37
+ "karma": "karma start ./test/karma.conf.js",
38
+ "jest": "jest --color --watch",
39
+ "test:watch": "concurrently \"npm run test\" \"npm run test:watch --ws --if-present\""
40
+ },
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git://github.com/appcues/javascript-sdk.git"
44
+ },
45
+ "author": "team@appcues.com",
46
+ "devDependencies": {
47
+ "@appcues/opscues": "^0.5.0",
48
+ "@appcues/stylecues": "^2.2.1",
49
+ "@types/glob": "^8.1.0",
50
+ "aws-sdk": "^2.869.0",
51
+ "babel-jest": "^26.6.3",
52
+ "bourbon": "^4.2.7",
53
+ "chai": "^3.4.1",
54
+ "chai-as-promised": "^5.2.0",
55
+ "chai-dom": "1.8.0",
56
+ "clone": "^2.1.2",
57
+ "concurrently": "^6.4.0",
58
+ "cross-env": "^7.0.3",
59
+ "deep-freeze": "0.0.1",
60
+ "dom-testing-library": "^3.11.3",
61
+ "glob": "^11.0.3",
62
+ "jest": "^26.6.3",
63
+ "karma": "^6.4.4",
64
+ "karma-browserstack-launcher": "^1.6.0",
65
+ "karma-chai": "^0.1.0",
66
+ "karma-chai-as-promised": "^0.1.2",
67
+ "karma-chai-dom": "^1.1.0",
68
+ "karma-chai-sinon": "^0.1.4",
69
+ "karma-chrome-launcher": "^3.2.0",
70
+ "karma-coverage": "^0.5.3",
71
+ "karma-firefox-launcher": "^0.1.7",
72
+ "karma-mocha": "^2.0.1",
73
+ "karma-mocha-reporter": "^2.2.5",
74
+ "karma-sinon": "^1.0.4",
75
+ "karma-vite": "^1.0.5",
76
+ "lodash-match-pattern": "^1.1.0",
77
+ "mocha": "^2.3.4",
78
+ "mock-raf": "^0.1.0",
79
+ "node-sass": "npm:sass@^1.54.0",
80
+ "redux-logger": "^3.0.6",
81
+ "rimraf": "^3.0.2",
82
+ "sanitize-html": "^2.3.3",
83
+ "sass-embedded": "^1.90.0",
84
+ "simulant": "^0.2.2",
85
+ "sinon": "^1.17.2",
86
+ "sinon-chai": "^2.8.0",
87
+ "typescript": "^5.9.2",
88
+ "vite": "^7.1.3",
89
+ "vite-plugin-checker": "^0.10.2",
90
+ "vite-tsconfig-paths": "^5.1.4"
91
+ },
92
+ "dependencies": {
93
+ "@webcomponents/custom-elements": "^1.6.0",
94
+ "get-root-node-polyfill": "^1.0.0",
95
+ "phoenix": "^1.7.21",
96
+ "redux": "^5.0.1",
97
+ "redux-saga": "^0.16.2",
98
+ "snabbdom": "^3.6.3",
99
+ "snabbdom-iframe-domapi": "^1.0.0",
100
+ "snabbdom-jsx": "^0.4.2",
101
+ "snabbdom-virtualize": "npm:@appcues/snabbdom-virtualize@^1.1.0",
102
+ "url-parse": "^1.5.10"
103
+ }
104
+ }