@ship-it-ui/shipit 0.0.2 → 0.0.4
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/dist/index.cjs +314 -98
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +163 -16
- package/dist/index.d.ts +163 -16
- package/dist/index.js +304 -97
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { BadgeProps } from '@ship-it-ui/ui';
|
|
1
|
+
import { BadgeProps, DataTableProps, DataTableColumn } from '@ship-it-ui/ui';
|
|
2
2
|
export { cn } from '@ship-it-ui/ui';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, MouseEventHandler, SVGAttributes } from 'react';
|
|
4
|
+
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, MouseEventHandler, SVGAttributes, Ref } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { ConnectorName } from '@ship-it-ui/icons';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* AskBar — the primary "ask anything" input. The leading ✦ glyph + accent
|
|
@@ -133,15 +134,75 @@ interface ToolCallCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
133
134
|
declare const ToolCallCard: react.ForwardRefExoticComponent<ToolCallCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
134
135
|
|
|
135
136
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
137
|
+
* ShipIt entity vocabulary. Six built-in categories — `service`, `person`,
|
|
138
|
+
* `document`, `deployment`, `incident`, `ticket` — cover the graph's core
|
|
139
|
+
* shapes. The `EntityType` type is intentionally open: consumers may pass any
|
|
140
|
+
* string and register metadata for it via {@link registerEntityType} so their
|
|
141
|
+
* domain types (Repository, Pipeline, Monitor, …) render with the right glyph,
|
|
142
|
+
* label, and tone.
|
|
143
|
+
*
|
|
144
|
+
* Unregistered types fall back to the `service` visuals so a stray value never
|
|
145
|
+
* crashes the UI; consumers can detect them via the `data-entity-type` attribute
|
|
146
|
+
* that entity components forward to the DOM.
|
|
147
|
+
*/
|
|
148
|
+
type KnownEntityType = 'service' | 'person' | 'document' | 'deployment' | 'incident' | 'ticket';
|
|
149
|
+
type EntityType = KnownEntityType | (string & {});
|
|
150
|
+
/**
|
|
151
|
+
* Variant key for the shared `Badge` component in `@ship-it-ui/ui`. Inlined here
|
|
152
|
+
* to keep `types.ts` free of cross-package value imports.
|
|
138
153
|
*/
|
|
139
|
-
type
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
154
|
+
type EntityBadgeVariant = 'neutral' | 'accent' | 'ok' | 'warn' | 'err' | 'purple' | 'pink';
|
|
155
|
+
interface EntityTypeMeta {
|
|
156
|
+
/** Single-character glyph rendered next to the type label. */
|
|
157
|
+
glyph: string;
|
|
158
|
+
/** Human-readable type name (e.g. `'Service'`). */
|
|
159
|
+
label: string;
|
|
160
|
+
/** Tailwind text-color class for the glyph and accent text. */
|
|
161
|
+
toneClass: string;
|
|
162
|
+
/** Tailwind background-color class for the icon plate. */
|
|
163
|
+
toneBg: string;
|
|
164
|
+
/** CSS color value used by graph chrome (node ring + legend dot). */
|
|
165
|
+
colorVar: string;
|
|
166
|
+
/** Variant for the shared `Badge` component. */
|
|
167
|
+
badgeVariant: EntityBadgeVariant;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Register or replace metadata for an entity type. Pass any string key — the
|
|
171
|
+
* built-in six can be overridden too. Returns the registered metadata.
|
|
172
|
+
*/
|
|
173
|
+
declare function registerEntityType(type: string, meta: EntityTypeMeta): EntityTypeMeta;
|
|
174
|
+
/** Bulk-register a map of entity types. */
|
|
175
|
+
declare function registerEntityTypes(map: Record<string, EntityTypeMeta>): void;
|
|
176
|
+
/**
|
|
177
|
+
* Resolve metadata for an entity type. Unknown types fall back to the `service`
|
|
178
|
+
* metadata so consumers never crash on a stray value.
|
|
179
|
+
*/
|
|
180
|
+
declare function getEntityTypeMeta(type: EntityType): EntityTypeMeta;
|
|
181
|
+
/**
|
|
182
|
+
* Snapshot every registered entity type as `[type, meta]` tuples. Used by
|
|
183
|
+
* downstream packages (e.g. `@ship-it-ui/cytoscape`) to enumerate types when
|
|
184
|
+
* emitting per-type styles. Cheap — just `Array.from(map)`.
|
|
185
|
+
*/
|
|
186
|
+
declare function listEntityTypes(): ReadonlyArray<readonly [string, EntityTypeMeta]>;
|
|
187
|
+
/** Test-only helper: drop all consumer registrations and re-seed the built-ins. */
|
|
188
|
+
declare function resetEntityTypeRegistry(): void;
|
|
189
|
+
/**
|
|
190
|
+
* @deprecated Prefer `getEntityTypeMeta(type).glyph`. Retained for the six
|
|
191
|
+
* built-in types so existing consumers keep working.
|
|
192
|
+
*/
|
|
193
|
+
declare const ENTITY_GLYPH: Record<KnownEntityType, string>;
|
|
194
|
+
/** @deprecated Prefer `getEntityTypeMeta(type).label`. */
|
|
195
|
+
declare const ENTITY_LABEL: Record<KnownEntityType, string>;
|
|
196
|
+
/** @deprecated Prefer `getEntityTypeMeta(type).toneClass`. */
|
|
197
|
+
declare const ENTITY_TONE_CLASS: Record<KnownEntityType, string>;
|
|
198
|
+
/** @deprecated Prefer `getEntityTypeMeta(type).toneBg`. */
|
|
199
|
+
declare const ENTITY_TONE_BG: Record<KnownEntityType, string>;
|
|
144
200
|
|
|
201
|
+
/**
|
|
202
|
+
* EntityBadge — small chip identifying an entity type. Resolves the canonical
|
|
203
|
+
* glyph + label from the type, but accepts a `label` override for cases where
|
|
204
|
+
* the consumer wants to show the entity's actual name.
|
|
205
|
+
*/
|
|
145
206
|
interface EntityBadgeProps extends Omit<BadgeProps, 'variant'> {
|
|
146
207
|
type: EntityType;
|
|
147
208
|
/** Override the visible label. Defaults to the canonical type label. */
|
|
@@ -294,11 +355,18 @@ interface GraphInspectorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'titl
|
|
|
294
355
|
}
|
|
295
356
|
declare const GraphInspector: react.ForwardRefExoticComponent<GraphInspectorProps & react.RefAttributes<HTMLDivElement>>;
|
|
296
357
|
|
|
358
|
+
/**
|
|
359
|
+
* GraphLegend — translucent floating legend panel for the graph viewport.
|
|
360
|
+
* Use the `entries` prop for the canonical entity-type list, or compose
|
|
361
|
+
* children directly for a custom legend. Entry colors and labels resolve
|
|
362
|
+
* through the shared entity-type registry, so consumer-registered types
|
|
363
|
+
* appear with their own visuals.
|
|
364
|
+
*/
|
|
297
365
|
interface GraphLegendEntry {
|
|
298
366
|
/** Entity type (resolves color + label automatically) or a custom shape. */
|
|
299
367
|
type?: EntityType;
|
|
300
368
|
color?: string;
|
|
301
|
-
label
|
|
369
|
+
label?: ReactNode;
|
|
302
370
|
}
|
|
303
371
|
interface GraphLegendProps extends HTMLAttributes<HTMLDivElement> {
|
|
304
372
|
entries?: ReadonlyArray<GraphLegendEntry>;
|
|
@@ -341,9 +409,11 @@ interface GraphMinimapProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
341
409
|
declare const GraphMinimap: react.ForwardRefExoticComponent<GraphMinimapProps & react.RefAttributes<HTMLDivElement>>;
|
|
342
410
|
|
|
343
411
|
/**
|
|
344
|
-
* GraphNode — visual representation of a graph node.
|
|
345
|
-
*
|
|
346
|
-
*
|
|
412
|
+
* GraphNode — visual representation of a graph node. Resolves color + glyph
|
|
413
|
+
* from the shared entity-type registry, so consumer-registered types render
|
|
414
|
+
* with their own visuals. Five states (default, hover, selected, on-path,
|
|
415
|
+
* dimmed). The component itself is presentation-only; pan / zoom / drag is
|
|
416
|
+
* the host's job.
|
|
347
417
|
*/
|
|
348
418
|
type GraphNodeState = 'default' | 'hover' | 'selected' | 'path' | 'dim';
|
|
349
419
|
interface GraphNodeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
@@ -456,14 +526,22 @@ declare const Hero: react.ForwardRefExoticComponent<HeroProps & react.RefAttribu
|
|
|
456
526
|
* PricingCard — single tier in a pricing table. Shows tier name, price,
|
|
457
527
|
* description, list of features (with ✓ markers), and an action button slot.
|
|
458
528
|
*
|
|
529
|
+
* The card establishes a CSS container, so the price scales with the card's
|
|
530
|
+
* own inline-size rather than the viewport — when three cards crowd into a
|
|
531
|
+
* narrow column the price doesn't blow out the layout.
|
|
532
|
+
*
|
|
459
533
|
* Pass `featured` to highlight the card with an accent border + tinted
|
|
460
|
-
* background for the "recommended" tier.
|
|
534
|
+
* background for the "recommended" tier. Use `priceUnit` for per-period
|
|
535
|
+
* suffixes (e.g. `/ user / mo`) so the unit lays out next to the price
|
|
536
|
+
* baseline-aligned and wraps cleanly when there isn't room.
|
|
461
537
|
*/
|
|
462
538
|
interface PricingCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
463
539
|
/** Tier name — e.g., `Pro`, `Team`. */
|
|
464
540
|
tier: ReactNode;
|
|
465
|
-
/**
|
|
541
|
+
/** Headline price, e.g. `$29` or `Talk to us`. */
|
|
466
542
|
price: ReactNode;
|
|
543
|
+
/** Optional small unit rendered next to the price, e.g. `/ user / mo`. */
|
|
544
|
+
priceUnit?: ReactNode;
|
|
467
545
|
/** Short description below the tier name. */
|
|
468
546
|
description?: ReactNode;
|
|
469
547
|
/** Feature bullet list. */
|
|
@@ -491,4 +569,73 @@ interface TestimonialProps extends Omit<HTMLAttributes<HTMLElement>, 'cite' | 'r
|
|
|
491
569
|
}
|
|
492
570
|
declare const Testimonial: react.ForwardRefExoticComponent<TestimonialProps & react.RefAttributes<HTMLElement>>;
|
|
493
571
|
|
|
494
|
-
|
|
572
|
+
/**
|
|
573
|
+
* ConnectorCard — integration card for "connector hubs". Renders a connector
|
|
574
|
+
* logo (via `@ship-it-ui/icons` connector glyphs), the connector name, a
|
|
575
|
+
* sync-state dot, a relative last-sync timestamp, an optional summary, and a
|
|
576
|
+
* trailing action slot.
|
|
577
|
+
*
|
|
578
|
+
* When `onClick` is provided the whole card becomes a button; otherwise it
|
|
579
|
+
* renders as a plain `<div>`.
|
|
580
|
+
*/
|
|
581
|
+
type ConnectorStatus = 'connected' | 'syncing' | 'error' | 'disconnected';
|
|
582
|
+
interface ConnectorCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onClick'> {
|
|
583
|
+
/** Connector name keyed into `@ship-it-ui/icons` connectorGlyphs. */
|
|
584
|
+
connector: ConnectorName | (string & {});
|
|
585
|
+
/** Display name shown next to the logo. */
|
|
586
|
+
name: ReactNode;
|
|
587
|
+
/** Sync status. Drives the status dot tone + the default status label. */
|
|
588
|
+
status: ConnectorStatus;
|
|
589
|
+
/** Last successful sync timestamp. Formatted relative to `relativeNow`. */
|
|
590
|
+
lastSyncedAt?: Date | string | number;
|
|
591
|
+
/** Reference time for relative formatting (injectable for tests/SSR). */
|
|
592
|
+
relativeNow?: Date;
|
|
593
|
+
/** Free-text summary (e.g. "1,243 docs · 8 channels"). */
|
|
594
|
+
summary?: ReactNode;
|
|
595
|
+
/** Trailing action slot — typically a `Button` or `DropdownMenu` trigger. */
|
|
596
|
+
actions?: ReactNode;
|
|
597
|
+
/** Click handler. When provided, the card becomes a button. */
|
|
598
|
+
onClick?: () => void;
|
|
599
|
+
/**
|
|
600
|
+
* Accessible name override. Required when `onClick` is set *and* `name` is
|
|
601
|
+
* not a string — without it the button has no accessible name (axe
|
|
602
|
+
* `button-name`). Optional otherwise.
|
|
603
|
+
*/
|
|
604
|
+
accessibleName?: string;
|
|
605
|
+
}
|
|
606
|
+
declare const ConnectorCard: react.ForwardRefExoticComponent<ConnectorCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* EntityTable — DataTable preset with two ShipIt-aware column helpers:
|
|
610
|
+
* `entityColumn(...)` for the typed name cell and `entityTypeColumn()` for a
|
|
611
|
+
* standalone type column. Everything else (sort, selection, sticky header)
|
|
612
|
+
* comes from `@ship-it-ui/ui` DataTable as-is.
|
|
613
|
+
*/
|
|
614
|
+
interface MinimalEntity {
|
|
615
|
+
id: string;
|
|
616
|
+
type: EntityType;
|
|
617
|
+
name: string;
|
|
618
|
+
}
|
|
619
|
+
type EntityTableProps<T extends MinimalEntity> = Omit<DataTableProps<T>, 'rowKey'> & {
|
|
620
|
+
rowKey?: (row: T) => string;
|
|
621
|
+
};
|
|
622
|
+
declare function EntityTable<T extends MinimalEntity>(props: EntityTableProps<T> & {
|
|
623
|
+
ref?: Ref<HTMLTableElement>;
|
|
624
|
+
}): react_jsx_runtime.JSX.Element;
|
|
625
|
+
/**
|
|
626
|
+
* Pre-built column for the entity name. Renders the type glyph (in the type's
|
|
627
|
+
* tone) followed by the name in mono. Sorts on `name`.
|
|
628
|
+
*/
|
|
629
|
+
declare function entityColumn<T extends MinimalEntity>(options?: {
|
|
630
|
+
key?: string;
|
|
631
|
+
header?: string;
|
|
632
|
+
}): DataTableColumn<T>;
|
|
633
|
+
/**
|
|
634
|
+
* Pre-built column rendering the canonical EntityBadge.
|
|
635
|
+
*/
|
|
636
|
+
declare function entityTypeColumn<T extends MinimalEntity>(options?: {
|
|
637
|
+
key?: string;
|
|
638
|
+
header?: string;
|
|
639
|
+
}): DataTableColumn<T>;
|
|
640
|
+
|
|
641
|
+
export { AskBar, type AskBarProps, CTAStrip, type CTAStripProps, Citation, type CitationProps, ConfidenceIndicator, type ConfidenceIndicatorProps, type ConfidenceTier, ConnectorCard, type ConnectorCardProps, type ConnectorStatus, CopilotMessage, type CopilotMessageProps, type CopilotRole, ENTITY_GLYPH, ENTITY_LABEL, ENTITY_TONE_BG, ENTITY_TONE_CLASS, EntityBadge, type EntityBadgeProps, type EntityBadgeVariant, EntityCard, type EntityCardProps, EntityListRow, EntityListRowButton, type EntityListRowButtonProps, EntityListRowDiv, type EntityListRowDivProps, type EntityListRowProps, type EntityStat, EntityTable, type EntityTableProps, type EntityType, type EntityTypeMeta, 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 KnownEntityType, 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, entityColumn, entityTypeColumn, getEntityTypeMeta, listEntityTypes, registerEntityType, registerEntityTypes, resetEntityTypeRegistry };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { BadgeProps } from '@ship-it-ui/ui';
|
|
1
|
+
import { BadgeProps, DataTableProps, DataTableColumn } from '@ship-it-ui/ui';
|
|
2
2
|
export { cn } from '@ship-it-ui/ui';
|
|
3
3
|
import * as react from 'react';
|
|
4
|
-
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, MouseEventHandler, SVGAttributes } from 'react';
|
|
4
|
+
import { HTMLAttributes, ReactNode, ButtonHTMLAttributes, MouseEventHandler, SVGAttributes, Ref } from 'react';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { ConnectorName } from '@ship-it-ui/icons';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* AskBar — the primary "ask anything" input. The leading ✦ glyph + accent
|
|
@@ -133,15 +134,75 @@ interface ToolCallCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
133
134
|
declare const ToolCallCard: react.ForwardRefExoticComponent<ToolCallCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
134
135
|
|
|
135
136
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
137
|
+
* ShipIt entity vocabulary. Six built-in categories — `service`, `person`,
|
|
138
|
+
* `document`, `deployment`, `incident`, `ticket` — cover the graph's core
|
|
139
|
+
* shapes. The `EntityType` type is intentionally open: consumers may pass any
|
|
140
|
+
* string and register metadata for it via {@link registerEntityType} so their
|
|
141
|
+
* domain types (Repository, Pipeline, Monitor, …) render with the right glyph,
|
|
142
|
+
* label, and tone.
|
|
143
|
+
*
|
|
144
|
+
* Unregistered types fall back to the `service` visuals so a stray value never
|
|
145
|
+
* crashes the UI; consumers can detect them via the `data-entity-type` attribute
|
|
146
|
+
* that entity components forward to the DOM.
|
|
147
|
+
*/
|
|
148
|
+
type KnownEntityType = 'service' | 'person' | 'document' | 'deployment' | 'incident' | 'ticket';
|
|
149
|
+
type EntityType = KnownEntityType | (string & {});
|
|
150
|
+
/**
|
|
151
|
+
* Variant key for the shared `Badge` component in `@ship-it-ui/ui`. Inlined here
|
|
152
|
+
* to keep `types.ts` free of cross-package value imports.
|
|
138
153
|
*/
|
|
139
|
-
type
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
154
|
+
type EntityBadgeVariant = 'neutral' | 'accent' | 'ok' | 'warn' | 'err' | 'purple' | 'pink';
|
|
155
|
+
interface EntityTypeMeta {
|
|
156
|
+
/** Single-character glyph rendered next to the type label. */
|
|
157
|
+
glyph: string;
|
|
158
|
+
/** Human-readable type name (e.g. `'Service'`). */
|
|
159
|
+
label: string;
|
|
160
|
+
/** Tailwind text-color class for the glyph and accent text. */
|
|
161
|
+
toneClass: string;
|
|
162
|
+
/** Tailwind background-color class for the icon plate. */
|
|
163
|
+
toneBg: string;
|
|
164
|
+
/** CSS color value used by graph chrome (node ring + legend dot). */
|
|
165
|
+
colorVar: string;
|
|
166
|
+
/** Variant for the shared `Badge` component. */
|
|
167
|
+
badgeVariant: EntityBadgeVariant;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Register or replace metadata for an entity type. Pass any string key — the
|
|
171
|
+
* built-in six can be overridden too. Returns the registered metadata.
|
|
172
|
+
*/
|
|
173
|
+
declare function registerEntityType(type: string, meta: EntityTypeMeta): EntityTypeMeta;
|
|
174
|
+
/** Bulk-register a map of entity types. */
|
|
175
|
+
declare function registerEntityTypes(map: Record<string, EntityTypeMeta>): void;
|
|
176
|
+
/**
|
|
177
|
+
* Resolve metadata for an entity type. Unknown types fall back to the `service`
|
|
178
|
+
* metadata so consumers never crash on a stray value.
|
|
179
|
+
*/
|
|
180
|
+
declare function getEntityTypeMeta(type: EntityType): EntityTypeMeta;
|
|
181
|
+
/**
|
|
182
|
+
* Snapshot every registered entity type as `[type, meta]` tuples. Used by
|
|
183
|
+
* downstream packages (e.g. `@ship-it-ui/cytoscape`) to enumerate types when
|
|
184
|
+
* emitting per-type styles. Cheap — just `Array.from(map)`.
|
|
185
|
+
*/
|
|
186
|
+
declare function listEntityTypes(): ReadonlyArray<readonly [string, EntityTypeMeta]>;
|
|
187
|
+
/** Test-only helper: drop all consumer registrations and re-seed the built-ins. */
|
|
188
|
+
declare function resetEntityTypeRegistry(): void;
|
|
189
|
+
/**
|
|
190
|
+
* @deprecated Prefer `getEntityTypeMeta(type).glyph`. Retained for the six
|
|
191
|
+
* built-in types so existing consumers keep working.
|
|
192
|
+
*/
|
|
193
|
+
declare const ENTITY_GLYPH: Record<KnownEntityType, string>;
|
|
194
|
+
/** @deprecated Prefer `getEntityTypeMeta(type).label`. */
|
|
195
|
+
declare const ENTITY_LABEL: Record<KnownEntityType, string>;
|
|
196
|
+
/** @deprecated Prefer `getEntityTypeMeta(type).toneClass`. */
|
|
197
|
+
declare const ENTITY_TONE_CLASS: Record<KnownEntityType, string>;
|
|
198
|
+
/** @deprecated Prefer `getEntityTypeMeta(type).toneBg`. */
|
|
199
|
+
declare const ENTITY_TONE_BG: Record<KnownEntityType, string>;
|
|
144
200
|
|
|
201
|
+
/**
|
|
202
|
+
* EntityBadge — small chip identifying an entity type. Resolves the canonical
|
|
203
|
+
* glyph + label from the type, but accepts a `label` override for cases where
|
|
204
|
+
* the consumer wants to show the entity's actual name.
|
|
205
|
+
*/
|
|
145
206
|
interface EntityBadgeProps extends Omit<BadgeProps, 'variant'> {
|
|
146
207
|
type: EntityType;
|
|
147
208
|
/** Override the visible label. Defaults to the canonical type label. */
|
|
@@ -294,11 +355,18 @@ interface GraphInspectorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'titl
|
|
|
294
355
|
}
|
|
295
356
|
declare const GraphInspector: react.ForwardRefExoticComponent<GraphInspectorProps & react.RefAttributes<HTMLDivElement>>;
|
|
296
357
|
|
|
358
|
+
/**
|
|
359
|
+
* GraphLegend — translucent floating legend panel for the graph viewport.
|
|
360
|
+
* Use the `entries` prop for the canonical entity-type list, or compose
|
|
361
|
+
* children directly for a custom legend. Entry colors and labels resolve
|
|
362
|
+
* through the shared entity-type registry, so consumer-registered types
|
|
363
|
+
* appear with their own visuals.
|
|
364
|
+
*/
|
|
297
365
|
interface GraphLegendEntry {
|
|
298
366
|
/** Entity type (resolves color + label automatically) or a custom shape. */
|
|
299
367
|
type?: EntityType;
|
|
300
368
|
color?: string;
|
|
301
|
-
label
|
|
369
|
+
label?: ReactNode;
|
|
302
370
|
}
|
|
303
371
|
interface GraphLegendProps extends HTMLAttributes<HTMLDivElement> {
|
|
304
372
|
entries?: ReadonlyArray<GraphLegendEntry>;
|
|
@@ -341,9 +409,11 @@ interface GraphMinimapProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
341
409
|
declare const GraphMinimap: react.ForwardRefExoticComponent<GraphMinimapProps & react.RefAttributes<HTMLDivElement>>;
|
|
342
410
|
|
|
343
411
|
/**
|
|
344
|
-
* GraphNode — visual representation of a graph node.
|
|
345
|
-
*
|
|
346
|
-
*
|
|
412
|
+
* GraphNode — visual representation of a graph node. Resolves color + glyph
|
|
413
|
+
* from the shared entity-type registry, so consumer-registered types render
|
|
414
|
+
* with their own visuals. Five states (default, hover, selected, on-path,
|
|
415
|
+
* dimmed). The component itself is presentation-only; pan / zoom / drag is
|
|
416
|
+
* the host's job.
|
|
347
417
|
*/
|
|
348
418
|
type GraphNodeState = 'default' | 'hover' | 'selected' | 'path' | 'dim';
|
|
349
419
|
interface GraphNodeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
@@ -456,14 +526,22 @@ declare const Hero: react.ForwardRefExoticComponent<HeroProps & react.RefAttribu
|
|
|
456
526
|
* PricingCard — single tier in a pricing table. Shows tier name, price,
|
|
457
527
|
* description, list of features (with ✓ markers), and an action button slot.
|
|
458
528
|
*
|
|
529
|
+
* The card establishes a CSS container, so the price scales with the card's
|
|
530
|
+
* own inline-size rather than the viewport — when three cards crowd into a
|
|
531
|
+
* narrow column the price doesn't blow out the layout.
|
|
532
|
+
*
|
|
459
533
|
* Pass `featured` to highlight the card with an accent border + tinted
|
|
460
|
-
* background for the "recommended" tier.
|
|
534
|
+
* background for the "recommended" tier. Use `priceUnit` for per-period
|
|
535
|
+
* suffixes (e.g. `/ user / mo`) so the unit lays out next to the price
|
|
536
|
+
* baseline-aligned and wraps cleanly when there isn't room.
|
|
461
537
|
*/
|
|
462
538
|
interface PricingCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
463
539
|
/** Tier name — e.g., `Pro`, `Team`. */
|
|
464
540
|
tier: ReactNode;
|
|
465
|
-
/**
|
|
541
|
+
/** Headline price, e.g. `$29` or `Talk to us`. */
|
|
466
542
|
price: ReactNode;
|
|
543
|
+
/** Optional small unit rendered next to the price, e.g. `/ user / mo`. */
|
|
544
|
+
priceUnit?: ReactNode;
|
|
467
545
|
/** Short description below the tier name. */
|
|
468
546
|
description?: ReactNode;
|
|
469
547
|
/** Feature bullet list. */
|
|
@@ -491,4 +569,73 @@ interface TestimonialProps extends Omit<HTMLAttributes<HTMLElement>, 'cite' | 'r
|
|
|
491
569
|
}
|
|
492
570
|
declare const Testimonial: react.ForwardRefExoticComponent<TestimonialProps & react.RefAttributes<HTMLElement>>;
|
|
493
571
|
|
|
494
|
-
|
|
572
|
+
/**
|
|
573
|
+
* ConnectorCard — integration card for "connector hubs". Renders a connector
|
|
574
|
+
* logo (via `@ship-it-ui/icons` connector glyphs), the connector name, a
|
|
575
|
+
* sync-state dot, a relative last-sync timestamp, an optional summary, and a
|
|
576
|
+
* trailing action slot.
|
|
577
|
+
*
|
|
578
|
+
* When `onClick` is provided the whole card becomes a button; otherwise it
|
|
579
|
+
* renders as a plain `<div>`.
|
|
580
|
+
*/
|
|
581
|
+
type ConnectorStatus = 'connected' | 'syncing' | 'error' | 'disconnected';
|
|
582
|
+
interface ConnectorCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'onClick'> {
|
|
583
|
+
/** Connector name keyed into `@ship-it-ui/icons` connectorGlyphs. */
|
|
584
|
+
connector: ConnectorName | (string & {});
|
|
585
|
+
/** Display name shown next to the logo. */
|
|
586
|
+
name: ReactNode;
|
|
587
|
+
/** Sync status. Drives the status dot tone + the default status label. */
|
|
588
|
+
status: ConnectorStatus;
|
|
589
|
+
/** Last successful sync timestamp. Formatted relative to `relativeNow`. */
|
|
590
|
+
lastSyncedAt?: Date | string | number;
|
|
591
|
+
/** Reference time for relative formatting (injectable for tests/SSR). */
|
|
592
|
+
relativeNow?: Date;
|
|
593
|
+
/** Free-text summary (e.g. "1,243 docs · 8 channels"). */
|
|
594
|
+
summary?: ReactNode;
|
|
595
|
+
/** Trailing action slot — typically a `Button` or `DropdownMenu` trigger. */
|
|
596
|
+
actions?: ReactNode;
|
|
597
|
+
/** Click handler. When provided, the card becomes a button. */
|
|
598
|
+
onClick?: () => void;
|
|
599
|
+
/**
|
|
600
|
+
* Accessible name override. Required when `onClick` is set *and* `name` is
|
|
601
|
+
* not a string — without it the button has no accessible name (axe
|
|
602
|
+
* `button-name`). Optional otherwise.
|
|
603
|
+
*/
|
|
604
|
+
accessibleName?: string;
|
|
605
|
+
}
|
|
606
|
+
declare const ConnectorCard: react.ForwardRefExoticComponent<ConnectorCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* EntityTable — DataTable preset with two ShipIt-aware column helpers:
|
|
610
|
+
* `entityColumn(...)` for the typed name cell and `entityTypeColumn()` for a
|
|
611
|
+
* standalone type column. Everything else (sort, selection, sticky header)
|
|
612
|
+
* comes from `@ship-it-ui/ui` DataTable as-is.
|
|
613
|
+
*/
|
|
614
|
+
interface MinimalEntity {
|
|
615
|
+
id: string;
|
|
616
|
+
type: EntityType;
|
|
617
|
+
name: string;
|
|
618
|
+
}
|
|
619
|
+
type EntityTableProps<T extends MinimalEntity> = Omit<DataTableProps<T>, 'rowKey'> & {
|
|
620
|
+
rowKey?: (row: T) => string;
|
|
621
|
+
};
|
|
622
|
+
declare function EntityTable<T extends MinimalEntity>(props: EntityTableProps<T> & {
|
|
623
|
+
ref?: Ref<HTMLTableElement>;
|
|
624
|
+
}): react_jsx_runtime.JSX.Element;
|
|
625
|
+
/**
|
|
626
|
+
* Pre-built column for the entity name. Renders the type glyph (in the type's
|
|
627
|
+
* tone) followed by the name in mono. Sorts on `name`.
|
|
628
|
+
*/
|
|
629
|
+
declare function entityColumn<T extends MinimalEntity>(options?: {
|
|
630
|
+
key?: string;
|
|
631
|
+
header?: string;
|
|
632
|
+
}): DataTableColumn<T>;
|
|
633
|
+
/**
|
|
634
|
+
* Pre-built column rendering the canonical EntityBadge.
|
|
635
|
+
*/
|
|
636
|
+
declare function entityTypeColumn<T extends MinimalEntity>(options?: {
|
|
637
|
+
key?: string;
|
|
638
|
+
header?: string;
|
|
639
|
+
}): DataTableColumn<T>;
|
|
640
|
+
|
|
641
|
+
export { AskBar, type AskBarProps, CTAStrip, type CTAStripProps, Citation, type CitationProps, ConfidenceIndicator, type ConfidenceIndicatorProps, type ConfidenceTier, ConnectorCard, type ConnectorCardProps, type ConnectorStatus, CopilotMessage, type CopilotMessageProps, type CopilotRole, ENTITY_GLYPH, ENTITY_LABEL, ENTITY_TONE_BG, ENTITY_TONE_CLASS, EntityBadge, type EntityBadgeProps, type EntityBadgeVariant, EntityCard, type EntityCardProps, EntityListRow, EntityListRowButton, type EntityListRowButtonProps, EntityListRowDiv, type EntityListRowDivProps, type EntityListRowProps, type EntityStat, EntityTable, type EntityTableProps, type EntityType, type EntityTypeMeta, 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 KnownEntityType, 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, entityColumn, entityTypeColumn, getEntityTypeMeta, listEntityTypes, registerEntityType, registerEntityTypes, resetEntityTypeRegistry };
|