@krizaka/ui 2.5.0 → 2.6.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 +44 -1
- package/dist/action-bar.d.ts +38 -0
- package/dist/action-bar.js +52 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/argument-card.d.ts +67 -0
- package/dist/argument-card.js +69 -0
- package/dist/argument-card.js.map +1 -0
- package/dist/audio-player.js +1 -1
- package/dist/block-link-BAg4eoZk.d.ts +12 -0
- package/dist/blocks.css +529 -0
- package/dist/button.js +5 -94
- package/dist/button.js.map +1 -1
- package/dist/card-grid.d.ts +42 -0
- package/dist/card-grid.js +47 -0
- package/dist/card-grid.js.map +1 -0
- package/dist/chunk-2AGSO3WH.js +20 -0
- package/dist/chunk-2AGSO3WH.js.map +1 -0
- package/dist/chunk-AB5D3KBG.js +37 -0
- package/dist/chunk-AB5D3KBG.js.map +1 -0
- package/dist/{chunk-YX6CNVJA.js → chunk-CPA5CF35.js} +1 -1
- package/dist/chunk-CPA5CF35.js.map +1 -0
- package/dist/chunk-K3SWZXYT.js +92 -0
- package/dist/chunk-K3SWZXYT.js.map +1 -0
- package/dist/{chunk-XUMJA5ZI.js → chunk-X6TW3X6Y.js} +2 -2
- package/dist/chunk-XCBVFMNV.js +41 -0
- package/dist/{chunk-YX6CNVJA.js.map → chunk-XCBVFMNV.js.map} +1 -1
- package/dist/chunk-XVLWVTQA.js +28 -0
- package/dist/chunk-XVLWVTQA.js.map +1 -0
- package/dist/chunk-Z6FUPB3Q.js +102 -0
- package/dist/chunk-Z6FUPB3Q.js.map +1 -0
- package/dist/code-block.d.ts +42 -0
- package/dist/code-block.js +202 -0
- package/dist/code-block.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/cta-panel.d.ts +23 -0
- package/dist/cta-panel.js +20 -0
- package/dist/cta-panel.js.map +1 -0
- package/dist/data-table.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/decision-list.d.ts +34 -0
- package/dist/decision-list.js +67 -0
- package/dist/decision-list.js.map +1 -0
- package/dist/file-upload.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/link-card.d.ts +35 -0
- package/dist/link-card.js +46 -0
- package/dist/link-card.js.map +1 -0
- package/dist/mascot-quote.d.ts +42 -0
- package/dist/mascot-quote.js +267 -0
- package/dist/mascot-quote.js.map +1 -0
- package/dist/media-capture.js +1 -1
- package/dist/motion.css +25 -1
- package/dist/page-hero.d.ts +44 -0
- package/dist/page-hero.js +41 -0
- package/dist/page-hero.js.map +1 -0
- package/dist/page.d.ts +116 -0
- package/dist/page.js +17 -0
- package/dist/page.js.map +1 -0
- package/dist/pagination.js +25 -44
- package/dist/pagination.js.map +1 -1
- package/dist/pointer-light.d.ts +20 -0
- package/dist/pointer-light.js +12 -0
- package/dist/pointer-light.js.map +1 -0
- package/dist/search-field.js +1 -1
- package/dist/section-backdrop.js +4 -22
- package/dist/section-backdrop.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/terminal-replay.d.ts +68 -0
- package/dist/terminal-replay.js +231 -0
- package/dist/terminal-replay.js.map +1 -0
- package/dist/toc.d.ts +23 -0
- package/dist/toc.js +39 -0
- package/dist/toc.js.map +1 -0
- package/dist/video-player.js +1 -1
- package/package.json +192 -7
- package/registry/action-bar.json +205 -0
- package/registry/alert.json +1 -1
- package/registry/argument-card.json +327 -0
- package/registry/audio-player.json +2 -2
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +5 -5
- package/registry/card-grid.json +221 -0
- package/registry/card.json +3 -3
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/code-block.json +262 -0
- package/registry/combobox.json +2 -2
- package/registry/command.json +1 -1
- package/registry/confirm-button.json +3 -3
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +154 -0
- package/registry/data-table.json +2 -2
- package/registry/date-picker.json +2 -2
- package/registry/decision-list.json +144 -0
- package/registry/dialog.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/examples/action-bar/buttons.d.ts +4 -0
- package/registry/examples/action-bar/buttons.js +22 -0
- package/registry/examples/action-bar/buttons.tsx +17 -0
- package/registry/examples/action-bar/icons.d.ts +4 -0
- package/registry/examples/action-bar/icons.js +24 -0
- package/registry/examples/action-bar/icons.tsx +23 -0
- package/registry/examples/argument-card/building-block.d.ts +4 -0
- package/registry/examples/argument-card/building-block.js +29 -0
- package/registry/examples/argument-card/building-block.tsx +29 -0
- package/registry/examples/argument-card/grid.d.ts +4 -0
- package/registry/examples/argument-card/grid.js +17 -0
- package/registry/examples/argument-card/grid.tsx +19 -0
- package/registry/examples/argument-card/unfold.d.ts +4 -0
- package/registry/examples/argument-card/unfold.js +26 -0
- package/registry/examples/argument-card/unfold.tsx +21 -0
- package/registry/examples/card-grid/products.d.ts +4 -0
- package/registry/examples/card-grid/products.js +16 -0
- package/registry/examples/card-grid/products.tsx +13 -0
- package/registry/examples/card-grid/reveal.d.ts +4 -0
- package/registry/examples/card-grid/reveal.js +13 -0
- package/registry/examples/card-grid/reveal.tsx +16 -0
- package/registry/examples/code-block/build-tools.d.ts +4 -0
- package/registry/examples/code-block/build-tools.js +30 -0
- package/registry/examples/code-block/build-tools.tsx +25 -0
- package/registry/examples/code-block/file.d.ts +4 -0
- package/registry/examples/code-block/file.js +17 -0
- package/registry/examples/code-block/file.tsx +13 -0
- package/registry/examples/cta-panel/discuss.d.ts +4 -0
- package/registry/examples/cta-panel/discuss.js +31 -0
- package/registry/examples/cta-panel/discuss.tsx +23 -0
- package/registry/examples/decision-list/product.d.ts +4 -0
- package/registry/examples/decision-list/product.js +35 -0
- package/registry/examples/decision-list/product.tsx +30 -0
- package/registry/examples/link-card/docs-hub.d.ts +4 -0
- package/registry/examples/link-card/docs-hub.js +18 -0
- package/registry/examples/link-card/docs-hub.tsx +20 -0
- package/registry/examples/link-card/external.d.ts +4 -0
- package/registry/examples/link-card/external.js +22 -0
- package/registry/examples/link-card/external.tsx +16 -0
- package/registry/examples/link-card/stack.d.ts +4 -0
- package/registry/examples/link-card/stack.js +26 -0
- package/registry/examples/link-card/stack.tsx +21 -0
- package/registry/examples/mascot-quote/callout.d.ts +4 -0
- package/registry/examples/mascot-quote/callout.js +11 -0
- package/registry/examples/mascot-quote/callout.tsx +10 -0
- package/registry/examples/mascot-quote/inline.d.ts +4 -0
- package/registry/examples/mascot-quote/inline.js +11 -0
- package/registry/examples/mascot-quote/inline.tsx +10 -0
- package/registry/examples/page/backdrop.d.ts +4 -0
- package/registry/examples/page/backdrop.js +23 -0
- package/registry/examples/page/backdrop.tsx +18 -0
- package/registry/examples/page/facts.d.ts +4 -0
- package/registry/examples/page/facts.js +24 -0
- package/registry/examples/page/facts.tsx +21 -0
- package/registry/examples/page/frame.d.ts +4 -0
- package/registry/examples/page/frame.js +15 -0
- package/registry/examples/page/frame.tsx +17 -0
- package/registry/examples/page/sections.d.ts +4 -0
- package/registry/examples/page/sections.js +14 -0
- package/registry/examples/page/sections.tsx +15 -0
- package/registry/examples/page-hero/building-block.d.ts +4 -0
- package/registry/examples/page-hero/building-block.js +24 -0
- package/registry/examples/page-hero/building-block.tsx +20 -0
- package/registry/examples/page-hero/hub.d.ts +4 -0
- package/registry/examples/page-hero/hub.js +21 -0
- package/registry/examples/page-hero/hub.tsx +15 -0
- package/registry/examples/pointer-light/list.d.ts +4 -0
- package/registry/examples/pointer-light/list.js +16 -0
- package/registry/examples/pointer-light/list.tsx +14 -0
- package/registry/examples/terminal-replay/at-rest.d.ts +4 -0
- package/registry/examples/terminal-replay/at-rest.js +32 -0
- package/registry/examples/terminal-replay/at-rest.tsx +26 -0
- package/registry/examples/terminal-replay/session.d.ts +4 -0
- package/registry/examples/terminal-replay/session.js +34 -0
- package/registry/examples/terminal-replay/session.tsx +28 -0
- package/registry/examples/toc/reading-page.d.ts +4 -0
- package/registry/examples/toc/reading-page.js +21 -0
- package/registry/examples/toc/reading-page.tsx +21 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +2 -2
- package/registry/glow-card.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +241 -1
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/link-card.json +279 -0
- package/registry/loader.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +191 -0
- package/registry/mascots.json +1 -1
- package/registry/media-capture.json +4 -4
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +254 -0
- package/registry/page.json +497 -0
- package/registry/pagination.json +2 -2
- package/registry/pointer-light.json +119 -0
- package/registry/popover.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/search-field.json +2 -2
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/skeleton.json +3 -3
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +317 -0
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +157 -0
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +4 -4
- package/registry/video-trimmer.json +3 -3
- /package/dist/{chunk-XUMJA5ZI.js.map → chunk-X6TW3X6Y.js.map} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The Krizaka flock — the geometry of the mascots, drawn by the web `Mascot` (`./mascot.tsx`) and the native one
|
|
5
|
+
* (`../native/mascots.tsx`). Five birds that have carried the Krizaka story since the first site (the sentry falcon,
|
|
6
|
+
* the owl that reads, the developer duck, the flamingo that answers, the carrier pigeon), redrawn on one 120 × 120
|
|
7
|
+
* grid so that any bird can wear any mood.
|
|
8
|
+
*
|
|
9
|
+
* Colours are roles, never fixed: `brand` (the default) paints a bird in the host's accent (`--kz-accent`,
|
|
10
|
+
* `--kz-accent-2`), so the same falcon is blue on krizaka.com, orange in Orazaka and violet in Orochia; `own` gives
|
|
11
|
+
* each bird the signature palette it has in the Krizaka story (the brand layer's exception, like the marks). Shades
|
|
12
|
+
* and highlights are black and white at a low opacity over the role, so they hold in both themes.
|
|
13
|
+
*/
|
|
14
|
+
declare const MASCOT_BIRDS: readonly ["falcon", "owl", "duck", "flamingo", "pigeon"];
|
|
15
|
+
type MascotBird = (typeof MASCOT_BIRDS)[number];
|
|
16
|
+
declare const MASCOT_MOODS: readonly ["welcome", "thinking", "success", "empty", "error"];
|
|
17
|
+
type MascotMood = (typeof MASCOT_MOODS)[number];
|
|
18
|
+
|
|
19
|
+
type MascotQuoteProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
|
|
20
|
+
/** The bird that speaks — the one whose idea it is. */
|
|
21
|
+
bird: MascotBird;
|
|
22
|
+
/**
|
|
23
|
+
* Its mood.
|
|
24
|
+
* @default "thinking"
|
|
25
|
+
*/
|
|
26
|
+
mood?: MascotMood;
|
|
27
|
+
/** Who speaks, under the bubble: `The falcon's rule`. */
|
|
28
|
+
label: React.ReactNode;
|
|
29
|
+
/** The sentence: the rule, the promise. */
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* `inline` inside a card (small, the bird answers the pointer); `callout` alone in a section (larger, the bird alive).
|
|
33
|
+
* @default "inline"
|
|
34
|
+
*/
|
|
35
|
+
variant?: "inline" | "callout";
|
|
36
|
+
/** The bird's idle loop (it pauses off screen and stops under reduced motion). Defaults to `true` for a callout. */
|
|
37
|
+
animated?: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** A sentence told by a bird: a speech bubble, the bird under its tail, who speaks. The bird is decorative. */
|
|
40
|
+
declare function MascotQuote({ bird, mood, label, children, variant, animated, className, ...props }: MascotQuoteProps): React.JSX.Element;
|
|
41
|
+
|
|
42
|
+
export { type MascotBird, type MascotMood, MascotQuote, type MascotQuoteProps };
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-5AXLA4LK.js";
|
|
5
|
+
|
|
6
|
+
// src/mascots/mascot.tsx
|
|
7
|
+
import { useId } from "react";
|
|
8
|
+
|
|
9
|
+
// src/mascots/geometry.ts
|
|
10
|
+
var mirror = (d) => d.replace(/(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/g, (_, x, y) => `${120 - Number(x)} ${y}`);
|
|
11
|
+
var falconWing = "M29 58 C17 68 19 88 37 86 C31 76 31 66 29 58 Z";
|
|
12
|
+
var pigeonWing = "M36 58 C20 50 16 80 38 84 C34 74 34 66 36 58 Z";
|
|
13
|
+
var BIRDS = {
|
|
14
|
+
falcon: {
|
|
15
|
+
shadow: [60, 110, 26, 3.5],
|
|
16
|
+
legs: ["M51 94 L48 108 M44 108 L52 108", "M69 94 L72 108 M68 108 L76 108"],
|
|
17
|
+
body: "M30 62 C30 42 90 42 90 62 C90 88 78 98 60 98 C42 98 30 88 30 62 Z",
|
|
18
|
+
belly: "M41 66 C41 55 79 55 79 66 C79 82 71 90 60 90 C49 90 41 82 41 66 Z",
|
|
19
|
+
wings: [
|
|
20
|
+
{ d: falconWing, pivot: [29, 58] },
|
|
21
|
+
{ d: mirror(falconWing), pivot: [91, 58] }
|
|
22
|
+
],
|
|
23
|
+
head: { cx: 60, cy: 38, r: 22 },
|
|
24
|
+
details: ["M46 20 L52 10 L56 19 Z", "M74 20 L68 10 L64 19 Z"],
|
|
25
|
+
visor: { x: 41, y: 29, w: 38, h: 13 },
|
|
26
|
+
beak: "M54 45 L66 45 L60 57 Z",
|
|
27
|
+
eyes: { at: [[50, 35.5], [70, 35.5]], white: 0, pupil: 3.2 }
|
|
28
|
+
},
|
|
29
|
+
owl: {
|
|
30
|
+
shadow: [60, 110, 24, 3.5],
|
|
31
|
+
legs: ["M53 100 L51 107 M47 107 L55 107", "M67 100 L69 107 M65 107 L73 107"],
|
|
32
|
+
body: "M28 52 C28 20 92 20 92 52 C92 86 82 102 60 102 C38 102 28 86 28 52 Z",
|
|
33
|
+
belly: "M42 66 C42 52 78 52 78 66 C78 86 72 94 60 94 C48 94 42 86 42 66 Z",
|
|
34
|
+
wings: [
|
|
35
|
+
{ d: "M29 58 C18 68 20 88 36 90 C32 78 32 68 29 58 Z", pivot: [29, 58] },
|
|
36
|
+
{ d: mirror("M29 58 C18 68 20 88 36 90 C32 78 32 68 29 58 Z"), pivot: [91, 58] }
|
|
37
|
+
],
|
|
38
|
+
head: { cx: 60, cy: 42, r: 0 },
|
|
39
|
+
details: ["M31 20 L47 31 L31 41 Z", "M89 20 L73 31 L89 41 Z"],
|
|
40
|
+
beak: "M55 50 L65 50 L60 59 Z",
|
|
41
|
+
eyes: { at: [[47, 41], [73, 41]], white: 10, pupil: 4 }
|
|
42
|
+
},
|
|
43
|
+
duck: {
|
|
44
|
+
shadow: [60, 110, 30, 3.5],
|
|
45
|
+
legs: [],
|
|
46
|
+
back: ["M88 80 C100 76 104 66 96 62 C98 70 94 74 88 74 Z"],
|
|
47
|
+
body: "M26 80 C26 62 94 62 94 80 C94 100 82 106 60 106 C38 106 26 100 26 80 Z",
|
|
48
|
+
belly: "M38 84 C38 72 82 72 82 84 C82 96 74 101 60 101 C46 101 38 96 38 84 Z",
|
|
49
|
+
wings: [
|
|
50
|
+
{ d: "M27 74 C14 80 18 98 35 96 C31 88 29 80 27 74 Z", pivot: [27, 74] },
|
|
51
|
+
{ d: mirror("M27 74 C14 80 18 98 35 96 C31 88 29 80 27 74 Z"), pivot: [93, 74] }
|
|
52
|
+
],
|
|
53
|
+
head: { cx: 60, cy: 42, r: 23 },
|
|
54
|
+
details: ["M57 20 C54 11 63 8 66 14 C62 13 60 16 61 20 Z"],
|
|
55
|
+
glasses: true,
|
|
56
|
+
beak: "M43 51 C43 46 55 45 60 45 C65 45 77 46 77 51 C77 56 66 60 60 60 C54 60 43 56 43 51 Z",
|
|
57
|
+
eyes: { at: [[51, 37], [69, 37]], white: 0, pupil: 2.6 }
|
|
58
|
+
},
|
|
59
|
+
flamingo: {
|
|
60
|
+
shadow: [60, 110, 20, 3],
|
|
61
|
+
legs: ["M56 86 L55 97 L58 108 M53 108 L62 108", "M65 86 L66 108 M62 108 L71 108"],
|
|
62
|
+
body: "M38 70 C38 54 88 54 88 70 C88 86 76 90 62 90 C48 90 38 86 38 70 Z",
|
|
63
|
+
belly: "M46 72 C46 63 80 63 80 72 C80 82 72 85 63 85 C54 85 46 82 46 72 Z",
|
|
64
|
+
wings: [
|
|
65
|
+
{ d: "M42 64 C30 68 32 84 47 84 C43 76 43 70 42 64 Z", pivot: [42, 64] },
|
|
66
|
+
{ d: "M84 64 C96 68 94 84 79 84 C83 76 83 70 84 64 Z", pivot: [84, 64] }
|
|
67
|
+
],
|
|
68
|
+
neck: { d: "M58 60 C58 42 40 34 46 22", width: 7 },
|
|
69
|
+
head: { cx: 48, cy: 18, r: 11 },
|
|
70
|
+
details: [],
|
|
71
|
+
beak: "M38 16 C28 18 29 28 24 33 C33 28 38 23 40 20 Z",
|
|
72
|
+
eyes: { at: [[46, 15]], white: 3.2, pupil: 1.8 }
|
|
73
|
+
},
|
|
74
|
+
pigeon: {
|
|
75
|
+
shadow: [60, 112, 22, 3],
|
|
76
|
+
legs: ["M52 94 L51 99 M48 99 L54 99", "M68 94 L69 99 M66 99 L72 99"],
|
|
77
|
+
back: ["M53 98 L52 103", "M67 98 L68 103", "M30 68 C16 72 14 62 28 56 C17 57 15 49 32 48 Z"],
|
|
78
|
+
body: "M34 64 C34 44 86 44 86 64 C86 86 74 96 60 96 C46 96 34 86 34 64 Z",
|
|
79
|
+
belly: "M43 68 C43 57 77 57 77 68 C77 82 70 88 60 88 C50 88 43 82 43 68 Z",
|
|
80
|
+
wings: [
|
|
81
|
+
{ d: pigeonWing, pivot: [36, 58] },
|
|
82
|
+
{ d: mirror(pigeonWing), pivot: [84, 58] }
|
|
83
|
+
],
|
|
84
|
+
head: { cx: 60, cy: 36, r: 19 },
|
|
85
|
+
details: ["M54 18 C56 12 64 12 66 18 C63 16 57 16 54 18 Z"],
|
|
86
|
+
beak: "M55 41 L65 41 L60 50 Z",
|
|
87
|
+
eyes: { at: [[52, 33], [68, 33]], white: 5, pupil: 2.4 },
|
|
88
|
+
parcel: ["M60 100 L71 105 L60 110 L49 105 Z", "M49 105 L60 110 L60 118 L49 113 Z", "M71 105 L60 110 L60 118 L71 113 Z"]
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
var MOOD_PARTS = {
|
|
92
|
+
/** The badge of `success` and `error`, top right. */
|
|
93
|
+
badge: { cx: 98, cy: 22, r: 11 },
|
|
94
|
+
check: "M92.5 22.5 L96.8 26.6 L103.6 18.4",
|
|
95
|
+
bang: { line: "M98 15.5 L98 23.5", dot: [98, 28] },
|
|
96
|
+
/** `thinking`: three dots rising to the right of the head. */
|
|
97
|
+
dots: [
|
|
98
|
+
[88, 26, 2.6],
|
|
99
|
+
[96, 19, 3.2],
|
|
100
|
+
[105, 11, 3.8]
|
|
101
|
+
],
|
|
102
|
+
/** `empty`: an open tray beside the bird. */
|
|
103
|
+
tray: "M90 96 L110 96 L107 108 L93 108 Z",
|
|
104
|
+
/** `success`: two sparkles. */
|
|
105
|
+
sparkles: ["M16 26 L18 31 L23 33 L18 35 L16 40 L14 35 L9 33 L14 31 Z", "M104 52 L105.2 55 L108 56 L105.2 57 L104 60 L102.8 57 L100 56 L102.8 55 Z"]
|
|
106
|
+
};
|
|
107
|
+
var archEye = ([x, y], r) => `M${x - r} ${y + r * 0.45} Q${x} ${y - r * 1.15} ${x + r} ${y + r * 0.45}`;
|
|
108
|
+
var lidEye = ([x, y], r) => `M${x - r} ${y + 0.4} L${x + r} ${y + 0.4}`;
|
|
109
|
+
var upperLid = ([x, y], r) => `M${x - r} ${y} A${r} ${r} 0 0 1 ${x + r} ${y} Z`;
|
|
110
|
+
var brow = ([x, y], r, side) => `M${x - r * 1.1} ${y - r * 1.25 - (side < 0 ? 0 : r * 0.7)} L${x + r * 1.1} ${y - r * 1.5 - (side < 0 ? r * 0.7 : 0)}`;
|
|
111
|
+
var OWN_PALETTES = {
|
|
112
|
+
falcon: { from: "#ff9f00", to: "#ff2a00", wing: "#d84315", detail: "#b4320d", beak: "#ffb300", eye: "#00c8d4" },
|
|
113
|
+
owl: { from: "#a78bfa", to: "#6d28d9", wing: "#7c3aed", detail: "#5b21b6", beak: "#fbbf24", eye: "#1f2937" },
|
|
114
|
+
duck: { from: "#f43f5e", to: "#be123c", wing: "#db2777", detail: "#9f1239", beak: "#fbbf24", eye: "#1f2937" },
|
|
115
|
+
flamingo: { from: "#f9a8d4", to: "#db2777", wing: "#ec4899", detail: "#be185d", beak: "#fbbf24", eye: "#1f2937" },
|
|
116
|
+
pigeon: { from: "#22d3ee", to: "#6366f1", wing: "#a855f7", detail: "#4338ca", beak: "#f59e0b", eye: "#1f2937" }
|
|
117
|
+
};
|
|
118
|
+
var LIGHT = "#ffffff";
|
|
119
|
+
var SHADE = "#000000";
|
|
120
|
+
var PARCEL = ["#f59e0b", "#d97706", "#b45309"];
|
|
121
|
+
|
|
122
|
+
// src/mascots/mascot.tsx
|
|
123
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
124
|
+
var CSS = `
|
|
125
|
+
.kzb-bird { transform-box: view-box; transform-origin: 60px 108px; }
|
|
126
|
+
.kzb-eye { transform-box: fill-box; transform-origin: center; }
|
|
127
|
+
.kzb-wing { transform-box: view-box; }
|
|
128
|
+
[data-animated] .kzb-bird { animation: kzb-bob 3.6s ease-in-out infinite; }
|
|
129
|
+
[data-animated] .kzb-blink { animation: kzb-blink 5.2s ease-in-out infinite; }
|
|
130
|
+
[data-animated][data-mood="welcome"] .kzb-wing-r { animation: kzb-wave 1.1s ease-in-out infinite alternate; }
|
|
131
|
+
[data-animated][data-mood="thinking"] .kzb-dot { animation: kzb-dot 1.5s ease-in-out infinite; }
|
|
132
|
+
[data-animated][data-mood="thinking"] .kzb-dot:nth-child(2) { animation-delay: .2s; }
|
|
133
|
+
[data-animated][data-mood="thinking"] .kzb-dot:nth-child(3) { animation-delay: .4s; }
|
|
134
|
+
[data-animated][data-mood="success"] .kzb-bird { animation: kzb-hop 1.6s cubic-bezier(.3,1.6,.5,1) 1, kzb-bob 3.6s ease-in-out 1.6s infinite; }
|
|
135
|
+
[data-animated][data-mood="success"] .kzb-badge { animation: kzb-pop .5s cubic-bezier(.3,1.6,.5,1) .3s both; }
|
|
136
|
+
[data-animated][data-mood="success"] .kzb-sparkle { animation: kzb-twinkle 2.4s ease-in-out infinite; }
|
|
137
|
+
[data-animated][data-mood="error"] .kzb-bird { animation: kzb-shake .5s ease-in-out .2s 2, kzb-bob 3.6s ease-in-out 1.2s infinite; }
|
|
138
|
+
[data-animated][data-mood="empty"] .kzb-bird { animation: kzb-sway 5s ease-in-out infinite; }
|
|
139
|
+
.kzb-badge, .kzb-sparkle, .kzb-dot { transform-box: fill-box; transform-origin: center; }
|
|
140
|
+
@keyframes kzb-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
|
|
141
|
+
@keyframes kzb-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
|
|
142
|
+
@keyframes kzb-wave { from { transform: rotate(-8deg); } to { transform: rotate(-38deg); } }
|
|
143
|
+
@keyframes kzb-dot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
|
|
144
|
+
@keyframes kzb-hop { 0% { transform: translateY(0); } 30% { transform: translateY(-9px); } 60% { transform: translateY(0); } 100% { transform: translateY(0); } }
|
|
145
|
+
@keyframes kzb-pop { from { transform: scale(0); } to { transform: scale(1); } }
|
|
146
|
+
@keyframes kzb-twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }
|
|
147
|
+
@keyframes kzb-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
|
|
148
|
+
@keyframes kzb-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg); } }
|
|
149
|
+
@media (prefers-reduced-motion: reduce) {
|
|
150
|
+
.kzb-bird, .kzb-blink, .kzb-wing-r, .kzb-dot, .kzb-badge, .kzb-sparkle { animation: none !important; }
|
|
151
|
+
}
|
|
152
|
+
`;
|
|
153
|
+
var BRAND = {
|
|
154
|
+
from: "var(--kz-accent-2, var(--kz-accent))",
|
|
155
|
+
to: "var(--kz-accent)",
|
|
156
|
+
wing: "var(--kz-accent)",
|
|
157
|
+
detail: "var(--kz-accent-2, var(--kz-accent))",
|
|
158
|
+
beak: "var(--kz-warning)",
|
|
159
|
+
eye: "var(--kz-text-primary)"
|
|
160
|
+
};
|
|
161
|
+
var OUTLINE = "var(--kz-border-strong, color-mix(in srgb, currentColor 35%, transparent))";
|
|
162
|
+
var SURFACE = "var(--kz-surface-0)";
|
|
163
|
+
function Mascot({ bird = "owl", mood = "welcome", tone = "brand", size = 96, animated = true, title, className, ...props }) {
|
|
164
|
+
const uid = useId().replace(/[^a-zA-Z0-9_-]/g, "");
|
|
165
|
+
const g = BIRDS[bird];
|
|
166
|
+
const p = tone === "own" ? OWN_PALETTES[bird] : BRAND;
|
|
167
|
+
const body = `url(#kzb-${uid})`;
|
|
168
|
+
const line = { stroke: OUTLINE, strokeWidth: 1.4, strokeLinejoin: "round" };
|
|
169
|
+
const eyeR = g.eyes.white || g.eyes.pupil * 1.2;
|
|
170
|
+
const eyes = g.eyes.at.map((at, i) => {
|
|
171
|
+
const look = mood === "thinking" ? 1.4 : 0;
|
|
172
|
+
if (mood === "success") return /* @__PURE__ */ jsx("path", { d: archEye(at, eyeR * 0.85), stroke: g.visor ? p.eye : OUTLINE, strokeWidth: 2.2, strokeLinecap: "round", fill: "none" }, i);
|
|
173
|
+
if (mood === "empty" && g.eyes.white > 0)
|
|
174
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
175
|
+
/* @__PURE__ */ jsx("circle", { cx: at[0], cy: at[1], r: g.eyes.white, fill: LIGHT, ...line }),
|
|
176
|
+
/* @__PURE__ */ jsx("circle", { cx: at[0], cy: at[1] + g.eyes.pupil * 0.7, r: g.eyes.pupil, fill: SHADE }),
|
|
177
|
+
/* @__PURE__ */ jsx("path", { d: upperLid(at, g.eyes.white), fill: p.detail, ...line })
|
|
178
|
+
] }, i);
|
|
179
|
+
if (mood === "empty") return /* @__PURE__ */ jsx("path", { d: lidEye(at, eyeR * 0.8), stroke: g.visor ? p.eye : OUTLINE, strokeWidth: 2.2, strokeLinecap: "round", fill: "none" }, i);
|
|
180
|
+
return /* @__PURE__ */ jsxs("g", { className: "kzb-eye kzb-blink", children: [
|
|
181
|
+
g.eyes.white > 0 && /* @__PURE__ */ jsx("circle", { cx: at[0], cy: at[1], r: g.eyes.white, fill: LIGHT, ...line }),
|
|
182
|
+
/* @__PURE__ */ jsx("circle", { cx: at[0] + look, cy: at[1] - look, r: g.eyes.pupil, fill: g.visor ? p.eye : SHADE }),
|
|
183
|
+
g.eyes.white > 0 && /* @__PURE__ */ jsx("circle", { cx: at[0] + look - g.eyes.pupil * 0.35, cy: at[1] - look - g.eyes.pupil * 0.35, r: g.eyes.pupil * 0.35, fill: LIGHT })
|
|
184
|
+
] }, i);
|
|
185
|
+
});
|
|
186
|
+
const [wl, wr] = g.wings;
|
|
187
|
+
return /* @__PURE__ */ jsxs(
|
|
188
|
+
"svg",
|
|
189
|
+
{
|
|
190
|
+
width: size,
|
|
191
|
+
height: size,
|
|
192
|
+
viewBox: "0 0 120 120",
|
|
193
|
+
fill: "none",
|
|
194
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
195
|
+
"data-bird": bird,
|
|
196
|
+
"data-mood": mood,
|
|
197
|
+
"data-animated": animated ? "" : void 0,
|
|
198
|
+
className,
|
|
199
|
+
...title ? { role: "img", "aria-label": title } : { "aria-hidden": true },
|
|
200
|
+
...props,
|
|
201
|
+
children: [
|
|
202
|
+
/* @__PURE__ */ jsx("style", { children: CSS }),
|
|
203
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: `kzb-${uid}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
204
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", style: { stopColor: p.from } }),
|
|
205
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", style: { stopColor: p.to } })
|
|
206
|
+
] }) }),
|
|
207
|
+
/* @__PURE__ */ jsx("ellipse", { cx: g.shadow[0], cy: g.shadow[1], rx: g.shadow[2], ry: g.shadow[3], fill: SHADE, opacity: 0.14 }),
|
|
208
|
+
mood === "empty" && /* @__PURE__ */ jsx("path", { d: MOOD_PARTS.tray, stroke: OUTLINE, strokeWidth: 1.6, strokeDasharray: "3 3", strokeLinejoin: "round" }),
|
|
209
|
+
/* @__PURE__ */ jsxs("g", { className: "kzb-bird", children: [
|
|
210
|
+
g.legs.map((d) => /* @__PURE__ */ jsx("path", { d, stroke: p.beak, strokeWidth: 2.6, strokeLinecap: "round" }, d)),
|
|
211
|
+
g.back?.map((d) => d.endsWith("Z") ? /* @__PURE__ */ jsx("path", { d, fill: p.detail, ...line }, d) : /* @__PURE__ */ jsx("path", { d, stroke: OUTLINE, strokeWidth: 1.4 }, d)),
|
|
212
|
+
g.parcel && /* @__PURE__ */ jsx("g", { ...line, children: g.parcel.map((d, i) => /* @__PURE__ */ jsx("path", { d, fill: PARCEL[i] }, d)) }),
|
|
213
|
+
/* @__PURE__ */ jsx("path", { d: g.body, fill: body, ...line }),
|
|
214
|
+
/* @__PURE__ */ jsx("path", { d: g.belly, fill: LIGHT, opacity: 0.28 }),
|
|
215
|
+
[wl, wr].map((w, i) => {
|
|
216
|
+
const turn = mood === "success" ? i === 0 ? 28 : -28 : mood === "welcome" && i === 1 ? -20 : 0;
|
|
217
|
+
return /* @__PURE__ */ jsxs("g", { className: i === 1 ? "kzb-wing kzb-wing-r" : "kzb-wing", style: { transformOrigin: `${w.pivot[0]}px ${w.pivot[1]}px`, transform: turn ? `rotate(${turn}deg)` : void 0 }, children: [
|
|
218
|
+
/* @__PURE__ */ jsx("path", { d: w.d, fill: p.wing, ...line }),
|
|
219
|
+
/* @__PURE__ */ jsx("path", { d: w.d, fill: SHADE, opacity: 0.16 })
|
|
220
|
+
] }, i);
|
|
221
|
+
}),
|
|
222
|
+
g.neck && /* @__PURE__ */ jsx("path", { d: g.neck.d, stroke: body, strokeWidth: g.neck.width, strokeLinecap: "round" }),
|
|
223
|
+
g.head.r > 0 && /* @__PURE__ */ jsx("circle", { cx: g.head.cx, cy: g.head.cy, r: g.head.r, fill: body, ...line }),
|
|
224
|
+
g.details.map((d) => /* @__PURE__ */ jsx("path", { d, fill: p.detail, ...line }, d)),
|
|
225
|
+
g.visor && /* @__PURE__ */ jsx("rect", { x: g.visor.x, y: g.visor.y, width: g.visor.w, height: g.visor.h, rx: 4, fill: SURFACE, ...line }),
|
|
226
|
+
eyes,
|
|
227
|
+
g.glasses && /* @__PURE__ */ jsxs("g", { stroke: OUTLINE, strokeWidth: 1.3, children: [
|
|
228
|
+
g.eyes.at.map(([x, y]) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 6.5, fill: LIGHT, fillOpacity: 0.12 }, x)),
|
|
229
|
+
/* @__PURE__ */ jsx("path", { d: `M${g.eyes.at[0][0] + 6.5} ${g.eyes.at[0][1]} L${g.eyes.at[1][0] - 6.5} ${g.eyes.at[1][1]}` })
|
|
230
|
+
] }),
|
|
231
|
+
mood === "error" && g.eyes.at.map((at, i) => /* @__PURE__ */ jsx("path", { d: brow(at, eyeR, g.eyes.at.length === 1 ? 1 : i === 0 ? -1 : 1), stroke: OUTLINE, strokeWidth: 2, strokeLinecap: "round" }, i)),
|
|
232
|
+
/* @__PURE__ */ jsx("path", { d: g.beak, fill: p.beak, ...line })
|
|
233
|
+
] }),
|
|
234
|
+
mood === "thinking" && /* @__PURE__ */ jsx("g", { children: MOOD_PARTS.dots.map(([cx, cy, r]) => /* @__PURE__ */ jsx("circle", { className: "kzb-dot", cx, cy, r, fill: "var(--kz-text-secondary)" }, cx)) }),
|
|
235
|
+
mood === "success" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
236
|
+
MOOD_PARTS.sparkles.map((d) => /* @__PURE__ */ jsx("path", { className: "kzb-sparkle", d, fill: p.from }, d)),
|
|
237
|
+
/* @__PURE__ */ jsxs("g", { className: "kzb-badge", children: [
|
|
238
|
+
/* @__PURE__ */ jsx("circle", { cx: MOOD_PARTS.badge.cx, cy: MOOD_PARTS.badge.cy, r: MOOD_PARTS.badge.r, fill: "var(--kz-success)" }),
|
|
239
|
+
/* @__PURE__ */ jsx("path", { d: MOOD_PARTS.check, stroke: SURFACE, strokeWidth: 2.6, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
240
|
+
] })
|
|
241
|
+
] }),
|
|
242
|
+
mood === "error" && /* @__PURE__ */ jsxs("g", { className: "kzb-badge", children: [
|
|
243
|
+
/* @__PURE__ */ jsx("circle", { cx: MOOD_PARTS.badge.cx, cy: MOOD_PARTS.badge.cy, r: MOOD_PARTS.badge.r, fill: "var(--kz-danger)" }),
|
|
244
|
+
/* @__PURE__ */ jsx("path", { d: MOOD_PARTS.bang.line, stroke: SURFACE, strokeWidth: 2.8, strokeLinecap: "round" }),
|
|
245
|
+
/* @__PURE__ */ jsx("circle", { cx: MOOD_PARTS.bang.dot[0], cy: MOOD_PARTS.bang.dot[1], r: 1.6, fill: SURFACE })
|
|
246
|
+
] })
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// src/mascot-quote/mascot-quote.tsx
|
|
253
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
254
|
+
function MascotQuote({ bird, mood = "thinking", label, children, variant = "inline", animated, className, ...props }) {
|
|
255
|
+
const callout = variant === "callout";
|
|
256
|
+
return /* @__PURE__ */ jsxs2("figure", { className: cn("kz-quote", className), "data-variant": callout ? "callout" : void 0, ...props, children: [
|
|
257
|
+
/* @__PURE__ */ jsx2("blockquote", { children: /* @__PURE__ */ jsx2("p", { children }) }),
|
|
258
|
+
/* @__PURE__ */ jsxs2("figcaption", { children: [
|
|
259
|
+
/* @__PURE__ */ jsx2(Mascot, { bird, mood, size: callout ? 72 : 44, animated: animated ?? callout, className: "kz-quote-bird", "aria-hidden": true }),
|
|
260
|
+
/* @__PURE__ */ jsx2("span", { children: label })
|
|
261
|
+
] })
|
|
262
|
+
] });
|
|
263
|
+
}
|
|
264
|
+
export {
|
|
265
|
+
MascotQuote
|
|
266
|
+
};
|
|
267
|
+
//# sourceMappingURL=mascot-quote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mascots/mascot.tsx","../src/mascots/geometry.ts","../src/mascot-quote/mascot-quote.tsx"],"sourcesContent":["// The Krizaka flock on the web: one bird, one mood, drawn from ./geometry in the host's brand colours.\nimport type * as React from \"react\";\nimport { useId } from \"react\";\n\nimport { archEye, BIRDS, brow, lidEye, LIGHT, type MascotBird, type MascotMood, type MascotPalette, type MascotTone, MOOD_PARTS, OWN_PALETTES, PARCEL, SHADE, upperLid } from \"./geometry\";\n\nconst CSS = `\n.kzb-bird { transform-box: view-box; transform-origin: 60px 108px; }\n.kzb-eye { transform-box: fill-box; transform-origin: center; }\n.kzb-wing { transform-box: view-box; }\n[data-animated] .kzb-bird { animation: kzb-bob 3.6s ease-in-out infinite; }\n[data-animated] .kzb-blink { animation: kzb-blink 5.2s ease-in-out infinite; }\n[data-animated][data-mood=\"welcome\"] .kzb-wing-r { animation: kzb-wave 1.1s ease-in-out infinite alternate; }\n[data-animated][data-mood=\"thinking\"] .kzb-dot { animation: kzb-dot 1.5s ease-in-out infinite; }\n[data-animated][data-mood=\"thinking\"] .kzb-dot:nth-child(2) { animation-delay: .2s; }\n[data-animated][data-mood=\"thinking\"] .kzb-dot:nth-child(3) { animation-delay: .4s; }\n[data-animated][data-mood=\"success\"] .kzb-bird { animation: kzb-hop 1.6s cubic-bezier(.3,1.6,.5,1) 1, kzb-bob 3.6s ease-in-out 1.6s infinite; }\n[data-animated][data-mood=\"success\"] .kzb-badge { animation: kzb-pop .5s cubic-bezier(.3,1.6,.5,1) .3s both; }\n[data-animated][data-mood=\"success\"] .kzb-sparkle { animation: kzb-twinkle 2.4s ease-in-out infinite; }\n[data-animated][data-mood=\"error\"] .kzb-bird { animation: kzb-shake .5s ease-in-out .2s 2, kzb-bob 3.6s ease-in-out 1.2s infinite; }\n[data-animated][data-mood=\"empty\"] .kzb-bird { animation: kzb-sway 5s ease-in-out infinite; }\n.kzb-badge, .kzb-sparkle, .kzb-dot { transform-box: fill-box; transform-origin: center; }\n@keyframes kzb-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }\n@keyframes kzb-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }\n@keyframes kzb-wave { from { transform: rotate(-8deg); } to { transform: rotate(-38deg); } }\n@keyframes kzb-dot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }\n@keyframes kzb-hop { 0% { transform: translateY(0); } 30% { transform: translateY(-9px); } 60% { transform: translateY(0); } 100% { transform: translateY(0); } }\n@keyframes kzb-pop { from { transform: scale(0); } to { transform: scale(1); } }\n@keyframes kzb-twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }\n@keyframes kzb-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }\n@keyframes kzb-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg); } }\n@media (prefers-reduced-motion: reduce) {\n .kzb-bird, .kzb-blink, .kzb-wing-r, .kzb-dot, .kzb-badge, .kzb-sparkle { animation: none !important; }\n}\n`;\n\n/** The host's roles (`tone=\"brand\"`): the accent paints the bird, so it wears the product it is shown in. */\nconst BRAND: MascotPalette = {\n from: \"var(--kz-accent-2, var(--kz-accent))\",\n to: \"var(--kz-accent)\",\n wing: \"var(--kz-accent)\",\n detail: \"var(--kz-accent-2, var(--kz-accent))\",\n beak: \"var(--kz-warning)\",\n eye: \"var(--kz-text-primary)\",\n};\nconst OUTLINE = \"var(--kz-border-strong, color-mix(in srgb, currentColor 35%, transparent))\";\nconst SURFACE = \"var(--kz-surface-0)\";\n\nexport type MascotProps = Omit<React.ComponentProps<\"svg\">, \"children\"> & {\n /** Which bird of the flock: `falcon` (watch, security), `owl` (reading, documents), `duck` (building, code), `flamingo` (answers, support), `pigeon` (delivery, notifications). */\n bird?: MascotBird;\n /** What the moment is: `welcome` (onboarding), `thinking` (a long task running), `success` (it is done), `empty` (nothing here yet), `error` (it failed). */\n mood?: MascotMood;\n /** `brand` (default): the host's accent, so the bird wears the product it is in. `own`: the bird's signature colours of the Krizaka story. */\n tone?: MascotTone;\n /** Width and height in pixels. */\n size?: number;\n /** A light idle motion and the mood's gesture. Off with `false`; always off under `prefers-reduced-motion`. */\n animated?: boolean;\n /** An accessible name (the bird becomes an image); without it the mascot is decorative. */\n title?: string;\n};\n\n/**\n * One of the five Krizaka birds in one mood — for the moments a product speaks to a person: a welcome, a long wait,\n * a success, an empty list, an error. Drawn in the host's brand colours by default (`tone=\"own\"` for the story's).\n */\nexport function Mascot({ bird = \"owl\", mood = \"welcome\", tone = \"brand\", size = 96, animated = true, title, className, ...props }: MascotProps) {\n const uid = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const g = BIRDS[bird];\n const p = tone === \"own\" ? OWN_PALETTES[bird] : BRAND;\n const body = `url(#kzb-${uid})`;\n const line = { stroke: OUTLINE, strokeWidth: 1.4, strokeLinejoin: \"round\" as const };\n const eyeR = g.eyes.white || g.eyes.pupil * 1.2;\n const eyes = g.eyes.at.map((at, i) => {\n const look = mood === \"thinking\" ? 1.4 : 0;\n if (mood === \"success\") return <path key={i} d={archEye(at, eyeR * 0.85)} stroke={g.visor ? p.eye : OUTLINE} strokeWidth={2.2} strokeLinecap=\"round\" fill=\"none\" />;\n if (mood === \"empty\" && g.eyes.white > 0)\n return (\n <g key={i}>\n <circle cx={at[0]} cy={at[1]} r={g.eyes.white} fill={LIGHT} {...line} />\n <circle cx={at[0]} cy={at[1] + g.eyes.pupil * 0.7} r={g.eyes.pupil} fill={SHADE} />\n <path d={upperLid(at, g.eyes.white)} fill={p.detail} {...line} />\n </g>\n );\n if (mood === \"empty\") return <path key={i} d={lidEye(at, eyeR * 0.8)} stroke={g.visor ? p.eye : OUTLINE} strokeWidth={2.2} strokeLinecap=\"round\" fill=\"none\" />;\n return (\n <g key={i} className=\"kzb-eye kzb-blink\">\n {g.eyes.white > 0 && <circle cx={at[0]} cy={at[1]} r={g.eyes.white} fill={LIGHT} {...line} />}\n <circle cx={at[0] + look} cy={at[1] - look} r={g.eyes.pupil} fill={g.visor ? p.eye : SHADE} />\n {g.eyes.white > 0 && <circle cx={at[0] + look - g.eyes.pupil * 0.35} cy={at[1] - look - g.eyes.pupil * 0.35} r={g.eyes.pupil * 0.35} fill={LIGHT} />}\n </g>\n );\n });\n const [wl, wr] = g.wings;\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-bird={bird}\n data-mood={mood}\n data-animated={animated ? \"\" : undefined}\n className={className}\n {...(title ? { role: \"img\", \"aria-label\": title } : { \"aria-hidden\": true })}\n {...props}\n >\n <style>{CSS}</style>\n <defs>\n <linearGradient id={`kzb-${uid}`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" style={{ stopColor: p.from }} />\n <stop offset=\"100%\" style={{ stopColor: p.to }} />\n </linearGradient>\n </defs>\n <ellipse cx={g.shadow[0]} cy={g.shadow[1]} rx={g.shadow[2]} ry={g.shadow[3]} fill={SHADE} opacity={0.14} />\n {mood === \"empty\" && <path d={MOOD_PARTS.tray} stroke={OUTLINE} strokeWidth={1.6} strokeDasharray=\"3 3\" strokeLinejoin=\"round\" />}\n <g className=\"kzb-bird\">\n {g.legs.map((d) => (\n <path key={d} d={d} stroke={p.beak} strokeWidth={2.6} strokeLinecap=\"round\" />\n ))}\n {g.back?.map((d) => (d.endsWith(\"Z\") ? <path key={d} d={d} fill={p.detail} {...line} /> : <path key={d} d={d} stroke={OUTLINE} strokeWidth={1.4} />))}\n {g.parcel && (\n <g {...line}>\n {g.parcel.map((d, i) => (\n <path key={d} d={d} fill={PARCEL[i]} />\n ))}\n </g>\n )}\n <path d={g.body} fill={body} {...line} />\n <path d={g.belly} fill={LIGHT} opacity={0.28} />\n {[wl, wr].map((w, i) => {\n const turn = mood === \"success\" ? (i === 0 ? 28 : -28) : mood === \"welcome\" && i === 1 ? -20 : 0;\n return (\n <g key={i} className={i === 1 ? \"kzb-wing kzb-wing-r\" : \"kzb-wing\"} style={{ transformOrigin: `${w.pivot[0]}px ${w.pivot[1]}px`, transform: turn ? `rotate(${turn}deg)` : undefined }}>\n <path d={w.d} fill={p.wing} {...line} />\n <path d={w.d} fill={SHADE} opacity={0.16} />\n </g>\n );\n })}\n {g.neck && <path d={g.neck.d} stroke={body} strokeWidth={g.neck.width} strokeLinecap=\"round\" />}\n {g.head.r > 0 && <circle cx={g.head.cx} cy={g.head.cy} r={g.head.r} fill={body} {...line} />}\n {g.details.map((d) => (\n <path key={d} d={d} fill={p.detail} {...line} />\n ))}\n {g.visor && <rect x={g.visor.x} y={g.visor.y} width={g.visor.w} height={g.visor.h} rx={4} fill={SURFACE} {...line} />}\n {eyes}\n {g.glasses && (\n <g stroke={OUTLINE} strokeWidth={1.3}>\n {g.eyes.at.map(([x, y]) => (\n <circle key={x} cx={x} cy={y} r={6.5} fill={LIGHT} fillOpacity={0.12} />\n ))}\n <path d={`M${g.eyes.at[0][0] + 6.5} ${g.eyes.at[0][1]} L${g.eyes.at[1][0] - 6.5} ${g.eyes.at[1][1]}`} />\n </g>\n )}\n {mood === \"error\" &&\n g.eyes.at.map((at, i) => <path key={i} d={brow(at, eyeR, g.eyes.at.length === 1 ? 1 : i === 0 ? -1 : 1)} stroke={OUTLINE} strokeWidth={2} strokeLinecap=\"round\" />)}\n <path d={g.beak} fill={p.beak} {...line} />\n </g>\n {mood === \"thinking\" && (\n <g>\n {MOOD_PARTS.dots.map(([cx, cy, r]) => (\n <circle key={cx} className=\"kzb-dot\" cx={cx} cy={cy} r={r} fill=\"var(--kz-text-secondary)\" />\n ))}\n </g>\n )}\n {mood === \"success\" && (\n <>\n {MOOD_PARTS.sparkles.map((d) => (\n <path key={d} className=\"kzb-sparkle\" d={d} fill={p.from} />\n ))}\n <g className=\"kzb-badge\">\n <circle cx={MOOD_PARTS.badge.cx} cy={MOOD_PARTS.badge.cy} r={MOOD_PARTS.badge.r} fill=\"var(--kz-success)\" />\n <path d={MOOD_PARTS.check} stroke={SURFACE} strokeWidth={2.6} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </g>\n </>\n )}\n {mood === \"error\" && (\n <g className=\"kzb-badge\">\n <circle cx={MOOD_PARTS.badge.cx} cy={MOOD_PARTS.badge.cy} r={MOOD_PARTS.badge.r} fill=\"var(--kz-danger)\" />\n <path d={MOOD_PARTS.bang.line} stroke={SURFACE} strokeWidth={2.8} strokeLinecap=\"round\" />\n <circle cx={MOOD_PARTS.bang.dot[0]} cy={MOOD_PARTS.bang.dot[1]} r={1.6} fill={SURFACE} />\n </g>\n )}\n </svg>\n );\n}\n","/**\n * The Krizaka flock — the geometry of the mascots, drawn by the web `Mascot` (`./mascot.tsx`) and the native one\n * (`../native/mascots.tsx`). Five birds that have carried the Krizaka story since the first site (the sentry falcon,\n * the owl that reads, the developer duck, the flamingo that answers, the carrier pigeon), redrawn on one 120 × 120\n * grid so that any bird can wear any mood.\n *\n * Colours are roles, never fixed: `brand` (the default) paints a bird in the host's accent (`--kz-accent`,\n * `--kz-accent-2`), so the same falcon is blue on krizaka.com, orange in Orazaka and violet in Orochia; `own` gives\n * each bird the signature palette it has in the Krizaka story (the brand layer's exception, like the marks). Shades\n * and highlights are black and white at a low opacity over the role, so they hold in both themes.\n */\n\nexport const MASCOT_BIRDS = [\"falcon\", \"owl\", \"duck\", \"flamingo\", \"pigeon\"] as const;\nexport type MascotBird = (typeof MASCOT_BIRDS)[number];\n\nexport const MASCOT_MOODS = [\"welcome\", \"thinking\", \"success\", \"empty\", \"error\"] as const;\nexport type MascotMood = (typeof MASCOT_MOODS)[number];\n\nexport type MascotTone = \"brand\" | \"own\";\n\ntype Point = readonly [number, number];\n\nexport interface BirdGeometry {\n /** The ground shadow: centre x, y and radii. */\n readonly shadow: readonly [number, number, number, number];\n /** Legs and feet, stroked in the beak colour. */\n readonly legs: readonly string[];\n /** Drawn behind the body (tail, parcel strings). */\n readonly back?: readonly string[];\n readonly body: string;\n readonly belly: string;\n /** Left then right wing, and the point each one turns around. */\n readonly wings: readonly [{ readonly d: string; readonly pivot: Point }, { readonly d: string; readonly pivot: Point }];\n /** A neck, stroked in the body colour with this width (the flamingo). */\n readonly neck?: { readonly d: string; readonly width: number };\n /** The head: a circle. */\n readonly head: { readonly cx: number; readonly cy: number; readonly r: number };\n /** Ear tufts, a crest, a visor's frame: filled with the detail colour. */\n readonly details: readonly string[];\n /** A band behind the eyes (the falcon's visor), in the page's surface. */\n readonly visor?: { readonly x: number; readonly y: number; readonly w: number; readonly h: number };\n /** Glasses (the duck): stroked rings around the eyes. */\n readonly glasses?: boolean;\n readonly beak: string;\n /** The eyes: centres, the radius of the white, the radius of the pupil (no white when `white` is 0). */\n readonly eyes: { readonly at: readonly Point[]; readonly white: number; readonly pupil: number };\n /** The parcel the pigeon carries: its three faces. */\n readonly parcel?: readonly [string, string, string];\n}\n\nconst mirror = (d: string) => d.replace(/(-?\\d+(?:\\.\\d+)?) (-?\\d+(?:\\.\\d+)?)/g, (_, x: string, y: string) => `${120 - Number(x)} ${y}`);\n\nconst falconWing = \"M29 58 C17 68 19 88 37 86 C31 76 31 66 29 58 Z\";\nconst pigeonWing = \"M36 58 C20 50 16 80 38 84 C34 74 34 66 36 58 Z\";\n\nexport const BIRDS: Readonly<Record<MascotBird, BirdGeometry>> = {\n falcon: {\n shadow: [60, 110, 26, 3.5],\n legs: [\"M51 94 L48 108 M44 108 L52 108\", \"M69 94 L72 108 M68 108 L76 108\"],\n body: \"M30 62 C30 42 90 42 90 62 C90 88 78 98 60 98 C42 98 30 88 30 62 Z\",\n belly: \"M41 66 C41 55 79 55 79 66 C79 82 71 90 60 90 C49 90 41 82 41 66 Z\",\n wings: [\n { d: falconWing, pivot: [29, 58] },\n { d: mirror(falconWing), pivot: [91, 58] },\n ],\n head: { cx: 60, cy: 38, r: 22 },\n details: [\"M46 20 L52 10 L56 19 Z\", \"M74 20 L68 10 L64 19 Z\"],\n visor: { x: 41, y: 29, w: 38, h: 13 },\n beak: \"M54 45 L66 45 L60 57 Z\",\n eyes: { at: [[50, 35.5], [70, 35.5]], white: 0, pupil: 3.2 },\n },\n owl: {\n shadow: [60, 110, 24, 3.5],\n legs: [\"M53 100 L51 107 M47 107 L55 107\", \"M67 100 L69 107 M65 107 L73 107\"],\n body: \"M28 52 C28 20 92 20 92 52 C92 86 82 102 60 102 C38 102 28 86 28 52 Z\",\n belly: \"M42 66 C42 52 78 52 78 66 C78 86 72 94 60 94 C48 94 42 86 42 66 Z\",\n wings: [\n { d: \"M29 58 C18 68 20 88 36 90 C32 78 32 68 29 58 Z\", pivot: [29, 58] },\n { d: mirror(\"M29 58 C18 68 20 88 36 90 C32 78 32 68 29 58 Z\"), pivot: [91, 58] },\n ],\n head: { cx: 60, cy: 42, r: 0 },\n details: [\"M31 20 L47 31 L31 41 Z\", \"M89 20 L73 31 L89 41 Z\"],\n beak: \"M55 50 L65 50 L60 59 Z\",\n eyes: { at: [[47, 41], [73, 41]], white: 10, pupil: 4 },\n },\n duck: {\n shadow: [60, 110, 30, 3.5],\n legs: [],\n back: [\"M88 80 C100 76 104 66 96 62 C98 70 94 74 88 74 Z\"],\n body: \"M26 80 C26 62 94 62 94 80 C94 100 82 106 60 106 C38 106 26 100 26 80 Z\",\n belly: \"M38 84 C38 72 82 72 82 84 C82 96 74 101 60 101 C46 101 38 96 38 84 Z\",\n wings: [\n { d: \"M27 74 C14 80 18 98 35 96 C31 88 29 80 27 74 Z\", pivot: [27, 74] },\n { d: mirror(\"M27 74 C14 80 18 98 35 96 C31 88 29 80 27 74 Z\"), pivot: [93, 74] },\n ],\n head: { cx: 60, cy: 42, r: 23 },\n details: [\"M57 20 C54 11 63 8 66 14 C62 13 60 16 61 20 Z\"],\n glasses: true,\n beak: \"M43 51 C43 46 55 45 60 45 C65 45 77 46 77 51 C77 56 66 60 60 60 C54 60 43 56 43 51 Z\",\n eyes: { at: [[51, 37], [69, 37]], white: 0, pupil: 2.6 },\n },\n flamingo: {\n shadow: [60, 110, 20, 3],\n legs: [\"M56 86 L55 97 L58 108 M53 108 L62 108\", \"M65 86 L66 108 M62 108 L71 108\"],\n body: \"M38 70 C38 54 88 54 88 70 C88 86 76 90 62 90 C48 90 38 86 38 70 Z\",\n belly: \"M46 72 C46 63 80 63 80 72 C80 82 72 85 63 85 C54 85 46 82 46 72 Z\",\n wings: [\n { d: \"M42 64 C30 68 32 84 47 84 C43 76 43 70 42 64 Z\", pivot: [42, 64] },\n { d: \"M84 64 C96 68 94 84 79 84 C83 76 83 70 84 64 Z\", pivot: [84, 64] },\n ],\n neck: { d: \"M58 60 C58 42 40 34 46 22\", width: 7 },\n head: { cx: 48, cy: 18, r: 11 },\n details: [],\n beak: \"M38 16 C28 18 29 28 24 33 C33 28 38 23 40 20 Z\",\n eyes: { at: [[46, 15]], white: 3.2, pupil: 1.8 },\n },\n pigeon: {\n shadow: [60, 112, 22, 3],\n legs: [\"M52 94 L51 99 M48 99 L54 99\", \"M68 94 L69 99 M66 99 L72 99\"],\n back: [\"M53 98 L52 103\", \"M67 98 L68 103\", \"M30 68 C16 72 14 62 28 56 C17 57 15 49 32 48 Z\"],\n body: \"M34 64 C34 44 86 44 86 64 C86 86 74 96 60 96 C46 96 34 86 34 64 Z\",\n belly: \"M43 68 C43 57 77 57 77 68 C77 82 70 88 60 88 C50 88 43 82 43 68 Z\",\n wings: [\n { d: pigeonWing, pivot: [36, 58] },\n { d: mirror(pigeonWing), pivot: [84, 58] },\n ],\n head: { cx: 60, cy: 36, r: 19 },\n details: [\"M54 18 C56 12 64 12 66 18 C63 16 57 16 54 18 Z\"],\n beak: \"M55 41 L65 41 L60 50 Z\",\n eyes: { at: [[52, 33], [68, 33]], white: 5, pupil: 2.4 },\n parcel: [\"M60 100 L71 105 L60 110 L49 105 Z\", \"M49 105 L60 110 L60 118 L49 113 Z\", \"M71 105 L60 110 L60 118 L71 113 Z\"],\n },\n};\n\n/** What a mood adds around the bird: a badge, a thought, an empty tray. */\nexport const MOOD_PARTS = {\n /** The badge of `success` and `error`, top right. */\n badge: { cx: 98, cy: 22, r: 11 },\n check: \"M92.5 22.5 L96.8 26.6 L103.6 18.4\",\n bang: { line: \"M98 15.5 L98 23.5\", dot: [98, 28] as Point },\n /** `thinking`: three dots rising to the right of the head. */\n dots: [\n [88, 26, 2.6],\n [96, 19, 3.2],\n [105, 11, 3.8],\n ] as const,\n /** `empty`: an open tray beside the bird. */\n tray: \"M90 96 L110 96 L107 108 L93 108 Z\",\n /** `success`: two sparkles. */\n sparkles: [\"M16 26 L18 31 L23 33 L18 35 L16 40 L14 35 L9 33 L14 31 Z\", \"M104 52 L105.2 55 L108 56 L105.2 57 L104 60 L102.8 57 L100 56 L102.8 55 Z\"],\n} as const;\n\n/** The happy eye of `success`: an arch. */\nexport const archEye = ([x, y]: Point, r: number) => `M${x - r} ${y + r * 0.45} Q${x} ${y - r * 1.15} ${x + r} ${y + r * 0.45}`;\n/** The lowered lid of `empty`: a line across the eye. */\nexport const lidEye = ([x, y]: Point, r: number) => `M${x - r} ${y + 0.4} L${x + r} ${y + 0.4}`;\n/** The heavy lid of `empty` over an eye with a white: its upper half. */\nexport const upperLid = ([x, y]: Point, r: number) => `M${x - r} ${y} A${r} ${r} 0 0 1 ${x + r} ${y} Z`;\n/** The worried brow of `error`, above one eye (`side` -1 left, 1 right). */\nexport const brow = ([x, y]: Point, r: number, side: number) =>\n `M${x - r * 1.1} ${y - r * 1.25 - (side < 0 ? 0 : r * 0.7)} L${x + r * 1.1} ${y - r * 1.5 - (side < 0 ? r * 0.7 : 0)}`;\n\nexport interface MascotPalette {\n /** Top and bottom of the body gradient. */\n readonly from: string;\n readonly to: string;\n /** Wings and details (tufts, crest). */\n readonly wing: string;\n readonly detail: string;\n /** Beak and feet. */\n readonly beak: string;\n /** The pupils (and the falcon's visor lights). */\n readonly eye: string;\n}\n\n/** The signature palettes of the Krizaka story (`tone=\"own\"`), from the first drawings of each bird. */\nexport const OWN_PALETTES: Readonly<Record<MascotBird, MascotPalette>> = {\n falcon: { from: \"#ff9f00\", to: \"#ff2a00\", wing: \"#d84315\", detail: \"#b4320d\", beak: \"#ffb300\", eye: \"#00c8d4\" },\n owl: { from: \"#a78bfa\", to: \"#6d28d9\", wing: \"#7c3aed\", detail: \"#5b21b6\", beak: \"#fbbf24\", eye: \"#1f2937\" },\n duck: { from: \"#f43f5e\", to: \"#be123c\", wing: \"#db2777\", detail: \"#9f1239\", beak: \"#fbbf24\", eye: \"#1f2937\" },\n flamingo: { from: \"#f9a8d4\", to: \"#db2777\", wing: \"#ec4899\", detail: \"#be185d\", beak: \"#fbbf24\", eye: \"#1f2937\" },\n pigeon: { from: \"#22d3ee\", to: \"#6366f1\", wing: \"#a855f7\", detail: \"#4338ca\", beak: \"#f59e0b\", eye: \"#1f2937\" },\n};\n\n/** Fixed light and shade, laid at a low opacity over a role (they read on both themes). */\nexport const LIGHT = \"#ffffff\";\nexport const SHADE = \"#000000\";\n/** The parcel's faces (pigeon). */\nexport const PARCEL = [\"#f59e0b\", \"#d97706\", \"#b45309\"] as const;\n","// Client (the bird has an id per instance). A rule, a promise or a decision told by a bird (blocks.css): the sentence in\n// a speech bubble — an opening quote mark, the hue around it — and under its tail the bird and who speaks. One bird per\n// idea (Mascot's rule): the falcon watches, the owl reads, the duck builds, the flamingo answers or gets paid, the\n// pigeon delivers.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type MascotBird, type MascotMood } from \"../mascots/geometry\";\nimport { Mascot } from \"../mascots/mascot\";\n\nexport type MascotQuoteProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The bird that speaks — the one whose idea it is. */\n bird: MascotBird;\n /**\n * Its mood.\n * @default \"thinking\"\n */\n mood?: MascotMood;\n /** Who speaks, under the bubble: `The falcon's rule`. */\n label: React.ReactNode;\n /** The sentence: the rule, the promise. */\n children: React.ReactNode;\n /**\n * `inline` inside a card (small, the bird answers the pointer); `callout` alone in a section (larger, the bird alive).\n * @default \"inline\"\n */\n variant?: \"inline\" | \"callout\";\n /** The bird's idle loop (it pauses off screen and stops under reduced motion). Defaults to `true` for a callout. */\n animated?: boolean;\n};\n\n/** A sentence told by a bird: a speech bubble, the bird under its tail, who speaks. The bird is decorative. */\nexport function MascotQuote({ bird, mood = \"thinking\", label, children, variant = \"inline\", animated, className, ...props }: MascotQuoteProps) {\n const callout = variant === \"callout\";\n return (\n <figure className={cn(\"kz-quote\", className)} data-variant={callout ? \"callout\" : undefined} {...props}>\n <blockquote>\n <p>{children}</p>\n </blockquote>\n <figcaption>\n <Mascot bird={bird} mood={mood} size={callout ? 72 : 44} animated={animated ?? callout} className=\"kz-quote-bird\" aria-hidden />\n <span>{label}</span>\n </figcaption>\n </figure>\n );\n}\n"],"mappings":";;;;;;AAEA,SAAS,aAAa;;;ACgDtB,IAAM,SAAS,CAAC,MAAc,EAAE,QAAQ,wCAAwC,CAAC,GAAG,GAAW,MAA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eAAc,SAAQ;AAAA,UACxF,oBAAC,YAAO,IAAI,WAAW,KAAK,IAAI,CAAC,GAAG,IAAI,WAAW,KAAK,IAAI,CAAC,GAAG,GAAG,KAAK,MAAM,SAAS;AAAA,WACzF;AAAA;AAAA;AAAA,EAEJ;AAEJ;;;AEtJQ,gBAAAA,MAEF,QAAAC,aAFE;AALD,SAAS,YAAY,EAAE,MAAM,OAAO,YAAY,OAAO,UAAU,UAAU,UAAU,UAAU,WAAW,GAAG,MAAM,GAAqB;AAC7I,QAAM,UAAU,YAAY;AAC5B,SACE,gBAAAA,MAAC,YAAO,WAAW,GAAG,YAAY,SAAS,GAAG,gBAAc,UAAU,YAAY,QAAY,GAAG,OAC/F;AAAA,oBAAAD,KAAC,gBACC,0BAAAA,KAAC,OAAG,UAAS,GACf;AAAA,IACA,gBAAAC,MAAC,gBACC;AAAA,sBAAAD,KAAC,UAAO,MAAY,MAAY,MAAM,UAAU,KAAK,IAAI,UAAU,YAAY,SAAS,WAAU,iBAAgB,eAAW,MAAC;AAAA,MAC9H,gBAAAA,KAAC,UAAM,iBAAM;AAAA,OACf;AAAA,KACF;AAEJ;","names":["jsx","jsxs"]}
|
package/dist/media-capture.js
CHANGED
package/dist/motion.css
CHANGED
|
@@ -584,11 +584,35 @@ svg[data-kz-icon="ExternalIcon"] {
|
|
|
584
584
|
@keyframes kz-iso-blink { 50% { opacity: 0.35; } }
|
|
585
585
|
@keyframes kz-iso-sheen { 0% { stroke-dashoffset: 40; } 60%, 100% { stroke-dashoffset: -400; } }
|
|
586
586
|
|
|
587
|
+
/* A terminal session played back (TerminalReplay): a screen of a fixed number of lines (no layout shift while it
|
|
588
|
+
plays), a caret that blinks. Rendered whole by the server; while scripts take over an autoplaying replay, the whole
|
|
589
|
+
session stays out of sight (never a flash of it before it is typed) — and shows anyway after 2.5 s if they never do. */
|
|
590
|
+
.kz-replay-screen {
|
|
591
|
+
height: calc(var(--kz-replay-rows, 18) * 1lh + 1.5rem);
|
|
592
|
+
scrollbar-width: thin;
|
|
593
|
+
}
|
|
594
|
+
.kz-replay-caret {
|
|
595
|
+
display: inline-block;
|
|
596
|
+
width: 0.6em;
|
|
597
|
+
height: 1.1em;
|
|
598
|
+
margin-left: 1px;
|
|
599
|
+
vertical-align: text-bottom;
|
|
600
|
+
background: currentColor;
|
|
601
|
+
animation: kz-replay-blink 1.05s steps(1) infinite;
|
|
602
|
+
}
|
|
603
|
+
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
|
|
604
|
+
.kz-replay[data-state="final"][data-autoplay] .kz-replay-live {
|
|
605
|
+
animation: kz-replay-reveal 0s 2.5s both;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
@keyframes kz-replay-blink { 50% { opacity: 0; } }
|
|
609
|
+
@keyframes kz-replay-reveal { from { visibility: hidden; } }
|
|
610
|
+
|
|
587
611
|
@media (prefers-reduced-motion: reduce) {
|
|
588
612
|
.kz-page, .kz-word, .kz-gradient-text, .kz-marquee, .kz-backdrop-drift, .kz-overlay, .kz-dialog, .kz-pop, .kz-fade, .kz-progress,
|
|
589
613
|
.kz-skeleton, .kz-skeleton-shape *, .kz-toast::after, .kz-glow::before,
|
|
590
614
|
.kz-rotating > *, .kz-loop, .kz-iso-rise, .kz-count-roll, .kz-loader-trace, .kz-loader-node, .kz-loader-mark,
|
|
591
|
-
[data-kz-status] { animation: none !important; }
|
|
615
|
+
[data-kz-status], .kz-replay-caret { animation: none !important; }
|
|
592
616
|
/* At rest, the trace stands still where a reader expects it: a third of the hexagon from the top. */
|
|
593
617
|
.kz-loader-trace:not([stroke-dasharray]) { stroke-dashoffset: -8; }
|
|
594
618
|
[data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { L as LinkComponent } from './block-link-BAg4eoZk.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { PageSize } from './page.js';
|
|
4
|
+
import './section-backdrop.js';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
|
|
7
|
+
type PageHeroProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
|
|
8
|
+
/** The page's title: the `h1`. */
|
|
9
|
+
title: React.ReactNode;
|
|
10
|
+
/** A short mono line above the title (where the reader is: `Open source · building block`). */
|
|
11
|
+
eyebrow?: React.ReactNode;
|
|
12
|
+
/** One or two sentences under the title: what the page gives the reader. */
|
|
13
|
+
lead?: React.ReactNode;
|
|
14
|
+
/** The way back to the parent page, above the eyebrow. */
|
|
15
|
+
back?: {
|
|
16
|
+
href: string;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
/** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */
|
|
20
|
+
linkAs?: LinkComponent;
|
|
21
|
+
/** Beside the text, on the right (above it on a phone): the page's bird, an illustration. Decorative or labelled by you. */
|
|
22
|
+
aside?: React.ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* The brand's backdrop behind the hero (the gradient, the dome; `grid` adds the perspective floor).
|
|
25
|
+
* @default "grid"
|
|
26
|
+
*/
|
|
27
|
+
backdrop?: "grid" | "plain" | "none";
|
|
28
|
+
/**
|
|
29
|
+
* `center` for a page that opens on its title alone (a hub, a contact page).
|
|
30
|
+
* @default "start"
|
|
31
|
+
*/
|
|
32
|
+
align?: "start" | "center";
|
|
33
|
+
/**
|
|
34
|
+
* The width of the content.
|
|
35
|
+
* @default "default"
|
|
36
|
+
*/
|
|
37
|
+
size?: PageSize;
|
|
38
|
+
/** Under the lead: facts (`Facts`), actions (`ActionBar`), a search field. */
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
};
|
|
41
|
+
/** The first screen of a page: back link, eyebrow, `h1`, lead, what follows them (facts, actions) and an aside. */
|
|
42
|
+
declare function PageHero({ title, eyebrow, lead, back, linkAs, aside, backdrop, align, size, className, children, ...props }: PageHeroProps): React.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { LinkComponent, PageHero, type PageHeroProps };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Page
|
|
3
|
+
} from "./chunk-K3SWZXYT.js";
|
|
4
|
+
import {
|
|
5
|
+
BlockLink
|
|
6
|
+
} from "./chunk-2AGSO3WH.js";
|
|
7
|
+
import {
|
|
8
|
+
ArrowGlyph
|
|
9
|
+
} from "./chunk-XCBVFMNV.js";
|
|
10
|
+
import {
|
|
11
|
+
SectionBackdrop
|
|
12
|
+
} from "./chunk-XVLWVTQA.js";
|
|
13
|
+
import {
|
|
14
|
+
cn
|
|
15
|
+
} from "./chunk-FJDSLNXK.js";
|
|
16
|
+
|
|
17
|
+
// src/page-hero/page-hero.tsx
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function PageHero({ title, eyebrow, lead, back, linkAs, aside, backdrop = "grid", align = "start", size, className, children, ...props }) {
|
|
20
|
+
const body = /* @__PURE__ */ jsxs(Page, { size, children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: "kz-hero-text", children: [
|
|
22
|
+
back && /* @__PURE__ */ jsxs(BlockLink, { href: back.href, linkAs, className: "kz-hero-back", children: [
|
|
23
|
+
/* @__PURE__ */ jsx(ArrowGlyph, { direction: "left", className: "h-3.5 w-3.5" }),
|
|
24
|
+
" ",
|
|
25
|
+
back.label
|
|
26
|
+
] }),
|
|
27
|
+
eyebrow && /* @__PURE__ */ jsx("p", { className: "kz-eyebrow", children: eyebrow }),
|
|
28
|
+
/* @__PURE__ */ jsx("h1", { className: "kz-hero-title", children: title }),
|
|
29
|
+
lead && /* @__PURE__ */ jsx("p", { className: "kz-hero-lead", children: lead }),
|
|
30
|
+
children && /* @__PURE__ */ jsx("div", { className: "kz-hero-extra", children })
|
|
31
|
+
] }),
|
|
32
|
+
aside && align === "start" && /* @__PURE__ */ jsx("div", { className: "kz-hero-aside", children: aside })
|
|
33
|
+
] });
|
|
34
|
+
const shared = { className: cn("kz-hero", className), "data-align": align === "start" ? void 0 : align, ...props };
|
|
35
|
+
if (backdrop === "none") return /* @__PURE__ */ jsx("header", { ...shared, children: body });
|
|
36
|
+
return /* @__PURE__ */ jsx(SectionBackdrop, { as: "header", grid: backdrop === "grid", ...shared, children: body });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
PageHero
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=page-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/page-hero/page-hero.tsx"],"sourcesContent":["// Server-safe. The first screen of a page (blocks.css): painted at once — never revealed, it is the LCP.\nimport type * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../block-link\";\nimport { cn } from \"../cn\";\nimport { ArrowGlyph } from \"../glyphs\";\nimport { Page, type PageSize } from \"../page/page\";\nimport { SectionBackdrop } from \"../section-backdrop/section-backdrop\";\n\nexport type PageHeroProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The page's title: the `h1`. */\n title: React.ReactNode;\n /** A short mono line above the title (where the reader is: `Open source · building block`). */\n eyebrow?: React.ReactNode;\n /** One or two sentences under the title: what the page gives the reader. */\n lead?: React.ReactNode;\n /** The way back to the parent page, above the eyebrow. */\n back?: { href: string; label: string };\n /** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n /** Beside the text, on the right (above it on a phone): the page's bird, an illustration. Decorative or labelled by you. */\n aside?: React.ReactNode;\n /**\n * The brand's backdrop behind the hero (the gradient, the dome; `grid` adds the perspective floor).\n * @default \"grid\"\n */\n backdrop?: \"grid\" | \"plain\" | \"none\";\n /**\n * `center` for a page that opens on its title alone (a hub, a contact page).\n * @default \"start\"\n */\n align?: \"start\" | \"center\";\n /**\n * The width of the content.\n * @default \"default\"\n */\n size?: PageSize;\n /** Under the lead: facts (`Facts`), actions (`ActionBar`), a search field. */\n children?: React.ReactNode;\n};\n\n/** The first screen of a page: back link, eyebrow, `h1`, lead, what follows them (facts, actions) and an aside. */\nexport function PageHero({ title, eyebrow, lead, back, linkAs, aside, backdrop = \"grid\", align = \"start\", size, className, children, ...props }: PageHeroProps) {\n const body = (\n <Page size={size}>\n <div className=\"kz-hero-text\">\n {back && (\n <BlockLink href={back.href} linkAs={linkAs} className=\"kz-hero-back\">\n <ArrowGlyph direction=\"left\" className=\"h-3.5 w-3.5\" /> {back.label}\n </BlockLink>\n )}\n {eyebrow && <p className=\"kz-eyebrow\">{eyebrow}</p>}\n <h1 className=\"kz-hero-title\">{title}</h1>\n {lead && <p className=\"kz-hero-lead\">{lead}</p>}\n {children && <div className=\"kz-hero-extra\">{children}</div>}\n </div>\n {aside && align === \"start\" && <div className=\"kz-hero-aside\">{aside}</div>}\n </Page>\n );\n const shared = { className: cn(\"kz-hero\", className), \"data-align\": align === \"start\" ? undefined : align, ...props };\n if (backdrop === \"none\") return <header {...shared}>{body}</header>;\n return (\n <SectionBackdrop as=\"header\" grid={backdrop === \"grid\"} {...shared}>\n {body}\n </SectionBackdrop>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CU,SACE,KADF;AALH,SAAS,SAAS,EAAE,OAAO,SAAS,MAAM,MAAM,QAAQ,OAAO,WAAW,QAAQ,QAAQ,SAAS,MAAM,WAAW,UAAU,GAAG,MAAM,GAAkB;AAC9J,QAAM,OACJ,qBAAC,QAAK,MACJ;AAAA,yBAAC,SAAI,WAAU,gBACZ;AAAA,cACC,qBAAC,aAAU,MAAM,KAAK,MAAM,QAAgB,WAAU,gBACpD;AAAA,4BAAC,cAAW,WAAU,QAAO,WAAU,eAAc;AAAA,QAAE;AAAA,QAAE,KAAK;AAAA,SAChE;AAAA,MAED,WAAW,oBAAC,OAAE,WAAU,cAAc,mBAAQ;AAAA,MAC/C,oBAAC,QAAG,WAAU,iBAAiB,iBAAM;AAAA,MACpC,QAAQ,oBAAC,OAAE,WAAU,gBAAgB,gBAAK;AAAA,MAC1C,YAAY,oBAAC,SAAI,WAAU,iBAAiB,UAAS;AAAA,OACxD;AAAA,IACC,SAAS,UAAU,WAAW,oBAAC,SAAI,WAAU,iBAAiB,iBAAM;AAAA,KACvE;AAEF,QAAM,SAAS,EAAE,WAAW,GAAG,WAAW,SAAS,GAAG,cAAc,UAAU,UAAU,SAAY,OAAO,GAAG,MAAM;AACpH,MAAI,aAAa,OAAQ,QAAO,oBAAC,YAAQ,GAAG,QAAS,gBAAK;AAC1D,SACE,oBAAC,mBAAgB,IAAG,UAAS,MAAM,aAAa,QAAS,GAAG,QACzD,gBACH;AAEJ;","names":[]}
|