@datatechsolutions/ui 2.9.3 → 2.9.5

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.
@@ -9016,10 +9016,22 @@ function DashboardProgressShell({ children }) {
9016
9016
  children
9017
9017
  ] });
9018
9018
  }
9019
+ var APP_COLORS = {
9020
+ astrlabe: "bg-sky-500/30 text-sky-100 ring-sky-400/30",
9021
+ "fuel-price-ai": "bg-emerald-500/30 text-emerald-100 ring-emerald-400/30",
9022
+ "kori-erp": "bg-amber-500/30 text-amber-100 ring-amber-400/30",
9023
+ windsock: "bg-indigo-500/30 text-indigo-100 ring-indigo-400/30"
9024
+ };
9025
+ function detectApp() {
9026
+ const appName = process.env.NEXT_PUBLIC_APP_NAME ?? process.env.NEXT_PUBLIC_AUTH_CLIENT_ID ?? "unknown";
9027
+ const port = typeof window !== "undefined" ? window.location.port : "";
9028
+ const gateway = process.env.NEXT_PUBLIC_API_GATEWAY_URL ?? process.env.NEXT_PUBLIC_LAMBDA_CLIENT_BASE ?? "";
9029
+ return { name: appName, port, gateway };
9030
+ }
9019
9031
  function DevModeBanner({
9020
9032
  user,
9021
- devModeLabel = "DEV MODE",
9022
- devModeMessage = "Auth bypass enabled"
9033
+ devModeLabel = "DEV",
9034
+ devModeMessage = "Local development mode"
9023
9035
  }) {
9024
9036
  const [glassTest, setGlassTest] = React12.useState(false);
9025
9037
  const toggleGlassTest = React12.useCallback(() => {
@@ -9031,7 +9043,9 @@ function DevModeBanner({
9031
9043
  if (process.env.NEXT_PUBLIC_DEV_MODE !== "true") {
9032
9044
  return null;
9033
9045
  }
9034
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative isolate flex items-center gap-x-6 overflow-hidden bg-violet-900/90 dark:bg-violet-950/95 px-6 py-2.5 sm:px-4", children: [
9046
+ const app = detectApp();
9047
+ const appColor = APP_COLORS[app.name] ?? "bg-white/10 text-violet-200 ring-white/20";
9048
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative isolate flex items-center gap-x-6 overflow-hidden bg-violet-900/90 dark:bg-violet-950/95 px-6 py-2 sm:px-4", children: [
9035
9049
  /* @__PURE__ */ jsxRuntime.jsx(
9036
9050
  "div",
9037
9051
  {
@@ -9048,44 +9062,41 @@ function DevModeBanner({
9048
9062
  )
9049
9063
  }
9050
9064
  ),
9051
- /* @__PURE__ */ jsxRuntime.jsx(
9052
- "div",
9053
- {
9054
- "aria-hidden": "true",
9055
- className: "absolute left-[max(45rem,calc(50%+8rem))] top-1/2 -z-10 -translate-y-1/2 blur-2xl",
9056
- children: /* @__PURE__ */ jsxRuntime.jsx(
9057
- "div",
9058
- {
9059
- style: {
9060
- clipPath: "polygon(74.8% 41.9%, 97.2% 73.2%, 100% 34.9%, 92.5% 0.4%, 87.5% 0%, 75% 28.6%, 58.5% 54.6%, 50.1% 56.8%, 46.9% 44%, 48.3% 17.4%, 24.7% 53.9%, 0% 27.9%, 11.9% 74.2%, 24.9% 54.1%, 68.6% 100%, 74.8% 41.9%)"
9061
- },
9062
- className: "aspect-[577/310] w-[36rem] bg-gradient-to-r from-violet-400 to-purple-500 opacity-30"
9063
- }
9064
- )
9065
- }
9066
- ),
9067
9065
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
9068
9066
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-violet-50", children: [
9069
- /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.BeakerIcon, { className: "h-5 w-5 text-violet-300" }),
9070
- /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "font-semibold", children: devModeLabel }),
9071
- /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 2 2", "aria-hidden": "true", className: "mx-2 inline size-0.5 fill-current", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { r: 1, cx: 1, cy: 1 }) }),
9072
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline text-violet-200", children: devModeMessage })
9067
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.BeakerIcon, { className: "h-4 w-4 text-violet-300" }),
9068
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "text-xs font-bold tracking-wider", children: devModeLabel }),
9069
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 2 2", "aria-hidden": "true", className: "mx-1 inline size-0.5 fill-current", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { r: 1, cx: 1, cy: 1 }) }),
9070
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline text-xs text-violet-200", children: devModeMessage })
9073
9071
  ] }),
