@burdenoff/microfe-theglobalfuel 2026.705.3 → 2026.705.4
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/theglobalfuel/TheGlobalFuelRoot.js +54 -46
- package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js +10 -6
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
- package/dist/theglobalfuel/components/DataTable.js +126 -58
- package/dist/theglobalfuel/components/DataTable.js.map +1 -1
- package/dist/theglobalfuel/components/EmptyState.js +4 -4
- package/dist/theglobalfuel/components/EmptyState.js.map +1 -1
- package/dist/theglobalfuel/components/MetricsCard.js +2 -2
- package/dist/theglobalfuel/components/MetricsCard.js.map +1 -1
- package/dist/theglobalfuel/components/WorldMap.js +115 -0
- package/dist/theglobalfuel/components/WorldMap.js.map +1 -0
- package/dist/theglobalfuel/components/index.js +9 -0
- package/dist/theglobalfuel/components/viz/AllocationBar.js +68 -0
- package/dist/theglobalfuel/components/viz/AllocationBar.js.map +1 -0
- package/dist/theglobalfuel/components/viz/AreaChart.js +102 -0
- package/dist/theglobalfuel/components/viz/AreaChart.js.map +1 -0
- package/dist/theglobalfuel/components/viz/AvatarStack.js +2 -0
- package/dist/theglobalfuel/components/viz/BarChart.js +4 -0
- package/dist/theglobalfuel/components/viz/CertificateCard.js +4 -0
- package/dist/theglobalfuel/components/viz/DonutChart.js +109 -0
- package/dist/theglobalfuel/components/viz/DonutChart.js.map +1 -0
- package/dist/theglobalfuel/components/viz/HBarFunnel.js +3 -0
- package/dist/theglobalfuel/components/viz/Heatmap.js +3 -0
- package/dist/theglobalfuel/components/viz/KanbanBoard.js +2 -0
- package/dist/theglobalfuel/components/viz/LineChart.js +4 -0
- package/dist/theglobalfuel/components/viz/OrgTree.js +2 -0
- package/dist/theglobalfuel/components/viz/PathSteps.js +68 -0
- package/dist/theglobalfuel/components/viz/PathSteps.js.map +1 -0
- package/dist/theglobalfuel/components/viz/ProgressRing.js +6 -0
- package/dist/theglobalfuel/components/viz/ProgressRing.js.map +1 -0
- package/dist/theglobalfuel/components/viz/RatingStars.js +3 -0
- package/dist/theglobalfuel/components/viz/SegmentedTabs.js +3 -0
- package/dist/theglobalfuel/components/viz/SkillBar.js +3 -0
- package/dist/theglobalfuel/components/viz/Sparkline.js +74 -0
- package/dist/theglobalfuel/components/viz/Sparkline.js.map +1 -0
- package/dist/theglobalfuel/components/viz/StatCard.js +3 -0
- package/dist/theglobalfuel/components/viz/StepProgress.js +64 -0
- package/dist/theglobalfuel/components/viz/StepProgress.js.map +1 -0
- package/dist/theglobalfuel/components/viz/Timeline.js +66 -0
- package/dist/theglobalfuel/components/viz/Timeline.js.map +1 -0
- package/dist/theglobalfuel/components/viz/index.js +23 -0
- package/dist/theglobalfuel/components/viz/lib/Avatar.js +1 -0
- package/dist/theglobalfuel/components/viz/lib/CartesianFrame.js +119 -0
- package/dist/theglobalfuel/components/viz/lib/CartesianFrame.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.js +35 -0
- package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/format.js +17 -0
- package/dist/theglobalfuel/components/viz/lib/format.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/geometry.js +61 -0
- package/dist/theglobalfuel/components/viz/lib/geometry.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/hooks.js +39 -0
- package/dist/theglobalfuel/components/viz/lib/hooks.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/palette.js +27 -0
- package/dist/theglobalfuel/components/viz/lib/palette.js.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +431 -316
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +525 -227
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +255 -206
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +465 -0
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +356 -227
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useEffect as e, useLayoutEffect as t, useRef as n, useState as r } from "react";
|
|
2
|
+
//#region src/theglobalfuel/components/viz/lib/hooks.ts
|
|
3
|
+
var i = typeof window < "u", a = i ? t : e;
|
|
4
|
+
function o() {
|
|
5
|
+
let [t, n] = r(!1);
|
|
6
|
+
return e(() => {
|
|
7
|
+
if (!i || typeof window.matchMedia != "function") return;
|
|
8
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => n(e.matches);
|
|
9
|
+
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
10
|
+
}, []), t;
|
|
11
|
+
}
|
|
12
|
+
function s() {
|
|
13
|
+
let [t, n] = r(!1);
|
|
14
|
+
return e(() => {
|
|
15
|
+
let e = requestAnimationFrame(() => n(!0));
|
|
16
|
+
return () => cancelAnimationFrame(e);
|
|
17
|
+
}, []), t;
|
|
18
|
+
}
|
|
19
|
+
var c = 0;
|
|
20
|
+
function l(e = "viz") {
|
|
21
|
+
let [t] = r(() => (c += 1, `${e}-${c}`));
|
|
22
|
+
return t;
|
|
23
|
+
}
|
|
24
|
+
function u() {
|
|
25
|
+
let e = n(null), [t, i] = r(0);
|
|
26
|
+
return a(() => {
|
|
27
|
+
let t = e.current;
|
|
28
|
+
if (!t || (i(t.clientWidth), typeof ResizeObserver > "u")) return;
|
|
29
|
+
let n = new ResizeObserver((e) => {
|
|
30
|
+
let t = e[0]?.contentRect.width;
|
|
31
|
+
typeof t == "number" && i(t);
|
|
32
|
+
});
|
|
33
|
+
return n.observe(t), () => n.disconnect();
|
|
34
|
+
}, []), [e, t];
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { u as useElementWidth, s as useMounted, o as usePrefersReducedMotion, l as useVizId };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","names":[],"sources":["../../../../../src/theglobalfuel/components/viz/lib/hooks.ts"],"sourcesContent":["import { type RefObject, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nconst canUseDOM = typeof window !== 'undefined';\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\n/**\n * Tracks the user's reduced-motion preference. Components use this to skip\n * entrance / draw-in transitions entirely rather than merely shortening them.\n */\nexport function usePrefersReducedMotion(): boolean {\n const [reduced, setReduced] = useState(false);\n useEffect(() => {\n if (!canUseDOM || typeof window.matchMedia !== 'function') {\n return;\n }\n const mq = window.matchMedia('(prefers-reduced-motion: reduce)');\n const update = () => setReduced(mq.matches);\n update();\n mq.addEventListener('change', update);\n return () => mq.removeEventListener('change', update);\n }, []);\n return reduced;\n}\n\n/** Becomes true after the first paint — drives one-shot enter transitions. */\nexport function useMounted(): boolean {\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n const raf = requestAnimationFrame(() => setMounted(true));\n return () => cancelAnimationFrame(raf);\n }, []);\n return mounted;\n}\n\nlet uidCounter = 0;\n\n/** Stable, SVG-safe unique id (no colons) for gradient / clip / aria references. */\nexport function useVizId(prefix = 'viz'): string {\n const [id] = useState(() => {\n uidCounter += 1;\n return `${prefix}-${uidCounter}`;\n });\n return id;\n}\n\n/**\n * Observes the width of an element so SVG charts can render a 1:1 viewBox\n * (no aspect-ratio distortion) and reflow on resize. Falls back gracefully\n * where ResizeObserver is unavailable.\n */\nexport function useElementWidth<T extends HTMLElement>(): [RefObject<T | null>, number] {\n const ref = useRef<T>(null);\n const [width, setWidth] = useState(0);\n useIsomorphicLayoutEffect(() => {\n const el = ref.current;\n if (!el) {\n return;\n }\n setWidth(el.clientWidth);\n if (typeof ResizeObserver === 'undefined') {\n return;\n }\n const ro = new ResizeObserver((entries) => {\n const measured = entries[0]?.contentRect.width;\n if (typeof measured === 'number') {\n setWidth(measured);\n }\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, []);\n return [ref, width];\n}\n"],"mappings":";;AAEA,IAAM,IAAY,OAAO,SAAW,KAC9B,IAA4B,IAAY,IAAkB;AAMhE,SAAgB,IAAmC;CACjD,IAAM,CAAC,GAAS,KAAc,EAAS,GAAM;AAW7C,QAVA,QAAgB;AACd,MAAI,CAAC,KAAa,OAAO,OAAO,cAAe,WAC7C;EAEF,IAAM,IAAK,OAAO,WAAW,mCAAmC,EAC1D,UAAe,EAAW,EAAG,QAAQ;AAG3C,SAFA,GAAQ,EACR,EAAG,iBAAiB,UAAU,EAAO,QACxB,EAAG,oBAAoB,UAAU,EAAO;IACpD,EAAE,CAAC,EACC;;AAIT,SAAgB,IAAsB;CACpC,IAAM,CAAC,GAAS,KAAc,EAAS,GAAM;AAK7C,QAJA,QAAgB;EACd,IAAM,IAAM,4BAA4B,EAAW,GAAK,CAAC;AACzD,eAAa,qBAAqB,EAAI;IACrC,EAAE,CAAC,EACC;;AAGT,IAAI,IAAa;AAGjB,SAAgB,EAAS,IAAS,OAAe;CAC/C,IAAM,CAAC,KAAM,SACX,KAAc,GACP,GAAG,EAAO,GAAG,KACpB;AACF,QAAO;;AAQT,SAAgB,IAAwE;CACtF,IAAM,IAAM,EAAU,KAAK,EACrB,CAAC,GAAO,KAAY,EAAS,EAAE;AAmBrC,QAlBA,QAAgC;EAC9B,IAAM,IAAK,EAAI;AAKf,MAJI,CAAC,MAGL,EAAS,EAAG,YAAY,EACpB,OAAO,iBAAmB,KAC5B;EAEF,IAAM,IAAK,IAAI,gBAAgB,MAAY;GACzC,IAAM,IAAW,EAAQ,IAAI,YAAY;AACzC,GAAI,OAAO,KAAa,YACtB,EAAS,EAAS;IAEpB;AAEF,SADA,EAAG,QAAQ,EAAG,QACD,EAAG,YAAY;IAC3B,EAAE,CAAC,EACC,CAAC,GAAK,EAAM"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/theglobalfuel/components/viz/lib/palette.ts
|
|
2
|
+
var e = "var(--color-accent-primary)", t = "var(--color-chart-grid)", n = "var(--color-chart-axis)", r = {
|
|
3
|
+
success: "var(--color-status-success-text)",
|
|
4
|
+
warning: "var(--color-status-warning-text)",
|
|
5
|
+
danger: "var(--color-status-error-text)",
|
|
6
|
+
info: "var(--color-status-info-text)"
|
|
7
|
+
}, i = [
|
|
8
|
+
e,
|
|
9
|
+
"var(--color-accent-blue)",
|
|
10
|
+
"var(--color-accent-teal)",
|
|
11
|
+
"var(--color-accent-purple)",
|
|
12
|
+
"var(--color-accent-indigo)",
|
|
13
|
+
r.warning,
|
|
14
|
+
r.info,
|
|
15
|
+
r.success,
|
|
16
|
+
"var(--color-chart-6)",
|
|
17
|
+
"var(--color-chart-7)",
|
|
18
|
+
"var(--color-chart-9)",
|
|
19
|
+
"var(--color-chart-12)"
|
|
20
|
+
];
|
|
21
|
+
function a(e) {
|
|
22
|
+
return e <= 0 ? [] : Array.from({ length: e }, (e, t) => i[t % i.length]);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { e as ACCENT, n as CHART_AXIS, t as CHART_GRID, r as STATUS, a as chartPalette };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"palette.js","names":[],"sources":["../../../../../src/theglobalfuel/components/viz/lib/palette.ts"],"sourcesContent":["/**\n * Tokenized color palette for the visualization kit.\n *\n * Every color here is a reference to a fe-libs semantic CSS variable, so the\n * kit themes automatically (light / dark / product themes) and never ships a\n * raw hex. The single \"accent\" used for highlights and single-series charts is\n * the product theme's primary action color — the app is NOT green; whatever the\n * active theme resolves `--color-accent-primary` to is what renders.\n *\n * Tints/shades are produced by SVG opacity (fill-opacity / stop-opacity) at the\n * call site, never by emitting a second raw color.\n */\n\n/** Primary highlight — resolves to the product theme's primary action color. */\nexport const ACCENT = 'var(--color-accent-primary)';\n\n/** Faint chart chrome (theme-aware). */\nexport const CHART_GRID = 'var(--color-chart-grid)';\nexport const CHART_AXIS = 'var(--color-chart-axis)';\n\n/** Semantic status hues — saturated and readable in both light and dark. */\nexport const STATUS = {\n success: 'var(--color-status-success-text)',\n warning: 'var(--color-status-warning-text)',\n danger: 'var(--color-status-error-text)',\n info: 'var(--color-status-info-text)',\n} as const;\n\nexport type StatusTone = keyof typeof STATUS;\n\n/**\n * Ordered categorical palette, led by the product accent and drawn entirely\n * from theme-aware semantic tokens. Used to color multi-series charts.\n */\nconst SERIES_TOKENS: readonly string[] = [\n ACCENT,\n 'var(--color-accent-blue)',\n 'var(--color-accent-teal)',\n 'var(--color-accent-purple)',\n 'var(--color-accent-indigo)',\n STATUS.warning,\n STATUS.info,\n STATUS.success,\n 'var(--color-chart-6)',\n 'var(--color-chart-7)',\n 'var(--color-chart-9)',\n 'var(--color-chart-12)',\n];\n\n/**\n * A tokenized palette of `count` colors, cycling the semantic series list.\n * Returns CSS-variable strings (never raw colors).\n */\nexport function chartPalette(count: number): string[] {\n if (count <= 0) {\n return [];\n }\n return Array.from({ length: count }, (_, i) => SERIES_TOKENS[i % SERIES_TOKENS.length]);\n}\n"],"mappings":";AAcA,IAAa,IAAS,+BAGT,IAAa,2BACb,IAAa,2BAGb,IAAS;CACpB,SAAS;CACT,SAAS;CACT,QAAQ;CACR,MAAM;CACP,EAQK,IAAmC;CACvC;CACA;CACA;CACA;CACA;CACA,EAAO;CACP,EAAO;CACP,EAAO;CACP;CACA;CACA;CACA;CACD;AAMD,SAAgB,EAAa,GAAyB;AAIpD,QAHI,KAAS,IACJ,EAAE,GAEJ,MAAM,KAAK,EAAE,QAAQ,GAAO,GAAG,GAAG,MAAM,EAAc,IAAI,EAAc,QAAQ"}
|