@peasant-labs/fairtrade 0.0.39 → 0.0.41

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.
Files changed (48) hide show
  1. package/THIRD_PARTY_NOTICES.md +14 -0
  2. package/dist/lib/{GraphLegend-DwLFq2JU.js → GraphLegend-CBKZsRta.js} +1401 -1488
  3. package/dist/lib/adapter-Dulh38C2.js +1214 -0
  4. package/dist/lib/analytics.css +1 -1
  5. package/dist/lib/analytics.js +289 -292
  6. package/dist/lib/commons.js +807 -805
  7. package/dist/lib/components.css +1 -1
  8. package/dist/lib/format-B3uT2wzU.js +41 -0
  9. package/dist/lib/graph.js +383 -381
  10. package/dist/lib/share-fonts/AtkinsonHyperlegible-Bold.ttf +0 -0
  11. package/dist/lib/share-fonts/AtkinsonHyperlegible-Regular.ttf +0 -0
  12. package/dist/lib/share-fonts/AtkinsonHyperlegibleMono-Bold.ttf +0 -0
  13. package/dist/lib/share-fonts/AtkinsonHyperlegibleMono-Regular.ttf +0 -0
  14. package/dist/lib/share-fonts/OFL-AtkinsonHyperlegible.txt +92 -0
  15. package/dist/lib/share-fonts/OFL-AtkinsonHyperlegibleMono.txt +93 -0
  16. package/dist/lib/share.js +1311 -0
  17. package/dist/lib/time-CpVBzcqQ.js +157 -0
  18. package/dist/lib/types/BrandMark.d.ts +2 -6
  19. package/dist/lib/types/CliOnboard.d.ts +11 -0
  20. package/dist/lib/types/DiffView.d.ts +5 -3
  21. package/dist/lib/types/Publish.d.ts +29 -7
  22. package/dist/lib/types/Switch.d.ts +8 -1
  23. package/dist/lib/types/analytics/format.d.ts +2 -1
  24. package/dist/lib/types/brand-geometry.d.ts +22 -0
  25. package/dist/lib/types/commons/providers.d.ts +1 -1
  26. package/dist/lib/types/format.d.ts +35 -4
  27. package/dist/lib/types/index.d.ts +1 -0
  28. package/dist/lib/types/share/ShareCard.d.ts +40 -0
  29. package/dist/lib/types/share/data.d.ts +54 -0
  30. package/dist/lib/types/share/fonts.d.ts +16 -0
  31. package/dist/lib/types/share/index.d.ts +5 -0
  32. package/dist/lib/types/share/marks.d.ts +23 -0
  33. package/dist/lib/types/share/metrics.d.ts +10 -0
  34. package/dist/lib/types/transcript/title.d.ts +21 -0
  35. package/dist/lib/types/ui/brand-geometry.d.ts +22 -0
  36. package/dist/lib/types/ui/format.d.ts +35 -0
  37. package/dist/lib/types/ui/provider-policy.d.ts +27 -0
  38. package/dist/lib/types/ui/transcript/adapter.d.ts +66 -0
  39. package/dist/lib/types/ui/transcript/adapter.parse.d.ts +103 -0
  40. package/dist/lib/types/ui/transcript/analytics.d.ts +213 -0
  41. package/dist/lib/types/ui/transcript/time.d.ts +47 -0
  42. package/dist/lib/types/ui/transcript/title.d.ts +84 -0
  43. package/dist/lib/types/ui/transcript/usage.d.ts +19 -0
  44. package/dist/lib/types/ui/transcript/view-model.d.ts +700 -0
  45. package/dist/lib/types/ui/transcript/wire-types.d.ts +63 -0
  46. package/dist/lib/{ui-CBsfaQMA.js → ui-Bhk29YuW.js} +4198 -5412
  47. package/dist/lib/ui.js +7 -4
  48. package/package.json +20 -6
@@ -0,0 +1,41 @@
1
+ //#region src/ui/format.js
2
+ var e = "—", t = new Intl.NumberFormat("en-US", {
3
+ notation: "compact",
4
+ maximumFractionDigits: 1
5
+ }), n = new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }), r = new Intl.NumberFormat("en-US", {
6
+ minimumFractionDigits: 2,
7
+ maximumFractionDigits: 2
8
+ });
9
+ function i(e) {
10
+ let t = NaN;
11
+ return typeof e == "number" ? t = e : (typeof e == "bigint" || typeof e == "string" && e.trim() !== "") && (t = Number(e)), Number.isFinite(t) ? t : void 0;
12
+ }
13
+ function a(e) {
14
+ let n = i(e);
15
+ return n === void 0 ? "—" : t.format(n).replace(/K$/, "k");
16
+ }
17
+ function o(e) {
18
+ if (typeof e == "bigint") return n.format(e);
19
+ if (typeof e == "string" && /^-?\d+$/.test(e.trim())) return n.format(BigInt(e.trim()));
20
+ let t = i(e);
21
+ return t === void 0 ? "—" : n.format(Math.round(t));
22
+ }
23
+ function s(e) {
24
+ let t = i(e);
25
+ return t === void 0 ? "—" : t > 0 && t < .01 ? "<$0.01" : (t < 0 ? "-$" : "$") + r.format(Math.abs(t));
26
+ }
27
+ function c(e, t) {
28
+ let n = i(e);
29
+ return n === void 0 ? "—" : n.toFixed(t);
30
+ }
31
+ function l(e) {
32
+ let t = new Date(e);
33
+ return Number.isNaN(t.getTime()) ? "" : t.toLocaleDateString("en-US", {
34
+ month: "short",
35
+ day: "numeric",
36
+ year: "numeric",
37
+ timeZone: "UTC"
38
+ }).toLowerCase();
39
+ }
40
+ //#endregion
41
+ export { c as a, l as i, s as n, o, a as r, e as t };