@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
@@ -18,28 +18,68 @@ import type { TrueColor } from "./Theme";
18
18
  export type GlassVibrancy = "low" | "medium" | "high" | number;
19
19
  /**
20
20
  * Glass fill transparency level.
21
- * - `"frosted"` → 45 % light / 15 % dark (default)
22
- * - `"light"` → 70 % light / 25 % dark
23
- * - `"clear"` → 20 % light / 5 % dark
21
+ * - `"frosted"` → 65 % light / 25 % dark (default)
22
+ * - `"light"` → 85 % light / 35 % dark
23
+ * - `"clear"` → 30 % light / 10 % dark (sheer — pair with a light backdrop)
24
24
  * - `number` → 0–1 fraction; light = round(frac × 100), dark = min(round(frac × 30), 30)
25
+ *
26
+ * Only the three presets (and their +10 hover steps) are safelisted. A numeric
27
+ * value emits an arbitrary opacity that Tailwind's scanner cannot see, so the
28
+ * fill silently disappears unless that exact step happens to be generated —
29
+ * see `scripts/generate-safelist.mjs`.
25
30
  */
26
31
  export type GlassOpacity = "frosted" | "light" | "clear" | number;
27
32
  /**
28
33
  * Specular highlight mode for glass surfaces.
29
34
  * - `"none"` → no specular overlay
30
- * - `"classic"` → single hairline gradient at top edge
31
- * - `"halo"` → corner caps + diffuse band + bottom darken
35
+ * - `"classic"` → sheen falling from the top edge
36
+ * - `"halo"` → broad bloom plus two off-centre corner glints
32
37
  */
33
38
  export type SpecularMode = "none" | "classic" | "halo";
34
39
  /**
35
40
  * Compute the Tailwind fill classes for a glass surface.
36
41
  *
37
- * Returns a string like `"bg-blue-100/55 hover:bg-blue-100/65 dark:bg-blue-600/25 dark:hover:bg-blue-600/35"`.
42
+ * Returns a string like `"bg-blue-200/65 hover:bg-blue-200/75 dark:bg-blue-500/25 dark:hover:bg-blue-500/35"`.
43
+ *
44
+ * The tint rides the `-200`/`-500` shades: a `-100` wash at these alphas is
45
+ * nearly colourless over white — exactly the “looks disabled” read glass
46
+ * used to get. The alpha ladder is unchanged; only the shade’s chroma moved
47
+ * one notch up.
38
48
  *
39
49
  * @param color - TrueColor token (e.g. `"blue"`, `"red"`, `"fuchsia"`)
40
50
  * @param opacity - Glass opacity preset or numeric fraction (0–1)
41
51
  */
42
52
  export declare const getGlassFillClass: (color: TrueColor, opacity: GlassOpacity) => string;
53
+ /**
54
+ * Glass fill for a *container* surface — `Panel` and anything built on it.
55
+ *
56
+ * Deliberately sheerer than `getGlassFillClass`, which is tuned for controls.
57
+ * A Button is a small target that has to stay legible against its own label; a
58
+ * Panel covers most of the viewport, and the same 65% fill over that area
59
+ * turns the backdrop into a flat wash and defeats the point of glass. It also
60
+ * omits the hover step: a card is not hoverable by default.
61
+ *
62
+ * `Panel` built these strings inline, so the two implementations of "glass
63
+ * fill" sat in different files with different scales and no shared safelist.
64
+ * The steps here are the ones `scripts/generate-safelist.mjs` emits.
65
+ */
66
+ export declare const getSurfaceGlassFillClass: (color: TrueColor, opacity: GlassOpacity) => string;
67
+ /**
68
+ * Halo specular for a container, as stacked full-bleed gradient layers for a
69
+ * `background-image`.
70
+ *
71
+ * Every layer spans the whole surface and reaches full transparency *inside*
72
+ * its own box, so none of them contributes a visible edge. An earlier version
73
+ * used two fixed `w-24 h-12` corner boxes filled with linear gradients — a
74
+ * linear gradient only fades along one axis, so the boxes' remaining edges cut
75
+ * off hard and read as two grey rectangles in the corners.
76
+ *
77
+ * Layer order is top-most first: the broad bloom, two off-centre glints that
78
+ * keep the light from looking symmetrical, then a little weight at the base.
79
+ * Exported so both kits' `Panel` paint the identical halo.
80
+ */
81
+ export declare const SURFACE_HALO_LIGHT: string;
82
+ export declare const SURFACE_HALO_DARK: string;
43
83
  /**
44
84
  * Map a vibrancy setting to a Tailwind backdrop-saturate class.
45
85
  *
@@ -48,12 +88,51 @@ export declare const getGlassFillClass: (color: TrueColor, opacity: GlassOpacity
48
88
  */
