@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.
@@ -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
- export type EChartsFormatter = (value: number | string) => string;
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
- export type EChartsParamsFormatter = (params: EChartsParams) => string;
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
- export type EChartsOptionWithTokens = Record<string, unknown>;
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 m } from "../button/button.js";
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 a } from "../icon/icon.js";
8
- import { twMerge as t } from "../../lib/tailwind-merge.js";
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
- ...u
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: t("tg-caption-bold -mx-2 rounded-xl px-2 py-1", s),
30
+ className: a("tg-caption-bold -mx-2 rounded-xl px-2 py-1", s),
31
31
  contentClassName: "bg-neutral-60",
32
- ...u,
32
+ ...m,
33
33
  children: [
34
- /* @__PURE__ */ r(i, { className: "text-neutral-40 flex cursor-default items-center gap-3", disabled: !0, children: [
35
- /* @__PURE__ */ e(a, { icon: "user", className: "size-4 flex-none" }),
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(a, { icon: "cog", className: "size-4 flex-none text-white" }),
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(a, { icon: "logout", className: "size-4 flex-none text-white" }),
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: t("hidden gap-3 sm:flex", s), children: [
51
- /* @__PURE__ */ e(m, { variant: "secondary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: o, children: "Log in" }) }),
52
- /* @__PURE__ */ e(m, { variant: "primary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: d, children: "Sign up" }) })
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: t(
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
- ...u,
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, "Created by [Mavrik wordmark] ai.validationcloud.io" on right.
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 L } from "skia-canvas";
2
- import { vcLogoDataUri as k, mavrikWordmarkDataUri as y } from "./footer-svg-assets.js";
3
- const d = 44, R = "#1a1d1f", i = "#a7a9ad", m = "#3f8cff", f = 20, I = 8, w = 140, p = 16, O = 85, _ = 14;
4
- function g(o) {
5
- const t = new L();
6
- return t.src = o, t;
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, t, a) {
9
- o.fillStyle = R, o.fillRect(0, a, t, d);
10
- const u = g(k(i)), v = g(y(i)), r = a + d / 2;
11
- o.drawImage(u, f, r - p / 2, w, p);
12
- const s = "ai.validationcloud.io", l = "Created by";
13
- o.font = "13px Poppins";
14
- const c = o.measureText(s);
15
- o.font = "600 14px Poppins";
16
- const G = o.measureText(l), e = t - f - c.width, T = e - I - O, H = T - I - G.width, n = r + 5;
17
- o.fillStyle = i, o.fillText(l, H, n), o.drawImage(v, T, r - _ / 2, O, _), o.font = "13px Poppins", o.fillStyle = m, o.fillText(s, e, n), o.strokeStyle = m, o.lineWidth = 1, o.beginPath(), o.moveTo(e, n + 2), o.lineTo(e + c.width, n + 2), o.stroke();
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
- d as FOOTER_HEIGHT,
20
+ p as FOOTER_HEIGHT,
21
21
  P as drawMavrikFooter
22
22
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@validationcloud/fractal-ui",
3
3
  "private": false,
4
- "version": "1.72.0",
4
+ "version": "1.74.0",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
7
7
  "files": [