@eduardoalvarez/arrecife 0.8.0 → 0.10.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/index.d.cts CHANGED
@@ -28,7 +28,6 @@ import { F as Face, P as Pose } from './catalog-D13txprv.cjs';
28
28
  export { A as ASSETS_PATH, B as Background, a as Fin, f as faceList, b as faceUsage, c as faces, d as fins, p as poseList, e as poses } from './catalog-D13txprv.cjs';
29
29
  export { Isotype, IsotypeProps, Logo, LogoProps, Mascot, MascotFace, MascotFaceProps, MascotProps } from './brand/index.cjs';
30
30
  import { ClassValue } from 'clsx';
31
- export { i as social } from './index-BbRplw_B.cjs';
32
31
  import '@radix-ui/react-label';
33
32
 
34
33
  /**
@@ -81,8 +80,8 @@ declare function AccordionContent({ className, children, ...props }: ComponentPr
81
80
  type AlertProps = Omit<ComponentPropsWithoutRef<'div'>, 'title'> & VariantProps<typeof alert> & {
82
81
  title?: ReactNode;
83
82
  /**
84
- * Replaces the variant's mono glyph. Never an emoji: if you need something
85
- * else, it is an SVG from `glyphs`.
83
+ * Replaces the variant's glyph. Never an emoji: if you need something else,
84
+ * it is `<Icon as={…} />` from `@eduardoalvarez/arrecife/icons`.
86
85
  */
87
86
  icon?: ReactNode;
88
87
  };
