@galaxy-io/dls 2.13.4 → 2.13.6

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.
@@ -1,8 +1,9 @@
1
1
  import { type AriaAttributes, type CSSProperties } from "react";
2
2
  export interface GalaxyAlchemyWordmarkProps extends AriaAttributes {
3
3
  /**
4
- * Height of the wordmark in px, descender included. The width follows the aspect ratio
5
- * (≈ 2.77 × height).
4
+ * Height in px, shared by every product wordmark: at one `size`, Filament, Alchemy and Latchkey
5
+ * have the same height, the same baseline and letters of the same height, so they line up and read
6
+ * at one size. Alchemy's heavy script sits inside the box with room above and below. The width follows the artwork (≈ 3.81 × height).
6
7
  * @default 20
7
8
  */
8
9
  size?: number;
@@ -1,4 +1,4 @@
1
- import { BRAND_MARK_INVERSE_CSS, BRAND_MARK_NEUTRAL_CSS, BRAND_MARK_SVG_CSS, brandMarkAriaProps } from "./brandMark.js";
1
+ import { BRAND_MARK_INVERSE_CSS, BRAND_MARK_NEUTRAL_CSS, BRAND_MARK_SVG_CSS, brandMarkAriaProps, productWordmarkBox } from "./brandMark.js";
2
2
  import GalaxyAlchemyWordmarkSvg, { GALAXY_ALCHEMY_WORDMARK_VIEW_BOX } from "./internal/svg/GalaxyAlchemyWordmarkSvg.js";
3
3
  import { forwardRef } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -13,11 +13,17 @@ import { cx } from "@linaria/core";
13
13
  * wordmark is the whole logo; only `GalaxyWordmark` pairs with the mark.
14
14
  *
15
15
  * The artwork is `src/brand/assets/galaxy-alchemy-wordmark.svg`, compiled by `pnpm assets` into
16
- * the private `GalaxyAlchemyWordmarkSvg`; the aspect ratio comes from its
17
- * `GALAXY_ALCHEMY_WORDMARK_VIEW_BOX`.
16
+ * the private `GalaxyAlchemyWordmarkSvg`, set to the shared product wordmark metrics
17
+ * (`productWordmarkBox`): Filament's box, baseline and x-height.
18
18
  */
19
- /** Width ÷ height of the artwork, from its viewBox. */
20
- var GALAXY_ALCHEMY_WORDMARK_ASPECT_RATIO = GALAXY_ALCHEMY_WORDMARK_VIEW_BOX.width / GALAXY_ALCHEMY_WORDMARK_VIEW_BOX.height;
19
+ /**
20
+ * The artwork set to the shared product wordmark metrics: the baseline is 201.348 units down (the y hangs below it); the x-height is 151 units.
21
+ */
22
+ var GALAXY_ALCHEMY_WORDMARK_BOX = productWordmarkBox({
23
+ width: GALAXY_ALCHEMY_WORDMARK_VIEW_BOX.width,
24
+ baseline: 201.348,
25
+ body: 151
26
+ });
21
27
  /**
22
28
  * Alchemy's product wordmark, painted `text.primary`. Labelled "Alchemy" unless `ariaLabel=""`.
23
29
  * Never beside a logomark.
@@ -31,7 +37,8 @@ var GalaxyAlchemyWordmark = forwardRef(function GalaxyAlchemyWordmark({ size = 2
31
37
  "aria-label": aria["aria-label"],
32
38
  "aria-hidden": aria["aria-hidden"],
33
39
  ...rest,
34
- width: size * GALAXY_ALCHEMY_WORDMARK_ASPECT_RATIO,
40
+ viewBox: GALAXY_ALCHEMY_WORDMARK_BOX.viewBox,
41
+ width: size * GALAXY_ALCHEMY_WORDMARK_BOX.aspectRatio,
35
42
  height: size,
36
43
  fill: "currentColor",
37
44
  focusable: "false",
@@ -1,7 +1,9 @@
1
1
  import { type AriaAttributes, type CSSProperties } from "react";
2
2
  export interface GalaxyFilamentWordmarkProps extends AriaAttributes {
3
3
  /**
4
- * Height of the letters in px: the artwork is cropped to its ink, so `size` is the cap-to-baseline height with no empty band (like `GalaxyAlchemyWordmark`). The width follows the aspect ratio (≈ 4.07 × height).
4
+ * Height in px, shared by every product wordmark: at one `size`, Filament, Alchemy and Latchkey
5
+ * have the same height, the same baseline and letters of the same height, so they line up and read
6
+ * at one size. Filament's ink is the reference box: the top of the f to the end of its tail. The width follows the artwork (≈ 4.07 × height).
5
7
  * @default 20
6
8
  */
7
9
  size?: number;
@@ -1,4 +1,4 @@
1
- import { BRAND_MARK_INVERSE_CSS, BRAND_MARK_NEUTRAL_CSS, BRAND_MARK_SVG_CSS, brandMarkAriaProps } from "./brandMark.js";
1
+ import { BRAND_MARK_INVERSE_CSS, BRAND_MARK_NEUTRAL_CSS, BRAND_MARK_SVG_CSS, brandMarkAriaProps, productWordmarkBox } from "./brandMark.js";
2
2
  import GalaxyFilamentWordmarkSvg, { GALAXY_FILAMENT_WORDMARK_VIEW_BOX } from "./internal/svg/GalaxyFilamentWordmarkSvg.js";
3
3
  import { forwardRef } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -14,11 +14,17 @@ import { cx } from "@linaria/core";
14
14
  *
15
15
  * The artwork is `src/brand/assets/galaxy-filament-wordmark.svg`, compiled by `pnpm assets` into
16
16
  * the private `GalaxyFilamentWordmarkSvg`; the aspect ratio comes from its
17
- * `GALAXY_FILAMENT_WORDMARK_VIEW_BOX`. The viewBox is cropped to the ink (`0 91 4513 1109`), so a
18
- * `size` is the letters' height and no caller needs an ink-ratio correction (DLS 2.10).
17
+ * `GALAXY_FILAMENT_WORDMARK_VIEW_BOX`. Its ink (`0 91 4513 1109`) is the box every product
18
+ * wordmark shares (`productWordmarkBox`): the others set their baseline and letter height on it.
19
19
  */
20
- /** Width ÷ height of the artwork, from its viewBox. */
21
- var GALAXY_FILAMENT_WORDMARK_ASPECT_RATIO = GALAXY_FILAMENT_WORDMARK_VIEW_BOX.width / GALAXY_FILAMENT_WORDMARK_VIEW_BOX.height;
20
+ /**
21
+ * The artwork set to the shared product wordmark metrics: the f tail hangs below a baseline 910.551 units down; the x-height is 527 units.
22
+ */
23
+ var GALAXY_FILAMENT_WORDMARK_BOX = productWordmarkBox({
24
+ width: GALAXY_FILAMENT_WORDMARK_VIEW_BOX.width,
25
+ baseline: 910.551,
26
+ body: 527
27
+ });
22
28
  /**
23
29
  * Filament's product wordmark, painted `text.primary`. Labelled "Filament" unless `ariaLabel=""`.
24
30
  * Never beside a logomark.
@@ -32,7 +38,8 @@ var GalaxyFilamentWordmark = forwardRef(function GalaxyFilamentWordmark({ size =
32
38
  "aria-label": aria["aria-label"],
33
39
  "aria-hidden": aria["aria-hidden"],
34
40
  ...rest,
35
- width: size * GALAXY_FILAMENT_WORDMARK_ASPECT_RATIO,
41
+ viewBox: GALAXY_FILAMENT_WORDMARK_BOX.viewBox,
42
+ width: size * GALAXY_FILAMENT_WORDMARK_BOX.aspectRatio,
36
43
  height: size,
37
44
  fill: "currentColor",
38
45
  focusable: "false",
@@ -0,0 +1,35 @@
1
+ import { type AriaAttributes, type CSSProperties } from "react";
2
+ export interface GalaxyLatchkeyWordmarkProps extends AriaAttributes {
3
+ /**
4
+ * Height in px, shared by every product wordmark: at one `size`, Filament, Alchemy and Latchkey
5
+ * have the same height, the same baseline and letters of the same height, so they line up and read
6
+ * at one size. Its capitals stand 15% above the shared x-height, where they read level with the others. The width follows the artwork (≈ 4.16 × height).
7
+ * @default 20
8
+ */
9
+ size?: number;
10
+ /**
11
+ * For a wordmark on an inverted fill (`text.primary`): paints `background.base`.
12
+ * @default false
13
+ */
14
+ isInverse?: boolean;
15
+ /**
16
+ * Accessible name. Pass `""` to make it decorative (`aria-hidden`) when the name is already in
17
+ * the surrounding text.
18
+ * @default Latchkey
19
+ */
20
+ ariaLabel?: string;
21
+ /** DOM id on the `<svg>`. */
22
+ id?: string;
23
+ /** Any `data-*` attribute, forwarded to the `<svg>`. */
24
+ [dataAttribute: `data-${string}`]: string | number | boolean | undefined;
25
+ /** Extra class on the `<svg>`. */
26
+ className?: string;
27
+ /** Inline style on the `<svg>`. */
28
+ style?: CSSProperties;
29
+ }
30
+ /**
31
+ * Latchkey's product wordmark, painted `text.primary`. Labelled "Latchkey" unless `ariaLabel=""`.
32
+ * Never beside a logomark.
33
+ */
34
+ declare const GalaxyLatchkeyWordmark: import("react").ForwardRefExoticComponent<GalaxyLatchkeyWordmarkProps & import("react").RefAttributes<SVGSVGElement>>;
35
+ export default GalaxyLatchkeyWordmark;
@@ -0,0 +1,52 @@
1
+ import { BRAND_MARK_INVERSE_CSS, BRAND_MARK_NEUTRAL_CSS, BRAND_MARK_SVG_CSS, brandMarkAriaProps, productWordmarkBox } from "./brandMark.js";
2
+ import GalaxyLatchkeyWordmarkSvg, { GALAXY_LATCHKEY_WORDMARK_VIEW_BOX } from "./internal/svg/GalaxyLatchkeyWordmarkSvg.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { cx } from "@linaria/core";
6
+ //#region src/brand/GalaxyLatchkeyWordmark.tsx
7
+ /**
8
+ * Latchkey's product wordmark: the word "LATCHKEY" in heavy block capitals, as one inline SVG.
9
+ * It behaves exactly like `GalaxyWordmark`: it paints `text.primary`, reads only CSS variables,
10
+ * and is SSR-safe.
11
+ *
12
+ * It always stands alone: never set it beside `GalaxyLogomark` (or any logomark). The product
13
+ * wordmark is the whole logo; only `GalaxyWordmark` pairs with the mark.
14
+ *
15
+ * The artwork is `src/brand/assets/galaxy-latchkey-wordmark.svg`, compiled by `pnpm assets` into
16
+ * the private `GalaxyLatchkeyWordmarkSvg`, set to the shared product wordmark metrics
17
+ * (`productWordmarkBox`): Filament's box and baseline, its capitals just above Filament's x-height.
18
+ */
19
+ /**
20
+ * The artwork set to the shared product wordmark metrics: capitals from 8.58 units to the baseline
21
+ * at 578.582 (the C overshoots both), so the cap height is 570.002 units.
22
+ */
23
+ var GALAXY_LATCHKEY_WORDMARK_BOX = productWordmarkBox({
24
+ width: GALAXY_LATCHKEY_WORDMARK_VIEW_BOX.width,
25
+ baseline: 578.582,
26
+ body: 570.002 / 1.15
27
+ });
28
+ /**
29
+ * Latchkey's product wordmark, painted `text.primary`. Labelled "Latchkey" unless `ariaLabel=""`.
30
+ * Never beside a logomark.
31
+ */
32
+ var GalaxyLatchkeyWordmark = forwardRef(function GalaxyLatchkeyWordmark({ size = 20, isInverse = false, ariaLabel = "Latchkey", id, className, style, ...rest }, ref) {
33
+ const aria = brandMarkAriaProps(ariaLabel);
34
+ return /* @__PURE__ */ jsx(GalaxyLatchkeyWordmarkSvg, {
35
+ ref,
36
+ id,
37
+ role: aria.role,
38
+ "aria-label": aria["aria-label"],
39
+ "aria-hidden": aria["aria-hidden"],
40
+ ...rest,
41
+ viewBox: GALAXY_LATCHKEY_WORDMARK_BOX.viewBox,
42
+ width: size * GALAXY_LATCHKEY_WORDMARK_BOX.aspectRatio,
43
+ height: size,
44
+ fill: "currentColor",
45
+ focusable: "false",
46
+ className: cx(BRAND_MARK_SVG_CSS, isInverse ? BRAND_MARK_INVERSE_CSS : BRAND_MARK_NEUTRAL_CSS, className),
47
+ style
48
+ });
49
+ });
50
+ GalaxyLatchkeyWordmark.displayName = "GalaxyLatchkeyWordmark";
51
+ //#endregion
52
+ export { GalaxyLatchkeyWordmark as default };
@@ -10,7 +10,7 @@ import { cx } from "@linaria/core";
10
10
  * is CSS (`fill="currentColor"`), so it is SSR-safe and a theme switch needs no re-render.
