@liiift-studio/sanity-visitor-insights 0.71.0 → 0.72.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/dist/index.js CHANGED
@@ -3360,6 +3360,7 @@ function catalogueRate(rows) {
3360
3360
  let views = 0;
3361
3361
  let sales = 0;
3362
3362
  for (const row of rows) {
3363
+ if (row.viewed?.status !== "ok") continue;
3363
3364
  const viewed = metricSortValue(row.viewed);
3364
3365
  const bought = metricSortValue(row.bought);
3365
3366
  if (viewed === null || bought === null) continue;
@@ -3523,7 +3524,8 @@ function TypefaceInterestPanel({ data }) {
3523
3524
  if (index === null) {
3524
3525
  const views = metricSortValue(row.viewed);
3525
3526
  const tooQuiet = views !== null && views < MIN_FAMILY_VIEWS;
3526
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 1, muted: true, "aria-label": `${row.typeface} not comparable`, children: tooQuiet ? "too few views to compare" : "\u2014" });
3527
+ const partWindow = row.viewed?.status === "partial";
3528
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 1, muted: true, "aria-label": `${row.typeface} not comparable`, children: partWindow ? "view tracking started mid-period" : tooQuiet ? "too few views to compare" : "\u2014" });
3527
3529
  }
3528
3530
  if (index === 0) {
3529
3531
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sanity_ui_compat3.Text, { size: 1, children: "No sales" });