@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/CHANGELOG.md +42 -0
- package/README.md +99 -69
- package/dist/brand/index.js +2 -3
- package/dist/chart/index.js +0 -1
- package/dist/chunk-ZSCSKCTY.js +26 -0
- package/dist/form/index.js +0 -1
- package/dist/icons/index.d.cts +19 -10
- package/dist/icons/index.d.ts +19 -10
- package/dist/icons/index.js +2 -27
- package/dist/index.cjs +205 -381
- package/dist/index.d.cts +48 -9
- package/dist/index.d.ts +48 -9
- package/dist/index.js +148 -186
- package/dist/og/index.js +0 -1
- package/dist/shiki/index.js +0 -1
- package/dist/theme/index.js +0 -1
- package/dist/tokens/index.js +0 -1
- package/dist/tokens/theme.css +21 -1
- package/dist/variants/index.js +0 -1
- package/llms.txt +63 -134
- package/package.json +18 -30
- package/dist/chunk-HOADZ6GS.js +0 -72
- package/dist/chunk-LXRGQKMG.js +0 -145
- package/dist/chunk-MLKGABMK.js +0 -7
- package/dist/index-BbRplw_B.d.cts +0 -58
- package/dist/index-BbRplw_B.d.ts +0 -58
- package/dist/social/data.cjs +0 -161
- package/dist/social/data.d.cts +0 -161
- package/dist/social/data.d.ts +0 -161
- package/dist/social/data.js +0 -2
- package/dist/social/index.cjs +0 -153
- package/dist/social/index.d.cts +0 -2
- package/dist/social/index.d.ts +0 -2
- package/dist/social/index.js +0 -3
- package/dist/{chunk-MPZBF2TZ.js → chunk-IIT3YLYN.js} +1 -1
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
|
|
85
|
-
*
|
|
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
|
|
738
|
-
* the
|
|
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`.
|
|
745
|
-
*
|
|
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.
|
|
986
|
-
*
|
|
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
|
|
85
|
-
*
|
|
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
|
|
738
|
-
* the
|
|
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`.
|
|
745
|
-
*
|
|
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.
|
|
986
|
-
*
|
|
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
|
};
|