@krizaka/ui 2.8.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 +33 -1
- 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-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/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 +5 -4
- package/dist/index.js +22 -19
- 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/mascots.d.ts +14 -1
- package/dist/mascots.js +86 -1
- package/dist/mascots.js.map +1 -1
- package/dist/native.d.ts +73 -3
- package/dist/native.js +530 -296
- 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 +250 -8
- 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/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 +317 -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 +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +104 -7
- 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
|
@@ -719,8 +719,88 @@ var styles8 = StyleSheet8.create({
|
|
|
719
719
|
action: { marginTop: 8, flexDirection: "row", flexWrap: "wrap", justifyContent: "center", gap: 8 }
|
|
720
720
|
});
|
|
721
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
|
+
|
|
722
802
|
// src/native/KrizakaMark.tsx
|
|
723
|
-
import { View as
|
|
803
|
+
import { View as View7 } from "react-native";
|
|
724
804
|
import Svg2, { Circle, Defs as Defs2, G as Group, LinearGradient as LinearGradient2, Path, RadialGradient, Stop as Stop2 } from "react-native-svg";
|
|
725
805
|
|
|
726
806
|
// src/marks/krizaka-geometry.ts
|
|
@@ -743,24 +823,24 @@ var KRIZAKA = {
|
|
|
743
823
|
};
|
|
744
824
|
|
|
745
825
|
// src/native/mark-motion.ts
|
|
746
|
-
import { useEffect as
|
|
747
|
-
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";
|
|
748
828
|
var markA11y = (title) => title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
749
829
|
function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
750
|
-
const [spin] =
|
|
751
|
-
const [pulse] =
|
|
752
|
-
|
|
830
|
+
const [spin] = useState7(() => new Animated5.Value(0));
|
|
831
|
+
const [pulse] = useState7(() => new Animated5.Value(0));
|
|
832
|
+
useEffect5(() => {
|
|
753
833
|
if (!animated) return;
|
|
754
834
|
let loops = [];
|
|
755
835
|
let cancelled = false;
|
|
756
|
-
void
|
|
836
|
+
void AccessibilityInfo3.isReduceMotionEnabled().then((reduce) => {
|
|
757
837
|
if (reduce || cancelled) return;
|
|
758
838
|
loops = [
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
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 })
|
|
764
844
|
])
|
|
765
845
|
)
|
|
766
846
|
];
|
|
@@ -772,7 +852,7 @@ function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
|
772
852
|
};
|
|
773
853
|
}, [animated, spin, pulse, spinMs]);
|
|
774
854
|
return {
|
|
775
|
-
Animated:
|
|
855
|
+
Animated: Animated5,
|
|
776
856
|
layer: { position: "absolute", width: size, height: size },
|
|
777
857
|
spinStyle: { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] },
|
|
778
858
|
pulseStyle: { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }
|
|
@@ -780,39 +860,39 @@ function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
|
780
860
|
}
|
|
781
861
|
|
|
782
862
|
// src/native/KrizakaMark.tsx
|
|
783
|
-
import { Fragment as Fragment2, jsx as
|
|
863
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
784
864
|
function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
785
865
|
const { theme } = useTheme();
|
|
786
|
-
const { Animated:
|
|
866
|
+
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
787
867
|
const id = useSvgId("kzm");
|
|
788
868
|
const viewBox = size < 48 ? KRIZAKA.croppedViewBox : KRIZAKA.viewBox;
|
|
789
869
|
const stroke = neutral ?? theme.textMuted;
|
|
790
|
-
const blue = /* @__PURE__ */
|
|
791
|
-
const dot = (c) => /* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */
|
|
793
|
-
/* @__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 })
|
|
794
874
|
] });
|
|
795
|
-
return /* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
/* @__PURE__ */
|
|
800
|
-
/* @__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 })
|
|
801
881
|
] }),
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__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 })
|
|
805
885
|
] }),
|
|
806
886
|
blue
|
|
807
887
|
] }),
|
|
808
|
-
size >= 48 ? /* @__PURE__ */
|
|
809
|
-
/* @__PURE__ */
|
|
810
|
-
/* @__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" }) })
|
|
811
891
|
] }),
|
|
812
|
-
/* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__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: [
|
|
816
896
|
dot(KRIZAKA.node),
|
|
817
897
|
dot(KRIZAKA.core)
|
|
818
898
|
] })
|
|
@@ -821,12 +901,12 @@ function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
|
821
901
|
}
|
|
822
902
|
|
|
823
903
|
// src/native/mascot-state.tsx
|
|
824
|
-
import * as
|
|
825
|
-
import { AccessibilityInfo as
|
|
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";
|
|
826
906
|
|
|
827
907
|
// src/native/mascots.tsx
|
|
828
|
-
import { useEffect as
|
|
829
|
-
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";
|
|
830
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";
|
|
831
911
|
|
|
832
912
|
// src/mascots/geometry.ts
|
|
@@ -963,17 +1043,17 @@ var SHADE = "#000000";
|
|
|
963
1043
|
var PARCEL = ["#f59e0b", "#d97706", "#b45309"];
|
|
964
1044
|
|
|
965
1045
|
// src/native/mascots.tsx
|
|
966
|
-
import { jsx as
|
|
1046
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
967
1047
|
function useBob(animated) {
|
|
968
|
-
const [y] =
|
|
969
|
-
|
|
1048
|
+
const [y] = useState8(() => new Animated6.Value(0));
|
|
1049
|
+
useEffect6(() => {
|
|
970
1050
|
if (!animated) return;
|
|
971
1051
|
let loop;
|
|
972
1052
|
let cancelled = false;
|
|
973
|
-
void
|
|
1053
|
+
void AccessibilityInfo4.isReduceMotionEnabled().then((reduce) => {
|
|
974
1054
|
if (reduce || cancelled) return;
|
|
975
|
-
const step = (toValue) =>
|
|
976
|
-
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)]));
|
|
977
1057
|
loop.start();
|
|
978
1058
|
});
|
|
979
1059
|
return () => {
|
|
@@ -997,62 +1077,62 @@ function Mascot({ bird = "owl", mood = "welcome", tone: tone2 = "brand", size =
|
|
|
997
1077
|
const look3 = mood === "thinking" ? 1.4 : 0;
|
|
998
1078
|
const rot = (deg, [x, y]) => `rotate(${deg} ${x} ${y})`;
|
|
999
1079
|
const [wl, wr] = g.wings;
|
|
1000
|
-
return /* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
/* @__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 })
|
|
1004
1084
|
] }) }),
|
|
1005
|
-
/* @__PURE__ */
|
|
1006
|
-
mood === "empty" && /* @__PURE__ */
|
|
1007
|
-
g.legs.map((d) => /* @__PURE__ */
|
|
1008
|
-
g.back?.map((d) => d.endsWith("Z") ? /* @__PURE__ */
|
|
1009
|
-
g.parcel?.map((d, i) => /* @__PURE__ */
|
|
1010
|
-
/* @__PURE__ */
|
|
1011
|
-
/* @__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 }),
|
|
1012
1092
|
[wl, wr].map((w, i) => {
|
|
1013
1093
|
const turn = mood === "success" ? i === 0 ? 28 : -28 : mood === "welcome" && i === 1 ? -20 : 0;
|
|
1014
|
-
return /* @__PURE__ */
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
/* @__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 })
|
|
1017
1097
|
] }, i);
|
|
1018
1098
|
}),
|
|
1019
|
-
g.neck && /* @__PURE__ */
|
|
1020
|
-
g.head.r > 0 && /* @__PURE__ */
|
|
1021
|
-
g.details.map((d) => /* @__PURE__ */
|
|
1022
|
-
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 }),
|
|
1023
1103
|
g.eyes.at.map(
|
|
1024
|
-
(at, i) => mood === "empty" && g.eyes.white > 0 ? /* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1027
|
-
/* @__PURE__ */
|
|
1028
|
-
] }, i) : mood === "success" || mood === "empty" ? /* @__PURE__ */
|
|
1029
|
-
g.eyes.white > 0 && /* @__PURE__ */
|
|
1030
|
-
/* @__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 })
|
|
1031
1111
|
] }, i)
|
|
1032
1112
|
),
|
|
1033
|
-
g.glasses && g.eyes.at.map(([x, y]) => /* @__PURE__ */
|
|
1034
|
-
mood === "error" && g.eyes.at.map((at, i) => /* @__PURE__ */
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
mood === "thinking" && MOOD_PARTS.dots.map(([cx, cy, r], i) => /* @__PURE__ */
|
|
1037
|
-
(mood === "success" || mood === "error") && /* @__PURE__ */
|
|
1038
|
-
mood === "success" && /* @__PURE__ */
|
|
1039
|
-
mood === "error" && /* @__PURE__ */
|
|
1040
|
-
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 })
|
|
1041
1121
|
] }) }) });
|
|
1042
1122
|
}
|
|
1043
1123
|
|
|
1044
1124
|
// src/native/mascot-state.tsx
|
|
1045
|
-
import { jsx as
|
|
1125
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1046
1126
|
var SIZE = { sm: 64, md: 96, lg: 128 };
|
|
1047
1127
|
function useArrival(animated) {
|
|
1048
|
-
const [value] =
|
|
1049
|
-
|
|
1128
|
+
const [value] = React9.useState(() => new Animated7.Value(animated ? 0 : 1));
|
|
1129
|
+
React9.useEffect(() => {
|
|
1050
1130
|
if (!animated) return;
|
|
1051
1131
|
let cancelled = false;
|
|
1052
|
-
void
|
|
1132
|
+
void AccessibilityInfo5.isReduceMotionEnabled().then((reduce) => {
|
|
1053
1133
|
if (cancelled) return;
|
|
1054
1134
|
if (reduce) value.setValue(1);
|
|
1055
|
-
else
|
|
1135
|
+
else Animated7.timing(value, { toValue: 1, duration: 420, easing: Easing4.out(Easing4.cubic), useNativeDriver: true }).start();
|
|
1056
1136
|
});
|
|
1057
1137
|
return () => {
|
|
1058
1138
|
cancelled = true;
|
|
@@ -1063,30 +1143,30 @@ function useArrival(animated) {
|
|
|
1063
1143
|
function MascotState({ bird = "owl", mood = "empty", title, description, action, size = "md", layout = "stacked", tone: tone2, animated = true, style, ...props }) {
|
|
1064
1144
|
const opacity = useArrival(animated);
|
|
1065
1145
|
const inline = layout === "inline";
|
|
1066
|
-
return /* @__PURE__ */
|
|
1067
|
-
|
|
1146
|
+
return /* @__PURE__ */ jsxs10(
|
|
1147
|
+
Animated7.View,
|
|
1068
1148
|
{
|
|
1069
1149
|
role: mood === "error" ? "alert" : "status",
|
|
1070
1150
|
accessibilityLiveRegion: mood === "error" ? "assertive" : "polite",
|
|
1071
1151
|
"aria-busy": mood === "thinking" ? true : void 0,
|
|
1072
1152
|
...props,
|
|
1073
|
-
style: [inline ?
|
|
1153
|
+
style: [inline ? styles10.inline : styles10.stacked, { opacity, transform: [{ translateY: opacity.interpolate({ inputRange: [0, 1], outputRange: [6, 0] }) }] }, style],
|
|
1074
1154
|
children: [
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
/* @__PURE__ */
|
|
1077
|
-
/* @__PURE__ */
|
|
1078
|
-
description ? /* @__PURE__ */
|
|
1079
|
-
action ? /* @__PURE__ */
|
|
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
|
|
1080
1160
|
] })
|
|
1081
1161
|
]
|
|
1082
1162
|
}
|
|
1083
1163
|
);
|
|
1084
1164
|
}
|
|
1085
|
-
var ErrorState = (props) => /* @__PURE__ */
|
|
1086
|
-
var SuccessState = (props) => /* @__PURE__ */
|
|
1087
|
-
var LoadingState = (props) => /* @__PURE__ */
|
|
1088
|
-
var WelcomeState = (props) => /* @__PURE__ */
|
|
1089
|
-
var
|
|
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({
|
|
1090
1170
|
stacked: { alignItems: "center", justifyContent: "center", gap: 12, paddingVertical: 40, paddingHorizontal: 24 },
|
|
1091
1171
|
inline: { flexDirection: "row", alignItems: "center", gap: 16 },
|
|
1092
1172
|
words: { alignItems: "center", gap: 6 },
|
|
@@ -1097,7 +1177,7 @@ var styles9 = StyleSheet9.create({
|
|
|
1097
1177
|
});
|
|
1098
1178
|
|
|
1099
1179
|
// src/native/OrazakaMark.tsx
|
|
1100
|
-
import { View as
|
|
1180
|
+
import { View as View10 } from "react-native";
|
|
1101
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";
|
|
1102
1182
|
|
|
1103
1183
|
// src/marks/orazaka-geometry.ts
|
|
@@ -1127,40 +1207,40 @@ var ORAZAKA = {
|
|
|
1127
1207
|
};
|
|
1128
1208
|
|
|
1129
1209
|
// src/native/OrazakaMark.tsx
|
|
1130
|
-
import { jsx as
|
|
1210
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1131
1211
|
function OrazakaMark({ size = 48, animated = true, title, neutral }) {
|
|
1132
1212
|
const { theme } = useTheme();
|
|
1133
|
-
const { Animated:
|
|
1213
|
+
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
1134
1214
|
const id = useSvgId("ozm");
|
|
1135
1215
|
const viewBox = size < 48 ? ORAZAKA.croppedViewBox : ORAZAKA.viewBox;
|
|
1136
1216
|
const stroke = neutral ?? theme.textMuted;
|
|
1137
|
-
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)) });
|
|
1138
1218
|
const fill = `url(#${id}a)`;
|
|
1139
|
-
return /* @__PURE__ */
|
|
1140
|
-
/* @__PURE__ */
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1143
|
-
/* @__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 })
|
|
1144
1224
|
] }) }),
|
|
1145
|
-
size >= 48 ? /* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__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" })
|
|
1148
1228
|
] }),
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
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))
|
|
1152
1232
|
] }) }),
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
-
/* @__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 })
|
|
1157
1237
|
] }) })
|
|
1158
1238
|
] });
|
|
1159
1239
|
}
|
|
1160
1240
|
|
|
1161
1241
|
// src/native/OrochiaMark.tsx
|
|
1162
|
-
import { useEffect as
|
|
1163
|
-
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";
|
|
1164
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";
|
|
1165
1245
|
|
|
1166
1246
|
// src/marks/orochia-geometry.ts
|
|
@@ -1188,25 +1268,25 @@ var OROCHIA = {
|
|
|
1188
1268
|
};
|
|
1189
1269
|
|
|
1190
1270
|
// src/native/OrochiaMark.tsx
|
|
1191
|
-
import { jsx as
|
|
1271
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1192
1272
|
var CENTER = OROCHIA.offset + 180;
|
|
1193
1273
|
function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }) {
|
|
1194
1274
|
const { theme } = useTheme();
|
|
1195
1275
|
const neutral = neutralProp ?? theme.textMuted;
|
|
1196
|
-
const [spin] =
|
|
1197
|
-
const [pulse] =
|
|
1198
|
-
|
|
1276
|
+
const [spin] = useState10(() => new Animated8.Value(0));
|
|
1277
|
+
const [pulse] = useState10(() => new Animated8.Value(0));
|
|
1278
|
+
useEffect8(() => {
|
|
1199
1279
|
if (!animated) return;
|
|
1200
1280
|
let loops = [];
|
|
1201
1281
|
let cancelled = false;
|
|
1202
|
-
void
|
|
1282
|
+
void AccessibilityInfo6.isReduceMotionEnabled().then((reduce) => {
|
|
1203
1283
|
if (reduce || cancelled) return;
|
|
1204
1284
|
loops = [
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
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 })
|
|
1210
1290
|
])
|
|
1211
1291
|
)
|
|
1212
1292
|
];
|
|
@@ -1220,44 +1300,44 @@ function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }
|
|
|
1220
1300
|
const viewBox = size < 48 ? OROCHIA.croppedViewBox : OROCHIA.viewBox;
|
|
1221
1301
|
const layer = { position: "absolute", width: size, height: size };
|
|
1222
1302
|
const a11y = title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
1223
|
-
const bodyGradient = /* @__PURE__ */
|
|
1224
|
-
return /* @__PURE__ */
|
|
1225
|
-
/* @__PURE__ */
|
|
1226
|
-
/* @__PURE__ */
|
|
1227
|
-
/* @__PURE__ */
|
|
1228
|
-
/* @__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 })
|
|
1229
1309
|
] }) }),
|
|
1230
|
-
/* @__PURE__ */
|
|
1231
|
-
/* @__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" })
|
|
1232
1312
|
] }),
|
|
1233
|
-
/* @__PURE__ */
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
/* @__PURE__ */
|
|
1237
|
-
/* @__PURE__ */
|
|
1238
|
-
/* @__PURE__ */
|
|
1239
|
-
/* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
/* @__PURE__ */
|
|
1242
|
-
/* @__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" })
|
|
1243
1323
|
] })
|
|
1244
1324
|
] }),
|
|
1245
|
-
/* @__PURE__ */
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
/* @__PURE__ */
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
/* @__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)" })
|
|
1250
1330
|
] })
|
|
1251
1331
|
] }) })
|
|
1252
1332
|
] });
|
|
1253
1333
|
}
|
|
1254
1334
|
|
|
1255
1335
|
// src/native/pagination.tsx
|
|
1256
|
-
import { Pressable as Pressable4, StyleSheet as
|
|
1336
|
+
import { Pressable as Pressable4, StyleSheet as StyleSheet11, Text as Text6, View as View12 } from "react-native";
|
|
1257
1337
|
import Svg6, { Path as Path5 } from "react-native-svg";
|
|
1258
|
-
import { jsx as
|
|
1338
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1259
1339
|
function Chevron({ direction, color }) {
|
|
1260
|
-
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" }) });
|
|
1261
1341
|
}
|
|
1262
1342
|
function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, onPrevious, onNext, status, disabled, labels, style }) {
|
|
1263
1343
|
const { theme, radius: radius3 } = useTheme();
|
|
@@ -1266,7 +1346,7 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
1266
1346
|
const current = Math.min(Math.max(1, page), count);
|
|
1267
1347
|
const canPrevious = !disabled && (paged ? current > 1 : Boolean(hasPrevious));
|
|
1268
1348
|
const canNext = !disabled && (paged ? current < count : Boolean(hasNext));
|
|
1269
|
-
const button = (direction, enabled, onPress, label) => /* @__PURE__ */
|
|
1349
|
+
const button = (direction, enabled, onPress, label) => /* @__PURE__ */ jsx16(
|
|
1270
1350
|
Pressable4,
|
|
1271
1351
|
{
|
|
1272
1352
|
role: "button",
|
|
@@ -1276,50 +1356,125 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
1276
1356
|
hitSlop: 6,
|
|
1277
1357
|
onPress,
|
|
1278
1358
|
style: ({ pressed }) => [
|
|
1279
|
-
|
|
1359
|
+
styles11.button,
|
|
1280
1360
|
{ borderRadius: radius3.sm, borderColor: theme.borderDefault, backgroundColor: theme.surface1, opacity: enabled ? pressed ? 0.8 : 1 : 0.4 }
|
|
1281
1361
|
],
|
|
1282
|
-
children: /* @__PURE__ */
|
|
1362
|
+
children: /* @__PURE__ */ jsx16(Chevron, { direction, color: theme.textPrimary })
|
|
1283
1363
|
}
|
|
1284
1364
|
);
|
|
1285
1365
|
const text = status ?? (paged ? labels.compact(current, count) : null);
|
|
1286
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ jsxs13(View12, { role: "navigation", style: [styles11.row, style], children: [
|
|
1287
1367
|
button("left", canPrevious, paged ? () => onPageChange?.(current - 1) : onPrevious, labels.previous),
|
|
1288
|
-
text ? /* @__PURE__ */
|
|
1368
|
+
text ? /* @__PURE__ */ jsx16(Text6, { "aria-live": "polite", style: [styles11.status, { color: theme.textSecondary }], children: text }) : null,
|
|
1289
1369
|
button("right", canNext, paged ? () => onPageChange?.(current + 1) : onNext, labels.next)
|
|
1290
1370
|
] });
|
|
1291
1371
|
}
|
|
1292
|
-
var
|
|
1372
|
+
var styles11 = StyleSheet11.create({
|
|
1293
1373
|
row: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: 12 },
|
|
1294
|
-
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth:
|
|
1374
|
+
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth: StyleSheet11.hairlineWidth },
|
|
1295
1375
|
status: { fontSize: 13, fontWeight: "600", fontVariant: ["tabular-nums"] }
|
|
1296
1376
|
});
|
|
1297
1377
|
|
|
1298
|
-
// src/native/
|
|
1299
|
-
import {
|
|
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";
|
|
1300
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";
|
|
1301
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
|
+
|
|
1302
1460
|
// src/marks/yazakia-geometry.ts
|
|
1303
1461
|
var turquoise = marks.yazakia[marks.yazakia.length - 1][1];
|
|
1304
1462
|
var YAZAKIA = {
|
|
1305
1463
|
viewBox: "0 0 400 400",
|
|
1306
1464
|
croppedViewBox: "80 80 240 240",
|
|
1307
1465
|
center: 200,
|
|
1308
|
-
/** The two
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
/** The width of the arms and the stem: the weight of Orochia's body. */
|
|
1313
|
-
stroke: 36,
|
|
1314
|
-
/** The two heads, at the ends of the arms. */
|
|
1315
|
-
heads: [
|
|
1316
|
-
{ cx: 128, cy: 124, r: 28 },
|
|
1317
|
-
{ cx: 272, cy: 124, r: 28 }
|
|
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" }
|
|
1318
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 },
|
|
1319
1475
|
gradient: { x1: 110, y1: 300, x2: 290, y2: 100, stops: marks.yazakia },
|
|
1320
|
-
/**
|
|
1321
|
-
|
|
1322
|
-
highlight: "#f0fdfa",
|
|
1476
|
+
/** The light on the lens: bright at the top, fading down. */
|
|
1477
|
+
highlight: { color: "#f0fdfa", from: 0.75, to: 0.2 },
|
|
1323
1478
|
/** The pair: two nodes on the orbit, opposite each other, that turn with it. */
|
|
1324
1479
|
pair: { r: 8, at: [[40, 200], [360, 200]] },
|
|
1325
1480
|
glow: { color: turquoise, opacity: 0.16 },
|
|
@@ -1330,58 +1485,134 @@ var YAZAKIA = {
|
|
|
1330
1485
|
};
|
|
1331
1486
|
|
|
1332
1487
|
// src/native/YazakiaMark.tsx
|
|
1333
|
-
import { jsx as
|
|
1488
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1334
1489
|
function YazakiaMark({ size = 48, animated = true, title, neutral }) {
|
|
1335
1490
|
const { theme } = useTheme();
|
|
1336
|
-
const { Animated:
|
|
1491
|
+
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
1337
1492
|
const id = useSvgId("yzm");
|
|
1338
1493
|
const viewBox = size < 48 ? YAZAKIA.croppedViewBox : YAZAKIA.viewBox;
|
|
1339
1494
|
const stroke = neutral ?? theme.textMuted;
|
|
1340
|
-
const gradient = /* @__PURE__ */
|
|
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)) });
|
|
1341
1496
|
const fill = `url(#${id}a)`;
|
|
1342
|
-
return /* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */
|
|
1344
|
-
/* @__PURE__ */
|
|
1345
|
-
/* @__PURE__ */
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
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 })
|
|
1348
1503
|
] }),
|
|
1349
1504
|
gradient
|
|
1350
1505
|
] }),
|
|
1351
|
-
size >= 48 ? /* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */
|
|
1353
|
-
YAZAKIA.
|
|
1354
|
-
|
|
1355
|
-
|
|
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))
|
|
1356
1513
|
] }),
|
|
1357
|
-
/* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
YAZAKIA.pair.at.map(([cx, cy]) => /* @__PURE__ */
|
|
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))
|
|
1361
1518
|
] }) }),
|
|
1362
|
-
/* @__PURE__ */
|
|
1363
|
-
/* @__PURE__ */
|
|
1364
|
-
|
|
1365
|
-
|
|
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)` })
|
|
1366
1529
|
] }) })
|
|
1367
1530
|
] });
|
|
1368
1531
|
}
|
|
1369
1532
|
|
|
1370
1533
|
// src/native/ProductMark.tsx
|
|
1371
|
-
import { jsx as
|
|
1534
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1372
1535
|
function ProductMark({ id, ...props }) {
|
|
1373
|
-
if (id === "krizaka") return /* @__PURE__ */
|
|
1374
|
-
if (id === "orazaka") return /* @__PURE__ */
|
|
1375
|
-
if (id === "yazakia") return /* @__PURE__ */
|
|
1376
|
-
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 });
|
|
1377
1540
|
}
|
|
1378
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
|
+
|
|
1379
1610
|
// src/native/progress.tsx
|
|
1380
|
-
import * as
|
|
1381
|
-
import { Animated as
|
|
1382
|
-
import
|
|
1383
|
-
import { jsx as
|
|
1384
|
-
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);
|
|
1385
1616
|
var BAR = { sm: 4, md: 8, lg: 12 };
|
|
1386
1617
|
var RING = { sm: 40, md: 80, lg: 144 };
|
|
1387
1618
|
var STROKE = { sm: 12, md: 9, lg: 7 };
|
|
@@ -1392,21 +1623,21 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1392
1623
|
const known = typeof value === "number" && Number.isFinite(value);
|
|
1393
1624
|
const ratio = known ? Math.min(1, Math.max(0, value / (max || 1))) : 0;
|
|
1394
1625
|
const percent = Math.round(ratio * 100);
|
|
1395
|
-
const [progress] =
|
|
1396
|
-
const [spin] =
|
|
1397
|
-
const [track, setTrack] =
|
|
1398
|
-
|
|
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(() => {
|
|
1399
1630
|
if (reduce) {
|
|
1400
1631
|
progress.setValue(ratio);
|
|
1401
1632
|
return;
|
|
1402
1633
|
}
|
|
1403
|
-
const animation =
|
|
1634
|
+
const animation = Animated11.timing(progress, { toValue: ratio, duration: 700, easing: Easing7.out(Easing7.cubic), useNativeDriver: false });
|
|
1404
1635
|
animation.start();
|
|
1405
1636
|
return () => animation.stop();
|
|
1406
1637
|
}, [ratio, reduce, progress]);
|
|
1407
|
-
|
|
1638
|
+
React14.useEffect(() => {
|
|
1408
1639
|
if (known || reduce) return;
|
|
1409
|
-
const loop =
|
|
1640
|
+
const loop = Animated11.loop(Animated11.timing(spin, { toValue: 1, duration: 1200, easing: Easing7.linear, useNativeDriver: true }));
|
|
1410
1641
|
loop.start();
|
|
1411
1642
|
return () => {
|
|
1412
1643
|
loop.stop();
|
|
@@ -1422,9 +1653,9 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1422
1653
|
"aria-valuenow": known ? Math.min(max, Math.max(0, value)) : void 0,
|
|
1423
1654
|
"aria-valuetext": known ? valueText ?? `${percent}%` : valueText
|
|
1424
1655
|
};
|
|
1425
|
-
const gradient = /* @__PURE__ */
|
|
1426
|
-
/* @__PURE__ */
|
|
1427
|
-
/* @__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 })
|
|
1428
1659
|
] }) });
|
|
1429
1660
|
if (variant === "ring") {
|
|
1430
1661
|
const side = RING[size];
|
|
@@ -1433,11 +1664,11 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1433
1664
|
const circumference = 2 * Math.PI * r;
|
|
1434
1665
|
const offset = known ? progress.interpolate({ inputRange: [0, 1], outputRange: [circumference, 0] }) : circumference * 0.75;
|
|
1435
1666
|
const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] });
|
|
1436
|
-
return /* @__PURE__ */
|
|
1437
|
-
/* @__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: [
|
|
1438
1669
|
gradient,
|
|
1439
|
-
/* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ jsx21(Circle7, { cx: 50, cy: 50, r, fill: "none", stroke: theme.borderDefault, strokeWidth: stroke }),
|
|
1671
|
+
/* @__PURE__ */ jsx21(
|
|
1441
1672
|
AnimatedCircle,
|
|
1442
1673
|
{
|
|
1443
1674
|
cx: 50,
|
|
@@ -1457,48 +1688,48 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1457
1688
|
}
|
|
1458
1689
|
const width = known ? progress.interpolate({ inputRange: [0, 1], outputRange: ["0%", "100%"] }) : "40%";
|
|
1459
1690
|
const translate = spin.interpolate({ inputRange: [0, 1], outputRange: [-0.4 * track, track] });
|
|
1460
|
-
return /* @__PURE__ */
|
|
1461
|
-
|
|
1691
|
+
return /* @__PURE__ */ jsx21(
|
|
1692
|
+
View16,
|
|
1462
1693
|
{
|
|
1463
1694
|
...a11y,
|
|
1464
1695
|
onLayout: known ? void 0 : (event) => setTrack(event.nativeEvent.layout.width),
|
|
1465
|
-
style: [
|
|
1466
|
-
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: [
|
|
1467
1698
|
gradient,
|
|
1468
|
-
/* @__PURE__ */
|
|
1699
|
+
/* @__PURE__ */ jsx21(Rect3, { x: 0, y: 0, width: "100%", height: "100%", fill: `url(#${id})` })
|
|
1469
1700
|
] }) })
|
|
1470
1701
|
}
|
|
1471
1702
|
);
|
|
1472
1703
|
}
|
|
1473
|
-
var
|
|
1704
|
+
var styles13 = StyleSheet13.create({
|
|
1474
1705
|
ring: { alignItems: "center", justifyContent: "center" },
|
|
1475
1706
|
bar: { width: "100%", overflow: "hidden", borderRadius: 9999 },
|
|
1476
1707
|
fill: { height: "100%", overflow: "hidden", borderRadius: 9999 }
|
|
1477
1708
|
});
|
|
1478
1709
|
|
|
1479
1710
|
// src/native/search-field.tsx
|
|
1480
|
-
import * as
|
|
1481
|
-
import { Pressable as Pressable5, StyleSheet as
|
|
1482
|
-
import
|
|
1483
|
-
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";
|
|
1484
1715
|
function SearchField({ label, value, defaultValue = "", onValueChange, onSearch, debounce = 300, onSubmit, clearLabel, style, placeholder, ...props }) {
|
|
1485
1716
|
const { theme, radius: radius3 } = useTheme();
|
|
1486
|
-
const [own, setOwn] =
|
|
1717
|
+
const [own, setOwn] = React15.useState(defaultValue);
|
|
1487
1718
|
const query = value ?? own;
|
|
1488
|
-
const timer2 =
|
|
1489
|
-
|
|
1719
|
+
const timer2 = React15.useRef(void 0);
|
|
1720
|
+
React15.useEffect(() => () => clearTimeout(timer2.current), []);
|
|
1490
1721
|
const change = (next) => {
|
|
1491
1722
|
if (value === void 0) setOwn(next);
|
|
1492
1723
|
onValueChange?.(next);
|
|
1493
1724
|
clearTimeout(timer2.current);
|
|
1494
1725
|
if (onSearch) timer2.current = setTimeout(() => onSearch(next), debounce);
|
|
1495
1726
|
};
|
|
1496
|
-
return /* @__PURE__ */
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__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" })
|
|
1500
1731
|
] }),
|
|
1501
|
-
/* @__PURE__ */
|
|
1732
|
+
/* @__PURE__ */ jsx22(
|
|
1502
1733
|
TextInput,
|
|
1503
1734
|
{
|
|
1504
1735
|
role: "searchbox",
|
|
@@ -1516,33 +1747,33 @@ function SearchField({ label, value, defaultValue = "", onValueChange, onSearch,
|
|
|
1516
1747
|
onSearch?.(query);
|
|
1517
1748
|
onSubmit?.(query);
|
|
1518
1749
|
},
|
|
1519
|
-
style: [
|
|
1750
|
+
style: [styles14.input, { color: theme.textPrimary }],
|
|
1520
1751
|
...props
|
|
1521
1752
|
}
|
|
1522
1753
|
),
|
|
1523
|
-
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
|
|
1524
1755
|
] });
|
|
1525
1756
|
}
|
|
1526
|
-
var
|
|
1527
|
-
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 },
|
|
1528
1759
|
input: { flex: 1, height: "100%", fontSize: 15, paddingVertical: 0 },
|
|
1529
1760
|
clear: { width: 32, height: 32, alignItems: "center", justifyContent: "center" }
|
|
1530
1761
|
});
|
|
1531
1762
|
|
|
1532
1763
|
// src/native/segmented.tsx
|
|
1533
|
-
import { Pressable as Pressable6, StyleSheet as
|
|
1534
|
-
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";
|
|
1535
1766
|
function Segmented({ options, value, onValueChange, size = "md", "aria-label": label, style }) {
|
|
1536
1767
|
const { theme, radius: radius3 } = useTheme();
|
|
1537
|
-
return /* @__PURE__ */
|
|
1538
|
-
|
|
1768
|
+
return /* @__PURE__ */ jsx23(
|
|
1769
|
+
View18,
|
|
1539
1770
|
{
|
|
1540
1771
|
role: "tablist",
|
|
1541
1772
|
"aria-label": label,
|
|
1542
|
-
style: [
|
|
1773
|
+
style: [styles15.track, { backgroundColor: theme.surface2, borderColor: theme.borderSubtle, borderRadius: radius3.md, height: size === "sm" ? 32 : 40 }, style],
|
|
1543
1774
|
children: options.map((option) => {
|
|
1544
1775
|
const selected = option.value === value;
|
|
1545
|
-
return /* @__PURE__ */
|
|
1776
|
+
return /* @__PURE__ */ jsx23(
|
|
1546
1777
|
Pressable6,
|
|
1547
1778
|
{
|
|
1548
1779
|
role: "tab",
|
|
@@ -1553,12 +1784,12 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
1553
1784
|
if (!selected) onValueChange(option.value);
|
|
1554
1785
|
},
|
|
1555
1786
|
style: [
|
|
1556
|
-
|
|
1787
|
+
styles15.segment,
|
|
1557
1788
|
{ borderRadius: radius3.sm },
|
|
1558
1789
|
selected ? { backgroundColor: theme.surface0, borderColor: theme.borderDefault } : null,
|
|
1559
|
-
option.disabled ?
|
|
1790
|
+
option.disabled ? styles15.disabled : null
|
|
1560
1791
|
],
|
|
1561
|
-
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 })
|
|
1562
1793
|
},
|
|
1563
1794
|
option.value
|
|
1564
1795
|
);
|
|
@@ -1566,17 +1797,17 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
1566
1797
|
}
|
|
1567
1798
|
);
|
|
1568
1799
|
}
|
|
1569
|
-
var
|
|
1570
|
-
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth:
|
|
1571
|
-
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" },
|
|
1572
1803
|
label: { fontWeight: "600" },
|
|
1573
1804
|
disabled: { opacity: 0.4 }
|
|
1574
1805
|
});
|
|
1575
1806
|
|
|
1576
1807
|
// src/native/skeleton.tsx
|
|
1577
|
-
import * as
|
|
1578
|
-
import { Animated as
|
|
1579
|
-
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";
|
|
1580
1811
|
var SHAPE = {
|
|
1581
1812
|
text: { width: "100%", height: 12, radius: 4 },
|
|
1582
1813
|
circle: { width: 40, height: 40, radius: 9999 },
|
|
@@ -1585,13 +1816,13 @@ var SHAPE = {
|
|
|
1585
1816
|
function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
1586
1817
|
const { theme } = useTheme();
|
|
1587
1818
|
const reduce = useReducedMotion();
|
|
1588
|
-
const [opacity] =
|
|
1589
|
-
|
|
1819
|
+
const [opacity] = React16.useState(() => new Animated12.Value(1));
|
|
1820
|
+
React16.useEffect(() => {
|
|
1590
1821
|
if (reduce) return;
|
|
1591
|
-
const loop =
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
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 })
|
|
1595
1826
|
])
|
|
1596
1827
|
);
|
|
1597
1828
|
loop.start();
|
|
@@ -1602,8 +1833,8 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
1602
1833
|
}, [reduce, opacity]);
|
|
1603
1834
|
const s = SHAPE[shape];
|
|
1604
1835
|
const side = shape === "circle" ? width ?? height ?? s.width : void 0;
|
|
1605
|
-
return /* @__PURE__ */
|
|
1606
|
-
|
|
1836
|
+
return /* @__PURE__ */ jsx24(
|
|
1837
|
+
Animated12.View,
|
|
1607
1838
|
{
|
|
1608
1839
|
testID,
|
|
1609
1840
|
"aria-hidden": true,
|
|
@@ -1617,10 +1848,10 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
1617
1848
|
|
|
1618
1849
|
// src/native/spinner.tsx
|
|
1619
1850
|
import { ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
1620
|
-
import { jsx as
|
|
1851
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1621
1852
|
function Spinner({ label, size = "md", ...props }) {
|
|
1622
1853
|
const { theme } = useTheme();
|
|
1623
|
-
return /* @__PURE__ */
|
|
1854
|
+
return /* @__PURE__ */ jsx25(
|
|
1624
1855
|
ActivityIndicator2,
|
|
1625
1856
|
{
|
|
1626
1857
|
accessible: true,
|
|
@@ -1635,9 +1866,9 @@ function Spinner({ label, size = "md", ...props }) {
|
|
|
1635
1866
|
}
|
|
1636
1867
|
|
|
1637
1868
|
// src/native/toast.tsx
|
|
1638
|
-
import * as
|
|
1639
|
-
import { AccessibilityInfo as
|
|
1640
|
-
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";
|
|
1641
1872
|
var items = [];
|
|
1642
1873
|
var listeners2 = /* @__PURE__ */ new Set();
|
|
1643
1874
|
var counter = 0;
|
|
@@ -1672,30 +1903,30 @@ var toast = Object.assign(show, {
|
|
|
1672
1903
|
function ToastView({ item, closeLabel, duration }) {
|
|
1673
1904
|
const { theme, radius: radius3 } = useTheme();
|
|
1674
1905
|
const reduce = useReducedMotion();
|
|
1675
|
-
const [enter] =
|
|
1676
|
-
|
|
1906
|
+
const [enter] = React17.useState(() => new Animated13.Value(reduce ? 1 : 0));
|
|
1907
|
+
React17.useEffect(() => {
|
|
1677
1908
|
if (reduce) enter.setValue(1);
|
|
1678
|
-
else
|
|
1909
|
+
else Animated13.timing(enter, { toValue: 1, duration: 220, useNativeDriver: true }).start();
|
|
1679
1910
|
}, [enter, reduce]);
|
|
1680
|
-
|
|
1681
|
-
|
|
1911
|
+
React17.useEffect(() => {
|
|
1912
|
+
AccessibilityInfo8.announceForAccessibility(item.description ? `${item.title}. ${item.description}` : item.title);
|
|
1682
1913
|
}, [item.title, item.description]);
|
|
1683
1914
|
const ms = item.duration ?? duration;
|
|
1684
|
-
|
|
1915
|
+
React17.useEffect(() => {
|
|
1685
1916
|
if (!Number.isFinite(ms)) return;
|
|
1686
1917
|
const timer2 = setTimeout(() => dismiss(item.id), ms);
|
|
1687
1918
|
return () => clearTimeout(timer2);
|
|
1688
1919
|
}, [item.id, ms]);
|
|
1689
1920
|
const edge = { success: theme.success, warning: theme.warning, error: theme.danger, info: theme.info, default: theme.borderDefault }[item.tone ?? "default"];
|
|
1690
|
-
const text = /* @__PURE__ */
|
|
1691
|
-
item.icon ? /* @__PURE__ */
|
|
1692
|
-
/* @__PURE__ */
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
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
|
|
1695
1926
|
] })
|
|
1696
1927
|
] });
|
|
1697
|
-
const body = /* @__PURE__ */
|
|
1698
|
-
item.onPress ? /* @__PURE__ */
|
|
1928
|
+
const body = /* @__PURE__ */ jsxs19(Fragment3, { children: [
|
|
1929
|
+
item.onPress ? /* @__PURE__ */ jsx26(
|
|
1699
1930
|
Pressable7,
|
|
1700
1931
|
{
|
|
1701
1932
|
role: "button",
|
|
@@ -1703,11 +1934,11 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
1703
1934
|
item.onPress?.();
|
|
1704
1935
|
dismiss(item.id);
|
|
1705
1936
|
},
|
|
1706
|
-
style: ({ pressed }) => [
|
|
1937
|
+
style: ({ pressed }) => [styles16.main, { opacity: pressed ? 0.8 : 1 }],
|
|
1707
1938
|
children: text
|
|
1708
1939
|
}
|
|
1709
|
-
) : /* @__PURE__ */
|
|
1710
|
-
item.action ? /* @__PURE__ */
|
|
1940
|
+
) : /* @__PURE__ */ jsx26(View19, { style: styles16.main, children: text }),
|
|
1941
|
+
item.action ? /* @__PURE__ */ jsx26(
|
|
1711
1942
|
Pressable7,
|
|
1712
1943
|
{
|
|
1713
1944
|
role: "button",
|
|
@@ -1715,33 +1946,33 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
1715
1946
|
item.action?.onPress();
|
|
1716
1947
|
dismiss(item.id);
|
|
1717
1948
|
},
|
|
1718
|
-
style: [
|
|
1719
|
-
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 })
|
|
1720
1951
|
}
|
|
1721
1952
|
) : null,
|
|
1722
|
-
/* @__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" }) })
|
|
1723
1954
|
] });
|
|
1724
1955
|
const frame = [
|
|
1725
|
-
|
|
1956
|
+
styles16.toast,
|
|
1726
1957
|
{ backgroundColor: theme.surface2, borderColor: theme.borderDefault, borderLeftColor: edge, borderRadius: radius3.lg, shadowColor: theme.scrimStrong }
|
|
1727
1958
|
];
|
|
1728
1959
|
const motion3 = { transform: [{ translateY: enter.interpolate({ inputRange: [0, 1], outputRange: [-8, 0] }) }] };
|
|
1729
|
-
return /* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ jsx26(Animated13.View, { "aria-live": "polite", style: motion3, children: /* @__PURE__ */ jsx26(View19, { style: frame, children: body }) });
|
|
1730
1961
|
}
|
|
1731
1962
|
function Toaster({ closeLabel, position = "top", offset = 12, duration = 6e3, max = 3 }) {
|
|
1732
|
-
const all =
|
|
1963
|
+
const all = React17.useSyncExternalStore(subscribe2, snapshot, snapshot);
|
|
1733
1964
|
const shown = all.slice(-max);
|
|
1734
1965
|
if (shown.length === 0) return null;
|
|
1735
|
-
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)) });
|
|
1736
1967
|
}
|
|
1737
|
-
var
|
|
1968
|
+
var styles16 = StyleSheet16.create({
|
|
1738
1969
|
stack: { position: "absolute", left: 12, right: 12, gap: 8, zIndex: 100 },
|
|
1739
1970
|
toast: {
|
|
1740
1971
|
flexDirection: "row",
|
|
1741
1972
|
alignItems: "center",
|
|
1742
1973
|
gap: 10,
|
|
1743
1974
|
padding: 12,
|
|
1744
|
-
borderWidth:
|
|
1975
|
+
borderWidth: StyleSheet16.hairlineWidth,
|
|
1745
1976
|
borderLeftWidth: 4,
|
|
1746
1977
|
shadowOpacity: 0.3,
|
|
1747
1978
|
shadowRadius: 16,
|
|
@@ -1774,6 +2005,7 @@ export {
|
|
|
1774
2005
|
Countdown,
|
|
1775
2006
|
EmptyState,
|
|
1776
2007
|
ErrorState,
|
|
2008
|
+
GoalGauge,
|
|
1777
2009
|
IconButton,
|
|
1778
2010
|
KrizakaMark,
|
|
1779
2011
|
LoadingState,
|
|
@@ -1782,7 +2014,9 @@ export {
|
|
|
1782
2014
|
OrazakaMark,
|
|
1783
2015
|
OrochiaMark,
|
|
1784
2016
|
Pagination,
|
|
2017
|
+
Phoenix,
|
|
1785
2018
|
ProductMark,
|
|
2019
|
+
ProfileCard,
|
|
1786
2020
|
Progress,
|
|
1787
2021
|
SearchField,
|
|
1788
2022
|
Segmented,
|