49
89
  export declare const getGlassVibrancyClass: (vibrancy: GlassVibrancy) => string;
50
90
  /**
51
- * Build Tailwind classes for a specular highlight overlay.
91
+ * Build the specular paint classes for a glass surface.
52
92
  *
53
- * - `"none"` → `null` (no overlay)
54
- * - `"classic"` → soft top-edge hairline reflection
55
- * - `"halo"` → corner caps + diffuse top glow
93
+ * The caller owns positioning; this returns background utilities only.
56
94
  *
57
- * @returns class string or `null`
95
+ * @returns class string, or `null` for `"none"`
58
96
  */
59
97
  export declare const getSpecularClasses: (mode: SpecularMode) => string | null;
98
+ /**
99
+ * Text, rim and focus ring for a glass control.
100
+ *
101
+ * Glass surfaces drop the variant's own colour classes (those paint an opaque
102
+ * fill), which previously left the control with **no** text colour, border or
103
+ * focus ring at all — the label inherited whatever the page happened to set.
104
+ *
105
+ * The rim is deliberately tone-independent white: a saturated `{color}-500`
106
+ * edge fights the backdrop the control is meant to sit over. Matches the rim
107
+ * `Panel` uses for its glass variants.
108
+ */
109
+ export interface GlassChromeOptions {
110
+ /**
111
+ * Include the hover response and focus ring. Turn it off for a glass surface
112
+ * that is only a label — a rim that brightens under the cursor on something
113
+ * you cannot click reads as a broken affordance.
114
+ * @default true
115
+ */
116
+ interactive?: boolean;
117
+ }
118
+ export declare const getGlassChromeClasses: (color: TrueColor, options?: GlassChromeOptions) => string;
119
+ /**
120
+ * The secondary stop derived from a `GlassBackground` primary: a neighbouring
121
+ * hue, close enough to harmonise and far enough for the gradient to read as a
122
+ * blend rather than a fade of one colour.
123
+ *
124
+ * Typed as a full `Record` over `TrueColor`, so every tone must have a real
125
+ * partner — the maps this replaced were hand-kept and silently missed
126
+ * `fuchsia`, `yellow` and `slate`, whose gradients collapsed to two stops.
127
+ */
128
+ export declare const GLASS_BACKGROUND_SECONDARY_TONES: Record<TrueColor, TrueColor>;
129
+ /**
130
+ * The deep stop derived from a `GlassBackground` primary: the far end of the
131
+ * blend — deeper or cooler than the primary so the gradient settles instead
132
+ * of just lightening. Same full-coverage rule as the secondary map.
133
+ */
134
+ export declare const GLASS_BACKGROUND_DEEP_TONES: Record<TrueColor, TrueColor>;
135
+ /** The secondary stop derived from a primary tone. */
136
+ export declare const getGlassBackgroundSecondaryTone: (color: TrueColor) => TrueColor;
137
+ /** The deep stop derived from a primary tone. */
138
+ export declare const getGlassBackgroundDeepTone: (color: TrueColor) => TrueColor;
@@ -17,8 +17,8 @@ export declare const getRandomThemeColorValue: () => RandomThemeColorValue;
17
17
  export declare const getRandomThemeColorClass: (prefix?: "bg" | "text" | "border") => string;
