@krizaka/ui 3.38.0 → 3.40.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/dist/bird-plate.js +1 -1
- package/dist/blocks.css +72 -6
- package/dist/chip-link.js +1 -1
- package/dist/chip-row.js +1 -1
- package/dist/{chunk-IANSFIVC.js → chunk-7JFHTPI3.js} +13 -3
- package/dist/chunk-7JFHTPI3.js.map +1 -0
- package/dist/{chunk-RE5WJ4QP.js → chunk-ADRUEPYC.js} +4 -4
- package/dist/chunk-ADRUEPYC.js.map +1 -0
- package/dist/{chunk-BCVLLY3R.js → chunk-EZC54B5C.js} +89 -22
- package/dist/chunk-EZC54B5C.js.map +1 -0
- package/dist/{chunk-BTTDIVVJ.js → chunk-F2UZ2WWL.js} +2 -2
- package/dist/chunk-F2UZ2WWL.js.map +1 -0
- package/dist/{chunk-JFJECOZ2.js → chunk-M4DBVG43.js} +87 -22
- package/dist/chunk-M4DBVG43.js.map +1 -0
- package/dist/flock.d.ts +40 -0
- package/dist/flock.js +198 -0
- package/dist/flock.js.map +1 -0
- package/dist/image-cropper.js +1 -1
- package/dist/kanban.js +1 -1
- package/dist/kanban.js.map +1 -1
- package/dist/map.js +2 -2
- package/dist/map.js.map +1 -1
- package/dist/mascot-quote.js +1 -1
- package/dist/mascot-state.js +1 -1
- package/dist/mascots.d.ts +32 -2
- package/dist/mascots.js +3 -1
- package/dist/mascots.js.map +1 -1
- package/dist/motion.css +1 -1
- package/dist/native/vertical-video.js +1 -1
- package/dist/native/vertical-video.js.map +1 -1
- package/dist/native.d.ts +1 -1
- package/dist/native.js +11 -11
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +1 -1
- package/dist/nav-bar.js +1 -1
- package/dist/photo-grid.js +1 -1
- package/dist/photo-grid.js.map +1 -1
- package/dist/site-footer.d.ts +5 -17
- package/dist/site-footer.js +33 -29
- package/dist/site-footer.js.map +1 -1
- package/dist/{sites-B4sYlfPQ.d.ts → sites-inztN_Bv.d.ts} +8 -0
- package/dist/sites.d.ts +11 -1
- package/dist/sites.js +12 -2
- package/dist/sites.js.map +1 -1
- package/dist/slider.js +3 -3
- package/dist/slider.js.map +1 -1
- package/dist/step-showcase.js +1 -1
- package/dist/step-showcase.js.map +1 -1
- package/dist/story.css +3 -3
- package/dist/video-player.js +1 -1
- package/dist/video-trimmer.js +1 -1
- package/dist/video-trimmer.js.map +1 -1
- package/package.json +24 -10
- package/registry/account-menu.json +1 -1
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +4 -4
- package/registry/activity-feed.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +3 -3
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +2 -2
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +3 -3
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +1 -1
- package/registry/cta-panel.json +3 -3
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/action-bar/buttons.js +2 -2
- package/registry/examples/action-bar/buttons.tsx +2 -2
- package/registry/examples/action-bar/icons.js +1 -1
- package/registry/examples/action-bar/icons.tsx +1 -1
- package/registry/examples/argument-card/building-block.js +1 -1
- package/registry/examples/argument-card/building-block.tsx +1 -1
- package/registry/examples/contact-page/team.js +1 -1
- package/registry/examples/contact-page/team.tsx +1 -1
- package/registry/examples/cta-panel/discuss.js +2 -2
- package/registry/examples/cta-panel/discuss.tsx +2 -2
- package/registry/examples/flock/pair.d.ts +4 -0
- package/registry/examples/flock/pair.js +22 -0
- package/registry/examples/flock/pair.tsx +16 -0
- package/registry/examples/flock/ridge.d.ts +4 -0
- package/registry/examples/flock/ridge.js +24 -0
- package/registry/examples/flock/ridge.tsx +19 -0
- package/registry/examples/search-field/global.js +13 -10
- package/registry/examples/search-field/global.tsx +11 -7
- package/registry/examples/site-footer/company.js +0 -4
- package/registry/examples/site-footer/company.tsx +3 -7
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/flock.json +226 -0
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +39 -7
- package/registry/iso.json +1 -1
- package/registry/kanban.json +2 -2
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +3 -3
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +91 -3
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +1 -1
- package/registry/media-grid.json +1 -1
- package/registry/meta-row.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +2 -2
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +2 -2
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +2 -2
- package/registry/recipes.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +3 -3
- package/registry/section-backdrop.json +3 -3
- package/registry/separator.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/showcase.json +1 -1
- package/registry/site-footer.json +11 -11
- package/registry/sites.json +3 -3
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +2 -2
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +2 -2
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +2 -2
- package/registry/virtual.json +1 -1
- package/registry/waveform.json +1 -1
- package/dist/chunk-BCVLLY3R.js.map +0 -1
- package/dist/chunk-BTTDIVVJ.js.map +0 -1
- package/dist/chunk-IANSFIVC.js.map +0 -1
- package/dist/chunk-JFJECOZ2.js.map +0 -1
- package/dist/chunk-RE5WJ4QP.js.map +0 -1
package/dist/mascot-quote.js
CHANGED
package/dist/mascot-state.js
CHANGED
package/dist/mascots.d.ts
CHANGED
|
@@ -2,6 +2,20 @@ import { M as MascotBird, a as MascotMood, b as MascotTone } from './geometry-DX
|
|
|
2
2
|
export { c as MASCOT_BIRDS, d as MASCOT_MOODS } from './geometry-DX-W-Yyf.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* The life of the flock — what a bird does when nobody asks it for anything (`Mascot life`): it breathes, blinks in its
|
|
7
|
+
* own rhythm, tilts its head, ruffles a wing, now and then hops — each in character: the falcon watches (a slow scan),
|
|
8
|
+
* the owl reads (a tilt, a slow double blink), the duck builds (quick nods, like typing), the flamingo answers (its neck
|
|
9
|
+
* sways towards you), the pigeon delivers (its head bobs, its parcel swings). CSS only: transform and opacity, no
|
|
10
|
+
* timer, no frame loop; `Flock` adds the moments between birds (a glance, a delivery) by setting `look` and `flying`.
|
|
11
|
+
*
|
|
12
|
+
* Every motion is a keyframe on its own group (hop → bird → look → head), so they add up instead of fighting for one
|
|
13
|
+
* `transform`; each starts at a phase of its own (`--kzb-ph`) so two birds never move together.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
declare const MASCOT_LOOKS: readonly ["center", "left", "right", "up"];
|
|
17
|
+
type MascotLook = (typeof MASCOT_LOOKS)[number];
|
|
18
|
+
|
|
5
19
|
type MascotProps = Omit<React.ComponentProps<"svg">, "children"> & {
|
|
6
20
|
/** Which bird of the flock: `falcon` (watch, security), `owl` (reading, documents), `duck` (building, code), `flamingo` (answers, support), `pigeon` (delivery, notifications), `lovebird` (introductions, two people who meet), `crane` (listening, a calm moment), `magpie` (the score: points, standings, trophies), `beaver` (the shop: a small business at work). */
|
|
7
21
|
bird?: MascotBird;
|
|
@@ -15,12 +29,28 @@ type MascotProps = Omit<React.ComponentProps<"svg">, "children"> & {
|
|
|
15
29
|
animated?: boolean;
|
|
16
30
|
/** An accessible name (the bird becomes an image); without it the mascot is decorative. */
|
|
17
31
|
title?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The bird at ease, in character (mood `welcome`, the default): it breathes, blinks in its own rhythm, tilts its head,
|
|
34
|
+
* ruffles a wing, now and then hops — the falcon watches, the owl reads, the duck builds, the flamingo answers, the
|
|
35
|
+
* pigeon delivers. CSS only, still under `prefers-reduced-motion` and with `animated={false}`.
|
|
36
|
+
*/
|
|
37
|
+
life?: boolean;
|
|
38
|
+
/** Where in its cycles the bird starts, 0 to 1 (default: from the instance's id), so two birds never move together. */
|
|
39
|
+
phase?: number;
|
|
40
|
+
/** Where it looks (`life`): `left` and `right` turn the head and the eyes, `up` raises them, `center` rests. */
|
|
41
|
+
look?: MascotLook;
|
|
42
|
+
/** In flight (`life`): the wings beat, the body leans into the trip — the pigeon of a delivery. */
|
|
43
|
+
flying?: boolean;
|
|
44
|
+
/** Which way it leans in flight, -1 (left) to 1 (right). */
|
|
45
|
+
bank?: number;
|
|
46
|
+
/** A tap or a poke just happened (`life`): a small jump. Set it for a moment, then unset. */
|
|
47
|
+
poked?: boolean;
|
|
18
48
|
};
|
|
19
49
|
/**
|
|
20
50
|
* One of the nine Krizaka figures in one mood — for the moments a product speaks to a person: a welcome, a long wait,
|
|
21
51
|
* a success, an empty list, an error. Drawn in the host's brand colours by default (`tone="own"` for the story's).
|
|
22
52
|
*/
|
|
23
|
-
declare function Mascot({ bird, mood, tone, size, animated, title, className, ...props }: MascotProps): React.JSX.Element;
|
|
53
|
+
declare function Mascot({ bird, mood, tone, size, animated, title, life, phase, look, flying, bank, poked, className, style, ...props }: MascotProps): React.JSX.Element;
|
|
24
54
|
|
|
25
55
|
type PhoenixProps = Omit<React.ComponentProps<"svg">, "children"> & {
|
|
26
56
|
/** `own` (default): the violet wing and the gold wing of the Krizaka story. `brand`: the host's accent and accent-2. */
|
|
@@ -35,4 +65,4 @@ type PhoenixProps = Omit<React.ComponentProps<"svg">, "children"> & {
|
|
|
35
65
|
/** The phoenix: the comeback, beside the five birds of the flock (`Mascot`). Decorative unless titled. */
|
|
36
66
|
declare function Phoenix({ tone, size, animated, title, className, ...props }: PhoenixProps): React.JSX.Element;
|
|
37
67
|
|
|
38
|
-
export { Mascot, MascotBird, MascotMood, type MascotProps, MascotTone, Phoenix, type PhoenixProps };
|
|
68
|
+
export { MASCOT_LOOKS, Mascot, MascotBird, type MascotLook, MascotMood, type MascotProps, MascotTone, Phoenix, type PhoenixProps };
|
package/dist/mascots.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
MASCOT_BIRDS,
|
|
4
|
+
MASCOT_LOOKS,
|
|
4
5
|
MASCOT_MOODS,
|
|
5
6
|
Mascot
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EZC54B5C.js";
|
|
7
8
|
|
|
8
9
|
// src/mascots/phoenix.tsx
|
|
9
10
|
import { useId } from "react";
|
|
@@ -90,6 +91,7 @@ function Phoenix({ tone = "own", size = 120, animated = true, title, className,
|
|
|
90
91
|
}
|
|
91
92
|
export {
|
|
92
93
|
MASCOT_BIRDS,
|
|
94
|
+
MASCOT_LOOKS,
|
|
93
95
|
MASCOT_MOODS,
|
|
94
96
|
Mascot,
|
|
95
97
|
Phoenix
|
package/dist/mascots.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/mascots/phoenix.tsx","../src/mascots/phoenix-geometry.ts"],"sourcesContent":["// The phoenix of the Krizaka landscape, on its own: two wings — two rival flames — around one bright core. The sixth\n// figure of the flock: it does no job, it stands for the comeback (a relaunch, a recovered account, a second chance).\nimport type * as React from \"react\";\nimport { useId } from \"react\";\n\nimport { PHOENIX, PHOENIX_PALETTES,type PhoenixPalette } from \"./phoenix-geometry\";\n\nconst CSS = `\n@keyframes kzp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }\n@keyframes kzp-core { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }\n.kzp[data-animated] { animation: kzp-float 5s ease-in-out infinite; }\n.kzp[data-animated] .kzp-core { animation: kzp-core 2.8s ease-in-out infinite; }\n@media (prefers-reduced-motion: reduce) { .kzp, .kzp .kzp-core { animation: none !important; } }\n`;\n\nexport type PhoenixProps = Omit<React.ComponentProps<\"svg\">, \"children\"> & {\n /** `own` (default): the violet wing and the gold wing of the Krizaka story. `brand`: the host's accent and accent-2. */\n tone?: \"own\" | \"brand\";\n /** Width and height in pixels. */\n size?: number;\n /** A slow float and a breathing core. Off with `false`; always off under `prefers-reduced-motion`. */\n animated?: boolean;\n /** An accessible name (the phoenix becomes an image); without it, it is decorative. */\n title?: string;\n};\n\nconst BRAND: PhoenixPalette = {\n left: [\"var(--kz-accent-2, var(--kz-accent))\", \"var(--kz-accent)\"],\n right: [\"var(--kz-accent)\", \"var(--kz-accent-2, var(--kz-accent))\"],\n core: [\"#ffffff\", \"var(--kz-accent)\"],\n body: \"var(--kz-surface-3)\",\n edge: \"var(--kz-border-strong)\",\n crest: \"var(--kz-accent)\",\n};\n\n/** The phoenix: the comeback, beside the five birds of the flock (`Mascot`). Decorative unless titled. */\nexport function Phoenix({ tone = \"own\", size = 120, animated = true, title, className, ...props }: PhoenixProps) {\n const id = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const p = tone === \"brand\" ? BRAND : PHOENIX_PALETTES.own;\n const a11y = title ? { role: \"img\", \"aria-label\": title } : { \"aria-hidden\": true };\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n data-animated={animated ? \"\" : undefined}\n className={[\"kzp\", className].filter(Boolean).join(\" \")}\n {...a11y}\n {...props}\n >\n <style>{CSS}</style>\n <defs>\n <linearGradient id={`kzp-l-${id}`} x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={p.left[0]} />\n <stop offset=\"100%\" stopColor={p.left[1]} />\n </linearGradient>\n <linearGradient id={`kzp-r-${id}`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n <stop offset=\"0%\" stopColor={p.right[0]} />\n <stop offset=\"100%\" stopColor={p.right[1]} />\n </linearGradient>\n <radialGradient id={`kzp-c-${id}`}>\n <stop offset=\"0%\" stopColor={p.core[0]} />\n <stop offset=\"100%\" stopColor={p.core[1]} stopOpacity=\"0\" />\n </radialGradient>\n </defs>\n <path d={PHOENIX.wingL} fill={`url(#kzp-l-${id})`} />\n <path d={PHOENIX.wingR} fill={`url(#kzp-r-${id})`} />\n <path d={PHOENIX.tailL} fill={`url(#kzp-l-${id})`} opacity=\".7\" />\n <path d={PHOENIX.tailR} fill={`url(#kzp-r-${id})`} opacity=\".7\" />\n <path d={PHOENIX.body} fill={p.body} stroke={p.edge} strokeOpacity=\".5\" />\n <circle cx=\"60\" cy=\"58\" r=\"12\" fill={`url(#kzp-c-${id})`} className=\"kzp-core\" />\n <circle cx=\"60\" cy=\"58\" r=\"3.5\" fill=\"#fff\" />\n <path d={PHOENIX.crest} stroke={p.crest} strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n );\n}\n","/** The phoenix's geometry (120 × 120), drawn by the web `Phoenix` and the native one. */\nexport const PHOENIX = {\n wingL: \"M56 62 C40 40 22 36 8 40 C22 46 30 56 34 70 C40 64 48 62 56 62 Z\",\n wingR: \"M64 62 C80 40 98 36 112 40 C98 46 90 56 86 70 C80 64 72 62 64 62 Z\",\n tailL: \"M52 66 C46 82 40 94 30 104 C44 98 52 90 58 78 Z\",\n tailR: \"M68 66 C74 82 80 94 90 104 C76 98 68 90 62 78 Z\",\n body: \"M60 34 L68 60 L60 82 L52 60 Z\",\n crest: \"M60 34 L56 24 M60 34 L64 24\",\n} as const;\n\nexport interface PhoenixPalette {\n /** The left wing's gradient (top → bottom). */\n readonly left: readonly [string, string];\n /** The right wing's gradient. */\n readonly right: readonly [string, string];\n /** The core's glow: centre, edge. */\n readonly core: readonly [string, string];\n /** The body and its edge. */\n readonly body: string;\n readonly edge: string;\n /** The crest. */\n readonly crest: string;\n}\n\n/** The phoenix of the Krizaka story: a violet wing, a gold wing (the brand layer's own colours, like the marks). */\nexport const PHOENIX_PALETTES: { readonly own: PhoenixPalette } = {\n own: {\n left: [\"#c084fc\", \"#7c3aed\"],\n right: [\"#fde68a\", \"#f59e0b\"],\n core: [\"#fff7ed\", \"#fb923c\"],\n body: \"#1f1530\",\n edge: \"#e9d5ff\",\n crest: \"#fbbf24\",\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/mascots/phoenix.tsx","../src/mascots/phoenix-geometry.ts"],"sourcesContent":["// The phoenix of the Krizaka landscape, on its own: two wings — two rival flames — around one bright core. The sixth\n// figure of the flock: it does no job, it stands for the comeback (a relaunch, a recovered account, a second chance).\nimport type * as React from \"react\";\nimport { useId } from \"react\";\n\nimport { PHOENIX, PHOENIX_PALETTES,type PhoenixPalette } from \"./phoenix-geometry\";\n\nconst CSS = `\n@keyframes kzp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }\n@keyframes kzp-core { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }\n.kzp[data-animated] { animation: kzp-float 5s ease-in-out infinite; }\n.kzp[data-animated] .kzp-core { animation: kzp-core 2.8s ease-in-out infinite; }\n@media (prefers-reduced-motion: reduce) { .kzp, .kzp .kzp-core { animation: none !important; } }\n`;\n\nexport type PhoenixProps = Omit<React.ComponentProps<\"svg\">, \"children\"> & {\n /** `own` (default): the violet wing and the gold wing of the Krizaka story. `brand`: the host's accent and accent-2. */\n tone?: \"own\" | \"brand\";\n /** Width and height in pixels. */\n size?: number;\n /** A slow float and a breathing core. Off with `false`; always off under `prefers-reduced-motion`. */\n animated?: boolean;\n /** An accessible name (the phoenix becomes an image); without it, it is decorative. */\n title?: string;\n};\n\nconst BRAND: PhoenixPalette = {\n left: [\"var(--kz-accent-2, var(--kz-accent))\", \"var(--kz-accent)\"],\n right: [\"var(--kz-accent)\", \"var(--kz-accent-2, var(--kz-accent))\"],\n core: [\"#ffffff\", \"var(--kz-accent)\"],\n body: \"var(--kz-surface-3)\",\n edge: \"var(--kz-border-strong)\",\n crest: \"var(--kz-accent)\",\n};\n\n/** The phoenix: the comeback, beside the five birds of the flock (`Mascot`). Decorative unless titled. */\nexport function Phoenix({ tone = \"own\", size = 120, animated = true, title, className, ...props }: PhoenixProps) {\n const id = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const p = tone === \"brand\" ? BRAND : PHOENIX_PALETTES.own;\n const a11y = title ? { role: \"img\", \"aria-label\": title } : { \"aria-hidden\": true };\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n data-animated={animated ? \"\" : undefined}\n className={[\"kzp\", className].filter(Boolean).join(\" \")}\n {...a11y}\n {...props}\n >\n <style>{CSS}</style>\n <defs>\n <linearGradient id={`kzp-l-${id}`} x1=\"1\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={p.left[0]} />\n <stop offset=\"100%\" stopColor={p.left[1]} />\n </linearGradient>\n <linearGradient id={`kzp-r-${id}`} x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\">\n <stop offset=\"0%\" stopColor={p.right[0]} />\n <stop offset=\"100%\" stopColor={p.right[1]} />\n </linearGradient>\n <radialGradient id={`kzp-c-${id}`}>\n <stop offset=\"0%\" stopColor={p.core[0]} />\n <stop offset=\"100%\" stopColor={p.core[1]} stopOpacity=\"0\" />\n </radialGradient>\n </defs>\n <path d={PHOENIX.wingL} fill={`url(#kzp-l-${id})`} />\n <path d={PHOENIX.wingR} fill={`url(#kzp-r-${id})`} />\n <path d={PHOENIX.tailL} fill={`url(#kzp-l-${id})`} opacity=\".7\" />\n <path d={PHOENIX.tailR} fill={`url(#kzp-r-${id})`} opacity=\".7\" />\n <path d={PHOENIX.body} fill={p.body} stroke={p.edge} strokeOpacity=\".5\" />\n <circle cx=\"60\" cy=\"58\" r=\"12\" fill={`url(#kzp-c-${id})`} className=\"kzp-core\" />\n <circle cx=\"60\" cy=\"58\" r=\"3.5\" fill=\"#fff\" />\n <path d={PHOENIX.crest} stroke={p.crest} strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n );\n}\n","/** The phoenix's geometry (120 × 120), drawn by the web `Phoenix` and the native one. */\nexport const PHOENIX = {\n wingL: \"M56 62 C40 40 22 36 8 40 C22 46 30 56 34 70 C40 64 48 62 56 62 Z\",\n wingR: \"M64 62 C80 40 98 36 112 40 C98 46 90 56 86 70 C80 64 72 62 64 62 Z\",\n tailL: \"M52 66 C46 82 40 94 30 104 C44 98 52 90 58 78 Z\",\n tailR: \"M68 66 C74 82 80 94 90 104 C76 98 68 90 62 78 Z\",\n body: \"M60 34 L68 60 L60 82 L52 60 Z\",\n crest: \"M60 34 L56 24 M60 34 L64 24\",\n} as const;\n\nexport interface PhoenixPalette {\n /** The left wing's gradient (top → bottom). */\n readonly left: readonly [string, string];\n /** The right wing's gradient. */\n readonly right: readonly [string, string];\n /** The core's glow: centre, edge. */\n readonly core: readonly [string, string];\n /** The body and its edge. */\n readonly body: string;\n readonly edge: string;\n /** The crest. */\n readonly crest: string;\n}\n\n/** The phoenix of the Krizaka story: a violet wing, a gold wing (the brand layer's own colours, like the marks). */\nexport const PHOENIX_PALETTES: { readonly own: PhoenixPalette } = {\n own: {\n left: [\"#c084fc\", \"#7c3aed\"],\n right: [\"#fde68a\", \"#f59e0b\"],\n core: [\"#fff7ed\", \"#fb923c\"],\n body: \"#1f1530\",\n edge: \"#e9d5ff\",\n crest: \"#fbbf24\",\n },\n};\n"],"mappings":";;;;;;;;;AAGA,SAAS,aAAa;;;ACFf,IAAM,UAAU;AAAA,EACrB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AACT;AAiBO,IAAM,mBAAqD;AAAA,EAChE,KAAK;AAAA,IACH,MAAM,CAAC,WAAW,SAAS;AAAA,IAC3B,OAAO,CAAC,WAAW,SAAS;AAAA,IAC5B,MAAM,CAAC,WAAW,SAAS;AAAA,IAC3B,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF;;;ADiBM,cAEE,YAFF;AA5CN,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBZ,IAAM,QAAwB;AAAA,EAC5B,MAAM,CAAC,wCAAwC,kBAAkB;AAAA,EACjE,OAAO,CAAC,oBAAoB,sCAAsC;AAAA,EAClE,MAAM,CAAC,WAAW,kBAAkB;AAAA,EACpC,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AACT;AAGO,SAAS,QAAQ,EAAE,OAAO,OAAO,OAAO,KAAK,WAAW,MAAM,OAAO,WAAW,GAAG,MAAM,GAAiB;AAC/G,QAAM,KAAK,MAAM,EAAE,QAAQ,mBAAmB,EAAE;AAChD,QAAM,IAAI,SAAS,UAAU,QAAQ,iBAAiB;AACtD,Q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Q,OAAO,MAAM,cAAc,EAAE,KAAK,SAAQ,MAAK;AAAA,QAChE,oBAAC,UAAK,GAAG,QAAQ,OAAO,MAAM,cAAc,EAAE,KAAK,SAAQ,MAAK;AAAA,QAChE,oBAAC,UAAK,GAAG,QAAQ,MAAM,MAAM,EAAE,MAAM,QAAQ,EAAE,MAAM,eAAc,MAAK;AAAA,QACxE,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK,MAAM,cAAc,EAAE,KAAK,WAAU,YAAW;AAAA,QAC/E,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,OAAM,MAAK,QAAO;AAAA,QAC5C,oBAAC,UAAK,GAAG,QAAQ,OAAO,QAAQ,EAAE,OAAO,aAAY,KAAI,eAAc,SAAQ;AAAA;AAAA;AAAA,EACjF;AAEJ;","names":[]}
|
package/dist/motion.css
CHANGED
|
@@ -247,7 +247,7 @@ svg[data-kz-icon="ExternalIcon"] {
|
|
|
247
247
|
/* A figure that climbs (NumberTicker): an invisible copy of the final value shares the grid cell and holds the width. */
|
|
248
248
|
.kz-count {
|
|
249
249
|
display: inline-grid;
|
|
250
|
-
font-variant-numeric: tabular-nums;
|
|
250
|
+
font-variant-numeric: var(--kz-figures, lining-nums tabular-nums);
|
|
251
251
|
}
|
|
252
252
|
.kz-count > * {
|
|
253
253
|
grid-area: 1 / 1;
|
|
@@ -147,7 +147,7 @@ var styles = StyleSheet.create({
|
|
|
147
147
|
rail: { position: "absolute", right: 8, bottom: 20, alignItems: "center", gap: 12 },
|
|
148
148
|
railItem: { alignItems: "center", gap: 2 },
|
|
149
149
|
railButton: { width: 44, height: 44, borderRadius: 22, alignItems: "center", justifyContent: "center" },
|
|
150
|
-
count: { fontVariant: ["tabular-nums"], fontWeight: "600" },
|
|
150
|
+
count: { fontVariant: ["lining-nums", "tabular-nums"], fontWeight: "600" },
|
|
151
151
|
follow: { position: "absolute", bottom: -10, alignSelf: "center", width: 22, height: 22, borderRadius: 11, alignItems: "center", justifyContent: "center", overflow: "hidden" },
|
|
152
152
|
caption: { position: "absolute", left: 12, right: 76, bottom: 16, gap: 6 },
|
|
153
153
|
nameRow: { flexDirection: "row", alignItems: "center", gap: 6 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/native/vertical-video.tsx"],"sourcesContent":["// @krizaka/ui/native/vertical-video — its own entry (it plays video on expo-video, an optional peer). A 9:16 clip filling\n// its frame, the action rail on the right (avatar + follow, like, comments, share, a slot for the product's tip), the\n// creator's caption bottom-left, a progress hairline; `ShortFeed` pages them vertically and plays the one in view.\n// Over the picture everything reads on the theme's invariant `scrim` / `textOnMedia`.\nimport { formatCompact } from \"@krizaka/intl\";\nimport { Avatar, Txt, useTheme, VerifiedBadge } from \"@krizaka/ui/native\";\nimport { VideoPlayer } from \"@krizaka/ui/native/video-player\";\nimport * as React from \"react\";\nimport { FlatList, Image,Pressable, type StyleProp, StyleSheet, View, type ViewStyle, type ViewToken } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nexport interface VerticalVideoLabels {\n play: string;\n pause: string;\n like: string;\n comment: string;\n share: string;\n more: string;\n /** \"Follow {name}\". */\n follow: string;\n /** \"Following {name}\". */\n following: string;\n expand: string;\n collapse: string;\n progress: string;\n /** The rail's name (\"Actions\"). */\n actions: string;\n}\n\nexport const verticalVideoLabels: VerticalVideoLabels = {\n play: \"Play\",\n pause: \"Pause\",\n like: \"Like\",\n comment: \"Comments\",\n share: \"Share\",\n more: \"More\",\n follow: \"Follow {name}\",\n following: \"Following {name}\",\n expand: \"More\",\n collapse: \"Less\",\n progress: \"Progress\",\n actions: \"Actions\",\n};\n\nexport type VerticalVideoProps = {\n /** The video's accessible name (\"Video: Night shoot, part 2\"), passed translated. */\n title: string;\n /** The clip's address (MP4 or HLS). Absent, the poster alone shows. */\n uri?: string;\n /** The picture until the first frame. */\n posterUri?: string;\n /** Plays while `true` (a `ShortFeed` passes it for the slide in view). Default `true`. */\n active?: boolean;\n /** Who made it: name, portrait, the seal's words. */\n creator: { name: string; avatarUri?: string; verifiedLabel?: string };\n /** A pill beside the name (\"AI-GENERATED\"). */\n disclosure?: string;\n /** The caption, two lines until expanded. */\n caption?: string;\n /** Tags after the caption (without `#`). */\n tags?: readonly string[];\n /** The sound or credit line. */\n credit?: string;\n /** The like count, compact in `locale`. */\n likes?: number;\n /** The comment count. */\n comments?: number;\n /** The share count. */\n shares?: number;\n /** Whether the viewer likes it. */\n liked?: boolean;\n /** Whether the viewer follows the creator. */\n following?: boolean;\n /** The viewer likes or unlikes. */\n onLike?: (liked: boolean) => void;\n /** Opens the comments. */\n onComment?: () => void;\n /** Opens the share sheet. */\n onShare?: () => void;\n /** Follows or unfollows; without it the avatar has no \"+\". */\n onFollow?: (following: boolean) => void;\n /** The \"more\" action; without it the button is not drawn. */\n onMore?: () => void;\n /** The product's own action on the rail (a tip, an unlock): a named, 44 pt button of yours. */\n tipSlot?: React.ReactNode;\n /** Top left over the picture: a chip (an auction's time left). */\n topStart?: React.ReactNode;\n /** Above the caption: a goal gauge. */\n aboveCaption?: React.ReactNode;\n /** The locale of the counts. Default `en`. */\n locale?: string;\n /** Every word, passed translated. */\n labels?: Partial<VerticalVideoLabels>;\n /** Styles merged last, on the frame. */\n style?: StyleProp<ViewStyle>;\n};\n\nconst HEART = \"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z\";\nconst COMMENT = \"M4 5h16v11H9l-5 4z\";\nconst SHARE = \"M4 12v7h16v-7M12 3v12M7 8l5-5 5 5\";\nconst MORE = \"M5 12h.01M12 12h.01M19 12h.01\";\n\nfunction Glyph({ d, color, filled }: { d: string; color: string; filled?: boolean }) {\n return (\n <Svg width={24} height={24} viewBox=\"0 0 24 24\" fill={filled ? color : \"none\"} stroke={color} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <Path d={d} />\n </Svg>\n );\n}\n\nfunction RailButton({ label, count, pressed, onPress, children }: { label: string; count?: string | undefined; pressed?: boolean | undefined; onPress?: (() => void) | undefined; children: React.ReactNode }) {\n const { theme } = useTheme();\n return (\n <View style={styles.railItem}>\n <Pressable role=\"button\" aria-label={label} aria-pressed={pressed} onPress={onPress} hitSlop={4} style={[styles.railButton, { backgroundColor: theme.scrim }]}>\n {children}\n </Pressable>\n {count !== undefined ? (\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.count}>\n {count}\n </Txt>\n ) : null}\n </View>\n );\n}\n\n/** One short video: 9:16, the rail of actions on the right, the creator's caption bottom-left. */\nexport function VerticalVideo({\n title,\n uri,\n posterUri,\n active = true,\n creator,\n disclosure,\n caption,\n tags = [],\n credit,\n likes,\n comments,\n shares,\n liked = false,\n following = false,\n onLike,\n onComment,\n onShare,\n onFollow,\n onMore,\n tipSlot,\n topStart,\n aboveCaption,\n locale = \"en\",\n labels: custom,\n style,\n}: VerticalVideoProps) {\n const { theme } = useTheme();\n const labels = { ...verticalVideoLabels, ...custom };\n const [open, setOpen] = React.useState(false);\n const [paused, setPaused] = React.useState(false);\n const count = (n?: number) => (n === undefined ? undefined : formatCompact(n, { locale }));\n const on = theme.textOnMedia;\n return (\n <View role=\"group\" aria-label={title} style={[styles.frame, { backgroundColor: theme.media }, style]}>\n {uri ? (\n <VideoPlayer source={{ uri }} title={title} aspectRatio={9 / 16} contentFit=\"cover\" nativeControls={false} fullscreen={false} autoPlay loop muted paused={!active || paused} style={StyleSheet.absoluteFill} {...(posterUri ? { poster: { uri: posterUri } } : {})} />\n ) : posterUri ? (\n <Image source={{ uri: posterUri }} aria-hidden resizeMode=\"cover\" style={StyleSheet.absoluteFill} />\n ) : null}\n <Pressable role=\"button\" aria-label={paused ? labels.play : labels.pause} onPress={() => setPaused((p) => !p)} onLongPress={() => onLike?.(!liked)} style={StyleSheet.absoluteFill} />\n <View pointerEvents=\"none\" style={[styles.shade, { backgroundColor: theme.scrim }]} />\n {topStart ? <View style={styles.topStart}>{topStart}</View> : null}\n\n <View role=\"group\" aria-label={labels.actions} style={styles.rail}>\n <View>\n <Avatar alt={creator.name} {...(creator.avatarUri ? { src: creator.avatarUri } : {})} size=\"md\" />\n {onFollow ? (\n <Pressable\n role=\"button\"\n aria-label={(following ? labels.following : labels.follow).replace(\"{name}\", creator.name)}\n aria-pressed={following}\n onPress={() => onFollow(!following)}\n hitSlop={12}\n style={[styles.follow, { backgroundColor: following ? theme.surface2 : theme.accent }]}\n >\n <Glyph d={following ? \"M5 12l5 5 9-10\" : \"M12 5v14M5 12h14\"} color={following ? theme.textPrimary : theme.onAccent} />\n </Pressable>\n ) : null}\n </View>\n <RailButton label={labels.like} count={count(likes)} pressed={liked} onPress={() => onLike?.(!liked)}>\n <Glyph d={HEART} color={liked ? theme.accent : on} filled={liked} />\n </RailButton>\n <RailButton label={labels.comment} count={count(comments)} onPress={onComment}>\n <Glyph d={COMMENT} color={on} />\n </RailButton>\n <RailButton label={labels.share} count={count(shares)} onPress={onShare}>\n <Glyph d={SHARE} color={on} />\n </RailButton>\n {tipSlot}\n {onMore ? (\n <RailButton label={labels.more} onPress={onMore}>\n <Glyph d={MORE} color={on} />\n </RailButton>\n ) : null}\n </View>\n\n <View style={styles.caption}>\n {aboveCaption}\n <View style={styles.nameRow}>\n <Txt variant=\"label\" tone=\"onMedia\">\n {creator.name}\n </Txt>\n {creator.verifiedLabel ? <VerifiedBadge label={creator.verifiedLabel} on=\"media\" size={14} /> : null}\n {disclosure ? (\n <View style={[styles.pill, { backgroundColor: theme.scrim }]}>\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.pillText}>\n {disclosure.toUpperCase()}\n </Txt>\n </View>\n ) : null}\n </View>\n {caption ? (\n <Txt tone=\"onMedia\" numberOfLines={open ? undefined : 2}>\n {caption}\n {tags.length > 0 ? ` ${tags.map((tag) => `#${tag}`).join(\" \")}` : \"\"}\n </Txt>\n ) : null}\n {caption && caption.length > 90 ? (\n <Pressable role=\"button\" aria-label={open ? labels.collapse : labels.expand} aria-expanded={open} onPress={() => setOpen((v) => !v)} hitSlop={10}>\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.underline}>\n {open ? labels.collapse : labels.expand}\n </Txt>\n </Pressable>\n ) : null}\n {credit ? (\n <Txt variant=\"caption\" tone=\"onMedia\">\n {credit}\n </Txt>\n ) : null}\n </View>\n </View>\n );\n}\n\nexport type ShortFeedProps<T> = {\n /** The feed's accessible name (\"Videos\"). */\n label: string;\n /** The videos, in order. */\n items: readonly T[];\n /** A stable key for an item. */\n getId: (item: T) => string;\n /** One slide: `active` is true for the one in view. */\n renderItem: (item: T, state: { active: boolean; index: number }) => React.ReactElement;\n /** The page's height in points (the feed's own height; one slide per page). */\n height: number;\n /** Called when the slide in view changes. */\n onActiveChange?: (index: number, item: T) => void;\n /** Styles merged last. */\n style?: StyleProp<ViewStyle>;\n};\n\n/** A vertical paging feed: one video per screen, the one in view plays, the others pause. */\nexport function ShortFeed<T>({ label, items, getId, renderItem, height, onActiveChange, style }: ShortFeedProps<T>) {\n const [active, setActive] = React.useState(0);\n // FlatList wants one stable callback for its whole life.\n const [onViewable] = React.useState(() => ({ viewableItems }: { viewableItems: ViewToken[] }) => {\n const first = viewableItems.find((v) => v.isViewable && typeof v.index === \"number\");\n if (first && typeof first.index === \"number\") setActive(first.index);\n });\n React.useEffect(() => {\n const item = items[active];\n if (item !== undefined) onActiveChange?.(active, item);\n // Only a change of the slide in view is an event.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active]);\n return (\n <View role=\"list\" aria-label={label} style={[{ height }, style]}>\n <FlatList\n data={items as T[]}\n keyExtractor={getId}\n pagingEnabled\n showsVerticalScrollIndicator={false}\n snapToInterval={height}\n decelerationRate=\"fast\"\n getItemLayout={(_, index) => ({ length: height, offset: height * index, index })}\n windowSize={3}\n initialNumToRender={2}\n viewabilityConfig={{ itemVisiblePercentThreshold: 60 }}\n onViewableItemsChanged={onViewable}\n extraData={active}\n style={{ height }}\n renderItem={({ item, index }) => <View style={{ height }}>{renderItem(item, { active: index === active, index })}</View>}\n />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: { width: \"100%\", aspectRatio: 9 / 16, overflow: \"hidden\" },\n shade: { position: \"absolute\", left: 0, right: 0, bottom: 0, height: \"30%\", opacity: 0.55 },\n topStart: { position: \"absolute\", left: 12, top: 12 },\n rail: { position: \"absolute\", right: 8, bottom: 20, alignItems: \"center\", gap: 12 },\n railItem: { alignItems: \"center\", gap: 2 },\n railButton: { width: 44, height: 44, borderRadius: 22, alignItems: \"center\", justifyContent: \"center\" },\n count: { fontVariant: [\"tabular-nums\"], fontWeight: \"600\" },\n follow: { position: \"absolute\", bottom: -10, alignSelf: \"center\", width: 22, height: 22, borderRadius: 11, alignItems: \"center\", justifyContent: \"center\", overflow: \"hidden\" },\n caption: { position: \"absolute\", left: 12, right: 76, bottom: 16, gap: 6 },\n nameRow: { flexDirection: \"row\", alignItems: \"center\", gap: 6 },\n pill: { paddingHorizontal: 8, paddingVertical: 2, borderRadius: 999 },\n pillText: { fontWeight: \"700\", letterSpacing: 0.4 },\n underline: { textDecorationLine: \"underline\", fontWeight: \"600\" },\n});\n"],"mappings":";AAIA,SAAS,qBAAqB;AAC9B,SAAS,QAAQ,KAAK,UAAU,qBAAqB;AACrD,SAAS,mBAAmB;AAC5B,YAAY,WAAW;AACvB,SAAS,UAAU,OAAM,WAA2B,YAAY,YAA4C;AAC5G,OAAO,OAAO,YAAY;AAgGpB,cAQF,YARE;AA5EC,IAAM,sBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AACX;AAuDA,IAAM,QAAQ;AACd,IAAM,UAAU;AAChB,IAAM,QAAQ;AACd,IAAM,OAAO;AAEb,SAAS,MAA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SAAS,EAAE,eAAe,OAAO,YAAY,UAAU,KAAK,EAAE;AAAA,EAC9D,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,cAAc,IAAI;AAAA,EACpE,UAAU,EAAE,YAAY,OAAO,eAAe,IAAI;AAAA,EAClD,WAAW,EAAE,oBAAoB,aAAa,YAAY,MAAM;AAClE,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/native/vertical-video.tsx"],"sourcesContent":["// @krizaka/ui/native/vertical-video — its own entry (it plays video on expo-video, an optional peer). A 9:16 clip filling\n// its frame, the action rail on the right (avatar + follow, like, comments, share, a slot for the product's tip), the\n// creator's caption bottom-left, a progress hairline; `ShortFeed` pages them vertically and plays the one in view.\n// Over the picture everything reads on the theme's invariant `scrim` / `textOnMedia`.\nimport { formatCompact } from \"@krizaka/intl\";\nimport { Avatar, Txt, useTheme, VerifiedBadge } from \"@krizaka/ui/native\";\nimport { VideoPlayer } from \"@krizaka/ui/native/video-player\";\nimport * as React from \"react\";\nimport { FlatList, Image,Pressable, type StyleProp, StyleSheet, View, type ViewStyle, type ViewToken } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nexport interface VerticalVideoLabels {\n play: string;\n pause: string;\n like: string;\n comment: string;\n share: string;\n more: string;\n /** \"Follow {name}\". */\n follow: string;\n /** \"Following {name}\". */\n following: string;\n expand: string;\n collapse: string;\n progress: string;\n /** The rail's name (\"Actions\"). */\n actions: string;\n}\n\nexport const verticalVideoLabels: VerticalVideoLabels = {\n play: \"Play\",\n pause: \"Pause\",\n like: \"Like\",\n comment: \"Comments\",\n share: \"Share\",\n more: \"More\",\n follow: \"Follow {name}\",\n following: \"Following {name}\",\n expand: \"More\",\n collapse: \"Less\",\n progress: \"Progress\",\n actions: \"Actions\",\n};\n\nexport type VerticalVideoProps = {\n /** The video's accessible name (\"Video: Night shoot, part 2\"), passed translated. */\n title: string;\n /** The clip's address (MP4 or HLS). Absent, the poster alone shows. */\n uri?: string;\n /** The picture until the first frame. */\n posterUri?: string;\n /** Plays while `true` (a `ShortFeed` passes it for the slide in view). Default `true`. */\n active?: boolean;\n /** Who made it: name, portrait, the seal's words. */\n creator: { name: string; avatarUri?: string; verifiedLabel?: string };\n /** A pill beside the name (\"AI-GENERATED\"). */\n disclosure?: string;\n /** The caption, two lines until expanded. */\n caption?: string;\n /** Tags after the caption (without `#`). */\n tags?: readonly string[];\n /** The sound or credit line. */\n credit?: string;\n /** The like count, compact in `locale`. */\n likes?: number;\n /** The comment count. */\n comments?: number;\n /** The share count. */\n shares?: number;\n /** Whether the viewer likes it. */\n liked?: boolean;\n /** Whether the viewer follows the creator. */\n following?: boolean;\n /** The viewer likes or unlikes. */\n onLike?: (liked: boolean) => void;\n /** Opens the comments. */\n onComment?: () => void;\n /** Opens the share sheet. */\n onShare?: () => void;\n /** Follows or unfollows; without it the avatar has no \"+\". */\n onFollow?: (following: boolean) => void;\n /** The \"more\" action; without it the button is not drawn. */\n onMore?: () => void;\n /** The product's own action on the rail (a tip, an unlock): a named, 44 pt button of yours. */\n tipSlot?: React.ReactNode;\n /** Top left over the picture: a chip (an auction's time left). */\n topStart?: React.ReactNode;\n /** Above the caption: a goal gauge. */\n aboveCaption?: React.ReactNode;\n /** The locale of the counts. Default `en`. */\n locale?: string;\n /** Every word, passed translated. */\n labels?: Partial<VerticalVideoLabels>;\n /** Styles merged last, on the frame. */\n style?: StyleProp<ViewStyle>;\n};\n\nconst HEART = \"M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z\";\nconst COMMENT = \"M4 5h16v11H9l-5 4z\";\nconst SHARE = \"M4 12v7h16v-7M12 3v12M7 8l5-5 5 5\";\nconst MORE = \"M5 12h.01M12 12h.01M19 12h.01\";\n\nfunction Glyph({ d, color, filled }: { d: string; color: string; filled?: boolean }) {\n return (\n <Svg width={24} height={24} viewBox=\"0 0 24 24\" fill={filled ? color : \"none\"} stroke={color} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <Path d={d} />\n </Svg>\n );\n}\n\nfunction RailButton({ label, count, pressed, onPress, children }: { label: string; count?: string | undefined; pressed?: boolean | undefined; onPress?: (() => void) | undefined; children: React.ReactNode }) {\n const { theme } = useTheme();\n return (\n <View style={styles.railItem}>\n <Pressable role=\"button\" aria-label={label} aria-pressed={pressed} onPress={onPress} hitSlop={4} style={[styles.railButton, { backgroundColor: theme.scrim }]}>\n {children}\n </Pressable>\n {count !== undefined ? (\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.count}>\n {count}\n </Txt>\n ) : null}\n </View>\n );\n}\n\n/** One short video: 9:16, the rail of actions on the right, the creator's caption bottom-left. */\nexport function VerticalVideo({\n title,\n uri,\n posterUri,\n active = true,\n creator,\n disclosure,\n caption,\n tags = [],\n credit,\n likes,\n comments,\n shares,\n liked = false,\n following = false,\n onLike,\n onComment,\n onShare,\n onFollow,\n onMore,\n tipSlot,\n topStart,\n aboveCaption,\n locale = \"en\",\n labels: custom,\n style,\n}: VerticalVideoProps) {\n const { theme } = useTheme();\n const labels = { ...verticalVideoLabels, ...custom };\n const [open, setOpen] = React.useState(false);\n const [paused, setPaused] = React.useState(false);\n const count = (n?: number) => (n === undefined ? undefined : formatCompact(n, { locale }));\n const on = theme.textOnMedia;\n return (\n <View role=\"group\" aria-label={title} style={[styles.frame, { backgroundColor: theme.media }, style]}>\n {uri ? (\n <VideoPlayer source={{ uri }} title={title} aspectRatio={9 / 16} contentFit=\"cover\" nativeControls={false} fullscreen={false} autoPlay loop muted paused={!active || paused} style={StyleSheet.absoluteFill} {...(posterUri ? { poster: { uri: posterUri } } : {})} />\n ) : posterUri ? (\n <Image source={{ uri: posterUri }} aria-hidden resizeMode=\"cover\" style={StyleSheet.absoluteFill} />\n ) : null}\n <Pressable role=\"button\" aria-label={paused ? labels.play : labels.pause} onPress={() => setPaused((p) => !p)} onLongPress={() => onLike?.(!liked)} style={StyleSheet.absoluteFill} />\n <View pointerEvents=\"none\" style={[styles.shade, { backgroundColor: theme.scrim }]} />\n {topStart ? <View style={styles.topStart}>{topStart}</View> : null}\n\n <View role=\"group\" aria-label={labels.actions} style={styles.rail}>\n <View>\n <Avatar alt={creator.name} {...(creator.avatarUri ? { src: creator.avatarUri } : {})} size=\"md\" />\n {onFollow ? (\n <Pressable\n role=\"button\"\n aria-label={(following ? labels.following : labels.follow).replace(\"{name}\", creator.name)}\n aria-pressed={following}\n onPress={() => onFollow(!following)}\n hitSlop={12}\n style={[styles.follow, { backgroundColor: following ? theme.surface2 : theme.accent }]}\n >\n <Glyph d={following ? \"M5 12l5 5 9-10\" : \"M12 5v14M5 12h14\"} color={following ? theme.textPrimary : theme.onAccent} />\n </Pressable>\n ) : null}\n </View>\n <RailButton label={labels.like} count={count(likes)} pressed={liked} onPress={() => onLike?.(!liked)}>\n <Glyph d={HEART} color={liked ? theme.accent : on} filled={liked} />\n </RailButton>\n <RailButton label={labels.comment} count={count(comments)} onPress={onComment}>\n <Glyph d={COMMENT} color={on} />\n </RailButton>\n <RailButton label={labels.share} count={count(shares)} onPress={onShare}>\n <Glyph d={SHARE} color={on} />\n </RailButton>\n {tipSlot}\n {onMore ? (\n <RailButton label={labels.more} onPress={onMore}>\n <Glyph d={MORE} color={on} />\n </RailButton>\n ) : null}\n </View>\n\n <View style={styles.caption}>\n {aboveCaption}\n <View style={styles.nameRow}>\n <Txt variant=\"label\" tone=\"onMedia\">\n {creator.name}\n </Txt>\n {creator.verifiedLabel ? <VerifiedBadge label={creator.verifiedLabel} on=\"media\" size={14} /> : null}\n {disclosure ? (\n <View style={[styles.pill, { backgroundColor: theme.scrim }]}>\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.pillText}>\n {disclosure.toUpperCase()}\n </Txt>\n </View>\n ) : null}\n </View>\n {caption ? (\n <Txt tone=\"onMedia\" numberOfLines={open ? undefined : 2}>\n {caption}\n {tags.length > 0 ? ` ${tags.map((tag) => `#${tag}`).join(\" \")}` : \"\"}\n </Txt>\n ) : null}\n {caption && caption.length > 90 ? (\n <Pressable role=\"button\" aria-label={open ? labels.collapse : labels.expand} aria-expanded={open} onPress={() => setOpen((v) => !v)} hitSlop={10}>\n <Txt variant=\"caption\" tone=\"onMedia\" style={styles.underline}>\n {open ? labels.collapse : labels.expand}\n </Txt>\n </Pressable>\n ) : null}\n {credit ? (\n <Txt variant=\"caption\" tone=\"onMedia\">\n {credit}\n </Txt>\n ) : null}\n </View>\n </View>\n );\n}\n\nexport type ShortFeedProps<T> = {\n /** The feed's accessible name (\"Videos\"). */\n label: string;\n /** The videos, in order. */\n items: readonly T[];\n /** A stable key for an item. */\n getId: (item: T) => string;\n /** One slide: `active` is true for the one in view. */\n renderItem: (item: T, state: { active: boolean; index: number }) => React.ReactElement;\n /** The page's height in points (the feed's own height; one slide per page). */\n height: number;\n /** Called when the slide in view changes. */\n onActiveChange?: (index: number, item: T) => void;\n /** Styles merged last. */\n style?: StyleProp<ViewStyle>;\n};\n\n/** A vertical paging feed: one video per screen, the one in view plays, the others pause. */\nexport function ShortFeed<T>({ label, items, getId, renderItem, height, onActiveChange, style }: ShortFeedProps<T>) {\n const [active, setActive] = React.useState(0);\n // FlatList wants one stable callback for its whole life.\n const [onViewable] = React.useState(() => ({ viewableItems }: { viewableItems: ViewToken[] }) => {\n const first = viewableItems.find((v) => v.isViewable && typeof v.index === \"number\");\n if (first && typeof first.index === \"number\") setActive(first.index);\n });\n React.useEffect(() => {\n const item = items[active];\n if (item !== undefined) onActiveChange?.(active, item);\n // Only a change of the slide in view is an event.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active]);\n return (\n <View role=\"list\" aria-label={label} style={[{ height }, style]}>\n <FlatList\n data={items as T[]}\n keyExtractor={getId}\n pagingEnabled\n showsVerticalScrollIndicator={false}\n snapToInterval={height}\n decelerationRate=\"fast\"\n getItemLayout={(_, index) => ({ length: height, offset: height * index, index })}\n windowSize={3}\n initialNumToRender={2}\n viewabilityConfig={{ itemVisiblePercentThreshold: 60 }}\n onViewableItemsChanged={onViewable}\n extraData={active}\n style={{ height }}\n renderItem={({ item, index }) => <View style={{ height }}>{renderItem(item, { active: index === active, index })}</View>}\n />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: { width: \"100%\", aspectRatio: 9 / 16, overflow: \"hidden\" },\n shade: { position: \"absolute\", left: 0, right: 0, bottom: 0, height: \"30%\", opacity: 0.55 },\n topStart: { position: \"absolute\", left: 12, top: 12 },\n rail: { position: \"absolute\", right: 8, bottom: 20, alignItems: \"center\", gap: 12 },\n railItem: { alignItems: \"center\", gap: 2 },\n railButton: { width: 44, height: 44, borderRadius: 22, alignItems: \"center\", justifyContent: \"center\" },\n count: { fontVariant: [\"lining-nums\", \"tabular-nums\"], fontWeight: \"600\" },\n follow: { position: \"absolute\", bottom: -10, alignSelf: \"center\", width: 22, height: 22, borderRadius: 11, alignItems: \"center\", justifyContent: \"center\", overflow: \"hidden\" },\n caption: { position: \"absolute\", left: 12, right: 76, bottom: 16, gap: 6 },\n nameRow: { flexDirection: \"row\", alignItems: \"center\", gap: 6 },\n pill: { paddingHorizontal: 8, paddingVertical: 2, borderRadius: 999 },\n pillText: { fontWeight: \"700\", letterSpacing: 0.4 },\n underline: { textDecorationLine: \"underline\", fontWeight: \"600\" },\n});\n"],"mappings":";AAIA,SAAS,qBAAqB;AAC9B,SAAS,QAAQ,KAAK,UAAU,qBAAqB;AACrD,SAAS,mBAAmB;AAC5B,YAAY,WAAW;AACvB,SAAS,UAAU,OAAM,WAA2B,YAAY,YAA4C;AAC5G,OAAO,OAAO,YAAY;AAgGpB,cAQF,YARE;AA5EC,IAAM,sBAA2C;AAAA,EACtD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAC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AA,EAC9K,SAAS,EAAE,UAAU,YAAY,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK,EAAE;AAAA,EACzE,SAAS,EAAE,eAAe,OAAO,YAAY,UAAU,KAAK,EAAE;AAAA,EAC9D,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,cAAc,IAAI;AAAA,EACpE,UAAU,EAAE,YAAY,OAAO,eAAe,IAAI;AAAA,EAClD,WAAW,EAAE,oBAAoB,aAAa,YAAY,MAAM;AAClE,CAAC;","names":[]}
|
package/dist/native.d.ts
CHANGED
package/dist/native.js
CHANGED
|
@@ -495,7 +495,7 @@ var textStyles = StyleSheet.create({
|
|
|
495
495
|
body: { fontSize: 15, lineHeight: 21 },
|
|
496
496
|
caption: { fontSize: 12, lineHeight: 16 },
|
|
497
497
|
label: { fontSize: 14, lineHeight: 18, fontWeight: "700" },
|
|
498
|
-
mono: { fontSize: 14, lineHeight: 18, fontWeight: "700", fontVariant: ["tabular-nums"] }
|
|
498
|
+
mono: { fontSize: 14, lineHeight: 18, fontWeight: "700", fontVariant: ["lining-nums", "tabular-nums"] }
|
|
499
499
|
});
|
|
500
500
|
var styles = textStyles;
|
|
501
501
|
|
|
@@ -1930,7 +1930,7 @@ function Countdown({ target, skewMs = 0, units, urgentBelowMs = 6e4, size = "md"
|
|
|
1930
1930
|
var styles13 = StyleSheet13.create({
|
|
1931
1931
|
root: { flexDirection: "row", alignItems: "baseline", gap: 6 },
|
|
1932
1932
|
segment: { flexDirection: "row", alignItems: "baseline" },
|
|
1933
|
-
value: { fontWeight: "900", fontVariant: ["tabular-nums"], letterSpacing: -0.3 },
|
|
1933
|
+
value: { fontWeight: "900", fontVariant: ["lining-nums", "tabular-nums"], letterSpacing: -0.3 },
|
|
1934
1934
|
unit: { marginLeft: 2, fontWeight: "700", textTransform: "uppercase" },
|
|
1935
1935
|
label: { fontWeight: "600", marginRight: 2 }
|
|
1936
1936
|
});
|
|
@@ -2010,7 +2010,7 @@ var styles14 = StyleSheet14.create({
|
|
|
2010
2010
|
box: { width: 64, gap: 4 },
|
|
2011
2011
|
yearBox: { width: 88, gap: 4 },
|
|
2012
2012
|
part: { fontSize: 11, lineHeight: 14 },
|
|
2013
|
-
input: { height: 44, borderWidth: 1, paddingHorizontal: 10, fontSize: 16, fontVariant: ["tabular-nums"], textAlign: "center" },
|
|
2013
|
+
input: { height: 44, borderWidth: 1, paddingHorizontal: 10, fontSize: 16, fontVariant: ["lining-nums", "tabular-nums"], textAlign: "center" },
|
|
2014
2014
|
caption: { fontSize: 12, lineHeight: 16 },
|
|
2015
2015
|
disabled: { opacity: 0.5 }
|
|
2016
2016
|
});
|
|
@@ -2155,7 +2155,7 @@ var styles15 = StyleSheet15.create({
|
|
|
2155
2155
|
band: { position: "absolute", left: 6, right: 6, borderWidth: StyleSheet15.hairlineWidth },
|
|
2156
2156
|
column: { minWidth: 56, flexGrow: 1 },
|
|
2157
2157
|
item: { alignItems: "center", justifyContent: "center", paddingHorizontal: 8 },
|
|
2158
|
-
itemText: { fontSize: 18, fontVariant: ["tabular-nums"] },
|
|
2158
|
+
itemText: { fontSize: 18, fontVariant: ["lining-nums", "tabular-nums"] },
|
|
2159
2159
|
divider: { alignSelf: "center", fontSize: 18, fontWeight: "600" },
|
|
2160
2160
|
disabled: { opacity: 0.4 }
|
|
2161
2161
|
});
|
|
@@ -2453,7 +2453,7 @@ var styles16 = StyleSheet16.create({
|
|
|
2453
2453
|
weekday: { width: 44, textAlign: "center", fontSize: 11, fontWeight: "700", paddingBottom: 4 },
|
|
2454
2454
|
cell: { width: 44, height: 44, marginVertical: 1 },
|
|
2455
2455
|
day: { flex: 1, alignItems: "center", justifyContent: "center" },
|
|
2456
|
-
dayText: { fontSize: 15, fontVariant: ["tabular-nums"] },
|
|
2456
|
+
dayText: { fontSize: 15, fontVariant: ["lining-nums", "tabular-nums"] },
|
|
2457
2457
|
node: { width: 5, height: 5, borderRadius: 1, transform: [{ rotate: "45deg" }] },
|
|
2458
2458
|
todayNode: { position: "absolute", bottom: 5 },
|
|
2459
2459
|
months: { flexDirection: "row", flexWrap: "wrap", width: 264, gap: 6 },
|
|
@@ -2463,11 +2463,11 @@ var styles16 = StyleSheet16.create({
|
|
|
2463
2463
|
stripDay: { width: 56, height: 72, alignItems: "center", justifyContent: "center", gap: 2, borderWidth: 1 },
|
|
2464
2464
|
stripNode: { position: "absolute", top: 6 },
|
|
2465
2465
|
stripWeekday: { fontSize: 11, fontWeight: "700", letterSpacing: 0.5 },
|
|
2466
|
-
stripNumber: { fontSize: 19, fontWeight: "700", fontVariant: ["tabular-nums"] },
|
|
2466
|
+
stripNumber: { fontSize: 19, fontWeight: "700", fontVariant: ["lining-nums", "tabular-nums"] },
|
|
2467
2467
|
dot: { width: 6, height: 6, borderRadius: 3 },
|
|
2468
2468
|
slots: { flexDirection: "row", flexWrap: "wrap", gap: 8, alignSelf: "stretch" },
|
|
2469
2469
|
slot: { minWidth: 88, height: 44, paddingHorizontal: 12, alignItems: "center", justifyContent: "center", borderWidth: 1 },
|
|
2470
|
-
slotText: { fontSize: 15, fontWeight: "600", fontVariant: ["tabular-nums"] },
|
|
2470
|
+
slotText: { fontSize: 15, fontWeight: "600", fontVariant: ["lining-nums", "tabular-nums"] },
|
|
2471
2471
|
field: { gap: 6, alignSelf: "stretch" },
|
|
2472
2472
|
fieldLabel: { fontSize: 12, lineHeight: 16, fontWeight: "600" },
|
|
2473
2473
|
caption: { fontSize: 12, lineHeight: 16 },
|
|
@@ -4042,7 +4042,7 @@ function NumberTicker({ value, locale, format, trigger = "mount", duration = 110
|
|
|
4042
4042
|
};
|
|
4043
4043
|
}, [value, reduce, trigger, duration, announce, anim, writer]);
|
|
4044
4044
|
const digits = Number.isInteger(value) ? Math.round(shown) : shown;
|
|
4045
|
-
return /* @__PURE__ */ jsx42(Txt, { variant, tone: tone3, "aria-label": writer.format(value), style: [{ fontVariant: ["tabular-nums"] }, style], children: /* @__PURE__ */ jsx42(Text13, { "aria-hidden": true, children: writer.format(digits) }) });
|
|
4045
|
+
return /* @__PURE__ */ jsx42(Txt, { variant, tone: tone3, "aria-label": writer.format(value), style: [{ fontVariant: ["lining-nums", "tabular-nums"] }, style], children: /* @__PURE__ */ jsx42(Text13, { "aria-hidden": true, children: writer.format(digits) }) });
|
|
4046
4046
|
}
|
|
4047
4047
|
|
|
4048
4048
|
// src/native/onboarding.tsx
|
|
@@ -4201,7 +4201,7 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
4201
4201
|
var styles32 = StyleSheet32.create({
|
|
4202
4202
|
row: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: 12 },
|
|
4203
4203
|
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth: StyleSheet32.hairlineWidth },
|
|
4204
|
-
status: { fontSize: 13, fontWeight: "600", fontVariant: ["tabular-nums"] }
|
|
4204
|
+
status: { fontSize: 13, fontWeight: "600", fontVariant: ["lining-nums", "tabular-nums"] }
|
|
4205
4205
|
});
|
|
4206
4206
|
|
|
4207
4207
|
// src/native/permission-prompt.tsx
|
|
@@ -5273,7 +5273,7 @@ var styles44 = StyleSheet44.create({
|
|
|
5273
5273
|
rootVertical: { alignSelf: "flex-start", alignItems: "center" },
|
|
5274
5274
|
header: { flexDirection: "row", justifyContent: "space-between", alignItems: "baseline", gap: 12 },
|
|
5275
5275
|
label: { fontSize: 12, fontWeight: "600" },
|
|
5276
|
-
value: { fontSize: 12, fontVariant: ["tabular-nums"] },
|
|
5276
|
+
value: { fontSize: 12, fontVariant: ["lining-nums", "tabular-nums"] },
|
|
5277
5277
|
control: { height: 44, justifyContent: "center", paddingHorizontal: THUMB / 2 },
|
|
5278
5278
|
controlVertical: { flex: 1, minHeight: 160, width: 44, alignItems: "center", paddingVertical: THUMB / 2 },
|
|
5279
5279
|
track: { height: 6 },
|
|
@@ -5296,7 +5296,7 @@ var styles44 = StyleSheet44.create({
|
|
|
5296
5296
|
},
|
|
5297
5297
|
bubble: { position: "absolute", bottom: THUMB + 6, left: -17, minWidth: 56, paddingHorizontal: 8, paddingVertical: 4, alignItems: "center" },
|
|
5298
5298
|
bubbleVertical: { position: "absolute", left: THUMB + 8, top: -2, minWidth: 48, paddingHorizontal: 8, paddingVertical: 4, alignItems: "center" },
|
|
5299
|
-
bubbleText: { fontSize: 12, fontWeight: "700", fontVariant: ["tabular-nums"] },
|
|
5299
|
+
bubbleText: { fontSize: 12, fontWeight: "700", fontVariant: ["lining-nums", "tabular-nums"] },
|
|
5300
5300
|
marks: { height: 16, marginHorizontal: THUMB / 2 },
|
|
5301
5301
|
mark: { position: "absolute", width: 40, fontSize: 11, fontWeight: "500" },
|
|
5302
5302
|
disabled: { opacity: 0.4 }
|