@rebuy/rebuy 3.30.0 → 3.30.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/server/index.cjs +18 -2
- package/dist/server/index.mjs +18 -2
- package/package.json +1 -1
package/dist/server/index.cjs
CHANGED
|
@@ -5013,7 +5013,23 @@ var safeTextValue = (raw, options) => {
|
|
|
5013
5013
|
const converted = normalizeTextValue(raw, options);
|
|
5014
5014
|
return checkForHTML(converted) ? converted : normalizeTextValue(htmlToPlainText(raw), options);
|
|
5015
5015
|
};
|
|
5016
|
-
var
|
|
5016
|
+
var headlineText = (raw) => {
|
|
5017
|
+
const doc = safeTextValue(raw, AS_DOC);
|
|
5018
|
+
return {
|
|
5019
|
+
content: {
|
|
5020
|
+
en: {
|
|
5021
|
+
...doc,
|
|
5022
|
+
content: doc.content.map((paragraph) => ({
|
|
5023
|
+
...paragraph,
|
|
5024
|
+
content: paragraph.content.map(
|
|
5025
|
+
(run) => run.marks?.some((mark) => mark.type === "bold") ? run : { ...run, marks: [{ type: "bold" }, ...run.marks ?? []] }
|
|
5026
|
+
)
|
|
5027
|
+
}))
|
|
5028
|
+
}
|
|
5029
|
+
},
|
|
5030
|
+
sectionType: SectionType.text
|
|
5031
|
+
};
|
|
5032
|
+
};
|
|
5017
5033
|
var dspLabel = (raw, fallback) => ({
|
|
5018
5034
|
buttonField: ButtonField.buttonLabel,
|
|
5019
5035
|
content: { en: htmlToPlainText(raw) === "" ? fallback : safeTextValue(raw, AS_DOC) },
|
|
@@ -5099,7 +5115,7 @@ var disclaimerSections = (offer) => {
|
|
|
5099
5115
|
};
|
|
5100
5116
|
var composeOfferCard = (offer, input, storeName) => {
|
|
5101
5117
|
const copy = {
|
|
5102
|
-
sections: [
|
|
5118
|
+
sections: [headlineText(offer.headline), smallText(offer.description)],
|
|
5103
5119
|
sectionType: SectionType.layout,
|
|
5104
5120
|
spacing: Spacing.tight
|
|
5105
5121
|
};
|
package/dist/server/index.mjs
CHANGED
|
@@ -4962,7 +4962,23 @@ var safeTextValue = (raw, options) => {
|
|
|
4962
4962
|
const converted = normalizeTextValue(raw, options);
|
|
4963
4963
|
return checkForHTML(converted) ? converted : normalizeTextValue(htmlToPlainText(raw), options);
|
|
4964
4964
|
};
|
|
4965
|
-
var
|
|
4965
|
+
var headlineText = (raw) => {
|
|
4966
|
+
const doc = safeTextValue(raw, AS_DOC);
|
|
4967
|
+
return {
|
|
4968
|
+
content: {
|
|
4969
|
+
en: {
|
|
4970
|
+
...doc,
|
|
4971
|
+
content: doc.content.map((paragraph) => ({
|
|
4972
|
+
...paragraph,
|
|
4973
|
+
content: paragraph.content.map(
|
|
4974
|
+
(run) => run.marks?.some((mark) => mark.type === "bold") ? run : { ...run, marks: [{ type: "bold" }, ...run.marks ?? []] }
|
|
4975
|
+
)
|
|
4976
|
+
}))
|
|
4977
|
+
}
|
|
4978
|
+
},
|
|
4979
|
+
sectionType: SectionType.text
|
|
4980
|
+
};
|
|
4981
|
+
};
|
|
4966
4982
|
var dspLabel = (raw, fallback) => ({
|
|
4967
4983
|
buttonField: ButtonField.buttonLabel,
|
|
4968
4984
|
content: { en: htmlToPlainText(raw) === "" ? fallback : safeTextValue(raw, AS_DOC) },
|
|
@@ -5048,7 +5064,7 @@ var disclaimerSections = (offer) => {
|
|
|
5048
5064
|
};
|
|
5049
5065
|
var composeOfferCard = (offer, input, storeName) => {
|
|
5050
5066
|
const copy = {
|
|
5051
|
-
sections: [
|
|
5067
|
+
sections: [headlineText(offer.headline), smallText(offer.description)],
|
|
5052
5068
|
sectionType: SectionType.layout,
|
|
5053
5069
|
spacing: Spacing.tight
|
|
5054
5070
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebuy/rebuy",
|
|
3
|
-
"version": "3.30.
|
|
3
|
+
"version": "3.30.1",
|
|
4
4
|
"description": "Shared zod schemas, legacy-to-CAB widget transforms, and server orchestrators for Rebuy's Shopify consumers (rebuy-api, admin-nextjs, rebuy-shopify-extensions)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Rebuy, Inc.",
|