@industry-theme/backlogmd-kanban-panel 1.0.29 → 1.0.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"KanbanPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/KanbanPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,QAAA,MAAM,IAAI;;;;;;;;;;;;CAkB0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAoLnC,eAAO,MAAM,UAAU,EAAE,KA0BxB,CAAC;AAKF,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAC"}
1
+ {"version":3,"file":"KanbanPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/KanbanPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAe5D,QAAA,MAAM,IAAI;;;;;;;;;;;;CAkB0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqKnC,eAAO,MAAM,UAAU,EAAE,KA0BxB,CAAC;AAKF,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAc5B,CAAC"}
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { Task } from '@backlog-md/core';
3
- interface TaskCardProps {
3
+ export interface TaskCardProps {
4
4
  task: Task;
5
5
  onClick?: (task: Task) => void;
6
6
  isDragOverlay?: boolean;
7
7
  isSelected?: boolean;
8
8
  }
9
9
  export declare const TaskCard: React.FC<TaskCardProps>;
10
- export {};
11
10
  //# sourceMappingURL=TaskCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TaskCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/components/TaskCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,UAAU,aAAa;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqL5C,CAAC"}
1
+ {"version":3,"file":"TaskCard.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/components/TaskCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyL5C,CAAC"}
@@ -1,13 +1,26 @@
1
1
  /**
2
2
  * Mock Data Generator for Kanban Panel Testing
3
3
  *
4
- * Generates sample task data matching the Backlog.md Task interface
5
- * for testing and development purposes.
4
+ * Provides raw markdown file contents from the Backlog.md CLI project.
5
+ * These are passed to Core for parsing, testing the actual extraction logic.
6
6
  */
7
7
  import type { Task } from '@backlog-md/core';
8
8
  /**
9
- * Generate mock tasks for testing the kanban board
10
- * Creates 30 tasks with evenly distributed statuses (To Do, In Progress, Done)
9
+ * Raw markdown file contents from Backlog.md project
10
+ * The Core instance will parse these to extract description, acceptance criteria, etc.
11
+ */
12
+ export declare const rawTaskMarkdownFiles: Record<string, string>;
13
+ /**
14
+ * Get file paths for all mock task files
15
+ */
16
+ export declare function getMockTaskFilePaths(): string[];
17
+ /**
18
+ * Get raw markdown content for a file path
19
+ */
20
+ export declare function getMockFileContent(filePath: string): string | undefined;
21
+ /**
22
+ * Legacy function - returns empty array since we now use raw markdown
23
+ * @deprecated Use rawTaskMarkdownFiles directly
11
24
  */
12
25
  export declare function generateMockTasks(): Task[];
13
26
  /**
@@ -30,7 +43,7 @@ export declare function getMockPanelConfig(): {
30
43
  enableEdit: boolean;
31
44
  enableCreate: boolean;
32
45
  };
33
- /** Mock milestone data structure (includes filePath for test setup) */
46
+ /** Mock milestone data structure */
34
47
  export interface MockMilestone {
35
48
  id: string;
36
49
  title: string;
@@ -41,7 +54,6 @@ export interface MockMilestone {
41
54
  }
42
55
  /**
43
56
  * Generate mock milestones for testing the milestone view
44
- * Note: Milestone files must be named m-{number}.md (e.g., m-0.md, m-1.md)
45
57
  */
46
58
  export declare function generateMockMilestones(): MockMilestone[];
47
59
  //# sourceMappingURL=mockData.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/mocks/mockData.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAiE7C;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,EAAE,CA6B1C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;GAEG;AACH,wBAAgB,kBAAkB;;;;;;;;;;;;EAcjC;AAED,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,aAAa,EAAE,CAmCxD"}
1
+ {"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/mocks/mockData.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAgavD,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,EAAE,CAG1C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;GAEG;AACH,wBAAgB,kBAAkB;;;;;;;;;;;;EAcjC;AAED,oCAAoC;AACpC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,aAAa,EAAE,CAmCxD"}
@@ -4225,15 +4225,24 @@ function parseAcceptanceCriteria(content2) {
4225
4225
  return criteria;
4226
4226
  }
4227
4227
  function extractDescription(content2, title) {
4228
+ const descriptionSection = extractSection(content2, "Description");
4229
+ if (descriptionSection) {
4230
+ return stripHtmlComments(descriptionSection).trim();
4231
+ }
4228
4232
  let body = content2;
4229
4233
  if (title) {
4230
- body = body.replace(new RegExp(`^#\\s+${escapeRegex(title)}\\s*$`, "m"), "");
4234
+ body = body.replace(new RegExp(`^#\\s+${escapeRegex(title)}\\s*\\n?`, "m"), "");
4235
+ }
4236
+ const firstSectionMatch = body.match(/^##\s+/m);
4237
+ if (firstSectionMatch && firstSectionMatch.index !== void 0) {
4238
+ body = body.slice(0, firstSectionMatch.index);
4231
4239
  }
4232
- body = body.replace(/^##\s+Acceptance Criteria[\s\S]*?(?=^##|$)/m, "");
4233
- body = body.replace(/^##\s+Implementation Plan[\s\S]*?(?=^##|$)/m, "");
4234
- body = body.replace(/^##\s+Implementation Notes[\s\S]*?(?=^##|$)/m, "");
4240
+ body = stripHtmlComments(body);
4235
4241
  return body.trim();
4236
4242
  }
4243
+ function stripHtmlComments(content2) {
4244
+ return content2.replace(/<!--[\s\S]*?-->/g, "").trim();
4245
+ }
4237
4246
  function extractIdFromPath(filePath) {
4238
4247
  const filename = filePath.split("/").pop() || "";
4239
4248
  const match = filename.match(/^(?:task-)?(\d+(?:\.\d+)?)\s*-/);
@@ -6150,17 +6159,17 @@ const TaskCard = ({
6150
6159
  case "medium":
6151
6160
  return theme2.colors.warning;
6152
6161
  case "low":
6153
- return theme2.colors.info;
6162
+ return theme2.colors.primary;
6154
6163
  default:
6155
- return theme2.colors.border;
6164
+ return theme2.colors.primary;
6156
6165
  }
6157
6166
  };
6158
6167
  const style2 = {
6159
6168
  flexShrink: 0,
6160
- background: isSelected ? `${theme2.colors.primary}10` : theme2.colors.surface,
6169
+ background: theme2.colors.surface,
6161
6170
  borderRadius: theme2.radii[2],
6162
6171
  padding: "12px",
6163
- border: `1px solid ${isSelected ? theme2.colors.primary : theme2.colors.border}`,
6172
+ border: `1px solid ${theme2.colors.border}`,
6164
6173
  borderLeft: `4px solid ${getPriorityColor(task.priority)}`,
6165
6174
  cursor: isDragOverlay ? "grabbing" : "grab",
6166
6175
  transition: isDragging ? "none" : "all 0.2s ease",
@@ -6170,10 +6179,6 @@ const TaskCard = ({
6170
6179
  // When dragging, the original card stays in place but becomes a placeholder
6171
6180
  // The DragOverlay handles the visual movement
6172
6181
  opacity: isDragging ? 0.4 : 1,
6173
- // Selected card styling
6174
- ...isSelected && !isDragOverlay && {
6175
- boxShadow: `0 0 0 1px ${theme2.colors.primary}`
6176
- },
6177
6182
  // Overlay card styling
6178
6183
  ...isDragOverlay && {
6179
6184
  boxShadow: `0 8px 16px rgba(0, 0, 0, 0.15)`,
@@ -6198,14 +6203,20 @@ const TaskCard = ({
6198
6203
  ...attributes,
6199
6204
  onMouseEnter: (e) => {
6200
6205
  if (!isDragging && !isDragOverlay) {
6201
- e.currentTarget.style.transform = "translateY(-2px)";
6202
- e.currentTarget.style.boxShadow = `0 4px 8px ${theme2.colors.border}`;
6206
+ const desc = e.currentTarget.querySelector("p");
6207
+ if (desc) {
6208
+ desc.style.maxHeight = "20em";
6209
+ }
6210
+ e.currentTarget.style.borderLeft = `4px solid ${getPriorityColor(task.priority)}`;
6203
6211
  }
6204
6212
  },
6205
6213
  onMouseLeave: (e) => {
6206
6214
  if (!isDragging && !isDragOverlay) {
6207
- e.currentTarget.style.transform = "translateY(0)";
6208
- e.currentTarget.style.boxShadow = "none";
6215
+ const desc = e.currentTarget.querySelector("p");
6216
+ if (desc) {
6217
+ desc.style.maxHeight = "2.8em";
6218
+ }
6219
+ e.currentTarget.style.borderLeft = `4px solid ${getPriorityColor(task.priority)}`;
6209
6220
  }
6210
6221
  },
6211
6222
  children: [
@@ -6215,7 +6226,7 @@ const TaskCard = ({
6215
6226
  style: {
6216
6227
  margin: "0 0 8px 0",
6217
6228
  fontSize: theme2.fontSizes[2],
6218
- color: theme2.colors.text,
6229
+ color: isSelected ? getPriorityColor(task.priority) : theme2.colors.text,
6219
6230
  fontWeight: theme2.fontWeights.medium
6220
6231
  },
6221
6232
  children: displayTitle
@@ -6229,11 +6240,10 @@ const TaskCard = ({
6229
6240
  fontSize: theme2.fontSizes[1],
6230
6241
  color: theme2.colors.textSecondary,
6231
6242
  overflow: "hidden",
6232
- textOverflow: "ellipsis",
6233
- display: "-webkit-box",
6234
- WebkitLineClamp: 2,
6235
- WebkitBoxOrient: "vertical",
6236
- lineHeight: "1.4"
6243
+ lineHeight: "1.4",
6244
+ maxHeight: "2.8em",
6245
+ // 2 lines (1.4 * 2)
6246
+ transition: "max-height 0.3s ease"
6237
6247
  },
6238
6248
  children: task.description
6239
6249
  }