9074
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-sm", children: [
9075
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5", children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: "px-2 py-0.5 rounded bg-white/10 text-violet-100 text-xs font-mono ring-1 ring-inset ring-white/20", children: user?.email }) }),
9076
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-semibold bg-violet-500/30 text-violet-100 ring-1 ring-inset ring-violet-400/30 uppercase", children: [
9072
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-xs", children: [
9073
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-bold ring-1 ring-inset uppercase tracking-wider ${appColor}`, children: [
9074
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.ServerStackIcon, { className: "h-3 w-3" }),
9075
+ app.name
9076
+ ] }),
9077
+ app.port && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-mono bg-white/10 text-violet-200 ring-1 ring-inset ring-white/20", children: [
9078
+ /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.GlobeAltIcon, { className: "h-3 w-3" }),
9079
+ ":",
9080
+ app.port
9081
+ ] }),
9082
+ app.gateway && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "hidden lg:inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-mono bg-white/10 text-violet-200 ring-1 ring-inset ring-white/20", children: [
9083
+ "gw ",
9084
+ app.gateway.replace("http://localhost:", ":")
9085
+ ] }),
9086
+ user?.email && /* @__PURE__ */ jsxRuntime.jsx("code", { className: "px-2 py-0.5 rounded bg-white/10 text-violet-100 text-[10px] font-mono ring-1 ring-inset ring-white/20", children: user.email }),
9087
+ user?.role && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-semibold bg-violet-500/30 text-violet-100 ring-1 ring-inset ring-violet-400/30 uppercase", children: [
9077
9088
  /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.WrenchScrewdriverIcon, { className: "h-3 w-3" }),
9078
- user?.role
9079
- ] }) }),
9089
+ user.role
9090
+ ] }),
9080
9091
  /* @__PURE__ */ jsxRuntime.jsxs(
9081
9092
  "button",
9082
9093
  {
9083
9094
  type: "button",
9084
9095
  onClick: toggleGlassTest,
9085
- className: `inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-semibold ring-1 ring-inset transition-colors ${glassTest ? "bg-red-500/40 text-red-100 ring-red-400/40" : "bg-white/10 text-violet-200 ring-white/20 hover:bg-white/15"}`,
9096
+ className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-semibold ring-1 ring-inset transition-colors ${glassTest ? "bg-red-500/40 text-red-100 ring-red-400/40" : "bg-white/10 text-violet-200 ring-white/20 hover:bg-white/15"}`,
9086
9097
  children: [
9087
9098
  /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.EyeDropperIcon, { className: "h-3 w-3" }),
9088
- "Glass Test"
9099
+ "Glass"
9089
9100
  ]
9090
9101
  }
9091
9102
  )
@@ -12134,7 +12145,7 @@ function useGeoMapState({
12134
12145
  getFontSize
12135
12146
  };
12136
12147
  }
12137
- var MAP_DEFAULT_STATE_COLOR = "rgba(148, 163, 184, 0.08)";
12148
+ var MAP_DEFAULT_STATE_COLOR = "rgba(100, 116, 139, 0.35)";
12138
12149
  var MAP_DEFAULT_MARKER_COLOR = "#6366f1";
12139
12150
  var VIEWBOX_WIDTH = 1e3;
12140
12151
  var VIEWBOX_HEIGHT = 500;
@@ -12221,7 +12232,7 @@ function GeoMapCanvasInner({
12221
12232
  const r3 = parseInt(hexColor.slice(1, 3), 16);
12222
12233
  const g3 = parseInt(hexColor.slice(3, 5), 16);
12223
12234
  const b2 = parseInt(hexColor.slice(5, 7), 16);
12224
- return `rgba(${r3}, ${g3}, ${b2}, 0.35)`;
12235
+ return `rgba(${r3}, ${g3}, ${b2}, 0.15)`;
12225
12236
  };
12226
12237
  const lighterColors = React12.useMemo(() => {
12227
12238
  const colors3 = /* @__PURE__ */ new Map();
@@ -12239,8 +12250,10 @@ function GeoMapCanvasInner({
12239
12250
  }, [geoData]);
12240
12251
  const projection = React12.useMemo(() => {
12241
12252
  if (!featureCollection) return null;
12242
- const base = projectionType === "albersUsa" ? d3Geo.geoAlbersUsa() : d3Geo.geoMercator();
12243
- return base.fitSize([VIEWBOX_WIDTH, VIEWBOX_HEIGHT], featureCollection);
12253
+ if (projectionType === "albersUsa") {
12254
+ return d3Geo.geoAlbersUsa().scale(VIEWBOX_WIDTH / 960 * 1070).translate([VIEWBOX_WIDTH / 2, VIEWBOX_HEIGHT / 2]);
12255
+ }
12256
+ return d3Geo.geoMercator().fitSize([VIEWBOX_WIDTH, VIEWBOX_HEIGHT], featureCollection);
12244
12257
  }, [featureCollection, projectionType]);
12245
12258
  const pathGenerator = React12.useMemo(() => {
12246
12259
  if (!projection) return null;
@@ -12316,7 +12329,7 @@ function GeoMapCanvasInner({
12316
12329
  }
12317
12330
  },
12318
12331
  fill: hasItems ? isHovered ? regionColor : isActive ? regionColor : lighterColors.get(regionCode) || getLighterColor(regionColor) : MAP_DEFAULT_STATE_COLOR,
12319
- stroke: isActive ? "#fff" : isDimmed ? "rgba(148, 163, 184, 0.15)" : "rgba(255, 255, 255, 0.5)",
12332
+ stroke: isActive ? "#fff" : isDimmed ? "rgba(148, 163, 184, 0.15)" : "rgba(148, 163, 184, 0.40)",
12320
12333
  strokeWidth: (isActive ? 2.5 : 0.5) / zoom,
12321
12334
  filter: isActive ? "url(#glow-active)" : isDimmed ? "url(#inactive-dim)" : void 0,
12322
12335
  opacity: isDimmed ? 0.45 : 1,
@@ -23871,5 +23884,5 @@ exports.useGeoMapState = useGeoMapState;
23871
23884
  exports.useNotifications = useNotifications;
23872
23885
  exports.usePlatformShellStore = usePlatformShellStore;
23873
23886
  exports.usePullToRefresh = usePullToRefresh;
23874
- //# sourceMappingURL=chunk-JFE7Y7RJ.js.map
23875
- //# sourceMappingURL=chunk-JFE7Y7RJ.js.map
23887
+ //# sourceMappingURL=chunk-TL2TXLHH.js.map
23888
+ //# sourceMappingURL=chunk-TL2TXLHH.js.map