@libxai/board 1.9.9 → 1.9.11

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/dist/index.d.ts CHANGED
@@ -2925,6 +2925,10 @@ interface TaskGridProps {
2925
2925
  * con multi-selección) + una etiqueta para el modal de confirmación. */
2926
2926
  onDeleteRequest?: (taskIds: string[], label: string) => void;
2927
2927
  onTaskReparent?: (taskId: string, newParentId: string | null, position?: number) => void;
2928
+ /** v1.9.10: árbol COMPLETO sin filtrar. Cuando hay un filtro activo, `tasks`
2929
+ * es un subconjunto; para reordenar correctamente la posición de destino debe
2930
+ * traducirse al índice real entre TODOS los hermanos (no solo los visibles). */
2931
+ allTasks?: Task[];
2928
2932
  scrollContainerRef?: React.RefObject<HTMLElement>;
2929
2933
  showCriticalPath?: boolean;
2930
2934
  }
@@ -2933,6 +2937,7 @@ onTaskClick, onTaskDblClick, // v0.8.0
2933
2937
  onTaskContextMenu, // v0.8.0
2934
2938
  onTaskToggle, scrollTop: _scrollTop, columns, onToggleColumn, onColumnResize, onTaskUpdate, onBulkFill, onTaskIndent, onTaskOutdent, onTaskMove, onMultiTaskDelete, onTaskDuplicate, onTaskCreate, onTaskRename, onCreateSubtask, onOpenTaskModal, onDeleteRequest, // v0.17.34
2935
2939
  onTaskReparent, // v0.17.68
2940
+ allTasks, // v1.9.10: árbol completo para traducir posición con filtros activos
2936
2941
  scrollContainerRef, // v0.18.15
2937
2942
  showCriticalPath, }: TaskGridProps): react_jsx_runtime.JSX.Element;
2938
2943
 