18
18
  /**
19
19
  * Returns an array of `count` Tailwind color utility classes.
20
- * Uses TrueColor values in order (at intensity 500) for the first N items,
21
- * then falls back to `getRandomThemeColorClass` for any overflow.
20
+ * Uses TrueColor values in order (at intensity 500), cycling once the
21
+ * spectrum runs out, so the result is a pure function of `count`.
22
22
  *
23
23
  * @example
24
24
  * getColorPalette(5) // ['bg-red-500', 'bg-orange-500', ...]
@@ -27,8 +27,8 @@ export declare const getRandomThemeColorClass: (prefix?: "bg" | "text" | "border
27
27
  export declare const getColorPalette: (count: number, prefix?: "bg" | "text" | "border") => string[];
28
28
  /**
29
29
  * Returns an array of `count` TrueColor names (e.g. `'red'`, `'orange'`, `'blue'`).
30
- * Uses TrueColor values in order for the first N items,
31
- * then falls back to random colors from RANDOM_THEME_COLORS for overflow.
30
+ * Uses TrueColor values in order, cycling once the spectrum runs out, so the
31
+ * result is a pure function of `count`.
32
32
  * Useful when components construct their own Tailwind class strings via template literals.
33
33
  *
34
34
  * @example
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Tooltip placement with collision handling.
3
+ *
4
+ * Pure geometry, deliberately free of DOM and framework: both kits call the
5
+ * same function so a tooltip lands in the same place in React and in Vue, and
6
+ * so the interesting part — the flipping and clamping — can be tested directly
7
+ * instead of through a rendered component.
8
+ *
9
+ * What this replaces: the previous implementation clamped the tooltip
10
+ * *horizontally* and nothing else. A `top` tooltip on a trigger near the top of
11
+ * the window rendered off-screen, `left` and `right` did not exist as
12
+ * placements at all, and the caret could drift off the end of a clamped
13
+ * tooltip.
14
+ */
15
+ export declare const TOOLTIP_POSITIONS: readonly ["top", "bottom", "left", "right"];
16
+ export type TooltipPosition = (typeof TOOLTIP_POSITIONS)[number];
17
+ /** The subset of `DOMRect` this needs. */
18
+ export interface TooltipRect {
19
+ top: number;
20
+ left: number;
21
+ width: number;
22
+ height: number;
23
+ }
24
+ export interface TooltipViewport {
25
+ width: number;
26
+ height: number;
27
+ }
28
+ export interface TooltipPlacementInput {
29
+ /** The trigger's viewport-relative box. */
30
+ trigger: TooltipRect;
31
+ /** The tooltip's measured size. */
32
+ tooltip: {
33
+ width: number;
34
+ height: number;
35
+ };
36
+ viewport: TooltipViewport;
37
+ /**
38
+ * Region the tooltip must stay inside, in viewport coordinates. Defaults to
39
+ * the viewport itself.
40
+ *
41
+ * Pass a scroll container's or panel's rect to keep a tooltip within it —
42
+ * the tooltip then flips and clamps against *that* edge, which is what makes
43
+ * a bounded demo (or a tooltip inside a modal) behave the way the surrounding
44
+ * box implies it should. The boundary is intersected with the viewport, so a
45
+ * constrained tooltip still never leaves the screen.
46
+ */
47
+ boundary?: TooltipRect;
48
+ /** Preferred side. Flipped or reassigned when it does not fit. */
49
+ preferred: TooltipPosition;
50
+ /** Gap between trigger and tooltip. @default 8 */
51
+ offset?: number;
52
+ /** Minimum distance to keep from every viewport edge. @default 8 */
53
+ margin?: number;
54
+ /**
55
+ * Keeps the caret this far from the tooltip's corners, so it never sits on
56
+ * the rounded part or pokes past the end. @default 10
57
+ */
58
+ caretInset?: number;
59
+ /**
60
+ * How the box aligns along the caret axis.
61
+ *
62
+ * `"center"` (default) centres the box on the trigger — what a tooltip
63
+ * should do: it is a label and it floats over its target.
64
+ *
65
+ * `"grow"` grows the box away from the trigger, aligning the near edge
66
+ * with the trigger's near edge: it grows toward the side that has room, so
67
+ * right (left edges aligned) when the box fits there, otherwise left
68
+ * (right edges aligned). What a popover should do: the panel reads as
69
+ * anchored to the button it came from, not floating over its centre.
70
+ *
71
+ * The caret maths below are identical for both — the caret always tracks
72
+ * the trigger's centre after clamping.
73
+ */
74
+ align?: "center" | "grow";
75
+ }
76
+ export interface TooltipPlacement {
77
+ /** The side actually used — may differ from `preferred` after a flip. */
78
+ side: TooltipPosition;
79
+ /** Viewport-relative position for the tooltip box. */
80
+ left: number;
81
+ top: number;
82
+ /**
83
+ * Caret offset in px from the tooltip's leading edge, along whichever axis
84
+ * the caret slides on: x for `top`/`bottom`, y for `left`/`right`.
85
+ */
86
+ caret: number;
87
+ /** True when the preferred side could not be used. */
88
+ flipped: boolean;
89
+ }
90
+ /**
91
+ * Chooses a side: the preferred one if it fits, then its opposite, then the
92
+ * remaining two — and if nothing fits, whichever has the most room, so the
93
+ * tooltip degrades to "least bad" instead of running off the screen.
94
+ */
95
+ export declare const resolveTooltipSide: (input: TooltipPlacementInput) => {
96
+ side: TooltipPosition;
97
+ flipped: boolean;
98
+ };
99
+ /**
100
+ * Full placement: side, box position, and where the caret has to sit so it
101
+ * still points at the trigger's centre after any clamping.
102
+ */
103
+ export declare const resolveTooltipPlacement: (input: TooltipPlacementInput) => TooltipPlacement;
@@ -0,0 +1,40 @@
1
+ import type { TooltipPosition } from "./placement";
2
+ /**
3
+ * How the tooltip is painted.
4
+ *
5
+ * `surface` follows the theme — a light card in light mode, a dark one in dark
6
+ * mode. `inverted` contrasts against the page instead, which is the classic
7
+ * tooltip convention.
8
+ *
9
+ * The component used to be `bg-neutral-900 … dark:bg-neutral-700`: dark in
10
+ * *both* themes, with no light appearance at all.
11
+ */
12
+ export declare const TOOLTIP_VARIANTS: readonly ["surface", "inverted"];
13
+ export type TooltipVariant = (typeof TOOLTIP_VARIANTS)[number];
14
+ export interface TooltipVariantTokens {
15
+ /** Classes for the tooltip box, including its border. */
16
+ box: string;
17
+ /**
18
+ * Classes for the arrow. It is a rotated square sharing the box's fill and
19
+ * border, not a CSS-triangle: a triangle built from `border-*-<colour>` has
20
+ * no outline of its own, so on the light `surface` variant it was a white
21
+ * shape on a white page — invisible, which is exactly how it was reported.
22
+ */
23
+ arrow: string;
24
+ }
25
+ export declare const getTooltipVariantTokens: (variant: TooltipVariant) => TooltipVariantTokens;
26
+ /**
27
+ * Which box edge the arrow's centre sits on. `top` means the tooltip is above
28
+ * the trigger, so the arrow hangs off its bottom edge.
29
+ */
30
+ export declare const TOOLTIP_ARROW_EDGE: Record<TooltipPosition, string>;
31
+ /**
32
+ * Which two edges of the (unrotated) square keep their border.
33
+ *
34
+ * The square is rotated 45°, so its original edges face diagonally: a vector
35
+ * pointing right becomes down-right, and one pointing down becomes down-left.
36
+ * Only the two faces pointing *away* from the box are outlined — the two
37
+ * facing into it share the box's fill and vanish into it, which is what makes
38
+ * the arrow read as part of the bubble rather than a diamond stuck to it.
39
+ */
40
+ export declare const TOOLTIP_ARROW_BORDER: Record<TooltipPosition, string>;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Unified snapshot of all user-configurable table preferences.
3
+ *
4
+ * Defined here (not in a kit) because it is the persistence contract shared
5
+ * by the React and Vue kits and by the storage helpers in
6
+ * `common/utils/tableStorage.ts`. A kit's Table component re-exports it.
7
+ */
8
+ export interface TableSettings {
9
+ columnVisibility?: Record<string, boolean>;
10
+ columnWidths?: Record<string, number>;
11
+ activeView?: "table" | "panel";
12
+ groupBy?: string | null;
13
+ showGroupHeader?: boolean;
14
+ stickyColumns?: Record<string, "left" | "right">;
15
+ }
@@ -1,11 +1,81 @@
1
+ import type { TrueColor } from "../theme/Theme";
2
+ /** Whether a token expands to a plain value or an environment reference. */
1
3
  export type SmartVariableType = "var" | "env";
