@olwiba/ui 0.0.37 → 0.0.38

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.d.ts CHANGED
@@ -814,6 +814,25 @@ interface PostListProps {
814
814
  }
815
815
  declare function PostList({ posts, renderLink, emptyMessage }: PostListProps): react_jsx_runtime.JSX.Element;
816
816
 
817
+ interface ChangelogCardProps {
818
+ title: string;
819
+ summary: string;
820
+ date: string;
821
+ slug: string;
822
+ version?: string;
823
+ hrefPrefix?: string;
824
+ renderLink?: AppShellRenderLink;
825
+ }
826
+ declare function ChangelogCard({ title, summary, date, slug, version, hrefPrefix, renderLink, }: ChangelogCardProps): react_jsx_runtime.JSX.Element;
827
+
828
+ interface ChangelogListProps {
829
+ entries: ChangelogCardProps[];
830
+ renderLink?: AppShellRenderLink;
831
+ emptyMessage?: string;
832
+ hrefPrefix?: string;
833
+ }
834
+ declare function ChangelogList({ entries, renderLink, emptyMessage, hrefPrefix, }: ChangelogListProps): react_jsx_runtime.JSX.Element;
835
+
817
836
  interface MdxContentProps {
818
837
  code: string;
819
838
  }
@@ -875,4 +894,4 @@ interface UsePaginationReturn {
875
894
  }
876
895
  declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
877
896
 
