@cjlapao/ui-kit-vue 0.2.0 → 0.2.3

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 (216) hide show
  1. package/dist/index.cjs +18 -25
  2. package/dist/index.css +37732 -13285
  3. package/dist/index.js +31192 -21036
  4. package/dist/types/common/chat/markdown.d.ts +8 -0
  5. package/dist/types/common/chat/storage.d.ts +48 -0
  6. package/dist/types/common/chat/stream.d.ts +43 -0
  7. package/dist/types/common/chat/types.d.ts +143 -0
  8. package/dist/types/common/connectionFlow/header.d.ts +56 -0
  9. package/dist/types/common/connectionFlow/icons.d.ts +15 -0
  10. package/dist/types/common/connectionFlow/index.d.ts +6 -0
  11. package/dist/types/common/connectionFlow/layout.d.ts +73 -0
  12. package/dist/types/common/connectionFlow/measure.d.ts +94 -0
  13. package/dist/types/common/connectionFlow/paint.d.ts +36 -0
  14. package/dist/types/common/connectionFlow/router.d.ts +131 -0
  15. package/dist/types/common/connectionFlow/tones.d.ts +79 -0
  16. package/dist/types/common/connectionFlow/types.d.ts +394 -0
  17. package/dist/types/common/gantt/drag.d.ts +221 -0
  18. package/dist/types/common/gantt/index.d.ts +11 -0
  19. package/dist/types/common/gantt/layout.d.ts +133 -0
  20. package/dist/types/common/gantt/sample.d.ts +15 -0
  21. package/dist/types/common/gantt/time.d.ts +77 -0
  22. package/dist/types/common/gantt/tokens.d.ts +73 -0
  23. package/dist/types/common/gantt/types.d.ts +216 -0
  24. package/dist/types/common/i18n/builtIn/de.d.ts +2 -0
  25. package/dist/types/common/i18n/builtIn/en.d.ts +2 -0
  26. package/dist/types/common/i18n/builtIn/es.d.ts +2 -0
  27. package/dist/types/common/i18n/builtIn/fr.d.ts +2 -0
  28. package/dist/types/common/i18n/builtIn/index.d.ts +15 -0
  29. package/dist/types/common/i18n/builtIn/pt.d.ts +2 -0
  30. package/dist/types/common/i18n/catalog.d.ts +32 -0
  31. package/dist/types/common/i18n/createI18n.d.ts +2 -0
  32. package/dist/types/common/i18n/dates.d.ts +12 -0
  33. package/dist/types/common/i18n/detect.d.ts +29 -0
  34. package/dist/types/common/i18n/icu.d.ts +36 -0
  35. package/dist/types/common/i18n/index.d.ts +10 -0
  36. package/dist/types/common/i18n/provider.d.ts +7 -0
  37. package/dist/types/common/i18n/storage.d.ts +8 -0
  38. package/dist/types/common/i18n/types.d.ts +64 -0
  39. package/dist/types/common/i18n/warn.d.ts +5 -0
  40. package/dist/types/common/theme/Theme.d.ts +941 -3
  41. package/dist/types/common/theme/glass.d.ts +90 -11
  42. package/dist/types/common/theme/randomThemeColor.d.ts +4 -4
  43. package/dist/types/common/tooltip/placement.d.ts +103 -0
  44. package/dist/types/common/tooltip/tokens.d.ts +40 -0
  45. package/dist/types/common/types/TableSettings.d.ts +15 -0
  46. package/dist/types/common/types/Variables.d.ts +71 -1
  47. package/dist/types/common/utils/dates.d.ts +113 -0
  48. package/dist/types/common/utils/gravatar.d.ts +0 -10
  49. package/dist/types/common/utils/safeStorage.d.ts +28 -0
  50. package/dist/types/common/utils/sanitizeSvg.d.ts +44 -0
  51. package/dist/types/common/utils/smartVariables.d.ts +74 -18
  52. package/dist/types/common/utils/tableStorage.d.ts +38 -0
  53. package/dist/types/vue/src/chat/index.d.ts +4 -0
  54. package/dist/types/vue/src/components/AccessMatrix.test.d.ts +1 -0
  55. package/dist/types/vue/src/components/AccessMatrix.vue.d.ts +23 -1
  56. package/dist/types/vue/src/components/Accordion.test.d.ts +1 -0
  57. package/dist/types/vue/src/components/Accordion.vue.d.ts +42 -28
  58. package/dist/types/vue/src/components/ActivityFeed.test.d.ts +1 -0
  59. package/dist/types/vue/src/components/ActivityFeed.vue.d.ts +141 -0
  60. package/dist/types/vue/src/components/Alert.test.d.ts +1 -0
  61. package/dist/types/vue/src/components/Alert.vue.d.ts +59 -2
  62. package/dist/types/vue/src/components/ApiErrorState.test.d.ts +1 -0
  63. package/dist/types/vue/src/components/ApiErrorState.vue.d.ts +28 -8
  64. package/dist/types/vue/src/components/AppDivider.vue.d.ts +53 -4
  65. package/dist/types/vue/src/components/Badge.vue.d.ts +45 -13
  66. package/dist/types/vue/src/components/BadgeIcon.vue.d.ts +1 -1
  67. package/dist/types/vue/src/components/BreakdownCard.test.d.ts +1 -0
  68. package/dist/types/vue/src/components/BreakdownCard.vue.d.ts +81 -0
  69. package/dist/types/vue/src/components/Button.vue.d.ts +22 -11
  70. package/dist/types/vue/src/components/Chat.test.d.ts +1 -0
  71. package/dist/types/vue/src/components/Chat.vue.d.ts +80 -0
  72. package/dist/types/vue/src/components/Checkbox.test.d.ts +1 -0
  73. package/dist/types/vue/src/components/Checkbox.vue.d.ts +44 -29
  74. package/dist/types/vue/src/components/CollapsiblePanel.vue.d.ts +5 -5
  75. package/dist/types/vue/src/components/ColorSwatches.test.d.ts +1 -0
  76. package/dist/types/vue/src/components/ColorSwatches.vue.d.ts +42 -0
  77. package/dist/types/vue/src/components/Combobox.test.d.ts +1 -0
  78. package/dist/types/vue/src/components/Combobox.vue.d.ts +61 -12
  79. package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlow.vue.d.ts +153 -17
  80. package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowCanvas.vue.d.ts +28 -0
  81. package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowHeader.vue.d.ts +33 -0
  82. package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowNodeBody.vue.d.ts +32 -0
  83. package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowSkeleton.vue.d.ts +18 -0
  84. package/dist/types/vue/src/components/ConnectionFlow/ConnectionFlowSvg.vue.d.ts +52 -0
  85. package/dist/types/vue/src/components/ConnectionFlow/connectionFlow.test.d.ts +1 -0
  86. package/dist/types/vue/src/components/ConnectionFlow/index.d.ts +11 -4
  87. package/dist/types/vue/src/components/CustomIcon.vue.d.ts +35 -11
  88. package/dist/types/vue/src/components/DetailItemCard.vue.d.ts +37 -5
  89. package/dist/types/vue/src/components/DropdownButton.vue.d.ts +3 -3
  90. package/dist/types/vue/src/components/DropdownMenu.test.d.ts +1 -0
  91. package/dist/types/vue/src/components/DropdownMenu.vue.d.ts +1 -1
  92. package/dist/types/vue/src/components/DynamicFormField.test.d.ts +1 -0
  93. package/dist/types/vue/src/components/DynamicFormField.vue.d.ts +61 -5
  94. package/dist/types/vue/src/components/DynamicImg.vue.d.ts +28 -3
  95. package/dist/types/vue/src/components/EmptyState.test.d.ts +1 -0
  96. package/dist/types/vue/src/components/EmptyState.vue.d.ts +104 -24
  97. package/dist/types/vue/src/components/FormField.vue.d.ts +2 -1
  98. package/dist/types/vue/src/components/Gantt/Gantt.test.d.ts +1 -0
  99. package/dist/types/vue/src/components/Gantt/Gantt.vue.d.ts +160 -0
  100. package/dist/types/vue/src/components/Gantt/GanttBodyRow.vue.d.ts +78 -0
  101. package/dist/types/vue/src/components/Gantt/GanttCell.vue.d.ts +28 -0
  102. package/dist/types/vue/src/components/Gantt/GanttLinkLayer.vue.d.ts +22 -0
  103. package/dist/types/vue/src/components/Gantt/GanttScale.vue.d.ts +7 -0
  104. package/dist/types/vue/src/components/Gantt/GanttTaskBar.vue.d.ts +53 -0
  105. package/dist/types/vue/src/components/Gantt/GanttToolbar.vue.d.ts +22 -0
  106. package/dist/types/vue/src/components/Gantt/index.d.ts +18 -0
  107. package/dist/types/vue/src/components/Gantt/labels.d.ts +3 -0
  108. package/dist/types/vue/src/components/Gantt/types.d.ts +11 -0
  109. package/dist/types/vue/src/components/Gantt/useGanttDrag.d.ts +105 -0
  110. package/dist/types/vue/src/components/GlassBackground.vue.d.ts +4 -3
  111. package/dist/types/vue/src/components/GlassPanel.vue.d.ts +2 -2
  112. package/dist/types/vue/src/components/HeaderGroup.vue.d.ts +19 -1
  113. package/dist/types/vue/src/components/HelpButton.test.d.ts +1 -0
  114. package/dist/types/vue/src/components/HelpButton.vue.d.ts +15 -6
  115. package/dist/types/vue/src/components/Hero.test.d.ts +1 -0
  116. package/dist/types/vue/src/components/Hero.vue.d.ts +52 -31
  117. package/dist/types/vue/src/components/IconButton.vue.d.ts +12 -6
  118. package/dist/types/vue/src/components/InfiniteScrollPanel.vue.d.ts +61 -14
  119. package/dist/types/vue/src/components/InfoRow.test.d.ts +1 -0
  120. package/dist/types/vue/src/components/InfoRow.vue.d.ts +67 -37
  121. package/dist/types/vue/src/components/InlinePanel.vue.d.ts +12 -18
  122. package/dist/types/vue/src/components/Input.test.d.ts +1 -0
  123. package/dist/types/vue/src/components/Input.vue.d.ts +42 -13
  124. package/dist/types/vue/src/components/InputGroup.test.d.ts +1 -0
  125. package/dist/types/vue/src/components/InputGroup.vue.d.ts +20 -5
  126. package/dist/types/vue/src/components/Loader.test.d.ts +1 -0
  127. package/dist/types/vue/src/components/Loader.vue.d.ts +30 -11
  128. package/dist/types/vue/src/components/MarkdownEditor.vue.d.ts +1 -1
  129. package/dist/types/vue/src/components/MetricBar.test.d.ts +1 -0
  130. package/dist/types/vue/src/components/MetricBar.vue.d.ts +16 -5
  131. package/dist/types/vue/src/components/Modal.vue.d.ts +18 -19
  132. package/dist/types/vue/src/components/MultiProgressBar.vue.d.ts +15 -2
  133. package/dist/types/vue/src/components/MultiSelectPills.test.d.ts +1 -0
  134. package/dist/types/vue/src/components/MultiSelectPills.vue.d.ts +47 -43
  135. package/dist/types/vue/src/components/MultiToggle.test.d.ts +1 -0
  136. package/dist/types/vue/src/components/MultiToggle.vue.d.ts +33 -6
  137. package/dist/types/vue/src/components/NotificationModal.test.d.ts +1 -0
  138. package/dist/types/vue/src/components/NotificationModal.vue.d.ts +19 -2
  139. package/dist/types/vue/src/components/PageHeader.test.d.ts +1 -0
  140. package/dist/types/vue/src/components/PageHeader.vue.d.ts +18 -0
  141. package/dist/types/vue/src/components/PagedPanel.test.d.ts +1 -0
  142. package/dist/types/vue/src/components/PagedPanel.vue.d.ts +39 -11
  143. package/dist/types/vue/src/components/Panel.vue.d.ts +18 -9
  144. package/dist/types/vue/src/components/PasswordInput.test.d.ts +1 -0
  145. package/dist/types/vue/src/components/PasswordInput.vue.d.ts +20 -3
  146. package/dist/types/vue/src/components/Picker.test.d.ts +1 -0
  147. package/dist/types/vue/src/components/Picker.vue.d.ts +3 -3
  148. package/dist/types/vue/src/components/Pill.vue.d.ts +63 -5
  149. package/dist/types/vue/src/components/Progress.test.d.ts +1 -0
  150. package/dist/types/vue/src/components/Progress.vue.d.ts +60 -11
  151. package/dist/types/vue/src/components/ProgressSpinner.test.d.ts +1 -0
  152. package/dist/types/vue/src/components/ProgressSpinner.vue.d.ts +46 -0
  153. package/dist/types/vue/src/components/ScrollArea.test.d.ts +1 -0
  154. package/dist/types/vue/src/components/ScrollArea.vue.d.ts +52 -0
  155. package/dist/types/vue/src/components/SearchBar.vue.d.ts +2 -3
  156. package/dist/types/vue/src/components/Section.vue.d.ts +1 -1
  157. package/dist/types/vue/src/components/SectionCard.vue.d.ts +2 -2
  158. package/dist/types/vue/src/components/Select.test.d.ts +1 -0
  159. package/dist/types/vue/src/components/Select.vue.d.ts +41 -16
  160. package/dist/types/vue/src/components/SidePanel.vue.d.ts +1 -1
  161. package/dist/types/vue/src/components/SmartInput.vue.d.ts +49 -18
  162. package/dist/types/vue/src/components/SmartValue.vue.d.ts +20 -13
  163. package/dist/types/vue/src/components/SmartVariableBadge.vue.d.ts +17 -0
  164. package/dist/types/vue/src/components/Spinner.test.d.ts +1 -0
  165. package/dist/types/vue/src/components/Spinner.vue.d.ts +12 -5
  166. package/dist/types/vue/src/components/SplitView.vue.d.ts +6 -6
  167. package/dist/types/vue/src/components/StartupStageStepper.vue.d.ts +1 -1
  168. package/dist/types/vue/src/components/StatChartTile.vue.d.ts +5 -0
  169. package/dist/types/vue/src/components/StatCountTile.vue.d.ts +5 -1
  170. package/dist/types/vue/src/components/StatGraphTile.vue.d.ts +1 -1
  171. package/dist/types/vue/src/components/StatTile.test.d.ts +1 -0
  172. package/dist/types/vue/src/components/StatTile.vue.d.ts +5 -1
  173. package/dist/types/vue/src/components/StatusSpinner.test.d.ts +1 -0
  174. package/dist/types/vue/src/components/StatusSpinner.vue.d.ts +10 -5
  175. package/dist/types/vue/src/components/Stepper.test.d.ts +1 -0
  176. package/dist/types/vue/src/components/Stepper.vue.d.ts +62 -25
  177. package/dist/types/vue/src/components/Table.test.d.ts +1 -0
  178. package/dist/types/vue/src/components/Table.vue.d.ts +67 -14
  179. package/dist/types/vue/src/components/Tabs.vue.d.ts +20 -3
  180. package/dist/types/vue/src/components/TagPicker.vue.d.ts +3 -3
  181. package/dist/types/vue/src/components/Textarea.vue.d.ts +8 -5
  182. package/dist/types/vue/src/components/TimelinePanel/TimelinePanel.vue.d.ts +4 -4
  183. package/dist/types/vue/src/components/Toggle.vue.d.ts +4 -4
  184. package/dist/types/vue/src/components/Toolbar.test.d.ts +1 -0
  185. package/dist/types/vue/src/components/Toolbar.vue.d.ts +62 -0
  186. package/dist/types/vue/src/components/Tooltip.test.d.ts +1 -0
  187. package/dist/types/vue/src/components/Tooltip.vue.d.ts +20 -3
  188. package/dist/types/vue/src/components/TooltipWrapper.vue.d.ts +24 -3
  189. package/dist/types/vue/src/components/TreeView/TreeFlowSvg.vue.d.ts +5 -5
  190. package/dist/types/vue/src/components/TreeView/TreeItemRow.vue.d.ts +2 -2
  191. package/dist/types/vue/src/components/TreeView/TreeView.vue.d.ts +4 -4
  192. package/dist/types/vue/src/components/UserAvatar.test.d.ts +1 -0
  193. package/dist/types/vue/src/components/UserAvatar.vue.d.ts +56 -6
  194. package/dist/types/vue/src/components/VariablePicker.vue.d.ts +23 -6
  195. package/dist/types/vue/src/components/__dbg.test.d.ts +1 -0
  196. package/dist/types/vue/src/components/index.d.ts +50 -31
  197. package/dist/types/vue/src/components/internal/InfoRowContent.vue.d.ts +52 -0
  198. package/dist/types/vue/src/components/internal/PagedPanelContent.vue.d.ts +47 -0
  199. package/dist/types/vue/src/connectionFlow/index.d.ts +1 -0
  200. package/dist/types/vue/src/contexts/IconContext.d.ts +8 -3
  201. package/dist/types/vue/src/i18n/I18nContext.d.ts +14 -0
  202. package/dist/types/vue/src/i18n/I18nProvider.test.d.ts +2 -0
  203. package/dist/types/vue/src/i18n/I18nProvider.vue.d.ts +35 -0
  204. package/dist/types/vue/src/i18n/index.d.ts +8 -0
  205. package/dist/types/vue/src/i18n/kit-components-spot.test.d.ts +1 -0
  206. package/dist/types/vue/src/i18n/useI18n.d.ts +44 -0
  207. package/dist/types/vue/src/index.d.ts +2 -2
  208. package/dist/types/vue/src/test-setup.d.ts +5 -0
  209. package/dist/types/vue/src/types/Icon.d.ts +11 -2
  210. package/dist/types/vue/src/types/TableSettings.d.ts +1 -0
  211. package/dist/types/vue/src/types/index.d.ts +1 -0
  212. package/dist/types/vue/src/utils/index.d.ts +1 -0
  213. package/dist/types/vue/src/utils/sanitizeSvg.d.ts +1 -0
  214. package/dist/types/vue/src/utils/tableStorage.d.ts +1 -0
  215. package/dist/ui-kit-vue.css +1 -1
  216. package/package.json +8 -3
