@anchrd/intel-ui 0.16.1 → 0.17.0

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.
Files changed (33) hide show
  1. package/package.json +10 -2
  2. package/src/board/board-calendar/board-calendar.tsx +89 -0
  3. package/src/board/board-card/board-card.tsx +106 -0
  4. package/src/board/board-data/board-data.ts +241 -0
  5. package/src/board/board-data/board-data.types.ts +63 -0
  6. package/src/board/board-detail/board-detail.tsx +629 -0
  7. package/src/board/board-gantt/board-gantt.ts +545 -0
  8. package/src/board/board-gantt/board-gantt.tsx +286 -0
  9. package/src/board/board-graph/board-graph.ts +174 -0
  10. package/src/board/board-graph/board-graph.tsx +168 -0
  11. package/src/board/board-items/board-items.ts +183 -0
  12. package/src/board/board-kanban/board-kanban.ts +97 -0
  13. package/src/board/board-kanban/board-kanban.tsx +211 -0
  14. package/src/board/board-status/board-status.ts +59 -0
  15. package/src/board/board-statuses/board-statuses.ts +63 -0
  16. package/src/board/board-statuses/board-statuses.tsx +228 -0
  17. package/src/board/board-table/board-table.ts +33 -0
  18. package/src/board/board-table/board-table.tsx +413 -0
  19. package/src/board/board-views/board-views.tsx +68 -0
  20. package/src/board/board-views/board-views.types.ts +29 -0
  21. package/src/board/board.tsx +251 -0
  22. package/src/components/ui/dropdown-menu.tsx +25 -0
  23. package/src/components/ui/item-calendar.tsx +181 -0
  24. package/src/components/ui/item-gantt.tsx +463 -0
  25. package/src/components/ui/kanban.tsx +245 -0
  26. package/src/components/ui/switch.tsx +25 -0
  27. package/src/data/intel-data-provider/intel-data-provider.ts +52 -0
  28. package/src/data/intel-data-provider/intel-data-provider.types.ts +31 -0
  29. package/src/i18n/de.json +86 -1
  30. package/src/i18n/en.json +86 -1
  31. package/src/i18n/es.json +86 -1
  32. package/src/nodes/nodes.tsx +16 -0
  33. package/src/styles.css +33 -0
package/src/i18n/es.json CHANGED
@@ -424,5 +424,90 @@
424
424
  "common.loading": "Cargando…",
425
425
  "common.retry": "Intentarlo de nuevo",
426
426
  "common.close": "Cerrar",