878
- export { type AppNavItem, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CtaSection, type CtaSectionProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, FeaturesSection, type FeaturesSectionProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, MdxContent, type MdxContentProps, Navbar, type NavbarProps, NewsletterSection, type NewsletterSectionProps, OlwibaUIProvider, type OlwibaUIProviderProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PhoneFrame, type PhoneFrameProps, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, RegisterHotkeys, RootErrorFallback, SectionTitle, type SectionTitleProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, Suspensed, Switch, type SwitchProps, TeamSection, TestimonialCard, type TestimonialCardProps, TestimonialsSection, type TestimonialsSectionProps, Textarea, type TextareaProps, ThemeColorUpdater, ThemeSwitchMinimal, type UIMode, Underlay, type UnderlayProps, type UnderlayVariant, type UpgradeComparisonRow, UpgradePrompt, type UpgradePromptProps, type UseConfirmReturn, type UseControlledOpenReturn, type UsePaginationReturn, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
897
+ export { type AppNavItem, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, ChangelogCard, type ChangelogCardProps, ChangelogList, type ChangelogListProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CtaSection, type CtaSectionProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, FeaturesSection, type FeaturesSectionProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, MdxContent, type MdxContentProps, Navbar, type NavbarProps, NewsletterSection, type NewsletterSectionProps, OlwibaUIProvider, type OlwibaUIProviderProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PhoneFrame, type PhoneFrameProps, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, RegisterHotkeys, RootErrorFallback, SectionTitle, type SectionTitleProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, Suspensed, Switch, type SwitchProps, TeamSection, TestimonialCard, type TestimonialCardProps, TestimonialsSection, type TestimonialsSectionProps, Textarea, type TextareaProps, ThemeColorUpdater, ThemeSwitchMinimal, type UIMode, Underlay, type UnderlayProps, type UnderlayVariant, type UpgradeComparisonRow, UpgradePrompt, type UpgradePromptProps, type UseConfirmReturn, type UseControlledOpenReturn, type UsePaginationReturn, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
package/dist/index.js CHANGED
@@ -2164,6 +2164,59 @@ function PostList({ posts, renderLink, emptyMessage = "No posts published yet."
2164
2164
  }
2165
2165
  return /* @__PURE__ */ jsx("div", { className: "grid gap-8 sm:grid-cols-2", children: posts.map((post) => /* @__PURE__ */ jsx(PostCard, { ...post, renderLink }, post.slug)) });
2166
2166
  }
2167
+ function formatDate2(dateStr) {
2168
+ return new Date(dateStr).toLocaleDateString("en-US", {
2169
+ year: "numeric",
2170
+ month: "long",
2171
+ day: "numeric"
2172
+ });
2173
+ }
2174
+ function ChangelogCard({
2175
+ title,
2176
+ summary,
2177
+ date,
2178
+ slug,
2179
+ version,
2180
+ hrefPrefix = "/changelog",
2181
+ renderLink
2182
+ }) {
2183
+ const href = `${hrefPrefix}/${slug}`;
2184
+ const LinkWrapper = ({
2185
+ children,
2186
+ className
2187
+ }) => renderLink ? renderLink({ href, children, className }) : /* @__PURE__ */ jsx("a", { href, className, children });
2188
+ return /* @__PURE__ */ jsxs("article", { className: "group flex flex-col gap-3 border-b border-border/60 pb-8 last:border-0 last:pb-0", children: [
2189
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 text-sm text-muted-foreground", children: [
2190
+ /* @__PURE__ */ jsx("time", { dateTime: date, children: formatDate2(date) }),
2191
+ version && /* @__PURE__ */ jsxs(Fragment, { children: [
2192
+ /* @__PURE__ */ jsx("span", { children: "\xB7" }),
2193
+ /* @__PURE__ */ jsx(Badge$1, { variant: "secondary", className: "font-mono text-xs", children: version })
2194
+ ] })
2195
+ ] }),
2196
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold leading-snug tracking-tight", children: /* @__PURE__ */ jsx(LinkWrapper, { className: "transition-colors hover:text-primary", children: title }) }),
2197
+ /* @__PURE__ */ jsx("p", { className: cn$1("line-clamp-3 text-sm text-muted-foreground"), children: summary }),
2198
+ /* @__PURE__ */ jsx(LinkWrapper, { className: "text-sm font-medium text-primary hover:underline", children: "Read release notes \u2192" })
2199
+ ] });
2200
+ }
2201
+ function ChangelogList({
2202
+ entries,
2203
+ renderLink,
2204
+ emptyMessage = "No changelog entries yet.",
2205
+ hrefPrefix
2206
+ }) {
2207
+ if (entries.length === 0) {
2208
+ return /* @__PURE__ */ jsx("p", { className: "text-sm italic text-muted-foreground", children: emptyMessage });
2209
+ }
2210
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-8", children: entries.map((entry) => /* @__PURE__ */ jsx(
2211
+ ChangelogCard,
2212
+ {
2213
+ ...entry,
2214
+ hrefPrefix,
2215
+ renderLink
2216
+ },
2217
+ entry.slug
2218
+ )) });
2219
+ }
2167
2220
  var components = {
2168
2221
  h1: ({ className, ...props }) => /* @__PURE__ */ jsx("h1", { className: cn("mt-8 scroll-m-20 text-3xl font-bold tracking-tight text-foreground first:mt-0", className), ...props }),
2169
2222
  h2: ({ className, ...props }) => /* @__PURE__ */ jsx("h2", { className: cn("mt-10 scroll-m-20 text-2xl font-semibold tracking-tight text-foreground first:mt-0", className), ...props }),
@@ -2322,6 +2375,6 @@ function usePagination(total, pageSize) {
2322
2375
  return { page, pageSize, totalPages, offset, hasPrev: page > 1, hasNext: page < totalPages, goTo, next, prev };
2323
2376
  }
2324
2377
 
2325
- export { AppScreen, AppShell, AuthSection, Badge, Button, Card, Checkbox, ConfirmDialog, ContactSection, ContextMenu, CountUp, CtaSection, DevBanner, Dock, EmptyState, ErrorPage, FadeIn, FaqSection, FeatureCard, FeaturesSection, Footer, FullPageSpinner, GlassCard, HeroSection, ImageCard, Input, LogoStrip, MdxContent, Navbar, NewsletterSection, OlwibaUIProvider, Overlay, PageHeader, PageTransition, PhoneFrame, PostCard, PostList, PricingCard, PricingSection, RegisterHotkeys, RootErrorFallback, SectionTitle, Spotlight, StaggerChildren, StatCard, StatsSection, Suspensed, Switch, TeamSection, TestimonialCard, TestimonialsSection, Textarea, ThemeColorUpdater, ThemeSwitchMinimal, Underlay, UpgradePrompt, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
2378
+ export { AppScreen, AppShell, AuthSection, Badge, Button, Card, ChangelogCard, ChangelogList, Checkbox, ConfirmDialog, ContactSection, ContextMenu, CountUp, CtaSection, DevBanner, Dock, EmptyState, ErrorPage, FadeIn, FaqSection, FeatureCard, FeaturesSection, Footer, FullPageSpinner, GlassCard, HeroSection, ImageCard, Input, LogoStrip, MdxContent, Navbar, NewsletterSection, OlwibaUIProvider, Overlay, PageHeader, PageTransition, PhoneFrame, PostCard, PostList, PricingCard, PricingSection, RegisterHotkeys, RootErrorFallback, SectionTitle, Spotlight, StaggerChildren, StatCard, StatsSection, Suspensed, Switch, TeamSection, TestimonialCard, TestimonialsSection, Textarea, ThemeColorUpdater, ThemeSwitchMinimal, Underlay, UpgradePrompt, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
2326
2379
  //# sourceMappingURL=index.js.map
2327
2380
  //# sourceMappingURL=index.js.map