@harborclient/sdk 1.0.29 → 1.0.30

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 (195) hide show
  1. package/dist/build/index.d.ts.map +1 -1
  2. package/dist/build/index.js +1 -1
  3. package/dist/components/AsyncListState/ErrorRetry.d.ts +21 -0
  4. package/dist/components/AsyncListState/ErrorRetry.d.ts.map +1 -0
  5. package/dist/components/AsyncListState/ErrorRetry.js +10 -0
  6. package/dist/components/AsyncListState/LoadingMessage.d.ts +13 -0
  7. package/dist/components/AsyncListState/LoadingMessage.d.ts.map +1 -0
  8. package/dist/components/AsyncListState/LoadingMessage.js +8 -0
  9. package/dist/components/AsyncListState/index.d.ts +4 -50
  10. package/dist/components/AsyncListState/index.d.ts.map +1 -1
  11. package/dist/components/AsyncListState/index.js +5 -31
  12. package/dist/components/Autocomplete/AutocompleteInput.d.ts +2 -4
  13. package/dist/components/Autocomplete/AutocompleteInput.d.ts.map +1 -1
  14. package/dist/components/Autocomplete/AutocompleteInput.js +2 -1
  15. package/dist/components/Autocomplete/SuggestionList.d.ts +3 -7
  16. package/dist/components/Autocomplete/SuggestionList.d.ts.map +1 -1
  17. package/dist/components/Autocomplete/SuggestionList.js +3 -4
  18. package/dist/components/BackButton/index.d.ts +3 -16
  19. package/dist/components/BackButton/index.d.ts.map +1 -1
  20. package/dist/components/BackButton/index.js +4 -10
  21. package/dist/components/Badge/index.d.ts +3 -11
  22. package/dist/components/Badge/index.d.ts.map +1 -1
  23. package/dist/components/Badge/index.js +3 -9
  24. package/dist/components/BusyIndicator/index.js +1 -1
  25. package/dist/components/Button/index.d.ts +2 -6
  26. package/dist/components/Button/index.d.ts.map +1 -1
  27. package/dist/components/Button/index.js +9 -15
  28. package/dist/components/Card/Body.d.ts +12 -0
  29. package/dist/components/Card/Body.d.ts.map +1 -0
  30. package/dist/components/Card/Body.js +8 -0
  31. package/dist/components/Card/Image.d.ts +8 -0
  32. package/dist/components/Card/Image.d.ts.map +1 -0
  33. package/dist/components/Card/Image.js +8 -0
  34. package/dist/components/Card/index.d.ts +16 -0
  35. package/dist/components/Card/index.d.ts.map +1 -0
  36. package/dist/components/Card/index.js +13 -0
  37. package/dist/components/CodeEditor/index.d.ts +3 -7
  38. package/dist/components/CodeEditor/index.d.ts.map +1 -1
  39. package/dist/components/CodeEditor/index.js +5 -50
  40. package/dist/components/CodeEditor/renderHighlightedPlaceholder.d.ts.map +1 -1
  41. package/dist/components/CodeEditor/slashCommandHighlighter.d.ts.map +1 -1
  42. package/dist/components/CodeEditor/syntaxHighlightedPlaceholder.d.ts.map +1 -1
  43. package/dist/components/EmptyState/index.d.ts +3 -11
  44. package/dist/components/EmptyState/index.d.ts.map +1 -1
  45. package/dist/components/EmptyState/index.js +3 -9
  46. package/dist/components/FaIcon/index.d.ts +3 -10
  47. package/dist/components/FaIcon/index.d.ts.map +1 -1
  48. package/dist/components/FaIcon/index.js +5 -4
  49. package/dist/components/FieldError/index.d.ts +3 -17
  50. package/dist/components/FieldError/index.d.ts.map +1 -1
  51. package/dist/components/FieldError/index.js +3 -11
  52. package/dist/components/FooterButton/index.d.ts +3 -11
  53. package/dist/components/FooterButton/index.d.ts.map +1 -1
  54. package/dist/components/FooterButton/index.js +3 -7
  55. package/dist/components/FooterIcon/index.d.ts +3 -11
  56. package/dist/components/FooterIcon/index.d.ts.map +1 -1
  57. package/dist/components/FooterIcon/index.js +3 -7
  58. package/dist/components/FormDataEditor/index.d.ts +0 -2
  59. package/dist/components/FormDataEditor/index.d.ts.map +1 -1
  60. package/dist/components/FormDataEditor/index.js +2 -12
  61. package/dist/components/FormGroup/index.d.ts +3 -16
  62. package/dist/components/FormGroup/index.d.ts.map +1 -1
  63. package/dist/components/FormGroup/index.js +4 -20
  64. package/dist/components/KeyValueEditor/index.d.ts +0 -2
  65. package/dist/components/KeyValueEditor/index.d.ts.map +1 -1
  66. package/dist/components/KeyValueEditor/index.js +1 -8
  67. package/dist/components/MethodSelect/index.d.ts +3 -5
  68. package/dist/components/MethodSelect/index.d.ts.map +1 -1
  69. package/dist/components/MethodSelect/index.js +3 -2
  70. package/dist/components/Modal/ModalFooter.d.ts +3 -11
  71. package/dist/components/Modal/ModalFooter.d.ts.map +1 -1
  72. package/dist/components/Modal/ModalFooter.js +3 -10
  73. package/dist/components/Modal/ModalFormLayout.d.ts +0 -5
  74. package/dist/components/Modal/ModalFormLayout.d.ts.map +1 -1
  75. package/dist/components/Modal/ModalFormLayout.js +0 -5
  76. package/dist/components/Modal/ModalHeader.d.ts +3 -3
  77. package/dist/components/Modal/ModalHeader.d.ts.map +1 -1
  78. package/dist/components/Modal/ModalHeader.js +3 -2
  79. package/dist/components/Modal/index.d.ts +3 -3
  80. package/dist/components/Modal/index.d.ts.map +1 -1
  81. package/dist/components/Modal/index.js +6 -7
  82. package/dist/components/OverlayCloseButton/index.d.ts +3 -11
  83. package/dist/components/OverlayCloseButton/index.d.ts.map +1 -1
  84. package/dist/components/OverlayCloseButton/index.js +3 -9
  85. package/dist/components/Page/index.d.ts +3 -3
  86. package/dist/components/Page/index.d.ts.map +1 -1
  87. package/dist/components/Page/index.js +4 -7
  88. package/dist/components/PageHeader/index.d.ts +3 -7
  89. package/dist/components/PageHeader/index.d.ts.map +1 -1
  90. package/dist/components/PageHeader/index.js +3 -5
  91. package/dist/components/PageSidebar/index.d.ts +3 -5
  92. package/dist/components/PageSidebar/index.d.ts.map +1 -1
  93. package/dist/components/PageSidebar/index.js +4 -5
  94. package/dist/components/PanelCloseButton/index.d.ts +5 -14
  95. package/dist/components/PanelCloseButton/index.d.ts.map +1 -1
  96. package/dist/components/PanelCloseButton/index.js +4 -12
  97. package/dist/components/Resizable/Resizable.d.ts +3 -3
  98. package/dist/components/Resizable/Resizable.d.ts.map +1 -1
  99. package/dist/components/Resizable/Resizable.js +6 -5
  100. package/dist/components/Resizable/ResizeHandle.d.ts +3 -7
  101. package/dist/components/Resizable/ResizeHandle.d.ts.map +1 -1
  102. package/dist/components/Resizable/ResizeHandle.js +4 -10
  103. package/dist/components/ResourceList/ResourceListEmptyItem.d.ts +13 -0
  104. package/dist/components/ResourceList/ResourceListEmptyItem.d.ts.map +1 -0
  105. package/dist/components/ResourceList/ResourceListEmptyItem.js +8 -0
  106. package/dist/components/ResourceList/ResourceListPrimary.d.ts +13 -0
  107. package/dist/components/ResourceList/ResourceListPrimary.d.ts.map +1 -0
  108. package/dist/components/ResourceList/ResourceListPrimary.js +8 -0
  109. package/dist/components/ResourceList/ResourceListRow.d.ts +29 -0
  110. package/dist/components/ResourceList/ResourceListRow.d.ts.map +1 -0
  111. package/dist/components/ResourceList/ResourceListRow.js +8 -0
  112. package/dist/components/ResourceList/index.d.ts +6 -74
  113. package/dist/components/ResourceList/index.d.ts.map +1 -1
  114. package/dist/components/ResourceList/index.js +7 -42
  115. package/dist/components/RowActionsMenu/index.d.ts +3 -5
  116. package/dist/components/RowActionsMenu/index.d.ts.map +1 -1
  117. package/dist/components/RowActionsMenu/index.js +6 -16
  118. package/dist/components/SegmentedTabs/SegmentedTabPanel.d.ts +3 -7
  119. package/dist/components/SegmentedTabs/SegmentedTabPanel.d.ts.map +1 -1
  120. package/dist/components/SegmentedTabs/SegmentedTabPanel.js +3 -4
  121. package/dist/components/SegmentedTabs/SegmentedTabsGroup.d.ts +0 -2
  122. package/dist/components/SegmentedTabs/SegmentedTabsGroup.d.ts.map +1 -1
  123. package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.d.ts +0 -2
  124. package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.d.ts.map +1 -1
  125. package/dist/components/SegmentedTabs/SegmentedTabsVisibilityMenu.js +5 -13
  126. package/dist/components/SegmentedTabs/index.d.ts +3 -7
  127. package/dist/components/SegmentedTabs/index.d.ts.map +1 -1
  128. package/dist/components/SegmentedTabs/index.js +7 -28
  129. package/dist/components/SidebarLayout/index.d.ts +3 -7
  130. package/dist/components/SidebarLayout/index.d.ts.map +1 -1
  131. package/dist/components/SidebarLayout/index.js +3 -5
  132. package/dist/components/Spinner/index.d.ts +3 -11
  133. package/dist/components/Spinner/index.d.ts.map +1 -1
  134. package/dist/components/Spinner/index.js +3 -9
  135. package/dist/components/StatusMessage/index.d.ts +3 -15
  136. package/dist/components/StatusMessage/index.d.ts.map +1 -1
  137. package/dist/components/StatusMessage/index.js +3 -8
  138. package/dist/components/TabCloseButton/index.d.ts +4 -14
  139. package/dist/components/TabCloseButton/index.d.ts.map +1 -1
  140. package/dist/components/TabCloseButton/index.js +3 -7
  141. package/dist/components/Table/TableBody.d.ts +13 -0
  142. package/dist/components/Table/TableBody.d.ts.map +1 -0
  143. package/dist/components/Table/TableBody.js +11 -0
  144. package/dist/components/Table/TableCell.d.ts +8 -0
  145. package/dist/components/Table/TableCell.d.ts.map +1 -0
  146. package/dist/components/Table/TableCell.js +11 -0
  147. package/dist/components/Table/TableContext.d.ts +22 -0
  148. package/dist/components/Table/TableContext.d.ts.map +1 -0
  149. package/dist/components/Table/TableContext.js +18 -0
  150. package/dist/components/Table/TableHead.d.ts +8 -0
  151. package/dist/components/Table/TableHead.d.ts.map +1 -0
  152. package/dist/components/Table/TableHead.js +11 -0
  153. package/dist/components/Table/TableHeader.d.ts +13 -0
  154. package/dist/components/Table/TableHeader.d.ts.map +1 -0
  155. package/dist/components/Table/TableHeader.js +8 -0
  156. package/dist/components/Table/index.d.ts +10 -86
  157. package/dist/components/Table/index.d.ts.map +1 -1
  158. package/dist/components/Table/index.js +17 -94
  159. package/dist/components/Toolbar/index.d.ts +3 -11
  160. package/dist/components/Toolbar/index.d.ts.map +1 -1
  161. package/dist/components/Toolbar/index.js +3 -11
  162. package/dist/components/VariableInput/index.d.ts +3 -5
  163. package/dist/components/VariableInput/index.d.ts.map +1 -1
  164. package/dist/components/VariableInput/index.js +6 -17
  165. package/dist/components/VariableTable/index.d.ts +3 -3
  166. package/dist/components/VariableTable/index.d.ts.map +1 -1
  167. package/dist/components/VariableTable/index.js +5 -9
  168. package/dist/components/forms/Checkbox.d.ts +2 -2
  169. package/dist/components/forms/Checkbox.d.ts.map +1 -1
  170. package/dist/components/forms/Checkbox.js +2 -4
  171. package/dist/components/forms/Input.d.ts +2 -2
  172. package/dist/components/forms/Input.d.ts.map +1 -1
  173. package/dist/components/forms/Radio.d.ts +2 -2
  174. package/dist/components/forms/Radio.d.ts.map +1 -1
  175. package/dist/components/forms/Radio.js +2 -4
  176. package/dist/components/forms/Select.d.ts +2 -2
  177. package/dist/components/forms/Select.d.ts.map +1 -1
  178. package/dist/components/forms/Textarea.d.ts +2 -2
  179. package/dist/components/forms/Textarea.d.ts.map +1 -1
  180. package/dist/components/forms/classes.d.ts +0 -3
  181. package/dist/components/forms/classes.d.ts.map +1 -1
  182. package/dist/components/forms/classes.js +3 -9
  183. package/dist/components/index.d.ts +1 -0
  184. package/dist/components/index.d.ts.map +1 -1
  185. package/dist/components/index.js +1 -0
  186. package/dist/components/utils.d.ts +8 -0
  187. package/dist/components/utils.d.ts.map +1 -1
  188. package/dist/components/utils.js +11 -0
  189. package/dist/runtime/createBridgedPluginContext.js +1 -1
  190. package/dist/runtime/index.js +1 -1
  191. package/dist/runtime/react.d.ts +2 -2
  192. package/dist/runtime/view-host/index.js +1 -1
  193. package/dist/runtime/viewHost.js +1 -1
  194. package/dist/signing/inventory.js +1 -1
  195. package/package.json +7 -3
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ import { Body } from './Body.js';
4
+ import { Image } from './Image.js';
5
+ /**
6
+ * Renders a card with an image, title, and description.
7
+ */
8
+ export function Card({ children, className, ...props }) {
9
+ const classes = cn('hc-card flex h-full min-w-0 flex-col overflow-hidden rounded-md border border-separator bg-control', className);
10
+ return (_jsx("div", { ...props, className: classes, children: children }));
11
+ }
12
+ Card.Body = Body;
13
+ Card.Image = Image;
@@ -1,5 +1,5 @@
1
1
  import { type CompletionSource } from '@codemirror/autocomplete';
