@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 +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/server.js +8 -2
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +8 -2
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
- package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/server/reports/reports.test.ts +94 -0
- package/src/server/reports/typefaceInterest.ts +30 -1
- package/src/studio/panels.test.tsx +50 -0
- package/src/studio/panels.tsx +12 -1
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
|
-
|
|
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" });
|