gantt-renderer 0.12.22 → 0.12.24

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 (51) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/index.d.mts +30 -30
  3. package/dist/index.mjs.map +1 -1
  4. package/dist/locales/all.d.mts +1 -2
  5. package/dist/locales/ar.d.mts +1 -2
  6. package/dist/locales/be.d.mts +1 -2
  7. package/dist/locales/bg.d.mts +1 -2
  8. package/dist/locales/ca.d.mts +1 -2
  9. package/dist/locales/cs.d.mts +1 -2
  10. package/dist/locales/cy.d.mts +1 -2
  11. package/dist/locales/da.d.mts +1 -2
  12. package/dist/locales/de.d.mts +1 -2
  13. package/dist/locales/el.d.mts +1 -2
  14. package/dist/locales/en.d.mts +1 -2
  15. package/dist/locales/es.d.mts +1 -2
  16. package/dist/locales/et.d.mts +1 -2
  17. package/dist/locales/eu.d.mts +1 -2
  18. package/dist/locales/fi.d.mts +1 -2
  19. package/dist/locales/fr.d.mts +1 -2
  20. package/dist/locales/ga.d.mts +1 -2
  21. package/dist/locales/hi.d.mts +1 -2
  22. package/dist/locales/hr.d.mts +1 -2
  23. package/dist/locales/hu.d.mts +1 -2
  24. package/dist/locales/id.d.mts +1 -2
  25. package/dist/locales/it.d.mts +1 -2
  26. package/dist/locales/ja.d.mts +1 -2
  27. package/dist/locales/ko.d.mts +1 -2
  28. package/dist/locales/load.d.mts +2 -3
  29. package/dist/locales/lt.d.mts +1 -2
  30. package/dist/locales/lv.d.mts +1 -2
  31. package/dist/locales/mk.d.mts +1 -2
  32. package/dist/locales/mt.d.mts +1 -2
  33. package/dist/locales/nb.d.mts +1 -2
  34. package/dist/locales/nl.d.mts +1 -2
  35. package/dist/locales/pl.d.mts +1 -2
  36. package/dist/locales/pt-BR.d.mts +1 -2
  37. package/dist/locales/pt-PT.d.mts +1 -2
  38. package/dist/locales/registry.d.mts +3 -4
  39. package/dist/locales/ro.d.mts +1 -2
  40. package/dist/locales/ru.d.mts +1 -2
  41. package/dist/locales/sk.d.mts +1 -2
  42. package/dist/locales/sl.d.mts +1 -2
  43. package/dist/locales/sq.d.mts +1 -2
  44. package/dist/locales/sr.d.mts +1 -2
  45. package/dist/locales/sv.d.mts +1 -2
  46. package/dist/locales/th.d.mts +1 -2
  47. package/dist/locales/tr.d.mts +1 -2
  48. package/dist/locales/uk.d.mts +1 -2
  49. package/dist/locales/zh-Hans.d.mts +1 -2
  50. package/dist/locales/zh-Hant.d.mts +1 -2
  51. package/package.json +16 -16
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.12.24](https://github.com/doberkofler/gantt-renderer/compare/v0.12.23...v0.12.24) (2026-09-11)
2
+
3
+ ## [0.12.23](https://github.com/doberkofler/gantt-renderer/compare/v0.12.22...v0.12.23) (2026-09-06)
4
+
1
5
  ## [0.12.22](https://github.com/doberkofler/gantt-renderer/compare/v0.12.21...v0.12.22) (2026-08-23)
2
6
 
3
7
  ## [0.12.21](https://github.com/doberkofler/gantt-renderer/compare/v0.12.20...v0.12.21) (2026-08-19)
package/dist/index.d.mts CHANGED
@@ -207,7 +207,7 @@ type ScaleConfig = {
207
207
  msPerColumn: number;
208
208
  headerFormat: TimeScale;
209
209
  };
210
- declare const SCALE_CONFIGS: Record<TimeScale, ScaleConfig>;
210
+ export declare const SCALE_CONFIGS: Record<TimeScale, ScaleConfig>;
211
211
  //#endregion
212
212
  //#region src/lib/domain/tree.d.ts
213
213
  /**
@@ -233,7 +233,7 @@ type TaskNode = Task<Record<string, unknown>> & {
233
233
  * when a parent cycle is detected, or when a `parent` points to a
234
234
  * milestone or leaf task.
235
235
  */
236
- declare function buildTaskTree(tasks: ZodTaskInferred[]): TaskNode[];
236
+ export declare function buildTaskTree(tasks: ZodTaskInferred[]): TaskNode[];
237
237
  /**
238
238
  * Flattens a tree into a visible row list.
239
239
  * A node's children are included only when its id is in `expandedIds`.
@@ -242,14 +242,14 @@ declare function buildTaskTree(tasks: ZodTaskInferred[]): TaskNode[];
242
242
  * @param expandedIds - Set of task IDs whose children should be rendered.
243
243
  * @returns A depth-first flattened array of visible {@link TaskNode} items.
244
244
  */
245
- declare function flattenTree(roots: TaskNode[], expandedIds: ReadonlySet<number>): TaskNode[];
245
+ export declare function flattenTree(roots: TaskNode[], expandedIds: ReadonlySet<number>): TaskNode[];
246
246
  /**
247
247
  * Returns `true` when a node has children in the tree.
248
248
  *
249
249
  * @param node - The {@link TaskNode} to inspect.
250
250
  * @returns `true` if `node.children.length > 0`.
251
251
  */
252
- declare function isParent(node: TaskNode): boolean;
252
+ export declare function isParent(node: TaskNode): boolean;
253
253
  //#endregion
254
254
  //#region src/lib/timeline/pixelMapper.d.ts
255
255
  type PixelMapper = {
@@ -274,20 +274,20 @@ type PixelMapper = {
274
274
  * @param viewportStart - The leftmost date visible in the viewport.
275
275
  * @returns A {@link PixelMapper} configured for the given viewport.
276
276
  */
277
- declare function createPixelMapper(scale: TimeScale, viewportStart: Date): PixelMapper;
277
+ export declare function createPixelMapper(scale: TimeScale, viewportStart: Date): PixelMapper;
278
278
  //#endregion
279
279
  //#region src/lib/timeline/layoutEngine.d.ts
280
- declare const DENSITY: {
280
+ export declare const DENSITY: {
281
281
  readonly rowHeight: 44;
282
282
  readonly barHeight: 28;
283
283
  readonly milestoneSize: 20;
284
284
  };
285
- declare const ROW_HEIGHT: 44;
286
- declare const BAR_HEIGHT: 28;
287
- declare const BAR_Y_OFFSET: number;
288
- declare const MILESTONE_SIZE: 20;
285
+ export declare const ROW_HEIGHT: 44;
286
+ export declare const BAR_HEIGHT: 28;
287
+ export declare const BAR_Y_OFFSET: number;
288
+ export declare const MILESTONE_SIZE: 20;
289
289
  /** Half-width of a milestone diamond */
290
- declare const MILESTONE_HALF: number;
290
+ export declare const MILESTONE_HALF: number;
291
291
  type BarLayout = {
292
292
  taskId: number;
293
293
  /** Left edge x in timeline coordinates */
@@ -311,7 +311,7 @@ type BarLayout = {
311
311
  * @param mapper - The {@link PixelMapper} for coordinate conversion.
312
312
  * @returns A `Map` from task ID to its computed {@link BarLayout}.
313
313
  */
314
- declare function computeLayout(rows: TaskNode[], mapper: PixelMapper): Map<number, BarLayout>;
314
+ export declare function computeLayout(rows: TaskNode[], mapper: PixelMapper): Map<number, BarLayout>;
315
315
  /**
316
316
  * Derives viewport bounds from task data with padding.
317
317
  *
@@ -319,7 +319,7 @@ declare function computeLayout(rows: TaskNode[], mapper: PixelMapper): Map<numbe
319
319
  * @param paddingHours - Extra hours added before the earliest start and after the latest end. Defaults to `48`.
320
320
  * @returns A tuple `[start, end]` of UTC midnight `Date` instances.
321
321
  */
322
- declare function deriveViewport(tasks: TaskNode[], paddingHours?: number): [Date, Date];
322
+ export declare function deriveViewport(tasks: TaskNode[], paddingHours?: number): [Date, Date];
323
323
  //#endregion
324
324
  //#region src/lib/domain/dependencies.d.ts
325
325
  /**
@@ -329,7 +329,7 @@ declare function deriveViewport(tasks: TaskNode[], paddingHours?: number): [Date
329
329
  * @param links - The dependency links defining the directed edges.
330
330
  * @throws {GanttError} When a cycle is detected, with a human-readable cycle path.
331
331
  */
332
- declare function detectCycles(tasks: ZodTaskInferred[], links: ZodLinkInferred[]): void;
332
+ export declare function detectCycles(tasks: ZodTaskInferred[], links: ZodLinkInferred[]): void;
333
333
  /**
334
334
  * Validates that every link references existing task IDs and that no
335
335
  * duplicate (source, target) pairs exist.
@@ -340,7 +340,7 @@ declare function detectCycles(tasks: ZodTaskInferred[], links: ZodLinkInferred[]
340
340
  * when a non-FS link connects to/from a milestone, or when duplicate
341
341
  * (source, target) pairs exist.
342
342
  */
343
- declare function validateLinkRefs(tasks: ZodTaskInferred[], links: ZodLinkInferred[]): void;
343
+ export declare function validateLinkRefs(tasks: ZodTaskInferred[], links: ZodLinkInferred[]): void;
344
344
  //#endregion
345
345
  //#region src/lib/domain/dateMath.d.ts
346
346
  /**
@@ -350,7 +350,7 @@ declare function validateLinkRefs(tasks: ZodTaskInferred[], links: ZodLinkInferr
350
350
  * @returns A `Date` representing UTC midnight of the given date.
351
351
  * @throws {Error} When `dateStr` does not represent a valid date.
352
352
  */
353
- declare function parseDate(dateStr: string): Date;
353
+ export declare function parseDate(dateStr: string): Date;
354
354
  /**
355
355
  * Returns `date + n` days using exact millisecond arithmetic.
356
356
  *
@@ -358,7 +358,7 @@ declare function parseDate(dateStr: string): Date;
358
358
  * @param days - Number of days to add (may be negative).
359
359
  * @returns A new `Date` offset by the given number of days.
360
360
  */
361
- declare function addDays(date: Date, days: number): Date;
361
+ export declare function addDays(date: Date, days: number): Date;
362
362
  /**
363
363
  * Returns `date + n` hours using exact millisecond arithmetic.
364
364
  *
@@ -366,7 +366,7 @@ declare function addDays(date: Date, days: number): Date;
366
366
  * @param hours - Number of hours to add (may be negative).
367
367
  * @returns A new `Date` offset by the given number of hours.
368
368
  */
369
- declare function addHours(date: Date, hours: number): Date;
369
+ export declare function addHours(date: Date, hours: number): Date;
370
370
  /**
371
371
  * Difference in days (float). Positive when `b > a`.
372
372
  *
@@ -374,7 +374,7 @@ declare function addHours(date: Date, hours: number): Date;
374
374
  * @param b - The later date.
375
375
  * @returns The fractional number of days between the two dates.
376
376
  */
377
- declare function diffDays(a: Date, b: Date): number;
377
+ export declare function diffDays(a: Date, b: Date): number;
378
378
  /**
379
379
  * Difference in hours (float). Positive when `b > a`.
380
380
  *
@@ -382,7 +382,7 @@ declare function diffDays(a: Date, b: Date): number;
382
382
  * @param b - The later date.
383
383
  * @returns The fractional number of hours between the two dates.
384
384
  */
385
- declare function diffHours(a: Date, b: Date): number;
385
+ export declare function diffHours(a: Date, b: Date): number;
386
386
  //#endregion
387
387
  //#region src/lib/rendering/linkRouter.d.ts
388
388
  type Point = {
@@ -406,7 +406,7 @@ type RoutedLink = {
406
406
  * @param layouts - A map from task ID to its computed {@link BarLayout}.
407
407
  * @returns An array of {@link RoutedLink} objects with computed vertex paths.
408
408
  */
409
- declare function routeLinks(links: ZodLinkInferred[], layouts: Map<number, BarLayout>): RoutedLink[];
409
+ export declare function routeLinks(links: ZodLinkInferred[], layouts: Map<number, BarLayout>): RoutedLink[];
410
410
  //#endregion
411
411
  //#region src/lib/vanilla/dom/gridColumns.d.ts
412
412
  /**
@@ -424,7 +424,7 @@ type GridColumn = {
424
424
  field?: TaskDataField;
425
425
  format?: (value: unknown, task: Task<Record<string, unknown>>, row: TaskNode, locale: ChartLocale) => string;
426
426
  };
427
- declare const DEFAULT_GRID_COLUMNS: GridColumn[];
427
+ export declare const DEFAULT_GRID_COLUMNS: GridColumn[];
428
428
  /**
429
429
  * Returns a localized default grid column schema.
430
430
  * Column headers use locale label overrides with `EN_US_LABELS` fallback.
@@ -432,22 +432,22 @@ declare const DEFAULT_GRID_COLUMNS: GridColumn[];
432
432
  * @param locale - The {@link ChartLocale} to derive column header labels from.
433
433
  * @returns An array of {@link GridColumn} objects.
434
434
  */
435
- declare function gridColumnDefaults(locale: ChartLocale): GridColumn[];
435
+ export declare function gridColumnDefaults(locale: ChartLocale): GridColumn[];
436
436
  /**
437
437
  * Builds a CSS `grid-template-columns` value from a column schema.
438
438
  *
439
439
  * @param columns - The full column schema array (only visible columns are included).
440
440
  * @returns A space-separated CSS track list.
441
441
  */
442
- declare function gridTemplateColumns(columns: GridColumn[]): string;
442
+ export declare function gridTemplateColumns(columns: GridColumn[]): string;
443
443
  /**
444
444
  * Filters a column schema to only visible columns.
445
445
  *
446
446
  * @param columns - The full column schema array.
447
447
  * @returns A new array containing only columns where `visible` is not `false`.
448
448
  */
449
- declare function visibleColumns(columns: GridColumn[]): GridColumn[];
450
- declare const GRID_COLUMN_FR_MIN_WIDTH = 120;
449
+ export declare function visibleColumns(columns: GridColumn[]): GridColumn[];
450
+ export declare const GRID_COLUMN_FR_MIN_WIDTH = 120;
451
451
  /**
452
452
  * Computes the minimum natural pixel width of a grid column schema.
453
453
  *
@@ -455,7 +455,7 @@ declare const GRID_COLUMN_FR_MIN_WIDTH = 120;
455
455
  * @returns The sum of minimum widths: `px` columns sum directly, `fr` units contribute
456
456
  * `GRID_COLUMN_FR_MIN_WIDTH` px each.
457
457
  */
458
- declare function gridNaturalWidth(columns: GridColumn[]): number;
458
+ export declare function gridNaturalWidth(columns: GridColumn[]): number;
459
459
  //#endregion
460
460
  //#region src/lib/vanilla/gantt-chart.d.ts
461
461
  type OnTaskClick<TTaskData = never, TLinkData = never> = (payload: {
@@ -589,7 +589,7 @@ type GanttInstance<TTaskData = never, TLinkData = never> = {
589
589
  * });
590
590
  * ```
591
591
  */
592
- declare class GanttChart<TTaskData = never, TLinkData = never> implements GanttInstance<TTaskData, TLinkData> {
592
+ export declare class GanttChart<TTaskData = never, TLinkData = never> implements GanttInstance<TTaskData, TLinkData> {
593
593
  #private;
594
594
  /**
595
595
  * Constructs a new chart, builds the DOM, and wires internal event handling.
@@ -671,7 +671,7 @@ type GanttErrorCode = 'PARENT_REFERENCE' | 'PARENT_CYCLE' | 'LINK_REFERENCE' | '
671
671
  /**
672
672
  * Domain-specific error with a machine-readable {@link GanttErrorCode}.
673
673
  */
674
- declare class GanttError extends Error {
674
+ export declare class GanttError extends Error {
675
675
  readonly code: GanttErrorCode;
676
676
  /**
677
677
  * @param code - A machine-readable {@link GanttErrorCode} categorising the error.
@@ -680,5 +680,5 @@ declare class GanttError extends Error {
680
680
  constructor(code: GanttErrorCode, message: string);
681
681
  }
682
682
  //#endregion
683
- export { BAR_HEIGHT, BAR_Y_OFFSET, type BarLayout, type ChartLocale, DEFAULT_GRID_COLUMNS, DENSITY, EN_US_LABELS, GRID_COLUMN_FR_MIN_WIDTH, type GanttCallbacks, GanttChart, GanttError, type GanttErrorCode, type GanttInput, type GanttInputRaw, type GanttInstance, type GanttOptions, type GridColumn, type Link, type LinkType, type LocaleLabelKey, MILESTONE_HALF, MILESTONE_SIZE, type OnExpandCollapse, type OnExpandCollapseAll, type OnLinkClick, type OnLinkCreate, type OnLinkDblClick, type OnProgressChange, type OnTaskAdd, type OnTaskClick, type OnTaskDoubleClick, type OnTaskMove, type OnTaskResize, type OnTooltipText, type PixelMapper, type Point, ROW_HEIGHT, type RoutedLink, SCALE_CONFIGS, type ScaleConfig, type SpecialDay, type SpecialDayKind, type Task, type TaskDataField, type TaskKind, type TaskNode, type ThemeMode, type TimeScale, addDays, addHours, buildTaskTree, computeLayout, createPixelMapper, deriveViewport, deriveWeekNumbering, deriveWeekStartsOn, deriveWeekendDays, detectCycles, diffDays, diffHours, flattenTree, formatLabel, formatWeekNumber, gridColumnDefaults, gridNaturalWidth, gridTemplateColumns, isParent, parseDate, resolveChartLocale, routeLinks, validateLinkRefs, visibleColumns };
683
+ export { type BarLayout, type ChartLocale, EN_US_LABELS, type GanttCallbacks, type GanttErrorCode, type GanttInput, type GanttInputRaw, type GanttInstance, type GanttOptions, type GridColumn, type Link, type LinkType, type LocaleLabelKey, type OnExpandCollapse, type OnExpandCollapseAll, type OnLinkClick, type OnLinkCreate, type OnLinkDblClick, type OnProgressChange, type OnTaskAdd, type OnTaskClick, type OnTaskDoubleClick, type OnTaskMove, type OnTaskResize, type OnTooltipText, type PixelMapper, type Point, type RoutedLink, type ScaleConfig, type SpecialDay, type SpecialDayKind, type Task, type TaskDataField, type TaskKind, type TaskNode, type ThemeMode, type TimeScale, deriveWeekNumbering, deriveWeekStartsOn, deriveWeekendDays, formatLabel, formatWeekNumber, resolveChartLocale };
684
684
  //# sourceMappingURL=index.d.mts.map