2
- export type SmartVariableSource = "global" | "system" | "service";
4
+ /**
5
+ * Which group a token belongs to — the middle segment of
6
+ * `{{ type::source::name }}`.
7
+ *
8
+ * An open string, not a fixed union. It used to be
9
+ * `"global" | "system" | "service"`, which hardcoded one product's taxonomy
10
+ * into the kit; the caller now names its own groups.
11
+ */
12
+ export type SmartVariableSource = string;
13
+ /** A token found in, or about to be inserted into, a value. */
3
14
  export interface SmartVariable {
4
15
  fullToken: string;
5
16
  type: SmartVariableType;
6
17
  source: SmartVariableSource;
7
18
  name: string;
19
+ label?: string;
8
20
  description?: string;
21
+ /** Concrete value, when the caller already knows it. */
22
+ value?: string;
9
23
  defaultValue?: string;
24
+ /** Masks the value in the preview. */
25
+ secret?: boolean;
10
26
  }
27
+ /**
28
+ * One variable a caller offers in the picker. Replaces the
29
+ * `CapsuleBlueprintParameter` shape the component used to require.
30
+ */
31
+ export interface SmartVariableDefinition {
32
+ /** Token name — the third segment. */
33
+ key: string;
34
+ /** Display name. Falls back to `key`. */
35
+ label?: string;
36
+ description?: string;
37
+ /** @default "var" */
38
+ type?: SmartVariableType;
39
+ /** Concrete value, if known now. */
40
+ value?: string;
41
+ defaultValue?: string;
42
+ /** Renders the resolved value masked. */
43
+ secret?: boolean;
44
+ /** Resolves to a value only at run time — shown as a distinct state. */
45
+ runtime?: boolean;
46
+ }
47
+ /** A named set of variables, rendered as one tab in the picker. */
48
+ export interface SmartVariableGroup {
49
+ /** Becomes the token's `source` segment. */
50
+ id: SmartVariableSource;
51
+ label: string;
52
+ /** Icon name from the kit's registry. */
53
+ icon?: string;
54
+ /** Accent colour for badges from this group. */
55
+ tone?: TrueColor;
56
+ variables: SmartVariableDefinition[];
57
+ /** Shown when the group is empty or filtered to nothing. */
58
+ emptyMessage?: string;
59
+ }
60
+ /**
61
+ * How a token turned out.
62
+ * - `resolved` — a concrete value is known
63
+ * - `runtime` — valid, but only gets a value when the thing actually runs
64
+ * - `missing` — no such variable, or it resolved to nothing
65
+ */
66
+ export type SmartVariableState = "resolved" | "runtime" | "missing";
67
+ export interface SmartVariableResolution {
68
+ value: string;
69
+ state: SmartVariableState;
70
+ }
71
+ /**
72
+ * Turns a token into a display value. Supplied by the caller, so product rules
73
+ * — derived values, environment lookups, runtime placeholders — live in the
74
+ * app rather than in the kit.
75
+ */
76
+ export type SmartVariableResolver = (variable: SmartVariable) => SmartVariableResolution;
77
+ /**
78
+ * @deprecated Parallels-specific sample data. Pass your own
79
+ * `SmartVariableGroup[]` instead; kept so existing call sites keep compiling.
80
+ */
11
81
  export declare const SYSTEM_VARIABLES: SmartVariable[];