427
- "common.unavailable": "Intel no está disponible en este momento."
427
+ "common.unavailable": "Intel no está disponible en este momento.",
428
+ "board.summary": "{tasks} tareas en {statuses} estados",
429
+ "board.views": "Vistas de este tablero",
430
+ "board.view.kanban": "Tablero",
431
+ "board.view.table": "Tabla",
432
+ "board.view.calendar": "Calendario",
433
+ "board.view.graph": "Grafo",
434
+ "board.view.gantt": "Gantt",
435
+ "board.statuses": "Estados",
436
+ "board.statusLabel": "Nombre del estado",
437
+ "board.statusUp": "Subir el estado",
438
+ "board.statusDown": "Bajar el estado",
439
+ "board.statusRemove": "Quitar el estado {label}",
440
+ "board.addStatus": "Nuevo estado",
441
+ "board.shelfFixed": "Siempre el último",
442
+ "board.showArchived": "Mostrar archivadas",
443
+ "board.addTask": "Nueva tarea",
444
+ "board.empty": "Todavía no hay nada en este tablero. Añade arriba la primera tarea.",
445
+ "board.noTasks": "Aquí no coincide nada.",
446
+ "board.laneEmpty": "Vacío",
447
+ "board.archivedEmpty": "Nada archivado.",
448
+ "board.blocked": "Bloqueada",
449
+ "board.open": "Abierta",
450
+ "board.subtaskCount": "{done}/{total} subtareas",
451
+ "board.unassigned": "Sin asignar",
452
+ "board.assignee.me": "Yo",
453
+ "board.assignee.unnamed": "Asignada",
454
+ "board.unknownTask": "Tarea no disponible para ti",
455
+ "board.column.title": "Título",
456
+ "board.column.status": "Estado",
457
+ "board.column.assignee": "Responsable",
458
+ "board.column.startDate": "Fecha de inicio",
459
+ "board.column.dueDate": "Fecha límite",
460
+ "board.column.labels": "Etiquetas",
461
+ "board.columns": "Columnas",
462
+ "board.filterTitle": "Filtrar por título",
463
+ "board.groupBy": "Agrupar por",
464
+ "board.groupBy.none": "Nada",
465
+ "board.groupBy.status": "Estado",
466
+ "board.groupBy.assignee": "Responsable",
467
+ "board.toggleSubtasks": "Mostrar u ocultar las subtareas de {task}",
468
+ "board.calendar.previous": "Mes anterior",
469
+ "board.calendar.next": "Mes siguiente",
470
+ "board.calendar.today": "Hoy",
471
+ "board.calendar.more": "+{count} más",
472
+ "board.calendar.undated": "{count} sin fecha límite — fuera de la cuadrícula, pero en el tablero y en la tabla.",
473
+ "board.gantt.scale": "Escala",
474
+ "board.gantt.scale.days": "Días",
475
+ "board.gantt.scale.weeks": "Semanas",
476
+ "board.gantt.scale.months": "Meses",
477
+ "board.gantt.today": "Hoy",
478
+ "board.gantt.move": "Mover {task}",
479
+ "board.gantt.resizeStart": "Cambiar el inicio de {task}",
480
+ "board.gantt.resizeEnd": "Cambiar el vencimiento de {task}",
481
+ "board.gantt.spanLabel": "{start} a {end}",
482
+ "board.gantt.waitsFor": "espera a {tasks}",
483
+ "board.gantt.hiddenLinks": "{count} dependencias no se dibujan: la tarea esperada no tiene barra aquí.",
484
+ "board.gantt.undated": "Sin fechas",
485
+ "board.gantt.undatedCount": "{count} sin fechas — en el tablero, pero en ninguna línea de tiempo.",
486
+ "board.gantt.nothingDated": "Nada en este tablero tiene fecha todavía. Da a una tarea una fecha de vencimiento y aparecerá aquí.",
487
+ "board.graph.subtree": "Subárbol",
488
+ "board.graph.wholeBoard": "Todo el tablero",
489
+ "board.graph.parentEdge": "contiene",
490
+ "board.graph.dependsEdge": "espera a",
491
+ "board.detail": "Tarea",
492
+ "board.description": "Descripción",
493
+ "board.subtasks": "Subtareas",
494
+ "board.addSubtask": "Nueva subtarea",
495
+ "board.dependencies": "Espera a",
496
+ "board.addDependency": "Añadir una dependencia",
497
+ "board.removeDependency": "Quitar esta dependencia",
498
+ "board.references": "Referencias",
499
+ "board.addReference": "Añadir una referencia",
500
+ "board.removeReference": "Quitar esta referencia",
501
+ "board.addLabel": "Nueva etiqueta",
502
+ "board.removeLabel": "Quitar la etiqueta {label}",
503
+ "board.deleteTask": "Eliminar la tarea",
504
+ "board.deleteConfirm": "Eliminar «{task}» borra la tarea y todo lo que hay debajo: {count} en total. Cualquier dependencia que apunte ahí se limpia.",
505
+ "board.deleted": "Eliminadas: {count}.",
506
+ "board.archivedHint": "Esta tarea está en el archivo. Muévela a otro estado para recuperarla.",
507
+ "board.dnd.start": "{task} tomada",
508
+ "board.dnd.over": "{task} sobre {lane}",
509
+ "board.dnd.end": "{task} soltada en {lane}",
510
+ "board.dnd.cancel": "Se canceló soltar {task}",
511
+ "board.dragCard": "Arrastrar {task}",
512
+ "board.statusTerminal": "Cuenta como hecho"
428
513
  }
