@ship-it-ui/shipit 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.cjs +465 -249
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -11
- package/dist/index.d.ts +44 -11
- package/dist/index.js +401 -205
- package/dist/index.js.map +1 -1
- package/package.json +18 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, SVGAttributes } from 'react';
|
|
4
1
|
import { BadgeProps } from '@ship-it-ui/ui';
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export { cn } from '@ship-it-ui/ui';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, MouseEventHandler, SVGAttributes } from 'react';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* AskBar — the primary "ask anything" input. The leading ✦ glyph + accent
|
|
@@ -32,7 +31,7 @@ interface AskBarProps extends Omit<HTMLAttributes<HTMLFormElement>, 'onSubmit' |
|
|
|
32
31
|
}
|
|
33
32
|
declare const AskBar: react.ForwardRefExoticComponent<AskBarProps & react.RefAttributes<HTMLFormElement>>;
|
|
34
33
|
|
|
35
|
-
interface CitationProps extends HTMLAttributes<
|
|
34
|
+
interface CitationProps extends HTMLAttributes<HTMLElement> {
|
|
36
35
|
/** Citation number (1-indexed). */
|
|
37
36
|
index: number;
|
|
38
37
|
/** Source label — e.g., `runbook-oncall.md:L42`. */
|
|
@@ -42,7 +41,7 @@ interface CitationProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
42
41
|
/** Inline superscript variant (renders the number only, no source row). */
|
|
43
42
|
inline?: boolean;
|
|
44
43
|
}
|
|
45
|
-
declare const Citation: react.ForwardRefExoticComponent<CitationProps & react.RefAttributes<
|
|
44
|
+
declare const Citation: react.ForwardRefExoticComponent<CitationProps & react.RefAttributes<HTMLElement>>;
|
|
46
45
|
|
|
47
46
|
/**
|
|
48
47
|
* ConfidenceIndicator — horizontal bar + percent + tier label. The tier tone
|
|
@@ -187,8 +186,34 @@ declare const EntityCard: react.ForwardRefExoticComponent<EntityCardProps & reac
|
|
|
187
186
|
* optional trailing meta.
|
|
188
187
|
*
|
|
189
188
|
* Renders as a button when `onClick` is supplied; otherwise a plain row.
|
|
189
|
+
*
|
|
190
|
+
* For strongly-typed refs use the specialized exports `EntityListRowDiv`
|
|
191
|
+
* (non-interactive) and `EntityListRowButton` (interactive). The default
|
|
192
|
+
* `EntityListRow` is a thin wrapper that picks the right underlying element
|
|
193
|
+
* based on whether `onClick` is provided.
|
|
190
194
|
*/
|
|
191
|
-
interface
|
|
195
|
+
interface EntityListRowCommonProps {
|
|
196
|
+
type: EntityType;
|
|
197
|
+
/** Entity name / id. Rendered in mono. */
|
|
198
|
+
name: ReactNode;
|
|
199
|
+
/** Trailing pill (e.g., relation type: `OWNED_BY`). */
|
|
200
|
+
relation?: ReactNode;
|
|
201
|
+
/** Trailing meta line (e.g., a timestamp). */
|
|
202
|
+
meta?: ReactNode;
|
|
203
|
+
/** When true, hides the leading glyph dot. */
|
|
204
|
+
hideGlyph?: boolean;
|
|
205
|
+
}
|
|
206
|
+
interface EntityListRowDivProps extends EntityListRowCommonProps, Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'name'> {
|
|
207
|
+
}
|
|
208
|
+
/** Non-interactive row. Use this when you have a static list of entities. */
|
|
209
|
+
declare const EntityListRowDiv: react.ForwardRefExoticComponent<EntityListRowDivProps & react.RefAttributes<HTMLDivElement>>;
|
|
210
|
+
interface EntityListRowButtonProps extends EntityListRowCommonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'title' | 'type' | 'name' | 'onClick'> {
|
|
211
|
+
/** Click handler. Required for the button variant. */
|
|
212
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
213
|
+
}
|
|
214
|
+
/** Interactive row rendered as a `<button>`. Use this when the row navigates. */
|
|
215
|
+
declare const EntityListRowButton: react.ForwardRefExoticComponent<EntityListRowButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
216
|
+
interface EntityListRowProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'name' | 'onClick'> {
|
|
192
217
|
type: EntityType;
|
|
193
218
|
/** Entity name / id. Rendered in mono. */
|
|
194
219
|
name: ReactNode;
|
|
@@ -197,11 +222,19 @@ interface EntityListRowProps extends Omit<HTMLAttributes<HTMLElement>, 'title'>
|
|
|
197
222
|
/** Trailing meta line (e.g., a timestamp). */
|
|
198
223
|
meta?: ReactNode;
|
|
199
224
|
/** When provided, the row becomes a clickable button. */
|
|
200
|
-
onClick?:
|
|
225
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
201
226
|
/** When true, hides the leading glyph dot. */
|
|
202
227
|
hideGlyph?: boolean;
|
|
203
228
|
}
|
|
204
|
-
|
|
229
|
+
/**
|
|
230
|
+
* Convenience wrapper: chooses `EntityListRowButton` when `onClick` is
|
|
231
|
+
* supplied, otherwise `EntityListRowDiv`. Does not forward refs — when you
|
|
232
|
+
* need a typed ref, reach for the specialized component directly.
|
|
233
|
+
*/
|
|
234
|
+
declare function EntityListRow({ type, name, relation, meta, hideGlyph, onClick, className, ...props }: EntityListRowProps): react_jsx_runtime.JSX.Element;
|
|
235
|
+
declare namespace EntityListRow {
|
|
236
|
+
var displayName: string;
|
|
237
|
+
}
|
|
205
238
|
|
|
206
239
|
/**
|
|
207
240
|
* GraphEdge — SVG `<line>` (or `<path>` if curve points are provided) rendered
|
|
@@ -458,4 +491,4 @@ interface TestimonialProps extends Omit<HTMLAttributes<HTMLElement>, 'cite' | 'r
|
|
|
458
491
|
}
|
|
459
492
|
declare const Testimonial: react.ForwardRefExoticComponent<TestimonialProps & react.RefAttributes<HTMLElement>>;
|
|
460
493
|
|
|
461
|
-
export { AskBar, type AskBarProps, CTAStrip, type CTAStripProps, Citation, type CitationProps, ConfidenceIndicator, type ConfidenceIndicatorProps, type ConfidenceTier, CopilotMessage, type CopilotMessageProps, type CopilotRole, ENTITY_GLYPH, ENTITY_LABEL, ENTITY_TONE_BG, ENTITY_TONE_CLASS, EntityBadge, type EntityBadgeProps, EntityCard, type EntityCardProps, EntityListRow, type EntityListRowProps, type EntityStat, type EntityType, type Feature, FeatureGrid, type FeatureGridProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GraphEdge, type GraphEdgeProps, type GraphEdgeStyle, GraphInspector, type GraphInspectorProps, GraphLegend, type GraphLegendEntry, type GraphLegendProps, GraphMinimap, type GraphMinimapProps, GraphNode, type GraphNodeProps, type GraphNodeState, Hero, type HeroProps, type InspectorProperty, type InspectorRelation, type MinimapPoint, type MinimapViewport, PathOverlay, type PathOverlayProps, type PathPoint, PricingCard, type PricingCardProps, ReasoningBlock, type ReasoningBlockProps, ReasoningStep, type ReasoningStepProps, SuggestionChip, type SuggestionChipProps, Testimonial, type TestimonialProps, ToolCallCard, type ToolCallCardProps
|
|
494
|
+
export { AskBar, type AskBarProps, CTAStrip, type CTAStripProps, Citation, type CitationProps, ConfidenceIndicator, type ConfidenceIndicatorProps, type ConfidenceTier, CopilotMessage, type CopilotMessageProps, type CopilotRole, ENTITY_GLYPH, ENTITY_LABEL, ENTITY_TONE_BG, ENTITY_TONE_CLASS, EntityBadge, type EntityBadgeProps, EntityCard, type EntityCardProps, EntityListRow, EntityListRowButton, type EntityListRowButtonProps, EntityListRowDiv, type EntityListRowDivProps, type EntityListRowProps, type EntityStat, type EntityType, type Feature, FeatureGrid, type FeatureGridProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GraphEdge, type GraphEdgeProps, type GraphEdgeStyle, GraphInspector, type GraphInspectorProps, GraphLegend, type GraphLegendEntry, type GraphLegendProps, GraphMinimap, type GraphMinimapProps, GraphNode, type GraphNodeProps, type GraphNodeState, Hero, type HeroProps, type InspectorProperty, type InspectorRelation, type MinimapPoint, type MinimapViewport, PathOverlay, type PathOverlayProps, type PathPoint, PricingCard, type PricingCardProps, ReasoningBlock, type ReasoningBlockProps, ReasoningStep, type ReasoningStepProps, SuggestionChip, type SuggestionChipProps, Testimonial, type TestimonialProps, ToolCallCard, type ToolCallCardProps };
|