@arbidocs/blocks 0.3.142 → 0.3.143

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.
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ComponentType, ReactNode } from 'react';
2
+ import { ReactNode, ComponentType } from 'react';
3
3
  import { LucideIcon } from 'lucide-react';
4
4
  import { UseBoundStore, StoreApi } from 'zustand';
5
5
 
@@ -269,6 +269,89 @@ declare function pct(n: number): string;
269
269
  */
270
270
  declare function formatPageRefs(pages: number[]): string;
271
271
 
272
+ /**
273
+ * The one shape every timeline view in this package reads.
274
+ *
275
+ * A timeline entry is a LABELLED SPAN: something that happened, and the stretch
276
+ * of time it occupies. An instant is simply a span whose end equals its start —
277
+ * "5pm" is a moment, not a five-minute window — so callers never have to model
278
+ * "events" and "periods" as two different things.
279
+ *
280
+ * Views are generic over `T extends TimelineItem`, so a caller may hand over its
281
+ * own richer objects (a note, a matter, a booking) and get that exact type back
282
+ * from `onSelect` and `renderDetail` without a cast.
283
+ */
284
+ interface TimelineItem {
285
+ /** Stable identity. Used as the React key and to track the active row. */
286
+ id: string;
287
+ /** One-line label, drawn on the bar and in the row header. */
288
+ label: string;
289
+ /** ISO 8601 start of the span. */
290
+ start: string;
291
+ /** ISO 8601 end. Omit (or equal `start`) for an instant. */
292
+ end?: string | null;
293
+ /** Longer text shown in the detail panel. */
294
+ description?: string;
295
+ }
296
+
297
+ interface TimelineCalendarProps<T extends TimelineItem = TimelineItem> {
298
+ items: T[];
299
+ /** Clicking a bar. The caller's own object comes back, not a copy. */
300
+ onSelect?: (item: T) => void;
301
+ /** Bars shown per week before the remainder collapses to "+n more". */
302
+ maxLanes?: number;
303
+ /** Shown when nothing in `items` carries a date. */
304
+ emptyState?: ReactNode;
305
+ className?: string;
306
+ /** Prefix for every `data-testid` this view emits. */
307
+ testId?: string;
308
+ }
309
+ declare function TimelineCalendar<T extends TimelineItem = TimelineItem>({ items, onSelect, maxLanes, emptyState, className, testId, }: TimelineCalendarProps<T>): react.JSX.Element;
310
+
311
+ interface TimelineGanttProps<T extends TimelineItem = TimelineItem> {
312
+ items: T[];
313
+ /** The selected item, or null when the panel closes. */
314
+ onSelect?: (item: T | null) => void;
315
+ /** Extra detail-panel content for the selected item — sources, links, actions. */
316
+ renderDetail?: (item: T) => ReactNode;
317
+ /** Width of the row-label gutter, in pixels. */
318
+ labelWidth?: number;
319
+ /** Shown when nothing in `items` carries a usable date. */
320
+ emptyMessage?: string;
321
+ className?: string;
322
+ /** Prefix for every `data-testid` this view emits. */
323
+ testId?: string;
324
+ }
325
+ declare function TimelineGantt<T extends TimelineItem = TimelineItem>({ items, onSelect, renderDetail, labelWidth, emptyMessage, className, testId, }: TimelineGanttProps<T>): react.JSX.Element;
326
+
327
+ type TimelineViewMode = 'calendar' | 'gantt';
328
+ interface TimelineProps<T extends TimelineItem = TimelineItem> {
329
+ items: T[];
330
+ /** Pin the view. Omit to show the toggle and let the reader switch. */
331
+ view?: TimelineViewMode;
332
+ /** Which view the toggle starts on. */
333
+ defaultView?: TimelineViewMode;
334
+ onSelect?: (item: T) => void;
335
+ /** Extra Gantt detail-panel content — sources, links, actions. */
336
+ renderDetail?: (item: T) => ReactNode;
337
+ /** Shown when nothing carries a date. */
338
+ emptyMessage?: string;
339
+ className?: string;
340
+ testId?: string;
341
+ }
342
+ declare function Timeline<T extends TimelineItem = TimelineItem>({ items, view, defaultView, onSelect, renderDetail, emptyMessage, className, testId, }: TimelineProps<T>): react.JSX.Element;
343
+
344
+ /** Month name and year, e.g. "October 2019". */
345
+ declare function monthLabel(d: Date): string;
346
+ /** The UTC midnight that starts the day `d` falls in. */
347
+ declare function utcDay(d: Date): Date;
348
+ /** `YYYY-MM-DD` for the UTC day — a stable key and testid suffix. */
349
+ declare function dayKey(d: Date): string;
350
+ /** Parse an ISO string, returning null rather than an Invalid Date. */
351
+ declare function parseIso(iso: string | null | undefined): Date | null;
352
+ /** Format a stored span the way its precision implies. '' when undated. */
353
+ declare function formatSpan(startIso: string | null | undefined, endIso: string | null | undefined): string;
354
+
272
355
  /** Editorial heading block for marketing sections: eyebrow + title + lead. */
