@validationcloud/fractal-ui 1.72.0 → 1.74.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/components/echarts-renderer/formatters/formatter-functions.d.ts +2 -2
- package/dist/components/echarts-renderer/formatters/replace-formatter-tokens.d.ts +2 -1
- package/dist/components/user-dropdown/user-dropdown.js +15 -15
- package/dist/lib/draw-mavrik-footer.d.ts +1 -1
- package/dist/lib/draw-mavrik-footer.js +17 -17
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { FormatterTemplate, FormatterToken } from './formatter-tokens';
|
|
|
3
3
|
* ECharts formatter function signature.
|
|
4
4
|
* Accepts a numeric value (or string that can be converted to number) and returns formatted string.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
type EChartsFormatter = (value: number | string) => string;
|
|
7
7
|
/**
|
|
8
8
|
* Retrieves the formatter function for a given token.
|
|
9
9
|
*/
|
|
@@ -28,7 +28,7 @@ type EChartsParams = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Formatter function that receives ECharts params object.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
type EChartsParamsFormatter = (params: EChartsParams) => string;
|
|
32
32
|
/**
|
|
33
33
|
* Creates a params-based formatter for series/edge labels.
|
|
34
34
|
* Extracts params.value and applies the token formatter.
|
|
@@ -3,7 +3,7 @@ import { EChartsOption } from 'echarts';
|
|
|
3
3
|
* Input type that allows formatter tokens (strings) where ECharts expects functions.
|
|
4
4
|
* This is needed because JSON options will have string tokens that get replaced.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
type EChartsOptionWithTokens = Record<string, unknown>;
|
|
7
7
|
/**
|
|
8
8
|
* Replaces formatter token strings with actual formatter functions.
|
|
9
9
|
*
|
|
@@ -28,3 +28,4 @@ export type EChartsOptionWithTokens = Record<string, unknown>;
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
export declare function replaceFormatterTokens(options: EChartsOptionWithTokens): EChartsOption;
|
|
31
|
+
export {};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsxs as r, Fragment as p, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import h from "../../assets/default-avatar.svg.js";
|
|
5
|
-
import { Button as
|
|
5
|
+
import { Button as u } from "../button/button.js";
|
|
6
6
|
import { DropdownMenu as f, DropdownMenuItem as i } from "../dropdown-menu/dropdown-menu.js";
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { twMerge as
|
|
7
|
+
import { Icon as t } from "../icon/icon.js";
|
|
8
|
+
import { twMerge as a } from "../../lib/tailwind-merge.js";
|
|
9
9
|
function C({
|
|
10
10
|
user: l,
|
|
11
11
|
loginUrl: o,
|
|
@@ -14,7 +14,7 @@ function C({
|
|
|
14
14
|
accountUrl: c,
|
|
15
15
|
contactItem: n,
|
|
16
16
|
className: s,
|
|
17
|
-
...
|
|
17
|
+
...m
|
|
18
18
|
}) {
|
|
19
19
|
return l ? /* @__PURE__ */ r(
|
|
20
20
|
f,
|
|
@@ -27,39 +27,39 @@ function C({
|
|
|
27
27
|
children: /* @__PURE__ */ e("img", { className: "size-7 rounded-full sm:size-9", src: l.picture ?? h, alt: "User avatar" })
|
|
28
28
|
}
|
|
29
29
|
),
|
|
30
|
-
className:
|
|
30
|
+
className: a("tg-caption-bold -mx-2 rounded-xl px-2 py-1", s),
|
|
31
31
|
contentClassName: "bg-neutral-60",
|
|
32
|
-
...
|
|
32
|
+
...m,
|
|
33
33
|
children: [
|
|
34
|
-
/* @__PURE__ */ r(
|
|
35
|
-
/* @__PURE__ */ e(
|
|
34
|
+
/* @__PURE__ */ r("div", { className: "tg-button-small text-neutral-40 flex items-center gap-3 px-4 py-2.5 select-text", children: [
|
|
35
|
+
/* @__PURE__ */ e(t, { icon: "user", className: "size-4 flex-none" }),
|
|
36
36
|
/* @__PURE__ */ e("p", { className: "tg-body", children: l.email })
|
|
37
37
|
] }),
|
|
38
38
|
c && /* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ r("a", { href: c, className: "flex items-center gap-3", children: [
|
|
39
|
-
/* @__PURE__ */ e(
|
|
39
|
+
/* @__PURE__ */ e(t, { icon: "cog", className: "size-4 flex-none text-white" }),
|
|
40
40
|
/* @__PURE__ */ e("p", { className: "tg-body", children: "Account" })
|
|
41
41
|
] }) }),
|
|
42
42
|
n && /* @__PURE__ */ e(i, { asChild: !0, children: n }),
|
|
43
43
|
/* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ r("a", { href: g, className: "flex items-center gap-3", children: [
|
|
44
|
-
/* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(t, { icon: "logout", className: "size-4 flex-none text-white" }),
|
|
45
45
|
/* @__PURE__ */ e("p", { className: "tg-body", children: "Log out" })
|
|
46
46
|
] }) })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
) : /* @__PURE__ */ r(p, { children: [
|
|
50
|
-
/* @__PURE__ */ r("div", { className:
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ r("div", { className: a("hidden gap-3 sm:flex", s), children: [
|
|
51
|
+
/* @__PURE__ */ e(u, { variant: "secondary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: o, children: "Log in" }) }),
|
|
52
|
+
/* @__PURE__ */ e(u, { variant: "primary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: d, children: "Sign up" }) })
|
|
53
53
|
] }),
|
|
54
54
|
/* @__PURE__ */ r(
|
|
55
55
|
f,
|
|
56
56
|
{
|
|
57
57
|
trigger: /* @__PURE__ */ e("img", { className: "size-7 cursor-pointer sm:hidden", src: h, alt: "User avatar" }),
|
|
58
|
-
className:
|
|
58
|
+
className: a(
|
|
59
59
|
"hover:bg-neutral-60 focus-visible:ring-neutral-60 data-[state=open]:bg-neutral-60 rounded-full outline-none focus-visible:ring-2 sm:hidden",
|
|
60
60
|
s
|
|
61
61
|
),
|
|
62
|
-
...
|
|
62
|
+
...m,
|
|
63
63
|
children: [
|
|
64
64
|
/* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ e("a", { href: o, className: "tg-body", children: "Log in" }) }),
|
|
65
65
|
/* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ e("a", { href: d, className: "tg-body", children: "Sign up" }) }),
|
|
@@ -3,7 +3,7 @@ export declare const FOOTER_HEIGHT = 44;
|
|
|
3
3
|
/**
|
|
4
4
|
* Draws the branded Mavrik footer onto a canvas context.
|
|
5
5
|
*
|
|
6
|
-
* Layout: VC logo on left, "
|
|
6
|
+
* Layout: VC logo on left, "Powered by [Mavrik wordmark] ai.validationcloud.io" on right.
|
|
7
7
|
* Call with the context already scaled for DPR — all coordinates are in logical pixels.
|
|
8
8
|
*/
|
|
9
9
|
export declare function drawMavrikFooter(ctx: CanvasRenderingContext2D, width: number, yOffset: number): void;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Image as
|
|
2
|
-
import { vcLogoDataUri as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
return
|
|
1
|
+
import { Image as v } from "skia-canvas";
|
|
2
|
+
import { vcLogoDataUri as D, mavrikWordmarkDataUri as G } from "./footer-svg-assets.js";
|
|
3
|
+
const p = 44, H = "#1a1d1f", n = "#6f767e", k = "#2e313c", c = 20, d = 8, y = 140, I = 16, f = 72, _ = 12;
|
|
4
|
+
function O(o) {
|
|
5
|
+
const e = new v();
|
|
6
|
+
return e.src = o, e;
|
|
7
7
|
}
|
|
8
|
-
function P(o,
|
|
9
|
-
o.fillStyle =
|
|
10
|
-
const
|
|
11
|
-
o.drawImage(
|
|
12
|
-
const
|
|
13
|
-
o.font = "
|
|
14
|
-
const
|
|
15
|
-
o.font = "
|
|
16
|
-
const
|
|
17
|
-
o.fillStyle =
|
|
8
|
+
function P(o, e, i) {
|
|
9
|
+
o.fillStyle = H, o.fillRect(0, i, e, p), o.fillStyle = k, o.fillRect(0, i, e, 1);
|
|
10
|
+
const g = O(D(n)), u = O(G(n)), s = i + p / 2;
|
|
11
|
+
o.drawImage(g, c, s - I / 2, y, I);
|
|
12
|
+
const l = "ai.validationcloud.io", a = "Powered by";
|
|
13
|
+
o.font = "500 11px Poppins";
|
|
14
|
+
const T = o.measureText(l);
|
|
15
|
+
o.font = "500 11px Poppins";
|
|
16
|
+
const w = o.measureText(a), t = e - c - T.width, m = t - d - f, R = m - d - w.width, r = s + 4;
|
|
17
|
+
o.fillStyle = n, o.fillText(a, R, r), o.drawImage(u, m, s - _ / 2, f, _), o.font = "500 11px Poppins", o.fillStyle = n, o.fillText(l, t, r), o.strokeStyle = n, o.lineWidth = 1, o.beginPath(), o.moveTo(t, r + 2), o.lineTo(t + T.width, r + 2), o.stroke();
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
p as FOOTER_HEIGHT,
|
|
21
21
|
P as drawMavrikFooter
|
|
22
22
|
};
|