@runwell/shopify-toolkit 0.15.2 → 0.15.3
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.
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Runwell exit-intent popup. Triggers on mouseleave to top of viewport
|
|
2
2
|
on desktop, after 30s of activity on mobile. Suppressed for 30 days
|
|
3
3
|
after dismiss or sign-up. */
|
|
4
4
|
(function () {
|
|
5
5
|
if (typeof window === 'undefined') return;
|
|
6
|
-
var KEY = '
|
|
6
|
+
var KEY = 'runwell_exit_seen';
|
|
7
|
+
// Migrate from legacy Lushi-flavored key once. Drop after 2026-Q3.
|
|
8
|
+
try {
|
|
9
|
+
var legacy = localStorage.getItem('lushi_exit_seen');
|
|
10
|
+
if (legacy && !localStorage.getItem(KEY)) {
|
|
11
|
+
localStorage.setItem(KEY, legacy);
|
|
12
|
+
localStorage.removeItem('lushi_exit_seen');
|
|
13
|
+
}
|
|
14
|
+
} catch (e) { /* private mode or storage disabled */ }
|
|
7
15
|
var DAYS = 30;
|
|
8
16
|
var modal = document.querySelector('[data-runwell-exit-intent]');
|
|
9
17
|
if (!modal) return;
|
|
@@ -124,11 +124,11 @@
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
function inject() {
|
|
127
|
-
var host = document.querySelector('[data-
|
|
127
|
+
var host = document.querySelector('[data-runwell-upsell]');
|
|
128
128
|
if (host) return host;
|
|
129
129
|
var anchor = document.querySelector('.os-step__info, .os-step, .step__sections, .main__content, main') || document.body;
|
|
130
130
|
var div = document.createElement('div');
|
|
131
|
-
div.setAttribute('data-
|
|
131
|
+
div.setAttribute('data-runwell-upsell', '');
|
|
132
132
|
anchor.appendChild(div);
|
|
133
133
|
return div;
|
|
134
134
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
/*
|
|
2
|
-
"Recently viewed" section on PDP and home. Replaces the
|
|
3
|
-
Viewed" feature from Vitals/Pagefly without the app overhead. */
|
|
1
|
+
/* Runwell recently-viewed: track recently viewed products in localStorage
|
|
2
|
+
and render a "Recently viewed" section on PDP and home. Replaces the
|
|
3
|
+
"Recently Viewed" feature from Vitals/Pagefly without the app overhead. */
|
|
4
4
|
(function () {
|
|
5
5
|
if (typeof window === 'undefined') return;
|
|
6
|
-
var KEY = '
|
|
6
|
+
var KEY = 'runwell_recently_viewed';
|
|
7
|
+
// Migrate from legacy Lushi-flavored key once. Drop after 2026-Q3.
|
|
8
|
+
try {
|
|
9
|
+
var legacy = localStorage.getItem('lushi_recently_viewed');
|
|
10
|
+
if (legacy && !localStorage.getItem(KEY)) {
|
|
11
|
+
localStorage.setItem(KEY, legacy);
|
|
12
|
+
localStorage.removeItem('lushi_recently_viewed');
|
|
13
|
+
}
|
|
14
|
+
} catch (e) { /* private mode or storage disabled */ }
|
|
7
15
|
var MAX = 8;
|
|
8
16
|
|
|
9
17
|
function read() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runwell/shopify-toolkit",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "Reusable Shopify theme modules from Runwell. Replaces typically app-driven features (reviews, wishlist, urgency, FAQ, post-purchase upsell, exit popups, free-ship progress, sticky ATC, testimonials, badges, bundles) with native Liquid + JS + CSS that ship across multiple client themes via a config-driven sync CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|