11
11
  *
12
12
  * It pairs only with `GalaxyWordmark`. The product wordmarks (`GalaxyFilamentWordmark`,
13
- * `GalaxyAlchemyWordmark`) stand alone: never set the mark beside them.
13
+ * `GalaxyAlchemyWordmark`, `GalaxyLatchkeyWordmark`) stand alone: never set the mark beside them.
14
14
  *
15
15
  * The artwork is `src/brand/assets/galaxy-logomark.svg`, compiled by `pnpm assets` into the private
16
16
  * `GalaxyLogomarkSvg`; this component only names, sizes and colors it.
@@ -4,7 +4,9 @@ export declare enum PoweredByWordmark {
4
4
  /** `GalaxyFilamentWordmark`. */
5
5
  FILAMENT = "FILAMENT",
6
6
  /** `GalaxyAlchemyWordmark`. */
7
- ALCHEMY = "ALCHEMY"
7
+ ALCHEMY = "ALCHEMY",
8
+ /** `GalaxyLatchkeyWordmark`. */
9
+ LATCHKEY = "LATCHKEY"
8
10
  }
9
11
  export interface PoweredByProps extends AriaAttributes {
10
12
  /** The product wordmark. An enum, not a node, so the wordmark always stands alone (never beside a logomark). */
@@ -1,6 +1,7 @@
1
1
  import Text, { TextSize, TextVariant } from "../text/Text.js";
2
2
  import GalaxyAlchemyWordmark from "./GalaxyAlchemyWordmark.js";
3
3
  import GalaxyFilamentWordmark from "./GalaxyFilamentWordmark.js";
4
+ import GalaxyLatchkeyWordmark from "./GalaxyLatchkeyWordmark.js";
4
5
  import { useAppFrameContext } from "../layout/internal/AppFrameContext.js";
5
6
  /* empty css */
6
7
  import { styled } from "@linaria/react";
@@ -13,9 +14,10 @@ import { cx } from "@linaria/core";
13
14
  * product wordmark, as one link that opens the product's site in a new tab. `label={null}` drops the
14
15
  * text and leaves the wordmark alone in the row; `trailing` (a version, say) follows the wordmark on
15
16
  * the same baseline. A 40px row (tall enough to centre on the
16
- * Galaxy host's 24px theme toggle beside it) with `body_sm` tertiary text and the wordmark sized so
17
- * every product reads at the same x-height (Filament 15px, Alchemy 12px), its letters on the text's
18
- * baseline (an inline mark shifted by its own descent, not two boxes centred); its accessible name is
17
+ * Galaxy host's 24px theme toggle beside it) with `body_sm` tertiary text and the wordmark at 15px
18
+ * (every product wordmark shares one set of metrics, so each reads at the same x-height), its
19
+ * letters on the text's baseline (an inline mark shifted by its descent, not two boxes centred); its
20
+ * accessible name is
19
21
  * `ariaLabel` plus " (opens in a new tab)".
20
22
  *
21
23
  * `wordmark` is an enum of the product wordmarks, never a node: a product wordmark always stands
@@ -33,35 +35,22 @@ var PoweredByWordmark = /* @__PURE__ */ function(PoweredByWordmark) {
33
35
  PoweredByWordmark["FILAMENT"] = "FILAMENT";
34
36
  /** `GalaxyAlchemyWordmark`. */
35
37
  PoweredByWordmark["ALCHEMY"] = "ALCHEMY";
38
+ /** `GalaxyLatchkeyWordmark`. */
39
+ PoweredByWordmark["LATCHKEY"] = "LATCHKEY";
36
40
  return PoweredByWordmark;
37
41
  }({});
38
42
  /**
39
- * Each wordmark's `size` (its full letter height), chosen so the products read at the same optical
40
- * size: their lowercase bodies (x-heights) match, not their boxes. Filament's x-height is 527 of
41
- * its 1109 units, so 15px gives 7.1px, about the `body_sm` text beside it. Alchemy's is 151 of
42
- * 252, with tall ascenders and a descender around a heavy body, so at 15px its letters were 26%
43
- * larger; 12px gives a 7.2px x-height and a width (58px) next to Filament's (61px). Measured from
44
- * the artwork (Mitch, 2026-10-10: "alchemy feels a bit too big").
43
+ * The wordmark's `size`. Every product wordmark shares Filament's metrics, so one size gives every
44
+ * product the same x-height: 15px gives 7.1px, about the `body_sm` text beside it.
45
45
  */
46
- var POWERED_BY_WORDMARK_TO_SIZE_PX_MAP = {
47
- ["FILAMENT"]: 15,
48
- ["ALCHEMY"]: 12
49
- };
50
- /**
51
- * How far each wordmark's letters hang below their baseline, as a fraction of the artwork's
52
- * height: Filament's italic f tail (1200 − 910.55 of 1109 units), Alchemy's y (252 − 201.35 of
53
- * 252). Measured from the artwork's ink, so the mark can sit on the text's own baseline.
54
- */
55
- /** The baseline shift per wordmark: its letters' descent in px at its size, below the text's baseline. */
46
+ var POWERED_BY_WORDMARK_SIZE_PX = 15;
56
47
  /**
57
- * Each wordmark on the text's baseline: inline (the wordmarks are blocks), an SVG's bottom edge
58
- * sits on the baseline, so `vertical-align` drops it by the letters' descent. The browser places the baseline (font metrics,
59
- * pixel snapping), so the mark and "Powered by" always share it.
48
+ * The mark on the text's baseline: inline (the wordmarks are blocks), an SVG's bottom edge sits on
49
+ * the baseline, so `vertical-align` drops it by the letters' descent, the part of its box below
50
+ * the shared baseline. The browser places the baseline (font metrics, pixel snapping), so the mark
51
+ * and "Powered by" always share it.
60
52
  */
61
- var POWERED_BY_WORDMARK_TO_BASELINE_CSS_MAP = {
62
- ["FILAMENT"]: "gx-PoweredBy-FILAMENT-f1hilrad",
63
- ["ALCHEMY"]: "gx-PoweredBy-ALCHEMY-a1s356ob"
64
- };
53
+ var BASELINE_CSS = "gx-PoweredBy-BASELINE_CSS-b1hilrad";
65
54
  /** The text before the wordmark when `label` is unset. */
66
55
  var DEFAULT_LABEL = "Powered by";
67
56
  /** What is appended to the name, as `Link isExternal` does. */
@@ -72,7 +61,7 @@ var NEW_TAB_SUFFIX = " (opens in a new tab)";
72
61
  */
73
62
  var Root = /*#__PURE__*/ styled("a")({
74
63
  name: "Root",
75
- class: "gx-PoweredBy-r1ez0mfr",
64
+ class: "gx-PoweredBy-r1s356ob",
76
65
  propsAsIs: false
77
66
  });
78
67
  /**
@@ -80,11 +69,12 @@ var Root = /*#__PURE__*/ styled("a")({
80
69
  * already transitions `color` on `duration.fast`. Declared in this module, whose CSS follows the
81
70
  * wordmarks' (it imports them), so it wins over their `text.primary`.
82
71
  */
83
- var MARK_CSS = "gx-PoweredBy-MARK_CSS-mi05aex";
72
+ var MARK_CSS = "gx-PoweredBy-MARK_CSS-m1ez0mfr";
84
73
  /** The wordmark component per product: both take a px `size`, an `ariaLabel` and a class. */
85
74
  var POWERED_BY_WORDMARK_TO_COMPONENT_MAP = {
86
75
  ["FILAMENT"]: GalaxyFilamentWordmark,
87
- ["ALCHEMY"]: GalaxyAlchemyWordmark
76
+ ["ALCHEMY"]: GalaxyAlchemyWordmark,
77
+ ["LATCHKEY"]: GalaxyLatchkeyWordmark
88
78
  };
89
79
  /**
90
80
  * The line holding the label, the mark and the trailing content. It never wraps or shrinks, and its line height is the
@@ -92,11 +82,11 @@ var POWERED_BY_WORDMARK_TO_COMPONENT_MAP = {
92
82
  * lands where a centred `body_sm` line puts it, level with the middle of an icon beside the row.
93
83
  * Declared after Text's own CSS (this module imports it), so the line height wins.
94
84
  */
95
- var LABEL_CSS = "gx-PoweredBy-LABEL_CSS-llnwtgc";
85
+ var LABEL_CSS = "gx-PoweredBy-LABEL_CSS-li05aex";
96
86
  /** An item after another on the line, 8px on, as inline padding (no margins): the mark after a label, the trailing content after the mark. */
97
87
  var Slot = /*#__PURE__*/ styled("span")({
98
88
  name: "Slot",
99
- class: "gx-PoweredBy-Slot-sh367b4",
89
+ class: "gx-PoweredBy-Slot-slnwtgc",
100
90
  propsAsIs: false
101
91
  });
102
92
  /** Whether a slot has something to draw, so an empty one adds no 8px. */
@@ -107,9 +97,9 @@ var PoweredBy = forwardRef(function PoweredBy({ wordmark, href, ariaLabel, label
107
97
  const Wordmark = POWERED_BY_WORDMARK_TO_COMPONENT_MAP[wordmark];
108
98
  if (frame?.isCollapsed) return null;
109
99
  const mark = /* @__PURE__ */ jsx(Wordmark, {
110
- size: POWERED_BY_WORDMARK_TO_SIZE_PX_MAP[wordmark],
100
+ size: POWERED_BY_WORDMARK_SIZE_PX,
111
101
  ariaLabel: "",
112
- className: cx(MARK_CSS, POWERED_BY_WORDMARK_TO_BASELINE_CSS_MAP[wordmark])
102
+ className: cx(MARK_CSS, BASELINE_CSS)
113
103
  });
114
104
  return /* @__PURE__ */ jsx(Root, {
115
105
  "aria-label": `${ariaLabel}${NEW_TAB_SUFFIX}`,
@@ -24,3 +24,38 @@ export interface BrandMarkAriaProps {
24
24
  * decorative (`aria-hidden`). Applied before `...rest` so an explicit `aria-*` passthrough wins.
25
25
  */
26
26
  export declare function brandMarkAriaProps(ariaLabel: string | undefined): BrandMarkAriaProps;
27
+ /**
28
+ * @internal Where a product wordmark's baseline sits in its box, from the top, as a fraction of
29
+ * `size`. Filament's: its ink box runs 1109 units from the top of the f to the end of its tail, and
30
+ * the baseline is 819.551 units down. Every product wordmark puts its baseline here.
31
+ */
32
+ export declare const PRODUCT_WORDMARK_BASELINE_RATIO: number;
33
+ /**
34
+ * @internal The height of a product wordmark's letters, as a fraction of `size`. Filament's
35
+ * x-height, 527 of its 1109 units. Every product wordmark draws its letter body (its x-height, or
36
+ * its cap height when it is set in capitals) at this height.
37
+ */
38
+ export declare const PRODUCT_WORDMARK_BODY_RATIO: number;
39
+ /** @internal A product wordmark's artwork, in its own units (its viewBox starts at x = 0). */
40
+ export interface ProductWordmarkMetrics {
41
+ /** The artwork's width. */
42
+ width: number;
43
+ /** The y of the letters' baseline. */
44
+ baseline: number;
45
+ /** The height of the letter body: the x-height, or the cap height for a mark in capitals. */
46
+ body: number;
47
+ }
48
+ /** @internal What `productWordmarkBox` returns. */
49
+ export interface ProductWordmarkBox {
50
+ /** The viewBox that puts the artwork's baseline and body on the shared ones. */
51
+ viewBox: string;
52
+ /** Width ÷ height of that box: the wordmark's width is `size` times this. */
53
+ aspectRatio: number;
54
+ }
55
+ /**
56
+ * @internal The box that sets a product wordmark to the shared metrics: at one `size`, every
57
+ * product wordmark has the same height, the same baseline and letters of the same height, whatever
58
+ * its artwork's proportions. Filament's box is its own ink; a mark whose letters are larger for
59
+ * its ink (Alchemy's heavy script, Latchkey's capitals) gets empty space above and below.
60
+ */
61
+ export declare function productWordmarkBox({ width, baseline, body, }: ProductWordmarkMetrics): ProductWordmarkBox;
@@ -1,9 +1,9 @@
1
1
  /* empty css */
2
2
  //#region src/brand/brandMark.ts
3
3
  /**
4
- * @internal Shared by the six brand components (`GalaxyLogomark`, `GalaxyWordmark`,
5
- * `GalaxyFilamentWordmark`, `GalaxyAlchemyWordmark`, `GalaxyLogomarkAnimation`,
6
- * `GalaxyLogomark3D`); not documented API.
4
+ * @internal Shared by the seven brand components (`GalaxyLogomark`, `GalaxyWordmark`,
5
+ * `GalaxyFilamentWordmark`, `GalaxyAlchemyWordmark`, `GalaxyLatchkeyWordmark`,
6
+ * `GalaxyLogomarkAnimation`, `GalaxyLogomark3D`); not documented API.
7
7
  *
8
8
  * The marks are one inline SVG painted with `fill="currentColor"`, so their color is CSS: exactly
9
9
  * one of the color classes below sets `color` on the mark. One class never overrides another, so
@@ -32,5 +32,31 @@ function brandMarkAriaProps(ariaLabel) {
32
32
  "aria-hidden": true
33
33
  };
34
34
  }
35
+ /**
36
+ * @internal Where a product wordmark's baseline sits in its box, from the top, as a fraction of
37
+ * `size`. Filament's: its ink box runs 1109 units from the top of the f to the end of its tail, and
38
+ * the baseline is 819.551 units down. Every product wordmark puts its baseline here.
39
+ */
40
+ var PRODUCT_WORDMARK_BASELINE_RATIO = 819.551 / 1109;
41
+ /**
42
+ * @internal The height of a product wordmark's letters, as a fraction of `size`. Filament's
43
+ * x-height, 527 of its 1109 units. Every product wordmark draws its letter body (its x-height, or
44
+ * its cap height when it is set in capitals) at this height.
45
+ */
46
+ var PRODUCT_WORDMARK_BODY_RATIO = 527 / 1109;
47
+ var toUnits = (value) => Math.round(value * 1e3) / 1e3;
48
+ /**
49
+ * @internal The box that sets a product wordmark to the shared metrics: at one `size`, every
50
+ * product wordmark has the same height, the same baseline and letters of the same height, whatever
51
+ * its artwork's proportions. Filament's box is its own ink; a mark whose letters are larger for
52
+ * its ink (Alchemy's heavy script, Latchkey's capitals) gets empty space above and below.
53
+ */
54
+ function productWordmarkBox({ width, baseline, body }) {
55
+ const height = body / PRODUCT_WORDMARK_BODY_RATIO;
56
+ return {
57
+ viewBox: `0 ${toUnits(baseline - PRODUCT_WORDMARK_BASELINE_RATIO * height)} ${width} ${toUnits(height)}`,
58
+ aspectRatio: width / height
59
+ };
60
+ }
35
61
  //#endregion
36
- export { BRAND_MARK_CSS, BRAND_MARK_INVERSE_CSS, BRAND_MARK_NEUTRAL_CSS, BRAND_MARK_SVG_CSS, brandMarkAriaProps };
62
+ export { BRAND_MARK_CSS, BRAND_MARK_INVERSE_CSS, BRAND_MARK_NEUTRAL_CSS, BRAND_MARK_SVG_CSS, PRODUCT_WORDMARK_BASELINE_RATIO, PRODUCT_WORDMARK_BODY_RATIO, brandMarkAriaProps, productWordmarkBox };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @internal Generated by `pnpm assets` from `src/brand/assets/galaxy-latchkey-wordmark.svg`.
3
+ * Do not edit: change the SVG and run `pnpm assets`. Every fill is `currentColor` and the
4
+ * root has no size; the public mark that renders this sets both.
5
+ */
6
+ import { type SVGProps } from "react";
7
+ declare const GalaxyLatchkeyWordmarkSvg: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
8
+ export default GalaxyLatchkeyWordmarkSvg;
9
+ /** @internal The artwork's viewBox; the public mark derives its width as `size × width / height`. */
10
+ export declare const GALAXY_LATCHKEY_WORDMARK_VIEW_BOX: {
11
+ readonly width: 4340;
12
+ readonly height: 587;
13
+ };
@@ -0,0 +1,59 @@
1
+ import { forwardRef } from "react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/brand/internal/svg/GalaxyLatchkeyWordmarkSvg.tsx
4
+ /**
5
+ * @internal Generated by `pnpm assets` from `src/brand/assets/galaxy-latchkey-wordmark.svg`.
6
+ * Do not edit: change the SVG and run `pnpm assets`. Every fill is `currentColor` and the
7
+ * root has no size; the public mark that renders this sets both.
8
+ */
9
+ var GalaxyLatchkeyWordmarkSvg = forwardRef(function GalaxyLatchkeyWordmarkSvg(props, ref) {
10
+ return /* @__PURE__ */ jsxs("svg", {
11
+ viewBox: "0 0 4340 587",
12
+ fill: "currentColor",
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ ref,
15
+ ...props,
16
+ children: [
17
+ /* @__PURE__ */ jsx("path", {
18
+ d: "M159.925 8.58008H0V578.582H44.1899H159.925H445.784V434.665H159.925V8.58008Z",
19
+ fill: "currentColor"
20
+ }),
21
+ /* @__PURE__ */ jsx("path", {
22
+ d: "M645.691 8.58008L447.564 578.582H612.67L649.09 468.823H865.183L900.147 578.582H1075.45L877.809 8.58008H645.529H645.691ZM695.06 329.277L706.067 296.09L752.847 147.155H764.825L809.987 296.09L820.508 329.277H695.06Z",
23
+ fill: "currentColor"
24
+ }),
25
+ /* @__PURE__ */ jsx("path", {
26
+ d: "M1165.45 8.58008H990.146V152.335H1165.45V578.582H1325.37V152.335H1500.51V8.58008H1325.37H1165.45Z",
27
+ fill: "currentColor"
28
+ }),
29
+ /* @__PURE__ */ jsx("path", {
30
+ d: "M1942.09 28.9777C1902.43 9.71318 1852.42 0 1792.36 0C1732.31 0 1679.38 11.9796 1637.13 36.1007C1594.88 60.2217 1563 94.2179 1541.47 138.251C1519.94 182.284 1509.09 233.926 1509.09 293.5C1509.09 353.074 1519.94 404.878 1541.47 448.749C1563 492.782 1594.88 526.778 1637.13 550.899C1679.38 575.02 1731.18 587 1792.36 587C1853.55 587 1902.43 577.449 1942.09 558.022C1981.75 538.758 2011.37 512.047 2030.96 478.051C2050.54 444.054 2060.25 404.878 2060.25 360.683V341.095H1889.32V343.685C1889.32 376.548 1882.52 399.374 1868.93 412.163C1855.33 424.952 1828.62 431.265 1788.96 431.265C1761.77 431.265 1740.4 428.028 1724.7 421.552C1709.16 415.077 1697.83 401.802 1691.03 382.052C1684.23 362.14 1680.84 332.677 1680.84 293.5C1680.84 254.324 1684.23 224.213 1691.03 204.624C1697.83 185.036 1709 172.085 1724.7 165.448C1740.24 158.972 1761.77 155.735 1788.96 155.735C1828.62 155.735 1855.33 162.048 1868.93 174.837C1882.52 187.626 1889.32 210.452 1889.32 243.315V245.905H2060.25V226.317C2060.25 182.122 2050.54 142.946 2030.96 108.95C2011.37 74.9534 1981.75 48.2421 1942.09 28.9777Z",
31
+ fill: "currentColor"
32
+ }),
33
+ /* @__PURE__ */ jsx("path", {
34
+ d: "M2473.66 220.327H2260.16V8.58008H2100.24V578.582H2260.16V364.083H2473.66V578.582H2633.59V8.58008H2473.66V220.327Z",
35
+ fill: "currentColor"
36
+ }),
37
+ /* @__PURE__ */ jsx("path", {
38
+ d: "M3072.57 8.58008L2960.24 220.327H2856.48V8.58008H2696.56V578.582H2856.48V376.062H2962.02L3066.59 578.582H3250.31L3092.97 290.91L3253.7 8.58008H3072.57Z",
39
+ fill: "currentColor"
40
+ }),
41
+ /* @__PURE__ */ jsx("path", {
42
+ d: "M3309.87 8.58008H3266.49V578.582H3309.87H3426.42H3726.68V434.665H3426.42V364.083H3713.89V221.137H3426.42V152.335H3726.68V8.58008H3426.42H3309.87Z",
43
+ fill: "currentColor"
44
+ }),
45
+ /* @__PURE__ */ jsx("path", {
46
+ d: "M4340 8.58008H4153.69L4082.31 142.946L4044.92 227.936H4033.75L3995.55 142.946L3924 8.58008H3734.45L3957.18 386.099V578.582H4117.11V384.804L4340 8.58008Z",
47
+ fill: "currentColor"
48
+ })
49
+ ]
50
+ });
51
+ });
52
+ GalaxyLatchkeyWordmarkSvg.displayName = "GalaxyLatchkeyWordmarkSvg";
53
+ /** @internal The artwork's viewBox; the public mark derives its width as `size × width / height`. */
54
+ var GALAXY_LATCHKEY_WORDMARK_VIEW_BOX = {
55
+ width: 4340,
56
+ height: 587
57
+ };
58
+ //#endregion
59
+ export { GALAXY_LATCHKEY_WORDMARK_VIEW_BOX, GalaxyLatchkeyWordmarkSvg as default };
@@ -43,6 +43,11 @@ interface ModalBaseProps extends AriaAttributes {
43
43
  * @default false
44
44
  */
45
45
  isFullscreen?: boolean;
46
+ /**
47
+ * The panel and the body stop clipping, so a popup drawn inside the body hangs past it, over the footer and outside the panel: for third-party embeds that draw their own popups (a payment or address field). The body no longer scrolls while it is on, so turn it on only while the embedded popup is open. It changes only the panel and the body: a fixed height (`X_LARGE`, a `sidebar`) and `isFullscreen` keep theirs, and the sidebar and the `aside` keep their own scrolling.
48
+ * @default false
49
+ */
50
+ isOverflowVisible?: boolean;
46
51
  /**
47
52
  * Escape, a backdrop click and the close button close the dialog. When `false` there is no close button, and only the app (usually a `footer` action) can close it.
48
53
  * @default true
@@ -49,6 +49,14 @@ import { AnimatePresence, motion } from "framer-motion";
49
49
  * Sizes are widths: 400 / 560 / 720 / 960px. `X_LARGE` also holds a fixed height (720px, less
50
50
  * when the viewport is shorter). `isFullscreen` fills the viewport less 32px on each side.
51
51
  *
52
+ * `isOverflowVisible` stops the panel and the body clipping, for a third-party embed that draws its
53
+ * own popup inside its frame (a payment or address field's suggestions), which no portal can lift
54
+ * out: the popup hangs over the footer and past the panel. The body stops scrolling while it is on,
55
+ * so the app turns it on only while that popup is open. Nothing else changes: the panel keeps its
56
+ * size (fixed height and `isFullscreen` included), the sidebar and the aside keep their own
57
+ * scrolling, and the regions that reach the panel's corners (the sidebar, a first-row banner) round
58
+ * themselves, so the panel looks the same either way.
59
+ *
52
60
  * A short yes/no question is `ConfirmDialog`; a panel beside the page is `Drawer`; an anchored
53
61
  * panel is `Popover`.
54
62
  *
@@ -123,6 +131,10 @@ var Root = /*#__PURE__*/ styled("div")({
123
131
  class: "gx-Modal-r1uq3md9",
124
132
  propsAsIs: false
125
133
  });
134
+ /**
135
+ * The panel's inner corner (its radius less the hairline). The regions that reach a corner round
136
+ * themselves to it, so they never rely on the panel's clip, which `isOverflowVisible` turns off.
137
+ */
126
138
  var Panel = /*#__PURE__*/ styled("div")({
127
139
  name: "Panel",
128
140
  class: "gx-Modal-Panel-p1ltfmcj",
@@ -146,7 +158,11 @@ var Sidebar = /*#__PURE__*/ styled("div")({
146
158
  class: "gx-Modal-Sidebar-s1kofw5u",
147
159
  propsAsIs: false
148
160
  });
149
- /** The title row, banner, body and footer, in a column. */
161
+ /**
162
+ * The title row, banner, body and footer, in a column. Its radius draws nothing (no background, no
163
+ * clip): it holds the panel's inner corners this column reaches, for a region to inherit. Beside
164
+ * the sidebar those are the end corners only (the bottom ones below 768px, where it stacks).
165
+ */
150
166
  var Content = /*#__PURE__*/ styled("div")({
151
167
  name: "Content",
152
168
  class: "gx-Modal-Content-curevkp",
@@ -159,31 +175,44 @@ var Body = /*#__PURE__*/ styled("div")({
159
175
  });
160
176
  /** `isFlush`: the body has no inset; the content pads itself. */
161
177
  var FLUSH_BODY_CSS = "gx-Modal-FLUSH_BODY_CSS-f6mxmup";
162
- /** `banner`: a strip pinned between the title row and the body; it never shrinks or scrolls. */
178
+ /**
179
+ * `isOverflowVisible`: the body stops scrolling, so what hangs past it shows, and paints above the
180
+ * footer (its buttons are positioned, and come later).
181
+ */
182
+ var OVERFLOW_VISIBLE_BODY_CSS = "gx-Modal-OVERFLOW_VISIBLE_BODY_CSS-o9gpbdm";
183
+ /**
184
+ * `banner`: a strip pinned between the title row and the body; it never shrinks or scrolls. With no
185
+ * title row it is the column's first region, so it clips its `Alert` to the corners above it.
186
+ */
163
187
  var Banner = /*#__PURE__*/ styled("div")({
164
188
  name: "Banner",
165
- class: "gx-Modal-Banner-b9gpbdm",
189
+ class: "gx-Modal-Banner-bfsn1gx",
166
190
  propsAsIs: false
167
191
  });
168
192
  var Footer = /*#__PURE__*/ styled("div")({
169
193
  name: "Footer",
170
- class: "gx-Modal-Footer-ffsn1gx",
194
+ class: "gx-Modal-Footer-f1jg9rc6",
171
195
  propsAsIs: false
172
196
  });
173
197
  /** Pinned 12px from the panel's top-end corner. */
174
198
  var CloseSlot = /*#__PURE__*/ styled("span")({
175
199
  name: "CloseSlot",
176
- class: "gx-Modal-CloseSlot-c1jg9rc6",
200
+ class: "gx-Modal-CloseSlot-c7k0w0q",
177
201
  propsAsIs: false
178
202
  });
179
203
  /**
204
+ * `isOverflowVisible`: the panel stops clipping (the regions keep its corners themselves). The close
205
+ * button stays above the raised body, which runs under it when there is no title row.
206
+ */
207
+ var OVERFLOW_VISIBLE_PANEL_CSS = "gx-Modal-OVERFLOW_VISIBLE_PANEL_CSS-oddv16";
208
+ /**
180
209
  * The aside's slot: its width runs from 0 to `auto` (the 8px gap plus the aside, measured by
181
210
  * framer), which glides the panel aside as the pair re-centers, while the slot clips the aside so
182
211
  * it slides out from behind the panel's edge. Never shrinks: the panel gives way. Below 768px it
183
212
  * stacks under the panel at full width (the `!important` beats the slide's inline width) and takes
184
213
  * at most 40% of the viewport height.
185
214
  */
186
- var ASIDE_SLOT_CSS = "gx-Modal-ASIDE_SLOT_CSS-a7k0w0q";
215
+ var ASIDE_SLOT_CSS = "gx-Modal-ASIDE_SLOT_CSS-aq20d34";
187
216
  /**
188
217
  * The aside takes its child's width (`flex: none`, so the slide clips it rather than squeezing
189
218
  * it), at most half the viewport less the positioner's 32px inset and the gap: the panel always
@@ -191,7 +220,7 @@ var ASIDE_SLOT_CSS = "gx-Modal-ASIDE_SLOT_CSS-a7k0w0q";
191
220
  */
192
221
  var Aside = /*#__PURE__*/ styled("div")({
193
222
  name: "Aside",
194
- class: "gx-Modal-Aside-addv16",
223
+ class: "gx-Modal-Aside-ausoqzp",
195
224
  propsAsIs: false
196
225
  });
197
226
  /**
@@ -222,7 +251,7 @@ var SLOT_TRANSITION = {
222
251
  };
223
252
  var REDUCED_TRANSITION = { duration: 0 };
224
253
  /** A blocking dialog over a dimmed page: title row, scrolling body, actions row. */
225
- var Modal = forwardRef(function Modal({ children, header, subheader, icon, footer, banner, sidebar, aside, hasDividers = false, isFlush = false, size = "MEDIUM", isFullscreen = false, isDismissable = true, isOpen: isOpenProp, defaultIsOpen = false, onOpenChange, ariaLabel, id, className, style, ...rest }, ref) {
254
+ var Modal = forwardRef(function Modal({ children, header, subheader, icon, footer, banner, sidebar, aside, hasDividers = false, isFlush = false, size = "MEDIUM", isFullscreen = false, isOverflowVisible = false, isDismissable = true, isOpen: isOpenProp, defaultIsOpen = false, onOpenChange, ariaLabel, id, className, style, ...rest }, ref) {
226
255
  const generatedId = useId();
227
256
  const titleId = useId();
228
257
  const subheaderId = useId();
@@ -294,7 +323,7 @@ var Modal = forwardRef(function Modal({ children, header, subheader, icon, foote
294
323
  className,
295
324
  style,
296
325
  children: [/* @__PURE__ */ jsxs(Panel, {
297
- className: isFullscreen ? FULLSCREEN_PANEL_CSS : MODAL_SIZE_TO_CSS_MAP[size],
326
+ className: cx(isFullscreen ? FULLSCREEN_PANEL_CSS : MODAL_SIZE_TO_CSS_MAP[size], isOverflowVisible && OVERFLOW_VISIBLE_PANEL_CSS),
298
327
  children: [
299
328
  /* @__PURE__ */ jsx(AnimatePresence, {
300
329
  initial: false,
@@ -320,7 +349,7 @@ var Modal = forwardRef(function Modal({ children, header, subheader, icon, foote
320
349
  hasDividers && hasHeaderRow && /* @__PURE__ */ jsx(Divider, {}),
321
350
  banner !== void 0 && /* @__PURE__ */ jsx(Banner, { children: banner }),
322
351
  /* @__PURE__ */ jsx(Body, {
323
- className: cx(isFlush && FLUSH_BODY_CSS),
352
+ className: cx(isFlush && FLUSH_BODY_CSS, isOverflowVisible && OVERFLOW_VISIBLE_BODY_CSS),
324
353
  children: typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx(Text, { children }) : children
325
354
  }),
326
355
  footer !== void 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [hasDividers && /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(Footer, { children: footer })] })