@runwell/shopify-toolkit 0.12.0 → 0.13.2
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/baseline.js
CHANGED
|
@@ -129,7 +129,7 @@ export async function syncBaseline({ baselineRoot, targetDir, config, dryRun, wr
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
function applySettingsPatches(tenantSchema, patchDoc) {
|
|
132
|
+
export function applySettingsPatches(tenantSchema, patchDoc) {
|
|
133
133
|
// tenantSchema is an array of setting groups. patchDoc.patches is an array.
|
|
134
134
|
const patches = patchDoc.patches || [];
|
|
135
135
|
for (const patchGroup of patches) {
|
|
@@ -137,12 +137,20 @@ function applySettingsPatches(tenantSchema, patchDoc) {
|
|
|
137
137
|
if (!existing) {
|
|
138
138
|
tenantSchema.push(patchGroup);
|
|
139
139
|
} else {
|
|
140
|
-
//
|
|
141
|
-
|
|
140
|
+
// Dedup by composite key: id when present, else (type, content) for
|
|
141
|
+
// header/paragraph entries, else full JSON. Without this, header and
|
|
142
|
+
// paragraph entries (no id) get re-appended every sync.
|
|
143
|
+
const keyOf = (s) =>
|
|
144
|
+
s.id ? `id:${s.id}` :
|
|
145
|
+
s.content !== undefined ? `${s.type}:content:${s.content}` :
|
|
146
|
+
`raw:${JSON.stringify(s)}`;
|
|
147
|
+
existing.settings = existing.settings || [];
|
|
148
|
+
const existingKeys = new Set(existing.settings.map(keyOf));
|
|
142
149
|
for (const s of patchGroup.settings || []) {
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
const key = keyOf(s);
|
|
151
|
+
if (existingKeys.has(key)) continue;
|
|
145
152
|
existing.settings.push(s);
|
|
153
|
+
existingKeys.add(key);
|
|
146
154
|
}
|
|
147
155
|
}
|
|
148
156
|
}
|
package/modules/comparison-table/variants/feature-columns/sections/runwell-comparison-table.liquid
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{%- endif -%}
|
|
19
19
|
|
|
20
20
|
{%- if section.settings.heading != blank -%}
|
|
21
|
-
<h2 style="font-family: var(--font-heading-family); font-style: italic; font-weight: 400; font-size: clamp(
|
|
21
|
+
<h2 style="font-family: var(--font-heading-family); font-style: italic; font-weight: 400; font-size: clamp(2.8rem, 5vw, 4.6rem); line-height: 1.05; margin: 0 0 1rem 0; max-width: 22ch;">
|
|
22
22
|
{{ section.settings.heading }}
|
|
23
23
|
</h2>
|
|
24
24
|
{%- endif -%}
|
package/modules/comparison-table/variants/feature-rows/sections/runwell-comparison-table.liquid
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
{%- endif -%}
|
|
18
18
|
|
|
19
19
|
{%- if section.settings.heading != blank -%}
|
|
20
|
-
<h2 style="font-family: var(--font-heading-family); font-style: italic; font-weight: 400; font-size: clamp(
|
|
20
|
+
<h2 style="font-family: var(--font-heading-family); font-style: italic; font-weight: 400; font-size: clamp(2.8rem, 5vw, 4.6rem); line-height: 1.05; margin: 0 auto 1rem; max-width: 24ch; text-align: center;">
|
|
21
21
|
{{ section.settings.heading }}
|
|
22
22
|
</h2>
|
|
23
23
|
{%- endif -%}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runwell/shopify-toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.2",
|
|
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",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"LICENSE"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"test": "node --test test
|
|
20
|
+
"test": "node --test 'test/**/*.test.js'",
|
|
21
21
|
"lint": "echo 'todo: eslint config'",
|
|
22
22
|
"release": "npm publish --access restricted"
|
|
23
23
|
},
|