@krizaka/ui 2.6.0 → 2.9.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 +37 -4
- package/dist/achievement.d.ts +54 -0
- package/dist/achievement.js +73 -0
- package/dist/achievement.js.map +1 -0
- package/dist/app-shell.d.ts +203 -0
- package/dist/app-shell.js +137 -0
- package/dist/app-shell.js.map +1 -0
- package/dist/auth-layout.d.ts +136 -0
- package/dist/auth-layout.js +75 -0
- package/dist/auth-layout.js.map +1 -0
- package/dist/choice-grid.d.ts +84 -0
- package/dist/choice-grid.js +141 -0
- package/dist/choice-grid.js.map +1 -0
- package/dist/chunk-555LWYIN.js +11 -0
- package/dist/chunk-555LWYIN.js.map +1 -0
- package/dist/chunk-AZPKXP3O.js +36 -0
- package/dist/chunk-AZPKXP3O.js.map +1 -0
- package/dist/chunk-NOVUREEC.js +274 -0
- package/dist/chunk-NOVUREEC.js.map +1 -0
- package/dist/chunk-VCAAHCHL.js +17 -0
- package/dist/chunk-VCAAHCHL.js.map +1 -0
- package/dist/code-block.js +23 -44
- package/dist/code-block.js.map +1 -1
- package/dist/continue-prompt.d.ts +48 -0
- package/dist/continue-prompt.js +200 -0
- package/dist/continue-prompt.js.map +1 -0
- package/dist/dashboard-layout.d.ts +139 -0
- package/dist/dashboard-layout.js +68 -0
- package/dist/dashboard-layout.js.map +1 -0
- package/dist/detail-layout.d.ts +126 -0
- package/dist/detail-layout.js +48 -0
- package/dist/detail-layout.js.map +1 -0
- package/dist/docs-layout.d.ts +78 -0
- package/dist/docs-layout.js +60 -0
- package/dist/docs-layout.js.map +1 -0
- package/dist/geometry-CXrAW34x.d.ts +19 -0
- package/dist/goal-gauge.d.ts +38 -0
- package/dist/goal-gauge.js +53 -0
- package/dist/goal-gauge.js.map +1 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.js +89 -4
- package/dist/index.js.map +1 -1
- package/dist/landscape.d.ts +41 -0
- package/dist/landscape.js +836 -0
- package/dist/landscape.js.map +1 -0
- package/dist/marketing-layout.d.ts +60 -0
- package/dist/marketing-layout.js +25 -0
- package/dist/marketing-layout.js.map +1 -0
- package/dist/mascot-quote.d.ts +4 -3
- package/dist/mascot-quote.js +21 -1
- package/dist/mascot-quote.js.map +1 -1
- package/dist/mascot-state.d.ts +128 -0
- package/dist/mascot-state.js +95 -0
- package/dist/mascot-state.js.map +1 -0
- package/dist/mascots.d.ts +18 -20
- package/dist/mascots.js +65 -221
- package/dist/mascots.js.map +1 -1
- package/dist/native.d.ts +124 -7
- package/dist/native.js +641 -239
- package/dist/native.js.map +1 -1
- package/dist/profile-card.d.ts +85 -0
- package/dist/profile-card.js +87 -0
- package/dist/profile-card.js.map +1 -0
- package/dist/promise-card.d.ts +28 -0
- package/dist/promise-card.js +29 -0
- package/dist/promise-card.js.map +1 -0
- package/dist/scroll-stage.d.ts +603 -0
- package/dist/scroll-stage.js +59 -0
- package/dist/scroll-stage.js.map +1 -0
- package/dist/settings-layout.d.ts +154 -0
- package/dist/settings-layout.js +57 -0
- package/dist/settings-layout.js.map +1 -0
- package/dist/split-view.d.ts +106 -0
- package/dist/split-view.js +41 -0
- package/dist/split-view.js.map +1 -0
- package/dist/stage-banner.d.ts +34 -0
- package/dist/stage-banner.js +26 -0
- package/dist/stage-banner.js.map +1 -0
- package/dist/story-variant-CLn4H5Nt.d.ts +4 -0
- package/dist/story.css +432 -0
- package/package.json +267 -10
- package/registry/achievement.json +322 -0
- package/registry/action-bar.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +451 -0
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +230 -0
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +5 -5
- package/registry/card-grid.json +5 -5
- 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/choice-grid.json +318 -0
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/confirm-button.json +3 -3
- package/registry/continue-prompt.json +312 -0
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +273 -0
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/detail-layout.json +233 -0
- package/registry/dialog.json +1 -1
- package/registry/docs-layout.json +148 -0
- package/registry/dropdown-menu.json +3 -3
- package/registry/empty-state.json +1 -1
- package/registry/examples/achievement/arcade.d.ts +4 -0
- package/registry/examples/achievement/arcade.js +15 -0
- package/registry/examples/achievement/arcade.tsx +12 -0
- package/registry/examples/achievement/milestones.d.ts +4 -0
- package/registry/examples/achievement/milestones.js +15 -0
- package/registry/examples/achievement/milestones.tsx +12 -0
- package/registry/examples/app-shell/admin-console.d.ts +4 -0
- package/registry/examples/app-shell/admin-console.js +52 -0
- package/registry/examples/app-shell/admin-console.tsx +64 -0
- package/registry/examples/app-shell/basic.d.ts +4 -0
- package/registry/examples/app-shell/basic.js +37 -0
- package/registry/examples/app-shell/basic.tsx +31 -0
- package/registry/examples/app-shell/orochia-studio.d.ts +4 -0
- package/registry/examples/app-shell/orochia-studio.js +89 -0
- package/registry/examples/app-shell/orochia-studio.tsx +101 -0
- package/registry/examples/auth-layout/onboarding.d.ts +4 -0
- package/registry/examples/auth-layout/onboarding.js +56 -0
- package/registry/examples/auth-layout/onboarding.tsx +47 -0
- package/registry/examples/auth-layout/sign-in.d.ts +4 -0
- package/registry/examples/auth-layout/sign-in.js +55 -0
- package/registry/examples/auth-layout/sign-in.tsx +47 -0
- package/registry/examples/auth-layout/verify.d.ts +4 -0
- package/registry/examples/auth-layout/verify.js +23 -0
- package/registry/examples/auth-layout/verify.tsx +19 -0
- package/registry/examples/choice-grid/line-up.d.ts +4 -0
- package/registry/examples/choice-grid/line-up.js +37 -0
- package/registry/examples/choice-grid/line-up.tsx +32 -0
- package/registry/examples/choice-grid/plans.d.ts +4 -0
- package/registry/examples/choice-grid/plans.js +28 -0
- package/registry/examples/choice-grid/plans.tsx +24 -0
- package/registry/examples/continue-prompt/arcade.d.ts +4 -0
- package/registry/examples/continue-prompt/arcade.js +28 -0
- package/registry/examples/continue-prompt/arcade.tsx +25 -0
- package/registry/examples/continue-prompt/offer.d.ts +4 -0
- package/registry/examples/continue-prompt/offer.js +24 -0
- package/registry/examples/continue-prompt/offer.tsx +19 -0
- package/registry/examples/dashboard-layout/orazaka-eric.d.ts +4 -0
- package/registry/examples/dashboard-layout/orazaka-eric.js +58 -0
- package/registry/examples/dashboard-layout/orazaka-eric.tsx +80 -0
- package/registry/examples/dashboard-layout/widgets.d.ts +4 -0
- package/registry/examples/dashboard-layout/widgets.js +17 -0
- package/registry/examples/dashboard-layout/widgets.tsx +22 -0
- package/registry/examples/detail-layout/job.d.ts +4 -0
- package/registry/examples/detail-layout/job.js +25 -0
- package/registry/examples/detail-layout/job.tsx +20 -0
- package/registry/examples/detail-layout/video.d.ts +4 -0
- package/registry/examples/detail-layout/video.js +44 -0
- package/registry/examples/detail-layout/video.tsx +53 -0
- package/registry/examples/docs-layout/page.d.ts +4 -0
- package/registry/examples/docs-layout/page.js +26 -0
- package/registry/examples/docs-layout/page.tsx +30 -0
- package/registry/examples/goal-gauge/arcade.d.ts +4 -0
- package/registry/examples/goal-gauge/arcade.js +11 -0
- package/registry/examples/goal-gauge/arcade.tsx +10 -0
- package/registry/examples/goal-gauge/challenge.d.ts +4 -0
- package/registry/examples/goal-gauge/challenge.js +11 -0
- package/registry/examples/goal-gauge/challenge.tsx +10 -0
- package/registry/examples/goal-gauge/drain.d.ts +4 -0
- package/registry/examples/goal-gauge/drain.js +11 -0
- package/registry/examples/goal-gauge/drain.tsx +10 -0
- package/registry/examples/goal-gauge/native/default.d.ts +4 -0
- package/registry/examples/goal-gauge/native/default.dark.png +0 -0
- package/registry/examples/goal-gauge/native/default.js +15 -0
- package/registry/examples/goal-gauge/native/default.light.png +0 -0
- package/registry/examples/goal-gauge/native/default.tsx +12 -0
- package/registry/examples/landscape/backdrop.d.ts +4 -0
- package/registry/examples/landscape/backdrop.js +14 -0
- package/registry/examples/landscape/backdrop.tsx +11 -0
- package/registry/examples/landscape/brand.d.ts +4 -0
- package/registry/examples/landscape/brand.js +11 -0
- package/registry/examples/landscape/brand.tsx +10 -0
- package/registry/examples/marketing-layout/basic.d.ts +4 -0
- package/registry/examples/marketing-layout/basic.js +31 -0
- package/registry/examples/marketing-layout/basic.tsx +28 -0
- package/registry/examples/marketing-layout/docs-hub.d.ts +4 -0
- package/registry/examples/marketing-layout/docs-hub.js +37 -0
- package/registry/examples/marketing-layout/docs-hub.tsx +44 -0
- package/registry/examples/marketing-layout/pricing.d.ts +4 -0
- package/registry/examples/marketing-layout/pricing.js +45 -0
- package/registry/examples/marketing-layout/pricing.tsx +55 -0
- package/registry/examples/marketing-layout/product-page.d.ts +4 -0
- package/registry/examples/marketing-layout/product-page.js +79 -0
- package/registry/examples/marketing-layout/product-page.tsx +83 -0
- package/registry/examples/mascot-state/empty.d.ts +4 -0
- package/registry/examples/mascot-state/empty.js +22 -0
- package/registry/examples/mascot-state/empty.tsx +20 -0
- package/registry/examples/mascot-state/error.d.ts +4 -0
- package/registry/examples/mascot-state/error.js +23 -0
- package/registry/examples/mascot-state/error.tsx +21 -0
- package/registry/examples/mascot-state/loading.d.ts +4 -0
- package/registry/examples/mascot-state/loading.js +22 -0
- package/registry/examples/mascot-state/loading.tsx +16 -0
- package/registry/examples/mascot-state/native/default.d.ts +4 -0
- package/registry/examples/mascot-state/native/default.dark.png +0 -0
- package/registry/examples/mascot-state/native/default.js +25 -0
- package/registry/examples/mascot-state/native/default.light.png +0 -0
- package/registry/examples/mascot-state/native/default.tsx +19 -0
- package/registry/examples/mascot-state/success.d.ts +4 -0
- package/registry/examples/mascot-state/success.js +21 -0
- package/registry/examples/mascot-state/success.tsx +19 -0
- package/registry/examples/mascot-state/welcome.d.ts +4 -0
- package/registry/examples/mascot-state/welcome.js +21 -0
- package/registry/examples/mascot-state/welcome.tsx +19 -0
- package/registry/examples/mascots/flock.tsx +1 -1
- package/registry/examples/mascots/lovebird.d.ts +4 -0
- package/registry/examples/mascots/lovebird.js +19 -0
- package/registry/examples/mascots/lovebird.tsx +18 -0
- package/registry/examples/mascots/native/lovebird.d.ts +4 -0
- package/registry/examples/mascots/native/lovebird.dark.png +0 -0
- package/registry/examples/mascots/native/lovebird.js +21 -0
- package/registry/examples/mascots/native/lovebird.light.png +0 -0
- package/registry/examples/mascots/native/lovebird.tsx +18 -0
- package/registry/examples/mascots/native/phoenix.d.ts +4 -0
- package/registry/examples/mascots/native/phoenix.dark.png +0 -0
- package/registry/examples/mascots/native/phoenix.js +21 -0
- package/registry/examples/mascots/native/phoenix.light.png +0 -0
- package/registry/examples/mascots/native/phoenix.tsx +18 -0
- package/registry/examples/mascots/phoenix.d.ts +4 -0
- package/registry/examples/mascots/phoenix.js +14 -0
- package/registry/examples/mascots/phoenix.tsx +11 -0
- package/registry/examples/profile-card/arcade.d.ts +4 -0
- package/registry/examples/profile-card/arcade.js +25 -0
- package/registry/examples/profile-card/arcade.tsx +19 -0
- package/registry/examples/profile-card/creator.d.ts +4 -0
- package/registry/examples/profile-card/creator.js +31 -0
- package/registry/examples/profile-card/creator.tsx +26 -0
- package/registry/examples/profile-card/match.d.ts +4 -0
- package/registry/examples/profile-card/match.js +25 -0
- package/registry/examples/profile-card/match.tsx +19 -0
- package/registry/examples/profile-card/native/default.d.ts +4 -0
- package/registry/examples/profile-card/native/default.dark.png +0 -0
- package/registry/examples/profile-card/native/default.js +27 -0
- package/registry/examples/profile-card/native/default.light.png +0 -0
- package/registry/examples/profile-card/native/default.tsx +22 -0
- package/registry/examples/promise-card/arcade.d.ts +4 -0
- package/registry/examples/promise-card/arcade.js +25 -0
- package/registry/examples/promise-card/arcade.tsx +19 -0
- package/registry/examples/promise-card/guarantee.d.ts +4 -0
- package/registry/examples/promise-card/guarantee.js +23 -0
- package/registry/examples/promise-card/guarantee.tsx +17 -0
- package/registry/examples/scroll-stage/arcade.d.ts +4 -0
- package/registry/examples/scroll-stage/arcade.js +16 -0
- package/registry/examples/scroll-stage/arcade.tsx +15 -0
- package/registry/examples/scroll-stage/chapters.d.ts +4 -0
- package/registry/examples/scroll-stage/chapters.js +25 -0
- package/registry/examples/scroll-stage/chapters.tsx +22 -0
- package/registry/examples/settings-layout/account.d.ts +4 -0
- package/registry/examples/settings-layout/account.js +51 -0
- package/registry/examples/settings-layout/account.tsx +50 -0
- package/registry/examples/settings-layout/sections.d.ts +4 -0
- package/registry/examples/settings-layout/sections.js +27 -0
- package/registry/examples/settings-layout/sections.tsx +24 -0
- package/registry/examples/split-view/empty.d.ts +4 -0
- package/registry/examples/split-view/empty.js +19 -0
- package/registry/examples/split-view/empty.tsx +13 -0
- package/registry/examples/split-view/messages.d.ts +4 -0
- package/registry/examples/split-view/messages.js +49 -0
- package/registry/examples/split-view/messages.tsx +52 -0
- package/registry/examples/stage-banner/round.d.ts +4 -0
- package/registry/examples/stage-banner/round.js +14 -0
- package/registry/examples/stage-banner/round.tsx +11 -0
- package/registry/examples/stage-banner/steps.d.ts +4 -0
- package/registry/examples/stage-banner/steps.js +14 -0
- package/registry/examples/stage-banner/steps.tsx +11 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +322 -0
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +337 -5
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landscape.json +189 -0
- package/registry/link-card.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/marketing-layout.json +172 -0
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +6 -6
- package/registry/mascot-state.json +1249 -0
- package/registry/mascots.json +140 -23
- package/registry/media-capture.json +1 -1
- 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 +3 -3
- package/registry/page.json +5 -5
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/profile-card.json +501 -0
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +228 -0
- package/registry/radio-group.json +1 -1
- package/registry/scroll-stage.json +197 -0
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +231 -0
- package/registry/skeleton.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +233 -0
- package/registry/stage-banner.json +221 -0
- 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 +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/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
package/dist/native.js
CHANGED
|
@@ -166,6 +166,16 @@ var marks = /* @__PURE__ */ Object.freeze({
|
|
|
166
166
|
"100%",
|
|
167
167
|
"#f472b6"
|
|
168
168
|
]
|
|
169
|
+
],
|
|
170
|
+
"yazakia": [
|
|
171
|
+
[
|
|
172
|
+
"0%",
|
|
173
|
+
"#079d61"
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
"100%",
|
|
177
|
+
"#089b96"
|
|
178
|
+
]
|
|
169
179
|
]
|
|
170
180
|
});
|
|
171
181
|
|
|
@@ -709,8 +719,88 @@ var styles8 = StyleSheet8.create({
|
|
|
709
719
|
action: { marginTop: 8, flexDirection: "row", flexWrap: "wrap", justifyContent: "center", gap: 8 }
|
|
710
720
|
});
|
|
711
721
|
|
|
722
|
+
// src/native/goal-gauge.tsx
|
|
723
|
+
import { Animated as Animated4, StyleSheet as StyleSheet9, View as View6 } from "react-native";
|
|
724
|
+
|
|
725
|
+
// src/native/story-motion.ts
|
|
726
|
+
import * as React7 from "react";
|
|
727
|
+
import { AccessibilityInfo as AccessibilityInfo2, Animated as Animated3, Easing } from "react-native";
|
|
728
|
+
function useEntrance(animated, delay = 0, duration = 700) {
|
|
729
|
+
const [value] = React7.useState(() => new Animated3.Value(animated ? 0 : 1));
|
|
730
|
+
React7.useEffect(() => {
|
|
731
|
+
if (!animated) return;
|
|
732
|
+
let cancelled = false;
|
|
733
|
+
void AccessibilityInfo2.isReduceMotionEnabled().then((reduce) => {
|
|
734
|
+
if (cancelled) return;
|
|
735
|
+
if (reduce) value.setValue(1);
|
|
736
|
+
else Animated3.timing(value, { toValue: 1, duration, delay, easing: Easing.out(Easing.cubic), useNativeDriver: true }).start();
|
|
737
|
+
});
|
|
738
|
+
return () => {
|
|
739
|
+
cancelled = true;
|
|
740
|
+
};
|
|
741
|
+
}, [animated, delay, duration, value]);
|
|
742
|
+
return value;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// src/native/goal-gauge.tsx
|
|
746
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
747
|
+
function Cell({ lit, animate, order, animated, arcade }) {
|
|
748
|
+
const { theme } = useTheme();
|
|
749
|
+
const t = useEntrance(animated && animate, 300 + order * 100, 350);
|
|
750
|
+
const spentOpacity = arcade ? 0.14 : 1;
|
|
751
|
+
const opacity = !animate ? 1 : lit ? t.interpolate({ inputRange: [0, 1], outputRange: [0.25, 1] }) : t.interpolate({ inputRange: [0, 1], outputRange: [1, arcade ? 0.14 : 1] });
|
|
752
|
+
const color = lit || arcade ? theme.accent : theme.surface3;
|
|
753
|
+
return /* @__PURE__ */ jsx10(
|
|
754
|
+
Animated4.View,
|
|
755
|
+
{
|
|
756
|
+
style: [styles9.cell, arcade ? styles9.cellArcade : null, { backgroundColor: color, opacity: lit || animate ? opacity : spentOpacity }]
|
|
757
|
+
}
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
function GoalGauge({ label, segments, value, valueText, mode = "fill", showLabel = true, variant = "default", animated = true, style, ...props }) {
|
|
761
|
+
const { theme } = useTheme();
|
|
762
|
+
const total = Math.max(1, Math.round(segments));
|
|
763
|
+
const lit = Math.min(total, Math.max(0, Math.round(value ?? total)));
|
|
764
|
+
const words = valueText ?? `${lit} / ${total}`;
|
|
765
|
+
const arcade = variant === "arcade";
|
|
766
|
+
return /* @__PURE__ */ jsxs7(
|
|
767
|
+
View6,
|
|
768
|
+
{
|
|
769
|
+
accessible: true,
|
|
770
|
+
role: "meter",
|
|
771
|
+
"aria-label": label,
|
|
772
|
+
"aria-valuemin": 0,
|
|
773
|
+
"aria-valuemax": total,
|
|
774
|
+
"aria-valuenow": lit,
|
|
775
|
+
"aria-valuetext": words,
|
|
776
|
+
...props,
|
|
777
|
+
style: [styles9.root, style],
|
|
778
|
+
children: [
|
|
779
|
+
showLabel ? /* @__PURE__ */ jsxs7(View6, { "aria-hidden": true, style: [styles9.head, arcade ? styles9.headArcade : null], children: [
|
|
780
|
+
/* @__PURE__ */ jsx10(Txt, { variant: arcade ? "mono" : "caption", tone: "secondary", children: arcade ? label.toUpperCase() : label }),
|
|
781
|
+
arcade ? null : /* @__PURE__ */ jsx10(Txt, { variant: "caption", children: words })
|
|
782
|
+
] }) : null,
|
|
783
|
+
/* @__PURE__ */ jsx10(View6, { "aria-hidden": true, style: [styles9.cells, arcade ? [styles9.cellsArcade, { borderColor: theme.borderSubtle, backgroundColor: theme.surface1 }] : null], children: Array.from({ length: total }, (_, i) => {
|
|
784
|
+
const on = i < lit;
|
|
785
|
+
const animate = mode === "fill" ? on : !on;
|
|
786
|
+
return /* @__PURE__ */ jsx10(Cell, { lit: on, animate, order: mode === "fill" ? i : i - lit, animated, arcade }, i);
|
|
787
|
+
}) })
|
|
788
|
+
]
|
|
789
|
+
}
|
|
790
|
+
);
|
|
791
|
+
}
|
|
792
|
+
var styles9 = StyleSheet9.create({
|
|
793
|
+
root: { alignSelf: "stretch", gap: 8 },
|
|
794
|
+
head: { flexDirection: "row", justifyContent: "space-between", alignItems: "baseline", gap: 12 },
|
|
795
|
+
headArcade: { justifyContent: "center" },
|
|
796
|
+
cells: { flexDirection: "row", gap: 4 },
|
|
797
|
+
cellsArcade: { padding: 3, borderWidth: 1, borderRadius: 4, transform: [{ skewX: "-14deg" }] },
|
|
798
|
+
cell: { flex: 1, height: 8, borderRadius: 4 },
|
|
799
|
+
cellArcade: { height: 10, borderRadius: 1 }
|
|
800
|
+
});
|
|
801
|
+
|
|
712
802
|
// src/native/KrizakaMark.tsx
|
|
713
|
-
import { View as
|
|
803
|
+
import { View as View7 } from "react-native";
|
|
714
804
|
import Svg2, { Circle, Defs as Defs2, G as Group, LinearGradient as LinearGradient2, Path, RadialGradient, Stop as Stop2 } from "react-native-svg";
|
|
715
805
|
|
|
716
806
|
// src/marks/krizaka-geometry.ts
|
|
@@ -733,24 +823,24 @@ var KRIZAKA = {
|
|
|
733
823
|
};
|
|
734
824
|
|
|
735
825
|
// src/native/mark-motion.ts
|
|
736
|
-
import { useEffect as
|
|
737
|
-
import { AccessibilityInfo as
|
|
826
|
+
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
827
|
+
import { AccessibilityInfo as AccessibilityInfo3, Animated as Animated5, Easing as Easing2 } from "react-native";
|
|
738
828
|
var markA11y = (title) => title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
739
829
|
function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
740
|
-
const [spin] =
|
|
741
|
-
const [pulse] =
|
|
742
|
-
|
|
830
|
+
const [spin] = useState7(() => new Animated5.Value(0));
|
|
831
|
+
const [pulse] = useState7(() => new Animated5.Value(0));
|
|
832
|
+
useEffect5(() => {
|
|
743
833
|
if (!animated) return;
|
|
744
834
|
let loops = [];
|
|
745
835
|
let cancelled = false;
|
|
746
|
-
void
|
|
836
|
+
void AccessibilityInfo3.isReduceMotionEnabled().then((reduce) => {
|
|
747
837
|
if (reduce || cancelled) return;
|
|
748
838
|
loops = [
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
839
|
+
Animated5.loop(Animated5.timing(spin, { toValue: 1, duration: spinMs, easing: Easing2.linear, useNativeDriver: true })),
|
|
840
|
+
Animated5.loop(
|
|
841
|
+
Animated5.sequence([
|
|
842
|
+
Animated5.timing(pulse, { toValue: 1, duration: 1600, easing: Easing2.inOut(Easing2.ease), useNativeDriver: true }),
|
|
843
|
+
Animated5.timing(pulse, { toValue: 0, duration: 1600, easing: Easing2.inOut(Easing2.ease), useNativeDriver: true })
|
|
754
844
|
])
|
|
755
845
|
)
|
|
756
846
|
];
|
|
@@ -762,7 +852,7 @@ function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
|
762
852
|
};
|
|
763
853
|
}, [animated, spin, pulse, spinMs]);
|
|
764
854
|
return {
|
|
765
|
-
Animated:
|
|
855
|
+
Animated: Animated5,
|
|
766
856
|
layer: { position: "absolute", width: size, height: size },
|
|
767
857
|
spinStyle: { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] },
|
|
768
858
|
pulseStyle: { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }
|
|
@@ -770,39 +860,39 @@ function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
|
770
860
|
}
|
|
771
861
|
|
|
772
862
|
// src/native/KrizakaMark.tsx
|
|
773
|
-
import { Fragment as Fragment2, jsx as
|
|
863
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
774
864
|
function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
775
865
|
const { theme } = useTheme();
|
|
776
|
-
const { Animated:
|
|
866
|
+
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
777
867
|
const id = useSvgId("kzm");
|
|
778
868
|
const viewBox = size < 48 ? KRIZAKA.croppedViewBox : KRIZAKA.viewBox;
|
|
779
869
|
const stroke = neutral ?? theme.textMuted;
|
|
780
|
-
const blue = /* @__PURE__ */
|
|
781
|
-
const dot = (c) => /* @__PURE__ */
|
|
782
|
-
/* @__PURE__ */
|
|
783
|
-
/* @__PURE__ */
|
|
870
|
+
const blue = /* @__PURE__ */ jsx11(LinearGradient2, { id: `${id}b`, gradientUnits: "userSpaceOnUse", x1: KRIZAKA.blue.x1 + KRIZAKA.offset, y1: KRIZAKA.blue.y1 + KRIZAKA.offset, x2: KRIZAKA.blue.x2 + KRIZAKA.offset, y2: KRIZAKA.blue.y2 + KRIZAKA.offset, children: KRIZAKA.blue.stops.map(([offset, color]) => /* @__PURE__ */ jsx11(Stop2, { offset, stopColor: color }, offset)) });
|
|
871
|
+
const dot = (c) => /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
872
|
+
/* @__PURE__ */ jsx11(Circle, { cx: c.cx, cy: c.cy, r: c.r, fill: `url(#${id}b)` }),
|
|
873
|
+
/* @__PURE__ */ jsx11(Circle, { cx: c.cx, cy: c.cy, r: c.inner, fill: KRIZAKA.highlight })
|
|
784
874
|
] });
|
|
785
|
-
return /* @__PURE__ */
|
|
786
|
-
/* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
/* @__PURE__ */
|
|
790
|
-
/* @__PURE__ */
|
|
875
|
+
return /* @__PURE__ */ jsxs8(View7, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
876
|
+
/* @__PURE__ */ jsxs8(Svg2, { viewBox, style: layer, children: [
|
|
877
|
+
/* @__PURE__ */ jsxs8(Defs2, { children: [
|
|
878
|
+
/* @__PURE__ */ jsxs8(RadialGradient, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
879
|
+
/* @__PURE__ */ jsx11(Stop2, { offset: "0%", stopColor: KRIZAKA.glow.color, stopOpacity: KRIZAKA.glow.opacity }),
|
|
880
|
+
/* @__PURE__ */ jsx11(Stop2, { offset: "100%", stopColor: KRIZAKA.glow.color, stopOpacity: 0 })
|
|
791
881
|
] }),
|
|
792
|
-
/* @__PURE__ */
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ jsxs8(LinearGradient2, { id: `${id}i`, gradientUnits: "userSpaceOnUse", x1: KRIZAKA.ink.x1 + KRIZAKA.offset, y1: KRIZAKA.ink.y1 + KRIZAKA.offset, x2: KRIZAKA.ink.x2 + KRIZAKA.offset, y2: KRIZAKA.ink.y2 + KRIZAKA.offset, children: [
|
|
883
|
+
/* @__PURE__ */ jsx11(Stop2, { offset: "0%", stopColor: theme.textSecondary }),
|
|
884
|
+
/* @__PURE__ */ jsx11(Stop2, { offset: "100%", stopColor: theme.textPrimary })
|
|
795
885
|
] }),
|
|
796
886
|
blue
|
|
797
887
|
] }),
|
|
798
|
-
size >= 48 ? /* @__PURE__ */
|
|
799
|
-
/* @__PURE__ */
|
|
800
|
-
/* @__PURE__ */
|
|
888
|
+
size >= 48 ? /* @__PURE__ */ jsx11(Circle, { cx: 200, cy: 200, r: 190, fill: `url(#${id}g)` }) : null,
|
|
889
|
+
/* @__PURE__ */ jsx11(Circle, { cx: 200, cy: 200, r: KRIZAKA.ring.r, stroke, strokeWidth: KRIZAKA.ring.width, opacity: 0.35, fill: "none" }),
|
|
890
|
+
/* @__PURE__ */ jsx11(Group, { transform: `translate(${KRIZAKA.offset} ${KRIZAKA.offset})`, children: /* @__PURE__ */ jsx11(Path, { d: KRIZAKA.shield, stroke: `url(#${id}i)`, strokeWidth: KRIZAKA.stroke, strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }) })
|
|
801
891
|
] }),
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
805
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ jsx11(Animated14.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsx11(Svg2, { viewBox, style: layer, children: /* @__PURE__ */ jsx11(Circle, { cx: 200, cy: 200, r: KRIZAKA.orbit.r, stroke, strokeWidth: KRIZAKA.orbit.width, strokeDasharray: KRIZAKA.orbit.dash, opacity: 0.6, fill: "none" }) }) }),
|
|
893
|
+
/* @__PURE__ */ jsx11(Animated14.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs8(Svg2, { viewBox, style: layer, children: [
|
|
894
|
+
/* @__PURE__ */ jsx11(Defs2, { children: blue }),
|
|
895
|
+
/* @__PURE__ */ jsxs8(Group, { transform: `translate(${KRIZAKA.offset} ${KRIZAKA.offset})`, children: [
|
|
806
896
|
dot(KRIZAKA.node),
|
|
807
897
|
dot(KRIZAKA.core)
|
|
808
898
|
] })
|
|
@@ -810,9 +900,13 @@ function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
|
810
900
|
] });
|
|
811
901
|
}
|
|
812
902
|
|
|
903
|
+
// src/native/mascot-state.tsx
|
|
904
|
+
import * as React9 from "react";
|
|
905
|
+
import { AccessibilityInfo as AccessibilityInfo5, Animated as Animated7, Easing as Easing4, StyleSheet as StyleSheet10, View as View9 } from "react-native";
|
|
906
|
+
|
|
813
907
|
// src/native/mascots.tsx
|
|
814
|
-
import { useEffect as
|
|
815
|
-
import { AccessibilityInfo as
|
|
908
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
909
|
+
import { AccessibilityInfo as AccessibilityInfo4, Animated as Animated6, Easing as Easing3, View as View8 } from "react-native";
|
|
816
910
|
import Svg3, { Circle as Circle2, Defs as Defs3, Ellipse, G, LinearGradient as LinearGradient3, Path as Path2, Rect as Rect2, Stop as Stop3 } from "react-native-svg";
|
|
817
911
|
|
|
818
912
|
// src/mascots/geometry.ts
|
|
@@ -895,6 +989,25 @@ var BIRDS = {
|
|
|
895
989
|
beak: "M55 41 L65 41 L60 50 Z",
|
|
896
990
|
eyes: { at: [[52, 33], [68, 33]], white: 5, pupil: 2.4 },
|
|
897
991
|
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"]
|
|
992
|
+
},
|
|
993
|
+
/**
|
|
994
|
+
* The lovebird — the inseparable that introduces two people. A plump little parrot: a short tail, a round head
|
|
995
|
+
* with its coloured face (the detail colour), the white eye-rings of the species and a short hooked beak.
|
|
996
|
+
*/
|
|
997
|
+
lovebird: {
|
|
998
|
+
shadow: [60, 110, 23, 3.5],
|
|
999
|
+
legs: ["M53 96 L52 106 M48 106 L56 106", "M67 96 L68 106 M64 106 L72 106"],
|
|
1000
|
+
back: ["M74 90 C82 98 88 104 95 103 C91 98 86 91 82 84 Z"],
|
|
1001
|
+
body: "M32 66 C32 46 88 46 88 66 C88 90 76 100 60 100 C44 100 32 90 32 66 Z",
|
|
1002
|
+
belly: "M42 70 C42 59 78 59 78 70 C78 85 70 92 60 92 C50 92 42 85 42 70 Z",
|
|
1003
|
+
wings: [
|
|
1004
|
+
{ d: "M33 60 C20 68 22 88 40 90 C35 80 34 70 33 60 Z", pivot: [33, 60] },
|
|
1005
|
+
{ d: mirror("M33 60 C20 68 22 88 40 90 C35 80 34 70 33 60 Z"), pivot: [87, 60] }
|
|
1006
|
+
],
|
|
1007
|
+
head: { cx: 60, cy: 38, r: 21 },
|
|
1008
|
+
details: ["M43 40 C42 28 51 22 60 22 C69 22 78 28 77 40 C76 50 68 55 60 55 C52 55 44 50 43 40 Z"],
|
|
1009
|
+
beak: "M55 44 C55 40 65 40 65 44 C65 50 62 54 60 55 C58 54 55 50 55 44 Z",
|
|
1010
|
+
eyes: { at: [[51, 36], [69, 36]], white: 4.6, pupil: 2.4 }
|
|
898
1011
|
}
|
|
899
1012
|
};
|
|
900
1013
|
var MOOD_PARTS = {
|
|
@@ -922,24 +1035,25 @@ var OWN_PALETTES = {
|
|
|
922
1035
|
owl: { from: "#a78bfa", to: "#6d28d9", wing: "#7c3aed", detail: "#5b21b6", beak: "#fbbf24", eye: "#1f2937" },
|
|
923
1036
|
duck: { from: "#f43f5e", to: "#be123c", wing: "#db2777", detail: "#9f1239", beak: "#fbbf24", eye: "#1f2937" },
|
|
924
1037
|
flamingo: { from: "#f9a8d4", to: "#db2777", wing: "#ec4899", detail: "#be185d", beak: "#fbbf24", eye: "#1f2937" },
|
|
925
|
-
pigeon: { from: "#22d3ee", to: "#6366f1", wing: "#a855f7", detail: "#4338ca", beak: "#f59e0b", eye: "#1f2937" }
|
|
1038
|
+
pigeon: { from: "#22d3ee", to: "#6366f1", wing: "#a855f7", detail: "#4338ca", beak: "#f59e0b", eye: "#1f2937" },
|
|
1039
|
+
lovebird: { from: "#6ee7b7", to: "#059669", wing: "#047857", detail: "#fb7185", beak: "#f97316", eye: "#1f2937" }
|
|
926
1040
|
};
|
|
927
1041
|
var LIGHT = "#ffffff";
|
|
928
1042
|
var SHADE = "#000000";
|
|
929
1043
|
var PARCEL = ["#f59e0b", "#d97706", "#b45309"];
|
|
930
1044
|
|
|
931
1045
|
// src/native/mascots.tsx
|
|
932
|
-
import { jsx as
|
|
1046
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
933
1047
|
function useBob(animated) {
|
|
934
|
-
const [y] =
|
|
935
|
-
|
|
1048
|
+
const [y] = useState8(() => new Animated6.Value(0));
|
|
1049
|
+
useEffect6(() => {
|
|
936
1050
|
if (!animated) return;
|
|
937
1051
|
let loop;
|
|
938
1052
|
let cancelled = false;
|
|
939
|
-
void
|
|
1053
|
+
void AccessibilityInfo4.isReduceMotionEnabled().then((reduce) => {
|
|
940
1054
|
if (reduce || cancelled) return;
|
|
941
|
-
const step = (toValue) =>
|
|
942
|
-
loop =
|
|
1055
|
+
const step = (toValue) => Animated6.timing(y, { toValue, duration: 1800, easing: Easing3.inOut(Easing3.ease), useNativeDriver: true });
|
|
1056
|
+
loop = Animated6.loop(Animated6.sequence([step(-2.5), step(0)]));
|
|
943
1057
|
loop.start();
|
|
944
1058
|
});
|
|
945
1059
|
return () => {
|
|
@@ -963,52 +1077,107 @@ function Mascot({ bird = "owl", mood = "welcome", tone: tone2 = "brand", size =
|
|
|
963
1077
|
const look3 = mood === "thinking" ? 1.4 : 0;
|
|
964
1078
|
const rot = (deg, [x, y]) => `rotate(${deg} ${x} ${y})`;
|
|
965
1079
|
const [wl, wr] = g.wings;
|
|
966
|
-
return /* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
968
|
-
/* @__PURE__ */
|
|
969
|
-
/* @__PURE__ */
|
|
1080
|
+
return /* @__PURE__ */ jsx12(View8, { style: [{ width: size, height: size }, style], ...markA11y(title), children: /* @__PURE__ */ jsx12(Animated6.View, { style: { transform: [{ translateY: bob }] }, children: /* @__PURE__ */ jsxs9(Svg3, { width: size, height: size, viewBox: "0 0 120 120", children: [
|
|
1081
|
+
/* @__PURE__ */ jsx12(Defs3, { children: /* @__PURE__ */ jsxs9(LinearGradient3, { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1082
|
+
/* @__PURE__ */ jsx12(Stop3, { offset: "0%", stopColor: p.from }),
|
|
1083
|
+
/* @__PURE__ */ jsx12(Stop3, { offset: "100%", stopColor: p.to })
|
|
970
1084
|
] }) }),
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
mood === "empty" && /* @__PURE__ */
|
|
973
|
-
g.legs.map((d) => /* @__PURE__ */
|
|
974
|
-
g.back?.map((d) => d.endsWith("Z") ? /* @__PURE__ */
|
|
975
|
-
g.parcel?.map((d, i) => /* @__PURE__ */
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ jsx12(Ellipse, { cx: g.shadow[0], cy: g.shadow[1], rx: g.shadow[2], ry: g.shadow[3], fill: SHADE, opacity: 0.14 }),
|
|
1086
|
+
mood === "empty" && /* @__PURE__ */ jsx12(Path2, { d: MOOD_PARTS.tray, stroke: outline, strokeWidth: 1.6, strokeDasharray: "3 3", fill: "none" }),
|
|
1087
|
+
g.legs.map((d) => /* @__PURE__ */ jsx12(Path2, { d, stroke: p.beak, strokeWidth: 2.6, strokeLinecap: "round", fill: "none" }, d)),
|
|
1088
|
+
g.back?.map((d) => d.endsWith("Z") ? /* @__PURE__ */ jsx12(Path2, { d, fill: p.detail, ...line }, d) : /* @__PURE__ */ jsx12(Path2, { d, stroke: outline, strokeWidth: 1.4, fill: "none" }, d)),
|
|
1089
|
+
g.parcel?.map((d, i) => /* @__PURE__ */ jsx12(Path2, { d, fill: PARCEL[i], ...line }, d)),
|
|
1090
|
+
/* @__PURE__ */ jsx12(Path2, { d: g.body, fill: body, ...line }),
|
|
1091
|
+
/* @__PURE__ */ jsx12(Path2, { d: g.belly, fill: LIGHT, opacity: 0.28 }),
|
|
978
1092
|
[wl, wr].map((w, i) => {
|
|
979
1093
|
const turn = mood === "success" ? i === 0 ? 28 : -28 : mood === "welcome" && i === 1 ? -20 : 0;
|
|
980
|
-
return /* @__PURE__ */
|
|
981
|
-
/* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ jsxs9(G, { transform: turn ? rot(turn, w.pivot) : void 0, children: [
|
|
1095
|
+
/* @__PURE__ */ jsx12(Path2, { d: w.d, fill: p.wing, ...line }),
|
|
1096
|
+
/* @__PURE__ */ jsx12(Path2, { d: w.d, fill: SHADE, opacity: 0.16 })
|
|
983
1097
|
] }, i);
|
|
984
1098
|
}),
|
|
985
|
-
g.neck && /* @__PURE__ */
|
|
986
|
-
g.head.r > 0 && /* @__PURE__ */
|
|
987
|
-
g.details.map((d) => /* @__PURE__ */
|
|
988
|
-
g.visor && /* @__PURE__ */
|
|
1099
|
+
g.neck && /* @__PURE__ */ jsx12(Path2, { d: g.neck.d, stroke: body, strokeWidth: g.neck.width, strokeLinecap: "round", fill: "none" }),
|
|
1100
|
+
g.head.r > 0 && /* @__PURE__ */ jsx12(Circle2, { cx: g.head.cx, cy: g.head.cy, r: g.head.r, fill: body, ...line }),
|
|
1101
|
+
g.details.map((d) => /* @__PURE__ */ jsx12(Path2, { d, fill: p.detail, ...line }, d)),
|
|
1102
|
+
g.visor && /* @__PURE__ */ jsx12(Rect2, { x: g.visor.x, y: g.visor.y, width: g.visor.w, height: g.visor.h, rx: 4, fill: theme.surface0, ...line }),
|
|
989
1103
|
g.eyes.at.map(
|
|
990
|
-
(at, i) => mood === "empty" && g.eyes.white > 0 ? /* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */
|
|
994
|
-
] }, i) : mood === "success" || mood === "empty" ? /* @__PURE__ */
|
|
995
|
-
g.eyes.white > 0 && /* @__PURE__ */
|
|
996
|
-
/* @__PURE__ */
|
|
1104
|
+
(at, i) => mood === "empty" && g.eyes.white > 0 ? /* @__PURE__ */ jsxs9(G, { children: [
|
|
1105
|
+
/* @__PURE__ */ jsx12(Circle2, { cx: at[0], cy: at[1], r: g.eyes.white, fill: LIGHT, ...line }),
|
|
1106
|
+
/* @__PURE__ */ jsx12(Circle2, { cx: at[0], cy: at[1] + g.eyes.pupil * 0.7, r: g.eyes.pupil, fill: SHADE }),
|
|
1107
|
+
/* @__PURE__ */ jsx12(Path2, { d: upperLid(at, g.eyes.white), fill: p.detail, ...line })
|
|
1108
|
+
] }, i) : mood === "success" || mood === "empty" ? /* @__PURE__ */ jsx12(Path2, { d: mood === "success" ? archEye(at, eyeR * 0.85) : lidEye(at, eyeR * 0.8), stroke: g.visor ? p.eye : outline, strokeWidth: 2.2, strokeLinecap: "round", fill: "none" }, i) : /* @__PURE__ */ jsxs9(G, { children: [
|
|
1109
|
+
g.eyes.white > 0 && /* @__PURE__ */ jsx12(Circle2, { cx: at[0], cy: at[1], r: g.eyes.white, fill: LIGHT, ...line }),
|
|
1110
|
+
/* @__PURE__ */ jsx12(Circle2, { cx: at[0] + look3, cy: at[1] - look3, r: g.eyes.pupil, fill: g.visor ? p.eye : SHADE })
|
|
997
1111
|
] }, i)
|
|
998
1112
|
),
|
|
999
|
-
g.glasses && g.eyes.at.map(([x, y]) => /* @__PURE__ */
|
|
1000
|
-
mood === "error" && g.eyes.at.map((at, i) => /* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
mood === "thinking" && MOOD_PARTS.dots.map(([cx, cy, r], i) => /* @__PURE__ */
|
|
1003
|
-
(mood === "success" || mood === "error") && /* @__PURE__ */
|
|
1004
|
-
mood === "success" && /* @__PURE__ */
|
|
1005
|
-
mood === "error" && /* @__PURE__ */
|
|
1006
|
-
mood === "error" && /* @__PURE__ */
|
|
1113
|
+
g.glasses && g.eyes.at.map(([x, y]) => /* @__PURE__ */ jsx12(Circle2, { cx: x, cy: y, r: 6.5, fill: "none", stroke: outline, strokeWidth: 1.3 }, x)),
|
|
1114
|
+
mood === "error" && g.eyes.at.map((at, i) => /* @__PURE__ */ jsx12(Path2, { d: brow(at, eyeR, g.eyes.at.length === 1 ? 1 : i === 0 ? -1 : 1), stroke: outline, strokeWidth: 2, strokeLinecap: "round" }, i)),
|
|
1115
|
+
/* @__PURE__ */ jsx12(Path2, { d: g.beak, fill: p.beak, ...line }),
|
|
1116
|
+
mood === "thinking" && MOOD_PARTS.dots.map(([cx, cy, r], i) => /* @__PURE__ */ jsx12(Circle2, { cx, cy, r, fill: theme.textSecondary, opacity: 0.5 + i * 0.25 }, cx)),
|
|
1117
|
+
(mood === "success" || mood === "error") && /* @__PURE__ */ jsx12(Circle2, { cx: MOOD_PARTS.badge.cx, cy: MOOD_PARTS.badge.cy, r: MOOD_PARTS.badge.r, fill: mood === "success" ? theme.success : theme.danger }),
|
|
1118
|
+
mood === "success" && /* @__PURE__ */ jsx12(Path2, { d: MOOD_PARTS.check, stroke: theme.surface0, strokeWidth: 2.6, strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }),
|
|
1119
|
+
mood === "error" && /* @__PURE__ */ jsx12(Path2, { d: MOOD_PARTS.bang.line, stroke: theme.surface0, strokeWidth: 2.8, strokeLinecap: "round" }),
|
|
1120
|
+
mood === "error" && /* @__PURE__ */ jsx12(Circle2, { cx: MOOD_PARTS.bang.dot[0], cy: MOOD_PARTS.bang.dot[1], r: 1.6, fill: theme.surface0 })
|
|
1007
1121
|
] }) }) });
|
|
1008
1122
|
}
|
|
1009
1123
|
|
|
1124
|
+
// src/native/mascot-state.tsx
|
|
1125
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1126
|
+
var SIZE = { sm: 64, md: 96, lg: 128 };
|
|
1127
|
+
function useArrival(animated) {
|
|
1128
|
+
const [value] = React9.useState(() => new Animated7.Value(animated ? 0 : 1));
|
|
1129
|
+
React9.useEffect(() => {
|
|
1130
|
+
if (!animated) return;
|
|
1131
|
+
let cancelled = false;
|
|
1132
|
+
void AccessibilityInfo5.isReduceMotionEnabled().then((reduce) => {
|
|
1133
|
+
if (cancelled) return;
|
|
1134
|
+
if (reduce) value.setValue(1);
|
|
1135
|
+
else Animated7.timing(value, { toValue: 1, duration: 420, easing: Easing4.out(Easing4.cubic), useNativeDriver: true }).start();
|
|
1136
|
+
});
|
|
1137
|
+
return () => {
|
|
1138
|
+
cancelled = true;
|
|
1139
|
+
};
|
|
1140
|
+
}, [animated, value]);
|
|
1141
|
+
return value;
|
|
1142
|
+
}
|
|
1143
|
+
function MascotState({ bird = "owl", mood = "empty", title, description, action, size = "md", layout = "stacked", tone: tone2, animated = true, style, ...props }) {
|
|
1144
|
+
const opacity = useArrival(animated);
|
|
1145
|
+
const inline = layout === "inline";
|
|
1146
|
+
return /* @__PURE__ */ jsxs10(
|
|
1147
|
+
Animated7.View,
|
|
1148
|
+
{
|
|
1149
|
+
role: mood === "error" ? "alert" : "status",
|
|
1150
|
+
accessibilityLiveRegion: mood === "error" ? "assertive" : "polite",
|
|
1151
|
+
"aria-busy": mood === "thinking" ? true : void 0,
|
|
1152
|
+
...props,
|
|
1153
|
+
style: [inline ? styles10.inline : styles10.stacked, { opacity, transform: [{ translateY: opacity.interpolate({ inputRange: [0, 1], outputRange: [6, 0] }) }] }, style],
|
|
1154
|
+
children: [
|
|
1155
|
+
/* @__PURE__ */ jsx13(Mascot, { bird, mood, tone: tone2, size: SIZE[size], animated }),
|
|
1156
|
+
/* @__PURE__ */ jsxs10(View9, { style: inline ? styles10.wordsInline : styles10.words, children: [
|
|
1157
|
+
/* @__PURE__ */ jsx13(Txt, { variant: "label", role: "heading", style: inline ? null : styles10.center, children: title }),
|
|
1158
|
+
description ? /* @__PURE__ */ jsx13(Txt, { tone: "secondary", style: inline ? null : styles10.center, children: description }) : null,
|
|
1159
|
+
action ? /* @__PURE__ */ jsx13(View9, { style: [styles10.action, inline ? null : styles10.actionCentred], children: action }) : null
|
|
1160
|
+
] })
|
|
1161
|
+
]
|
|
1162
|
+
}
|
|
1163
|
+
);
|
|
1164
|
+
}
|
|
1165
|
+
var ErrorState = (props) => /* @__PURE__ */ jsx13(MascotState, { mood: "error", ...props });
|
|
1166
|
+
var SuccessState = (props) => /* @__PURE__ */ jsx13(MascotState, { mood: "success", ...props });
|
|
1167
|
+
var LoadingState = (props) => /* @__PURE__ */ jsx13(MascotState, { mood: "thinking", ...props });
|
|
1168
|
+
var WelcomeState = (props) => /* @__PURE__ */ jsx13(MascotState, { mood: "welcome", ...props });
|
|
1169
|
+
var styles10 = StyleSheet10.create({
|
|
1170
|
+
stacked: { alignItems: "center", justifyContent: "center", gap: 12, paddingVertical: 40, paddingHorizontal: 24 },
|
|
1171
|
+
inline: { flexDirection: "row", alignItems: "center", gap: 16 },
|
|
1172
|
+
words: { alignItems: "center", gap: 6 },
|
|
1173
|
+
wordsInline: { flex: 1, gap: 4 },
|
|
1174
|
+
center: { textAlign: "center", maxWidth: 360 },
|
|
1175
|
+
action: { marginTop: 8, flexDirection: "row", flexWrap: "wrap", gap: 8 },
|
|
1176
|
+
actionCentred: { justifyContent: "center" }
|
|
1177
|
+
});
|
|
1178
|
+
|
|
1010
1179
|
// src/native/OrazakaMark.tsx
|
|
1011
|
-
import { View as
|
|
1180
|
+
import { View as View10 } from "react-native";
|
|
1012
1181
|
import Svg4, { Circle as Circle3, Defs as Defs4, LinearGradient as LinearGradient4, Path as Path3, RadialGradient as RadialGradient2, Stop as Stop4 } from "react-native-svg";
|
|
1013
1182
|
|
|
1014
1183
|
// src/marks/orazaka-geometry.ts
|
|
@@ -1038,40 +1207,40 @@ var ORAZAKA = {
|
|
|
1038
1207
|
};
|
|
1039
1208
|
|
|
1040
1209
|
// src/native/OrazakaMark.tsx
|
|
1041
|
-
import { jsx as
|
|
1210
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1042
1211
|
function OrazakaMark({ size = 48, animated = true, title, neutral }) {
|
|
1043
1212
|
const { theme } = useTheme();
|
|
1044
|
-
const { Animated:
|
|
1213
|
+
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
1045
1214
|
const id = useSvgId("ozm");
|
|
1046
1215
|
const viewBox = size < 48 ? ORAZAKA.croppedViewBox : ORAZAKA.viewBox;
|
|
1047
1216
|
const stroke = neutral ?? theme.textMuted;
|
|
1048
|
-
const gradient = /* @__PURE__ */
|
|
1217
|
+
const gradient = /* @__PURE__ */ jsx14(LinearGradient4, { id: `${id}a`, gradientUnits: "userSpaceOnUse", x1: ORAZAKA.gradient.x1, y1: ORAZAKA.gradient.y1, x2: ORAZAKA.gradient.x2, y2: ORAZAKA.gradient.y2, children: ORAZAKA.gradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx14(Stop4, { offset, stopColor: color }, offset)) });
|
|
1049
1218
|
const fill = `url(#${id}a)`;
|
|
1050
|
-
return /* @__PURE__ */
|
|
1051
|
-
/* @__PURE__ */
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
/* @__PURE__ */
|
|
1054
|
-
/* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ jsxs11(View10, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
1220
|
+
/* @__PURE__ */ jsxs11(Svg4, { viewBox, style: layer, children: [
|
|
1221
|
+
/* @__PURE__ */ jsx14(Defs4, { children: /* @__PURE__ */ jsxs11(RadialGradient2, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1222
|
+
/* @__PURE__ */ jsx14(Stop4, { offset: "0%", stopColor: ORAZAKA.glow.color, stopOpacity: ORAZAKA.glow.opacity }),
|
|
1223
|
+
/* @__PURE__ */ jsx14(Stop4, { offset: "100%", stopColor: ORAZAKA.glow.color, stopOpacity: 0 })
|
|
1055
1224
|
] }) }),
|
|
1056
|
-
size >= 48 ? /* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1225
|
+
size >= 48 ? /* @__PURE__ */ jsx14(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
1226
|
+
/* @__PURE__ */ jsx14(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.orbit.r, stroke, strokeWidth: ORAZAKA.orbit.width, strokeDasharray: ORAZAKA.orbit.dash, opacity: 0.6, fill: "none" }),
|
|
1227
|
+
/* @__PURE__ */ jsx14(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.ring.r, stroke, strokeWidth: ORAZAKA.ring.width, opacity: 0.35, fill: "none" })
|
|
1059
1228
|
] }),
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
ORAZAKA.shards.map((d) => /* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ jsx14(Animated14.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs11(Svg4, { viewBox, style: layer, children: [
|
|
1230
|
+
/* @__PURE__ */ jsx14(Defs4, { children: gradient }),
|
|
1231
|
+
ORAZAKA.shards.map((d) => /* @__PURE__ */ jsx14(Path3, { d, fill, stroke: fill, strokeWidth: ORAZAKA.shardStroke, strokeLinejoin: "round" }, d))
|
|
1063
1232
|
] }) }),
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ jsx14(Animated14.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs11(Svg4, { viewBox, style: layer, children: [
|
|
1234
|
+
/* @__PURE__ */ jsx14(Defs4, { children: gradient }),
|
|
1235
|
+
/* @__PURE__ */ jsx14(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.core.r, fill }),
|
|
1236
|
+
/* @__PURE__ */ jsx14(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.core.inner, fill: ORAZAKA.highlight })
|
|
1068
1237
|
] }) })
|
|
1069
1238
|
] });
|
|
1070
1239
|
}
|
|
1071
1240
|
|
|
1072
1241
|
// src/native/OrochiaMark.tsx
|
|
1073
|
-
import { useEffect as
|
|
1074
|
-
import { AccessibilityInfo as
|
|
1242
|
+
import { useEffect as useEffect8, useState as useState10 } from "react";
|
|
1243
|
+
import { AccessibilityInfo as AccessibilityInfo6, Animated as Animated8, Easing as Easing5, View as View11 } from "react-native";
|
|
1075
1244
|
import Svg5, { Circle as Circle4, Defs as Defs5, Ellipse as Ellipse2, G as Group2, LinearGradient as LinearGradient5, Path as Path4, RadialGradient as RadialGradient3, Stop as Stop5 } from "react-native-svg";
|
|
1076
1245
|
|
|
1077
1246
|
// src/marks/orochia-geometry.ts
|
|
@@ -1099,25 +1268,25 @@ var OROCHIA = {
|
|
|
1099
1268
|
};
|
|
1100
1269
|
|
|
1101
1270
|
// src/native/OrochiaMark.tsx
|
|
1102
|
-
import { jsx as
|
|
1271
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1103
1272
|
var CENTER = OROCHIA.offset + 180;
|
|
1104
1273
|
function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }) {
|
|
1105
1274
|
const { theme } = useTheme();
|
|
1106
1275
|
const neutral = neutralProp ?? theme.textMuted;
|
|
1107
|
-
const [spin] =
|
|
1108
|
-
const [pulse] =
|
|
1109
|
-
|
|
1276
|
+
const [spin] = useState10(() => new Animated8.Value(0));
|
|
1277
|
+
const [pulse] = useState10(() => new Animated8.Value(0));
|
|
1278
|
+
useEffect8(() => {
|
|
1110
1279
|
if (!animated) return;
|
|
1111
1280
|
let loops = [];
|
|
1112
1281
|
let cancelled = false;
|
|
1113
|
-
void
|
|
1282
|
+
void AccessibilityInfo6.isReduceMotionEnabled().then((reduce) => {
|
|
1114
1283
|
if (reduce || cancelled) return;
|
|
1115
1284
|
loops = [
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1285
|
+
Animated8.loop(Animated8.timing(spin, { toValue: 1, duration: 3e4, easing: Easing5.linear, useNativeDriver: true })),
|
|
1286
|
+
Animated8.loop(
|
|
1287
|
+
Animated8.sequence([
|
|
1288
|
+
Animated8.timing(pulse, { toValue: 1, duration: 1600, easing: Easing5.inOut(Easing5.ease), useNativeDriver: true }),
|
|
1289
|
+
Animated8.timing(pulse, { toValue: 0, duration: 1600, easing: Easing5.inOut(Easing5.ease), useNativeDriver: true })
|
|
1121
1290
|
])
|
|
1122
1291
|
)
|
|
1123
1292
|
];
|
|
@@ -1131,44 +1300,44 @@ function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }
|
|
|
1131
1300
|
const viewBox = size < 48 ? OROCHIA.croppedViewBox : OROCHIA.viewBox;
|
|
1132
1301
|
const layer = { position: "absolute", width: size, height: size };
|
|
1133
1302
|
const a11y = title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
1134
|
-
const bodyGradient = /* @__PURE__ */
|
|
1135
|
-
return /* @__PURE__ */
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1303
|
+
const bodyGradient = /* @__PURE__ */ jsx15(LinearGradient5, { id: "body", gradientUnits: "userSpaceOnUse", x1: OROCHIA.body.x1 + OROCHIA.offset, y1: OROCHIA.body.y1 + OROCHIA.offset, x2: OROCHIA.body.x2 + OROCHIA.offset, y2: OROCHIA.body.y2 + OROCHIA.offset, children: OROCHIA.body.stops.map(([offset, color]) => /* @__PURE__ */ jsx15(Stop5, { offset, stopColor: color }, offset)) });
|
|
1304
|
+
return /* @__PURE__ */ jsxs12(View11, { style: { width: size, height: size }, ...a11y, children: [
|
|
1305
|
+
/* @__PURE__ */ jsxs12(Svg5, { viewBox, style: layer, children: [
|
|
1306
|
+
/* @__PURE__ */ jsx15(Defs5, { children: /* @__PURE__ */ jsxs12(RadialGradient3, { id: "glow", cx: "50%", cy: "50%", r: "50%", children: [
|
|
1307
|
+
/* @__PURE__ */ jsx15(Stop5, { offset: "0%", stopColor: OROCHIA.glow.color, stopOpacity: OROCHIA.glow.opacity }),
|
|
1308
|
+
/* @__PURE__ */ jsx15(Stop5, { offset: "100%", stopColor: OROCHIA.glow.color, stopOpacity: 0 })
|
|
1140
1309
|
] }) }),
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ jsx15(Circle4, { cx: CENTER, cy: CENTER, r: 170, fill: "url(#glow)" }),
|
|
1311
|
+
/* @__PURE__ */ jsx15(Circle4, { cx: CENTER, cy: CENTER, r: OROCHIA.ring.r, stroke: neutral, strokeWidth: OROCHIA.ring.width, opacity: 0.35, fill: "none" })
|
|
1143
1312
|
] }),
|
|
1144
|
-
/* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1313
|
+
/* @__PURE__ */ jsx15(Animated8.View, { style: [layer, { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] }], children: /* @__PURE__ */ jsx15(Svg5, { viewBox, style: layer, children: /* @__PURE__ */ jsx15(Circle4, { cx: CENTER, cy: CENTER, r: OROCHIA.orbit.r, stroke: neutral, strokeWidth: OROCHIA.orbit.width, strokeDasharray: OROCHIA.orbit.dash, opacity: 0.6, fill: "none" }) }) }),
|
|
1314
|
+
/* @__PURE__ */ jsxs12(Svg5, { viewBox, style: layer, children: [
|
|
1315
|
+
/* @__PURE__ */ jsx15(Defs5, { children: bodyGradient }),
|
|
1316
|
+
/* @__PURE__ */ jsxs12(Group2, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
1317
|
+
/* @__PURE__ */ jsx15(Path4, { d: OROCHIA.arc, stroke: "url(#body)", strokeWidth: 22, strokeLinecap: "round", fill: "none" }),
|
|
1318
|
+
/* @__PURE__ */ jsx15(Path4, { d: OROCHIA.arc, stroke: OROCHIA.scales.color, strokeOpacity: OROCHIA.scales.opacity, strokeWidth: OROCHIA.scales.width, strokeLinecap: "round", strokeDasharray: OROCHIA.scales.dash, fill: "none" }),
|
|
1319
|
+
/* @__PURE__ */ jsx15(Path4, { d: OROCHIA.neck, stroke: "url(#body)", strokeWidth: 14, strokeLinecap: "round", fill: "none" }),
|
|
1320
|
+
/* @__PURE__ */ jsx15(Path4, { d: OROCHIA.tail, stroke: "url(#body)", strokeWidth: 6, strokeLinecap: "round", fill: "none" }),
|
|
1321
|
+
/* @__PURE__ */ jsx15(Ellipse2, { cx: OROCHIA.head.cx, cy: OROCHIA.head.cy, rx: OROCHIA.head.rx, ry: OROCHIA.head.ry, rotation: OROCHIA.head.rotate, origin: `${OROCHIA.head.cx}, ${OROCHIA.head.cy}`, fill: "url(#body)" }),
|
|
1322
|
+
/* @__PURE__ */ jsx15(Path4, { d: OROCHIA.tongue.d, stroke: OROCHIA.tongue.color, strokeWidth: 3, strokeLinecap: "round", fill: "none" })
|
|
1154
1323
|
] })
|
|
1155
1324
|
] }),
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ jsx15(Animated8.View, { style: [layer, { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }], children: /* @__PURE__ */ jsxs12(Svg5, { viewBox, style: layer, children: [
|
|
1326
|
+
/* @__PURE__ */ jsx15(Defs5, { children: /* @__PURE__ */ jsx15(LinearGradient5, { id: "flame", x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: OROCHIA.flameGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx15(Stop5, { offset, stopColor: color }, offset)) }) }),
|
|
1327
|
+
/* @__PURE__ */ jsxs12(Group2, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
1328
|
+
/* @__PURE__ */ jsx15(Circle4, { cx: OROCHIA.eye.cx, cy: OROCHIA.eye.cy, r: OROCHIA.eye.r, fill: OROCHIA.eye.color }),
|
|
1329
|
+
/* @__PURE__ */ jsx15(Path4, { d: OROCHIA.flame.d, transform: `translate(${OROCHIA.flame.translate[0]} ${OROCHIA.flame.translate[1]}) scale(${OROCHIA.flame.scale})`, fill: "url(#flame)" })
|
|
1161
1330
|
] })
|
|
1162
1331
|
] }) })
|
|
1163
1332
|
] });
|
|
1164
1333
|
}
|
|
1165
1334
|
|
|
1166
1335
|
// src/native/pagination.tsx
|
|
1167
|
-
import { Pressable as Pressable4, StyleSheet as
|
|
1336
|
+
import { Pressable as Pressable4, StyleSheet as StyleSheet11, Text as Text6, View as View12 } from "react-native";
|
|
1168
1337
|
import Svg6, { Path as Path5 } from "react-native-svg";
|
|
1169
|
-
import { jsx as
|
|
1338
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1170
1339
|
function Chevron({ direction, color }) {
|
|
1171
|
-
return /* @__PURE__ */
|
|
1340
|
+
return /* @__PURE__ */ jsx16(Svg6, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx16(Path5, { d: direction === "left" ? "m15 6-6 6 6 6" : "m9 6 6 6-6 6" }) });
|
|
1172
1341
|
}
|
|
1173
1342
|
function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, onPrevious, onNext, status, disabled, labels, style }) {
|
|
1174
1343
|
const { theme, radius: radius3 } = useTheme();
|
|
@@ -1177,7 +1346,7 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
1177
1346
|
const current = Math.min(Math.max(1, page), count);
|
|
1178
1347
|
const canPrevious = !disabled && (paged ? current > 1 : Boolean(hasPrevious));
|
|
1179
1348
|
const canNext = !disabled && (paged ? current < count : Boolean(hasNext));
|
|
1180
|
-
const button = (direction, enabled, onPress, label) => /* @__PURE__ */
|
|
1349
|
+
const button = (direction, enabled, onPress, label) => /* @__PURE__ */ jsx16(
|
|
1181
1350
|
Pressable4,
|
|
1182
1351
|
{
|
|
1183
1352
|
role: "button",
|
|
@@ -1187,39 +1356,263 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
1187
1356
|
hitSlop: 6,
|
|
1188
1357
|
onPress,
|
|
1189
1358
|
style: ({ pressed }) => [
|
|
1190
|
-
|
|
1359
|
+
styles11.button,
|
|
1191
1360
|
{ borderRadius: radius3.sm, borderColor: theme.borderDefault, backgroundColor: theme.surface1, opacity: enabled ? pressed ? 0.8 : 1 : 0.4 }
|
|
1192
1361
|
],
|
|
1193
|
-
children: /* @__PURE__ */
|
|
1362
|
+
children: /* @__PURE__ */ jsx16(Chevron, { direction, color: theme.textPrimary })
|
|
1194
1363
|
}
|
|
1195
1364
|
);
|
|
1196
1365
|
const text = status ?? (paged ? labels.compact(current, count) : null);
|
|
1197
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ jsxs13(View12, { role: "navigation", style: [styles11.row, style], children: [
|
|
1198
1367
|
button("left", canPrevious, paged ? () => onPageChange?.(current - 1) : onPrevious, labels.previous),
|
|
1199
|
-
text ? /* @__PURE__ */
|
|
1368
|
+
text ? /* @__PURE__ */ jsx16(Text6, { "aria-live": "polite", style: [styles11.status, { color: theme.textSecondary }], children: text }) : null,
|
|
1200
1369
|
button("right", canNext, paged ? () => onPageChange?.(current + 1) : onNext, labels.next)
|
|
1201
1370
|
] });
|
|
1202
1371
|
}
|
|
1203
|
-
var
|
|
1372
|
+
var styles11 = StyleSheet11.create({
|
|
1204
1373
|
row: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: 12 },
|
|
1205
|
-
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth:
|
|
1374
|
+
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth: StyleSheet11.hairlineWidth },
|
|
1206
1375
|
status: { fontSize: 13, fontWeight: "600", fontVariant: ["tabular-nums"] }
|
|
1207
1376
|
});
|
|
1208
1377
|
|
|
1378
|
+
// src/native/phoenix.tsx
|
|
1379
|
+
import { useEffect as useEffect9, useState as useState11 } from "react";
|
|
1380
|
+
import { AccessibilityInfo as AccessibilityInfo7, Animated as Animated9, Easing as Easing6, View as View13 } from "react-native";
|
|
1381
|
+
import Svg7, { Circle as Circle5, Defs as Defs6, LinearGradient as LinearGradient6, Path as Path6, RadialGradient as RadialGradient4, Stop as Stop6 } from "react-native-svg";
|
|
1382
|
+
|
|
1383
|
+
// src/mascots/phoenix-geometry.ts
|
|
1384
|
+
var PHOENIX = {
|
|
1385
|
+
wingL: "M56 62 C40 40 22 36 8 40 C22 46 30 56 34 70 C40 64 48 62 56 62 Z",
|
|
1386
|
+
wingR: "M64 62 C80 40 98 36 112 40 C98 46 90 56 86 70 C80 64 72 62 64 62 Z",
|
|
1387
|
+
tailL: "M52 66 C46 82 40 94 30 104 C44 98 52 90 58 78 Z",
|
|
1388
|
+
tailR: "M68 66 C74 82 80 94 90 104 C76 98 68 90 62 78 Z",
|
|
1389
|
+
body: "M60 34 L68 60 L60 82 L52 60 Z",
|
|
1390
|
+
crest: "M60 34 L56 24 M60 34 L64 24"
|
|
1391
|
+
};
|
|
1392
|
+
var PHOENIX_PALETTES = {
|
|
1393
|
+
own: {
|
|
1394
|
+
left: ["#c084fc", "#7c3aed"],
|
|
1395
|
+
right: ["#fde68a", "#f59e0b"],
|
|
1396
|
+
core: ["#fff7ed", "#fb923c"],
|
|
1397
|
+
body: "#1f1530",
|
|
1398
|
+
edge: "#e9d5ff",
|
|
1399
|
+
crest: "#fbbf24"
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
|
|
1403
|
+
// src/native/phoenix.tsx
|
|
1404
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1405
|
+
function useFloat(animated) {
|
|
1406
|
+
const [y] = useState11(() => new Animated9.Value(0));
|
|
1407
|
+
useEffect9(() => {
|
|
1408
|
+
if (!animated) return;
|
|
1409
|
+
let loop;
|
|
1410
|
+
let cancelled = false;
|
|
1411
|
+
void AccessibilityInfo7.isReduceMotionEnabled().then((reduce) => {
|
|
1412
|
+
if (reduce || cancelled) return;
|
|
1413
|
+
const step = (toValue) => Animated9.timing(y, { toValue, duration: 2500, easing: Easing6.inOut(Easing6.ease), useNativeDriver: true });
|
|
1414
|
+
loop = Animated9.loop(Animated9.sequence([step(-6), step(0)]));
|
|
1415
|
+
loop.start();
|
|
1416
|
+
});
|
|
1417
|
+
return () => {
|
|
1418
|
+
cancelled = true;
|
|
1419
|
+
loop?.stop();
|
|
1420
|
+
};
|
|
1421
|
+
}, [animated, y]);
|
|
1422
|
+
return y;
|
|
1423
|
+
}
|
|
1424
|
+
function Phoenix({ tone: tone2 = "own", size = 120, animated = true, title, style }) {
|
|
1425
|
+
const { theme } = useTheme();
|
|
1426
|
+
const id = useSvgId("kzp");
|
|
1427
|
+
const y = useFloat(animated);
|
|
1428
|
+
const p = tone2 === "brand" ? { left: [theme.accent2, theme.accent], right: [theme.accent, theme.accent2], core: ["#ffffff", theme.accent], body: theme.surface3, edge: theme.borderStrong, crest: theme.accent } : PHOENIX_PALETTES.own;
|
|
1429
|
+
return /* @__PURE__ */ jsx17(View13, { style: [{ width: size, height: size }, style], ...markA11y(title), children: /* @__PURE__ */ jsx17(Animated9.View, { style: { transform: [{ translateY: y }] }, children: /* @__PURE__ */ jsxs14(Svg7, { width: size, height: size, viewBox: "0 0 120 120", children: [
|
|
1430
|
+
/* @__PURE__ */ jsxs14(Defs6, { children: [
|
|
1431
|
+
/* @__PURE__ */ jsxs14(LinearGradient6, { id: `${id}l`, x1: "1", y1: "0", x2: "0", y2: "1", children: [
|
|
1432
|
+
/* @__PURE__ */ jsx17(Stop6, { offset: "0%", stopColor: p.left[0] }),
|
|
1433
|
+
/* @__PURE__ */ jsx17(Stop6, { offset: "100%", stopColor: p.left[1] })
|
|
1434
|
+
] }),
|
|
1435
|
+
/* @__PURE__ */ jsxs14(LinearGradient6, { id: `${id}r`, x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
|
1436
|
+
/* @__PURE__ */ jsx17(Stop6, { offset: "0%", stopColor: p.right[0] }),
|
|
1437
|
+
/* @__PURE__ */ jsx17(Stop6, { offset: "100%", stopColor: p.right[1] })
|
|
1438
|
+
] }),
|
|
1439
|
+
/* @__PURE__ */ jsxs14(RadialGradient4, { id: `${id}c`, children: [
|
|
1440
|
+
/* @__PURE__ */ jsx17(Stop6, { offset: "0%", stopColor: p.core[0] }),
|
|
1441
|
+
/* @__PURE__ */ jsx17(Stop6, { offset: "100%", stopColor: p.core[1], stopOpacity: 0 })
|
|
1442
|
+
] })
|
|
1443
|
+
] }),
|
|
1444
|
+
/* @__PURE__ */ jsx17(Path6, { d: PHOENIX.wingL, fill: `url(#${id}l)` }),
|
|
1445
|
+
/* @__PURE__ */ jsx17(Path6, { d: PHOENIX.wingR, fill: `url(#${id}r)` }),
|
|
1446
|
+
/* @__PURE__ */ jsx17(Path6, { d: PHOENIX.tailL, fill: `url(#${id}l)`, opacity: 0.7 }),
|
|
1447
|
+
/* @__PURE__ */ jsx17(Path6, { d: PHOENIX.tailR, fill: `url(#${id}r)`, opacity: 0.7 }),
|
|
1448
|
+
/* @__PURE__ */ jsx17(Path6, { d: PHOENIX.body, fill: p.body, stroke: p.edge, strokeOpacity: 0.5 }),
|
|
1449
|
+
/* @__PURE__ */ jsx17(Circle5, { cx: 60, cy: 58, r: 12, fill: `url(#${id}c)` }),
|
|
1450
|
+
/* @__PURE__ */ jsx17(Circle5, { cx: 60, cy: 58, r: 3.5, fill: "#ffffff" }),
|
|
1451
|
+
/* @__PURE__ */ jsx17(Path6, { d: PHOENIX.crest, stroke: p.crest, strokeWidth: 2, strokeLinecap: "round" })
|
|
1452
|
+
] }) }) });
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
// src/native/YazakiaMark.tsx
|
|
1456
|
+
import React12 from "react";
|
|
1457
|
+
import { View as View14 } from "react-native";
|
|
1458
|
+
import Svg8, { Circle as Circle6, Defs as Defs7, LinearGradient as LinearGradient7, Path as Path7, RadialGradient as RadialGradient5, Stop as Stop7 } from "react-native-svg";
|
|
1459
|
+
|
|
1460
|
+
// src/marks/yazakia-geometry.ts
|
|
1461
|
+
var turquoise = marks.yazakia[marks.yazakia.length - 1][1];
|
|
1462
|
+
var YAZAKIA = {
|
|
1463
|
+
viewBox: "0 0 400 400",
|
|
1464
|
+
croppedViewBox: "80 80 240 240",
|
|
1465
|
+
center: 200,
|
|
1466
|
+
/** The two voices, left then right: each a bubble (cut around the lens) and its tail. */
|
|
1467
|
+
voices: [
|
|
1468
|
+
{ body: "M191.9 109 A80 80 0 1 0 191.9 259 A87 87 0 0 1 191.9 109 Z", tail: "M98 230 Q104 268 88 294 Q122 288 144 262 L130 200 Z" },
|
|
1469
|
+
{ body: "M208.1 109 A80 80 0 1 1 208.1 259 A87 87 0 0 0 208.1 109 Z", tail: "M302 230 Q296 268 312 294 Q278 288 256 262 L270 200 Z" }
|
|
1470
|
+
],
|
|
1471
|
+
/** The left voice, a shade deeper: the depth between the two. */
|
|
1472
|
+
shade: { color: "#000", opacity: 0.22 },
|
|
1473
|
+
/** Where the bubbles overlap: the core, lit from above. */
|
|
1474
|
+
lens: { d: "M200 112.6 A80 80 0 0 1 200 255.4 A80 80 0 0 1 200 112.6 Z", y1: 112.6, y2: 255.4 },
|
|
1475
|
+
gradient: { x1: 110, y1: 300, x2: 290, y2: 100, stops: marks.yazakia },
|
|
1476
|
+
/** The light on the lens: bright at the top, fading down. */
|
|
1477
|
+
highlight: { color: "#f0fdfa", from: 0.75, to: 0.2 },
|
|
1478
|
+
/** The pair: two nodes on the orbit, opposite each other, that turn with it. */
|
|
1479
|
+
pair: { r: 8, at: [[40, 200], [360, 200]] },
|
|
1480
|
+
glow: { color: turquoise, opacity: 0.16 },
|
|
1481
|
+
/** The core's breathing shadow (web), in the mark's turquoise. */
|
|
1482
|
+
pulse: { color: turquoise, low: 0.3, high: 0.6 },
|
|
1483
|
+
orbit: { r: 160, dash: "8 8", width: 1.5 },
|
|
1484
|
+
ring: { r: 134, width: 1 }
|
|
1485
|
+
};
|
|
1486
|
+
|
|
1487
|
+
// src/native/YazakiaMark.tsx
|
|
1488
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1489
|
+
function YazakiaMark({ size = 48, animated = true, title, neutral }) {
|
|
1490
|
+
const { theme } = useTheme();
|
|
1491
|
+
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
1492
|
+
const id = useSvgId("yzm");
|
|
1493
|
+
const viewBox = size < 48 ? YAZAKIA.croppedViewBox : YAZAKIA.viewBox;
|
|
1494
|
+
const stroke = neutral ?? theme.textMuted;
|
|
1495
|
+
const gradient = /* @__PURE__ */ jsx18(LinearGradient7, { id: `${id}a`, gradientUnits: "userSpaceOnUse", x1: YAZAKIA.gradient.x1, y1: YAZAKIA.gradient.y1, x2: YAZAKIA.gradient.x2, y2: YAZAKIA.gradient.y2, children: YAZAKIA.gradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx18(Stop7, { offset, stopColor: color }, offset)) });
|
|
1496
|
+
const fill = `url(#${id}a)`;
|
|
1497
|
+
return /* @__PURE__ */ jsxs15(View14, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
1498
|
+
/* @__PURE__ */ jsxs15(Svg8, { viewBox, style: layer, children: [
|
|
1499
|
+
/* @__PURE__ */ jsxs15(Defs7, { children: [
|
|
1500
|
+
/* @__PURE__ */ jsxs15(RadialGradient5, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1501
|
+
/* @__PURE__ */ jsx18(Stop7, { offset: "0%", stopColor: YAZAKIA.glow.color, stopOpacity: YAZAKIA.glow.opacity }),
|
|
1502
|
+
/* @__PURE__ */ jsx18(Stop7, { offset: "100%", stopColor: YAZAKIA.glow.color, stopOpacity: 0 })
|
|
1503
|
+
] }),
|
|
1504
|
+
gradient
|
|
1505
|
+
] }),
|
|
1506
|
+
size >= 48 ? /* @__PURE__ */ jsx18(Circle6, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
1507
|
+
/* @__PURE__ */ jsx18(Circle6, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: YAZAKIA.ring.r, stroke, strokeWidth: YAZAKIA.ring.width, opacity: 0.35, fill: "none" }),
|
|
1508
|
+
YAZAKIA.voices.map((v, i) => /* @__PURE__ */ jsxs15(React12.Fragment, { children: [
|
|
1509
|
+
/* @__PURE__ */ jsx18(Path7, { d: v.body, fill }),
|
|
1510
|
+
/* @__PURE__ */ jsx18(Path7, { d: v.tail, fill }),
|
|
1511
|
+
i === 0 ? /* @__PURE__ */ jsx18(Path7, { d: `${v.body} ${v.tail}`, fill: YAZAKIA.shade.color, opacity: YAZAKIA.shade.opacity }) : null
|
|
1512
|
+
] }, v.body))
|
|
1513
|
+
] }),
|
|
1514
|
+
/* @__PURE__ */ jsx18(Animated14.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs15(Svg8, { viewBox, style: layer, children: [
|
|
1515
|
+
/* @__PURE__ */ jsx18(Defs7, { children: gradient }),
|
|
1516
|
+
/* @__PURE__ */ jsx18(Circle6, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: YAZAKIA.orbit.r, stroke, strokeWidth: YAZAKIA.orbit.width, strokeDasharray: YAZAKIA.orbit.dash, opacity: 0.6, fill: "none" }),
|
|
1517
|
+
YAZAKIA.pair.at.map(([cx, cy]) => /* @__PURE__ */ jsx18(Circle6, { cx, cy, r: YAZAKIA.pair.r, fill }, cx))
|
|
1518
|
+
] }) }),
|
|
1519
|
+
/* @__PURE__ */ jsx18(Animated14.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs15(Svg8, { viewBox, style: layer, children: [
|
|
1520
|
+
/* @__PURE__ */ jsxs15(Defs7, { children: [
|
|
1521
|
+
gradient,
|
|
1522
|
+
/* @__PURE__ */ jsxs15(LinearGradient7, { id: `${id}l`, gradientUnits: "userSpaceOnUse", x1: 0, y1: YAZAKIA.lens.y1, x2: 0, y2: YAZAKIA.lens.y2, children: [
|
|
1523
|
+
/* @__PURE__ */ jsx18(Stop7, { offset: "0%", stopColor: YAZAKIA.highlight.color, stopOpacity: YAZAKIA.highlight.from }),
|
|
1524
|
+
/* @__PURE__ */ jsx18(Stop7, { offset: "100%", stopColor: YAZAKIA.highlight.color, stopOpacity: YAZAKIA.highlight.to })
|
|
1525
|
+
] })
|
|
1526
|
+
] }),
|
|
1527
|
+
/* @__PURE__ */ jsx18(Path7, { d: YAZAKIA.lens.d, fill }),
|
|
1528
|
+
/* @__PURE__ */ jsx18(Path7, { d: YAZAKIA.lens.d, fill: `url(#${id}l)` })
|
|
1529
|
+
] }) })
|
|
1530
|
+
] });
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1209
1533
|
// src/native/ProductMark.tsx
|
|
1210
|
-
import { jsx as
|
|
1534
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1211
1535
|
function ProductMark({ id, ...props }) {
|
|
1212
|
-
if (id === "krizaka") return /* @__PURE__ */
|
|
1213
|
-
if (id === "orazaka") return /* @__PURE__ */
|
|
1214
|
-
return /* @__PURE__ */
|
|
1536
|
+
if (id === "krizaka") return /* @__PURE__ */ jsx19(KrizakaMark, { ...props });
|
|
1537
|
+
if (id === "orazaka") return /* @__PURE__ */ jsx19(OrazakaMark, { ...props });
|
|
1538
|
+
if (id === "yazakia") return /* @__PURE__ */ jsx19(YazakiaMark, { ...props });
|
|
1539
|
+
return /* @__PURE__ */ jsx19(OrochiaMark, { ...props });
|
|
1215
1540
|
}
|
|
1216
1541
|
|
|
1542
|
+
// src/native/profile-card.tsx
|
|
1543
|
+
import * as React13 from "react";
|
|
1544
|
+
import { Animated as Animated10, StyleSheet as StyleSheet12, View as View15 } from "react-native";
|
|
1545
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1546
|
+
var ratioOf = (value, max = 100) => Math.min(1, Math.max(0, value / (max || 1)));
|
|
1547
|
+
function Bar({ label, ratio, words, animated, delay }) {
|
|
1548
|
+
const { theme } = useTheme();
|
|
1549
|
+
const t = useEntrance(animated, delay, 900);
|
|
1550
|
+
const [width, setWidth] = React13.useState(0);
|
|
1551
|
+
const translateX = t.interpolate({ inputRange: [0, 1], outputRange: [-width * ratio, 0] });
|
|
1552
|
+
return /* @__PURE__ */ jsx20(
|
|
1553
|
+
View15,
|
|
1554
|
+
{
|
|
1555
|
+
accessible: true,
|
|
1556
|
+
role: "meter",
|
|
1557
|
+
"aria-label": label,
|
|
1558
|
+
"aria-valuemin": 0,
|
|
1559
|
+
"aria-valuemax": 100,
|
|
1560
|
+
"aria-valuenow": Math.round(ratio * 100),
|
|
1561
|
+
"aria-valuetext": words,
|
|
1562
|
+
onLayout: (e) => setWidth(e.nativeEvent.layout.width),
|
|
1563
|
+
style: [styles12.track, { backgroundColor: theme.surface3 }],
|
|
1564
|
+
children: /* @__PURE__ */ jsx20(Animated10.View, { style: [styles12.fill, { width: `${ratio * 100}%`, backgroundColor: theme.accent, transform: [{ translateX }] }] })
|
|
1565
|
+
}
|
|
1566
|
+
);
|
|
1567
|
+
}
|
|
1568
|
+
function ProfileCard({ visual, name, statLabel, value = 100, valueText, stats, caption, children, animated = true, style, ...props }) {
|
|
1569
|
+
const { theme, radius: radius3 } = useTheme();
|
|
1570
|
+
const ratio = ratioOf(value);
|
|
1571
|
+
return /* @__PURE__ */ jsxs16(View15, { ...props, style: [styles12.root, { backgroundColor: theme.surface1, borderColor: theme.borderSubtle, borderRadius: radius3.xl }, style], children: [
|
|
1572
|
+
/* @__PURE__ */ jsx20(View15, { "aria-hidden": true, style: [styles12.disc, { backgroundColor: theme.surface2, borderColor: theme.accentSoft }], children: visual }),
|
|
1573
|
+
/* @__PURE__ */ jsxs16(View15, { style: styles12.head, children: [
|
|
1574
|
+
/* @__PURE__ */ jsx20(Txt, { variant: "title", style: styles12.name, children: name }),
|
|
1575
|
+
statLabel ? /* @__PURE__ */ jsxs16(Txt, { variant: "caption", tone: "secondary", children: [
|
|
1576
|
+
statLabel,
|
|
1577
|
+
" ",
|
|
1578
|
+
/* @__PURE__ */ jsx20(Txt, { variant: "caption", children: valueText ?? `${Math.round(ratio * 100)} %` })
|
|
1579
|
+
] }) : null
|
|
1580
|
+
] }),
|
|
1581
|
+
statLabel ? /* @__PURE__ */ jsx20(Bar, { label: statLabel, ratio, words: valueText ?? `${Math.round(ratio * 100)} %`, animated, delay: 200 }) : null,
|
|
1582
|
+
stats?.map((s, i) => {
|
|
1583
|
+
const r = ratioOf(s.value, s.max);
|
|
1584
|
+
const words = s.valueText ?? `${Math.round(r * 100)} %`;
|
|
1585
|
+
return /* @__PURE__ */ jsxs16(View15, { style: styles12.stat, children: [
|
|
1586
|
+
/* @__PURE__ */ jsxs16(View15, { "aria-hidden": true, style: styles12.statHead, children: [
|
|
1587
|
+
/* @__PURE__ */ jsx20(Txt, { variant: "caption", tone: "secondary", children: s.label }),
|
|
1588
|
+
/* @__PURE__ */ jsx20(Txt, { variant: "caption", children: words })
|
|
1589
|
+
] }),
|
|
1590
|
+
/* @__PURE__ */ jsx20(Bar, { label: s.label, ratio: r, words, animated, delay: 320 + i * 120 })
|
|
1591
|
+
] }, s.label);
|
|
1592
|
+
}),
|
|
1593
|
+
caption ? /* @__PURE__ */ jsx20(Txt, { variant: "caption", tone: "secondary", style: styles12.caption, children: caption }) : null,
|
|
1594
|
+
children ? /* @__PURE__ */ jsx20(View15, { style: styles12.extra, children }) : null
|
|
1595
|
+
] });
|
|
1596
|
+
}
|
|
1597
|
+
var styles12 = StyleSheet12.create({
|
|
1598
|
+
root: { alignItems: "center", gap: 12, padding: 20, borderWidth: StyleSheet12.hairlineWidth },
|
|
1599
|
+
disc: { width: 104, height: 104, borderRadius: 52, borderWidth: 1, alignItems: "center", justifyContent: "center", overflow: "hidden" },
|
|
1600
|
+
head: { flexDirection: "row", alignSelf: "stretch", alignItems: "center", justifyContent: "space-between", gap: 8 },
|
|
1601
|
+
name: { flexShrink: 1, fontSize: 17 },
|
|
1602
|
+
track: { alignSelf: "stretch", height: 6, borderRadius: 3, overflow: "hidden" },
|
|
1603
|
+
fill: { height: "100%", borderRadius: 3 },
|
|
1604
|
+
stat: { alignSelf: "stretch", gap: 5 },
|
|
1605
|
+
statHead: { flexDirection: "row", justifyContent: "space-between", gap: 8 },
|
|
1606
|
+
caption: { textAlign: "center" },
|
|
1607
|
+
extra: { flexDirection: "row", flexWrap: "wrap", justifyContent: "center", gap: 8, alignSelf: "stretch" }
|
|
1608
|
+
});
|
|
1609
|
+
|
|
1217
1610
|
// src/native/progress.tsx
|
|
1218
|
-
import * as
|
|
1219
|
-
import { Animated as
|
|
1220
|
-
import
|
|
1221
|
-
import { jsx as
|
|
1222
|
-
var AnimatedCircle =
|
|
1611
|
+
import * as React14 from "react";
|
|
1612
|
+
import { Animated as Animated11, Easing as Easing7, StyleSheet as StyleSheet13, View as View16 } from "react-native";
|
|
1613
|
+
import Svg9, { Circle as Circle7, Defs as Defs8, LinearGradient as LinearGradient8, Rect as Rect3, Stop as Stop8 } from "react-native-svg";
|
|
1614
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1615
|
+
var AnimatedCircle = Animated11.createAnimatedComponent(Circle7);
|
|
1223
1616
|
var BAR = { sm: 4, md: 8, lg: 12 };
|
|
1224
1617
|
var RING = { sm: 40, md: 80, lg: 144 };
|
|
1225
1618
|
var STROKE = { sm: 12, md: 9, lg: 7 };
|
|
@@ -1230,21 +1623,21 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1230
1623
|
const known = typeof value === "number" && Number.isFinite(value);
|
|
1231
1624
|
const ratio = known ? Math.min(1, Math.max(0, value / (max || 1))) : 0;
|
|
1232
1625
|
const percent = Math.round(ratio * 100);
|
|
1233
|
-
const [progress] =
|
|
1234
|
-
const [spin] =
|
|
1235
|
-
const [track, setTrack] =
|
|
1236
|
-
|
|
1626
|
+
const [progress] = React14.useState(() => new Animated11.Value(ratio));
|
|
1627
|
+
const [spin] = React14.useState(() => new Animated11.Value(0));
|
|
1628
|
+
const [track, setTrack] = React14.useState(0);
|
|
1629
|
+
React14.useEffect(() => {
|
|
1237
1630
|
if (reduce) {
|
|
1238
1631
|
progress.setValue(ratio);
|
|
1239
1632
|
return;
|
|
1240
1633
|
}
|
|
1241
|
-
const animation =
|
|
1634
|
+
const animation = Animated11.timing(progress, { toValue: ratio, duration: 700, easing: Easing7.out(Easing7.cubic), useNativeDriver: false });
|
|
1242
1635
|
animation.start();
|
|
1243
1636
|
return () => animation.stop();
|
|
1244
1637
|
}, [ratio, reduce, progress]);
|
|
1245
|
-
|
|
1638
|
+
React14.useEffect(() => {
|
|
1246
1639
|
if (known || reduce) return;
|
|
1247
|
-
const loop =
|
|
1640
|
+
const loop = Animated11.loop(Animated11.timing(spin, { toValue: 1, duration: 1200, easing: Easing7.linear, useNativeDriver: true }));
|
|
1248
1641
|
loop.start();
|
|
1249
1642
|
return () => {
|
|
1250
1643
|
loop.stop();
|
|
@@ -1260,9 +1653,9 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1260
1653
|
"aria-valuenow": known ? Math.min(max, Math.max(0, value)) : void 0,
|
|
1261
1654
|
"aria-valuetext": known ? valueText ?? `${percent}%` : valueText
|
|
1262
1655
|
};
|
|
1263
|
-
const gradient = /* @__PURE__ */
|
|
1264
|
-
/* @__PURE__ */
|
|
1265
|
-
/* @__PURE__ */
|
|
1656
|
+
const gradient = /* @__PURE__ */ jsx21(Defs8, { children: /* @__PURE__ */ jsxs17(LinearGradient8, { id, x1: "0", y1: "0", x2: "1", y2: variant === "ring" ? "1" : "0", children: [
|
|
1657
|
+
/* @__PURE__ */ jsx21(Stop8, { offset: "0", stopColor: theme.accent }),
|
|
1658
|
+
/* @__PURE__ */ jsx21(Stop8, { offset: "1", stopColor: theme.accent2 })
|
|
1266
1659
|
] }) });
|
|
1267
1660
|
if (variant === "ring") {
|
|
1268
1661
|
const side = RING[size];
|
|
@@ -1271,11 +1664,11 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1271
1664
|
const circumference = 2 * Math.PI * r;
|
|
1272
1665
|
const offset = known ? progress.interpolate({ inputRange: [0, 1], outputRange: [circumference, 0] }) : circumference * 0.75;
|
|
1273
1666
|
const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] });
|
|
1274
|
-
return /* @__PURE__ */
|
|
1275
|
-
/* @__PURE__ */
|
|
1667
|
+
return /* @__PURE__ */ jsxs17(View16, { ...a11y, style: [styles13.ring, { width: side, height: side }, style], children: [
|
|
1668
|
+
/* @__PURE__ */ jsx21(Animated11.View, { style: [StyleSheet13.absoluteFill, { transform: [{ rotate: known ? "-90deg" : rotate }] }], children: /* @__PURE__ */ jsxs17(Svg9, { width: side, height: side, viewBox: "0 0 100 100", children: [
|
|
1276
1669
|
gradient,
|
|
1277
|
-
/* @__PURE__ */
|
|
1278
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ jsx21(Circle7, { cx: 50, cy: 50, r, fill: "none", stroke: theme.borderDefault, strokeWidth: stroke }),
|
|
1671
|
+
/* @__PURE__ */ jsx21(
|
|
1279
1672
|
AnimatedCircle,
|
|
1280
1673
|
{
|
|
1281
1674
|
cx: 50,
|
|
@@ -1295,48 +1688,48 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1295
1688
|
}
|
|
1296
1689
|
const width = known ? progress.interpolate({ inputRange: [0, 1], outputRange: ["0%", "100%"] }) : "40%";
|
|
1297
1690
|
const translate = spin.interpolate({ inputRange: [0, 1], outputRange: [-0.4 * track, track] });
|
|
1298
|
-
return /* @__PURE__ */
|
|
1299
|
-
|
|
1691
|
+
return /* @__PURE__ */ jsx21(
|
|
1692
|
+
View16,
|
|
1300
1693
|
{
|
|
1301
1694
|
...a11y,
|
|
1302
1695
|
onLayout: known ? void 0 : (event) => setTrack(event.nativeEvent.layout.width),
|
|
1303
|
-
style: [
|
|
1304
|
-
children: /* @__PURE__ */
|
|
1696
|
+
style: [styles13.bar, { height: BAR[size], backgroundColor: theme.surface3 }, style],
|
|
1697
|
+
children: /* @__PURE__ */ jsx21(Animated11.View, { style: [styles13.fill, { width }, known || reduce ? null : { transform: [{ translateX: translate }] }], children: /* @__PURE__ */ jsxs17(Svg9, { width: "100%", height: "100%", preserveAspectRatio: "none", children: [
|
|
1305
1698
|
gradient,
|
|
1306
|
-
/* @__PURE__ */
|
|
1699
|
+
/* @__PURE__ */ jsx21(Rect3, { x: 0, y: 0, width: "100%", height: "100%", fill: `url(#${id})` })
|
|
1307
1700
|
] }) })
|
|
1308
1701
|
}
|
|
1309
1702
|
);
|
|
1310
1703
|
}
|
|
1311
|
-
var
|
|
1704
|
+
var styles13 = StyleSheet13.create({
|
|
1312
1705
|
ring: { alignItems: "center", justifyContent: "center" },
|
|
1313
1706
|
bar: { width: "100%", overflow: "hidden", borderRadius: 9999 },
|
|
1314
1707
|
fill: { height: "100%", overflow: "hidden", borderRadius: 9999 }
|
|
1315
1708
|
});
|
|
1316
1709
|
|
|
1317
1710
|
// src/native/search-field.tsx
|
|
1318
|
-
import * as
|
|
1319
|
-
import { Pressable as Pressable5, StyleSheet as
|
|
1320
|
-
import
|
|
1321
|
-
import { jsx as
|
|
1711
|
+
import * as React15 from "react";
|
|
1712
|
+
import { Pressable as Pressable5, StyleSheet as StyleSheet14, TextInput, View as View17 } from "react-native";
|
|
1713
|
+
import Svg10, { Circle as Circle8, Path as Path8 } from "react-native-svg";
|
|
1714
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1322
1715
|
function SearchField({ label, value, defaultValue = "", onValueChange, onSearch, debounce = 300, onSubmit, clearLabel, style, placeholder, ...props }) {
|
|
1323
1716
|
const { theme, radius: radius3 } = useTheme();
|
|
1324
|
-
const [own, setOwn] =
|
|
1717
|
+
const [own, setOwn] = React15.useState(defaultValue);
|
|
1325
1718
|
const query = value ?? own;
|
|
1326
|
-
const timer2 =
|
|
1327
|
-
|
|
1719
|
+
const timer2 = React15.useRef(void 0);
|
|
1720
|
+
React15.useEffect(() => () => clearTimeout(timer2.current), []);
|
|
1328
1721
|
const change = (next) => {
|
|
1329
1722
|
if (value === void 0) setOwn(next);
|
|
1330
1723
|
onValueChange?.(next);
|
|
1331
1724
|
clearTimeout(timer2.current);
|
|
1332
1725
|
if (onSearch) timer2.current = setTimeout(() => onSearch(next), debounce);
|
|
1333
1726
|
};
|
|
1334
|
-
return /* @__PURE__ */
|
|
1335
|
-
/* @__PURE__ */
|
|
1336
|
-
/* @__PURE__ */
|
|
1337
|
-
/* @__PURE__ */
|
|
1727
|
+
return /* @__PURE__ */ jsxs18(View17, { style: [styles14.frame, { borderRadius: radius3.md, borderColor: theme.borderDefault, backgroundColor: theme.surface2 }, style], children: [
|
|
1728
|
+
/* @__PURE__ */ jsxs18(Svg10, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: theme.textSecondary, strokeWidth: 2, strokeLinecap: "round", "aria-hidden": true, children: [
|
|
1729
|
+
/* @__PURE__ */ jsx22(Circle8, { cx: 11, cy: 11, r: 7 }),
|
|
1730
|
+
/* @__PURE__ */ jsx22(Path8, { d: "m20 20-3.5-3.5" })
|
|
1338
1731
|
] }),
|
|
1339
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ jsx22(
|
|
1340
1733
|
TextInput,
|
|
1341
1734
|
{
|
|
1342
1735
|
role: "searchbox",
|
|
@@ -1354,33 +1747,33 @@ function SearchField({ label, value, defaultValue = "", onValueChange, onSearch,
|
|
|
1354
1747
|
onSearch?.(query);
|
|
1355
1748
|
onSubmit?.(query);
|
|
1356
1749
|
},
|
|
1357
|
-
style: [
|
|
1750
|
+
style: [styles14.input, { color: theme.textPrimary }],
|
|
1358
1751
|
...props
|
|
1359
1752
|
}
|
|
1360
1753
|
),
|
|
1361
|
-
query ? /* @__PURE__ */
|
|
1754
|
+
query ? /* @__PURE__ */ jsx22(Pressable5, { role: "button", "aria-label": clearLabel, hitSlop: 10, onPress: () => change(""), style: styles14.clear, children: /* @__PURE__ */ jsx22(Svg10, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: theme.textSecondary, strokeWidth: 2.4, strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx22(Path8, { d: "M18 6 6 18M6 6l12 12" }) }) }) : null
|
|
1362
1755
|
] });
|
|
1363
1756
|
}
|
|
1364
|
-
var
|
|
1365
|
-
frame: { flexDirection: "row", alignItems: "center", gap: 8, height: 44, paddingLeft: 12, paddingRight: 6, borderWidth:
|
|
1757
|
+
var styles14 = StyleSheet14.create({
|
|
1758
|
+
frame: { flexDirection: "row", alignItems: "center", gap: 8, height: 44, paddingLeft: 12, paddingRight: 6, borderWidth: StyleSheet14.hairlineWidth },
|
|
1366
1759
|
input: { flex: 1, height: "100%", fontSize: 15, paddingVertical: 0 },
|
|
1367
1760
|
clear: { width: 32, height: 32, alignItems: "center", justifyContent: "center" }
|
|
1368
1761
|
});
|
|
1369
1762
|
|
|
1370
1763
|
// src/native/segmented.tsx
|
|
1371
|
-
import { Pressable as Pressable6, StyleSheet as
|
|
1372
|
-
import { jsx as
|
|
1764
|
+
import { Pressable as Pressable6, StyleSheet as StyleSheet15, Text as Text7, View as View18 } from "react-native";
|
|
1765
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1373
1766
|
function Segmented({ options, value, onValueChange, size = "md", "aria-label": label, style }) {
|
|
1374
1767
|
const { theme, radius: radius3 } = useTheme();
|
|
1375
|
-
return /* @__PURE__ */
|
|
1376
|
-
|
|
1768
|
+
return /* @__PURE__ */ jsx23(
|
|
1769
|
+
View18,
|
|
1377
1770
|
{
|
|
1378
1771
|
role: "tablist",
|
|
1379
1772
|
"aria-label": label,
|
|
1380
|
-
style: [
|
|
1773
|
+
style: [styles15.track, { backgroundColor: theme.surface2, borderColor: theme.borderSubtle, borderRadius: radius3.md, height: size === "sm" ? 32 : 40 }, style],
|
|
1381
1774
|
children: options.map((option) => {
|
|
1382
1775
|
const selected = option.value === value;
|
|
1383
|
-
return /* @__PURE__ */
|
|
1776
|
+
return /* @__PURE__ */ jsx23(
|
|
1384
1777
|
Pressable6,
|
|
1385
1778
|
{
|
|
1386
1779
|
role: "tab",
|
|
@@ -1391,12 +1784,12 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
1391
1784
|
if (!selected) onValueChange(option.value);
|
|
1392
1785
|
},
|
|
1393
1786
|
style: [
|
|
1394
|
-
|
|
1787
|
+
styles15.segment,
|
|
1395
1788
|
{ borderRadius: radius3.sm },
|
|
1396
1789
|
selected ? { backgroundColor: theme.surface0, borderColor: theme.borderDefault } : null,
|
|
1397
|
-
option.disabled ?
|
|
1790
|
+
option.disabled ? styles15.disabled : null
|
|
1398
1791
|
],
|
|
1399
|
-
children: /* @__PURE__ */
|
|
1792
|
+
children: /* @__PURE__ */ jsx23(Text7, { numberOfLines: 1, style: [styles15.label, { color: selected ? theme.textPrimary : theme.textSecondary, fontSize: size === "sm" ? 12 : 13 }], children: option.label })
|
|
1400
1793
|
},
|
|
1401
1794
|
option.value
|
|
1402
1795
|
);
|
|
@@ -1404,17 +1797,17 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
1404
1797
|
}
|
|
1405
1798
|
);
|
|
1406
1799
|
}
|
|
1407
|
-
var
|
|
1408
|
-
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth:
|
|
1409
|
-
segment: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 8, borderWidth:
|
|
1800
|
+
var styles15 = StyleSheet15.create({
|
|
1801
|
+
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth: StyleSheet15.hairlineWidth },
|
|
1802
|
+
segment: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 8, borderWidth: StyleSheet15.hairlineWidth, borderColor: "transparent" },
|
|
1410
1803
|
label: { fontWeight: "600" },
|
|
1411
1804
|
disabled: { opacity: 0.4 }
|
|
1412
1805
|
});
|
|
1413
1806
|
|
|
1414
1807
|
// src/native/skeleton.tsx
|
|
1415
|
-
import * as
|
|
1416
|
-
import { Animated as
|
|
1417
|
-
import { jsx as
|
|
1808
|
+
import * as React16 from "react";
|
|
1809
|
+
import { Animated as Animated12 } from "react-native";
|
|
1810
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1418
1811
|
var SHAPE = {
|
|
1419
1812
|
text: { width: "100%", height: 12, radius: 4 },
|
|
1420
1813
|
circle: { width: 40, height: 40, radius: 9999 },
|
|
@@ -1423,13 +1816,13 @@ var SHAPE = {
|
|
|
1423
1816
|
function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
1424
1817
|
const { theme } = useTheme();
|
|
1425
1818
|
const reduce = useReducedMotion();
|
|
1426
|
-
const [opacity] =
|
|
1427
|
-
|
|
1819
|
+
const [opacity] = React16.useState(() => new Animated12.Value(1));
|
|
1820
|
+
React16.useEffect(() => {
|
|
1428
1821
|
if (reduce) return;
|
|
1429
|
-
const loop =
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1822
|
+
const loop = Animated12.loop(
|
|
1823
|
+
Animated12.sequence([
|
|
1824
|
+
Animated12.timing(opacity, { toValue: 0.5, duration: 900, useNativeDriver: true }),
|
|
1825
|
+
Animated12.timing(opacity, { toValue: 1, duration: 900, useNativeDriver: true })
|
|
1433
1826
|
])
|
|
1434
1827
|
);
|
|
1435
1828
|
loop.start();
|
|
@@ -1440,8 +1833,8 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
1440
1833
|
}, [reduce, opacity]);
|
|
1441
1834
|
const s = SHAPE[shape];
|
|
1442
1835
|
const side = shape === "circle" ? width ?? height ?? s.width : void 0;
|
|
1443
|
-
return /* @__PURE__ */
|
|
1444
|
-
|
|
1836
|
+
return /* @__PURE__ */ jsx24(
|
|
1837
|
+
Animated12.View,
|
|
1445
1838
|
{
|
|
1446
1839
|
testID,
|
|
1447
1840
|
"aria-hidden": true,
|
|
@@ -1455,10 +1848,10 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
1455
1848
|
|
|
1456
1849
|
// src/native/spinner.tsx
|
|
1457
1850
|
import { ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
1458
|
-
import { jsx as
|
|
1851
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1459
1852
|
function Spinner({ label, size = "md", ...props }) {
|
|
1460
1853
|
const { theme } = useTheme();
|
|
1461
|
-
return /* @__PURE__ */
|
|
1854
|
+
return /* @__PURE__ */ jsx25(
|
|
1462
1855
|
ActivityIndicator2,
|
|
1463
1856
|
{
|
|
1464
1857
|
accessible: true,
|
|
@@ -1473,9 +1866,9 @@ function Spinner({ label, size = "md", ...props }) {
|
|
|
1473
1866
|
}
|
|
1474
1867
|
|
|
1475
1868
|
// src/native/toast.tsx
|
|
1476
|
-
import * as
|
|
1477
|
-
import { AccessibilityInfo as
|
|
1478
|
-
import { Fragment as Fragment3, jsx as
|
|
1869
|
+
import * as React17 from "react";
|
|
1870
|
+
import { AccessibilityInfo as AccessibilityInfo8, Animated as Animated13, Pressable as Pressable7, StyleSheet as StyleSheet16, Text as Text8, View as View19 } from "react-native";
|
|
1871
|
+
import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1479
1872
|
var items = [];
|
|
1480
1873
|
var listeners2 = /* @__PURE__ */ new Set();
|
|
1481
1874
|
var counter = 0;
|
|
@@ -1510,30 +1903,30 @@ var toast = Object.assign(show, {
|
|
|
1510
1903
|
function ToastView({ item, closeLabel, duration }) {
|
|
1511
1904
|
const { theme, radius: radius3 } = useTheme();
|
|
1512
1905
|
const reduce = useReducedMotion();
|
|
1513
|
-
const [enter] =
|
|
1514
|
-
|
|
1906
|
+
const [enter] = React17.useState(() => new Animated13.Value(reduce ? 1 : 0));
|
|
1907
|
+
React17.useEffect(() => {
|
|
1515
1908
|
if (reduce) enter.setValue(1);
|
|
1516
|
-
else
|
|
1909
|
+
else Animated13.timing(enter, { toValue: 1, duration: 220, useNativeDriver: true }).start();
|
|
1517
1910
|
}, [enter, reduce]);
|
|
1518
|
-
|
|
1519
|
-
|
|
1911
|
+
React17.useEffect(() => {
|
|
1912
|
+
AccessibilityInfo8.announceForAccessibility(item.description ? `${item.title}. ${item.description}` : item.title);
|
|
1520
1913
|
}, [item.title, item.description]);
|
|
1521
1914
|
const ms = item.duration ?? duration;
|
|
1522
|
-
|
|
1915
|
+
React17.useEffect(() => {
|
|
1523
1916
|
if (!Number.isFinite(ms)) return;
|
|
1524
1917
|
const timer2 = setTimeout(() => dismiss(item.id), ms);
|
|
1525
1918
|
return () => clearTimeout(timer2);
|
|
1526
1919
|
}, [item.id, ms]);
|
|
1527
1920
|
const edge = { success: theme.success, warning: theme.warning, error: theme.danger, info: theme.info, default: theme.borderDefault }[item.tone ?? "default"];
|
|
1528
|
-
const text = /* @__PURE__ */
|
|
1529
|
-
item.icon ? /* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */
|
|
1531
|
-
/* @__PURE__ */
|
|
1532
|
-
item.description ? /* @__PURE__ */
|
|
1921
|
+
const text = /* @__PURE__ */ jsxs19(Fragment3, { children: [
|
|
1922
|
+
item.icon ? /* @__PURE__ */ jsx26(View19, { "aria-hidden": true, children: item.icon }) : null,
|
|
1923
|
+
/* @__PURE__ */ jsxs19(View19, { style: styles16.content, children: [
|
|
1924
|
+
/* @__PURE__ */ jsx26(Txt, { variant: "label", numberOfLines: 2, children: item.title }),
|
|
1925
|
+
item.description ? /* @__PURE__ */ jsx26(Txt, { variant: "caption", tone: "secondary", numberOfLines: 3, children: item.description }) : null
|
|
1533
1926
|
] })
|
|
1534
1927
|
] });
|
|
1535
|
-
const body = /* @__PURE__ */
|
|
1536
|
-
item.onPress ? /* @__PURE__ */
|
|
1928
|
+
const body = /* @__PURE__ */ jsxs19(Fragment3, { children: [
|
|
1929
|
+
item.onPress ? /* @__PURE__ */ jsx26(
|
|
1537
1930
|
Pressable7,
|
|
1538
1931
|
{
|
|
1539
1932
|
role: "button",
|
|
@@ -1541,11 +1934,11 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
1541
1934
|
item.onPress?.();
|
|
1542
1935
|
dismiss(item.id);
|
|
1543
1936
|
},
|
|
1544
|
-
style: ({ pressed }) => [
|
|
1937
|
+
style: ({ pressed }) => [styles16.main, { opacity: pressed ? 0.8 : 1 }],
|
|
1545
1938
|
children: text
|
|
1546
1939
|
}
|
|
1547
|
-
) : /* @__PURE__ */
|
|
1548
|
-
item.action ? /* @__PURE__ */
|
|
1940
|
+
) : /* @__PURE__ */ jsx26(View19, { style: styles16.main, children: text }),
|
|
1941
|
+
item.action ? /* @__PURE__ */ jsx26(
|
|
1549
1942
|
Pressable7,
|
|
1550
1943
|
{
|
|
1551
1944
|
role: "button",
|
|
@@ -1553,33 +1946,33 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
1553
1946
|
item.action?.onPress();
|
|
1554
1947
|
dismiss(item.id);
|
|
1555
1948
|
},
|
|
1556
|
-
style: [
|
|
1557
|
-
children: /* @__PURE__ */
|
|
1949
|
+
style: [styles16.action, { backgroundColor: theme.accent, borderRadius: radius3.sm }],
|
|
1950
|
+
children: /* @__PURE__ */ jsx26(Text8, { style: [styles16.actionLabel, { color: theme.onAccent }], children: item.action.label })
|
|
1558
1951
|
}
|
|
1559
1952
|
) : null,
|
|
1560
|
-
/* @__PURE__ */
|
|
1953
|
+
/* @__PURE__ */ jsx26(Pressable7, { role: "button", "aria-label": closeLabel, hitSlop: 10, onPress: () => dismiss(item.id), style: styles16.close, children: /* @__PURE__ */ jsx26(Text8, { style: [styles16.cross, { color: theme.textSecondary }], children: "\xD7" }) })
|
|
1561
1954
|
] });
|
|
1562
1955
|
const frame = [
|
|
1563
|
-
|
|
1956
|
+
styles16.toast,
|
|
1564
1957
|
{ backgroundColor: theme.surface2, borderColor: theme.borderDefault, borderLeftColor: edge, borderRadius: radius3.lg, shadowColor: theme.scrimStrong }
|
|
1565
1958
|
];
|
|
1566
1959
|
const motion3 = { transform: [{ translateY: enter.interpolate({ inputRange: [0, 1], outputRange: [-8, 0] }) }] };
|
|
1567
|
-
return /* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ jsx26(Animated13.View, { "aria-live": "polite", style: motion3, children: /* @__PURE__ */ jsx26(View19, { style: frame, children: body }) });
|
|
1568
1961
|
}
|
|
1569
1962
|
function Toaster({ closeLabel, position = "top", offset = 12, duration = 6e3, max = 3 }) {
|
|
1570
|
-
const all =
|
|
1963
|
+
const all = React17.useSyncExternalStore(subscribe2, snapshot, snapshot);
|
|
1571
1964
|
const shown = all.slice(-max);
|
|
1572
1965
|
if (shown.length === 0) return null;
|
|
1573
|
-
return /* @__PURE__ */
|
|
1966
|
+
return /* @__PURE__ */ jsx26(View19, { pointerEvents: "box-none", style: [styles16.stack, position === "top" ? { top: offset } : { bottom: offset }], children: (position === "top" ? shown : [...shown].reverse()).map((item) => /* @__PURE__ */ jsx26(ToastView, { item, closeLabel, duration }, item.id)) });
|
|
1574
1967
|
}
|
|
1575
|
-
var
|
|
1968
|
+
var styles16 = StyleSheet16.create({
|
|
1576
1969
|
stack: { position: "absolute", left: 12, right: 12, gap: 8, zIndex: 100 },
|
|
1577
1970
|
toast: {
|
|
1578
1971
|
flexDirection: "row",
|
|
1579
1972
|
alignItems: "center",
|
|
1580
1973
|
gap: 10,
|
|
1581
1974
|
padding: 12,
|
|
1582
|
-
borderWidth:
|
|
1975
|
+
borderWidth: StyleSheet16.hairlineWidth,
|
|
1583
1976
|
borderLeftWidth: 4,
|
|
1584
1977
|
shadowOpacity: 0.3,
|
|
1585
1978
|
shadowRadius: 16,
|
|
@@ -1611,21 +2004,30 @@ export {
|
|
|
1611
2004
|
Chip,
|
|
1612
2005
|
Countdown,
|
|
1613
2006
|
EmptyState,
|
|
2007
|
+
ErrorState,
|
|
2008
|
+
GoalGauge,
|
|
1614
2009
|
IconButton,
|
|
1615
2010
|
KrizakaMark,
|
|
2011
|
+
LoadingState,
|
|
1616
2012
|
Mascot,
|
|
2013
|
+
MascotState,
|
|
1617
2014
|
OrazakaMark,
|
|
1618
2015
|
OrochiaMark,
|
|
1619
2016
|
Pagination,
|
|
2017
|
+
Phoenix,
|
|
1620
2018
|
ProductMark,
|
|
2019
|
+
ProfileCard,
|
|
1621
2020
|
Progress,
|
|
1622
2021
|
SearchField,
|
|
1623
2022
|
Segmented,
|
|
1624
2023
|
Skeleton,
|
|
1625
2024
|
Spinner,
|
|
2025
|
+
SuccessState,
|
|
1626
2026
|
ThemeProvider,
|
|
1627
2027
|
Toaster,
|
|
1628
2028
|
Txt,
|
|
2029
|
+
WelcomeState,
|
|
2030
|
+
YazakiaMark,
|
|
1629
2031
|
alpha,
|
|
1630
2032
|
splitDuration,
|
|
1631
2033
|
textStyles,
|