arky-sdk 0.4.29 → 0.4.31
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/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -570,9 +570,10 @@ var createPromoCodeApi = (apiConfig) => {
|
|
|
570
570
|
// src/utils/blocks.ts
|
|
571
571
|
function getBlockLabel(block, locale = "en") {
|
|
572
572
|
if (!block) return "";
|
|
573
|
-
|
|
574
|
-
if (typeof
|
|
575
|
-
|
|
573
|
+
const label = block.properties?.label;
|
|
574
|
+
if (typeof label === "string") return label;
|
|
575
|
+
if (label && typeof label === "object") return label[locale] ?? label["en"] ?? "";
|
|
576
|
+
return block.key?.replace(/_/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()) ?? "";
|
|
576
577
|
}
|
|
577
578
|
function formatBlockValue(block) {
|
|
578
579
|
if (!block || block.value === null || block.value === void 0) return "";
|
|
@@ -1623,7 +1624,7 @@ function track(eventName, params) {
|
|
|
1623
1624
|
}
|
|
1624
1625
|
|
|
1625
1626
|
// src/index.ts
|
|
1626
|
-
var SDK_VERSION = "0.4.
|
|
1627
|
+
var SDK_VERSION = "0.4.31";
|
|
1627
1628
|
var SUPPORTED_FRAMEWORKS = [
|
|
1628
1629
|
"astro",
|
|
1629
1630
|
"react",
|