@eduardoalvarez/arrecife 0.9.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
  *
@@ -982,8 +1019,10 @@ type SocialLink = {
982
1019
  label: string;
983
1020
  href: string;
984
1021
  /**
985
- * The glyph, at 19px. Brands are SOLID (`fill`) and functional icons use a 1.6
986
- * 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.
987
1026
  */
988
1027
  icon: ReactNode;
989
1028
  };
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
  *
@@ -982,8 +1019,10 @@ type SocialLink = {
982
1019
  label: string;
983
1020
  href: string;
984
1021
  /**
985
- * The glyph, at 19px. Brands are SOLID (`fill`) and functional icons use a 1.6
986
- * 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.
987
1026
  */
988
1027
  icon: ReactNode;
989
1028
  };