@libxai/board 1.9.10 → 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
@@ -3801,11 +3801,11 @@ interface GanttTranslations {
3801
3801
  /**
3802
3802
  * English translations (default)
3803
3803
  */
3804
- declare const en$2: GanttTranslations;
3804
+ declare const en$1: GanttTranslations;
3805
3805
  /**
3806
3806
  * Spanish translations
3807
3807
  */
3808
- declare const es$2: GanttTranslations;
3808
+ declare const es$1: GanttTranslations;
3809
3809
  /**
3810
3810
  * All available translations
3811
3811
  */
@@ -4397,15 +4397,15 @@ declare function ListView({ tasks, config, callbacks, isLoading, error, classNam
4397
4397
  /**
4398
4398
  * Dark theme for ListView — Chronos V2.0
4399
4399
  */
4400
- declare const darkTheme$3: ListViewTheme;
4400
+ declare const darkTheme$2: ListViewTheme;
4401
4401
  /**
4402
4402
  * Light theme for ListView
4403
4403
  */
4404
- declare const lightTheme$3: ListViewTheme;
4404
+ declare const lightTheme$2: ListViewTheme;
4405
4405
  /**
4406
4406
  * Neutral theme for ListView
4407
4407
  */
4408
- declare const neutralTheme$3: ListViewTheme;
4408
+ declare const neutralTheme$2: ListViewTheme;
4409
4409
  /**
4410
4410
  * All available themes
4411
4411
  */
@@ -4429,11 +4429,11 @@ type ListViewSupportedLocale = 'en' | 'es';
4429
4429
  /**
4430
4430
  * English translations
4431
4431
  */
4432
- declare const en$1: ListViewTranslations;
4432
+ declare const en: ListViewTranslations;
4433
4433
  /**
4434
4434
  * Spanish translations
4435
4435
  */
4436
- declare const es$1: ListViewTranslations;
4436
+ declare const es: ListViewTranslations;
4437
4437
  /**
4438
4438
  * All available translations
4439
4439
  */
@@ -4448,396 +4448,201 @@ declare function getListViewTranslations(locale: ListViewSupportedLocale | strin
4448
4448
  declare function mergeListViewTranslations(locale: ListViewSupportedLocale | string, customTranslations?: Partial<ListViewTranslations>): ListViewTranslations;
4449
4449
 
4450
4450
  /**
4451
- * CalendarBoard Component Types
4452
- * @version 0.17.241
4453
- */
4454
-
4455
- /**
4456
- * Calendar view modes
4457
- */
4458
- type CalendarViewMode = 'month' | 'week' | 'day';
4459
- /**
4460
- * Day of the week (0 = Sunday, 6 = Saturday)
4461
- */
4462
- type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6;
4463
- /**
4464
- * 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.
4465
4461
  */
4466
- interface CalendarEvent {
4462
+ type DayItemType = 'hito' | 'desembolso' | 'deadline' | 'ext' | 'aus';
4463
+ interface CalTask {
4464
+ uid: string;
4467
4465
  id: string;
4468
- title: string;
4469
- start: Date;
4470
- end: Date;
4471
- color?: string;
4472
- status?: 'todo' | 'in-progress' | 'completed';
4473
- progress?: number;
4474
- assignees?: Task['assignees'];
4475
- task: Task;
4476
- }
4477
- /**
4478
- * Calendar day info
4479
- */
4480
- interface CalendarDay {
4481
- date: Date;
4482
- isCurrentMonth: boolean;
4483
- isToday: boolean;
4484
- isWeekend: boolean;
4485
- events: CalendarEvent[];
4486
- }
4487
- /**
4488
- * Theme configuration for calendar
4489
- */
4490
- interface CalendarTheme {
4491
- bgPrimary: string;
4492
- bgSecondary: string;
4493
- bgHover: string;
4494
- bgToday: string;
4495
- bgWeekend: string;
4496
- bgOtherMonth: string;
4497
- border: string;
4498
- borderLight: string;
4499
- textPrimary: string;
4500
- textSecondary: string;
4501
- textMuted: string;
4502
- textToday: string;
4503
- accent: string;
4504
- accentHover: string;
4505
- accentLight: string;
4506
- statusTodo: string;
4507
- statusInProgress: string;
4508
- statusCompleted: string;
4509
- focusRing: string;
4510
- glass: string;
4511
- glassBorder: string;
4512
- glassHover: string;
4513
- neonRed: string;
4514
- glowBlue: string;
4515
- glowRed: string;
4516
- }
4517
- /**
4518
- * Permissions for calendar operations
4519
- */
4520
- interface CalendarPermissions {
4521
- canCreateTask?: boolean;
4522
- /** v1.4.10: When true, user can only create subtasks (not root-level tasks) */
4523
- canCreateSubtaskOnly?: boolean;
4524
- canUpdateTask?: boolean;
4525
- canDeleteTask?: boolean;
4526
- canDragDrop?: boolean;
4527
- 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;
4528
4485
  }
4529
- /**
4530
- * CalendarBoard configuration
4531
- */
4532
- interface CalendarConfig {
4533
- /** Theme: 'dark' | 'light' | 'neutral' */
4534
- theme?: 'dark' | 'light' | 'neutral';
4535
- /** Locale for i18n */
4536
- locale?: 'en' | 'es' | string;
4537
- /** Custom translations */
4538
- customTranslations?: Partial<CalendarTranslations>;
4539
- /** Default view mode */
4540
- defaultView?: CalendarViewMode;
4541
- /** First day of week (0 = Sunday, 1 = Monday, etc.) */
4542
- firstDayOfWeek?: WeekDay;
4543
- /** Show week numbers */
4544
- showWeekNumbers?: boolean;
4545
- /** Show mini calendar in sidebar */
4546
- showMiniCalendar?: boolean;
4547
- /** Max events to show per day before "+N more" */
4548
- maxEventsPerDay?: number;
4549
- /** Available users for filtering */
4550
- availableUsers?: User$1[];
4551
- /** Permissions */
4552
- permissions?: CalendarPermissions;
4553
- /** Enable drag and drop */
4554
- enableDragDrop?: boolean;
4555
- /** Show task details on hover */
4556
- showTooltip?: boolean;
4557
- /** Show right sidebar with unscheduled/backlog tasks (default: true) */
4558
- showBacklog?: boolean;
4559
- /** Render custom content on the right side of header (e.g. lens toggle) */
4560
- 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;
4561
4501
  }
4502
+
4562
4503
  /**
4563
- * 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`.
4564
4512
  */
4565
- interface CalendarTranslations {
4566
- navigation: {
4567
- today: string;
4568
- previous: string;
4569
- next: string;
4570
- month: string;
4571
- week: string;
4572
- day: string;
4573
- };
4574
- weekdays: {
4575
- sun: string;
4576
- mon: string;
4577
- tue: string;
4578
- wed: string;
4579
- thu: string;
4580
- fri: string;
4581
- sat: string;
4582
- };
4583
- weekdaysFull: {
4584
- sunday: string;
4585
- monday: string;
4586
- tuesday: string;
4587
- wednesday: string;
4588
- thursday: string;
4589
- friday: string;
4590
- saturday: string;
4591
- };
4592
- months: {
4593
- january: string;
4594
- february: string;
4595
- march: string;
4596
- april: string;
4597
- may: string;
4598
- june: string;
4599
- july: string;
4600
- august: string;
4601
- september: string;
4602
- october: string;
4603
- november: string;
4604
- december: string;
4605
- };
4606
- status: {
4607
- todo: string;
4608
- inProgress: string;
4609
- completed: string;
4610
- };
4611
- labels: {
4612
- allDay: string;
4613
- moreEvents: string;
4614
- noEvents: string;
4615
- newTask: string;
4616
- viewAll: string;
4617
- week: string;
4618
- backlogTitle: string;
4619
- systemStatus: string;
4620
- budgetUtil: string;
4621
- variance: string;
4622
- cost: string;
4623
- estimate: string;
4624
- sold: string;
4625
- cashOut: string;
4626
- typeToAdd: string;
4627
- critical: string;
4628
- blocker: string;
4629
- risk: string;
4630
- delay: string;
4631
- days: string;
4632
- };
4633
- tooltips: {
4634
- progress: string;
4635
- status: string;
4636
- assignees: string;
4637
- duration: string;
4638
- days: string;
4639
- };
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;
4640
4520
  }
4641
- /**
4642
- * Callback functions for CalendarBoard
4643
- */
4644
- interface CalendarCallbacks {
4645
- /** Event click handler */
4646
- onEventClick?: (event: CalendarEvent) => void;
4647
- /** Event double-click handler */
4648
- onEventDoubleClick?: (event: CalendarEvent) => void;
4649
- /** Date click handler (create new task) */
4650
- onDateClick?: (date: Date) => void;
4651
- /** Task update after drag/drop */
4652
- onTaskUpdate?: (task: Task) => void;
4653
- /** Task delete handler */
4654
- onTaskDelete?: (taskId: string) => void;
4655
- /** View change handler */
4656
- onViewChange?: (view: CalendarViewMode) => void;
4657
- /** Date range change handler */
4658
- onDateRangeChange?: (start: Date, end: Date) => void;
4659
- /** v0.17.99: Quick create task handler */
4660
- onTaskCreate?: (taskData: Partial<Task>) => void;
4661
- /** v0.17.241: Upload attachments handler */
4662
- onUploadAttachments?: (taskId: string, files: File[]) => Promise<void>;
4663
- /** v0.17.241: Delete attachment handler */
4664
- onDeleteAttachment?: (attachmentId: string) => Promise<void>;
4521
+ interface TeamMember {
4522
+ userId: string;
4523
+ name: string;
4524
+ weeklyCapacity?: number;
4525
+ dailyEstimated: DailyLog[];
4665
4526
  }
4666
- /**
4667
- * Main CalendarBoard props
4668
- */
4669
- interface CalendarBoardProps {
4670
- /** Tasks to display */
4527
+
4528
+ interface Props {
4671
4529
  tasks: Task[];
4672
- /** Configuration */
4673
- config?: CalendarConfig;
4674
- /** Callbacks */
4675
- callbacks?: CalendarCallbacks;
4676
- /** Initial date to display */
4677
- initialDate?: Date;
4678
- /** Loading state */
4679
- isLoading?: boolean;
4680
- /** Error state */
4681
- error?: Error | string;
4682
- /** Custom CSS class */
4683
- className?: string;
4684
- /** Inline styles */
4685
- style?: React.CSSProperties;
4686
- /** Available tags in workspace for selection */
4687
- availableTags?: TaskTag[];
4688
- /** Callback to create a new tag */
4689
- onCreateTag?: (name: string, color: string) => Promise<TaskTag | null>;
4690
- /** v0.17.241: Attachments map by task ID */
4691
- attachmentsByTask?: Map<string, Attachment[]>;
4692
- /** v0.17.254: Comments for TaskDetailModal */
4693
- comments?: Array<{
4694
- id: string;
4695
- taskId: string;
4696
- userId: string;
4697
- content: string;
4698
- createdAt: Date;
4699
- updatedAt?: Date;
4700
- user?: {
4701
- id: string;
4702
- name: string;
4703
- email: string;
4704
- avatarUrl?: string;
4705
- };
4706
- }>;
4707
- /** v0.17.254: Callback to add a comment (with optional attachments) */
4708
- onAddComment?: (taskId: string, content: string, mentionedUserIds?: string[], attachments?: Array<{
4709
- id: string;
4710
- name: string;
4711
- url: string;
4712
- type: string;
4713
- size: number;
4714
- }>) => Promise<void>;
4715
- /** v0.17.425: Upload comment attachments callback */
4716
- onUploadCommentAttachments?: (files: File[]) => Promise<Array<{
4717
- id: string;
4718
- name: string;
4719
- url: string;
4720
- type: string;
4721
- size: number;
4722
- }>>;
4723
- /** v0.17.254: Current user info for comment input */
4724
- 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<{
4725
4549
  id: string;
4726
- name: string;
4727
- avatarUrl?: string;
4728
- 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>;
4729
4560
  };
4730
- /** v0.17.254: Callback when task is opened in modal (to load comments) */
4731
- /** v0.17.401: Users available for @mentions in comments */
4732
- mentionableUsers?: Array<{
4733
- id: string;
4734
- name: string;
4735
- email?: string;
4736
- avatar?: string;
4737
- color?: string;
4738
- }>;
4739
- onTaskOpen?: (taskId: string) => void;
4740
- /** Enable time tracking features in TaskDetailModal */
4741
- enableTimeTracking?: boolean;
4742
- /** Time tracking summary for the currently open task */
4743
- timeTrackingSummary?: TimeTrackingSummary;
4744
- /** Time entries for the currently open task */
4745
- timeEntries?: TimeEntry[];
4746
- /** Current timer state */
4747
- timerState?: TimerState;
4748
- /** Callback to log time manually */
4749
- onLogTime?: (taskId: string, input: TimeLogInput) => Promise<void>;
4750
- /** Callback to update task estimate */
4751
- onUpdateEstimate?: (taskId: string, minutes: number | null) => Promise<void>;
4752
- /** Callback to update sold effort (quoted time) */
4753
- onUpdateSoldEffort?: (taskId: string, minutes: number | null) => Promise<void>;
4754
- /** Callback to start timer */
4755
- onStartTimer?: (taskId: string) => void;
4756
- /** Callback to stop timer and save time */
4757
- onStopTimer?: (taskId: string) => void;
4758
- /** Callback to discard timer without saving */
4759
- onDiscardTimer?: (taskId: string) => void;
4760
- /** Blur financial data (tiempo ofertado) for unauthorized users */
4761
- blurFinancials?: boolean;
4762
- /** v2.1.0: Suppress internal TaskDetailModal (consumer provides own drawer) */
4763
- suppressDetailModal?: boolean;
4764
- /** Display mode: 'hours' shows Xh, 'financial' shows $X (hours × hourlyRate) */
4765
- lens?: 'hours' | 'financial';
4766
- /** Rate used to convert hours → dollars when lens='financial' */
4767
- 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;
4768
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;
4769
4569
 
4770
4570
  /**
4771
- * 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.
4772
4580
  */
4773
- 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;
4774
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
+ }
4775
4606
  /**
4776
- * CalendarBoard Themes Chronos V2.0
4777
- * @version 2.0.0
4607
+ * Simula mover una tarea a [newStart, newEnd]. Devuelve el impacto SIN persistir.
4778
4608
  */
4609
+ declare function simulateReschedule(tasks: Task[], taskId: string, newStart: Date, newEnd: Date): RescheduleSimulation | null;
4779
4610
 
4780
- /**
4781
- * Dark theme Chronos V2.0 Design Language
4782
- * Ultra-dark (#050505) with #222 grid borders, glass elements, and neon accents
4783
- */
4784
- declare const darkTheme$2: CalendarTheme;
4785
- /**
4786
- * Light theme for CalendarBoard
4787
- */
4788
- declare const lightTheme$2: CalendarTheme;
4789
- /**
4790
- * Neutral theme for CalendarBoard
4791
- */
4792
- declare const neutralTheme$2: CalendarTheme;
4793
- /**
4794
- * All available themes
4795
- */
4796
- declare const calendarThemes: {
4797
- readonly dark: CalendarTheme;
4798
- readonly light: CalendarTheme;
4799
- readonly neutral: CalendarTheme;
4800
- };
4801
- type CalendarThemeName = keyof typeof calendarThemes;
4802
- /**
4803
- * Get theme by name
4804
- */
4805
- 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';
4806
4614
 
4807
4615
  /**
4808
- * Internationalization (i18n) for CalendarBoard
4809
- * @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).
4810
4623
  */
4811
4624
 
4812
- type CalendarSupportedLocale = 'en' | 'es';
4813
- /**
4814
- * English translations
4815
- */
4816
- declare const en: CalendarTranslations;
4817
- /**
4818
- * Spanish translations
4819
- */
4820
- declare const es: CalendarTranslations;
4821
- /**
4822
- * All available translations
4823
- */
4824
- declare const calendarTranslations: Record<CalendarSupportedLocale, CalendarTranslations>;
4825
- /**
4826
- * Get translations for a specific locale
4827
- */
4828
- declare function getCalendarTranslations(locale: CalendarSupportedLocale | string): CalendarTranslations;
4829
- /**
4830
- * Merge custom translations with default translations
4831
- */
4832
- declare function mergeCalendarTranslations(locale: CalendarSupportedLocale | string, customTranslations?: Partial<CalendarTranslations>): CalendarTranslations;
4833
- /**
4834
- * Get month names array based on locale
4835
- */
4836
- 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
+ }
4837
4641
  /**
4838
- * 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.
4839
4644
  */
4840
- declare function getWeekdayNames(locale: CalendarSupportedLocale | string, firstDayOfWeek?: number, short?: boolean): string[];
4645
+ declare function buildCalendar(opts: BuildOpts): BuiltCalendar;
4841
4646
 
4842
4647
  interface CardStackProps {
4843
4648
  /** Stack configuration */
@@ -6953,4 +6758,4 @@ declare const themes: Record<ThemeName, Theme>;
6953
6758
  */
6954
6759
  declare const defaultTheme: ThemeName;
6955
6760
 
6956
- 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 };