@yuhuanowo/yunui 0.2.17 → 0.2.18
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 +3 -1
- package/README.zh-CN.md +5 -1
- package/README.zh-TW.md +5 -1
- package/dist/ai.d.ts +99 -3
- package/dist/ai.js +212 -104
- package/dist/ai.js.map +1 -1
- package/dist/chat.d.ts +10 -3
- package/dist/chat.js +12 -7
- package/dist/chat.js.map +1 -1
- package/dist/{chunk-HH3JBHRP.js → chunk-AFVENY4D.js} +286 -31
- package/dist/chunk-AFVENY4D.js.map +1 -0
- package/dist/{chunk-F2HG4TOQ.js → chunk-GAXVET76.js} +13 -19
- package/dist/chunk-GAXVET76.js.map +1 -0
- package/dist/{chunk-DDUP7GAX.js → chunk-LEBQPP4B.js} +69 -3
- package/dist/chunk-LEBQPP4B.js.map +1 -0
- package/dist/chunk-ST6TSBVQ.js +208 -0
- package/dist/chunk-ST6TSBVQ.js.map +1 -0
- package/dist/chunk-V7VJKZ5Q.js +254 -0
- package/dist/chunk-V7VJKZ5Q.js.map +1 -0
- package/dist/{chunk-BCOKFWXC.js → chunk-YKWRCA2S.js} +80 -156
- package/dist/chunk-YKWRCA2S.js.map +1 -0
- package/dist/content.d.ts +10 -2
- package/dist/content.js +50 -40
- package/dist/content.js.map +1 -1
- package/dist/index.d.ts +266 -16
- package/dist/index.js +4 -4
- package/dist/patterns.d.ts +471 -22
- package/dist/patterns.js +783 -131
- package/dist/patterns.js.map +1 -1
- package/icons/providers/gmi.svg +5 -0
- package/package.json +3 -4
- package/styles/content.css +3 -1
- package/styles/yunui.css +197 -84
- package/dist/chunk-BCOKFWXC.js.map +0 -1
- package/dist/chunk-DDUP7GAX.js.map +0 -1
- package/dist/chunk-F2HG4TOQ.js.map +0 -1
- package/dist/chunk-HH3JBHRP.js.map +0 -1
- package/dist/chunk-N4QO7RN5.js +0 -98
- package/dist/chunk-N4QO7RN5.js.map +0 -1
- package/dist/chunk-QEIBYOG2.js +0 -188
- package/dist/chunk-QEIBYOG2.js.map +0 -1
package/dist/patterns.d.ts
CHANGED
|
@@ -4,7 +4,24 @@ export { F as Footer, a as FooterLink, b as FooterProps, c as FooterSection, d a
|
|
|
4
4
|
|
|
5
5
|
declare function BackgroundEffects(): React$1.JSX.Element;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface CodeDemoProps {
|
|
8
|
+
/** The OpenAI-compatible base URL the snippets point at. */
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
/** Model id used in the example request. */
|
|
11
|
+
model?: string;
|
|
12
|
+
/** Placeholder shown where the reader's key goes. */
|
|
13
|
+
apiKeyPlaceholder?: string;
|
|
14
|
+
/** Message body sent in the example request. */
|
|
15
|
+
prompt?: string;
|
|
16
|
+
/** Tab labels. Defaults are language names, but they stay overridable. */
|
|
17
|
+
labels?: {
|
|
18
|
+
python?: string;
|
|
19
|
+
javascript?: string;
|
|
20
|
+
curl?: string;
|
|
21
|
+
};
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
declare function CodeDemo({ baseUrl, model, apiKeyPlaceholder, prompt, labels, className, }?: CodeDemoProps): React$1.JSX.Element;
|
|
8
25
|
|
|
9
26
|
interface FAQItem {
|
|
10
27
|
/** The question heading. */
|
|
@@ -49,13 +66,31 @@ interface CodeBlockProps {
|
|
|
49
66
|
/** Styled code block with a window-chrome header, optional tabs, line numbers, basic syntax highlighting, and copy. */
|
|
50
67
|
declare function CodeBlock({ code, language, filename, showLineNumbers, copyable, className, tabs, }: CodeBlockProps): React$1.JSX.Element;
|
|
51
68
|
|
|
52
|
-
|
|
69
|
+
interface LLMCopyButtonProps {
|
|
53
70
|
markdownUrl: string;
|
|
54
|
-
|
|
55
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Every string this renders. The library ships no copy of its own — these
|
|
73
|
+
* defaults exist only so the component is usable untranslated.
|
|
74
|
+
*/
|
|
75
|
+
labels?: {
|
|
76
|
+
copy?: string;
|
|
77
|
+
copied?: string;
|
|
78
|
+
title?: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
declare function LLMCopyButton({ markdownUrl, labels }: LLMCopyButtonProps): React$1.JSX.Element;
|
|
82
|
+
interface ViewOptionsProps {
|
|
56
83
|
markdownUrl: string;
|
|
57
84
|
githubUrl?: string;
|
|
58
|
-
|
|
85
|
+
/** Every string this renders; defaults keep it usable untranslated. */
|
|
86
|
+
labels?: {
|
|
87
|
+
markdown?: string;
|
|
88
|
+
markdownTitle?: string;
|
|
89
|
+
github?: string;
|
|
90
|
+
githubTitle?: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
declare function ViewOptions({ markdownUrl, githubUrl, labels }: ViewOptionsProps): React$1.JSX.Element;
|
|
59
94
|
|
|
60
95
|
interface BlogCardProps {
|
|
61
96
|
/** Post title. */
|
|
@@ -262,11 +297,19 @@ interface PageLayoutProps {
|
|
|
262
297
|
/** Override the `<main>` classes — defaults to `flex-1 pt-28` (clears the
|
|
263
298
|
* fixed navbar). Pass your own offset for a taller/shorter bar. */
|
|
264
299
|
mainClassName?: string;
|
|
300
|
+
/**
|
|
301
|
+
* `id` on the `<main>` element — the target a "skip to main content" link
|
|
302
|
+
* jumps to. Defaults to `"main-content"`, the conventional value, so the
|
|
303
|
+
* skip link in a consumer's root layout actually lands somewhere. Pass
|
|
304
|
+
* `undefined` explicitly if a page must not carry the id (e.g. two shells
|
|
305
|
+
* on one page). @defaultValue "main-content"
|
|
306
|
+
*/
|
|
307
|
+
mainId?: string;
|
|
265
308
|
/** Extra classes on the outer wrapper. */
|
|
266
309
|
className?: string;
|
|
267
310
|
}
|
|
268
311
|
/** Full-height page shell: navbar slot · offset `<main>` · footer slot. */
|
|
269
|
-
declare function PageLayout({ children, navbar, footer, hideFooter, transparentBg, mainClassName, className, }: PageLayoutProps): React$1.JSX.Element;
|
|
312
|
+
declare function PageLayout({ children, navbar, footer, hideFooter, transparentBg, mainClassName, mainId, className, }: PageLayoutProps): React$1.JSX.Element;
|
|
270
313
|
|
|
271
314
|
interface PageLoadingStateProps {
|
|
272
315
|
/** Optional text shown beside the spinner. */
|
|
@@ -297,12 +340,6 @@ interface PageEmptyStateProps {
|
|
|
297
340
|
/** Centered in-page empty state with an icon, title, description, and optional action. */
|
|
298
341
|
declare function PageEmptyState({ icon: Icon, title, description, action }: PageEmptyStateProps): React$1.JSX.Element;
|
|
299
342
|
|
|
300
|
-
/**
|
|
301
|
-
* Canonical dashboard stat card — the single source for every metric tile.
|
|
302
|
-
* Structure is the dashboard overview card; `tone` provides semantic color
|
|
303
|
-
* (amber=pending, red=rejected, …); icon/trend/subtext/delay are all optional
|
|
304
|
-
* so compact colored tiles and rich trend cards share one component.
|
|
305
|
-
*/
|
|
306
343
|
declare const TONES: Record<string, {
|
|
307
344
|
card: string;
|
|
308
345
|
value: string;
|
|
@@ -486,23 +523,38 @@ interface SessionItemProps {
|
|
|
486
523
|
time?: ReactNode;
|
|
487
524
|
/** Marks the current session — shows a badge and hides the revoke button. */
|
|
488
525
|
current?: boolean;
|
|
489
|
-
currentLabel?: ReactNode;
|
|
490
526
|
/** Dims the row and shows an "inactive" badge. */
|
|
491
527
|
inactive?: boolean;
|
|
492
|
-
inactiveLabel?: ReactNode;
|
|
493
528
|
/** Marks the row selected without adding a badge. */
|
|
494
529
|
selected?: boolean;
|
|
495
530
|
/** Shows a pulsing leading activity rail and exposes aria-busy. */
|
|
496
531
|
running?: boolean;
|
|
497
|
-
/** Screen-reader label announced while the row is running. */
|
|
498
|
-
runningLabel?: ReactNode;
|
|
499
532
|
/** Revoke handler — when set (and not current), shows the revoke button. */
|
|
500
533
|
onRevoke?: () => void;
|
|
501
534
|
revoking?: boolean;
|
|
535
|
+
/** @deprecated Use labels.current. Retained for 0.2.17 compatibility. */
|
|
536
|
+
currentLabel?: ReactNode;
|
|
537
|
+
/** @deprecated Use labels.inactive. Retained for 0.2.17 compatibility. */
|
|
538
|
+
inactiveLabel?: ReactNode;
|
|
539
|
+
/** @deprecated Use labels.running. Retained for 0.2.17 compatibility. */
|
|
540
|
+
runningLabel?: ReactNode;
|
|
541
|
+
/** @deprecated Use labels.revoke. Retained for 0.2.17 compatibility. */
|
|
502
542
|
revokeLabel?: string;
|
|
543
|
+
/** Every string this row renders. See CONTRIBUTING.md — a component
|
|
544
|
+
* needing more than one auxiliary string groups them here. */
|
|
545
|
+
labels?: {
|
|
546
|
+
/** Badge on the current session. */
|
|
547
|
+
current?: ReactNode;
|
|
548
|
+
/** Badge on a dimmed / inactive session. */
|
|
549
|
+
inactive?: ReactNode;
|
|
550
|
+
/** Announced to screen readers while `running`. */
|
|
551
|
+
running?: ReactNode;
|
|
552
|
+
/** Accessible name of the revoke button. */
|
|
553
|
+
revoke?: string;
|
|
554
|
+
};
|
|
503
555
|
className?: string;
|
|
504
556
|
}
|
|
505
|
-
declare function SessionItem({ icon, name, detail, ip, time, current,
|
|
557
|
+
declare function SessionItem({ icon, name, detail, ip, time, current, inactive, selected, running, onRevoke, revoking, labels, currentLabel, inactiveLabel, runningLabel, revokeLabel, className, }: SessionItemProps): React$1.JSX.Element;
|
|
506
558
|
|
|
507
559
|
interface NavStateIndicatorProps extends HTMLAttributes<HTMLSpanElement> {
|
|
508
560
|
/** Shows the indicator in its selected state. */
|
|
@@ -680,20 +732,31 @@ interface NotificationPanelProps {
|
|
|
680
732
|
title: ReactNode;
|
|
681
733
|
/** Unread count shown in the header; hidden when 0. */
|
|
682
734
|
unreadCount?: number;
|
|
683
|
-
/** Word rendered after the count (e.g. "unread"). */
|
|
684
|
-
unreadLabel?: ReactNode;
|
|
685
735
|
loading?: boolean;
|
|
686
|
-
loadingLabel?: ReactNode;
|
|
687
736
|
/** When true (and not loading) the empty state replaces the children. */
|
|
688
737
|
empty?: boolean;
|
|
738
|
+
/** @deprecated Use labels.unread. Retained for 0.2.17 compatibility. */
|
|
739
|
+
unreadLabel?: ReactNode;
|
|
740
|
+
/** @deprecated Use labels.loading. Retained for 0.2.17 compatibility. */
|
|
741
|
+
loadingLabel?: ReactNode;
|
|
742
|
+
/** @deprecated Use labels.empty. Retained for 0.2.17 compatibility. */
|
|
689
743
|
emptyLabel?: ReactNode;
|
|
744
|
+
/** Every string the panel renders besides `title`. See CONTRIBUTING.md. */
|
|
745
|
+
labels?: {
|
|
746
|
+
/** Word rendered after the unread count (e.g. "unread"). */
|
|
747
|
+
unread?: ReactNode;
|
|
748
|
+
/** Shown in place of the list while `loading`. */
|
|
749
|
+
loading?: ReactNode;
|
|
750
|
+
/** Shown in place of the list while `empty`. */
|
|
751
|
+
empty?: ReactNode;
|
|
752
|
+
};
|
|
690
753
|
/** Footer slot — typically a centered "view all" adapter Link. */
|
|
691
754
|
footer?: ReactNode;
|
|
692
755
|
/** The notification rows. */
|
|
693
756
|
children?: ReactNode;
|
|
694
757
|
className?: string;
|
|
695
758
|
}
|
|
696
|
-
declare function NotificationPanel({ title, unreadCount,
|
|
759
|
+
declare function NotificationPanel({ title, unreadCount, loading, empty, labels, unreadLabel, loadingLabel, emptyLabel, footer, children, className, }: NotificationPanelProps): React$1.JSX.Element;
|
|
697
760
|
|
|
698
761
|
interface SettingRowProps {
|
|
699
762
|
title: ReactNode;
|
|
@@ -783,4 +846,390 @@ interface AvatarUploaderProps {
|
|
|
783
846
|
}
|
|
784
847
|
declare function AvatarUploader({ src, fallback, size, uploading, onSelectFile, label, className, }: AvatarUploaderProps): React$1.JSX.Element;
|
|
785
848
|
|
|
786
|
-
|
|
849
|
+
interface EyebrowProps extends HTMLAttributes<HTMLDivElement> {
|
|
850
|
+
/** Small leading glyph, e.g. a lucide icon at `w-4 h-4`. */
|
|
851
|
+
icon?: ReactNode;
|
|
852
|
+
/** The label text. */
|
|
853
|
+
children: ReactNode;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* The pill badge that sits above a marketing section title — a tinted, hairline
|
|
857
|
+
* capsule holding an icon and a short label ("Why YunUI", "功能特性").
|
|
858
|
+
*
|
|
859
|
+
* Pulled out on its own because it appears far away from any heading too:
|
|
860
|
+
* above a hero title, inside a CTA band, as a "trusted by" chip.
|
|
861
|
+
*/
|
|
862
|
+
declare function Eyebrow({ icon, children, className, ...props }: EyebrowProps): React$1.JSX.Element;
|
|
863
|
+
interface SectionHeadingProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
864
|
+
/** Eyebrow label above the title. Omit for a bare heading. */
|
|
865
|
+
badge?: ReactNode;
|
|
866
|
+
/** Glyph inside the eyebrow pill. */
|
|
867
|
+
icon?: ReactNode;
|
|
868
|
+
/** The section title. */
|
|
869
|
+
title: ReactNode;
|
|
870
|
+
/** Supporting line under the title. */
|
|
871
|
+
subtitle?: ReactNode;
|
|
872
|
+
/** Horizontal alignment. @defaultValue "center" */
|
|
873
|
+
align?: "center" | "left";
|
|
874
|
+
/**
|
|
875
|
+
* Play the entrance animation, staggering badge → title → subtitle.
|
|
876
|
+
* Turn it off for headings that are already visible on load.
|
|
877
|
+
* @defaultValue true
|
|
878
|
+
*/
|
|
879
|
+
animate?: boolean;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* The centered pill-badge → title → subcopy rhythm that sits above every
|
|
883
|
+
* marketing band (landing page, Fellows, docs index).
|
|
884
|
+
*
|
|
885
|
+
* This exact block was hand-rolled in Yunxin's landing, Yunxin's Fellows page
|
|
886
|
+
* AND YunUI's own showcase site — three copies of the same eight lines, each
|
|
887
|
+
* re-deriving the stagger delays. It lives here now so every surface inherits
|
|
888
|
+
* the same rhythm instead of drifting apart.
|
|
889
|
+
*/
|
|
890
|
+
declare function SectionHeading({ badge, icon, title, subtitle, align, animate, className, ...props }: SectionHeadingProps): React$1.JSX.Element;
|
|
891
|
+
|
|
892
|
+
interface FeatureCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
893
|
+
/** Glyph shown in the tinted icon tile above the title. */
|
|
894
|
+
icon?: ReactNode;
|
|
895
|
+
/** Feature name. */
|
|
896
|
+
title: ReactNode;
|
|
897
|
+
/** Supporting copy. */
|
|
898
|
+
description?: ReactNode;
|
|
899
|
+
/**
|
|
900
|
+
* Stagger the entrance animation by this many milliseconds — pass
|
|
901
|
+
* `index * 100` when mapping a grid. Omit to render without animation.
|
|
902
|
+
*/
|
|
903
|
+
delay?: number;
|
|
904
|
+
/** Extra content below the description (a link, a chip row). */
|
|
905
|
+
children?: ReactNode;
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* The marketing feature tile: a tinted icon block, a title, a line of copy, and
|
|
909
|
+
* — the part that makes it feel considered — a hover that *glows* rather than
|
|
910
|
+
* moves. A hairline catches the light along the top edge and a soft radial
|
|
911
|
+
* bloom fades in at the corner while the card lifts a single pixel.
|
|
912
|
+
*
|
|
913
|
+
* This is the card that Yunxin's landing and Fellows pages repeat; it was
|
|
914
|
+
* hand-rolled in both. Prefer it for uniform feature grids. {@link BentoCard} is
|
|
915
|
+
* the sibling for asymmetric bento layouts — same hover language, glass surface.
|
|
916
|
+
*/
|
|
917
|
+
declare function FeatureCard({ icon, title, description, delay, children, className, style, ...props }: FeatureCardProps): React$1.JSX.Element;
|
|
918
|
+
|
|
919
|
+
interface MembershipCardStat {
|
|
920
|
+
/** The number, rendered in tabular figures so a row of them lines up. */
|
|
921
|
+
value: ReactNode;
|
|
922
|
+
/** Short caption under the number. */
|
|
923
|
+
label: ReactNode;
|
|
924
|
+
}
|
|
925
|
+
interface MembershipCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
926
|
+
/** Programme name, top-left — e.g. "Yunxin Fellows". */
|
|
927
|
+
brand?: ReactNode;
|
|
928
|
+
/** Tier pill, top-right. */
|
|
929
|
+
badge?: {
|
|
930
|
+
label: ReactNode;
|
|
931
|
+
icon?: ReactNode;
|
|
932
|
+
};
|
|
933
|
+
/**
|
|
934
|
+
* A large glyph bled off the bottom-right corner at 6% opacity. Pass a
|
|
935
|
+
* lucide icon sized `w-48 h-48`; the component positions it.
|
|
936
|
+
*/
|
|
937
|
+
watermark?: ReactNode;
|
|
938
|
+
/** Small uppercase caption above the status line. */
|
|
939
|
+
label?: ReactNode;
|
|
940
|
+
/** The membership's headline state — "Active", "Renews in 12 days". */
|
|
941
|
+
status?: ReactNode;
|
|
942
|
+
/** Up to three figures along the bottom. */
|
|
943
|
+
stats?: MembershipCardStat[];
|
|
944
|
+
/** The little contactless-chip rectangle beside the status. @defaultValue true */
|
|
945
|
+
chip?: boolean;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* A physical-feeling membership card: an inverted, lit surface with ambient
|
|
949
|
+
* glows, a bled-off watermark, a light sweep on hover, and a row of figures.
|
|
950
|
+
*
|
|
951
|
+
* Extracted class for class from Yunxin's Fellows landing page, where it is the
|
|
952
|
+
* tangible centrepiece of the pitch. **Yunxin is the original and stays the
|
|
953
|
+
* reference** — a page that adopts this renders exactly what its local copy did.
|
|
954
|
+
*
|
|
955
|
+
* It is theme-adaptive rather than a fixed dark card: the surface is
|
|
956
|
+
* `bg-foreground/80` with `text-background`, so it inverts with the theme and
|
|
957
|
+
* stays striking in light *and* dark, matching the system's solid buttons.
|
|
958
|
+
*
|
|
959
|
+
* The outer element is `block` with `mx-auto`, not a flex child, so the
|
|
960
|
+
* `aspect-[1.586/1]` box (the real credit-card ratio) cannot be stretched or
|
|
961
|
+
* collapsed by a flex parent.
|
|
962
|
+
*/
|
|
963
|
+
declare function MembershipCard({ brand, badge, watermark, label, status, stats, chip, className, ...props }: MembershipCardProps): React$1.JSX.Element;
|
|
964
|
+
|
|
965
|
+
interface CTASectionProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
966
|
+
/** Headline. */
|
|
967
|
+
title: ReactNode;
|
|
968
|
+
/** Supporting line under the headline. */
|
|
969
|
+
body?: ReactNode;
|
|
970
|
+
/** The call to action — a Button, or a pair of them. */
|
|
971
|
+
actions?: ReactNode;
|
|
972
|
+
/** Small label above the headline (an {@link Eyebrow}, a badge). */
|
|
973
|
+
eyebrow?: ReactNode;
|
|
974
|
+
/** Play the staggered entrance animation. @defaultValue true */
|
|
975
|
+
animate?: boolean;
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* The closing call-to-action band: a large rounded panel with a soft radial
|
|
979
|
+
* wash blooming from its top edge, a headline, a line of copy and the action.
|
|
980
|
+
*
|
|
981
|
+
* Extracted from Yunxin, where the same panel closes both the landing page and
|
|
982
|
+
* the Fellows page. The wash is an inline `radial-gradient` on `--accent-subtle`
|
|
983
|
+
* rather than a utility class because it needs a precise ellipse origin.
|
|
984
|
+
*/
|
|
985
|
+
declare function CTASection({ title, body, actions, eyebrow, animate, className, ...props }: CTASectionProps): React$1.JSX.Element;
|
|
986
|
+
|
|
987
|
+
interface PullQuoteProps extends HTMLAttributes<HTMLElement> {
|
|
988
|
+
/** The quoted line — a manifesto, an ethos, a testimonial. */
|
|
989
|
+
children: ReactNode;
|
|
990
|
+
/** Attribution shown under the quote. */
|
|
991
|
+
cite?: ReactNode;
|
|
992
|
+
/** Show the leading quote glyph. @defaultValue true */
|
|
993
|
+
showIcon?: boolean;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* A centered manifesto/pull-quote: a soft quote glyph over one large line of
|
|
997
|
+
* display text that fades from `--foreground` into the muted tone.
|
|
998
|
+
*
|
|
999
|
+
* Extracted verbatim from Yunxin's Fellows manifesto block. The gradient text
|
|
1000
|
+
* is the whole point — a flat colour at this size reads as a heading, not a
|
|
1001
|
+
* statement — so it stays a `bg-clip-text` fade rather than a solid fill.
|
|
1002
|
+
*/
|
|
1003
|
+
declare function PullQuote({ children, cite, showIcon, className, ...props }: PullQuoteProps): React$1.JSX.Element;
|
|
1004
|
+
|
|
1005
|
+
interface MarketingHeroProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
1006
|
+
/** Pill badge above the title — pass an {@link Eyebrow} or any node. */
|
|
1007
|
+
badge?: ReactNode;
|
|
1008
|
+
/** Headline. Wrap the part that should fade with {@link HeroAccent}. */
|
|
1009
|
+
title: ReactNode;
|
|
1010
|
+
/** Supporting paragraph. */
|
|
1011
|
+
subtitle?: ReactNode;
|
|
1012
|
+
/** Primary/secondary buttons. */
|
|
1013
|
+
actions?: ReactNode;
|
|
1014
|
+
/** Short reassurance chips under the actions ("Free to apply", "6 weeks"). */
|
|
1015
|
+
facts?: ReactNode[];
|
|
1016
|
+
/** Anchor the scroll-down chevron links to. Omit to hide the chevron. */
|
|
1017
|
+
scrollToId?: string;
|
|
1018
|
+
/** Accessible label for the scroll-down chevron. @defaultValue "Scroll down" */
|
|
1019
|
+
scrollLabel?: string;
|
|
1020
|
+
/** Fill the viewport (`min-h-dvh`). @defaultValue true */
|
|
1021
|
+
fullHeight?: boolean;
|
|
1022
|
+
}
|
|
1023
|
+
/**
|
|
1024
|
+
* The full-bleed landing hero: a soft radial wash, a pill badge, a large
|
|
1025
|
+
* two-tone headline, subcopy, the actions, a row of reassurance chips, and a
|
|
1026
|
+
* bouncing scroll-down chevron.
|
|
1027
|
+
*
|
|
1028
|
+
* Extracted from Yunxin, where the landing page and the Fellows page each
|
|
1029
|
+
* hand-rolled the identical block. Everything is a slot — YunUI owns the
|
|
1030
|
+
* geometry, the wash and the entrance stagger; the host owns every word.
|
|
1031
|
+
*/
|
|
1032
|
+
declare function MarketingHero({ badge, title, subtitle, actions, facts, scrollToId, scrollLabel, fullHeight, className, ...props }: MarketingHeroProps): React$1.JSX.Element;
|
|
1033
|
+
/**
|
|
1034
|
+
* The faded tail of a hero headline — wrap the second half of the title so it
|
|
1035
|
+
* washes from the foreground colour into the muted tone.
|
|
1036
|
+
*/
|
|
1037
|
+
declare function HeroAccent({ children }: {
|
|
1038
|
+
children: ReactNode;
|
|
1039
|
+
}): React$1.JSX.Element;
|
|
1040
|
+
|
|
1041
|
+
interface ProseArticleProps extends HTMLAttributes<HTMLElement> {
|
|
1042
|
+
children: ReactNode;
|
|
1043
|
+
/**
|
|
1044
|
+
* Drop Tailwind Typography's `prose` classes on the inner wrapper.
|
|
1045
|
+
* Turn it off when the content already ships its own styles (e.g. YunUI's
|
|
1046
|
+
* `MarkdownRenderer`, which would then be styled twice).
|
|
1047
|
+
* @defaultValue true
|
|
1048
|
+
*/
|
|
1049
|
+
prose?: boolean;
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* The reading column for long-form pages — About, a blog post, a changelog.
|
|
1053
|
+
* A 3xl measure, centered, with the page's vertical rhythm.
|
|
1054
|
+
*
|
|
1055
|
+
* Extracted from Yunxin, where About and the blog post page each hand-rolled
|
|
1056
|
+
* the identical wrapper. `prose` is a prop because the two callers differ: MDX
|
|
1057
|
+
* bodies want Typography, `MarkdownRenderer` output does not (see the
|
|
1058
|
+
* double-styling note in the content docs).
|
|
1059
|
+
*/
|
|
1060
|
+
declare function ProseArticle({ children, prose, className, ...props }: ProseArticleProps): React$1.JSX.Element;
|
|
1061
|
+
interface BackLinkProps {
|
|
1062
|
+
/** Destination. */
|
|
1063
|
+
href: string;
|
|
1064
|
+
/** Link text — localize it yourself. */
|
|
1065
|
+
children: ReactNode;
|
|
1066
|
+
className?: string;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* The muted "‹ back to …" link above a detail page. Routes through the
|
|
1070
|
+
* {@link useYunUI} adapter, so it uses the host framework's Link.
|
|
1071
|
+
*/
|
|
1072
|
+
declare function BackLink({ href, children, className }: BackLinkProps): React$1.JSX.Element;
|
|
1073
|
+
|
|
1074
|
+
interface AuthShellProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1075
|
+
/**
|
|
1076
|
+
* Brand row above the card — the logo + wordmark. Rendered inside a
|
|
1077
|
+
* centered flex row; pass the image and the name as siblings.
|
|
1078
|
+
*/
|
|
1079
|
+
brand?: ReactNode;
|
|
1080
|
+
/** When set, the brand row becomes a link to this destination (usually "/"). */
|
|
1081
|
+
homeHref?: string;
|
|
1082
|
+
/** Card heading. */
|
|
1083
|
+
title?: ReactNode;
|
|
1084
|
+
/** Optional line under the heading. */
|
|
1085
|
+
subtitle?: ReactNode;
|
|
1086
|
+
/**
|
|
1087
|
+
* A block above the form for a failed submit — rendered in the soft-error
|
|
1088
|
+
* box these screens all use. Falsy values render nothing.
|
|
1089
|
+
*/
|
|
1090
|
+
error?: ReactNode;
|
|
1091
|
+
/** Optional medallion / spinner above the heading, centered. */
|
|
1092
|
+
icon?: ReactNode;
|
|
1093
|
+
/** The form (or whatever the screen is for). */
|
|
1094
|
+
children: ReactNode;
|
|
1095
|
+
/** Content under the card — "Don't have an account?", legal links. */
|
|
1096
|
+
footer?: ReactNode;
|
|
1097
|
+
/** Centers everything in the card — for confirmation and status screens. */
|
|
1098
|
+
centered?: boolean;
|
|
1099
|
+
/**
|
|
1100
|
+
* Width of the column. `sm` suits a sign-in form; `md` suits the wider
|
|
1101
|
+
* error / not-found screens. @defaultValue "sm"
|
|
1102
|
+
*/
|
|
1103
|
+
width?: "sm" | "md";
|
|
1104
|
+
/** Extra classes on the card box itself (the wrapper takes `className`). */
|
|
1105
|
+
cardClassName?: string;
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* The centered single-column screen every auth flow uses: sign in, sign up,
|
|
1109
|
+
* forgot/reset password, verify email, resend verification, OAuth callback.
|
|
1110
|
+
*
|
|
1111
|
+
* Yunxin hand-rolls this shell **nine times** — each copy re-deriving the
|
|
1112
|
+
* viewport centring, the column width, the brand row spacing and the card
|
|
1113
|
+
* chrome. This is a straight extraction of that markup, class for class:
|
|
1114
|
+
* Yunxin is the original and stays the reference, so a screen that adopts
|
|
1115
|
+
* `AuthShell` renders identically to the copy it replaces.
|
|
1116
|
+
*
|
|
1117
|
+
* That is why the panel is `p-6 bg-card border border-border rounded-xl` and
|
|
1118
|
+
* NOT the house `.card` class — `.card` is a 20px radius with a shadow and a
|
|
1119
|
+
* hover transition, so swapping it in would have quietly restyled all nine
|
|
1120
|
+
* screens. Only the parts that are identical in every copy live here; whatever
|
|
1121
|
+
* varies (medallions, spinners, per-screen copy) stays in `children`.
|
|
1122
|
+
*/
|
|
1123
|
+
declare function AuthShell({ brand, homeHref, title, subtitle, error, icon, children, footer, centered, width, className, cardClassName, ...props }: AuthShellProps): React$1.JSX.Element;
|
|
1124
|
+
|
|
1125
|
+
interface TableStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
1126
|
+
/** The message — "No results", "Nothing to review". */
|
|
1127
|
+
children: ReactNode;
|
|
1128
|
+
/** Show a spinner before the message. @defaultValue false */
|
|
1129
|
+
loading?: boolean;
|
|
1130
|
+
/** Vertical padding. `card` also draws the card surface. @defaultValue "plain" */
|
|
1131
|
+
surface?: "plain" | "card";
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* The single muted line an empty or loading table/panel shows in place of rows.
|
|
1135
|
+
*
|
|
1136
|
+
* Yunxin repeats this shape **39 times** across its dashboard and admin pages —
|
|
1137
|
+
* as `card p-8 text-center text-muted-foreground`, as `p-8 …`, and as `py-8 …`,
|
|
1138
|
+
* i.e. three spellings of one idea. This is deliberately *not*
|
|
1139
|
+
* {@link EmptyState}: that is the big icon + title + description + action block
|
|
1140
|
+
* for a whole screen; this is the one-line cell inside a table.
|
|
1141
|
+
*/
|
|
1142
|
+
declare function TableState({ children, loading, surface, className, ...props }: TableStateProps): React$1.JSX.Element;
|
|
1143
|
+
interface StatGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
1144
|
+
children: ReactNode;
|
|
1145
|
+
/** Columns at the widest breakpoint. @defaultValue 4 */
|
|
1146
|
+
columns?: 2 | 3 | 4;
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* The responsive tile row that carries {@link StatCard}s at the top of a
|
|
1150
|
+
* dashboard page — two up on phones, `columns` up from `sm`/`lg`.
|
|
1151
|
+
*
|
|
1152
|
+
* Extracted because Yunxin hand-rolls the same grid on ~12 admin pages, and the
|
|
1153
|
+
* copies had already drifted between `sm:grid-cols-4` and `lg:grid-cols-4`.
|
|
1154
|
+
*/
|
|
1155
|
+
declare function StatGrid({ children, columns, className, ...props }: StatGridProps): React$1.JSX.Element;
|
|
1156
|
+
interface DashboardPageProps extends HTMLAttributes<HTMLDivElement> {
|
|
1157
|
+
children: ReactNode;
|
|
1158
|
+
/** Max content width. @defaultValue "7xl" */
|
|
1159
|
+
width?: "5xl" | "6xl" | "7xl";
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* The content column for a dashboard/admin page: a capped, centered width with
|
|
1163
|
+
* the house vertical rhythm between sections.
|
|
1164
|
+
*
|
|
1165
|
+
* Distinct from {@link PageLayout}, which is the marketing shell (navbar +
|
|
1166
|
+
* footer). Yunxin repeats `space-y-6 max-w-7xl mx-auto` on 11 admin pages.
|
|
1167
|
+
*/
|
|
1168
|
+
declare function DashboardPage({ children, width, className, ...props }: DashboardPageProps): React$1.JSX.Element;
|
|
1169
|
+
interface SectionRowProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1170
|
+
/** Section title. */
|
|
1171
|
+
title: ReactNode;
|
|
1172
|
+
/** Trailing control — a button, a filter, a link. */
|
|
1173
|
+
action?: ReactNode;
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* A section title with a trailing action on the same baseline — the header that
|
|
1177
|
+
* sits above a table or a card list inside a page (not the page header itself;
|
|
1178
|
+
* that is {@link PageHeader}). Repeated 13 times across Yunxin's dashboard.
|
|
1179
|
+
*/
|
|
1180
|
+
declare function SectionRow({ title, action, className, ...props }: SectionRowProps): React$1.JSX.Element;
|
|
1181
|
+
|
|
1182
|
+
interface SectionNavItem {
|
|
1183
|
+
/** Element id to scroll to; also the observed target. */
|
|
1184
|
+
id: string;
|
|
1185
|
+
label: string;
|
|
1186
|
+
/** Shown right-aligned — how many things are in the section. */
|
|
1187
|
+
count?: number;
|
|
1188
|
+
}
|
|
1189
|
+
interface SectionNavProps {
|
|
1190
|
+
items: SectionNavItem[];
|
|
1191
|
+
/** Offset in px for a fixed header, used when scrolling and when spying. */
|
|
1192
|
+
offset?: number;
|
|
1193
|
+
/** Accessible name for the nav landmark — localize it. @defaultValue "Sections" */
|
|
1194
|
+
label?: string;
|
|
1195
|
+
className?: string;
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* In-page section navigator with scroll spy.
|
|
1199
|
+
*
|
|
1200
|
+
* Written because a digest can run to forty entries across nine sections, and
|
|
1201
|
+
* without this the only way to reach 產業動態 is to scroll past everything
|
|
1202
|
+
* before it. Distinct from `Sidebar`, which is site navigation (brand, logo, routes):
|
|
1203
|
+
* this covers "navigate within one long page". Upstreamed from YunNEWS, where
|
|
1204
|
+
* it was written to library standards from the start.
|
|
1205
|
+
*
|
|
1206
|
+
* IntersectionObserver rather than a scroll handler: a scroll listener fires on
|
|
1207
|
+
* every frame and has to measure each section's box, which is the same work the
|
|
1208
|
+
* browser has already done.
|
|
1209
|
+
*/
|
|
1210
|
+
declare function SectionNav({ items, offset, label, className }: SectionNavProps): React$1.JSX.Element | null;
|
|
1211
|
+
|
|
1212
|
+
interface ArchiveCalendarProps {
|
|
1213
|
+
/** Dates that have an issue, as YYYY-MM-DD. Order does not matter. */
|
|
1214
|
+
dates: string[];
|
|
1215
|
+
/** Where a date links to. */
|
|
1216
|
+
href: (date: string) => string;
|
|
1217
|
+
/**
|
|
1218
|
+
* Most months to draw. A ceiling, not a count: the range comes from the data,
|
|
1219
|
+
* so an archive three weeks old draws one month rather than six, five of them
|
|
1220
|
+
* empty.
|
|
1221
|
+
*/
|
|
1222
|
+
maxMonths?: number;
|
|
1223
|
+
/** Weekday initials, Sunday first. @defaultValue ["S","M","T","W","T","F","S"] */
|
|
1224
|
+
weekdays?: readonly string[];
|
|
1225
|
+
/** Format a month heading. @defaultValue `${year}-${month}` */
|
|
1226
|
+
formatMonth?: (year: number, month: number) => string;
|
|
1227
|
+
/** Label the per-month count, e.g. `(n) => `${n} issues``. Omit to hide it. */
|
|
1228
|
+
formatCount?: (count: number) => string;
|
|
1229
|
+
/** Accessible label for a filled day. @defaultValue the ISO date */
|
|
1230
|
+
formatDayLabel?: (date: string) => string;
|
|
1231
|
+
className?: string;
|
|
1232
|
+
}
|
|
1233
|
+
declare function ArchiveCalendar({ dates, href, maxMonths, weekdays, formatMonth, formatCount, formatDayLabel, className, }: ArchiveCalendarProps): React$1.JSX.Element | null;
|
|
1234
|
+
|
|
1235
|
+
export { AccountLockedCard, type AccountLockedCardProps, ActiveBadge, ArchiveCalendar, type ArchiveCalendarProps, AudioPlayer, type AudioPlayerProps, AuthShell, type AuthShellProps, AvatarUploader, type AvatarUploaderProps, BackLink, type BackLinkProps, BackgroundEffects, Banner, type BannerProps, type BannerTone, BlogCard, BlogPagination, BlogPostHeader, CTASection, type CTASectionProps, CapabilityBadge, CategoryFilter, CodeBlock, CodeDemo, ConnectedAccountRow, type ConnectedAccountRowProps, DashboardPage, type DashboardPageProps, DeprecatedBadge, ErrorBoundary, type ErrorBoundaryLabels, Eyebrow, type EyebrowProps, FAQ, type FAQItem, type FAQProps, FeatureCard, type FeatureCardProps, FeatureLockedState, type FeatureLockedStateProps, FellowBadge, FellowsBanner, type FellowsBannerProps, HeroAccent, LLMCopyButton, LinkRow, type LinkRowProps, MarketingHero, type MarketingHeroProps, MediaEmptyState, MediaErrorState, MediaGallery, type MediaGalleryLabels, type MediaGalleryProps, MediaLoadingState, MediaPageHeader, type MediaResult, type MediaStatus, MembershipCard, type MembershipCardProps, type MembershipCardStat, MetricBar, type MetricBarProps, NavStateIndicator, type NavStateIndicatorProps, NotificationBell, type NotificationBellProps, NotificationItem, type NotificationItemProps, NotificationPanel, type NotificationPanelProps, PageEmptyState, PageErrorState, PageHeader, PageLayout, type PageLayoutProps, PageLoadingState, ProseArticle, type ProseArticleProps, PullQuote, type PullQuoteProps, ReadingProgress, SectionHeading, type SectionHeadingProps, SectionNav, type SectionNavItem, type SectionNavProps, SectionRow, type SectionRowProps, SessionItem, type SessionItemProps, SettingRow, type SettingRowProps, type SettingsNavGroup, type SettingsNavItem, SettingsShell, type SettingsShellProps, Sidebar, type SidebarNavItem, type SidebarProps, type SidebarSection, SimplePagination, SourceBadge, StatCard, StatGrid, type StatGridProps, StatusBadge, TableState, type TableStateProps, ViewOptions };
|