@runwell/shopify-toolkit 0.5.0 → 0.6.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.
package/lib/sync.js
CHANGED
|
@@ -32,8 +32,19 @@ export async function sync(flags) {
|
|
|
32
32
|
// Determine which files to copy: variant files override base files when present
|
|
33
33
|
const fileGroups = (variant && variant.files) || manifest.files || {};
|
|
34
34
|
|
|
35
|
+
// Merge schema defaults under merchant config so {{config.X}} interpolates
|
|
36
|
+
// even when the client did not override every key. Schema lives in
|
|
37
|
+
// module.json config.schema and (for variants) variants.<name>.config_extra.
|
|
38
|
+
const baseSchema = (manifest.config && manifest.config.schema) || {};
|
|
39
|
+
const variantExtra = (variant && variant.config_extra) || {};
|
|
40
|
+
const defaults = {};
|
|
41
|
+
for (const [k, v] of Object.entries({ ...baseSchema, ...variantExtra })) {
|
|
42
|
+
if (v && Object.prototype.hasOwnProperty.call(v, 'default')) defaults[k] = v.default;
|
|
43
|
+
}
|
|
44
|
+
const resolvedConfig = { ...defaults, ...moduleConfig };
|
|
45
|
+
|
|
35
46
|
const interpolationVars = {
|
|
36
|
-
config:
|
|
47
|
+
config: resolvedConfig,
|
|
37
48
|
brand: config.brand,
|
|
38
49
|
client: { name: config.client, store: config.store }
|
|
39
50
|
};
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
{%- assign cycle_seconds = section.settings.fomo_cycle_days | times: 86400 -%}
|
|
63
63
|
{%- assign cycle_position = now_epoch | modulo: cycle_seconds -%}
|
|
64
64
|
{%- assign remaining_seconds = cycle_seconds | minus: cycle_position -%}
|
|
65
|
-
{%- assign remaining_days = remaining_seconds | divided_by: 86400 -%}
|
|
66
65
|
{%- assign end_epoch = now_epoch | plus: remaining_seconds -%}
|
|
67
66
|
{%- assign end_date = end_epoch | date: '%B %e' -%}
|
|
68
67
|
|
package/modules/comparison-table/variants/feature-rows/sections/runwell-comparison-table.liquid
CHANGED
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
{%- endif -%}
|
|
30
30
|
|
|
31
31
|
{%- if section.blocks.size > 0 -%}
|
|
32
|
-
<div style="overflow-x: auto;">
|
|
33
|
-
<table style="width: 100%; border-collapse: collapse; min-width:
|
|
32
|
+
<div style="overflow-x: auto; margin: 0 auto; max-width: 880px;">
|
|
33
|
+
<table style="width: 100%; border-collapse: collapse; min-width: 600px; font-family: var(--font-body-family); font-size: 1.05rem;">
|
|
34
34
|
<thead>
|
|
35
35
|
<tr>
|
|
36
|
-
<th style="text-align: left; padding:
|
|
36
|
+
<th style="text-align: left; width: 55%; padding: 1.1rem 1.2rem 1.1rem 0; font-family: var(--font-body-family); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.55; vertical-align: bottom; border-bottom: 2px solid currentColor;">
|
|
37
37
|
{{ section.settings.feature_label }}
|
|
38
38
|
</th>
|
|
39
|
-
<th style="text-align: center; padding:
|
|
40
|
-
<div style="font-family: var(--font-heading-family); font-style: italic; font-weight: 400; font-size: 1.
|
|
39
|
+
<th style="text-align: center; width: 22.5%; padding: 1.1rem 1rem; vertical-align: bottom; border-bottom: 2px solid currentColor;">
|
|
40
|
+
<div style="font-family: var(--font-heading-family); font-style: italic; font-weight: 400; font-size: 1.4rem; line-height: 1.2;">
|
|
41
41
|
{{ section.settings.brand_name }}
|
|
42
42
|
</div>
|
|
43
43
|
</th>
|
|
44
|
-
<th style="text-align: center; padding:
|
|
45
|
-
<div style="font-family: var(--font-heading-family); font-style: italic; font-weight: 400; font-size: 1.
|
|
44
|
+
<th style="text-align: center; width: 22.5%; padding: 1.1rem 1rem; vertical-align: bottom; border-bottom: 2px solid currentColor;">
|
|
45
|
+
<div style="font-family: var(--font-heading-family); font-style: italic; font-weight: 400; font-size: 1.4rem; line-height: 1.2; opacity: 0.7;">
|
|
46
46
|
{{ section.settings.competitor_name }}
|
|
47
47
|
</div>
|
|
48
48
|
</th>
|
|
@@ -51,21 +51,21 @@
|
|
|
51
51
|
<tbody>
|
|
52
52
|
{%- for block in section.blocks -%}
|
|
53
53
|
<tr {{ block.shopify_attributes }}>
|
|
54
|
-
<td style="padding:
|
|
54
|
+
<td style="padding: 1.05rem 1.2rem 1.05rem 0; vertical-align: middle; border-bottom: 1px solid rgba(0,0,0,0.08); font-weight: 600; line-height: 1.4;">
|
|
55
55
|
{{ block.settings.feature }}
|
|
56
56
|
</td>
|
|
57
|
-
<td style="padding:
|
|
57
|
+
<td style="padding: 1.05rem 1rem; vertical-align: middle; border-bottom: 1px solid rgba(0,0,0,0.08); text-align: center;">
|
|
58
58
|
{%- if block.settings.ours == 'yes' -%}
|
|
59
|
-
<span style="display: inline-block; min-width: 1.6rem; font-weight: 700; color: var(--runwell-rain-forrest, currentColor);">✓</span>
|
|
59
|
+
<span style="display: inline-block; min-width: 1.6rem; font-size: 1.3rem; font-weight: 700; color: var(--runwell-rain-forrest, currentColor);">✓</span>
|
|
60
60
|
{%- elsif block.settings.ours == 'no' -%}
|
|
61
61
|
<span style="display: inline-block; min-width: 1.6rem; opacity: 0.4;">×</span>
|
|
62
62
|
{%- else -%}
|
|
63
63
|
<span style="opacity: 0.92;">{{ block.settings.ours_text }}</span>
|
|
64
64
|
{%- endif -%}
|
|
65
65
|
</td>
|
|
66
|
-
<td style="padding:
|
|
66
|
+
<td style="padding: 1.05rem 1rem; vertical-align: middle; border-bottom: 1px solid rgba(0,0,0,0.08); text-align: center;">
|
|
67
67
|
{%- if block.settings.theirs == 'yes' -%}
|
|
68
|
-
<span style="display: inline-block; min-width: 1.6rem; font-weight: 700; opacity: 0.
|
|
68
|
+
<span style="display: inline-block; min-width: 1.6rem; font-size: 1.3rem; font-weight: 700; opacity: 0.55;">✓</span>
|
|
69
69
|
{%- elsif block.settings.theirs == 'no' -%}
|
|
70
70
|
<span style="display: inline-block; min-width: 1.6rem; opacity: 0.4;">×</span>
|
|
71
71
|
{%- else -%}
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
{%- for r in reviews_json -%}
|
|
17
17
|
{%- assign sum = sum | plus: r.rating -%}
|
|
18
18
|
{%- endfor -%}
|
|
19
|
-
{%- assign avg = sum | divided_by: reviews_json.size | times: 1.0 -%}
|
|
20
19
|
{%- assign avg_int = sum | divided_by: reviews_json.size -%}
|
|
21
20
|
<div class="runwell-reviews__summary">
|
|
22
21
|
<span class="runwell-reviews__stars" aria-label="{{ avg_int }} out of 5">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runwell/shopify-toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|