273
356
  declare function SectionHeading({ eyebrow, title, lead, align, className, invert, eyebrowClassName, }: {
274
357
  eyebrow?: string;
@@ -694,4 +777,4 @@ interface TestimonialGridProps {
694
777
  /** A grid of multiple pull-quote testimonials. */
695
778
  declare function TestimonialGrid({ items, columns, testId }: TestimonialGridProps): react.JSX.Element;
696
779
 
697
- export { type NavLink as $, Accordion as A, Banner as B, CTABanner as C, type FaqItem as D, FeatureGrid as E, FAQ as F, type FeatureGridProps as G, type FeatureItem as H, type FontPairing as I, Footer as J, type FooterColumn as K, type FooterLink as L, type FooterProps as M, Gallery as N, type GalleryImage as O, type GalleryProps as P, Hero as Q, type HeroCta as R, type HeroProps as S, ListBlock as T, type ListBlockProps as U, type ListItem as V, LogoCloud as W, type LogoCloudProps as X, type LogoItem as Y, MediaText as Z, type MediaTextProps as _, type AccordionItem as a, Navbar as a0, type NavbarProps as a1, type PricingPlan as a2, PricingTable as a3, type PricingTableProps as a4, RichTextBlock as a5, type RichTextBlockProps as a6, SectionHeading as a7, Spacer as a8, type SpacerProps as a9, type VideoEmbedProps as aA, applyFontVars as aB, applyStoredTheme as aC, applyThemeVars as aD, clearFontVars as aE, clearThemeVars as aF, createThemeStore as aG, daysUntil as aH, fmtDate as aI, fmtDateTime as aJ, fontPackages as aK, formatPageRefs as aL, fromNow as aM, gbp as aN, getFontPairing as aO, hrs as aP, initials as aQ, matchFontPairing as aR, pct as aS, tid as aT, toEmbedUrl as aU, toHslTriplet as aV, type StepItem as aa, Steps as ab, type StepsProps as ac, THEME_STYLE_ID as ad, type TabItem as ae, Tabs as af, type TabsProps as ag, TeamGrid as ah, type TeamGridProps as ai, type TeamMember as aj, Testimonial as ak, TestimonialGrid as al, type TestimonialGridProps as am, type TestimonialItem as an, type TestimonialProps as ao, type ThemeBundle as ap, ThemeEditor as aq, type ThemeEditorProps as ar, type ThemeEmitMode as as, type ThemeFonts as at, type ThemePreset as au, type ThemeState as av, type ThemeStoreConfig as aw, type ThemeTokens as ax, type VideoAspect as ay, VideoEmbed as az, type AccordionProps as b, type ApplyThemeOptions as c, AvatarBlock as d, type AvatarBlockProps as e, type BannerProps as f, type BannerTone as g, BlockImage as h, type BlockImageProps as i, BlockLink as j, type BlockLinkComponent as k, type BlockLinkProps as l, type CTABannerProps as m, Callout as n, type CalloutProps as o, type CalloutVariant as p, type ColorToken as q, Columns as r, type ColumnsProps as s, type ContactField as t, ContactForm as u, type ContactFormProps as v, Container as w, type ContainerProps as x, type FAQProps as y, FONT_PAIRINGS as z };
780
+ export { type NavLink as $, Accordion as A, Banner as B, CTABanner as C, type FaqItem as D, FeatureGrid as E, FAQ as F, type FeatureGridProps as G, type FeatureItem as H, type FontPairing as I, Footer as J, type FooterColumn as K, type FooterLink as L, type FooterProps as M, Gallery as N, type GalleryImage as O, type GalleryProps as P, Hero as Q, type HeroCta as R, type HeroProps as S, ListBlock as T, type ListBlockProps as U, type ListItem as V, LogoCloud as W, type LogoCloudProps as X, type LogoItem as Y, MediaText as Z, type MediaTextProps as _, type AccordionItem as a, matchFontPairing as a$, Navbar as a0, type NavbarProps as a1, type PricingPlan as a2, PricingTable as a3, type PricingTableProps as a4, RichTextBlock as a5, type RichTextBlockProps as a6, SectionHeading as a7, Spacer as a8, type SpacerProps as a9, type TimelineCalendarProps as aA, TimelineGantt as aB, type TimelineGanttProps as aC, type TimelineItem as aD, type TimelineProps as aE, type TimelineViewMode as aF, type VideoAspect as aG, VideoEmbed as aH, type VideoEmbedProps as aI, applyFontVars as aJ, applyStoredTheme as aK, applyThemeVars as aL, clearFontVars as aM, clearThemeVars as aN, createThemeStore as aO, dayKey as aP, daysUntil as aQ, fmtDate as aR, fmtDateTime as aS, fontPackages as aT, formatPageRefs as aU, formatSpan as aV, fromNow as aW, gbp as aX, getFontPairing as aY, hrs as aZ, initials as a_, type StepItem as aa, Steps as ab, type StepsProps as ac, THEME_STYLE_ID as ad, type TabItem as ae, Tabs as af, type TabsProps as ag, TeamGrid as ah, type TeamGridProps as ai, type TeamMember as aj, Testimonial as ak, TestimonialGrid as al, type TestimonialGridProps as am, type TestimonialItem as an, type TestimonialProps as ao, type ThemeBundle as ap, ThemeEditor as aq, type ThemeEditorProps as ar, type ThemeEmitMode as as, type ThemeFonts as at, type ThemePreset as au, type ThemeState as av, type ThemeStoreConfig as aw, type ThemeTokens as ax, Timeline as ay, TimelineCalendar as az, type AccordionProps as b, monthLabel as b0, parseIso as b1, pct as b2, tid as b3, toEmbedUrl as b4, toHslTriplet as b5, utcDay as b6, type ApplyThemeOptions as c, AvatarBlock as d, type AvatarBlockProps as e, type BannerProps as f, type BannerTone as g, BlockImage as h, type BlockImageProps as i, BlockLink as j, type BlockLinkComponent as k, type BlockLinkProps as l, type CTABannerProps as m, Callout as n, type CalloutProps as o, type CalloutVariant as p, type ColorToken as q, Columns as r, type ColumnsProps as s, type ContactField as t, ContactForm as u, type ContactFormProps as v, Container as w, type ContainerProps as x, type FAQProps as y, FONT_PAIRINGS as z };