@@ -0,0 +1,113 @@
1
+ import { isSameDay } from "date-fns/isSameDay";
2
+ /**
3
+ * Date mechanics for the kit's date controls (currently `DatePicker`).
4
+ *
5
+ * Framework-agnostic on purpose: the Vue port reuses this module, and keeping
6
+ * the calendar maths out of the component files means a component test fails
7
+ * on a wrong date, not on a wrong class. Formatting and parsing use
8
+ * date-fns token strings so a `format` prop is exactly what date-fns
9
+ * documents.
10
+ */
11
+ export type DatePickerSelectionMode = "single" | "range";
12
+ /**
13
+ * What a DatePicker holds.
14
+ *
15
+ * - `single` → `Date | null`
16
+ * - `range` → `[start, end | null] | null` — the second element is `null`
17
+ * while the range is still open (start picked, end not yet).
18
+ */
19
+ export type DatePickerValue = Date | [Date, Date | null] | null;
20
+ export declare const DEFAULT_DATE_FORMAT = "MMM d, yyyy";
21
+ /** Literal separator range values and range input text use. */
22
+ export declare const RANGE_SEPARATOR = " - ";
23
+ /** Sunday-first, matching `Date.getDay()`. */
24
+ export declare const WEEKDAY_LABELS: string[];
25
+ export declare const WEEKDAY_LABELS_SHORT: string[];
26
+ export declare const MONTH_NAMES: string[];
27
+ export declare const MONTH_NAMES_SHORT: string[];
28
+ /** Same calendar day (local time) — date-fns' `isSameDay` re-exported under a
29
+ * kit-facing name so callers don't need to know the library. */
30
+ export declare const isSameDayDate: typeof isSameDay;
31
+ /** `Date` instances and ISO-ish strings/numbers normalise to a fresh `Date`, or `null`. */
32
+ export declare const normalizeDate: (value: Date | string | number | null | undefined) => Date | null;
33
+ /** Local-midnight display of a date: `format(value, "EEE d MMM yyyy")` for labels. */
34
+ export declare const formatDateLabel: (value: Date) => string;
35
+ export declare const formatDate: (value: Date, formatString?: string) => string;
36
+ /** A value (or each end of a range) rendered in the input. */
37
+ export declare const formatValue: (value: DatePickerValue, formatString?: string) => string;
38
+ /**
39
+ * Localized month/weekday names for locale-aware parsing (i18n, spec §6).
40
+ * date-fns parses English-only month names, so candidates are normalised
41
+ * locale → English before parsing; all four sets are optional (a missing set
42
+ * simply is not normalised).
43
+ */
44
+ export interface DateParseNames {
45
+ monthFull?: string[];
46
+ monthShort?: string[];
47
+ weekdayFull?: string[];
48
+ weekdayShort?: string[];
49
+ }
50
+ export declare const parseDateText: (text: string, formatString?: string, reference?: Date, names?: DateParseNames) => Date | null;
51
+ /**
52
+ * Free-typed input → value. Single: one date. Range: `start - end`, where a
53
+ * missing or empty end yields an open range `[start, null]`. An end before the
54
+ * start, or an unparseable start, yields `null` (the text stays as typed and
55
+ * is flagged invalid by the caller).
56
+ */
57
+ export declare const parseValueText: (text: string, selectionMode?: DatePickerSelectionMode, formatString?: string, reference?: Date, names?: DateParseNames) => DatePickerValue | null;
58
+ export interface DateConstraints {
59
+ /** Earliest selectable day (inclusive), day-level. */
60
+ minDate?: Date | null;
61
+ /** Latest selectable day (inclusive), day-level. */
62
+ maxDate?: Date | null;
63
+ /** Weekdays that are never selectable — `getDay()` numbering, 0 = Sunday. */
64
+ disabledDays?: number[];
65
+ /** Exact dates (compared day-level) or a predicate. */
66
+ disabledDates?: Date[] | ((date: Date) => boolean) | null;
67
+ }
68
+ /** Whether a calendar day may be picked, under the given constraints. */
69
+ export declare const isDateSelectable: (date: Date, constraints?: DateConstraints) => boolean;
70
+ export interface DayCell {
71
+ date: Date;
72
+ /** Day of month — the number drawn in the cell. */
73
+ day: number;
74
+ /** Day belongs to a neighbouring month (leading/trailing filler). */
75
+ otherMonth: boolean;
76
+ /** Day is today. */
77
+ today: boolean;
78
+ /** Passes the constraints AND is allowed by `selectOtherMonths`. */
79
+ selectable: boolean;
80
+ }
81
+ /**
82
+ * A full 6×7 month grid — always 42 cells.
83
+ *
84
+ * Other-month days fill the leading and trailing slots, so the panel's height
85
+ * never changes from month to month. PrimeVue renders 4–6 rows instead and the
86
+ * overlay resizes mid-animation; a fixed grid is the only shape the open/close
87
+ * motion can rely on.
88
+ */
89
+ export declare const buildMonthGrid: (year: number, month: number, options?: {
90
+ weekStartsOn?: 0 | 1;
91
+ constraints?: DateConstraints;
92
+ today?: Date;
93
+ selectOtherMonths?: boolean;
94
+ }) => DayCell[];
95
+ /** Days in the given (0-based) month. */
96
+ export declare const getDaysInMonth: (year: number, month: number) => number;
97
+ /** Month arithmetic with date-fns' end-of-month clamping (Jan 31 + 1m → Feb 28/29). */
98
+ export declare const addMonthsToDate: (date: Date, amount: number) => Date;
99
+ export declare const addYearsToDate: (date: Date, amount: number) => Date;
100
+ /** Day-level `a < b` — the comparison the range model makes everywhere. */
101
+ export declare const isBeforeDay: (a: Date, b: Date) => boolean;
102
+ /** Inclusive, day-level `start <= date <= end`. */
103
+ export declare const isDateBetween: (start: Date, end: Date, date: Date) => boolean;
104
+ /** The decade a year view covers: `2025` → `[2020, 2029]`. */
105
+ export declare const getDecadeRange: (year: number) => [number, number];
106
+ /**
107
+ * Which month the calendar should show for a value — PrimeVue's `viewDate`
108
+ * rule: single → the date, range → the start, empty → today clamped into the
109
+ * constraint range (so an out-of-bounds "today" does not open on a dead month).
110
+ */
111
+ export declare const getViewDate: (value: DatePickerValue, constraints?: DateConstraints) => Date;
112
+ /** `true` when nothing is selected (single: `null`; range: start unset). */
113
+ export declare const isValueEmpty: (value: DatePickerValue | [Date | null, Date | null]) => boolean;
@@ -1,11 +1 @@
1
- /**
2
- * Returns a Gravatar URL for the given email.
3
- *
4
- * @param email - The user's email address.
5
- * @param size - Image size in pixels (default 200).
6
- * @param defaultImage - Gravatar fallback when no image exists.
7
- * Common values: `'404'` (return HTTP 404), `'mp'` (mystery-person silhouette),
8
- * `'identicon'` (geometric pattern), `'retro'` (8-bit style).
9
- * Defaults to `'mp'` so a valid image is always returned.
10
- */
11
1
  export declare const getGravatarUrl: (email: string, size?: number, defaultImage?: string) => string;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * A best-effort `Storage` wrapper, shared by every component that persists