2
- import type { JSX } from 'react';
2
+ import type { ComponentPropsWithoutRef, JSX } from 'react';
3
3
  import type { CodeEditorSetup, CodeEditorTheme, Variable } from '../../types.js';
4
4
  export { CODE_EDITOR_THEME_OPTIONS } from './themes.js';
5
5
  export type CodeEditorLanguage = 'json' | 'text' | 'javascript' | 'shell';
@@ -92,15 +92,13 @@ export interface CodeEditorViewState {
92
92
  */
93
93
  selection: CodeEditorSelectionRange;
94
94
  }
95
- export interface Props {
95
+ export interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'onChange' | 'className' | 'id' | 'aria-label' | 'aria-labelledby' | 'aria-invalid' | 'aria-describedby' | 'style'> {
96
96
  /**
97
97
  * Editor content.
98
98
  */
99
99
  value: string;
100
100
  /**
101
101
  * Called when the user edits the content; omitted for read-only views.
102
- *
103
- * @param value - Updated editor content.
104
102
  */
105
103
  onChange?: (value: string) => void;
106
104
  /**
@@ -134,8 +132,6 @@ export interface Props {
134
132
  height?: string;
135
133
  /**
136
134
  * Called when the wrapper height changes (for example after native resize-y drag).
137
- *
138
- * @param heightPx - Observed wrapper height rounded to the nearest pixel.
139
135
  */
140
136
  onHeightChange?: (heightPx: number) => void;
141
137
  /**
@@ -218,5 +214,5 @@ export interface Props {
218
214
  * Styling relies on host CSS variables (`--mac-*`, `--font-mono`) and the `.app-no-drag`
219
215
  * class defined in HarborClient `styles.css`.
220
216
  */
221
- export declare function CodeEditor({ value, onChange, language, readOnly, editable, placeholder, placeholderHighlight, minHeight, height, onHeightChange, initialScrollTop, initialSelection, onViewStateChange, className, variables, onEditVariable, completionSource, slashCommands, onSlashCommand, lint, themeOverride, setupOverride, fontSize, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy }: Props): JSX.Element;
217
+ export declare function CodeEditor({ value, onChange, language, readOnly, editable, placeholder, placeholderHighlight, minHeight, height, onHeightChange, initialScrollTop, initialSelection, onViewStateChange, className, variables, onEditVariable, completionSource, slashCommands, onSlashCommand, lint, themeOverride, setupOverride, fontSize, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, ...props }: Props): JSX.Element;
222
218
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AA0BlG,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAUjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,qBAAqB,CAAC;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EAAE,gBAAgB,CAAC;IAEpC;;OAEG;IACH,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAEzC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAE3D;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;IAE5C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAyXD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAiB,EACjB,QAAgB,EAChB,QAAQ,EACR,WAAW,EACX,oBAA4B,EAC5B,SAAmB,EACnB,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,SAAc,EACd,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,IAAW,EACX,aAAa,EACb,aAAa,EACb,QAAQ,EACR,EAAE,EACF,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,cAAc,EAAE,WAAW,EAC3B,kBAAkB,EAAE,eAAe,EACpC,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAwdrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,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,CAAC,OAAO,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAE3D;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;IAE5C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AA+UD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAiB,EACjB,QAAgB,EAChB,QAAQ,EACR,WAAW,EACX,oBAA4B,EAC5B,SAAmB,EACnB,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,SAAc,EACd,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,IAAW,EACX,aAAa,EACb,aAAa,EACb,QAAQ,EACR,EAAE,EACF,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,cAAc,EAAE,WAAW,EAC3B,kBAAkB,EAAE,eAAe,EACnC,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAqdrB"}
@@ -6,10 +6,10 @@ import { StreamLanguage } from '@codemirror/language';
6
6
  import { shell } from '@codemirror/legacy-modes/mode/shell';
7
7
  import { Prec } from '@codemirror/state';
8
8
  import { Decoration, EditorView, MatchDecorator, ViewPlugin, hoverTooltip, keymap } from '@codemirror/view';
9
+ import { createElement, useCallback, useEffect, useId, useMemo, useRef, useState } from '@harborclient/sdk/react';
9
10
  import CodeMirrorImport from '@uiw/react-codemirror';
10
- import { useCallback, useEffect, useId, useMemo, useRef, useState, createElement } from '@harborclient/sdk/react';
11
- import { getVariableTooltipContent, VARIABLE_NAME_CHARS } from '../../variables/index.js';
12
11
  import { normalizeCodeEditorFontSize } from '../../ui/codeEditorSettings.js';
12
+ import { VARIABLE_NAME_CHARS, getVariableTooltipContent } from '../../variables/index.js';
13
13
  import { useCodeEditorConfig } from './config.js';
14
14
  import { createBuiltInSyntaxHighlighting, createEditorTheme } from './editorChrome.js';
15
15
  import { createSlashCommandHighlighter } from './slashCommandHighlighter.js';
@@ -20,8 +20,6 @@ export { CODE_EDITOR_THEME_OPTIONS } from './themes.js';
20
20
  /**
21
21
  * Clamps selection offsets to the current document length.
22
22
  *
23
- * @param docLength - Current document length in characters.
24
- * @param selection - Selection offsets to clamp.
25
23
  * @returns Offsets safe to dispatch into CodeMirror.
26
24
  */
27
25
  function clampSelection(docLength, selection) {
@@ -41,16 +39,12 @@ const variableHighlighter = ViewPlugin.fromClass(class {
41
39
  decorations;
42
40
  /**
43
41
  * Builds the initial {{variable}} decoration set for the editor view.
44
- *
45
- * @param view - CodeMirror editor view instance.
46
42
  */
47
43
  constructor(view) {
48
44
  this.decorations = variableMatcher.createDeco(view);
49
45
  }
50
46
  /**
51
47
  * Recomputes decorations when document content or viewport changes.
52
- *
53
- * @param update - View update describing what changed.
54
48
  */
55
49
  update(update) {
56
50
  this.decorations = variableMatcher.updateDeco(update, this.decorations);
@@ -60,11 +54,6 @@ const variableHighlighter = ViewPlugin.fromClass(class {
60
54
  const SLASH_COMMAND_LINE_PATTERN = /^(\s*)\/(\w+)(?:[ \t]+(.*))?$/;
61
55
  /**
62
56
  * Returns a parsed slash command on a line when the name is registered.
63
- *
64
- * @param lineText - Full line text without the trailing newline.
65
- * @param lineFrom - Document offset of the line start.
66
- * @param lineNumber - 1-based line number.
67
- * @param commands - Registered slash commands.
68
57
  */
69
58
  function parseSlashCommandLine(lineText, lineFrom, lineNumber, commands) {
70
59
  const match = lineText.match(SLASH_COMMAND_LINE_PATTERN);
@@ -89,14 +78,10 @@ function parseSlashCommandLine(lineText, lineFrom, lineNumber, commands) {
89
78
  }
90
79
  /**
91
80
  * Builds a CodeMirror completion source for registered slash commands at line start.
92
- *
93
- * @param commands - Slash commands to offer after `/`.
94
81
  */
95
82
  function createSlashCommandCompletionSource(commands) {
96
83
  /**
97
84
  * Returns slash command completions when the caret follows `/` at line start.
98
- *
99
- * @param context - CodeMirror completion context at the cursor.
100
85
  */
101
86
  return (context) => {
102
87
  const word = context.matchBefore(/^\s*\/\w*/);
@@ -120,9 +105,6 @@ function createSlashCommandCompletionSource(commands) {
120
105
  }
121
106
  /**
122
107
  * Returns an Enter keymap that triggers registered slash commands before default newline handling.
123
- *
124
- * @param commands - Slash commands to recognize.
125
- * @param onSlashCommand - Host callback invoked with parsed trigger details.
126
108
  */
127
109
  function slashCommandEnterHandler(commands, onSlashCommand) {
128
110
  return Prec.highest(keymap.of([
@@ -130,8 +112,6 @@ function slashCommandEnterHandler(commands, onSlashCommand) {
130
112
  key: 'Enter',
131
113
  /**
132
114
  * Opens host slash-command UI when Enter is pressed on a complete command line.
133
- *
134
- * @param view - CodeMirror editor view instance.
135
115
  */
136
116
  run: (view) => {
137
117
  const pos = view.state.selection.main.head;
@@ -163,8 +143,6 @@ function slashCommandEnterHandler(commands, onSlashCommand) {
163
143
  /**
164
144
  * Finds the {{variable}} token at a document position, if any.
165
145
  *
166
- * @param doc - CodeMirror document.
167
- * @param pos - Character position in the document.
168
146
  * @returns Variable key and token range, or null when not inside a token.
169
147
  */
170
148
  function findVariableAtPos(doc, pos) {
@@ -181,10 +159,6 @@ function findVariableAtPos(doc, pos) {
181
159
  }
182
160
  /**
183
161
  * Builds DOM content for a variable tooltip.
184
- *
185
- * @param key - Variable name from the token.
186
- * @param variables - Collection-scoped variables for resolution.
187
- * @param onEditVariable - Optional callback to open collection settings.
188
162
  */
189
163
  function buildVariableTooltipDom(key, variables, onEditVariable) {
190
164
  const content = getVariableTooltipContent(key, variables);
@@ -213,7 +187,6 @@ function buildVariableTooltipDom(key, variables, onEditVariable) {
213
187
  /**
214
188
  * Joins non-empty element ids into a space-separated `aria-describedby` value.
215
189
  *
216
- * @param ids - Candidate element ids.
217
190
  * @returns Merged id string, or undefined when no ids are provided.
218
191
  */
219
192
  function mergeDescribedBy(...ids) {
@@ -222,10 +195,6 @@ function mergeDescribedBy(...ids) {
222
195
  }
223
196
  /**
224
197
  * Sets or clears `aria-describedby` on the CodeMirror content element.
225
- *
226
- * @param content - Editable `.cm-content` element.
227
- * @param getValidationDescribedBy - Returns validation/helper ids from props.
228
- * @param tooltipId - Optional variable tooltip id to include while visible.
229
198
  */
230
199
  function setContentDescribedBy(content, getValidationDescribedBy, tooltipId) {
231
200
  if (!content)
@@ -240,10 +209,6 @@ function setContentDescribedBy(content, getValidationDescribedBy, tooltipId) {
240
209
  }
241
210
  /**
242
211
  * Shows a keyboard-driven tooltip when the caret moves inside a {{variable}} token.
243
- *
244
- * @param tooltipId - Stable id referenced by `aria-describedby`.
245
- * @param onTooltipChange - Callback invoked when tooltip visibility or position changes.
246
- * @param getValidationDescribedBy - Returns validation/helper ids from editor props.
247
212
  */
248
213
  function variableSelectionTooltip(tooltipId, onTooltipChange, getValidationDescribedBy) {
249
214
  return EditorView.updateListener.of((update) => {
@@ -273,10 +238,6 @@ function variableSelectionTooltip(tooltipId, onTooltipChange, getValidationDescr
273
238
  }
274
239
  /**
275
240
  * Dismisses the keyboard tooltip when Escape is pressed.
276
- *
277
- * @param isOpen - Returns whether the keyboard tooltip is currently visible.
278
- * @param onDismiss - Called to hide the keyboard tooltip.
279
- * @param getValidationDescribedBy - Returns validation/helper ids from editor props.
280
241
  */
281
242
  function variableTooltipEscapeHandler(isOpen, onDismiss, getValidationDescribedBy) {
282
243
  return EditorView.domEventHandlers({
@@ -293,9 +254,6 @@ function variableTooltipEscapeHandler(isOpen, onDismiss, getValidationDescribedB
293
254
  }
294
255
  /**
295
256
  * Builds a hover tooltip extension for {{variable}} tokens.
296
- *
297
- * @param getVariables - Returns the current collection-scoped variables.
298
- * @param getOnEditVariable - Returns the optional edit callback.
299
257
  */
300
258
  function variableTooltip(getVariables, getOnEditVariable) {
301
259
  return hoverTooltip((view, pos) => {
@@ -322,7 +280,7 @@ const RESIZE_GRIP_PX = 16;
322
280
  * Styling relies on host CSS variables (`--mac-*`, `--font-mono`) and the `.app-no-drag`
323
281
  * class defined in HarborClient `styles.css`.
324
282
  */
325
- export function CodeEditor({ value, onChange, language = 'text', readOnly = false, editable, placeholder, placeholderHighlight = false, minHeight = '144px', height, onHeightChange, initialScrollTop, initialSelection, onViewStateChange, className = '', variables, onEditVariable, completionSource, slashCommands, onSlashCommand, lint = true, themeOverride, setupOverride, fontSize, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy }) {
283
+ export function CodeEditor({ value, onChange, language = 'text', readOnly = false, editable, placeholder, placeholderHighlight = false, minHeight = '144px', height, onHeightChange, initialScrollTop, initialSelection, onViewStateChange, className = '', variables, onEditVariable, completionSource, slashCommands, onSlashCommand, lint = true, themeOverride, setupOverride, fontSize, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, ...props }) {
326
284
  const config = useCodeEditorConfig();
327
285
  const resolvedTheme = themeOverride ?? config.theme;
328
286
  const resolvedSetup = setupOverride ?? (readOnly ? null : config.setup);
@@ -367,7 +325,6 @@ export function CodeEditor({ value, onChange, language = 'text', readOnly = fals
367
325
  /**
368
326
  * Reads the current scroll and selection snapshot from an editor view.
369
327
  *
370
- * @param view - Live CodeMirror view.
371
328
  * @returns Rounded scroll offset and selection offsets.
372
329
  */
373
330
  const readViewState = useCallback((view) => {
@@ -455,8 +412,6 @@ export function CodeEditor({ value, onChange, language = 'text', readOnly = fals
455
412
  }
456
413
  /**
457
414
  * Marks resize drags that begin on the native bottom-right grip.
458
- *
459
- * @param event - Pointer down on the editor wrapper.
460
415
  */
461
416
  const handlePointerDown = (event) => {
462
417
  const rect = wrapper.getBoundingClientRect();
@@ -686,7 +641,7 @@ export function CodeEditor({ value, onChange, language = 'text', readOnly = fals
686
641
  : null;
687
642
  const wrapperStyle = height ? { height } : undefined;
688
643
  const shouldTrackViewState = onViewStateChange != null || initialScrollTop != null || initialSelection != null;
689
- return (_jsxs("div", { ref: wrapperRef, className: wrapperClassName, style: wrapperStyle, children: [createElement(CodeMirrorImport, {
644
+ return (_jsxs("div", { ref: wrapperRef, ...props, className: wrapperClassName, style: wrapperStyle, children: [createElement(CodeMirrorImport, {
690
645
  value,
691
646
  onChange: readOnly ? undefined : stableOnChange,
692
647
  extensions,
@@ -698,7 +653,7 @@ export function CodeEditor({ value, onChange, language = 'text', readOnly = fals
698
653
  ...(height ? { height: '100%' } : {}),
699
654
  basicSetup,
700
655
  ...(shouldTrackViewState ? { onCreateEditor: stableOnCreateEditor } : {})
701
- }), selectionTooltip && selectionTooltipContent && variables ? (_jsxs("div", { id: tooltipId, role: "tooltip", className: "hc-code-editor-tooltip pointer-events-auto fixed z-50 flex max-w-sm -translate-x-1/2 -translate-y-full flex-col gap-1.5 rounded-lg border border-separator bg-surface px-3 py-2 text-[14px] text-text shadow-md app-no-drag", style: { top: selectionTooltip.top - 4, left: selectionTooltip.left }, children: [_jsx("span", { className: selectionTooltipContent.muted
656
+ }), selectionTooltip && selectionTooltipContent && variables ? (_jsxs("div", { id: tooltipId, role: "tooltip", className: "hc-code-editor-tooltip app-no-drag pointer-events-auto fixed z-50 flex max-w-sm -translate-x-1/2 -translate-y-full flex-col gap-1.5 rounded-lg border border-separator bg-surface px-3 py-2 text-[14px] text-text shadow-md", style: { top: selectionTooltip.top - 4, left: selectionTooltip.left }, children: [_jsx("span", { className: selectionTooltipContent.muted
702
657
  ? 'hc-code-editor-tooltip-text text-muted'
703
658
  : 'hc-code-editor-tooltip-text', children: selectionTooltipContent.text }), onEditVariable ? (_jsx("button", { type: "button", className: "hc-code-editor-tooltip-edit self-start text-[14px] text-accent hover:underline", "aria-label": `Edit value for ${selectionTooltip.key}`, onMouseDown: (event) => {
704
659
  event.preventDefault();
@@ -1 +1 @@
1
- {"version":3,"file":"renderHighlightedPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/renderHighlightedPlaceholder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAiC,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGpG;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACpC;AA8DD;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mCAAmC,GAC3C,WAAW,CA4Cb"}
1
+ {"version":3,"file":"renderHighlightedPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/renderHighlightedPlaceholder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,8BAA8B,CAAC;AAGpG;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACpC;AA8DD;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mCAAmC,GAC3C,WAAW,CA4Cb"}
@@ -1 +1 @@
1
- {"version":3,"file":"slashCommandHighlighter.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/slashCommandHighlighter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAeD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,SAAS,CA+CrF"}
1
+ {"version":3,"file":"slashCommandHighlighter.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/slashCommandHighlighter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAUnD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAeD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,SAAS,CA+CrF"}
@@ -1 +1 @@
1
- {"version":3,"file":"syntaxHighlightedPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/syntaxHighlightedPlaceholder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AASnD,OAAO,EAEL,KAAK,mCAAmC,EACzC,MAAM,mCAAmC,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,mCAAmC,CAAC;AA2DtF;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mCAAmC,GAC3C,SAAS,EAAE,CA+Cb"}
1
+ {"version":3,"file":"syntaxHighlightedPlaceholder.d.ts","sourceRoot":"","sources":["../../../src/components/CodeEditor/syntaxHighlightedPlaceholder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AASnD,OAAO,EACL,KAAK,mCAAmC,EAEzC,MAAM,mCAAmC,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAAG,mCAAmC,CAAC;AA2DtF;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,mCAAmC,GAC3C,SAAS,EAAE,CA+Cb"}
@@ -1,6 +1,6 @@
1
- import type { JSX, ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
2
2
  type EmptyStateVariant = 'inline' | 'centered';
3
- interface Props {
3
+ interface Props extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
4
4
  /**
5
5
  * Empty-state message content.
6
6
  */
@@ -9,18 +9,10 @@ interface Props {
9
9
  * Layout preset; centered fills available space in panel bodies.
10
10
  */
11
11
  variant?: EmptyStateVariant;
12
- /**
13
- * Additional Tailwind classes merged onto the wrapper element.
14
- */
15
- className?: string;
16
12
  }
17
13
  /**
18
14
  * Placeholder shown when a panel or list has no content to display.
19
- *
20
- * @param children - Empty message text or markup.
21
- * @param variant - Layout preset (`inline` or `centered`).
22
- * @param className - Extra classes appended after the preset.
23
15
  */
24
- export declare function EmptyState({ children, variant, className }: Props): JSX.Element;
16
+ export declare function EmptyState({ children, variant, className, ...props }: Props): JSX.Element;
25
17
  export {};
26
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,KAAK,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/C,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,OAAkB,EAAE,SAAS,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAK1F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,KAAK,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/C,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACvE;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAcD;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,OAAkB,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CASrB"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
2
3
  /**
3
4
  * Returns layout classes for inline or centered empty placeholders.
4
5
  *
5
- * @param variant - Empty state layout preset.
6
6
  * @returns Tailwind classes for the wrapper.
7
7
  */
8
8
  function variantClasses(variant) {
@@ -13,13 +13,7 @@ function variantClasses(variant) {
13
13
  }
14
14
  /**
15
15
  * Placeholder shown when a panel or list has no content to display.
16
- *
17
- * @param children - Empty message text or markup.
18
- * @param variant - Layout preset (`inline` or `centered`).
19
- * @param className - Extra classes appended after the preset.
20
16
  */
21
- export function EmptyState({ children, variant = 'inline', className }) {
22
- const base = `hc-empty-state text-[16px] ${variantClasses(variant)}`;
23
- const classes = className ? `${base} ${className}` : base;
24
- return _jsx("div", { className: classes, children: children });
17
+ export function EmptyState({ children, variant = 'inline', className, ...props }) {
18
+ return (_jsx("div", { ...props, className: cn('hc-empty-state text-[16px]', variantClasses(variant), className), children: children }));
25
19
  }
@@ -1,22 +1,15 @@
1
1
  import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import { type FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
2
3
  import type { JSX } from 'react';
3
- interface Props {
4
+ interface Props extends Omit<FontAwesomeIconProps, 'icon' | 'ref'> {
4
5
  /**
5
6
  * Font Awesome icon definition registered in the library.
6
7
  */
7
8
  icon: IconDefinition;
8
- /**
9
- * Optional Tailwind or custom classes for sizing and color.
10
- */
11
- className?: string;
12
- /**
13
- * When set, the icon is exposed to assistive tech instead of being decorative.
14
- */
15
- title?: string;
16
9
  }
17
10
  /**
18
11
  * Renders a Font Awesome SVG icon with consistent default sizing.
19
12
  */
20
- export declare function FaIcon({ icon, className, title }: Props): JSX.Element;
13
+ export declare function FaIcon({ icon, className, title, ...props }: Props): JSX.Element;
21
14
  export {};
22
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FaIcon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,UAAU,KAAK;IACb;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,SAAyB,EAAE,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAQrF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FaIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE5F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,UAAU,KAAM,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,KAAK,CAAC;IAChE;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,SAAyB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAQ/F"}
@@ -1,13 +1,14 @@
1
- import { createElement } from '@harborclient/sdk/react';
2
1
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
2
+ import { createElement } from '@harborclient/sdk/react';
3
+ import { cn } from '../utils.js';
3
4
  /**
4
5
  * Renders a Font Awesome SVG icon with consistent default sizing.
5
6
  */
6
- export function FaIcon({ icon, className = 'h-3.5 w-3.5', title }) {
7
- const classes = className ? `hc-fa-icon ${className}` : 'hc-fa-icon';
7
+ export function FaIcon({ icon, className = 'h-3.5 w-3.5', title, ...props }) {
8
8
  return createElement(FontAwesomeIcon, {
9
+ ...props,
9
10
  icon,
10
- className: classes,
11
+ className: cn('hc-fa-icon', className),
11
12
  title,
12
13
  'aria-hidden': title ? undefined : true
13
14
  });
@@ -1,17 +1,13 @@
1
- import type { JSX, ReactNode } from 'react';
1
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
2
2
  /**
3
3
  * Vertical spacing preset for inline error text.
4
4
  */
5
5
  export type FieldErrorSpacing = 'field' | 'section' | 'modal';
6
- interface Props {
6
+ interface Props extends Omit<ComponentPropsWithoutRef<'p'>, 'children'> {
7
7
  /**
8
8
  * Error message content. When empty, nothing is rendered.
9
9
  */
10
10
  children?: ReactNode;
11
- /**
12
- * Element id referenced by `aria-describedby` on the related control.
13
- */
14
- id?: string;
15
11
  /**
16
12
  * Margin preset matching common form, section, and modal layouts.
17
13
  */
@@ -20,20 +16,10 @@ interface Props {
20
16
  * When true, exposes the message as an alert for assistive technologies.
21
17
  */
22
18
  roleAlert?: boolean;
23
- /**
24
- * Additional Tailwind classes merged onto the error paragraph.
25
- */
26
- className?: string;
27
19
  }
28
20
  /**
29
21
  * Accessible inline validation or error text with consistent typography and spacing.
30
- *
31
- * @param children - Error message; omitted or empty values render nothing.
32
- * @param id - Optional id for `aria-describedby` linkage.
33
- * @param spacing - Margin preset (`field`, `section`, or `modal`).
34
- * @param roleAlert - Whether to set `role="alert"`.
35
- * @param className - Extra classes appended after the preset.
36
22
  */
37
- export declare function FieldError({ children, id, spacing, roleAlert, className }: Props): JSX.Element | null;
23
+ export declare function FieldError({ children, spacing, roleAlert, className, ...props }: Props): JSX.Element | null;
38
24
  export {};
39
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FieldError/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9D,UAAU,KAAK;IACb;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAoBD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,EAAE,EACF,OAAiB,EACjB,SAAgB,EAChB,SAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAW5B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FieldError/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9D,UAAU,KAAM,SAAQ,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC;IACrE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAmBD;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,OAAiB,EACjB,SAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAY5B"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
2
3
  /**
3
4
  * Returns margin classes for the chosen error spacing preset.
4
5
  *
5
- * @param spacing - Vertical spacing preset.
6
6
  * @returns Tailwind margin classes for the error paragraph.
7
7
  */
8
8
  function spacingClasses(spacing) {
@@ -18,17 +18,9 @@ function spacingClasses(spacing) {
18
18
  }
19
19
  /**
20
20
  * Accessible inline validation or error text with consistent typography and spacing.
21
- *
22
- * @param children - Error message; omitted or empty values render nothing.
23
- * @param id - Optional id for `aria-describedby` linkage.
24
- * @param spacing - Margin preset (`field`, `section`, or `modal`).
25
- * @param roleAlert - Whether to set `role="alert"`.
26
- * @param className - Extra classes appended after the preset.
27
21
  */
28
- export function FieldError({ children, id, spacing = 'field', roleAlert = true, className }) {
22
+ export function FieldError({ children, spacing = 'field', roleAlert = true, className, ...props }) {
29
23
  if (children == null || children === '')
30
24
  return null;
31
- const base = `hc-field-error ${spacingClasses(spacing)} text-[14px] text-danger`;
32
- const classes = className ? `${base} ${className}` : base;
33
- return (_jsx("p", { id: id, className: classes, role: roleAlert ? 'alert' : undefined, children: children }));
25
+ return (_jsx("p", { ...props, className: cn('hc-field-error text-[14px] text-danger', spacingClasses(spacing), className), role: roleAlert ? 'alert' : undefined, children: children }));
34
26
  }
@@ -1,13 +1,9 @@
1
- import type { JSX, ReactNode } from 'react';
2
- interface Props {
1
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from 'react';
2
+ interface Props extends Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'aria-expanded' | 'aria-controls'> {
3
3
  /**
4
4
  * Whether the associated slide-up panel is currently open.
5
5
  */
6
6
  active: boolean;
7
- /**
8
- * Called when the user activates the footer segment button.
9
- */
10
- onClick: () => void;
11
7
  /**
12
8
  * Panel element id referenced by `aria-controls`.
13
9
  */
@@ -16,15 +12,11 @@ interface Props {
16
12
  * Button label and optional count badge content.
17
13
  */
18
14
  children: ReactNode;
19
- /**
20
- * Additional Tailwind classes merged onto the button element.
21
- */
22
- className?: string;
23
15
  }
24
16
  /**
25
17
  * Text segment toggle button for the window footer bar, used to open and close
26
18
  * slide-up panels such as Console and Variables.
27
19
  */
28
- export declare function FooterButton({ active, onClick, controlsId, children, className }: Props): JSX.Element;
20
+ export declare function FooterButton({ active, onClick, controlsId, children, className, ...props }: Props): JSX.Element;
29
21
  export {};
30
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FooterButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,UAAU,EACV,QAAQ,EACR,SAAS,EACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAgBrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FooterButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,UAAU,KAAM,SAAQ,IAAI,CAC1B,wBAAwB,CAAC,QAAQ,CAAC,EAClC,UAAU,GAAG,eAAe,GAAG,eAAe,CAC/C;IACC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAWD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,OAAO,EACP,UAAU,EACV,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAarB"}
@@ -1,8 +1,7 @@
1
1
  import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
+ import { cn } from '../utils.js';
2
3
  /**
3
4
  * Compact segment button styles for the footer bar.
4
- *
5
- * @param active - Whether the associated panel is currently expanded.
6
5
  */
7
6
  function footerSegment(active) {
8
7
  return active
@@ -13,9 +12,6 @@ function footerSegment(active) {
13
12
  * Text segment toggle button for the window footer bar, used to open and close
14
13
  * slide-up panels such as Console and Variables.
15
14
  */
16
- export function FooterButton({ active, onClick, controlsId, children, className }) {
17
- const classes = className
18
- ? `hc-footer-button ${footerSegment(active)} ${className}`
19
- : `hc-footer-button ${footerSegment(active)}`;
20
- return (_jsx("button", { type: "button", className: classes, onClick: onClick, "aria-expanded": active, "aria-controls": controlsId, children: children }));
15
+ export function FooterButton({ active, onClick, controlsId, children, className, ...props }) {
16
+ return (_jsx("button", { ...props, type: "button", className: cn('hc-footer-button', footerSegment(active), className), onClick: onClick, "aria-expanded": active, "aria-controls": controlsId, children: children }));
21
17
  }
@@ -1,6 +1,6 @@
1
1
  import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
- import type { JSX } from 'react';
3
- interface Props {
2
+ import type { ComponentPropsWithoutRef, JSX } from 'react';
3
+ interface Props extends Omit<ComponentPropsWithoutRef<'button'>, 'aria-label' | 'aria-pressed' | 'title'> {
4
4
  /**
5
5
  * Font Awesome icon shown inside the footer toggle button.
6
6
  */
@@ -9,24 +9,16 @@ interface Props {
9
9
  * Whether the associated panel or sidebar is currently open.
10
10
  */
11
11
  active: boolean;
12
- /**
13
- * Called when the user activates the toggle button.
14
- */
15
- onClick: () => void;
16
12
  /**
17
13
  * Noun phrase for accessibility labels, e.g. `"sidebar"` becomes
18
14
  * `"Hide sidebar"` / `"Show sidebar"`.
19
15
  */
20
16
  label: string;
21
- /**
22
- * Additional Tailwind classes merged onto the button element.
23
- */
24
- className?: string;
25
17
  }
26
18
  /**
27
19
  * Icon-only toggle button for the window footer bar, used to show or hide
28
20
  * sidebars and similar panels.
29
21
  */
30
- export declare function FooterIcon({ icon, active, onClick, label, className }: Props): JSX.Element;
22
+ export declare function FooterIcon({ icon, active, onClick, label, className, ...props }: Props): JSX.Element;
31
23
  export {};
32
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FooterIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,UAAU,KAAK;IACb;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAkB1F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FooterIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAI3D,UAAU,KAAM,SAAQ,IAAI,CAC1B,wBAAwB,CAAC,QAAQ,CAAC,EAClC,YAAY,GAAG,cAAc,GAAG,OAAO,CACxC;IACC;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAWD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,MAAM,EACN,OAAO,EACP,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAerB"}
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx } from "@harborclient/sdk/jsx-runtime";
2
2
  import { FaIcon } from '../FaIcon/index.js';
3
+ import { cn } from '../utils.js';
3
4
  /**
4
5
  * Square icon toggle styles for footer sidebar buttons.
5
- *
6
- * @param active - Whether the associated sidebar is currently visible.
7
6
  */
8
7
  function footerIconButton(active) {
9
8
  return active
@@ -14,10 +13,7 @@ function footerIconButton(active) {
14
13
  * Icon-only toggle button for the window footer bar, used to show or hide
15
14
  * sidebars and similar panels.
16
15
  */
17
- export function FooterIcon({ icon, active, onClick, label, className }) {
16
+ export function FooterIcon({ icon, active, onClick, label, className, ...props }) {
18
17
  const accessibleLabel = active ? `Hide ${label}` : `Show ${label}`;
19
- const classes = className
20
- ? `hc-footer-icon ${footerIconButton(active)} ${className}`
21
- : `hc-footer-icon ${footerIconButton(active)}`;
22
- return (_jsx("button", { type: "button", className: classes, onClick: onClick, "aria-pressed": active, "aria-label": accessibleLabel, title: accessibleLabel, children: _jsx(FaIcon, { icon: icon, className: "hc-footer-icon-icon h-4 w-4" }) }));
18
+ return (_jsx("button", { ...props, type: "button", className: cn('hc-footer-icon', footerIconButton(active), className), onClick: onClick, "aria-pressed": active, "aria-label": accessibleLabel, title: accessibleLabel, children: _jsx(FaIcon, { icon: icon, className: "hc-footer-icon-icon h-4 w-4" }) }));
23
19
  }
@@ -7,8 +7,6 @@ export interface Props {
7
7
  parts: FormDataPart[];
8
8
  /**
9
9
  * Called when rows are added, updated, or removed.
10
- *
11
- * @param parts - Updated part list.
12
10
  */
13
11
  onChange: (parts: FormDataPart[]) => void;
14
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormDataEditor/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAoB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAQ/E,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,KAAK,EAA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