@@ -0,0 +1,216 @@
1
+ /**
2
+ * Gantt — framework-agnostic data model.
3
+ *
4
+ * The shape mirrors the best-in-class libraries (dhtmlxGantt, Bryntum Gantt,
5
+ * Syncfusion Gantt): a flat `tasks[]` with an optional `parent` id forming the
6
+ * hierarchy, a `links[]` array for dependencies, and optional `lanes[]`
7
+ * (swimlanes) that group rows. All dates travel as ISO-8601 strings; the
8
+ * engine normalises them to epoch-ms internally.
9
+ */
10
+ import type { TrueColor } from "../theme/Theme";
11
+ import type { GanttPt } from "./drag";
12
+ export type { TrueColor };
13
+ /** A date accepted anywhere the model takes one: ISO string or Date. */
14
+ export type GanttDate = string | Date | number;
15
+ /**
16
+ * Task kinds.
17
+ * - `task` — a regular duration bar.
18
+ * - `project` — a group header task; its bar spans its children and its
19
+ * progress is the roll-up of its descendants.
20
+ * - `milestone` — zero-duration, rendered as a diamond.
21
+ */
22
+ export type GanttTaskType = "task" | "project" | "milestone";
23
+ /** Dependency types (standard project-management relations). */
24
+ export type GanttLinkType = "fs" | "ff" | "sf" | "ss";
25
+ export interface GanttTask {
26
+ id: string;
27
+ name: string;
28
+ /** Task start (ISO date / datetime, or Date, or epoch ms). */
29
+ start: GanttDate;
30
+ /** Task end — exclusive-style is fine; a milestone may equal `start`. */
31
+ end: GanttDate;
32
+ /** Completion, 0..1. Omitted = 0. */
33
+ progress?: number;
34
+ /** Defaults to `task`. */
35
+ type?: GanttTaskType;
36
+ /** Parent task id for hierarchy. Omitted/null = top level. */
37
+ parent?: string | null;
38
+ /** Swimlane / group id — see `GanttLane`. Omitted = default lane. */
39
+ lane?: string | null;
40
+ /** Bar colour. Defaults to the Gantt's `color` prop. */
41
+ color?: TrueColor;
42
+ /** Row collapsed/expanded (children hidden). Defaults to expanded. */
43
+ open?: boolean;
44
+ /** Optional owner label (rendered in a column when provided). */
45
+ owner?: string;
46
+ /** Optional short badge text (rendered in a column when provided). */
47
+ badge?: string;
48
+ /** Badge tone. */
49
+ badgeColor?: TrueColor;
50
+ /** Extra cell values for user-defined columns (`columns[].key`). */
51
+ values?: Record<string, string | number | boolean | null | undefined>;
52
+ /** Disable drag/resize/link for this task. */
53
+ locked?: boolean;
54
+ /** Extra data carried through events untouched. */
55
+ [key: string]: unknown;
56
+ }
57
+ export interface GanttLink {
58
+ id?: string;
59
+ /** Task id the dependency points from. */
60
+ source: string;
61
+ /** Task id the dependency points to. */
62
+ target: string;
63
+ /** Defaults to `fs` (finish-to-start). */
64
+ type?: GanttLinkType;
65
+ /** Arrow colour. Defaults to the Gantt's `color` prop. */
66
+ color?: TrueColor;
67
+ [key: string]: unknown;
68
+ }
69
+ /** A swimlane (lane / group band) the tasks can be assigned to via `task.lane`. */
70
+ export interface GanttLane {
71
+ id: string;
72
+ label: string;
73
+ /** Lane band colour. Defaults to `neutral`. */
74
+ color?: TrueColor;
75
+ /** Optional second line under the label. */
76
+ description?: string;
77
+ /** Lane collapsed (rows hidden). Defaults to expanded. */
78
+ open?: boolean;
79
+ }
80
+ /**
81
+ * A left-panel table column. `key` resolves against
82
+ * `task.name` / `task.owner` / `task.badge` / `task.values[key]`.
83
+ */
84
+ export interface GanttColumn {
85
+ key: string;
86
+ title: string;
87
+ /** Column header tone. Defaults to `neutral`. */
88
+ tone?: TrueColor;
89
+ /** CSS width, e.g. `"180px"`. Defaults to `"160px"`. */
90
+ width?: string;
91
+ /** Cell content alignment. */
92
+ align?: "left" | "center" | "right";
93
+ /**
94
+ * Custom cell renderer key: `"text"` | `"progress"` | `"owner"` |
95
+ * `"badge"`. Defaults to `"text"`.
96
+ */
97
+ kind?: "text" | "progress" | "owner" | "badge";
98
+ /**
99
+ * When false, this column cannot be resized even when `resizableColumns`
100
+ * is set on the Gantt. Defaults to true.
101
+ */
102
+ resizable?: boolean;
103
+ }
104
+ /** Snap targets for drag operations. */
105
+ export type GanttSnap = "none" | "hour" | "day" | "week";
106
+ /**
107
+ * Zoom, expressed as pixels per day. Presets (see `GANTT_ZOOM_PRESETS`):
108
+ * `day` = 48, `week` = 16, `month` = 5, `quarter` = 1.6. Continuous values in
109
+ * between are valid — the time scale re-derives its header levels for any.
110
+ */
111
+ export type GanttZoom = number;
112
+ export interface GANTT_ZOOM_PRESET {
113
+ label: string;
114
+ /** px per day */
115
+ value: number;
116
+ }
117
+ /** Discrete zoom presets for the toolbar. */
118
+ export declare const GANTT_ZOOM_PRESETS: GANTT_ZOOM_PRESET[];
119
+ /** Inclusive zoom bounds applied to wheel/button zoom. */
120
+ export declare const GANTT_MIN_ZOOM = 0.4;
121
+ export declare const GANTT_MAX_ZOOM = 96;
122
+ /** Time scale header column. */
123
+ export interface GanttTimeColumn {
124
+ id: string;
125
+ /** e.g. "Jan 2026", "Q1", "12", "W03" */
126
+ label: string;
127
+ /** e.g. "Jan", "2026", "Mon" — sub-label for two-line headers. */
128
+ subLabel?: string;
129
+ /** Epoch ms of column start (exclusive of anything before). */
130
+ start: number;
131
+ /** Epoch ms of column end (exclusive). */
132
+ end: number;
133
+ /** Rendered width in px. */
134
+ width: number;
135
+ }
136
+ /** A resolved time scale level (one row of headers). */
137
+ export interface GanttTimeScaleLevel {
138
+ /** Stable level id: "year" | "quarter" | "month" | "week" | "day" */
139
+ id: string;
140
+ columns: GanttTimeColumn[];
141
+ }
142
+ /** A flattened, renderable row in the row model. */
143
+ export interface GanttRow {
144
+ key: string;
145
+ /** Task rows reference the task; group rows reference their lane. */
146
+ task?: GanttTask;
147
+ lane?: GanttLane;
148
+ isGroup: boolean;
149
+ /** Hierarchy depth (0 = top level). */
150
+ depth: number;
151
+ /** Number of descendant rows (for group indentation spans). */
152
+ childCount: number;
153
+ /** Row height in px (groups can be shorter). */
154
+ height: number;
155
+ /** Top offset from the top of the row area (excl. header), px. */
156
+ top: number;
157
+ /** Cumulative roll-up progress for group/project rows (0..1). */
158
+ progress?: number;
159
+ }
160
+ /** Geometry needed to draw dependency arrows. */
161
+ export interface GanttBarGeometry {
162
+ taskId: string;
163
+ /** Left offset of the bar within the timeline, px. */
164
+ left: number;
165
+ /** Bar width, px (0 for milestones — drawn at `left`). */
166
+ width: number;
167
+ /** Row top, px (relative to the row area). */
168
+ top: number;
169
+ /** Row height, px. */
170
+ height: number;
171
+ /** Milestones are diamonds centred on their date. */
172
+ milestone: boolean;
173
+ }
174
+ /** A point in the link layer's coordinate space (origin = timeline origin). */
175
+ export interface GanttLinkPoint {
176
+ x: number;
177
+ y: number;
178
+ }
179
+ /** A resolved dependency arrow path in timeline pixel space. */
180
+ export interface GanttLinkPath {
181
+ link: GanttLink;
182
+ /** SVG path `d` in the link layer's coordinate space (origin = timeline origin). */
183
+ d: string;
184
+ /**
185
+ * The route polyline (pre-corner-rounding) the same `d` is derived from —
186
+ * in the link layer's coordinate space. Kept on the path so hit-testing
187
+ * (`pickLinkAt`) can measure pointer distance without parsing path data.
188
+ */
189
+ points: GanttPt[];
190
+ /**
191
+ * Arrowhead polygon points (SVG `<polygon points>`), or undefined when the
192
+ * approach is too short for a head. Computed in the engine so the
193
+ * framework layer never has to parse paths.
194
+ */
195
+ arrow?: string;
196
+ /** Source port — the point on the source bar's edge the connector leaves. */
197
+ from: GanttLinkPoint;
198
+ /** Target port — the point on the target bar's edge the arrowhead lands on. */
199
+ to: GanttLinkPoint;
200
+ color?: TrueColor;
201
+ type: GanttLinkType;
202
+ }
203
+ /** Label overrides for every string the Gantt renders. */
204
+ export interface GanttLabels {
205
+ loading: string;
206
+ empty: string;
207
+ today: string;
208
+ select: string;
209
+ move: string;
210
+ resize: string;
211
+ link: string;
212
+ progress: string;
213
+ duration: string;
214
+ task: string;
215
+ }
216
+ export declare const DEFAULT_GANTT_LABELS: GanttLabels;
@@ -0,0 +1,2 @@
1
+ import type { MessageCatalog } from "../types";
2
+ export declare const DE_KIT_CATALOG: MessageCatalog;
@@ -0,0 +1,2 @@
1
+ import type { MessageCatalog } from "../types";
2
+ export declare const EN_KIT_CATALOG: MessageCatalog;
@@ -0,0 +1,2 @@
1
+ import type { MessageCatalog } from "../types";
2
+ export declare const ES_KIT_CATALOG: MessageCatalog;
@@ -0,0 +1,2 @@
1
+ import type { MessageCatalog } from "../types";
2
+ export declare const FR_KIT_CATALOG: MessageCatalog;
@@ -0,0 +1,15 @@
1
+ import type { LocaleTag, MessageCatalog } from "../types";
2
+ export { DE_KIT_CATALOG } from "./de";
3
+ export { EN_KIT_CATALOG } from "./en";
4
+ export { ES_KIT_CATALOG } from "./es";
5
+ export { FR_KIT_CATALOG } from "./fr";
6
+ export { PT_KIT_CATALOG } from "./pt";
7
+ /**
8
+ * Built-in kit catalogs (spec §4.3). `en` is the reference — its values are
9
+ * the components' current hardcoded literals (no-provider rendering is
10
+ * byte-identical to pre-i18n). `fr/es/de/pt` are curated initial translations
11
+ * (spec §15), overridable per key.
12
+ */
13
+ export declare const BUILT_IN_CATALOGS: Record<LocaleTag, MessageCatalog>;
14
+ /** Locales the kit ships curated kit strings for (the CLI's scaffold set). */
15
+ export declare const CURATED_LOCALES: LocaleTag[];
@@ -0,0 +1,2 @@
1
+ import type { MessageCatalog } from "../types";
2
+ export declare const PT_KIT_CATALOG: MessageCatalog;
@@ -0,0 +1,32 @@
1
+ import type { LocaleTag, MessageCatalog } from "./types";
2
+ /**
3
+ * Flatten a nested catalog to dot-keys (spec §4.1).
4
+ *
5
+ * `a.b.c` → string; arrays keep their index (`kit.date.months.0`); non-string
6
+ * leaves are skipped with a deduped warn. Flattening happens once at provider
7
+ * setup — `lookup` never walks raw catalogs.
8
+ */
9
+ export declare function flattenCatalog(catalog: MessageCatalog, warnPrefix?: string): Record<string, string>;
10
+ export interface LookupResult {
11
+ value: string;
12
+ /** The locale the value was found in. */
13
+ resolvedLocale: LocaleTag;
14
+ }
15
+ /**
16
+ * Key-resolution structure (spec §4.2):
17
+ *
18
+ * user[L] → kit[L] → kit[fallback]
19
+ *
20
+ * Built once; `lookup` is a plain map walk over that chain (no per-call
21
+ * catalog walking). Note: `user[fallback]` is NOT consulted for a different
22
+ * active locale — user catalogs are per-locale (deliberate v1 simplification).
23
+ */
24
+ export interface Resolution {
25
+ lookup(key: string, locale: LocaleTag): LookupResult | undefined;
26
+ has(key: string, locale: LocaleTag): boolean;
27
+ /** Union of user + built-in tags, sorted. */
28
+ availableLocales(): LocaleTag[];
29
+ /** Merged `user[L]` over `kit[L]` (used for `kit.date.*` overrides). */
30
+ catalogFor(locale: LocaleTag): Record<string, string>;
31
+ }
32
+ export declare function buildResolution(userLocales: Record<LocaleTag, MessageCatalog>, builtIn: Record<LocaleTag, MessageCatalog>, fallback: LocaleTag): Resolution;
@@ -0,0 +1,2 @@
1
+ import type { I18nConfig, I18nEngine } from "./types";
2
+ export declare function createI18n(config: I18nConfig): I18nEngine;
@@ -0,0 +1,12 @@
1
+ import type { LocaleTag } from "./types";
2
+ /** Localized month names (Jan…Dec order). Catalog override, Intl, English. */
3
+ export declare function getMonthNames(locale: LocaleTag, short?: boolean, catalog?: Record<string, string>): string[];
4
+ /** Localized weekday names (Sunday-first, getDay() numbering). */
5
+ export declare function getWeekdayNames(locale: LocaleTag, short?: boolean, catalog?: Record<string, string>): string[];
6
+ /** All four name sets for locale-aware date parsing (Task 2.4 consumes this). */
7
+ export declare function getLocalizedParseNames(locale: LocaleTag, catalog?: Record<string, string>): {
8
+ monthFull: string[];
9
+ monthShort: string[];
10
+ weekdayFull: string[];
11
+ weekdayShort: string[];
12
+ };
@@ -0,0 +1,29 @@
1
+ import type { LocaleTag } from "./types";
2
+ /** BCP-47 base language (`"fr-CA"` → `"fr"`), lowercased. */
3
+ export declare function baseLanguage(tag: LocaleTag): string;
4
+ /**
5
+ * Locale prefixes the kit treats as right-to-left (spec §6). A small static
6
+ * list keeps the engine dependency-free; extend as needed.
7
+ */
8
+ export declare const RTL_PREFIXES: readonly LocaleTag[];
9
+ export declare function isRTLLocale(tag: LocaleTag): boolean;
10
+ /**
11
+ * The first candidate that has a catalog — exact tag, then base language
12
+ * (`matchTag(["fr-CA"], {"fr"})` → `"fr"`). `undefined` when none matches.
13
+ */
14
+ export declare function matchTag(candidates: readonly LocaleTag[], available: ReadonlySet<LocaleTag>): LocaleTag | undefined;
15
+ export interface InitialLocaleInput {
16
+ /** Explicit `locale` config — skips detection + persistence. */
17
+ explicit?: LocaleTag;
18
+ detect: boolean;
19
+ /** Stored tag (or `null`). */
20
+ stored: LocaleTag | null;
21
+ languages: readonly LocaleTag[];
22
+ available: ReadonlySet<LocaleTag>;
23
+ fallback: LocaleTag;
24
+ }
25
+ /**
26
+ * Detection order (spec §7): explicit → stored → `navigator.languages` →
27
+ * fallback. Invalid values fall through the chain — this never fails.
28
+ */
29
+ export declare function resolveInitialLocale(input: InitialLocaleInput): LocaleTag;
@@ -0,0 +1,36 @@
1
+ export type IcuStyle = "number" | "date" | "time";
2
+ export type IcuNode = {
3
+ type: "text";
4
+ value: string;
5
+ } | {
6
+ type: "arg";
7
+ name: string;
8
+ style?: IcuStyle;
9
+ options?: Record<string, string>;
10
+ } | {
11
+ type: "plural";
12
+ name: string;
13
+ offset: number;
14
+ branches: Map<string, IcuNode[]>;
15
+ } | {
16
+ type: "select";
17
+ name: string;
18
+ branches: Map<string, IcuNode[]>;
19
+ };
20
+ /** Parse-time error (bad ICU source): carries key + position. */
21
+ export declare class IcuParseError extends Error {
22
+ readonly key: string;
23
+ readonly source: string;
24
+ readonly position: number;
25
+ constructor(key: string, source: string, position: number, reason: string);
26
+ }
27
+ /** Runtime error: a message expects a value the caller did not provide. */
28
+ export declare class IcuValueError extends Error {
29
+ readonly key: string;
30
+ readonly arg: string;
31
+ constructor(key: string, arg: string, detail: string);
32
+ }
33
+ /** Parse one ICU message into its AST. Throws `IcuParseError` on bad source. */
34
+ export declare function parseMessage(source: string, key: string): IcuNode[];
35
+ /** Resolve an AST against values. `dev` selects throw vs degrade. */
36
+ export declare function resolveNodes(nodes: IcuNode[], values: Record<string, unknown>, locale: string, dev: boolean, key: string): string;
@@ -0,0 +1,10 @@
1
+ export * from "./types";
2
+ export * from "./warn";
3
+ export * from "./storage";
4
+ export * from "./catalog";
5
+ export * from "./icu";
6
+ export * from "./detect";
7
+ export * from "./dates";
8
+ export * from "./builtIn";
9
+ export * from "./createI18n";
10
+ export * from "./provider";
@@ -0,0 +1,7 @@
1
+ import type { I18nConfig, I18nEngine } from "./types";
2
+ /**
3
+ * Wrap an engine with the side effects a provider owns. Returns a new
4
+ * `I18nEngine` whose `setLocale` also persists (when `storageKey` allows)
5
+ * and updates `<html lang/dir>` (when `updateDocument !== false`).
6
+ */
7
+ export declare function wrapEngineWithSideEffects(engine: I18nEngine, config: I18nConfig): I18nEngine;
@@ -0,0 +1,8 @@
1
+ import type { I18nConfig, LocaleTag } from "./types";
2
+ export declare const DEFAULT_STORAGE_KEY = "ui-kit:locale";
3
+ /** The effective storage key (`null` = persistence disabled). */
4
+ export declare function storageKeyOf(config: Pick<I18nConfig, "storageKey">): string | null;
5
+ /** The persisted locale choice, or `null` (SSR-safe). */
6
+ export declare function readStoredLocale(config: Pick<I18nConfig, "storageKey">): LocaleTag | null;
7
+ /** Persist the active locale (no-op when disabled or unavailable). */
8
+ export declare function persistLocale(config: Pick<I18nConfig, "storageKey">, locale: LocaleTag): void;
@@ -0,0 +1,64 @@
1
+ import type { DateParseNames } from "../utils/dates";
2
+ /** BCP-47 language tag: `"en"`, `"fr"`, `"fr-CA"`. */
3
+ export type LocaleTag = string;
4
+ /**
5
+ * A catalog: message map. Values are usually message strings, but nested
6
+ * objects are allowed (flattened to dot-keys) as are string arrays (used by
7
+ * the `kit.date.*` name overrides). Non-string leaves are skipped with a
8
+ * dev warning.
9
+ */
10
+ export type MessageCatalog = Record<string, unknown>;
11
+ /** Object form of `t` — the future extraction phase's entry point. */
12
+ export interface I18nMessage {
13
+ id: string;
14
+ /** Used when `id` is missing everywhere (resolved as an ICU message). */
15
+ defaultMessage?: string;
16
+ values?: Record<string, unknown>;
17
+ }
18
+ export interface I18nConfig {
19
+ /** User catalogs, keyed by locale tag. */
20
+ locales: Record<LocaleTag, MessageCatalog>;
21
+ /** Key-resolution fallback locale. @default "en" */
22
+ fallbackLocale?: LocaleTag;
23
+ /** Explicit active locale — skips detection and persistence reads. */
24
+ locale?: LocaleTag;
25
+ /** Detect from `navigator.languages`. @default true (no-op in SSR). */
26
+ detect?: boolean;
27
+ /**
28
+ * localStorage key for the persisted choice; `null` = never persist (and
29
+ * never read). @default "ui-kit:locale"
30
+ */
31
+ storageKey?: string | null;
32
+ /** Set `document.documentElement.lang`/`dir` at init and on change. @default true */
33
+ updateDocument?: boolean;
34
+ /** Called when a key resolves via fallback or `defaultMessage`. */
35
+ onFallbackKey?(key: string, requested: LocaleTag, resolved: LocaleTag): void;
36
+ }
37
+ export interface I18nEngine {
38
+ /** Translate `key` with ICU values. Missing → en fallback → the key. */
39
+ t(key: string, values?: Record<string, unknown>): string;
40
+ t(msg: I18nMessage): string;
41
+ /** Active locale tag. */
42
+ locale: LocaleTag;
43
+ /** All available tags (user ∪ built-in), sorted. */
44
+ locales: LocaleTag[];
45
+ has(key: string, locale?: LocaleTag): boolean;
46
+ /** Exact or base-language match; otherwise warn + no-op. */
47
+ setLocale(tag: LocaleTag): void;
48
+ formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
49
+ formatDate(value: Date, options?: Intl.DateTimeFormatOptions): string;
50
+ monthNames(locale?: LocaleTag, short?: boolean): string[];
51
+ weekdayNames(locale?: LocaleTag, short?: boolean): string[];
52
+ /**
53
+ * Localized month/weekday names for locale-aware DATE PARSING (spec §6) —
54
+ * feeds `parseDateText`/`parseValueText`'s `names` param. Catalog overrides
55
+ * included (same chain as `monthNames`).
56
+ */
57
+ parseNames(locale?: LocaleTag): DateParseNames;
58
+ /** Whether the active locale is right-to-left. */
59
+ isRTL: boolean;
60
+ /** Subscribe to locale changes; returns the unsubscribe function. */
61
+ subscribe(listener: () => void): () => void;
62
+ /** Bumped on every locale change (useSyncExternalStore-friendly). */
63
+ getVersion(): number;
64
+ }
@@ -0,0 +1,5 @@
1
+ export declare function isDev(): boolean;
2
+ /** Warn at most once per `id`, in dev and prod alike. */
3
+ export declare function devWarnOnce(id: string, message: string): void;
4
+ /** Test helper: clear the dedupe set between tests. */
5
+ export declare function resetWarned(): void;