3
+ * settings of its own.
4
+ *
5
+ * It swallows quota errors, private-mode rejections and SSR (no `window`), so
6
+ * persistence can never crash a render. Any `Storage`-shaped object
7
+ * (sessionStorage, a test double, an IndexedDB adapter) can be passed in its
8
+ * place.
9
+ *
10
+ * This was `Table`'s alone. `SmartGridLayout` needs the identical thing, and a
11
+ * second copy of "degrade instead of throwing" logic is a second chance to get
12
+ * one of the failure modes wrong.
13
+ */
14
+ /** The subset of `Storage` these components actually use. */
15
+ export interface KitStorageAdapter {
16
+ getItem(key: string): string | null;
17
+ setItem(key: string, value: string): void;
18
+ removeItem(key: string): void;
19
+ }
20
+ /**
21
+ * Resolves `localStorage` lazily *inside* each call's try/catch: access itself
22
+ * throws in some blocked-storage configurations, so resolving once up front
23
+ * would break the module rather than the call.
24
+ */
25
+ export declare const createSafeLocalStorage: () => KitStorageAdapter;
26
+ /** Namespaced key, so component entries never collide with app keys. */
27
+ export declare const buildStorageKey: (prefix: string, key: string) => string;
28
+ export declare const isRecord: (value: unknown) => value is Record<string, unknown>;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Conservative SVG sanitiser.
3
+ *
4
+ * `DynamicImg` injects caller-supplied SVG with `dangerouslySetInnerHTML` /
5
+ * `v-html`. SVG is not an inert image format — it can carry `<script>`, `on*`
6
+ * event attributes, `<foreignObject>` holding arbitrary HTML, SMIL animations
7
+ * that set event handlers, and `<image>`/`href` pointing at a remote URL. A
8
+ * "dynamic image" is by definition data the app did not author, so every one
9
+ * of those is a live stored-XSS or exfiltration vector.
10
+ *
11
+ * This walks the parsed document and rebuilds it from an allowlist: anything
12
+ * not named here is dropped. An allowlist fails closed — an unknown element or
13
+ * attribute is discarded rather than passed through.
14
+ */
15
+ export interface SanitizeSvgOptions {
16
+ /**
17
+ * Replaces every fill that is not `none`. `none` is left alone — recolouring
18
+ * it turns an outline-only shape into a solid blob.
19
+ */
20
+ fill?: string;
21
+ /** Replaces every stroke that is not `none`. */
22
+ stroke?: string;
23
+ }
24
+ /**
25
+ * Returns sanitised `<svg>` markup, or `null` when the input is not an SVG or
26
+ * cannot be parsed. Callers must treat `null` as "show the fallback" — never
27
+ * as "render the original".
28
+ */
29
+ export declare const sanitizeSvg: (markup: string, options?: SanitizeSvgOptions) => string | null;
30
+ export interface ParsedImageSource {
31
+ kind: "svg" | "raster";
32
+ /** The original data URL, for the raster case. */
33
+ src: string;
34
+ /** Decoded markup, for the SVG case. */
35
+ markup?: string;
36
+ }
37
+ /**
38
+ * Works out what a caller handed over: a raster data URL, an SVG data URL
39
+ * (base64 or URL-encoded), or raw `<svg>` markup.
40
+ *
41
+ * The old check was `base64.includes("data:image/png;base64,")` — `includes`,
42
+ * not `startsWith`, so the marker only had to appear *somewhere* in the string.
43
+ */
44
+ export declare const parseImageSource: (value: string) => ParsedImageSource | null;