@optifye/dashboard-core 6.12.17 → 6.12.19

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.
@@ -1943,14 +1943,13 @@ var VideoCard = React__default.default.memo(({
1943
1943
  return /* @__PURE__ */ jsxRuntime.jsxs(
1944
1944
  "div",
1945
1945
  {
1946
- className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer transform hover:scale-[1.005] active:scale-[0.995] transition-transform duration-200 shadow-sm touch-manipulation ${className}`,
1946
+ className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer shadow-[0_1px_3px_rgba(15,23,42,0.16),0_0_0_1px_rgba(255,255,255,0.06)] transition-[box-shadow] duration-200 hover:shadow-[0_10px_24px_rgba(15,23,42,0.28),0_0_0_1px_rgba(255,255,255,0.10)] active:shadow-[0_1px_3px_rgba(15,23,42,0.16),0_0_0_1px_rgba(255,255,255,0.06)] touch-manipulation ${className}`,
1947
1947
  style: { width: "100%", height: "100%" },
1948
1948
  onClick: handleClick,
1949
1949
  onMouseEnter,
1950
1950
  onMouseLeave,
1951
1951
  onTouchStart: (e) => e.currentTarget.classList.add("touch-active"),
1952
1952
  onTouchEnd: (e) => e.currentTarget.classList.remove("touch-active"),
1953
- title: displayName,
1954
1953
  tabIndex: 0,
1955
1954
  "aria-label": `Open workspace ${displayName}`,
1956
1955
  onKeyDown: (e) => {
@@ -1998,7 +1997,7 @@ var VideoCard = React__default.default.memo(({
1998
1997
  "div",
1999
1998
  {
2000
1999
  "data-testid": "video-card-metric-badge",
2001
- className: `bg-black/70 backdrop-blur-sm rounded ${compact ? "px-1.5 py-1" : "px-2 py-1"} text-white border border-white/10`,
2000
+ className: `bg-black/70 rounded ${compact ? "px-1.5 py-1" : "px-2 py-1"} text-white border border-white/10`,
2002
2001
  title: badgeTitle,
2003
2002
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${compact ? "text-[10px]" : "text-xs"} font-semibold`, children: badgeLabel })
2004
2003
  }
@@ -1936,14 +1936,13 @@ var VideoCard = React.memo(({
1936
1936
  return /* @__PURE__ */ jsxs(
1937
1937
  "div",
1938
1938
  {
1939
- className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer transform hover:scale-[1.005] active:scale-[0.995] transition-transform duration-200 shadow-sm touch-manipulation ${className}`,
1939
+ className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer shadow-[0_1px_3px_rgba(15,23,42,0.16),0_0_0_1px_rgba(255,255,255,0.06)] transition-[box-shadow] duration-200 hover:shadow-[0_10px_24px_rgba(15,23,42,0.28),0_0_0_1px_rgba(255,255,255,0.10)] active:shadow-[0_1px_3px_rgba(15,23,42,0.16),0_0_0_1px_rgba(255,255,255,0.06)] touch-manipulation ${className}`,
1940
1940
  style: { width: "100%", height: "100%" },
1941
1941
  onClick: handleClick,
1942
1942
  onMouseEnter,
1943
1943
  onMouseLeave,
1944
1944
  onTouchStart: (e) => e.currentTarget.classList.add("touch-active"),
1945
1945
  onTouchEnd: (e) => e.currentTarget.classList.remove("touch-active"),
1946
- title: displayName,
1947
1946
  tabIndex: 0,
1948
1947
  "aria-label": `Open workspace ${displayName}`,
1949
1948
  onKeyDown: (e) => {
@@ -1991,7 +1990,7 @@ var VideoCard = React.memo(({
1991
1990
  "div",
1992
1991
  {
1993
1992
  "data-testid": "video-card-metric-badge",
1994
- className: `bg-black/70 backdrop-blur-sm rounded ${compact ? "px-1.5 py-1" : "px-2 py-1"} text-white border border-white/10`,
1993
+ className: `bg-black/70 rounded ${compact ? "px-1.5 py-1" : "px-2 py-1"} text-white border border-white/10`,
1995
1994
  title: badgeTitle,
1996
1995
  children: /* @__PURE__ */ jsx("span", { className: `${compact ? "text-[10px]" : "text-xs"} font-semibold`, children: badgeLabel })
1997
1996
  }
package/dist/index.css CHANGED
@@ -4918,6 +4918,14 @@ body {
4918
4918
  var(--tw-ring-shadow, 0 0 #0000),
4919
4919
  var(--tw-shadow);
4920
4920
  }
4921
+ .shadow-\[0_1px_3px_rgba\(15\,23\,42\,0\.16\)\,0_0_0_1px_rgba\(255\,255\,255\,0\.06\)\] {
4922
+ --tw-shadow: 0 1px 3px rgba(15,23,42,0.16),0 0 0 1px rgba(255,255,255,0.06);
4923
+ --tw-shadow-colored: 0 1px 3px var(--tw-shadow-color), 0 0 0 1px var(--tw-shadow-color);
4924
+ box-shadow:
4925
+ var(--tw-ring-offset-shadow, 0 0 #0000),
4926
+ var(--tw-ring-shadow, 0 0 #0000),
4927
+ var(--tw-shadow);
4928
+ }
4921
4929
  .shadow-\[0_2px_10px_-3px_rgba\(6\,81\,237\,0\.1\)\] {
4922
4930
  --tw-shadow: 0 2px 10px -3px rgba(6,81,237,0.1);
4923
4931
  --tw-shadow-colored: 0 2px 10px -3px var(--tw-shadow-color);
@@ -5344,6 +5352,11 @@ body {
5344
5352
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
5345
5353
  transition-duration: 150ms;
5346
5354
  }
5355
+ .transition-\[box-shadow\] {
5356
+ transition-property: box-shadow;
5357
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
5358
+ transition-duration: 150ms;
5359
+ }
5347
5360
  .transition-\[width\] {
5348
5361
  transition-property: width;
5349
5362
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -5537,11 +5550,6 @@ input[type=range]:active::-moz-range-thumb {
5537
5550
  --tw-scale-y: 1.1;
5538
5551
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
5539
5552
  }
5540
- .hover\:scale-\[1\.005\]:hover {
5541
- --tw-scale-x: 1.005;
5542
- --tw-scale-y: 1.005;
5543
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
5544
- }
5545
5553
  .hover\:scale-\[1\.01\]:hover {
5546
5554
  --tw-scale-x: 1.01;
5547
5555
  --tw-scale-y: 1.01;
@@ -5951,6 +5959,14 @@ input[type=range]:active::-moz-range-thumb {
5951
5959
  var(--tw-ring-shadow, 0 0 #0000),
5952
5960
  var(--tw-shadow);
5953
5961
  }
5962
+ .hover\:shadow-\[0_10px_24px_rgba\(15\,23\,42\,0\.28\)\,0_0_0_1px_rgba\(255\,255\,255\,0\.10\)\]:hover {
5963
+ --tw-shadow: 0 10px 24px rgba(15,23,42,0.28),0 0 0 1px rgba(255,255,255,0.10);
5964
+ --tw-shadow-colored: 0 10px 24px var(--tw-shadow-color), 0 0 0 1px var(--tw-shadow-color);
5965
+ box-shadow:
5966
+ var(--tw-ring-offset-shadow, 0 0 #0000),
5967
+ var(--tw-ring-shadow, 0 0 #0000),
5968
+ var(--tw-shadow);
5969
+ }
5954
5970
  .hover\:shadow-lg:hover {
5955
5971
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
5956
5972
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
@@ -6172,11 +6188,6 @@ input[type=range]:active::-moz-range-thumb {
6172
6188
  --tw-scale-y: 0.98;
6173
6189
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
6174
6190
  }
6175
- .active\:scale-\[0\.995\]:active {
6176
- --tw-scale-x: 0.995;
6177
- --tw-scale-y: 0.995;
6178
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
6179
- }
6180
6191
  .active\:scale-\[0\.99\]:active {
6181
6192
  --tw-scale-x: 0.99;
6182
6193
  --tw-scale-y: 0.99;
@@ -6198,6 +6209,14 @@ input[type=range]:active::-moz-range-thumb {
6198
6209
  --tw-bg-opacity: 1;
6199
6210
  background-color: rgb(254 226 226 / var(--tw-bg-opacity, 1));
6200
6211
  }
6212
+ .active\:shadow-\[0_1px_3px_rgba\(15\,23\,42\,0\.16\)\,0_0_0_1px_rgba\(255\,255\,255\,0\.06\)\]:active {
6213
+ --tw-shadow: 0 1px 3px rgba(15,23,42,0.16),0 0 0 1px rgba(255,255,255,0.06);
6214
+ --tw-shadow-colored: 0 1px 3px var(--tw-shadow-color), 0 0 0 1px var(--tw-shadow-color);
6215
+ box-shadow:
6216
+ var(--tw-ring-offset-shadow, 0 0 #0000),
6217
+ var(--tw-ring-shadow, 0 0 #0000),
6218
+ var(--tw-shadow);
6219
+ }
6201
6220
  .disabled\:pointer-events-none:disabled {
6202
6221
  pointer-events: none;
6203
6222
  }
package/dist/index.js CHANGED
@@ -37651,14 +37651,13 @@ var VideoCard = React144__namespace.default.memo(({
37651
37651
  return /* @__PURE__ */ jsxRuntime.jsxs(
37652
37652
  "div",
37653
37653
  {
37654
- className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer transform hover:scale-[1.005] active:scale-[0.995] transition-transform duration-200 shadow-sm touch-manipulation ${className}`,
37654
+ className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer shadow-[0_1px_3px_rgba(15,23,42,0.16),0_0_0_1px_rgba(255,255,255,0.06)] transition-[box-shadow] duration-200 hover:shadow-[0_10px_24px_rgba(15,23,42,0.28),0_0_0_1px_rgba(255,255,255,0.10)] active:shadow-[0_1px_3px_rgba(15,23,42,0.16),0_0_0_1px_rgba(255,255,255,0.06)] touch-manipulation ${className}`,
37655
37655
  style: { width: "100%", height: "100%" },
37656
37656
  onClick: handleClick,
37657
37657
  onMouseEnter,
37658
37658
  onMouseLeave,
37659
37659
  onTouchStart: (e) => e.currentTarget.classList.add("touch-active"),
37660
37660
  onTouchEnd: (e) => e.currentTarget.classList.remove("touch-active"),
37661
- title: displayName,
37662
37661
  tabIndex: 0,
37663
37662
  "aria-label": `Open workspace ${displayName}`,
37664
37663
  onKeyDown: (e) => {
@@ -37706,7 +37705,7 @@ var VideoCard = React144__namespace.default.memo(({
37706
37705
  "div",
37707
37706
  {
37708
37707
  "data-testid": "video-card-metric-badge",
37709
- className: `bg-black/70 backdrop-blur-sm rounded ${compact ? "px-1.5 py-1" : "px-2 py-1"} text-white border border-white/10`,
37708
+ className: `bg-black/70 rounded ${compact ? "px-1.5 py-1" : "px-2 py-1"} text-white border border-white/10`,
37710
37709
  title: badgeTitle,
37711
37710
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${compact ? "text-[10px]" : "text-xs"} font-semibold`, children: badgeLabel })
37712
37711
  }
@@ -37822,10 +37821,16 @@ var VideoGridView = React144__namespace.default.memo(({
37822
37821
  const ids = workspaces.map((ws) => ws.workspace_uuid || ws.workspace_name);
37823
37822
  return ids.sort().join(",");
37824
37823
  }, [workspaces]);
37824
+ const [resolvedStreamWorkspaceKey, setResolvedStreamWorkspaceKey] = React144.useState(() => videoStreamsLoading ? null : workspaceIdsKey);
37825
37825
  React144.useEffect(() => {
37826
37826
  setFailedStreams(/* @__PURE__ */ new Set());
37827
37827
  setR2FallbackWorkspaces(/* @__PURE__ */ new Set());
37828
37828
  }, [workspaceIdsKey]);
37829
+ React144.useEffect(() => {
37830
+ if (!videoStreamsLoading) {
37831
+ setResolvedStreamWorkspaceKey(workspaceIdsKey);
37832
+ }
37833
+ }, [videoStreamsLoading, workspaceIdsKey]);
37829
37834
  const videoConfig = useVideoConfig();
37830
37835
  const dashboardConfig = useDashboardConfig();
37831
37836
  const timezone = useAppTimezone();
@@ -37919,7 +37924,7 @@ var VideoGridView = React144__namespace.default.memo(({
37919
37924
  return a.workspace_name.localeCompare(b.workspace_name);
37920
37925
  });
37921
37926
  }, [filteredWorkspaces]);
37922
- const streamsReady = !videoStreamsLoading;
37927
+ const streamsResolvedForWorkspaceSet = resolvedStreamWorkspaceKey === workspaceIdsKey;
37923
37928
  const resolveWorkspaceDisplayName = React144.useCallback((workspace) => {
37924
37929
  return workspace.displayName || displayNames[`${workspace.line_id}_${workspace.workspace_name}`] || workspace.workspace_name;
37925
37930
  }, [displayNames]);
@@ -38111,7 +38116,7 @@ var VideoGridView = React144__namespace.default.memo(({
38111
38116
  const r2Url = workspaceStream?.hls_url;
38112
38117
  const fallbackUrl = getWorkspaceHlsUrl(workspace.workspace_name, workspace.line_id);
38113
38118
  const hasR2Stream = Boolean(r2Url);
38114
- const useFallback = r2FallbackWorkspaces.has(workspaceId) || streamsReady && !hasR2Stream;
38119
+ const useFallback = r2FallbackWorkspaces.has(workspaceId) || streamsResolvedForWorkspaceSet && !hasR2Stream;
38115
38120
  const hlsUrl = useFallback ? fallbackUrl : r2Url ?? "";
38116
38121
  const isR2Stream = !useFallback && hasR2Stream;
38117
38122
  const canAttemptR2 = hasR2Stream && !r2FallbackWorkspaces.has(workspaceId);
@@ -38138,7 +38143,7 @@ var VideoGridView = React144__namespace.default.memo(({
38138
38143
  lastSeenByWorkspaceId,
38139
38144
  getWorkspaceHlsUrl,
38140
38145
  r2FallbackWorkspaces,
38141
- streamsReady,
38146
+ streamsResolvedForWorkspaceSet,
38142
38147
  failedStreams
38143
38148
  ]);
38144
38149
  const croppedActiveCount = React144.useMemo(() => {
package/dist/index.mjs CHANGED
@@ -37622,14 +37622,13 @@ var VideoCard = React144__default.memo(({
37622
37622
  return /* @__PURE__ */ jsxs(
37623
37623
  "div",
37624
37624
  {
37625
- className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer transform hover:scale-[1.005] active:scale-[0.995] transition-transform duration-200 shadow-sm touch-manipulation ${className}`,
37625
+ className: `workspace-card relative bg-gray-950 rounded-md overflow-hidden cursor-pointer shadow-[0_1px_3px_rgba(15,23,42,0.16),0_0_0_1px_rgba(255,255,255,0.06)] transition-[box-shadow] duration-200 hover:shadow-[0_10px_24px_rgba(15,23,42,0.28),0_0_0_1px_rgba(255,255,255,0.10)] active:shadow-[0_1px_3px_rgba(15,23,42,0.16),0_0_0_1px_rgba(255,255,255,0.06)] touch-manipulation ${className}`,
37626
37626
  style: { width: "100%", height: "100%" },
37627
37627
  onClick: handleClick,
37628
37628
  onMouseEnter,
37629
37629
  onMouseLeave,
37630
37630
  onTouchStart: (e) => e.currentTarget.classList.add("touch-active"),
37631
37631
  onTouchEnd: (e) => e.currentTarget.classList.remove("touch-active"),
37632
- title: displayName,
37633
37632
  tabIndex: 0,
37634
37633
  "aria-label": `Open workspace ${displayName}`,
37635
37634
  onKeyDown: (e) => {
@@ -37677,7 +37676,7 @@ var VideoCard = React144__default.memo(({
37677
37676
  "div",
37678
37677
  {
37679
37678
  "data-testid": "video-card-metric-badge",
37680
- className: `bg-black/70 backdrop-blur-sm rounded ${compact ? "px-1.5 py-1" : "px-2 py-1"} text-white border border-white/10`,
37679
+ className: `bg-black/70 rounded ${compact ? "px-1.5 py-1" : "px-2 py-1"} text-white border border-white/10`,
37681
37680
  title: badgeTitle,
37682
37681
  children: /* @__PURE__ */ jsx("span", { className: `${compact ? "text-[10px]" : "text-xs"} font-semibold`, children: badgeLabel })
37683
37682
  }
@@ -37793,10 +37792,16 @@ var VideoGridView = React144__default.memo(({
37793
37792
  const ids = workspaces.map((ws) => ws.workspace_uuid || ws.workspace_name);
37794
37793
  return ids.sort().join(",");
37795
37794
  }, [workspaces]);
37795
+ const [resolvedStreamWorkspaceKey, setResolvedStreamWorkspaceKey] = useState(() => videoStreamsLoading ? null : workspaceIdsKey);
37796
37796
  useEffect(() => {
37797
37797
  setFailedStreams(/* @__PURE__ */ new Set());
37798
37798
  setR2FallbackWorkspaces(/* @__PURE__ */ new Set());
37799
37799
  }, [workspaceIdsKey]);
37800
+ useEffect(() => {
37801
+ if (!videoStreamsLoading) {
37802
+ setResolvedStreamWorkspaceKey(workspaceIdsKey);
37803
+ }
37804
+ }, [videoStreamsLoading, workspaceIdsKey]);
37800
37805
  const videoConfig = useVideoConfig();
37801
37806
  const dashboardConfig = useDashboardConfig();
37802
37807
  const timezone = useAppTimezone();
@@ -37890,7 +37895,7 @@ var VideoGridView = React144__default.memo(({
37890
37895
  return a.workspace_name.localeCompare(b.workspace_name);
37891
37896
  });
37892
37897
  }, [filteredWorkspaces]);
37893
- const streamsReady = !videoStreamsLoading;
37898
+ const streamsResolvedForWorkspaceSet = resolvedStreamWorkspaceKey === workspaceIdsKey;
37894
37899
  const resolveWorkspaceDisplayName = useCallback((workspace) => {
37895
37900
  return workspace.displayName || displayNames[`${workspace.line_id}_${workspace.workspace_name}`] || workspace.workspace_name;
37896
37901
  }, [displayNames]);
@@ -38082,7 +38087,7 @@ var VideoGridView = React144__default.memo(({
38082
38087
  const r2Url = workspaceStream?.hls_url;
38083
38088
  const fallbackUrl = getWorkspaceHlsUrl(workspace.workspace_name, workspace.line_id);
38084
38089
  const hasR2Stream = Boolean(r2Url);
38085
- const useFallback = r2FallbackWorkspaces.has(workspaceId) || streamsReady && !hasR2Stream;
38090
+ const useFallback = r2FallbackWorkspaces.has(workspaceId) || streamsResolvedForWorkspaceSet && !hasR2Stream;
38086
38091
  const hlsUrl = useFallback ? fallbackUrl : r2Url ?? "";
38087
38092
  const isR2Stream = !useFallback && hasR2Stream;
38088
38093
  const canAttemptR2 = hasR2Stream && !r2FallbackWorkspaces.has(workspaceId);
@@ -38109,7 +38114,7 @@ var VideoGridView = React144__default.memo(({
38109
38114
  lastSeenByWorkspaceId,
38110
38115
  getWorkspaceHlsUrl,
38111
38116
  r2FallbackWorkspaces,
38112
- streamsReady,
38117
+ streamsResolvedForWorkspaceSet,
38113
38118
  failedStreams
38114
38119
  ]);
38115
38120
  const croppedActiveCount = useMemo(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optifye/dashboard-core",
3
- "version": "6.12.17",
3
+ "version": "6.12.19",
4
4
  "description": "Reusable UI & logic for Optifye dashboard",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",