@@ -23,6 +23,12 @@ const NodeEditor = lazy(async () => ({
23
23
  const AgentPanel = lazy(async () => ({
24
24
  default: (await import("@/agent/agent.tsx")).AgentPanel,
25
25
  }));
26
+ // Lazy for the third time, and the reason is the same: dnd-kit, TanStack Table and — behind its own
27
+ // second split — Sigma belong to the board alone, and every other screen would otherwise carry them
28
+ // into its first paint.
29
+ const BoardPanel = lazy(async () => ({
30
+ default: (await import("@/board/board.tsx")).BoardPanel,
31
+ }));
26
32
 
27
33
  export function Nodes() {
28
34
  const { data } = useIntelRouterContext();
@@ -151,6 +157,16 @@ export function Nodes() {
151
157
  <AttachmentPanel node={selected} />
152
158
  ) : selected.kind === "table" ? (
153
159
  <NodeTablePanel node={selected} />
160
+ ) : selected.kind === "board" ? (
161
+ // ⚠️ Before the editor branch for the same reason the agent is: a board's version
162
+ // body is a JSON document (#285), and BlockNote would open it as prose.
163
+ <Suspense
164
+ fallback={
165
+ <p className="p-6 text-sm text-muted-foreground">{i18n.t("common.loading")}</p>
166
+ }
167
+ >
168
+ <BoardPanel key={selected.id} node={selected} />
169
+ </Suspense>
154
170
  ) : selected.kind === "agent" ? (
155
171
  // ⚠️ Before the editor branch, and never reaching it: an agent's version body is a
156
172
  // definition document, not prose, and BlockNote would try to open JSON as a text.
package/src/styles.css CHANGED
@@ -39,6 +39,25 @@
39
39
  --sidebar-accent-foreground: oklch(0.205 0 0);
40
40
  --sidebar-border: oklch(0.922 0 0);
41
41
  --sidebar-ring: oklch(0.708 0 0);
42
+ /* The board's status ramp (anchrd/intel#286). These are the only tokens in Intel that carry hue
43
+ on purpose, and the reason is that they are the only ones asked to tell things APART: a month
44
+ grid of achromatic dots codes nothing, and neither does a graph whose blocked node looks like
45
+ its neighbour.
46
+
47
+ ⚠️ A step of the ramp belongs to a POSITION, never to a status id. A board's status list is
48
+ configured per board — renamed, extended, reordered (`board_configure`) — so `done` is not a
49
+ colour any more than `column four` is a name. The n-th status takes the n-th step and the ramp
50
+ wraps; `archived` is the exception and always takes `--muted-foreground`, because a shelf is
51
+ not a stage (see `board-status.ts`).
52
+
53
+ ⚠️ Colour is never the only channel. Every place these are used names the status in text as
54
+ well, so a reader who does not see the difference reads it instead. */
55
+ --board-status-1: oklch(0.58 0.02 260);
56
+ --board-status-2: oklch(0.55 0.16 255);
57
+ --board-status-3: oklch(0.65 0.15 65);
58
+ --board-status-4: oklch(0.55 0.14 150);
59
+ --board-status-5: oklch(0.53 0.18 305);
60
+ --board-status-6: oklch(0.56 0.15 20);
42
61
  }
43
62
 
44
63
  .dark {
@@ -69,6 +88,14 @@
69
88
  --sidebar-accent-foreground: oklch(0.985 0 0);
70
89
  --sidebar-border: oklch(1 0 0 / 10%);
71
90
  --sidebar-ring: oklch(0.556 0 0);
91
+ /* The same six steps, lifted for a dark surface. Same hues, same order — a board must not change
92
+ which colour a column has when the reader switches the appearance. */
93
+ --board-status-1: oklch(0.72 0.02 260);
94
+ --board-status-2: oklch(0.7 0.14 255);
95
+ --board-status-3: oklch(0.78 0.13 65);
96
+ --board-status-4: oklch(0.72 0.13 150);
97
+ --board-status-5: oklch(0.7 0.16 305);
98
+ --board-status-6: oklch(0.71 0.14 20);
72
99
  }
73
100
 
74
101
  @theme inline {
@@ -103,6 +130,12 @@
103
130
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
104
131
  --color-sidebar-border: var(--sidebar-border);
105
132
  --color-sidebar-ring: var(--sidebar-ring);
133
+ --color-board-status-1: var(--board-status-1);
134
+ --color-board-status-2: var(--board-status-2);
135
+ --color-board-status-3: var(--board-status-3);
136
+ --color-board-status-4: var(--board-status-4);
137
+ --color-board-status-5: var(--board-status-5);
138
+ --color-board-status-6: var(--board-status-6);
106
139
  }
107
140
 
108
141
  @layer base {