@asteby/metacore-runtime-react 20.1.5 → 20.1.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @asteby/metacore-runtime-react
2
2
 
3
+ ## 20.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 0ff3d4e: fix(kanban): fixed-width lanes (horizontal scroll, no squish) + drag preview matches card
8
+
9
+ Lanes were `flex-1 min-w-[220px] max-w-[320px]`, so with many stages they compressed
10
+ to a cramped width. They're now a fixed `w-[300px] shrink-0` so columns keep a
11
+ comfortable width and the board scrolls horizontally instead of squishing. The drag
12
+ overlay was a fixed `w-72` that no longer matched the in-lane card; it's now
13
+ `w-[284px]` (lane width minus the column padding) so a dragged card is the same size
14
+ as it sits in the column.
15
+
3
16
  ## 20.1.5
4
17
 
5
18
  ### Patch Changes
@@ -284,7 +284,7 @@ export function DynamicKanban({ model, endpoint, refreshTrigger, onCardClick, pa
284
284
  }
285
285
  }, [api, endpoint, groupByKey, model, records, stageOfCard, t, transitions]);
286
286
  if (loading) {
287
- return (_jsx("div", { className: "flex gap-4 overflow-x-auto p-1", children: [0, 1, 2, 3].map((i) => (_jsxs("div", { className: "min-w-[220px] max-w-[320px] flex-1 space-y-3", children: [_jsx(Skeleton, { className: "h-8 w-full" }), _jsx(Skeleton, { className: "h-24 w-full" }), _jsx(Skeleton, { className: "h-24 w-full" })] }, i))) }));
287
+ return (_jsx("div", { className: "flex gap-4 overflow-x-auto p-1", children: [0, 1, 2, 3].map((i) => (_jsxs("div", { className: "w-[300px] shrink-0 space-y-3", children: [_jsx(Skeleton, { className: "h-8 w-full" }), _jsx(Skeleton, { className: "h-24 w-full" }), _jsx(Skeleton, { className: "h-24 w-full" })] }, i))) }));
288
288
  }
289
289
  if (!metadata || !groupByKey || stages.length === 0) {
290
290
  return (_jsx("div", { className: "rounded-md border border-dashed p-8 text-center text-sm text-muted-foreground", children: t('kanban.noStages', {
@@ -322,7 +322,7 @@ function KanbanLane({ stage, count, isDark, dimmed, disabled, children }) {
322
322
  const headerStyle = generateBadgeStyles(stage.color || optionColor(stage.key), {
323
323
  isDark,
324
324
  });
325
- return (_jsxs("div", { ref: setNodeRef, className: "flex min-w-[220px] max-w-[320px] flex-1 flex-col rounded-lg border bg-muted/30 transition-opacity", style: {
325
+ return (_jsxs("div", { ref: setNodeRef, className: "flex w-[300px] shrink-0 flex-col rounded-lg border bg-muted/30 transition-opacity", style: {
326
326
  opacity: dimmed ? 0.45 : 1,
327
327
  outline: isOver && !disabled ? '2px solid var(--ring, #3b82f6)' : 'none',
328
328
  outlineOffset: 2,
@@ -342,5 +342,5 @@ function KanbanCard({ card, titleCol, fieldCols, actions, locale, timeZone, curr
342
342
  }
343
343
  // Static preview rendered inside the DragOverlay (no dnd hooks, no menu).
344
344
  function CardPreview({ card, titleCol, fieldCols, locale, timeZone, currency, }) {
345
- return (_jsx(Card, { className: "w-72 cursor-grabbing border-primary/40 shadow-lg", children: _jsxs(CardContent, { className: "space-y-1.5 p-3", children: [_jsx("div", { className: "break-words text-sm font-medium leading-snug", children: titleCol ? (_jsx(ActivityValueRenderer, { value: card[titleCol.key], col: titleCol, locale: locale, timeZone: timeZone, currency: currency })) : (String(card.id)) }), fieldCols.map((col) => (_jsxs("div", { className: "flex min-w-0 items-start gap-1.5 text-xs text-muted-foreground", children: [_jsxs("span", { className: "shrink-0 opacity-70", children: [col.label, ":"] }), _jsx("span", { className: "min-w-0 break-words", children: _jsx(ActivityValueRenderer, { value: card[col.key], col: col, locale: locale, timeZone: timeZone, currency: currency }) })] }, col.key)))] }) }));
345
+ return (_jsx(Card, { className: "w-[284px] cursor-grabbing border-primary/40 shadow-lg", children: _jsxs(CardContent, { className: "space-y-1.5 p-3", children: [_jsx("div", { className: "break-words text-sm font-medium leading-snug", children: titleCol ? (_jsx(ActivityValueRenderer, { value: card[titleCol.key], col: titleCol, locale: locale, timeZone: timeZone, currency: currency })) : (String(card.id)) }), fieldCols.map((col) => (_jsxs("div", { className: "flex min-w-0 items-start gap-1.5 text-xs text-muted-foreground", children: [_jsxs("span", { className: "shrink-0 opacity-70", children: [col.label, ":"] }), _jsx("span", { className: "min-w-0 break-words", children: _jsx(ActivityValueRenderer, { value: card[col.key], col: col, locale: locale, timeZone: timeZone, currency: currency }) })] }, col.key)))] }) }));
346
346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/metacore-runtime-react",
3
- "version": "20.1.5",
3
+ "version": "20.1.6",
4
4
  "description": "React runtime for metacore hosts — renders addon contributions dynamically",
5
5
  "repository": {
6
6
  "type": "git",
@@ -440,7 +440,7 @@ export function DynamicKanban({
440
440
  return (
441
441
  <div className="flex gap-4 overflow-x-auto p-1">
442
442
  {[0, 1, 2, 3].map((i) => (
443
- <div key={i} className="min-w-[220px] max-w-[320px] flex-1 space-y-3">
443
+ <div key={i} className="w-[300px] shrink-0 space-y-3">
444
444
  <Skeleton className="h-8 w-full" />
445
445
  <Skeleton className="h-24 w-full" />
446
446
  <Skeleton className="h-24 w-full" />
@@ -579,7 +579,7 @@ function KanbanLane({ stage, count, isDark, dimmed, disabled, children }: Kanban
579
579
  return (
580
580
  <div
581
581
  ref={setNodeRef}
582
- className="flex min-w-[220px] max-w-[320px] flex-1 flex-col rounded-lg border bg-muted/30 transition-opacity"
582
+ className="flex w-[300px] shrink-0 flex-col rounded-lg border bg-muted/30 transition-opacity"
583
583
  style={{
584
584
  opacity: dimmed ? 0.45 : 1,
585
585
  outline: isOver && !disabled ? '2px solid var(--ring, #3b82f6)' : 'none',
@@ -739,7 +739,7 @@ function CardPreview({
739
739
  currency,
740
740
  }: Omit<KanbanCardProps, 'actions' | 'onClick' | 'onAction'>) {
741
741
  return (
742
- <Card className="w-72 cursor-grabbing border-primary/40 shadow-lg">
742
+ <Card className="w-[284px] cursor-grabbing border-primary/40 shadow-lg">
743
743
  <CardContent className="space-y-1.5 p-3">
744
744
  <div className="break-words text-sm font-medium leading-snug">
745
745
  {titleCol ? (