@@ -545,6 +544,40 @@ type TextareaProps = ComponentProps<'textarea'> & {
545
544
  declare function Textarea({ className, invalid, ...props }: TextareaProps): react.JSX.Element;
546
545
 
547
546
  declare const ToastAction: react.ForwardRefExoticComponent<ToastPrimitive.ToastActionProps & react.RefAttributes<HTMLButtonElement>>;
547
+ /**
548
+ * THE TONE IS A SURFACE, NOT A LINE, and that is what 0.10.0 changed.
549
+ *
550
+ * It used to be `bg-surface` for all three and the whole difference between a
551
+ * confirmation and a failure was `border-success/40` against `border-error/40`:
552
+ * two hairlines at 40 % opacity, on a box that floats over whatever page it
553
+ * happens to land on, with no mark on it and the text in `textSecondary`. At the
554
+ * size a toast actually appears at, that is not a colour — it is two greys.
555
+ *
556
+ * What it is now is the recipe `Alert` already carries and had already argued:
557
+ * the semantic colour SOLID on the border and at 10 % as a tint, which is
558
+ * `emphasis="strong"` in `variants/alert.ts`. That variant exists for the alert
559
+ * that has to read UNDER a form field, and a toast has the same problem from the
560
+ * other side — it reads over content it did not choose, so the subtle 8 %/22 %
561
+ * recipe is not enough on its own.
562
+ *
563
+ * THE TINT RIDES ON A GRADIENT and not on `background-color`, which is the one
564
+ * odd line here. A toast has to be OPAQUE: it floats, and `bg-success/10` alone
565
+ * would let the article underneath show through it. `bg-surface` paints the
566
+ * opaque ground and the flat `linear-gradient` paints the tint on top of it, in
567
+ * one element, without a wrapper or a `::before` that would need its own
568
+ * stacking context. The two `from-`/`to-` stops are the same colour on purpose:
569
+ * it is a fill, not a gradient.
570
+ *
571
+ * MEASURED over the resulting surface, dark then light, worst case of the two:
572
+ *
573
+ * text-text-primary over the success tint 14.9 14.6
574
+ * text-text-secondary over the success tint 8.4 7.1
575
+ * the border against the tint 4.2 3.6 (3:1 graphical)
576
+ *
577
+ * The body stays `textSecondary` and the title `textPrimary`, which is the same
578
+ * split `Alert` uses and for the same reason: a semantic colour is not a text
579
+ * colour over its own tint.
580
+ */
548
581
  declare const toast$1: (props?: ({
549
582
  variant?: "error" | "neutral" | "success" | null | undefined;
550
583
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -734,15 +767,19 @@ declare function AuthorCard({ name, role, src, bio, action, className, ...props
734
767
  * the same. What changed is the skin and the two dependencies a package cannot
735
768
  * have:
736
769
  *
737
- * - the portfolio's `Icon` → the glyphs now live in `src/lib/glyphs.tsx`, with
738
- * the same paths.
770
+ * - the portfolio's `Icon` → the library's own `Icon` over Phosphor. The eight
771
+ * paths this file used to carry verbatim from the portfolio are gone with
772
+ * `lib/glyphs.tsx`; `Play`, `Pause`, `SpeakerHigh` and `SpeakerSlash` are the
773
+ * same symbols in Phosphor's hand, and the ±15s skips are `ArrowCounterClockwise`
774
+ * and `ArrowClockwise`. See `docs/decisions/0.10.md` § 51.
739
775
  * - analytics' `trackEvent` → the `onFirstPlay` prop, which the consumer wires
740
776
  * to whatever they use. It still fires exactly once per load.
741
777
  *
742
778
  * And three things the system does not allow:
743
779
  *
744
- * - The waveform no longer animates `scaleY`. The bars are still there and still
745
- * tell playback from pause by opacity, but they do not scale.
780
+ * - The waveform no longer animates `scaleY`. Since 0.10.0 it is not even drawn
781
+ * here: it is Phosphor's `Waveform`, which is the same five bars. It still
782
+ * tells playback from pause by opacity, and it does not move.
746
783
  * - The floating player appears and disappears instead of sliding.
747
784
  * - The progress bar no longer interpolates its width.
748
785
  *
@@ -950,9 +987,10 @@ declare function EventCalendar({ events, onCreateEvent, onUpdateEvent, onDeleteE
950
987
  /**
951
988
  * The footer, and the site's CLI signature: `$ cd ~/eduardoalvarez.dev/2026`.
952
989
  *
953
- * The domain comes from `naming.domain` and not from a hand-written string, for
990
+ * The domain defaults to `naming.domain` and not to a hand-written string, for
954
991
  * the same reason as the wordmark: if it changes, it changes in all five
955
- * projects at once.
992
+ * projects at once. A project that lives on its OWN domain passes `domain` —
993
+ * see `docs/decisions/0.9.md` § 49.
956
994
  *
957
995
  * The social links are icons with NO visible text, so `aria-label` is not an
958
996
  * improvement: it is the only thing that makes them legible. Which is why it is
@@ -981,8 +1019,10 @@ type SocialLink = {
981
1019
  label: string;
982
1020
  href: string;
983
1021
  /**
984
- * The glyph, at 19px. Brands are SOLID (`fill`) and functional icons use a 1.6
985
- * stroke. Never an emoji.
1022
+ * The glyph, at 19px. It is the PROJECT's — the library ships no catalogue of
1023
+ * social marks since 0.10.0 — and the drawing rule it should follow is the
1024
+ * system's: a brand is SOLID, so `<Icon as={GithubLogo} tone="current" />`,
1025
+ * and a functional mark keeps the default `action`. Never an emoji.
986
1026
  */
987
1027
  icon: ReactNode;
988
1028
  };
@@ -1038,6 +1078,21 @@ type FooterBase = Omit<ComponentPropsWithoutRef<'footer'>, 'children'> & {
1038
1078
  * signature is text, which is what it has always been.
1039
1079
  */
1040
1080
  signatureHref?: string | undefined;
1081
+ /**
1082
+ * The domain the signature prints, defaulting to the identity's own.
1083
+ *
1084
+ * It exists because the default is right for the sites that ARE
1085
+ * `eduardoalvarez.dev` and wrong for the ones that are not: `cursos` lives on
1086
+ * `cursos.eduardoalvarez.dev` and had been printing it since before this
1087
+ * component existed. Adopting the footer would have made a site sign with its
1088
+ * parent's domain — a fact, not a style, and one nothing in the type could
1089
+ * have warned about.
1090
+ *
1091
+ * It is a domain and not a whole signature: the `$`, the `cd ~/` and the year
1092
+ * are the identity's and stay the component's. See `docs/decisions/0.9.md`
1093
+ * § 49.
1094
+ */
1095
+ domain?: string | undefined;
1041
1096
  };
1042
1097
  type FooterProps = FooterBase & ({
1043
1098
  /** The shape the library has always had: stacked rows and the signature at the top right. */
@@ -1073,7 +1128,7 @@ type FooterProps = FooterBase & ({
1073
1128
  children: ReactNode;
1074
1129
  }) => ReactNode) | undefined;
1075
1130
  });
1076
- declare function Footer({ variant, columns, description, action, linkAsChild, social, brand, year, signatureHref, className, ...rest }: FooterProps): react.JSX.Element;
1131
+ declare function Footer({ variant, columns, description, action, linkAsChild, social, brand, year, signatureHref, domain, className, ...rest }: FooterProps): react.JSX.Element;
1077
1132
 
1078
1133
  /**
1079
1134
  * ONE per site. It is the only piece in the system that is spent like the
package/dist/index.d.ts CHANGED
@@ -28,7 +28,6 @@ import { F as Face, P as Pose } from './catalog-D13txprv.js';
28
28
  export { A as ASSETS_PATH, B as Background, a as Fin, f as faceList, b as faceUsage, c as faces, d as fins, p as poseList, e as poses } from './catalog-D13txprv.js';
29
29
  export { Isotype, IsotypeProps, Logo, LogoProps, Mascot, MascotFace, MascotFaceProps, MascotProps } from './brand/index.js';
30
30
  import { ClassValue } from 'clsx';
31
- export { i as social } from './index-BbRplw_B.js';
32
31
  import '@radix-ui/react-label';
33
32
 
34
33
  /**
@@ -81,8 +80,8 @@ declare function AccordionContent({ className, children, ...props }: ComponentPr
81
80
  type AlertProps = Omit<ComponentPropsWithoutRef<'div'>, 'title'> & VariantProps<typeof alert> & {
82
81
  title?: ReactNode;
83
82
  /**
84
- * Replaces the variant's mono glyph. Never an emoji: if you need something
85
- * else, it is an SVG from `glyphs`.
83
+ * Replaces the variant's glyph. Never an emoji: if you need something else,
84
+ * it is `<Icon as={…} />` from `@eduardoalvarez/arrecife/icons`.
86
85
  */
87
86
  icon?: ReactNode;
88
87
  };
@@ -545,6 +544,40 @@ type TextareaProps = ComponentProps<'textarea'> & {
545
544
  declare function Textarea({ className, invalid, ...props }: TextareaProps): react.JSX.Element;
546
545
 
547
546
  declare const ToastAction: react.ForwardRefExoticComponent<ToastPrimitive.ToastActionProps & react.RefAttributes<HTMLButtonElement>>;
547
+ /**
548
+ * THE TONE IS A SURFACE, NOT A LINE, and that is what 0.10.0 changed.
549
+ *
550
+ * It used to be `bg-surface` for all three and the whole difference between a
551
+ * confirmation and a failure was `border-success/40` against `border-error/40`:
552
+ * two hairlines at 40 % opacity, on a box that floats over whatever page it
553
+ * happens to land on, with no mark on it and the text in `textSecondary`. At the
554
+ * size a toast actually appears at, that is not a colour — it is two greys.
555
+ *
556
+ * What it is now is the recipe `Alert` already carries and had already argued:
557
+ * the semantic colour SOLID on the border and at 10 % as a tint, which is
558
+ * `emphasis="strong"` in `variants/alert.ts`. That variant exists for the alert
559
+ * that has to read UNDER a form field, and a toast has the same problem from the
560
+ * other side — it reads over content it did not choose, so the subtle 8 %/22 %
561
+ * recipe is not enough on its own.
562
+ *
563
+ * THE TINT RIDES ON A GRADIENT and not on `background-color`, which is the one
564
+ * odd line here. A toast has to be OPAQUE: it floats, and `bg-success/10` alone
565
+ * would let the article underneath show through it. `bg-surface` paints the
566
+ * opaque ground and the flat `linear-gradient` paints the tint on top of it, in
567
+ * one element, without a wrapper or a `::before` that would need its own
568
+ * stacking context. The two `from-`/`to-` stops are the same colour on purpose:
569
+ * it is a fill, not a gradient.
570
+ *
571
+ * MEASURED over the resulting surface, dark then light, worst case of the two:
572
+ *
573
+ * text-text-primary over the success tint 14.9 14.6
574
+ * text-text-secondary over the success tint 8.4 7.1
575
+ * the border against the tint 4.2 3.6 (3:1 graphical)
576
+ *
577
+ * The body stays `textSecondary` and the title `textPrimary`, which is the same
578
+ * split `Alert` uses and for the same reason: a semantic colour is not a text
579
+ * colour over its own tint.
580
+ */
548
581
  declare const toast$1: (props?: ({
549
582
  variant?: "error" | "neutral" | "success" | null | undefined;
550
583
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -734,15 +767,19 @@ declare function AuthorCard({ name, role, src, bio, action, className, ...props
734
767
  * the same. What changed is the skin and the two dependencies a package cannot
735
768
  * have:
736
769
  *
737
- * - the portfolio's `Icon` → the glyphs now live in `src/lib/glyphs.tsx`, with
738
- * the same paths.
770
+ * - the portfolio's `Icon` → the library's own `Icon` over Phosphor. The eight
771
+ * paths this file used to carry verbatim from the portfolio are gone with
772
+ * `lib/glyphs.tsx`; `Play`, `Pause`, `SpeakerHigh` and `SpeakerSlash` are the
773
+ * same symbols in Phosphor's hand, and the ±15s skips are `ArrowCounterClockwise`
774
+ * and `ArrowClockwise`. See `docs/decisions/0.10.md` § 51.
739
775
  * - analytics' `trackEvent` → the `onFirstPlay` prop, which the consumer wires
740
776
  * to whatever they use. It still fires exactly once per load.
741
777
  *
742
778
  * And three things the system does not allow:
743
779
  *
744
- * - The waveform no longer animates `scaleY`. The bars are still there and still
745
- * tell playback from pause by opacity, but they do not scale.
780
+ * - The waveform no longer animates `scaleY`. Since 0.10.0 it is not even drawn
781
+ * here: it is Phosphor's `Waveform`, which is the same five bars. It still
782
+ * tells playback from pause by opacity, and it does not move.
746
783
  * - The floating player appears and disappears instead of sliding.
747
784
  * - The progress bar no longer interpolates its width.
748
785
  *
@@ -950,9 +987,10 @@ declare function EventCalendar({ events, onCreateEvent, onUpdateEvent, onDeleteE
950
987
  /**
951
988
  * The footer, and the site's CLI signature: `$ cd ~/eduardoalvarez.dev/2026`.
952
989
  *
953
- * The domain comes from `naming.domain` and not from a hand-written string, for
990
+ * The domain defaults to `naming.domain` and not to a hand-written string, for
954
991
  * the same reason as the wordmark: if it changes, it changes in all five
955
- * projects at once.
992
+ * projects at once. A project that lives on its OWN domain passes `domain` —
993
+ * see `docs/decisions/0.9.md` § 49.
956
994
  *
957
995
  * The social links are icons with NO visible text, so `aria-label` is not an
958
996
  * improvement: it is the only thing that makes them legible. Which is why it is
@@ -981,8 +1019,10 @@ type SocialLink = {
981
1019
  label: string;
982
1020
  href: string;
983
1021
  /**
984
- * The glyph, at 19px. Brands are SOLID (`fill`) and functional icons use a 1.6
985
- * stroke. Never an emoji.
1022
+ * The glyph, at 19px. It is the PROJECT's — the library ships no catalogue of
1023
+ * social marks since 0.10.0 — and the drawing rule it should follow is the
1024
+ * system's: a brand is SOLID, so `<Icon as={GithubLogo} tone="current" />`,
1025
+ * and a functional mark keeps the default `action`. Never an emoji.
986
1026
  */
987
1027
  icon: ReactNode;
988
1028
  };
@@ -1038,6 +1078,21 @@ type FooterBase = Omit<ComponentPropsWithoutRef<'footer'>, 'children'> & {
1038
1078
  * signature is text, which is what it has always been.
1039
1079
  */
1040
1080
  signatureHref?: string | undefined;
1081
+ /**
1082
+ * The domain the signature prints, defaulting to the identity's own.
1083
+ *
1084
+ * It exists because the default is right for the sites that ARE
1085
+ * `eduardoalvarez.dev` and wrong for the ones that are not: `cursos` lives on
1086
+ * `cursos.eduardoalvarez.dev` and had been printing it since before this
1087
+ * component existed. Adopting the footer would have made a site sign with its
1088
+ * parent's domain — a fact, not a style, and one nothing in the type could
1089
+ * have warned about.
1090
+ *
1091
+ * It is a domain and not a whole signature: the `$`, the `cd ~/` and the year
1092
+ * are the identity's and stay the component's. See `docs/decisions/0.9.md`
1093
+ * § 49.
1094
+ */
1095
+ domain?: string | undefined;
1041
1096
  };
1042
1097
  type FooterProps = FooterBase & ({
1043
1098
  /** The shape the library has always had: stacked rows and the signature at the top right. */
@@ -1073,7 +1128,7 @@ type FooterProps = FooterBase & ({
1073
1128
  children: ReactNode;
1074
1129
  }) => ReactNode) | undefined;
1075
1130
  });
1076
- declare function Footer({ variant, columns, description, action, linkAsChild, social, brand, year, signatureHref, className, ...rest }: FooterProps): react.JSX.Element;
1131
+ declare function Footer({ variant, columns, description, action, linkAsChild, social, brand, year, signatureHref, domain, className, ...rest }: FooterProps): react.JSX.Element;
1077
1132
 
1078
1133
  /**
1079
1134
  * ONE per site. It is the only piece in the system that is spent like the