@@ -3796,11 +3801,11 @@ interface GanttTranslations {
3796
3801
  /**
3797
3802
  * English translations (default)
3798
3803
  */
3799
- declare const en$2: GanttTranslations;
3804
+ declare const en$1: GanttTranslations;
3800
3805
  /**
3801
3806
  * Spanish translations
3802
3807
  */
3803
- declare const es$2: GanttTranslations;
3808
+ declare const es$1: GanttTranslations;
3804
3809
  /**
3805
3810
  * All available translations
3806
3811
  */
@@ -4392,15 +4397,15 @@ declare function ListView({ tasks, config, callbacks, isLoading, error, classNam
4392
4397
  /**
4393
4398
  * Dark theme for ListView — Chronos V2.0
4394
4399
  */
4395
- declare const darkTheme$3: ListViewTheme;
4400
+ declare const darkTheme$2: ListViewTheme;
4396
4401
  /**
4397
4402
  * Light theme for ListView
4398
4403
  */
4399
- declare const lightTheme$3: ListViewTheme;
4404
+ declare const lightTheme$2: ListViewTheme;
4400
4405
  /**
4401
4406
  * Neutral theme for ListView
4402
4407
  */
4403
- declare const neutralTheme$3: ListViewTheme;
4408
+ declare const neutralTheme$2: ListViewTheme;
4404
4409
  /**
4405
4410
  * All available themes
4406
4411
  */
@@ -4424,11 +4429,11 @@ type ListViewSupportedLocale = 'en' | 'es';
4424
4429
  /**
4425
4430
  * English translations
4426
4431
  */
4427
- declare const en$1: ListViewTranslations;
4432
+ declare const en: ListViewTranslations;
4428
4433
  /**
4429
4434
  * Spanish translations
4430
4435
  */
4431
- declare const es$1: ListViewTranslations;
4436
+ declare const es: ListViewTranslations;
4432
4437
  /**
4433
4438
  * All available translations
4434
4439
  */
@@ -4443,396 +4448,201 @@ declare function getListViewTranslations(locale: ListViewSupportedLocale | strin
4443
4448
  declare function mergeListViewTranslations(locale: ListViewSupportedLocale | string, customTranslations?: Partial<ListViewTranslations>): ListViewTranslations;
4444
4449
 
4445
4450
  /**
4446
- * CalendarBoard Component Types
4447
- * @version 0.17.241
4448
- */
4449
-
4450
- /**
4451
- * Calendar view modes
4452
- */
4453
- type CalendarViewMode = 'month' | 'week' | 'day';
4454
- /**
4455
- * Day of the week (0 = Sunday, 6 = Saturday)
4456
- */
4457
- type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6;
4458
- /**
4459
- * Calendar event (task displayed on calendar)
4451
+ * Motor de layout del Calendario (Asakaa Pulse) — Sprint 1.
4452
+ *
4453
+ * Convierte tareas reales (del Gantt) en barras posicionadas por semana, y los
4454
+ * elementos de día (hitos/desembolsos/vencimientos/externos/ausencias) en chips,
4455
+ * empaquetándolos en "lanes" sin solaparse — fiel a layoutWeek del diseño de
4456
+ * referencia (cal-data.js). Solo lectura.
4457
+ *
4458
+ * El calendario usa un "serial" de día: índice continuo dentro del mes visible
4459
+ * (1..N), con lunes = columna 0. Esto permite posicionar barras que cruzan
4460
+ * semanas con muescas de continuación.
4460
4461
  */
4461
- interface CalendarEvent {
4462
+ type DayItemType = 'hito' | 'desembolso' | 'deadline' | 'ext' | 'aus';
4463
+ interface CalTask {
4464
+ uid: string;
4462
4465
  id: string;
4463
- title: string;
4464
- start: Date;
4465
- end: Date;
4466
- color?: string;
4467
- status?: 'todo' | 'in-progress' | 'completed';
4468
- progress?: number;
4469
- assignees?: Task['assignees'];
4470
- task: Task;
4471
- }
4472
- /**
4473
- * Calendar day info
4474
- */
4475
- interface CalendarDay {
4476
- date: Date;
4477
- isCurrentMonth: boolean;
4478
- isToday: boolean;
4479
- isWeekend: boolean;
4480
- events: CalendarEvent[];
4481
- }
4482
- /**
4483
- * Theme configuration for calendar
4484
- */
4485
- interface CalendarTheme {
4486
- bgPrimary: string;
4487
- bgSecondary: string;
4488
- bgHover: string;
4489
- bgToday: string;
4490
- bgWeekend: string;
4491
- bgOtherMonth: string;
4492
- border: string;
4493
- borderLight: string;
4494
- textPrimary: string;
4495
- textSecondary: string;
4496
- textMuted: string;
4497
- textToday: string;
4498
- accent: string;
4499
- accentHover: string;
4500
- accentLight: string;
4501
- statusTodo: string;
4502
- statusInProgress: string;
4503
- statusCompleted: string;
4504
- focusRing: string;
4505
- glass: string;
4506
- glassBorder: string;
4507
- glassHover: string;
4508
- neonRed: string;
4509
- glowBlue: string;
4510
- glowRed: string;
4511
- }
4512
- /**
4513
- * Permissions for calendar operations
4514
- */
4515
- interface CalendarPermissions {
4516
- canCreateTask?: boolean;
4517
- /** v1.4.10: When true, user can only create subtasks (not root-level tasks) */
4518
- canCreateSubtaskOnly?: boolean;
4519
- canUpdateTask?: boolean;
4520
- canDeleteTask?: boolean;
4521
- canDragDrop?: boolean;
4522
- canResize?: boolean;
4466
+ name: string;
4467
+ projectId: string;
4468
+ startSerial: number;
4469
+ endSerial: number;
4470
+ hrs: number;
4471
+ cost: string;
4472
+ critical: boolean;
4473
+ who?: string;
4474
+ realStart: Date;
4475
+ realEnd: Date;
4476
+ /** fase = tarea-padre RAÍZ del WBS (para el filtro "Fase"). uid de la raíz;
4477
+ * si la tarea es de primer nivel, su propia fase es ella misma. */
4478
+ phaseId?: string;
4479
+ phaseName?: string;
4480
+ }
4481
+ interface DayItem {
4482
+ serial: number;
4483
+ type: DayItemType;
4484
+ label: string;
4523
4485
  }
4524
- /**
4525
- * CalendarBoard configuration
4526
- */
4527
- interface CalendarConfig {
4528
- /** Theme: 'dark' | 'light' | 'neutral' */
4529
- theme?: 'dark' | 'light' | 'neutral';
4530
- /** Locale for i18n */
4531
- locale?: 'en' | 'es' | string;
4532
- /** Custom translations */
4533
- customTranslations?: Partial<CalendarTranslations>;
4534
- /** Default view mode */
4535
- defaultView?: CalendarViewMode;
4536
- /** First day of week (0 = Sunday, 1 = Monday, etc.) */
4537
- firstDayOfWeek?: WeekDay;
4538
- /** Show week numbers */
4539
- showWeekNumbers?: boolean;
4540
- /** Show mini calendar in sidebar */
4541
- showMiniCalendar?: boolean;
4542
- /** Max events to show per day before "+N more" */
4543
- maxEventsPerDay?: number;
4544
- /** Available users for filtering */
4545
- availableUsers?: User$1[];
4546
- /** Permissions */
4547
- permissions?: CalendarPermissions;
4548
- /** Enable drag and drop */
4549
- enableDragDrop?: boolean;
4550
- /** Show task details on hover */
4551
- showTooltip?: boolean;
4552
- /** Show right sidebar with unscheduled/backlog tasks (default: true) */
4553
- showBacklog?: boolean;
4554
- /** Render custom content on the right side of header (e.g. lens toggle) */
4555
- toolbarRightContent?: ReactNode;
4486
+ interface MonthGrid {
4487
+ /** Fecha del primer día visible (puede ser de mes anterior, siempre lunes). */
4488
+ gridStart: Date;
4489
+ /** Semanas como rangos de serial [ws, we], 6 semanas máximo. */
4490
+ weeks: Array<{
4491
+ ws: number;
4492
+ we: number;
4493
+ }>;
4494
+ /** serial Date */
4495
+ serialToDate: (serial: number) => Date;
4496
+ /** Date serial dentro de la grid (o null si fuera). */
4497
+ dateToSerial: (d: Date) => number;
4498
+ /** serial del primer día del mes objetivo (para detectar "out"). */
4499
+ monthStartSerial: number;
4500
+ monthEndSerial: number;
4556
4501
  }
4502
+
4557
4503
  /**
4558
- * CalendarBoard translations
4504
+ * Calendario (Asakaa Pulse) — componentes de presentación puros (Sprint 1, solo lectura).
4505
+ *
4506
+ * Traducción a TSX de cal-components.jsx, fiel al diseño aprobado. Sin estado,
4507
+ * sin drag/resize: solo pintan barras de tarea, chips de día, "+N más" y la
4508
+ * leyenda usando las clases .cal-* de calendar.css y el motor de calendarLayout.ts.
4509
+ *
4510
+ * El color de cada proyecto NO se inventa: se recibe vía la prop `projects`
4511
+ * (mapa projectId → color CSS) y se inyecta en la barra como variable `--proj`.
4559
4512
  */
4560
- interface CalendarTranslations {
4561
- navigation: {
4562
- today: string;
4563
- previous: string;
4564
- next: string;
4565
- month: string;
4566
- week: string;
4567
- day: string;
4568
- };
4569
- weekdays: {
4570
- sun: string;
4571
- mon: string;
4572
- tue: string;
4573
- wed: string;
4574
- thu: string;
4575
- fri: string;
4576
- sat: string;
4577
- };
4578
- weekdaysFull: {
4579
- sunday: string;
4580
- monday: string;
4581
- tuesday: string;
4582
- wednesday: string;
4583
- thursday: string;
4584
- friday: string;
4585
- saturday: string;
4586
- };
4587
- months: {
4588
- january: string;
4589
- february: string;
4590
- march: string;
4591
- april: string;
4592
- may: string;
4593
- june: string;
4594
- july: string;
4595
- august: string;
4596
- september: string;
4597
- october: string;
4598
- november: string;
4599
- december: string;
4600
- };
4601
- status: {
4602
- todo: string;
4603
- inProgress: string;
4604
- completed: string;
4605
- };
4606
- labels: {
4607
- allDay: string;
4608
- moreEvents: string;
4609
- noEvents: string;
4610
- newTask: string;
4611
- viewAll: string;
4612
- week: string;
4613
- backlogTitle: string;
4614
- systemStatus: string;
4615
- budgetUtil: string;
4616
- variance: string;
4617
- cost: string;
4618
- estimate: string;
4619
- sold: string;
4620
- cashOut: string;
4621
- typeToAdd: string;
4622
- critical: string;
4623
- blocker: string;
4624
- risk: string;
4625
- delay: string;
4626
- days: string;
4627
- };
4628
- tooltips: {
4629
- progress: string;
4630
- status: string;
4631
- assignees: string;
4632
- duration: string;
4633
- days: string;
4634
- };
4513
+
4514
+ /** Modo del valor mostrado en el extremo de la barra. */
4515
+ type MoneyMode = '$' | 'Hrs';
4516
+
4517
+ interface DailyLog {
4518
+ date: string;
4519
+ hours: number;
4635
4520
  }
4636
- /**
4637
- * Callback functions for CalendarBoard
4638
- */
4639
- interface CalendarCallbacks {
4640
- /** Event click handler */
4641
- onEventClick?: (event: CalendarEvent) => void;
4642
- /** Event double-click handler */
4643
- onEventDoubleClick?: (event: CalendarEvent) => void;
4644
- /** Date click handler (create new task) */
4645
- onDateClick?: (date: Date) => void;
4646
- /** Task update after drag/drop */
4647
- onTaskUpdate?: (task: Task) => void;
4648
- /** Task delete handler */
4649
- onTaskDelete?: (taskId: string) => void;
4650
- /** View change handler */
4651
- onViewChange?: (view: CalendarViewMode) => void;
4652
- /** Date range change handler */
4653
- onDateRangeChange?: (start: Date, end: Date) => void;
4654
- /** v0.17.99: Quick create task handler */
4655
- onTaskCreate?: (taskData: Partial<Task>) => void;
4656
- /** v0.17.241: Upload attachments handler */
4657
- onUploadAttachments?: (taskId: string, files: File[]) => Promise<void>;
4658
- /** v0.17.241: Delete attachment handler */
4659
- onDeleteAttachment?: (attachmentId: string) => Promise<void>;
4521
+ interface TeamMember {
4522
+ userId: string;
4523
+ name: string;
4524
+ weeklyCapacity?: number;
4525
+ dailyEstimated: DailyLog[];
4660
4526
  }
4661
- /**
4662
- * Main CalendarBoard props
4663
- */
4664
- interface CalendarBoardProps {
4665
- /** Tasks to display */
4527
+
4528
+ interface Props {
4666
4529
  tasks: Task[];
4667
- /** Configuration */
4668
- config?: CalendarConfig;
4669
- /** Callbacks */
4670
- callbacks?: CalendarCallbacks;
4671
- /** Initial date to display */
4672
- initialDate?: Date;
4673
- /** Loading state */
4674
- isLoading?: boolean;
4675
- /** Error state */
4676
- error?: Error | string;
4677
- /** Custom CSS class */
4678
- className?: string;
4679
- /** Inline styles */
4680
- style?: React.CSSProperties;
4681
- /** Available tags in workspace for selection */
4682
- availableTags?: TaskTag[];
4683
- /** Callback to create a new tag */
4684
- onCreateTag?: (name: string, color: string) => Promise<TaskTag | null>;
4685
- /** v0.17.241: Attachments map by task ID */
4686
- attachmentsByTask?: Map<string, Attachment[]>;
4687
- /** v0.17.254: Comments for TaskDetailModal */
4688
- comments?: Array<{
4689
- id: string;
4690
- taskId: string;
4691
- userId: string;
4692
- content: string;
4693
- createdAt: Date;
4694
- updatedAt?: Date;
4695
- user?: {
4696
- id: string;
4697
- name: string;
4698
- email: string;
4699
- avatarUrl?: string;
4700
- };
4701
- }>;
4702
- /** v0.17.254: Callback to add a comment (with optional attachments) */
4703
- onAddComment?: (taskId: string, content: string, mentionedUserIds?: string[], attachments?: Array<{
4704
- id: string;
4705
- name: string;
4706
- url: string;
4707
- type: string;
4708
- size: number;
4709
- }>) => Promise<void>;
4710
- /** v0.17.425: Upload comment attachments callback */
4711
- onUploadCommentAttachments?: (files: File[]) => Promise<Array<{
4712
- id: string;
4713
- name: string;
4714
- url: string;
4715
- type: string;
4716
- size: number;
4717
- }>>;
4718
- /** v0.17.254: Current user info for comment input */
4719
- currentUser?: {
4530
+ projectName: string;
4531
+ projectId: string;
4532
+ projectColor?: string;
4533
+ workspaceId?: string;
4534
+ locale: 'es' | 'en';
4535
+ /** 'light' aplica la paleta clara; cualquier otro = oscuro. */
4536
+ themeMode?: 'dark' | 'light';
4537
+ hourlyRate: number;
4538
+ /** money compartido con Gantt/Lista (lens global). */
4539
+ money: MoneyMode;
4540
+ onMoneyChange: (m: MoneyMode) => void;
4541
+ /** abrir el drawer global de tarea. */
4542
+ onTaskOpen?: (taskId: string) => void;
4543
+ /** contenido extra a la derecha de la topbar (historial, etc.). */
4544
+ rightContent?: React.ReactNode;
4545
+ /** S3 (C5): ¿el usuario puede reprogramar? Si no, el calendario es solo lectura. */
4546
+ canReschedule?: boolean;
4547
+ /** S3 (C5): commit del movimiento (la tarea + sus sucesoras). Devuelve éxito. */
4548
+ onReschedule?: (changes: Array<{
4720
4549
  id: string;
4721
- name: string;
4722
- avatarUrl?: string;
4723
- color?: string;
4550
+ startDate: Date;
4551
+ endDate: Date;
4552
+ }>) => Promise<boolean>;
4553
+ /** miembros con su carga diaria (de useTeamCapacity en el SaaS). */
4554
+ members?: TeamMember[];
4555
+ /** festivos del workspace como 'YYYY-MM-DD' (de useHolidays en el SaaS). */
4556
+ holidayDates?: string[];
4557
+ /** jornada del workspace (de timesheetSettings) — capacidad diaria por persona. */
4558
+ timesheetSettings?: {
4559
+ hoursPerDay?: Record<string, number>;
4724
4560
  };
4725
- /** v0.17.254: Callback when task is opened in modal (to load comments) */
4726
- /** v0.17.401: Users available for @mentions in comments */
4727
- mentionableUsers?: Array<{
4728
- id: string;
4729
- name: string;
4730
- email?: string;
4731
- avatar?: string;
4732
- color?: string;
4733
- }>;
4734
- onTaskOpen?: (taskId: string) => void;
4735
- /** Enable time tracking features in TaskDetailModal */
4736
- enableTimeTracking?: boolean;
4737
- /** Time tracking summary for the currently open task */
4738
- timeTrackingSummary?: TimeTrackingSummary;
4739
- /** Time entries for the currently open task */
4740
- timeEntries?: TimeEntry[];
4741
- /** Current timer state */
4742
- timerState?: TimerState;
4743
- /** Callback to log time manually */
4744
- onLogTime?: (taskId: string, input: TimeLogInput) => Promise<void>;
4745
- /** Callback to update task estimate */
4746
- onUpdateEstimate?: (taskId: string, minutes: number | null) => Promise<void>;
4747
- /** Callback to update sold effort (quoted time) */
4748
- onUpdateSoldEffort?: (taskId: string, minutes: number | null) => Promise<void>;
4749
- /** Callback to start timer */
4750
- onStartTimer?: (taskId: string) => void;
4751
- /** Callback to stop timer and save time */
4752
- onStopTimer?: (taskId: string) => void;
4753
- /** Callback to discard timer without saving */
4754
- onDiscardTimer?: (taskId: string) => void;
4755
- /** Blur financial data (tiempo ofertado) for unauthorized users */
4756
- blurFinancials?: boolean;
4757
- /** v2.1.0: Suppress internal TaskDetailModal (consumer provides own drawer) */
4758
- suppressDetailModal?: boolean;
4759
- /** Display mode: 'hours' shows Xh, 'financial' shows $X (hours × hourlyRate) */
4760
- lens?: 'hours' | 'financial';
4761
- /** Rate used to convert hours → dollars when lens='financial' */
4762
- hourlyRate?: number;
4561
+ /** se llama cuando cambia el rango visible (mes) para que el consumidor
4562
+ * recargue la capacidad de ese rango. */
4563
+ onVisibleRangeChange?: (range: {
4564
+ start: string;
4565
+ end: string;
4566
+ }) => void;
4763
4567
  }
4568
+ declare function CalendarView({ tasks, projectName, projectId, projectColor, locale, themeMode, hourlyRate, money, onMoneyChange, onTaskOpen, canReschedule, onReschedule, members, holidayDates, timesheetSettings, onVisibleRangeChange, }: Props): react_jsx_runtime.JSX.Element;
4764
4569
 
4765
4570
  /**
4766
- * Main CalendarBoard Component Chronos V2.0
4571
+ * Simulación de reprogramación con CPM (Calendario, Sprint 3, regla C5).
4572
+ *
4573
+ * Dado un movimiento de fechas de UNA tarea, calcula —sobre una copia en
4574
+ * memoria, SIN persistir— la consecuencia: qué sucesoras se desplazan, cuánto
4575
+ * cambia el fin de proyecto, y si la tarea es/sigue en ruta crítica.
4576
+ *
4577
+ * Reutiliza el modelo de dependencias del Gantt (task.dependencies). NO duplica
4578
+ * el commit: confirmar usa el endpoint real (updateTask) — esto es solo el
4579
+ * "forward pass" en simulación para mostrar el popover de impacto.
4767
4580
  */
4768
- declare function CalendarBoard({ tasks, config, callbacks, initialDate, isLoading, error, className, style, availableTags, onCreateTag, attachmentsByTask, comments, onAddComment, currentUser, mentionableUsers, onUploadCommentAttachments, onTaskOpen, enableTimeTracking, timeTrackingSummary, timeEntries, timerState, onLogTime, onUpdateEstimate, onUpdateSoldEffort, onStartTimer, onStopTimer, onDiscardTimer, blurFinancials, suppressDetailModal, lens: calLens, hourlyRate: calRate, }: CalendarBoardProps): react_jsx_runtime.JSX.Element;
4769
4581
 
4582
+ interface RescheduleSimulation {
4583
+ taskId: string;
4584
+ oldStart: Date;
4585
+ oldEnd: Date;
4586
+ newStart: Date;
4587
+ newEnd: Date;
4588
+ /** sucesoras que se mueven por respetar dependencias (id + nombre + nuevas fechas). */
4589
+ movedSuccessors: Array<{
4590
+ id: string;
4591
+ name: string;
4592
+ newStart: Date;
4593
+ newEnd: Date;
4594
+ }>;
4595
+ /** delta del fin de proyecto en días (>0 lo retrasa, 0 = absorbido por holgura). */
4596
+ projectEndDeltaDays: number;
4597
+ oldProjectEnd: Date;
4598
+ newProjectEnd: Date;
4599
+ /** ¿la tarea movida estaba en ruta crítica antes del movimiento? */
4600
+ wasCritical: boolean;
4601
+ /** ¿sigue en ruta crítica tras el movimiento? */
4602
+ stillCritical: boolean;
4603
+ /** holgura (días) de la tarea antes del movimiento (informativo). */
4604
+ slackDays: number;
4605
+ }
4770
4606
  /**
4771
- * CalendarBoard Themes Chronos V2.0
4772
- * @version 2.0.0
4607
+ * Simula mover una tarea a [newStart, newEnd]. Devuelve el impacto SIN persistir.
4773
4608
  */
4609
+ declare function simulateReschedule(tasks: Task[], taskId: string, newStart: Date, newEnd: Date): RescheduleSimulation | null;
4774
4610
 
4775
- /**
4776
- * Dark theme Chronos V2.0 Design Language
4777
- * Ultra-dark (#050505) with #222 grid borders, glass elements, and neon accents
4778
- */
4779
- declare const darkTheme$2: CalendarTheme;
4780
- /**
4781
- * Light theme for CalendarBoard
4782
- */
4783
- declare const lightTheme$2: CalendarTheme;
4784
- /**
4785
- * Neutral theme for CalendarBoard
4786
- */
4787
- declare const neutralTheme$2: CalendarTheme;
4788
- /**
4789
- * All available themes
4790
- */
4791
- declare const calendarThemes: {
4792
- readonly dark: CalendarTheme;
4793
- readonly light: CalendarTheme;
4794
- readonly neutral: CalendarTheme;
4795
- };
4796
- type CalendarThemeName = keyof typeof calendarThemes;
4797
- /**
4798
- * Get theme by name
4799
- */
4800
- declare function getCalendarTheme(themeName: CalendarThemeName): CalendarTheme;
4611
+ type CalView = 'mes' | 'semana' | 'lookahead' | 'agenda';
4612
+ type CalMoney = 'hrs' | '$';
4613
+ type CalLayerId = 'tareas' | 'cpm' | 'hitos' | 'ext' | 'festivos' | 'aus';
4801
4614
 
4802
4615
  /**
4803
- * Internationalization (i18n) for CalendarBoard
4804
- * @version 0.17.0
4616
+ * Mapeo de datos reales del Gantt → estructuras del Calendario (Sprint 1).
4617
+ *
4618
+ * Toma las tareas reales (LibXAITask) que ya carga ProjectCalendar y las
4619
+ * proyecta sobre la grilla del mes visible como barras (CalTask). NO inventa
4620
+ * datos: hitos/desembolsos/externos/ausencias solo aparecen si hay fuente real
4621
+ * (en S1 derivamos "vencimientos" de tareas que terminan en el mes; el resto
4622
+ * llega cuando existan sus entidades — S2/S3).
4805
4623
  */
4806
4624
 
4807
- type CalendarSupportedLocale = 'en' | 'es';
4808
- /**
4809
- * English translations
4810
- */
4811
- declare const en: CalendarTranslations;
4812
- /**
4813
- * Spanish translations
4814
- */
4815
- declare const es: CalendarTranslations;
4816
- /**
4817
- * All available translations
4818
- */
4819
- declare const calendarTranslations: Record<CalendarSupportedLocale, CalendarTranslations>;
4820
- /**
4821
- * Get translations for a specific locale
4822
- */
4823
- declare function getCalendarTranslations(locale: CalendarSupportedLocale | string): CalendarTranslations;
4824
- /**
4825
- * Merge custom translations with default translations
4826
- */
4827
- declare function mergeCalendarTranslations(locale: CalendarSupportedLocale | string, customTranslations?: Partial<CalendarTranslations>): CalendarTranslations;
4828
- /**
4829
- * Get month names array based on locale
4830
- */
4831
- declare function getMonthNames(locale: CalendarSupportedLocale | string): string[];
4625
+ interface BuildOpts {
4626
+ tasks: Task[];
4627
+ grid: MonthGrid;
4628
+ /** projectId → color (CSS). En vista de un proyecto, un solo color. */
4629
+ projectColor: (projectId: string) => string;
4630
+ /** tarifa media para estimar costo cuando no hay costo explícito. */
4631
+ hourlyRate: number;
4632
+ /** id de proyecto de las tareas (el calendario es por proyecto en S1). */
4633
+ projectId: string;
4634
+ }
4635
+ interface BuiltCalendar {
4636
+ calTasks: CalTask[];
4637
+ dayItems: DayItem[];
4638
+ /** ¿el mes visible tiene algo que mostrar? (para estado vacío C13) */
4639
+ isEmpty: boolean;
4640
+ }
4832
4641
  /**
4833
- * Get weekday names array based on locale and first day of week
4642
+ * Construye las barras (y items derivados) para el mes visible de la grilla.
4643
+ * Recorta tareas a la ventana de la grilla; las que no intersectan se omiten.
4834
4644
  */
4835
- declare function getWeekdayNames(locale: CalendarSupportedLocale | string, firstDayOfWeek?: number, short?: boolean): string[];
4645
+ declare function buildCalendar(opts: BuildOpts): BuiltCalendar;
4836
4646
 
4837
4647
  interface CardStackProps {
4838
4648
  /** Stack configuration */
@@ -6948,4 +6758,4 @@ declare const themes: Record<ThemeName, Theme>;
6948
6758
  */
6949
6759
  declare const defaultTheme: ThemeName;
6950
6760
 
6951
- export { type AICallbacks, type AICommandResult, type GanttTask as AIGanttTask, type AIMessage, type AIModelKey, type AIOperation, AIUsageDashboard, type AIUsageDashboardProps, AI_FEATURES, AI_MODELS, type Activity, type ActivityType, AddCardButton, type AddCardButtonProps, type AddCardData, AddColumnButton, type AddColumnButtonProps, type AssigneeSuggestion, type Attachment, AttachmentUploader, type AttachmentUploaderProps, type AvailableUser, type Board, type BoardCallbacks, type BoardConfig, BoardProvider, type BoardProviderProps, type BorderRadiusToken, BulkOperationsToolbar, type BulkOperationsToolbarProps, BurnDownChart, type BurnDownChartProps, type BurnDownDataPoint, CUSTOM_FIELD_TYPES, CalendarBoard, type CalendarBoardProps, type CalendarCallbacks, type CalendarConfig, type CalendarDay, type CalendarEvent, type CalendarPermissions, type CalendarSupportedLocale, type CalendarTheme, type CalendarThemeName, type CalendarTranslations, type CalendarViewMode, Card, CardDetailModal, type CardDetailModalProps, CardDetailModalV2, type CardDetailModalV2Props, type CardFilter, type CardFilters, CardHistoryReplay, type CardHistoryReplayProps, CardHistoryTimeline, type CardHistoryTimelineProps, type CardProps, CardRelationshipsGraph, type CardRelationshipsGraphProps, type CardSort, type CardSortKey, CardStack, type CardStackProps, type CardStack$1 as CardStackType, type CardStatus, type CardTemplate, CardTemplateSelector, type CardTemplateSelectorProps, type CardTimeProps, type Card$1 as CardType, CircuitBreaker, Column, ColumnManager, type ColumnProps, type Column$1 as ColumnType, CommandPalette, type CommandPaletteProps, type Comment, type CommentAttachment, ConfigMenu, type ConfigMenuProps, ContextMenu, type ContextMenuAction, type ContextMenuState, type CustomFieldDefinition, type CustomFieldValue, DEFAULT_SHORTCUTS, DEFAULT_TABLE_COLUMNS, DEFAULT_TEMPLATES, type DateFilter, DateRangePicker, type DateRangePickerProps, DependenciesSelector, type DependenciesSelectorProps, DependencyLine, type DesignTokens, DistributionCharts, type DistributionChartsProps, type DistributionDataPoint, type DragData, type DropData, type DurationToken, type EasingToken, EditableColumnTitle, type EditableColumnTitleProps, ErrorBoundary, type ErrorBoundaryProps, ExportDropdown, type ExportFormat, ExportImportModal, type ExportImportModalProps, type ExportOptions, FilterBar, type FilterBarProps, type FilterState, type FlattenedTask, type FontSizeToken, type FontWeightToken, GANTT_AI_SYSTEM_PROMPT, GanttAIAssistant, type GanttAIAssistantConfig, type Assignee as GanttAssignee, GanttBoard, type GanttConfig as GanttBoardConfig, type GanttBoardRef, type GanttColumn, type ColumnType$1 as GanttColumnType, type GanttConfig, GanttI18nContext, Milestone as GanttMilestone, type GanttPermissions, type Task as GanttTask, type GanttTemplates, type Theme$1 as GanttTheme, type GanttTheme as GanttThemeConfig, GanttToolbar, type GanttTranslations, GenerateGanttTasksDialog, type GenerateGanttTasksDialogProps, GeneratePlanModal, type GeneratePlanModalProps, type GeneratedPlan, type GeneratedTasksResponse, type GroupByOption, GroupBySelector, type GroupBySelectorProps, HealthBar, type HealthBarProps, type IPluginManager, type ImportResult, type Insight, type InsightSeverity, type InsightType, KanbanBoard, type KanbanBoardProps, KanbanToolbar, type KanbanToolbarProps, KanbanViewAdapter, type KanbanViewConfig, type KeyboardAction, type KeyboardShortcut, KeyboardShortcutsHelp, type KeyboardShortcutsHelpProps, type LineHeightToken, type ListColumn, type ColumnType as ListColumnType, type ListFilter, type ListSort, type ListSortColumn, ListView, type ListViewCallbacks, type ListViewConfig, type ListViewPermissions, type ListViewProps, type ListViewSupportedLocale, type ListViewTheme, type ListViewThemeName, type ListViewTranslations, MenuIcons, type OpacityToken, type PendingFile, type PersistHistoryConfig, type Plugin, type PluginContext, type PluginHooks, PluginManager, type Priority, PrioritySelector, type PrioritySelectorProps, ProfitabilityReport, type ProfitabilityReportProps, type ProjectForecast, type ProjectHealthData, QuickTaskCreate, type QuickTaskCreateData, type QuickTaskCreateProps, RATE_LIMITS, type RenderProps, type RetryOptions, type RetryResult, STANDARD_FIELDS, type ShadowToken, type SortBy, type SortDirection, type SortOrder, type SortState, type SpacingToken, type StackSuggestion, type StackingConfig, type StackingStrategy, type Subtask, type SupportedLocale, type Swimlane, SwimlaneBoardView, type SwimlaneBoardViewProps, type SwimlaneConfig, type TableColumn, TagBadge, TagList, TagPicker, TaskBar, type TaskComment, TaskDetailModal, type TaskDetailModalProps, type TaskFilterType, type TaskFormData, TaskFormModal, type TaskFormModalProps, TaskGrid, type TaskPriority, type TaskTag, type Theme, type ThemeColors, type ThemeContextValue, ThemeModal, type ThemeModalProps, type ThemeName, ThemeProvider, ThemeSwitcher, type TimeEntry, TimeInputPopover, type TimeInputPopoverProps, type TimeLogInput, type TimeLogSource, TimePill, type TimePillProps, TimePopover, type TimePopoverProps, type TimeScale, type TimeTrackingBoardProps, type TimeTrackingCallbacks, type TimeTrackingSummary, Timeline, type TimerState, type ThemeColors$1 as TokenThemeColors, type TokenValue, type UsageStats, type UseAIOptions, type UseAIReturn, type UseBoardReturn as UseBoardCoreReturn, type UseBoardOptions, type UseBoardReturn$1 as UseBoardReturn, type UseCardStackingOptions, type UseCardStackingResult, type UseDragStateReturn, type UseFiltersOptions, type UseFiltersReturn, type UseKanbanStateOptions, type UseKanbanStateReturn, type UseKeyboardShortcutsOptions, type UseKeyboardShortcutsReturn, type UseMultiSelectReturn, type UseSelectionStateReturn, type User$1 as User, UserAssignmentSelector, type UserAssignmentSelectorProps, VelocityChart, type VelocityChartProps, type VelocityDataPoint, VirtualGrid, type VirtualGridProps, VirtualList, type VirtualListProps, type WeekDay, type ZIndexToken, aiUsageTracker, borderRadius, calculatePosition, darkTheme$2 as calendarDarkTheme, en as calendarEnTranslations, es as calendarEsTranslations, lightTheme$2 as calendarLightTheme, neutralTheme$2 as calendarNeutralTheme, calendarThemes, calendarTranslations, cardToGanttTask, cardsToGanttTasks, cn, createKanbanView, createRetryWrapper, darkTheme, darkTheme$1 as darkTokenTheme, defaultTheme, designTokens, duration, easing, exportTokensToCSS, findTaskByName, fontSize, fontWeight, formatCost, en$2 as ganttEnTranslations, es$2 as ganttEsTranslations, ganttTaskToCardUpdate, themes$1 as ganttThemes, gantt as ganttTokens, translations as ganttTranslations, ganttUtils, generateCSSVariables, generateCompleteCSS, generateInitialPositions, generateTasksContext, generateThemeVariables, getCalendarTheme, getCalendarTranslations, getListViewTheme, getListViewTranslations, getMonthNames, getToken, getTranslations, getWeekdayNames, kanban as kanbanTokens, lightTheme, lightTheme$1 as lightTokenTheme, lineHeight, darkTheme$3 as listViewDarkTheme, en$1 as listViewEnTranslations, es$1 as listViewEsTranslations, lightTheme$3 as listViewLightTheme, neutralTheme$3 as listViewNeutralTheme, listViewThemes, listViewTranslations, mergeCalendarTranslations, mergeListViewTranslations, mergeTranslations, neutralTheme, neutralTheme$1 as neutralTokenTheme, opacity, parseLocalCommand, parseNaturalDate, parseNaturalDuration, parseProgress, parseStatus, pluginManager, retrySyncOperation, retryWithBackoff, shadows, shouldVirtualizeGrid, spacing, themes, useAI, useBoard$1 as useBoard, useBoard as useBoardCore, useBoardStore, useCardStacking, useDragState, useFilteredCards, useFilters, useGanttI18n, useKanbanState, useKeyboardShortcuts, useMultiSelect, useSelectionState, useSortedCards, useTheme, useVirtualGrid, useVirtualList, validateAIResponse, withErrorBoundary, wouldCreateCircularDependency, zIndex };
6761
+ export { type AICallbacks, type AICommandResult, type GanttTask as AIGanttTask, type AIMessage, type AIModelKey, type AIOperation, AIUsageDashboard, type AIUsageDashboardProps, AI_FEATURES, AI_MODELS, type Activity, type ActivityType, AddCardButton, type AddCardButtonProps, type AddCardData, AddColumnButton, type AddColumnButtonProps, type AssigneeSuggestion, type Attachment, AttachmentUploader, type AttachmentUploaderProps, type AvailableUser, type Board, type BoardCallbacks, type BoardConfig, BoardProvider, type BoardProviderProps, type BorderRadiusToken, BulkOperationsToolbar, type BulkOperationsToolbarProps, BurnDownChart, type BurnDownChartProps, type BurnDownDataPoint, CUSTOM_FIELD_TYPES, type CalLayerId, type CalMoney, type CalView, CalendarView as CalendarBoard, type DailyLog as CalendarDailyLog, type TeamMember as CalendarTeamMember, Card, CardDetailModal, type CardDetailModalProps, CardDetailModalV2, type CardDetailModalV2Props, type CardFilter, type CardFilters, CardHistoryReplay, type CardHistoryReplayProps, CardHistoryTimeline, type CardHistoryTimelineProps, type CardProps, CardRelationshipsGraph, type CardRelationshipsGraphProps, type CardSort, type CardSortKey, CardStack, type CardStackProps, type CardStack$1 as CardStackType, type CardStatus, type CardTemplate, CardTemplateSelector, type CardTemplateSelectorProps, type CardTimeProps, type Card$1 as CardType, CircuitBreaker, Column, ColumnManager, type ColumnProps, type Column$1 as ColumnType, CommandPalette, type CommandPaletteProps, type Comment, type CommentAttachment, ConfigMenu, type ConfigMenuProps, ContextMenu, type ContextMenuAction, type ContextMenuState, type CustomFieldDefinition, type CustomFieldValue, DEFAULT_SHORTCUTS, DEFAULT_TABLE_COLUMNS, DEFAULT_TEMPLATES, type DateFilter, DateRangePicker, type DateRangePickerProps, DependenciesSelector, type DependenciesSelectorProps, DependencyLine, type DesignTokens, DistributionCharts, type DistributionChartsProps, type DistributionDataPoint, type DragData, type DropData, type DurationToken, type EasingToken, EditableColumnTitle, type EditableColumnTitleProps, ErrorBoundary, type ErrorBoundaryProps, ExportDropdown, type ExportFormat, ExportImportModal, type ExportImportModalProps, type ExportOptions, FilterBar, type FilterBarProps, type FilterState, type FlattenedTask, type FontSizeToken, type FontWeightToken, GANTT_AI_SYSTEM_PROMPT, GanttAIAssistant, type GanttAIAssistantConfig, type Assignee as GanttAssignee, GanttBoard, type GanttConfig as GanttBoardConfig, type GanttBoardRef, type GanttColumn, type ColumnType$1 as GanttColumnType, type GanttConfig, GanttI18nContext, Milestone as GanttMilestone, type GanttPermissions, type Task as GanttTask, type GanttTemplates, type Theme$1 as GanttTheme, type GanttTheme as GanttThemeConfig, GanttToolbar, type GanttTranslations, GenerateGanttTasksDialog, type GenerateGanttTasksDialogProps, GeneratePlanModal, type GeneratePlanModalProps, type GeneratedPlan, type GeneratedTasksResponse, type GroupByOption, GroupBySelector, type GroupBySelectorProps, HealthBar, type HealthBarProps, type IPluginManager, type ImportResult, type Insight, type InsightSeverity, type InsightType, KanbanBoard, type KanbanBoardProps, KanbanToolbar, type KanbanToolbarProps, KanbanViewAdapter, type KanbanViewConfig, type KeyboardAction, type KeyboardShortcut, KeyboardShortcutsHelp, type KeyboardShortcutsHelpProps, type LineHeightToken, type ListColumn, type ColumnType as ListColumnType, type ListFilter, type ListSort, type ListSortColumn, ListView, type ListViewCallbacks, type ListViewConfig, type ListViewPermissions, type ListViewProps, type ListViewSupportedLocale, type ListViewTheme, type ListViewThemeName, type ListViewTranslations, MenuIcons, type MoneyMode, type OpacityToken, type PendingFile, type PersistHistoryConfig, type Plugin, type PluginContext, type PluginHooks, PluginManager, type Priority, PrioritySelector, type PrioritySelectorProps, ProfitabilityReport, type ProfitabilityReportProps, type ProjectForecast, type ProjectHealthData, QuickTaskCreate, type QuickTaskCreateData, type QuickTaskCreateProps, RATE_LIMITS, type RenderProps, type RescheduleSimulation, type RetryOptions, type RetryResult, STANDARD_FIELDS, type ShadowToken, type SortBy, type SortDirection, type SortOrder, type SortState, type SpacingToken, type StackSuggestion, type StackingConfig, type StackingStrategy, type Subtask, type SupportedLocale, type Swimlane, SwimlaneBoardView, type SwimlaneBoardViewProps, type SwimlaneConfig, type TableColumn, TagBadge, TagList, TagPicker, TaskBar, type TaskComment, TaskDetailModal, type TaskDetailModalProps, type TaskFilterType, type TaskFormData, TaskFormModal, type TaskFormModalProps, TaskGrid, type TaskPriority, type TaskTag, type Theme, type ThemeColors, type ThemeContextValue, ThemeModal, type ThemeModalProps, type ThemeName, ThemeProvider, ThemeSwitcher, type TimeEntry, TimeInputPopover, type TimeInputPopoverProps, type TimeLogInput, type TimeLogSource, TimePill, type TimePillProps, TimePopover, type TimePopoverProps, type TimeScale, type TimeTrackingBoardProps, type TimeTrackingCallbacks, type TimeTrackingSummary, Timeline, type TimerState, type ThemeColors$1 as TokenThemeColors, type TokenValue, type UsageStats, type UseAIOptions, type UseAIReturn, type UseBoardReturn as UseBoardCoreReturn, type UseBoardOptions, type UseBoardReturn$1 as UseBoardReturn, type UseCardStackingOptions, type UseCardStackingResult, type UseDragStateReturn, type UseFiltersOptions, type UseFiltersReturn, type UseKanbanStateOptions, type UseKanbanStateReturn, type UseKeyboardShortcutsOptions, type UseKeyboardShortcutsReturn, type UseMultiSelectReturn, type UseSelectionStateReturn, type User$1 as User, UserAssignmentSelector, type UserAssignmentSelectorProps, VelocityChart, type VelocityChartProps, type VelocityDataPoint, VirtualGrid, type VirtualGridProps, VirtualList, type VirtualListProps, type ZIndexToken, aiUsageTracker, borderRadius, buildCalendar, calculatePosition, cardToGanttTask, cardsToGanttTasks, cn, createKanbanView, createRetryWrapper, darkTheme, darkTheme$1 as darkTokenTheme, defaultTheme, designTokens, duration, easing, exportTokensToCSS, findTaskByName, fontSize, fontWeight, formatCost, en$1 as ganttEnTranslations, es$1 as ganttEsTranslations, ganttTaskToCardUpdate, themes$1 as ganttThemes, gantt as ganttTokens, translations as ganttTranslations, ganttUtils, generateCSSVariables, generateCompleteCSS, generateInitialPositions, generateTasksContext, generateThemeVariables, getListViewTheme, getListViewTranslations, getToken, getTranslations, kanban as kanbanTokens, lightTheme, lightTheme$1 as lightTokenTheme, lineHeight, darkTheme$2 as listViewDarkTheme, en as listViewEnTranslations, es as listViewEsTranslations, lightTheme$2 as listViewLightTheme, neutralTheme$2 as listViewNeutralTheme, listViewThemes, listViewTranslations, mergeListViewTranslations, mergeTranslations, neutralTheme, neutralTheme$1 as neutralTokenTheme, opacity, parseLocalCommand, parseNaturalDate, parseNaturalDuration, parseProgress, parseStatus, pluginManager, retrySyncOperation, retryWithBackoff, shadows, shouldVirtualizeGrid, simulateReschedule, spacing, themes, useAI, useBoard$1 as useBoard, useBoard as useBoardCore, useBoardStore, useCardStacking, useDragState, useFilteredCards, useFilters, useGanttI18n, useKanbanState, useKeyboardShortcuts, useMultiSelect, useSelectionState, useSortedCards, useTheme, useVirtualGrid, useVirtualList, validateAIResponse, withErrorBoundary, wouldCreateCircularDependency, zIndex };