feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
import { FlexBox } from '../../atoms/flex-box';
|
|
|
|
|
import { Card } from '../../molecules/card';
|
|
|
|
|
import { cn } from '../../tools/cn';
|
feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.
- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
import { PostAccess } from './components/PostAccess';
|
|
|
|
|
import { PostAccessNote } from './components/PostAccessNote';
|
feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
import { PostActions } from './components/PostActions';
|
|
|
|
|
import { PostContent } from './components/PostContent';
|
|
|
|
|
import { PostHead } from './components/PostHead';
|
|
|
|
|
import { PostLocked } from './components/PostLocked';
|
|
|
|
|
import { LINKED_CARD_CLASS } from './constants';
|
|
|
|
|
import type { PostCardProps } from './types';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The one post for the channel, the feed and the post page: free, locked, subscriber and owner
|
|
|
|
|
* views of text, image and prediction posts. A locked post keeps the header and swaps the body
|
|
|
|
|
* for the shared LockedTeaser, so locking never changes the feed's rhythm.
|
|
|
|
|
*
|
feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.
- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
* Server-renderable: only a multi-image carousel, a frozen edit's tooltip and the desktop share
|
|
|
|
|
* menu are client parts. The handlers (`owner`, `onShare`, `onCopyLink`, `onImageClick`, `onCta`)
|
|
|
|
|
* need a client caller; a server render passes `href`, `channelHref` and `ctaHref` links instead.
|
feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
*/
|
|
|
|
|
export function PostCard(props: PostCardProps) {
|
|
|
|
|
const {
|
|
|
|
|
author,
|
|
|
|
|
channelHref,
|
|
|
|
|
href,
|
|
|
|
|
publishedAt,
|
|
|
|
|
now,
|
|
|
|
|
timeLabel,
|
feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.
- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
ownerTag,
|
feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
premium = props.locked ?? false,
|
|
|
|
|
edited = false,
|
|
|
|
|
variant = 'compact',
|
|
|
|
|
predictionLabels,
|
|
|
|
|
owner,
|
|
|
|
|
onShare,
|
feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.
- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
onCopyLink,
|
|
|
|
|
accessNote,
|
feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
labels,
|
|
|
|
|
className,
|
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Card
|
|
|
|
|
tag="article"
|
|
|
|
|
className={cn('min-w-0', href && LINKED_CARD_CLASS, className)}
|
|
|
|
|
>
|
|
|
|
|
<FlexBox direction="flex-col" gap="gap-3" className="min-w-0">
|
|
|
|
|
<PostHead
|
|
|
|
|
author={author}
|
|
|
|
|
channelHref={channelHref}
|
|
|
|
|
href={href}
|
|
|
|
|
publishedAt={publishedAt}
|
|
|
|
|
now={now}
|
|
|
|
|
timeLabel={timeLabel}
|
feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.
- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
ownerTag={ownerTag}
|
feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
premium={premium}
|
|
|
|
|
edited={edited}
|
|
|
|
|
labels={labels}
|
|
|
|
|
/>
|
|
|
|
|
{props.locked ? (
|
|
|
|
|
<PostLocked
|
|
|
|
|
captionPreview={props.captionPreview}
|
|
|
|
|
mediaCount={props.mediaCount}
|
|
|
|
|
prediction={props.prediction}
|
|
|
|
|
viewer={props.viewer}
|
|
|
|
|
onCta={props.onCta}
|
|
|
|
|
ctaHref={props.ctaHref}
|
feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.
- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
ctaFrozenReason={props.ctaFrozenReason}
|
|
|
|
|
ctaIndicator={props.ctaIndicator}
|
feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
publishedAt={publishedAt}
|
|
|
|
|
now={now}
|
|
|
|
|
premium={premium}
|
|
|
|
|
predictionLabels={predictionLabels}
|
|
|
|
|
labels={labels}
|
|
|
|
|
/>
|
|
|
|
|
) : (
|
|
|
|
|
<PostContent
|
|
|
|
|
text={props.text}
|
|
|
|
|
images={props.images}
|
|
|
|
|
onImageClick={props.onImageClick}
|
|
|
|
|
prediction={props.prediction}
|
|
|
|
|
variant={variant}
|
|
|
|
|
href={href}
|
|
|
|
|
publishedAt={publishedAt}
|
|
|
|
|
now={now}
|
|
|
|
|
premium={premium}
|
|
|
|
|
onClosePrediction={owner?.onClosePrediction}
|
|
|
|
|
predictionLabels={predictionLabels}
|
|
|
|
|
labels={labels}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.
- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
{owner?.accessFrozen && props.prediction == null && (
|
|
|
|
|
<PostAccess
|
|
|
|
|
premium={premium}
|
|
|
|
|
reason={owner.editFrozenReason ?? labels.owner.editFrozen}
|
|
|
|
|
labels={labels}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
{!props.locked && accessNote != null && (
|
|
|
|
|
<PostAccessNote>{accessNote}</PostAccessNote>
|
|
|
|
|
)}
|
feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
<PostActions
|
|
|
|
|
owner={owner}
|
|
|
|
|
onShare={onShare}
|
feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.
- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:29:33 +00:00
|
|
|
onCopyLink={onCopyLink}
|
feat(island): sync components with the Lumina design system
New components:
- Lightbox, NetworkStatus (+ useOnline), TierOption, SkeletonPreset
Rebuilt to the design system:
- PredictionCard: range bar, open KPIs, closed hero, price ladder, horizon progress, seal, locked veil
- CreatorStats: form curve, outcome split, KPI tiles, insights and streak; null renders nothing
- PostCard, LockedTeaser, MediaCarousel: owner action rules, expanded variant, viewer CTA, locked order
- SubscriptionCard: active/suspended/expired/refunded, compact density, amount and support rows
- Countdown, ResendCode, OtpInput: absolute end times, DS wording and thresholds, WebOTP
Fixes:
- Dialog: waits only for finite exit animations, keeps non-dismissible halts open, focuses the
panel, closes on scrim presses only, mounts the panel only while open
- Toaster: moves its region into the open dialog so toasts show and stay tappable over sheets
- Button: blocked submit, frozen cursor, loading links; TextInput focus border; Card, Banner,
ChoiceCard, StepProgress, ErrorState, Amount and Avatar details
- Tokens: muted status tracks, inverse controls, scrim chip, inverse and lightbox focus rings;
the spinner keeps turning under reduced motion
Adds sonner and svgo; island gets the icons target and the hooks subpath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:23:59 +00:00
|
|
|
premium={premium}
|
|
|
|
|
isPrediction={props.prediction != null}
|
|
|
|
|
labels={labels}
|
|
|
|
|
/>
|
|
|
|
|
</FlexBox>
|
|
|
|
|
</Card>
|
|
|
|
|
);
|
|
|
|
|
}
|