@cogentic-co/ds 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animations/animation-ai-analysis.js +99 -4
- package/dist/animations/animation-ai-analysis.js.map +1 -1
- package/dist/animations/animation-audit-trail.js +194 -2
- package/dist/animations/animation-audit-trail.js.map +1 -1
- package/dist/animations/animation-compliance-reports.js +108 -3
- package/dist/animations/animation-compliance-reports.js.map +1 -1
- package/dist/animations/animation-custom-rules.js +107 -3
- package/dist/animations/animation-custom-rules.js.map +1 -1
- package/dist/animations/animation-jira-ticket.js +114 -3
- package/dist/animations/animation-jira-ticket.js.map +1 -1
- package/dist/animations/animation-jurisdiction-detection.js +122 -3
- package/dist/animations/animation-jurisdiction-detection.js.map +1 -1
- package/dist/animations/animation-multi-protocol.js +63 -2
- package/dist/animations/animation-multi-protocol.js.map +1 -1
- package/dist/animations/animation-pricing-preview.js +169 -3
- package/dist/animations/animation-pricing-preview.js.map +1 -1
- package/dist/animations/animation-realtime-updates.js +140 -4
- package/dist/animations/animation-realtime-updates.js.map +1 -1
- package/dist/animations/animation-rest-api.js +121 -2
- package/dist/animations/animation-rest-api.js.map +1 -1
- package/dist/animations/animation-risk-scoring.js +158 -4
- package/dist/animations/animation-risk-scoring.js.map +1 -1
- package/dist/animations/animation-sandbox.js +107 -2
- package/dist/animations/animation-sandbox.js.map +1 -1
- package/dist/animations/animation-scheduled-reports.js +107 -3
- package/dist/animations/animation-scheduled-reports.js.map +1 -1
- package/dist/animations/animation-secure-messaging.js +99 -3
- package/dist/animations/animation-secure-messaging.js.map +1 -1
- package/dist/animations/animation-slack-notification.js +90 -3
- package/dist/animations/animation-slack-notification.js.map +1 -1
- package/dist/animations/animation-sop-mapping.js +158 -2
- package/dist/animations/animation-sop-mapping.js.map +1 -1
- package/dist/animations/animation-team-routing.js +118 -4
- package/dist/animations/animation-team-routing.js.map +1 -1
- package/dist/animations/animation-teams-notification.js +89 -3
- package/dist/animations/animation-teams-notification.js.map +1 -1
- package/dist/animations/animation-vasp-identification.js +142 -3
- package/dist/animations/animation-vasp-identification.js.map +1 -1
- package/dist/animations/animation-webhooks.js +105 -3
- package/dist/animations/animation-webhooks.js.map +1 -1
- package/dist/blocks/auth-form.js +0 -1
- package/dist/blocks/feature-section.js +0 -1
- package/dist/blocks/hero-section.js +0 -1
- package/dist/blocks/pricing-table.js +0 -1
- package/dist/blocks/stat-card.js +0 -1
- package/dist/chart-DkwdRX-i.d.ts +50 -0
- package/dist/charts.d.ts +73 -3
- package/dist/charts.js +287 -2
- package/dist/charts.js.map +1 -1
- package/dist/chunk-6RWCZUAD.js +0 -1
- package/dist/chunk-GJAWCIGE.js +237 -0
- package/dist/chunk-GJAWCIGE.js.map +1 -0
- package/dist/chunk-GZNLQE3I.js +0 -1
- package/dist/chunk-TAPJEVUA.js +0 -1
- package/dist/index.d.ts +34 -52
- package/dist/index.js +109 -168
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
- package/dist/chunk-4YD3YS4B.js +0 -110
- package/dist/chunk-4YD3YS4B.js.map +0 -1
- package/dist/chunk-5JLZ42JT.js +0 -125
- package/dist/chunk-5JLZ42JT.js.map +0 -1
- package/dist/chunk-5OOO6TRA.js +0 -111
- package/dist/chunk-5OOO6TRA.js.map +0 -1
- package/dist/chunk-65Z2VEKG.js +0 -161
- package/dist/chunk-65Z2VEKG.js.map +0 -1
- package/dist/chunk-BTFYV3TI.js +0 -102
- package/dist/chunk-BTFYV3TI.js.map +0 -1
- package/dist/chunk-BTZB4JRC.js +0 -117
- package/dist/chunk-BTZB4JRC.js.map +0 -1
- package/dist/chunk-BZSA47MS.js +0 -121
- package/dist/chunk-BZSA47MS.js.map +0 -1
- package/dist/chunk-EFLWU2JP.js +0 -145
- package/dist/chunk-EFLWU2JP.js.map +0 -1
- package/dist/chunk-F7REPQOA.js +0 -93
- package/dist/chunk-F7REPQOA.js.map +0 -1
- package/dist/chunk-FKPK3CB7.js +0 -143
- package/dist/chunk-FKPK3CB7.js.map +0 -1
- package/dist/chunk-H7VUIMEL.js +0 -172
- package/dist/chunk-H7VUIMEL.js.map +0 -1
- package/dist/chunk-HTYR73ON.js +0 -161
- package/dist/chunk-HTYR73ON.js.map +0 -1
- package/dist/chunk-I26ZXVSY.js +0 -124
- package/dist/chunk-I26ZXVSY.js.map +0 -1
- package/dist/chunk-IKATDPHG.js +0 -92
- package/dist/chunk-IKATDPHG.js.map +0 -1
- package/dist/chunk-KUOF3XRZ.js +0 -108
- package/dist/chunk-KUOF3XRZ.js.map +0 -1
- package/dist/chunk-N7PBUY7G.js +0 -110
- package/dist/chunk-N7PBUY7G.js.map +0 -1
- package/dist/chunk-NAPDFVBI.js +0 -102
- package/dist/chunk-NAPDFVBI.js.map +0 -1
- package/dist/chunk-RTK7R4KZ.js +0 -66
- package/dist/chunk-RTK7R4KZ.js.map +0 -1
- package/dist/chunk-RZZTDJHG.js +0 -110
- package/dist/chunk-RZZTDJHG.js.map +0 -1
- package/dist/chunk-SNOJLZP4.js +0 -197
- package/dist/chunk-SNOJLZP4.js.map +0 -1
- package/dist/chunk-U4EPKN7G.js +0 -518
- package/dist/chunk-U4EPKN7G.js.map +0 -1
- package/dist/index-CcPuHWa-.d.ts +0 -118
|
@@ -1,7 +1,102 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '
|
|
2
|
+
import { EASE_OUT } from '../chunk-TAPJEVUA.js';
|
|
3
|
+
import { useAnimationTimer } from '../chunk-RXV2XUDZ.js';
|
|
4
|
+
import { cn } from '../chunk-GZNLQE3I.js';
|
|
5
|
+
import { Sparkles } from 'lucide-react';
|
|
6
|
+
import { LazyMotion, domAnimation, AnimatePresence, m } from 'motion/react';
|
|
7
|
+
import { useRef, useEffect } from 'react';
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var INSIGHTS = [
|
|
11
|
+
{
|
|
12
|
+
category: "Risk Assessment",
|
|
13
|
+
text: "Counterparty risk assessed as {low} based on VASP registration status and historical transaction patterns."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
category: "Threshold Analysis",
|
|
17
|
+
text: "Transfer {exceeds SGD 20,000} reporting threshold \u2014 enhanced due diligence triggered under MAS Notice PSN01."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
category: "Travel Rule",
|
|
21
|
+
text: "Beneficiary VASP {verified} against IVMS101 directory \u2014 originator and beneficiary data complete."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
category: "Jurisdiction Mapping",
|
|
25
|
+
text: "Corridor {SG \u2192 US} mapped \u2014 both counterparties subject to Travel Rule data requirements."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
category: "Sanctions Screening",
|
|
29
|
+
text: "Screening {cleared} \u2014 no matches found across OFAC SDN, EU consolidated, and UN sanctions lists."
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
function renderHighlightedText(text) {
|
|
33
|
+
const parts = text.split(/\{([^}]+)\}/g);
|
|
34
|
+
return parts.map(
|
|
35
|
+
(part, i) => i % 2 === 1 ? /* @__PURE__ */ jsx("span", { className: "rounded-sm bg-[#00D4FF]/10 px-1 font-medium text-[#0099BB]", children: part }, i) : /* @__PURE__ */ jsx("span", { children: part }, i)
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function AnimationAIAnalysis({ className }) {
|
|
39
|
+
const [timerRef, tick] = useAnimationTimer(2800);
|
|
40
|
+
const count = Math.min(tick + 1, 3);
|
|
41
|
+
const startIdx = Math.max(0, tick + 1 - count);
|
|
42
|
+
const visibleCards = Array.from({ length: count }, (_, i) => (startIdx + i) % INSIGHTS.length);
|
|
43
|
+
const scrollRef = useRef(null);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (scrollRef.current) {
|
|
46
|
+
scrollRef.current.scrollTo({
|
|
47
|
+
top: scrollRef.current.scrollHeight,
|
|
48
|
+
behavior: "smooth"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}, []);
|
|
52
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsx("div", { ref: timerRef, className: cn("flex flex-col overflow-hidden", className), children: /* @__PURE__ */ jsx(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
ref: scrollRef,
|
|
56
|
+
className: "scrollbar-none flex flex-1 flex-col gap-2.5 overflow-y-auto px-4 py-4",
|
|
57
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: visibleCards.map((insightIdx, i) => {
|
|
58
|
+
const insight = INSIGHTS[insightIdx];
|
|
59
|
+
const isLatest = i === visibleCards.length - 1;
|
|
60
|
+
return /* @__PURE__ */ jsxs(
|
|
61
|
+
m.div,
|
|
62
|
+
{
|
|
63
|
+
initial: { opacity: 0, y: 16 },
|
|
64
|
+
animate: { opacity: isLatest ? 1 : 0.5, y: 0 },
|
|
65
|
+
exit: { opacity: 0, y: -8 },
|
|
66
|
+
transition: { duration: 0.4, ease: EASE_OUT },
|
|
67
|
+
className: cn(
|
|
68
|
+
"shrink-0 rounded-xl border bg-white p-3.5 transition-shadow duration-300",
|
|
69
|
+
isLatest ? "border-gray-200 shadow-sm" : "border-gray-100"
|
|
70
|
+
),
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 font-medium text-[11px] text-gray-400", children: [
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
Sparkles,
|
|
75
|
+
{
|
|
76
|
+
className: cn("h-3 w-3", isLatest ? "text-[#00D4FF]" : "text-gray-300")
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
insight.category
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
"p",
|
|
83
|
+
{
|
|
84
|
+
className: cn(
|
|
85
|
+
"mt-1.5 text-[12px] leading-relaxed sm:text-[13px]",
|
|
86
|
+
isLatest ? "text-gray-700" : "text-gray-400"
|
|
87
|
+
),
|
|
88
|
+
children: renderHighlightedText(insight.text)
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
`${i}-${insightIdx}`
|
|
94
|
+
);
|
|
95
|
+
}) })
|
|
96
|
+
}
|
|
97
|
+
) }) });
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export { AnimationAIAnalysis as default };
|
|
6
101
|
//# sourceMappingURL=animation-ai-analysis.js.map
|
|
7
102
|
//# sourceMappingURL=animation-ai-analysis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"animation-ai-analysis.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/animations/animation-ai-analysis.tsx"],"names":[],"mappings":";;;;;;;;AAgBA,IAAM,QAAA,GAAsB;AAAA,EAC1B;AAAA,IACE,QAAA,EAAU,iBAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA;AAAA,IACE,QAAA,EAAU,oBAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA;AAAA,IACE,QAAA,EAAU,aAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA;AAAA,IACE,QAAA,EAAU,sBAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA;AAAA,IACE,QAAA,EAAU,qBAAA;AAAA,IACV,IAAA,EAAM;AAAA;AAEV,CAAA;AAEA,SAAS,sBAAsB,IAAA,EAAc;AAC3C,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,KAAA,CAAM,cAAc,CAAA;AACvC,EAAA,OAAO,KAAA,CAAM,GAAA;AAAA,IAAI,CAAC,IAAA,EAAM,CAAA,KACtB,CAAA,GAAI,CAAA,KAAM,oBACR,GAAA,CAAC,MAAA,EAAA,EAAa,SAAA,EAAU,4D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BzB;AAAA,MAEJ,CAAC,CAAA,EACH;AAAA;AAAA,KAEJ,CAAA,EACF,CAAA;AAEJ","file":"animation-ai-analysis.js","sourcesContent":["\"use client\"\n\nimport { Sparkles } from \"lucide-react\"\nimport { AnimatePresence, domAnimation, LazyMotion, m } from \"motion/react\"\nimport { useEffect, useRef } from \"react\"\n\nimport { useAnimationTimer } from \"../hooks/use-animation-timer\"\n\nimport { EASE_OUT } from \"../lib/animation\"\nimport { cn } from \"../lib/utils\"\n\ntype Insight = {\n category: string\n text: string\n}\n\nconst INSIGHTS: Insight[] = [\n {\n category: \"Risk Assessment\",\n text: \"Counterparty risk assessed as {low} based on VASP registration status and historical transaction patterns.\",\n },\n {\n category: \"Threshold Analysis\",\n text: \"Transfer {exceeds SGD 20,000} reporting threshold — enhanced due diligence triggered under MAS Notice PSN01.\",\n },\n {\n category: \"Travel Rule\",\n text: \"Beneficiary VASP {verified} against IVMS101 directory — originator and beneficiary data complete.\",\n },\n {\n category: \"Jurisdiction Mapping\",\n text: \"Corridor {SG → US} mapped — both counterparties subject to Travel Rule data requirements.\",\n },\n {\n category: \"Sanctions Screening\",\n text: \"Screening {cleared} — no matches found across OFAC SDN, EU consolidated, and UN sanctions lists.\",\n },\n]\n\nfunction renderHighlightedText(text: string) {\n const parts = text.split(/\\{([^}]+)\\}/g)\n return parts.map((part, i) =>\n i % 2 === 1 ? (\n <span key={i} className=\"rounded-sm bg-[#00D4FF]/10 px-1 font-medium text-[#0099BB]\">\n {part}\n </span>\n ) : (\n <span key={i}>{part}</span>\n ),\n )\n}\n\nexport default function AnimationAIAnalysis({ className }: { className?: string }) {\n const [timerRef, tick] = useAnimationTimer(2800)\n const count = Math.min(tick + 1, 3)\n const startIdx = Math.max(0, tick + 1 - count)\n const visibleCards = Array.from({ length: count }, (_, i) => (startIdx + i) % INSIGHTS.length)\n const scrollRef = useRef<HTMLDivElement>(null)\n\n // Auto-scroll to bottom when new card appears\n useEffect(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollTo({\n top: scrollRef.current.scrollHeight,\n behavior: \"smooth\",\n })\n }\n }, [])\n\n return (\n <LazyMotion features={domAnimation}>\n <div ref={timerRef} className={cn(\"flex flex-col overflow-hidden\", className)}>\n <div\n ref={scrollRef}\n className=\"scrollbar-none flex flex-1 flex-col gap-2.5 overflow-y-auto px-4 py-4\"\n >\n <AnimatePresence initial={false}>\n {visibleCards.map((insightIdx, i) => {\n const insight = INSIGHTS[insightIdx]\n const isLatest = i === visibleCards.length - 1\n return (\n <m.div\n key={`${i}-${insightIdx}`}\n initial={{ opacity: 0, y: 16 }}\n animate={{ opacity: isLatest ? 1 : 0.5, y: 0 }}\n exit={{ opacity: 0, y: -8 }}\n transition={{ duration: 0.4, ease: EASE_OUT }}\n className={cn(\n \"shrink-0 rounded-xl border bg-white p-3.5 transition-shadow duration-300\",\n isLatest ? \"border-gray-200 shadow-sm\" : \"border-gray-100\",\n )}\n >\n <div className=\"flex items-center gap-2 font-medium text-[11px] text-gray-400\">\n <Sparkles\n className={cn(\"h-3 w-3\", isLatest ? \"text-[#00D4FF]\" : \"text-gray-300\")}\n />\n {insight.category}\n </div>\n <p\n className={cn(\n \"mt-1.5 text-[12px] leading-relaxed sm:text-[13px]\",\n isLatest ? \"text-gray-700\" : \"text-gray-400\",\n )}\n >\n {renderHighlightedText(insight.text)}\n </p>\n </m.div>\n )\n })}\n </AnimatePresence>\n </div>\n </div>\n </LazyMotion>\n )\n}\n"]}
|
|
@@ -1,5 +1,197 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import '
|
|
2
|
+
import { cn } from '../chunk-GZNLQE3I.js';
|
|
3
|
+
import { FileText, AlertTriangle, CheckCircle2, ChevronRight } from 'lucide-react';
|
|
4
|
+
import { LazyMotion, domAnimation, m } from 'motion/react';
|
|
5
|
+
import { memo, useRef, useEffect, useState } from 'react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var AUDIT_SEQUENCES = [
|
|
9
|
+
[
|
|
10
|
+
{
|
|
11
|
+
timestamp: "14:32:01",
|
|
12
|
+
text: "Transfer TXN-0847 received \u2014 compliance check initiated",
|
|
13
|
+
type: "log"
|
|
14
|
+
},
|
|
15
|
+
{ timestamp: "14:32:02", text: "SOP AML/CFT Policy v3.2 applied", type: "log" },
|
|
16
|
+
{
|
|
17
|
+
timestamp: "14:32:03",
|
|
18
|
+
text: "Travel Rule verification \u2014 VASP identity confirmed",
|
|
19
|
+
type: "success"
|
|
20
|
+
},
|
|
21
|
+
{ timestamp: "14:32:04", text: "Sanctions screening \u2014 12,847 entries checked", type: "log" },
|
|
22
|
+
{
|
|
23
|
+
timestamp: "14:32:05",
|
|
24
|
+
text: "No sanctions matches found \u2014 OFAC, EU, UN clear",
|
|
25
|
+
type: "success"
|
|
26
|
+
},
|
|
27
|
+
{ timestamp: "14:32:06", text: "PEP screening \u2014 2 beneficial owners cleared", type: "success" },
|
|
28
|
+
{ timestamp: "14:32:07", text: "Risk score calculated: 18/100 \u2014 Low", type: "success" },
|
|
29
|
+
{ timestamp: "14:32:08", text: "Decision: APPROVED \u2014 all checks passed", type: "success" },
|
|
30
|
+
{
|
|
31
|
+
timestamp: "14:32:08",
|
|
32
|
+
text: "Compliance report generated \u2014 ref CR-2024-0847",
|
|
33
|
+
type: "report"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
{
|
|
38
|
+
timestamp: "14:33:12",
|
|
39
|
+
text: "Transfer TXN-0846 received \u2014 compliance check initiated",
|
|
40
|
+
type: "log"
|
|
41
|
+
},
|
|
42
|
+
{ timestamp: "14:33:13", text: "SOP Enhanced Due Diligence v2.1 applied", type: "log" },
|
|
43
|
+
{
|
|
44
|
+
timestamp: "14:33:14",
|
|
45
|
+
text: "Travel Rule verification \u2014 counterparty VASP verified",
|
|
46
|
+
type: "success"
|
|
47
|
+
},
|
|
48
|
+
{ timestamp: "14:33:15", text: "High-risk corridor detected (HK \u2192 GB)", type: "warning" },
|
|
49
|
+
{
|
|
50
|
+
timestamp: "14:33:16",
|
|
51
|
+
text: "Enhanced due diligence triggered \u2014 FATF grey list",
|
|
52
|
+
type: "warning"
|
|
53
|
+
},
|
|
54
|
+
{ timestamp: "14:33:17", text: "Amount exceeds USD 100K threshold", type: "warning" },
|
|
55
|
+
{ timestamp: "14:33:18", text: "Risk score calculated: 72/100 \u2014 High", type: "warning" },
|
|
56
|
+
{ timestamp: "14:33:19", text: "Decision: FLAGGED \u2014 manual review required", type: "warning" },
|
|
57
|
+
{
|
|
58
|
+
timestamp: "14:33:19",
|
|
59
|
+
text: "Escalation report generated \u2014 ref ESC-2024-0846",
|
|
60
|
+
type: "report"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
{
|
|
65
|
+
timestamp: "14:34:05",
|
|
66
|
+
text: "Transfer TXN-0845 received \u2014 compliance check initiated",
|
|
67
|
+
type: "log"
|
|
68
|
+
},
|
|
69
|
+
{ timestamp: "14:34:06", text: "SOP MiCA Compliance v1.4 applied", type: "log" },
|
|
70
|
+
{
|
|
71
|
+
timestamp: "14:34:07",
|
|
72
|
+
text: "Travel Rule verification \u2014 both VASPs registered",
|
|
73
|
+
type: "success"
|
|
74
|
+
},
|
|
75
|
+
{ timestamp: "14:34:08", text: "AE\u2192NL corridor approved \u2014 MiCA compliant", type: "success" },
|
|
76
|
+
{ timestamp: "14:34:09", text: "Sanctions screening \u2014 9,234 entries checked", type: "log" },
|
|
77
|
+
{ timestamp: "14:34:10", text: "All sanctions lists clear", type: "success" },
|
|
78
|
+
{ timestamp: "14:34:11", text: "Below EUR 10K threshold \u2014 no STR required", type: "success" },
|
|
79
|
+
{ timestamp: "14:34:12", text: "Risk score calculated: 12/100 \u2014 Low", type: "success" },
|
|
80
|
+
{
|
|
81
|
+
timestamp: "14:34:12",
|
|
82
|
+
text: "Compliance report generated \u2014 ref CR-2024-0845",
|
|
83
|
+
type: "report"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
];
|
|
87
|
+
var ENTRY_DELAY = 450;
|
|
88
|
+
var iconMap = {
|
|
89
|
+
log: ChevronRight,
|
|
90
|
+
success: CheckCircle2,
|
|
91
|
+
warning: AlertTriangle,
|
|
92
|
+
report: FileText
|
|
93
|
+
};
|
|
94
|
+
var colorMap = {
|
|
95
|
+
log: "text-foreground/80",
|
|
96
|
+
success: "text-emerald-600",
|
|
97
|
+
warning: "text-amber-600",
|
|
98
|
+
report: "text-violet-600"
|
|
99
|
+
};
|
|
100
|
+
var TypeWriter = memo(function TypeWriter2({ text }) {
|
|
101
|
+
const spanRef = useRef(null);
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
const el = spanRef.current;
|
|
104
|
+
if (!el) return;
|
|
105
|
+
let count = 0;
|
|
106
|
+
let raf;
|
|
107
|
+
function tick() {
|
|
108
|
+
count = Math.min(count + 3, text.length);
|
|
109
|
+
el.textContent = count < text.length ? `${text.slice(0, count)}\u258C` : text;
|
|
110
|
+
if (count < text.length) raf = requestAnimationFrame(tick);
|
|
111
|
+
}
|
|
112
|
+
raf = requestAnimationFrame(tick);
|
|
113
|
+
return () => cancelAnimationFrame(raf);
|
|
114
|
+
}, [text]);
|
|
115
|
+
return /* @__PURE__ */ jsx("span", { ref: spanRef });
|
|
116
|
+
});
|
|
117
|
+
function AnimationAuditTrail({ className }) {
|
|
118
|
+
const [seqIndex, setSeqIndex] = useState(0);
|
|
119
|
+
const [visibleEntries, setVisibleEntries] = useState([]);
|
|
120
|
+
const [entryCount, setEntryCount] = useState(0);
|
|
121
|
+
const scrollRef = useRef(null);
|
|
122
|
+
const timeoutRef = useRef(null);
|
|
123
|
+
const sequence = AUDIT_SEQUENCES[seqIndex];
|
|
124
|
+
useEffect(() => {
|
|
125
|
+
const el = scrollRef.current;
|
|
126
|
+
if (!el) return;
|
|
127
|
+
requestAnimationFrame(() => {
|
|
128
|
+
el.scrollTop = el.scrollHeight;
|
|
129
|
+
});
|
|
130
|
+
}, []);
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
133
|
+
setVisibleEntries([]);
|
|
134
|
+
setEntryCount(0);
|
|
135
|
+
const seq = AUDIT_SEQUENCES[seqIndex];
|
|
136
|
+
function streamEntry(idx) {
|
|
137
|
+
if (idx >= seq.length) {
|
|
138
|
+
timeoutRef.current = setTimeout(() => {
|
|
139
|
+
setSeqIndex((prev) => (prev + 1) % AUDIT_SEQUENCES.length);
|
|
140
|
+
}, 2e3);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
timeoutRef.current = setTimeout(() => {
|
|
144
|
+
setVisibleEntries((prev) => [...prev, seq[idx]]);
|
|
145
|
+
setEntryCount((c) => c + 1);
|
|
146
|
+
streamEntry(idx + 1);
|
|
147
|
+
}, ENTRY_DELAY);
|
|
148
|
+
}
|
|
149
|
+
const start = setTimeout(() => streamEntry(0), 300);
|
|
150
|
+
return () => {
|
|
151
|
+
clearTimeout(start);
|
|
152
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
153
|
+
};
|
|
154
|
+
}, [seqIndex]);
|
|
155
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", className), children: [
|
|
156
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-gray-100 border-b bg-gray-50/80 px-3 py-1.5", children: [
|
|
157
|
+
/* @__PURE__ */ jsxs("span", { className: "relative flex size-1.5", children: [
|
|
158
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inline-flex size-full animate-ping rounded-full bg-emerald-400 opacity-75" }),
|
|
159
|
+
/* @__PURE__ */ jsx("span", { className: "relative inline-flex size-1.5 rounded-full bg-emerald-500" })
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[10px] text-gray-700", children: "Audit Log" }),
|
|
162
|
+
/* @__PURE__ */ jsxs("span", { className: "ml-auto font-mono text-[10px] text-gray-400", children: [
|
|
163
|
+
entryCount,
|
|
164
|
+
" entries"
|
|
165
|
+
] })
|
|
166
|
+
] }),
|
|
167
|
+
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "scrollbar-none flex-1 overflow-y-auto px-3 py-2", children: /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
|
|
168
|
+
visibleEntries.map((entry, i) => {
|
|
169
|
+
const Icon = iconMap[entry.type];
|
|
170
|
+
return /* @__PURE__ */ jsxs(
|
|
171
|
+
m.div,
|
|
172
|
+
{
|
|
173
|
+
initial: { opacity: 0, y: 4 },
|
|
174
|
+
animate: { opacity: 1, y: 0 },
|
|
175
|
+
transition: { duration: 0.25, ease: "easeOut" },
|
|
176
|
+
className: "flex items-start gap-1.5 font-mono text-[10px] leading-relaxed",
|
|
177
|
+
children: [
|
|
178
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-foreground", children: entry.timestamp }),
|
|
179
|
+
/* @__PURE__ */ jsx(Icon, { className: cn("mt-0.5 size-2.5 shrink-0", colorMap[entry.type]) }),
|
|
180
|
+
/* @__PURE__ */ jsx("span", { className: cn(colorMap[entry.type]), children: /* @__PURE__ */ jsx(TypeWriter, { text: entry.text }) })
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
`${seqIndex}-${i}`
|
|
184
|
+
);
|
|
185
|
+
}),
|
|
186
|
+
visibleEntries.length < sequence.length && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 font-mono text-[10px] text-gray-300", children: [
|
|
187
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-transparent", children: "00:00:00" }),
|
|
188
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "size-2.5 shrink-0" }),
|
|
189
|
+
/* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "\u258C" })
|
|
190
|
+
] })
|
|
191
|
+
] }) })
|
|
192
|
+
] }) });
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export { AnimationAuditTrail as default };
|
|
4
196
|
//# sourceMappingURL=animation-audit-trail.js.map
|
|
5
197
|
//# sourceMappingURL=animation-audit-trail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"animation-audit-trail.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/animations/animation-audit-trail.tsx"],"names":["TypeWriter"],"mappings":";;;;;;AAgBA,IAAM,eAAA,GAAkC;AAAA,EACtC;AAAA,IACE;AAAA,MACE,SAAA,EAAW,UAAA;AAAA,MACX,IAAA,EAAM,8DAAA;AAAA,MACN,IAAA,EAAM;AAAA,KACR;AAAA,IACA,EAAE,SAAA,EAAW,UAAA,EAAY,IAAA,EAAM,iCAAA,EAAmC,MAAM,KAAA,EAAM;AAAA,IAC9E;AAAA,MACE,SAAA,EAAW,UAAA;AAAA,MACX,IAAA,EAAM,yDAAA;AAAA,MACN,IAAA,EAAM;AAAA,KACR;AAAA,IACA,EAAE,SAAA,EAAW,UAAA,EAAY,IAAA,EAAM,mDAAA,EAAgD,MAAM,KAAA,EAAM;AAAA,IAC3F;AAAA,MACE,SAAA,EAAW,UAAA;AAAA,MACX,IAAA,EAAM,sDAAA;AAAA,MACN,IAAA,EAAM;AAAA,KACR;AAAA,IACA,EAAE,SAAA,EAAW,UAAA,EAAY,IAAA,EAAM,kDAAA,EAA+C,MAAM,SAAA,EAAU;AAAA,IAC9F,EAAE,SAAA,EAAW,UAAA,EAAY,IAAA,EAAM,0CAAA,EAAuC,MAAM,SAAA,EAAU;AAAA,IACtF,EAAE,SAAA,EAAW,UAAA,EAAY,IAAA,EAAM,6CAAA,EAA0C,MAAM,SAAA,EAAU;AAAA,IACzF;AAAA,MACE,SAAA,EAAW,UAAA;AAAA,MACX,IAAA,EAAM,qDAAA;AAAA,MACN,IAAA,EAAM;AAAA;AACR,GACF;AAAA,EACA;AAAA,IACE;AAAA,MACE,SAAA,EAAW,UAAA;AAAA,MACX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,8BAC5D,GAAA,CAAC,QAAK,SAAA,EAAW,EAAA,CAAG,4BAA4B,QAAA,CAAS,KAAA,CAAM,IAAI,CAAC,CAAA,EAAG,CAAA;AAAA,8BACvE,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAW,EAAA,CAAG,SAAS,KAAA,CAAM,IAAI,CAAC,CAAA,EACtC,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,KAAA,CAAM,MAAM,CAAA,EAChC;AAAA;AAAA,WAAA;AAAA,UAVK,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,CAAC,CAAA;AAAA,SAWvB;AAAA,MAEJ,CAAC,CAAA;AAAA,MACA,eAAe,MAAA,GAAS,QAAA,CAAS,0BAChC,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,+DAAA,EACb,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,2BAAA,EAA4B,QAAA,EAAA,UAAA,EAAQ,CAAA;AAAA,wBACpD,GAAA,CAAC,YAAA,EAAA,EAAa,SAAA,EAAU,mBAAA,EAAoB,CAAA;AAAA,wBAC5C,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,eAAA,EAAgB,QAAA,EAAA,QAAA,EAAC;AAAA,OAAA,EACnC;AAAA,KAAA,EAEJ,CAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ","file":"animation-audit-trail.js","sourcesContent":["\"use client\"\n\nimport { AlertTriangle, CheckCircle2, ChevronRight, FileText } from \"lucide-react\"\nimport { domAnimation, LazyMotion, m } from \"motion/react\"\nimport { memo, useEffect, useRef, useState } from \"react\"\n\nimport { cn } from \"../lib/utils\"\n\ntype EntryType = \"log\" | \"success\" | \"warning\" | \"report\"\n\ninterface AuditEntry {\n timestamp: string\n text: string\n type: EntryType\n}\n\nconst AUDIT_SEQUENCES: AuditEntry[][] = [\n [\n {\n timestamp: \"14:32:01\",\n text: \"Transfer TXN-0847 received — compliance check initiated\",\n type: \"log\",\n },\n { timestamp: \"14:32:02\", text: \"SOP AML/CFT Policy v3.2 applied\", type: \"log\" },\n {\n timestamp: \"14:32:03\",\n text: \"Travel Rule verification — VASP identity confirmed\",\n type: \"success\",\n },\n { timestamp: \"14:32:04\", text: \"Sanctions screening — 12,847 entries checked\", type: \"log\" },\n {\n timestamp: \"14:32:05\",\n text: \"No sanctions matches found — OFAC, EU, UN clear\",\n type: \"success\",\n },\n { timestamp: \"14:32:06\", text: \"PEP screening — 2 beneficial owners cleared\", type: \"success\" },\n { timestamp: \"14:32:07\", text: \"Risk score calculated: 18/100 — Low\", type: \"success\" },\n { timestamp: \"14:32:08\", text: \"Decision: APPROVED — all checks passed\", type: \"success\" },\n {\n timestamp: \"14:32:08\",\n text: \"Compliance report generated — ref CR-2024-0847\",\n type: \"report\",\n },\n ],\n [\n {\n timestamp: \"14:33:12\",\n text: \"Transfer TXN-0846 received — compliance check initiated\",\n type: \"log\",\n },\n { timestamp: \"14:33:13\", text: \"SOP Enhanced Due Diligence v2.1 applied\", type: \"log\" },\n {\n timestamp: \"14:33:14\",\n text: \"Travel Rule verification — counterparty VASP verified\",\n type: \"success\",\n },\n { timestamp: \"14:33:15\", text: \"High-risk corridor detected (HK → GB)\", type: \"warning\" },\n {\n timestamp: \"14:33:16\",\n text: \"Enhanced due diligence triggered — FATF grey list\",\n type: \"warning\",\n },\n { timestamp: \"14:33:17\", text: \"Amount exceeds USD 100K threshold\", type: \"warning\" },\n { timestamp: \"14:33:18\", text: \"Risk score calculated: 72/100 — High\", type: \"warning\" },\n { timestamp: \"14:33:19\", text: \"Decision: FLAGGED — manual review required\", type: \"warning\" },\n {\n timestamp: \"14:33:19\",\n text: \"Escalation report generated — ref ESC-2024-0846\",\n type: \"report\",\n },\n ],\n [\n {\n timestamp: \"14:34:05\",\n text: \"Transfer TXN-0845 received — compliance check initiated\",\n type: \"log\",\n },\n { timestamp: \"14:34:06\", text: \"SOP MiCA Compliance v1.4 applied\", type: \"log\" },\n {\n timestamp: \"14:34:07\",\n text: \"Travel Rule verification — both VASPs registered\",\n type: \"success\",\n },\n { timestamp: \"14:34:08\", text: \"AE→NL corridor approved — MiCA compliant\", type: \"success\" },\n { timestamp: \"14:34:09\", text: \"Sanctions screening — 9,234 entries checked\", type: \"log\" },\n { timestamp: \"14:34:10\", text: \"All sanctions lists clear\", type: \"success\" },\n { timestamp: \"14:34:11\", text: \"Below EUR 10K threshold — no STR required\", type: \"success\" },\n { timestamp: \"14:34:12\", text: \"Risk score calculated: 12/100 — Low\", type: \"success\" },\n {\n timestamp: \"14:34:12\",\n text: \"Compliance report generated — ref CR-2024-0845\",\n type: \"report\",\n },\n ],\n]\n\nconst ENTRY_DELAY = 450\n\nconst iconMap: Record<EntryType, typeof CheckCircle2> = {\n log: ChevronRight,\n success: CheckCircle2,\n warning: AlertTriangle,\n report: FileText,\n}\n\nconst colorMap: Record<EntryType, string> = {\n log: \"text-foreground/80\",\n success: \"text-emerald-600\",\n warning: \"text-amber-600\",\n report: \"text-violet-600\",\n}\n\nconst TypeWriter = memo(function TypeWriter({ text }: { text: string }) {\n const spanRef = useRef<HTMLSpanElement>(null)\n\n useEffect(() => {\n const el = spanRef.current\n if (!el) return\n let count = 0\n let raf: number\n\n function tick() {\n count = Math.min(count + 3, text.length)\n el!.textContent = count < text.length ? `${text.slice(0, count)}▌` : text\n if (count < text.length) raf = requestAnimationFrame(tick)\n }\n\n raf = requestAnimationFrame(tick)\n return () => cancelAnimationFrame(raf)\n }, [text])\n\n return <span ref={spanRef} />\n})\n\nexport default function AnimationAuditTrail({ className }: { className?: string }) {\n const [seqIndex, setSeqIndex] = useState(0)\n const [visibleEntries, setVisibleEntries] = useState<AuditEntry[]>([])\n const [entryCount, setEntryCount] = useState(0)\n const scrollRef = useRef<HTMLDivElement>(null)\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n const sequence = AUDIT_SEQUENCES[seqIndex]\n\n // Auto-scroll (deferred to avoid layout thrashing)\n useEffect(() => {\n const el = scrollRef.current\n if (!el) return\n requestAnimationFrame(() => {\n el.scrollTop = el.scrollHeight\n })\n }, [])\n\n useEffect(() => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n\n // Clear immediately so stale entries don't flash with new keys\n setVisibleEntries([])\n setEntryCount(0)\n\n const seq = AUDIT_SEQUENCES[seqIndex]\n\n function streamEntry(idx: number) {\n if (idx >= seq.length) {\n timeoutRef.current = setTimeout(() => {\n setSeqIndex((prev) => (prev + 1) % AUDIT_SEQUENCES.length)\n }, 2000)\n return\n }\n\n timeoutRef.current = setTimeout(() => {\n setVisibleEntries((prev) => [...prev, seq[idx]])\n setEntryCount((c) => c + 1)\n streamEntry(idx + 1)\n }, ENTRY_DELAY)\n }\n\n const start = setTimeout(() => streamEntry(0), 300)\n return () => {\n clearTimeout(start)\n if (timeoutRef.current) clearTimeout(timeoutRef.current)\n }\n }, [seqIndex])\n\n return (\n <LazyMotion features={domAnimation}>\n <div className={cn(\"flex flex-col\", className)}>\n {/* Mini header */}\n <div className=\"flex items-center gap-2 border-gray-100 border-b bg-gray-50/80 px-3 py-1.5\">\n <span className=\"relative flex size-1.5\">\n <span className=\"absolute inline-flex size-full animate-ping rounded-full bg-emerald-400 opacity-75\" />\n <span className=\"relative inline-flex size-1.5 rounded-full bg-emerald-500\" />\n </span>\n <span className=\"font-semibold text-[10px] text-gray-700\">Audit Log</span>\n <span className=\"ml-auto font-mono text-[10px] text-gray-400\">{entryCount} entries</span>\n </div>\n\n {/* Log entries */}\n <div ref={scrollRef} className=\"scrollbar-none flex-1 overflow-y-auto px-3 py-2\">\n <div className=\"space-y-0.5\">\n {visibleEntries.map((entry, i) => {\n const Icon = iconMap[entry.type]\n return (\n <m.div\n key={`${seqIndex}-${i}`}\n initial={{ opacity: 0, y: 4 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.25, ease: \"easeOut\" }}\n className=\"flex items-start gap-1.5 font-mono text-[10px] leading-relaxed\"\n >\n <span className=\"shrink-0 text-foreground\">{entry.timestamp}</span>\n <Icon className={cn(\"mt-0.5 size-2.5 shrink-0\", colorMap[entry.type])} />\n <span className={cn(colorMap[entry.type])}>\n <TypeWriter text={entry.text} />\n </span>\n </m.div>\n )\n })}\n {visibleEntries.length < sequence.length && (\n <div className=\"flex items-center gap-1.5 font-mono text-[10px] text-gray-300\">\n <span className=\"shrink-0 text-transparent\">00:00:00</span>\n <ChevronRight className=\"size-2.5 shrink-0\" />\n <span className=\"animate-pulse\">▌</span>\n </div>\n )}\n </div>\n </div>\n </div>\n </LazyMotion>\n )\n}\n"]}
|
|
@@ -1,7 +1,112 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import '../chunk-6RWCZUAD.js';
|
|
2
|
+
import { useCycleIndex } from '../chunk-6RWCZUAD.js';
|
|
4
3
|
import '../chunk-RXV2XUDZ.js';
|
|
5
|
-
import '../chunk-GZNLQE3I.js';
|
|
4
|
+
import { cn } from '../chunk-GZNLQE3I.js';
|
|
5
|
+
import { FileText, CheckCircle2, Download } from 'lucide-react';
|
|
6
|
+
import { LazyMotion, domAnimation, m } from 'motion/react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var REPORTS = [
|
|
10
|
+
{
|
|
11
|
+
ref: "CR-2024-Q4",
|
|
12
|
+
title: "AUSTRAC Compliance Report",
|
|
13
|
+
jurisdiction: "Australia",
|
|
14
|
+
flag: "\u{1F1E6}\u{1F1FA}",
|
|
15
|
+
period: "Q4 2024",
|
|
16
|
+
status: "Generated",
|
|
17
|
+
sections: [
|
|
18
|
+
{ name: "Transfers screened", items: 4821 },
|
|
19
|
+
{ name: "STRs filed", items: 3 },
|
|
20
|
+
{ name: "Sanctions hits", items: 0 },
|
|
21
|
+
{ name: "Travel Rule compliance", items: 99 }
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
ref: "CR-2024-MAS",
|
|
26
|
+
title: "MAS Regulatory Filing",
|
|
27
|
+
jurisdiction: "Singapore",
|
|
28
|
+
flag: "\u{1F1F8}\u{1F1EC}",
|
|
29
|
+
period: "H2 2024",
|
|
30
|
+
status: "Generated",
|
|
31
|
+
sections: [
|
|
32
|
+
{ name: "Transfers screened", items: 2340 },
|
|
33
|
+
{ name: "High-risk flagged", items: 18 },
|
|
34
|
+
{ name: "EDD completed", items: 18 },
|
|
35
|
+
{ name: "Travel Rule compliance", items: 100 }
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
function AnimationComplianceReports({ className }) {
|
|
40
|
+
const [containerRef, index] = useCycleIndex(REPORTS.length, 4500);
|
|
41
|
+
const r = REPORTS[index];
|
|
42
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsxs("div", { ref: containerRef, className: cn("flex flex-col p-5", className), children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
44
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
45
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-[15px] text-foreground", children: "Compliance Reports" }),
|
|
46
|
+
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-gray-400", children: "One-click generation" })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ jsx(FileText, { className: "size-4 text-gray-400" })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ jsxs(
|
|
51
|
+
m.div,
|
|
52
|
+
{
|
|
53
|
+
initial: { opacity: 0, y: 6 },
|
|
54
|
+
animate: { opacity: 1, y: 0 },
|
|
55
|
+
transition: { duration: 0.3 },
|
|
56
|
+
className: "mt-4 rounded-lg border border-gray-100 bg-gray-50",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-gray-100 border-b px-4 py-3", children: [
|
|
59
|
+
/* @__PURE__ */ jsx("span", { className: "text-lg", children: r.flag }),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
61
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-[13px] text-gray-900", children: r.title }),
|
|
62
|
+
/* @__PURE__ */ jsxs("p", { className: "text-[10px] text-gray-400", children: [
|
|
63
|
+
r.ref,
|
|
64
|
+
" ",
|
|
65
|
+
"\u2022",
|
|
66
|
+
" ",
|
|
67
|
+
r.period
|
|
68
|
+
] })
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 rounded-full bg-emerald-50 px-2 py-0.5", children: [
|
|
71
|
+
/* @__PURE__ */ jsx(CheckCircle2, { className: "size-3 text-emerald-500" }),
|
|
72
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[10px] text-emerald-700", children: r.status })
|
|
73
|
+
] })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-2 p-3", children: r.sections.map((s, i) => /* @__PURE__ */ jsxs(
|
|
76
|
+
m.div,
|
|
77
|
+
{
|
|
78
|
+
initial: { opacity: 0, y: 4 },
|
|
79
|
+
animate: { opacity: 1, y: 0 },
|
|
80
|
+
transition: { delay: 0.1 + i * 0.08 },
|
|
81
|
+
className: "rounded-md bg-white px-3 py-2",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] text-gray-400", children: s.name }),
|
|
84
|
+
/* @__PURE__ */ jsx("p", { className: "mt-0.5 font-bold font-mono text-[14px] text-gray-900", children: typeof s.items === "number" && s.items > 100 ? s.items.toLocaleString() : s.name.includes("compliance") ? `${s.items}%` : s.items })
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
s.name
|
|
88
|
+
)) })
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
`report-${index}`
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsxs(
|
|
94
|
+
m.div,
|
|
95
|
+
{
|
|
96
|
+
initial: { opacity: 0 },
|
|
97
|
+
animate: { opacity: 1 },
|
|
98
|
+
transition: { delay: 0.4 },
|
|
99
|
+
className: "mt-3 flex items-center justify-center gap-2 rounded-lg border border-gray-200 bg-white py-2 font-medium text-[12px] text-gray-600",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx(Download, { className: "size-3.5" }),
|
|
102
|
+
"Download PDF"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
`dl-${index}`
|
|
106
|
+
)
|
|
107
|
+
] }) });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { AnimationComplianceReports as default };
|
|
6
111
|
//# sourceMappingURL=animation-compliance-reports.js.map
|
|
7
112
|
//# sourceMappingURL=animation-compliance-reports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"animation-compliance-reports.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/animations/animation-compliance-reports.tsx"],"names":[],"mappings":";;;;;;;AAmBA,IAAM,OAAA,GAAoB;AAAA,EACxB;AAAA,IACE,GAAA,EAAK,YAAA;AAAA,IACL,KAAA,EAAO,2BAAA;AAAA,IACP,YAAA,EAAc,WAAA;AAAA,IACd,IAAA,EAAM,oBAAA;AAAA,IACN,MAAA,EAAQ,SAAA;AAAA,IACR,MAAA,EAAQ,WAAA;AAAA,IACR,QAAA,EAAU;AAAA,MACR,EAAE,IAAA,EAAM,oBAAA,EAAsB,KAAA,EAAO,IAAA,EAAK;AAAA,MAC1C,EAAE,IAAA,EAAM,YAAA,EAAc,KAAA,EAAO,CAAA,EAAE;AAAA,MAC/B,EAAE,IAAA,EAAM,gBAAA,EAAkB,KAAA,EAAO,CAAA,EAAE;AAAA,MACnC,EAAE,IAAA,EAAM,wBAAA,EAA0B,KAAA,EAAO,EAAA;AAAG;AAC9C,GACF;AAAA,EACA;AAAA,IACE,GAAA,E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AAE;AAAA,QACtB,UAAA,EAAY,EAAE,KAAA,EAAO,GAAA,EAAI;AAAA,QACzB,SAAA,EAAU,mIAAA;AAAA,QAEV,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,QAAA,EAAA,EAAS,WAAU,UAAA,EAAW,CAAA;AAAA,UAAE;AAAA;AAAA,OAAA;AAAA,MAN5B,MAAM,KAAK,CAAA;AAAA;AAQlB,GAAA,EACF,CAAA,EACF,CAAA;AAEJ","file":"animation-compliance-reports.js","sourcesContent":["\"use client\"\n\nimport { CheckCircle2, Download, FileText } from \"lucide-react\"\nimport { domAnimation, LazyMotion, m } from \"motion/react\"\n\nimport { useCycleIndex } from \"../hooks/use-cycle-index\"\n\nimport { cn } from \"../lib/utils\"\n\ntype Report = {\n ref: string\n title: string\n jurisdiction: string\n flag: string\n period: string\n status: \"Generated\" | \"Pending\"\n sections: { name: string; items: number }[]\n}\n\nconst REPORTS: Report[] = [\n {\n ref: \"CR-2024-Q4\",\n title: \"AUSTRAC Compliance Report\",\n jurisdiction: \"Australia\",\n flag: \"\\u{1F1E6}\\u{1F1FA}\",\n period: \"Q4 2024\",\n status: \"Generated\",\n sections: [\n { name: \"Transfers screened\", items: 4821 },\n { name: \"STRs filed\", items: 3 },\n { name: \"Sanctions hits\", items: 0 },\n { name: \"Travel Rule compliance\", items: 99 },\n ],\n },\n {\n ref: \"CR-2024-MAS\",\n title: \"MAS Regulatory Filing\",\n jurisdiction: \"Singapore\",\n flag: \"\\u{1F1F8}\\u{1F1EC}\",\n period: \"H2 2024\",\n status: \"Generated\",\n sections: [\n { name: \"Transfers screened\", items: 2340 },\n { name: \"High-risk flagged\", items: 18 },\n { name: \"EDD completed\", items: 18 },\n { name: \"Travel Rule compliance\", items: 100 },\n ],\n },\n]\n\nexport default function AnimationComplianceReports({ className }: { className?: string }) {\n const [containerRef, index] = useCycleIndex(REPORTS.length, 4500)\n\n const r = REPORTS[index]\n\n return (\n <LazyMotion features={domAnimation}>\n <div ref={containerRef} className={cn(\"flex flex-col p-5\", className)}>\n {/* Header */}\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-semibold text-[15px] text-foreground\">Compliance Reports</p>\n <p className=\"text-[12px] text-gray-400\">One-click generation</p>\n </div>\n <FileText className=\"size-4 text-gray-400\" />\n </div>\n\n {/* Report card */}\n <m.div\n key={`report-${index}`}\n initial={{ opacity: 0, y: 6 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.3 }}\n className=\"mt-4 rounded-lg border border-gray-100 bg-gray-50\"\n >\n <div className=\"flex items-center gap-3 border-gray-100 border-b px-4 py-3\">\n <span className=\"text-lg\">{r.flag}</span>\n <div className=\"flex-1\">\n <p className=\"font-semibold text-[13px] text-gray-900\">{r.title}</p>\n <p className=\"text-[10px] text-gray-400\">\n {r.ref} {\"\\u2022\"} {r.period}\n </p>\n </div>\n <div className=\"flex items-center gap-1.5 rounded-full bg-emerald-50 px-2 py-0.5\">\n <CheckCircle2 className=\"size-3 text-emerald-500\" />\n <span className=\"font-semibold text-[10px] text-emerald-700\">{r.status}</span>\n </div>\n </div>\n\n {/* Report sections */}\n <div className=\"grid grid-cols-2 gap-2 p-3\">\n {r.sections.map((s, i) => (\n <m.div\n key={s.name}\n initial={{ opacity: 0, y: 4 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ delay: 0.1 + i * 0.08 }}\n className=\"rounded-md bg-white px-3 py-2\"\n >\n <p className=\"text-[10px] text-gray-400\">{s.name}</p>\n <p className=\"mt-0.5 font-bold font-mono text-[14px] text-gray-900\">\n {typeof s.items === \"number\" && s.items > 100\n ? s.items.toLocaleString()\n : s.name.includes(\"compliance\")\n ? `${s.items}%`\n : s.items}\n </p>\n </m.div>\n ))}\n </div>\n </m.div>\n\n {/* Download button mock */}\n <m.div\n key={`dl-${index}`}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n transition={{ delay: 0.4 }}\n className=\"mt-3 flex items-center justify-center gap-2 rounded-lg border border-gray-200 bg-white py-2 font-medium text-[12px] text-gray-600\"\n >\n <Download className=\"size-3.5\" />\n Download PDF\n </m.div>\n </div>\n </LazyMotion>\n )\n}\n"]}
|
|
@@ -1,7 +1,111 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import '../chunk-6RWCZUAD.js';
|
|
2
|
+
import { useCycleIndex } from '../chunk-6RWCZUAD.js';
|
|
4
3
|
import '../chunk-RXV2XUDZ.js';
|
|
5
|
-
import '../chunk-GZNLQE3I.js';
|
|
4
|
+
import { cn } from '../chunk-GZNLQE3I.js';
|
|
5
|
+
import { ShieldCheck, AlertTriangle } from 'lucide-react';
|
|
6
|
+
import { LazyMotion, domAnimation, m } from 'motion/react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var RULES = [
|
|
10
|
+
{
|
|
11
|
+
id: "CR-001",
|
|
12
|
+
name: "High-value transfer flag",
|
|
13
|
+
condition: "IF amount > USD 50,000",
|
|
14
|
+
action: "THEN escalate to senior analyst",
|
|
15
|
+
status: "active",
|
|
16
|
+
triggers: "142 this month"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "CR-007",
|
|
20
|
+
name: "Grey-list jurisdiction",
|
|
21
|
+
condition: "IF jurisdiction IN fatf_grey_list",
|
|
22
|
+
action: "THEN apply enhanced due diligence",
|
|
23
|
+
status: "triggered",
|
|
24
|
+
triggers: "28 this month"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "CR-012",
|
|
28
|
+
name: "Repeat counterparty check",
|
|
29
|
+
condition: "IF counterparty_txns > 5 in 24h",
|
|
30
|
+
action: "THEN flag for velocity review",
|
|
31
|
+
status: "active",
|
|
32
|
+
triggers: "9 this month"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: "CR-019",
|
|
36
|
+
name: "New VASP verification",
|
|
37
|
+
condition: "IF counterparty.first_seen < 30d",
|
|
38
|
+
action: "THEN require manual VASP check",
|
|
39
|
+
status: "active",
|
|
40
|
+
triggers: "67 this month"
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
var statusStyle = {
|
|
44
|
+
active: { bg: "bg-emerald-50 text-emerald-700", label: "Active" },
|
|
45
|
+
triggered: { bg: "bg-amber-50 text-amber-700", label: "Triggered" },
|
|
46
|
+
paused: { bg: "bg-gray-100 text-gray-500", label: "Paused" }
|
|
47
|
+
};
|
|
48
|
+
function AnimationCustomRules({ className }) {
|
|
49
|
+
const [containerRef, activeIdx] = useCycleIndex(RULES.length, 3200);
|
|
50
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domAnimation, children: /* @__PURE__ */ jsxs("div", { ref: containerRef, className: cn("flex flex-col p-5", className), children: [
|
|
51
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
52
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
53
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-[15px] text-foreground", children: "Custom Rules" }),
|
|
54
|
+
/* @__PURE__ */ jsxs("p", { className: "text-[12px] text-gray-400", children: [
|
|
55
|
+
RULES.length,
|
|
56
|
+
" rules configured"
|
|
57
|
+
] })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 rounded-full bg-emerald-50 px-2.5 py-1", children: [
|
|
60
|
+
/* @__PURE__ */ jsx(ShieldCheck, { className: "size-3 text-emerald-600" }),
|
|
61
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[11px] text-emerald-700", children: "All active" })
|
|
62
|
+
] })
|
|
63
|
+
] }),
|
|
64
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4 space-y-2", children: RULES.map((rule, i) => {
|
|
65
|
+
const st = statusStyle[rule.status];
|
|
66
|
+
const isActive = i === activeIdx;
|
|
67
|
+
return /* @__PURE__ */ jsxs(
|
|
68
|
+
m.div,
|
|
69
|
+
{
|
|
70
|
+
animate: {
|
|
71
|
+
borderColor: isActive ? "#00D4FF" : "#f3f4f6",
|
|
72
|
+
boxShadow: isActive ? "0 0 0 1px rgba(0,212,255,0.15)" : "none"
|
|
73
|
+
},
|
|
74
|
+
transition: { duration: 0.3 },
|
|
75
|
+
className: "rounded-lg border bg-white px-3 py-2.5",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
78
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
79
|
+
/* @__PURE__ */ jsx("span", { className: "font-bold font-mono text-[10px] text-gray-400", children: rule.id }),
|
|
80
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-[12px] text-gray-800", children: rule.name })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsx("span", { className: cn("rounded-full px-2 py-0.5 font-semibold text-[10px]", st.bg), children: st.label })
|
|
83
|
+
] }),
|
|
84
|
+
isActive && /* @__PURE__ */ jsxs(
|
|
85
|
+
m.div,
|
|
86
|
+
{
|
|
87
|
+
initial: { opacity: 0, height: 0 },
|
|
88
|
+
animate: { opacity: 1, height: "auto" },
|
|
89
|
+
transition: { duration: 0.25 },
|
|
90
|
+
className: "mt-2 space-y-1 border-gray-100 border-t pt-2",
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx("p", { className: "font-mono text-[#0099BB] text-[10px]", children: rule.condition }),
|
|
93
|
+
/* @__PURE__ */ jsx("p", { className: "font-mono text-[10px] text-gray-600", children: rule.action }),
|
|
94
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 pt-1", children: [
|
|
95
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "size-2.5 text-gray-400" }),
|
|
96
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children: rule.triggers })
|
|
97
|
+
] })
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
rule.id
|
|
104
|
+
);
|
|
105
|
+
}) })
|
|
106
|
+
] }) });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export { AnimationCustomRules as default };
|
|
6
110
|
//# sourceMappingURL=animation-custom-rules.js.map
|
|
7
111
|
//# sourceMappingURL=animation-custom-rules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"animation-custom-rules.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/animations/animation-custom-rules.tsx"],"names":[],"mappings":";;;;;;;AAkBA,IAAM,KAAA,GAAgB;AAAA,EACpB;AAAA,IACE,EAAA,EAAI,QAAA;AAAA,IACJ,IAAA,EAAM,0BAAA;AAAA,IACN,SAAA,EAAW,wBAAA;AAAA,IACX,MAAA,EAAQ,iCAAA;AAAA,IACR,MAAA,EAAQ,QAAA;AAAA,IACR,QAAA,EAAU;AAAA,GACZ;AAAA,EACA;AAAA,IACE,EAAA,EAAI,QAAA;AAAA,IACJ,IAAA,EAAM,wBAAA;AAAA,IACN,SAAA,EAAW,mCAAA;AAAA,IACX,MAAA,EAAQ,mCAAA;AAAA,IACR,MAAA,EAAQ,WAAA;AAAA,IACR,QAAA,EAAU;AAAA,GACZ;AAAA,EACA;AAAA,IACE,EAAA,EAAI,QAAA;AAAA,IACJ,IAAA,EAAM,2BAAA;AAAA,IACN,SAAA,EAAW,iCAAA;AAAA,IACX,MAAA,EAAQ,+BAAA;AAAA,IACR,MAAA,EAAQ,QAAA;AAAA,IACR,QAAA,EAAU;AAAA,GACZ;AAAA,EACA;AAAA,IACE,EAAA,EAAI,QAAA;AAAA,IACJ,IAAA,EAAM,uBAAA;AAAA,IACN,SAAA,EAAW,kCAAA;AAAA,IACX,MAAA,EAAQ,gCAAA;AAAA,IACR,MAAA,EAAQ,QAAA;AAAA,IACR,QAAA,EAAU;AAAA;AAEd,CAAA;AAEA,IAAM,WAAA,GAAqE;AAAA,EACzE,MAAA,EAAQ,EAAE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AG,QAAQ,MAAA,EAAO;AAAA,gBACtC,UAAA,EAAY,EAAE,QAAA,EAAU,IAAA,EAAK;AAAA,gBAC7B,SAAA,EAAU,8CAAA;AAAA,gBAEV,QAAA,EAAA;AAAA,kCAAA,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,sCAAA,EAAwC,QAAA,EAAA,IAAA,CAAK,SAAA,EAAU,CAAA;AAAA,kCACpE,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,qCAAA,EAAuC,eAAK,MAAA,EAAO,CAAA;AAAA,kCAChE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,8BAAA,EACb,QAAA,EAAA;AAAA,oCAAA,GAAA,CAAC,aAAA,EAAA,EAAc,WAAU,wBAAA,EAAyB,CAAA;AAAA,oCAClD,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,2BAAA,EAA6B,eAAK,QAAA,EAAS;AAAA,mBAAA,EAC7D;AAAA;AAAA;AAAA;AACF;AAAA,SAAA;AAAA,QA/BG,IAAA,CAAK;AAAA,OAiCZ;AAAA,IAEJ,CAAC,CAAA,EACH;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ","file":"animation-custom-rules.js","sourcesContent":["\"use client\"\n\nimport { AlertTriangle, ShieldCheck } from \"lucide-react\"\nimport { domAnimation, LazyMotion, m } from \"motion/react\"\n\nimport { useCycleIndex } from \"../hooks/use-cycle-index\"\n\nimport { cn } from \"../lib/utils\"\n\ntype Rule = {\n id: string\n name: string\n condition: string\n action: string\n status: \"active\" | \"triggered\" | \"paused\"\n triggers: string\n}\n\nconst RULES: Rule[] = [\n {\n id: \"CR-001\",\n name: \"High-value transfer flag\",\n condition: \"IF amount > USD 50,000\",\n action: \"THEN escalate to senior analyst\",\n status: \"active\",\n triggers: \"142 this month\",\n },\n {\n id: \"CR-007\",\n name: \"Grey-list jurisdiction\",\n condition: \"IF jurisdiction IN fatf_grey_list\",\n action: \"THEN apply enhanced due diligence\",\n status: \"triggered\",\n triggers: \"28 this month\",\n },\n {\n id: \"CR-012\",\n name: \"Repeat counterparty check\",\n condition: \"IF counterparty_txns > 5 in 24h\",\n action: \"THEN flag for velocity review\",\n status: \"active\",\n triggers: \"9 this month\",\n },\n {\n id: \"CR-019\",\n name: \"New VASP verification\",\n condition: \"IF counterparty.first_seen < 30d\",\n action: \"THEN require manual VASP check\",\n status: \"active\",\n triggers: \"67 this month\",\n },\n]\n\nconst statusStyle: Record<Rule[\"status\"], { bg: string; label: string }> = {\n active: { bg: \"bg-emerald-50 text-emerald-700\", label: \"Active\" },\n triggered: { bg: \"bg-amber-50 text-amber-700\", label: \"Triggered\" },\n paused: { bg: \"bg-gray-100 text-gray-500\", label: \"Paused\" },\n}\n\nexport default function AnimationCustomRules({ className }: { className?: string }) {\n const [containerRef, activeIdx] = useCycleIndex(RULES.length, 3200)\n\n return (\n <LazyMotion features={domAnimation}>\n <div ref={containerRef} className={cn(\"flex flex-col p-5\", className)}>\n {/* Header */}\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-semibold text-[15px] text-foreground\">Custom Rules</p>\n <p className=\"text-[12px] text-gray-400\">{RULES.length} rules configured</p>\n </div>\n <div className=\"flex items-center gap-1.5 rounded-full bg-emerald-50 px-2.5 py-1\">\n <ShieldCheck className=\"size-3 text-emerald-600\" />\n <span className=\"font-semibold text-[11px] text-emerald-700\">All active</span>\n </div>\n </div>\n\n {/* Rule list */}\n <div className=\"mt-4 space-y-2\">\n {RULES.map((rule, i) => {\n const st = statusStyle[rule.status]\n const isActive = i === activeIdx\n return (\n <m.div\n key={rule.id}\n animate={{\n borderColor: isActive ? \"#00D4FF\" : \"#f3f4f6\",\n boxShadow: isActive ? \"0 0 0 1px rgba(0,212,255,0.15)\" : \"none\",\n }}\n transition={{ duration: 0.3 }}\n className=\"rounded-lg border bg-white px-3 py-2.5\"\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <span className=\"font-bold font-mono text-[10px] text-gray-400\">{rule.id}</span>\n <span className=\"font-semibold text-[12px] text-gray-800\">{rule.name}</span>\n </div>\n <span className={cn(\"rounded-full px-2 py-0.5 font-semibold text-[10px]\", st.bg)}>\n {st.label}\n </span>\n </div>\n\n {isActive && (\n <m.div\n initial={{ opacity: 0, height: 0 }}\n animate={{ opacity: 1, height: \"auto\" }}\n transition={{ duration: 0.25 }}\n className=\"mt-2 space-y-1 border-gray-100 border-t pt-2\"\n >\n <p className=\"font-mono text-[#0099BB] text-[10px]\">{rule.condition}</p>\n <p className=\"font-mono text-[10px] text-gray-600\">{rule.action}</p>\n <div className=\"flex items-center gap-1 pt-1\">\n <AlertTriangle className=\"size-2.5 text-gray-400\" />\n <span className=\"text-[10px] text-gray-400\">{rule.triggers}</span>\n </div>\n </m.div>\n )}\n </m.div>\n )\n })}\n </div>\n </div>\n </LazyMotion>\n )\n}\n"]}
|