@meetreeve/ui 0.27.0 → 0.33.0
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 +21 -2
- package/dist/charts/index.d.mts +12 -1
- package/dist/charts/index.d.ts +12 -1
- package/dist/charts/index.js +96 -6
- package/dist/charts/index.mjs +111 -7
- package/dist/index.d.mts +51 -13
- package/dist/index.d.ts +51 -13
- package/dist/index.js +357 -225
- package/dist/index.mjs +262 -130
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -212,17 +212,19 @@ declare function useResponsivePlaceholder(desktop: string, mobile?: string): str
|
|
|
212
212
|
* looping seconds of the other app's screen, shown where a step sends someone
|
|
213
213
|
* there. Generalised from the Docs share strip's ShareClip (DEV-18388).
|
|
214
214
|
*
|
|
215
|
-
* Muted and looping
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
215
|
+
* Muted and looping. A corner toggle pauses and resumes it (DEV-19403, WCAG
|
|
216
|
+
* 2.2.2). Reduced motion never starts it (and turning it on mid-loop pauses
|
|
217
|
+
* it): the poster shows and the toggle offers Play, so it plays only when the
|
|
218
|
+
* viewer asks (DEV-19583). A browser that refuses autoplay (iOS Low Power
|
|
219
|
+
* Mode) gets the native controls instead of the toggle, until a later play()
|
|
220
|
+
* succeeds, so there is never a second set. A browser whose play() returns no
|
|
221
|
+
* promise (or has no play()) is judged by whether the clip actually left the
|
|
222
|
+
* paused state. A pause made with the toggle outlasts a reduced-motion change
|
|
223
|
+
* and a scroll away, but not a new clip.
|
|
221
224
|
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* change but not a new clip.
|
|
225
|
+
* Card mode (DEV-19583): `fit`, `overlay`, `playWhenVisible` (no download and
|
|
226
|
+
* no playback until the clip is on screen) and `posterOnly` (the poster image,
|
|
227
|
+
* no video at all).
|
|
226
228
|
*/
|
|
227
229
|
interface HowToClipProps {
|
|
228
230
|
/** File stem: `${clipBaseUrl}/${slug}.webm|.mp4` and `${clipBaseUrl}/${slug}-poster.jpg`. Must match /^[a-z0-9-]{1,64}$/ or nothing renders. */
|
|
@@ -231,9 +233,21 @@ interface HowToClipProps {
|
|
|
231
233
|
label: string;
|
|
232
234
|
/** Where the clip files are served from, e.g. "/how-to" or "https://cdn.example/how-to" (no query or hash). Omitted or blank → renders null. A trailing slash is dropped. */
|
|
233
235
|
clipBaseUrl?: string;
|
|
236
|
+
/** How the frame fills the 16:9 box: `"contain"` (default) letterboxes, `"cover"` crops to fill, for cards. */
|
|
237
|
+
fit?: "contain" | "cover";
|
|
238
|
+
/**
|
|
239
|
+
* Attach the sources only once a quarter of the clip is first on screen
|
|
240
|
+
* (an off-screen clip downloads nothing but its poster), then play only
|
|
241
|
+
* while it stays that visible and pause when it leaves.
|
|
242
|
+
*/
|
|
243
|
+
playWhenVisible?: boolean;
|
|
244
|
+
/** Painted over the frame, inside its rounded box (e.g. a title on a dark fade). Clicks pass through it. */
|
|
245
|
+
overlay?: ReactNode;
|
|
246
|
+
/** Only the poster, as an image named by `label`: no video, no sources, no toggle. */
|
|
247
|
+
posterOnly?: boolean;
|
|
234
248
|
className?: string;
|
|
235
249
|
}
|
|
236
|
-
declare function HowToClip({ slug, label, clipBaseUrl, className }: HowToClipProps): react.JSX.Element | null;
|
|
250
|
+
declare function HowToClip({ slug, label, clipBaseUrl, fit, playWhenVisible, overlay, posterOnly, className, }: HowToClipProps): react.JSX.Element | null;
|
|
237
251
|
|
|
238
252
|
interface SiteFooterLink {
|
|
239
253
|
href: string;
|
|
@@ -328,6 +342,11 @@ interface GroupRungItem {
|
|
|
328
342
|
icon: string;
|
|
329
343
|
/** moduleIds folded into this group. Non-empty (zod-enforced). */
|
|
330
344
|
children: string[];
|
|
345
|
+
/** DEV-19583: the group's own page — an app path ("/explore"), never another
|
|
346
|
+
* origin: zod rejects anything not starting with one "/", and any
|
|
347
|
+
* backslash, whitespace or control character (browsers fold those into "//").
|
|
348
|
+
* Set, the group's label links there and the row is active on it too. */
|
|
349
|
+
href?: string;
|
|
331
350
|
}
|
|
332
351
|
type RungItem = AppRungItem | GroupRungItem;
|
|
333
352
|
interface SidebarRung {
|
|
@@ -367,6 +386,7 @@ declare const zSidebarLadder: z.ZodObject<{
|
|
|
367
386
|
label: z.ZodString;
|
|
368
387
|
icon: z.ZodString;
|
|
369
388
|
children: z.ZodArray<z.ZodString>;
|
|
389
|
+
href: z.ZodOptional<z.ZodString>;
|
|
370
390
|
}, z.core.$strip>], "type">>;
|
|
371
391
|
}, z.core.$strip>>;
|
|
372
392
|
}, z.core.$strip>;
|
|
@@ -433,6 +453,9 @@ interface AppSidebarRecent {
|
|
|
433
453
|
onSelect: (id: string) => void;
|
|
434
454
|
/** Section heading. Default `"Recent"`. */
|
|
435
455
|
label?: string;
|
|
456
|
+
/** DEV-19583: where the heading goes (e.g. the full chats page). Set, the
|
|
457
|
+
* heading renders as a link through `linkComponent`, same text and id. */
|
|
458
|
+
href?: string;
|
|
436
459
|
/** Rows shown before "More". Default 6; floored to a whole number >= 1, and a non-finite value uses the default. */
|
|
437
460
|
limit?: number;
|
|
438
461
|
/** Where "More" goes (rendered through `linkComponent`). No href, no More. */
|
|
@@ -598,7 +621,22 @@ interface FlyoutProps {
|
|
|
598
621
|
active: boolean;
|
|
599
622
|
children: FlyoutChild[];
|
|
600
623
|
/**
|
|
601
|
-
*
|
|
624
|
+
* DEV-19583: the group's own page. Set, the label becomes a link to it
|
|
625
|
+
* (through `linkComponent`), so a click or Enter navigates while hover
|
|
626
|
+
* still opens the panel; a separate chevron button beside it is the
|
|
627
|
+
* disclosure (`aria-expanded`, Enter/Space/click toggle the panel, Esc
|
|
628
|
+
* closes it and returns focus to the chevron). Omitted, the row is the
|
|
629
|
+
* single disclosure button it always was, markup unchanged.
|
|
630
|
+
*
|
|
631
|
+
* On the `collapsed` rail there is no room for two controls, so the row
|
|
632
|
+
* stays the single icon button and the panel opens with a first row
|
|
633
|
+
* linking to `href`, named by `label`.
|
|
634
|
+
*/
|
|
635
|
+
href?: string;
|
|
636
|
+
/** DEV-19583: the current page is `href` itself (not a child), so its link carries `aria-current="page"`. */
|
|
637
|
+
hrefActive?: boolean;
|
|
638
|
+
/**
|
|
639
|
+
* Link renderer for the panel's child rows (and the `href` label). Defaults to a bare `"a"` so
|
|
602
640
|
* the package stays framework-agnostic; consumers pass their router's
|
|
603
641
|
* link (e.g. `next/link`) for client-side navigation. Flyout is
|
|
604
642
|
* independently exported (see src/index.ts), so it carries its own copy
|
|
@@ -672,7 +710,7 @@ interface FlyoutProps {
|
|
|
672
710
|
* than working around it. jsdom never computes real scrollable-overflow
|
|
673
711
|
* geometry, so no unit test caught this — only an actual browser render did.
|
|
674
712
|
*/
|
|
675
|
-
declare function Flyout({ label, icon, active, children, linkComponent, collapsed, onOpenChange, forceClosed, hoverOpenDelayMs, className, }: FlyoutProps): react.JSX.Element;
|
|
713
|
+
declare function Flyout({ label, icon, active, children, href, hrefActive, linkComponent, collapsed, onOpenChange, forceClosed, hoverOpenDelayMs, className, }: FlyoutProps): react.JSX.Element;
|
|
676
714
|
|
|
677
715
|
/**
|
|
678
716
|
* ContextSwitcher (DEV-4408) — promoted out of reeve-frontend's
|