@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/og/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { ASSETS_PATH, faces, poses, fins } from '../chunk-CKRSQPTX.js';
2
2
  import { fonts, dark, light, naming, gradient, tagline, typeScale } from '../chunk-FGFNK72B.js';
3
- import '../chunk-MLKGABMK.js';
4
3
 
5
4
  // src/og/templates.ts
6
5
  var OG = {
@@ -1,5 +1,4 @@
1
1
  import { syntax } from '../chunk-FGFNK72B.js';
2
- import '../chunk-MLKGABMK.js';
3
2
 
4
3
  // src/shiki/theme.ts
5
4
  var arrecife = {
@@ -1,2 +1 @@
1
1
  export { THEME_ATTRIBUTE, THEME_EVENT, THEME_KEY, applyTheme, currentTheme, preferredTheme, storedTheme, themeScript, toggleTheme, watchTheme } from '../chunk-GCRII2KQ.js';
2
- import '../chunk-MLKGABMK.js';
@@ -1,3 +1,2 @@
1
1
  export { tokens } from '../chunk-5A5GH2PF.js';
2
2
  export { brand, colors, control, dark, fonts, gradient, light, limits, motion, naming, radius, series, shadow, size, spacing, syntax, tagline, typeScale } from '../chunk-FGFNK72B.js';
3
- import '../chunk-MLKGABMK.js';
@@ -379,7 +379,22 @@
379
379
  focus-ring-warm exists for the ONE control the ring cannot be biolume on:
380
380
  the conversion button is the system's only sand fill, and a biolume ring
381
381
  around it puts both of the brand's accents in the same three pixels. It sets
382
- only the color, so the width and the offset stay in one place. */
382
+ only the color, so the width and the offset stay in one place.
383
+
384
+ focus-ring-inset flips the OFFSET, and only the offset, for the same reason
385
+ and by the same rule: an element that is focusable but sits inside a clipped
386
+ container cannot wear a ring drawn 3px outside itself, because the container
387
+ paints it away. CodeBlock is the case — its root carries overflow-hidden so
388
+ its rounded corners hold, and its pre scrolls, so the pre has to be focusable.
389
+ With the outward ring, three of its four sides were clipped and what was left
390
+ read as a stray line under the header: a focus indicator that is present in
391
+ the CSS and invisible on screen, which is WCAG 2.4.7 failing while looking
392
+ fixed.
393
+
394
+ It is -3px and not 0: at 0 the ring sits exactly on the border box and reads
395
+ as a change of border rather than as a ring. The padding it eats into is
396
+ p-step-md, so it never touches the text. Reach for it ONLY when a clipping
397
+ ancestor is the reason — not because the outward ring looks too loud. */
383
398
  @utility focus-ring {
384
399
  &:focus-visible {
385
400
  outline: 2px solid var(--color-accent);
@@ -391,6 +406,11 @@
391
406
  outline-color: var(--color-warm);
392
407
  }
393
408
  }
409
+ @utility focus-ring-inset {
410
+ &:focus-visible {
411
+ outline-offset: -3px;
412
+ }
413
+ }
394
414
 
395
415
  /* The system's only transition, as a utility. States are communicated with
396
416
  border and color, not with movement: this class cannot animate anything else. */
@@ -1,3 +1,2 @@
1
1
  export { CARD, CARD_HOVER, CARD_SURFACE, alert as alertVariants, avatar as avatarVariants, badge as badgeVariants, button as buttonVariants, category as categoryBadgeVariants, metric as metricBadgeVariants } from '../chunk-XXDATT3A.js';
2
2
  export { text as textVariants } from '../chunk-ODBFN44D.js';
3
- import '../chunk-MLKGABMK.js';
package/llms.txt CHANGED
@@ -34,6 +34,7 @@ Requirements, and they are not optional:
34
34
  | | |
35
35
  | --- | --- |
36
36
  | React | `^19.0.0` and `react-dom` `^19.0.0`, as peer dependencies |
37
+ | Phosphor | `@phosphor-icons/react` `^2.1.0`, as a peer dependency. **Required since 0.10.0**: every icon the library draws comes from it |
37
38
  | Tailwind | v4. **There is no v3 preset**: the output is `@theme`, which v3 does not understand |
38
39
  | Node | `>=22.18.0` for the subpaths that run at build time (`./og`, `./tokens`) |
39
40
 
@@ -41,8 +42,15 @@ Radix, `clsx`, `tailwind-merge`, `class-variance-authority`, `date-fns` and
41
42
  `react-day-picker` come as dependencies of the library. You do not need to
42
43
  install or declare them.
43
44
 
44
- **It ships no icon set.** The glyphs the components
45
- need are inline, inherit `currentColor` and measure 1em.
45
+ **It ships no icon INVENTORY, and it does ship the drawing.** Until 0.10.0 the
46
+ components carried a hand-drawn set of their own; they now draw every glyph from
47
+ `@phosphor-icons/react` through `Icon`, which fixes the size at 1em and takes the
48
+ weight from `tone`. Which icons your project uses is still your project's
49
+ decision — what stopped being the project's is the line they are drawn with.
50
+
51
+ That is why Phosphor is a required peer dependency rather than an optional one:
52
+ the `Alert`, the `Select` and the `Button` you import already draw with it,
53
+ whether or not you draw an icon yourself.
46
54
 
47
55
  ## Tailwind configuration
48
56
 
@@ -116,8 +124,7 @@ that only whoever uses them installs.
116
124
  | `@eduardoalvarez/arrecife/og` | **no** | — | The Open Graph templates for Satori |
117
125
  | `@eduardoalvarez/arrecife/shiki` | **no** | — | The syntax highlighting theme |
118
126
  | `@eduardoalvarez/arrecife/brand` | yes | — | Logo, isotype and mascot as components |
119
- | `@eduardoalvarez/arrecife/social` | yes, on the server only | — | The ten social icons, loose. No `"use client"` |
120
- | `@eduardoalvarez/arrecife/social/data` | **no** | — | The same ten as shapes, plus `socialSvg`. For a template that mounts no React |
127
+ | `@eduardoalvarez/arrecife/icons` | yes, on the server only | `@phosphor-icons/react` | `Icon`, the wrapper that fixes size and weight. No `"use client"` |
121
128
  | `@eduardoalvarez/arrecife/icons` | yes | `@phosphor-icons/react` | `Icon`, which draws a Phosphor icon at the system's size, and at the weight its role asks for |
122
129
  | `@eduardoalvarez/arrecife/form` | yes | `react-hook-form` | The form layer: labels, errors and `aria-*` |
123
130
  | `@eduardoalvarez/arrecife/chart` | yes | `recharts` | The chart chassis, the series palette and the three chart types |
@@ -148,12 +155,12 @@ before 0.6.0 and it pulled 272 KB of client chunk in for components that never
148
155
  needed it.
149
156
 
150
157
  The six portable subpaths do NOT carry the directive, and that is the half that
151
- matters in a Server Component: `./tokens`, `./theme`, `./variants`, `./social/data`,
152
- `./og` and `./shiki` stay on the server. Neither does `./social`, which is a third
153
- case: it renders React — it is ten `<svg>` — so it can never be portable, but it
154
- holds no state and nothing about it needs a client boundary. It is the only way to put a
155
- social icon in a Server Component, and § «The social icons come from `./social`»
156
- below says why the grouped form cannot do it. If all you need are classes — for a `<div>`, an
158
+ matters in a Server Component: `./tokens`, `./theme`, `./variants`,
159
+ `./og` and `./shiki` stay on the server. Neither does `./icons`, which is a third
160
+ case: it renders React — it is one `<svg>` — so it can never be portable, but it
161
+ holds no state and nothing about it needs a client boundary. It is how you put an
162
+ icon in a Server Component, and § «The social icons are yours, and they come from
163
+ Phosphor» below says which Phosphor entry to pair it with there. If all you need are classes — for a `<div>`, an
157
164
  `<a>` or an Astro island you do not want to hydrate — import them from
158
165
  `./variants` and nothing crosses to the client:
159
166
 
@@ -373,8 +380,9 @@ component's.
373
380
  <EmptyState variant="inline" expression="waiting" title="…" />
374
381
  ```
375
382
 
376
- `inline` takes an optional `icon` — a `ReactNode` the project passes and sizes,
377
- at 1em and in `currentColor`, like `Stat`'s. The library ships no icons.
383
+ `inline` takes an optional `icon` — a `ReactNode` the project passes, normally
384
+ `<Icon as={…} />` from `./icons`, which is already 1em and `currentColor`. The
385
+ library ships no icon inventory: which glyph goes there is your decision.
378
386
 
379
387
  Do not reach for `page` inside a table because the face is «nicer»: an admin
380
388
  screen with a dozen empty regions gets a dozen mascots, which is what made every
@@ -383,7 +391,10 @@ consuming project write its own empty state instead of using this one.
383
391
  ### The two shapes of `Footer`
384
392
 
385
393
  ```tsx
386
- // The default. Stacked rows, signature level with the first one.
394
+ // The default. Stacked rows, signature level with the first one — and stacked
395
+ // and CENTRED below `sm`, which is what a phone gets.
396
+ // SOCIAL is the project's own array: `{ label, href, icon }`, the icon drawn
397
+ // with `<Icon as={GithubLogo} tone="current" />`.
387
398
  <Footer brand={<Logo />} social={SOCIAL} />
388
399
 
389
400
  // `full`. Brand and description on the left, link columns on the right,
@@ -476,63 +487,50 @@ COMPARE rather than add up, the type is `LineChart`.
476
487
  Anything that is not a series over a category axis has no type and is not missing
477
488
  one. A doughnut is `ChartContainer` plus Recharts' `Pie` with `SERIES_COLORS`.
478
489
 
479
- ### The social icons come from `./social`
480
-
481
- ```tsx
482
- // ❌ does not exist: the root publishes them grouped, not loose
483
- import { GitHub } from '@eduardoalvarez/arrecife';
484
-
485
- // ✅ the normal form
486
- import { GitHub } from '@eduardoalvarez/arrecife/social';
487
-
488
- // ✅ for iterating the catalogue
489
- import { social } from '@eduardoalvarez/arrecife';
490
- <social.GitHub />
491
- ```
492
-
493
- All ten: `GitHub`, `LinkedIn`, `X`, `Instagram`, `Discord`, `YouTube`, `Rss`,
494
- `Email`, `Newsletter`, `Website`. `Newsletter` is the bell: a way to follow, like
495
- `Rss`, named for what it means. `Website` is «my other site» — the personal
496
- domain in a footer full of networks — and it is what replaces borrowing a globe
497
- from an icon set, which brings its own stroke weight and its own margins.
498
-
499
- Six are brands and go SOLID, four are functional and use a 1.6 stroke. A row that
500
- mixes the two pens is the normal case, not a defect: a brand is somebody else's
501
- silhouette and cannot be outlined, and a symbol the system draws itself has no
502
- owner to be faithful to.
490
+ ### The social icons are yours, and they come from Phosphor
503
491
 
504
- **In a Server Component the subpath is mandatory, not preferred.** The root
505
- carries `"use client"`, and a client reference crosses the boundary per EXPORT —
506
- the properties of a plain object are not exports, so `social.LinkedIn` is
507
- `undefined` on the server and `undefined` as an element type kills the build at
508
- prerender. `./social` carries no directive: it renders on the server and ships no
509
- client JS. Use `social` only when mapping a list of names onto icons.
492
+ Until 0.10.0 the library shipped ten of them at `./social` — `GitHub`,
493
+ `LinkedIn`, `X`, `Instagram`, `Discord`, `YouTube`, `Rss`, `Email`,
494
+ `Newsletter`, `Website` — drawn by hand. That subpath is gone. Phosphor has all
495
+ ten and the migration is one import per call site:
510
496
 
511
- The root keeps the group because one of them is called `X`, and loose at the root
512
- it collides. In the subpath, alias it: `import { X as XIcon }`.
497
+ ```tsx
498
+ // ❌ removed in 0.10.0
499
+ import { GitHub, LinkedIn, Website } from '@eduardoalvarez/arrecife/social';
513
500
 
514
- **If you mount no React, the shapes are published too.** `./social/data` imports
515
- nothing, so an `.astro` that ships no framework JavaScript can draw the same
516
- glyph instead of pasting the `<path>` into the project:
501
+ // ✅
502
+ import { GithubLogo, LinkedinLogo, Globe } from '@phosphor-icons/react';
503
+ import { Icon } from '@eduardoalvarez/arrecife/icons';
517
504
 
518
- ```astro
519
- ---
520
- import { socialSvg } from '@eduardoalvarez/arrecife/social/data';
521
- ---
522
- <Fragment set:html={socialSvg('GitHub', { class: 'size-[19px]' })} />
505
+ <Icon as={GithubLogo} tone="current" />
523
506
  ```
524
507
 
525
- `socialGlyphs` is the catalogue keyed by name, `socialNames` is the ten names in
526
- order, and every glyph is exported on its own — `gitHubGlyph`, `websiteGlyph` —
527
- if you want the shapes rather than the markup. The React components are drawn
528
- from that same file, so the two renderings cannot disagree. Reaching for
529
- `socialGlyphs` or `socialSvg` names all ten, which is the price of iterating a
530
- catalogue; `import { LinkedIn }` still costs one shape.
531
-
532
- The internal glyphs — `Close`, `ChevronDown`, `Sun` — are **not exported** and
533
- are not going to be: they are the primitives' minimum set. A component that needs
534
- an icon receives it as a prop (`Stat` has `icon`, each `SocialLink` in `Footer`
535
- has its own). Do not ask for them to be published: pass your own.
508
+ | Removed | Phosphor | `tone` |
509
+ | --- | --- | --- |
510
+ | `GitHub` | `GithubLogo` | `current` |
511
+ | `LinkedIn` | `LinkedinLogo` | `current` |
512
+ | `X` | `XLogo` | `current` |
513
+ | `Instagram` | `InstagramLogo` | `current` |
514
+ | `Discord` | `DiscordLogo` | `current` |
515
+ | `YouTube` | `YoutubeLogo` | `current` |
516
+ | `Rss` | `Rss` | `action` |
517
+ | `Email` | `Envelope` | `action` |
518
+ | `Newsletter` | `BellSimple` | `action` |
519
+ | `Website` | `Globe` | `action` |
520
+
521
+ The `tone` column IS the old drawing rule, written on the axis `Icon` already
522
+ has. Six are brands and go SOLID, which is `tone="current"` — Phosphor's `fill`.
523
+ Four are functional and keep the default `action`, which is the system's line. A
524
+ row that mixes the two pens is the normal case, not a defect: a brand is somebody
525
+ else's silhouette and cannot be outlined, and a symbol has no owner to be
526
+ faithful to.
527
+
528
+ **In a Server Component import `Icon` from `./icons` and the glyph from
529
+ `@phosphor-icons/react/ssr`.** The root of this library carries `"use client"`;
530
+ `./icons` deliberately does not, so an icon renders on the server and ships no
531
+ client JS. Phosphor's default build reads `IconContext` through `useContext`,
532
+ which throws in a Server Component — the `/ssr` entry is the same icons without
533
+ that read.
536
534
 
537
535
  ## Tokens
538
536
 
@@ -771,7 +769,7 @@ Source: `src/primitives/alert.tsx`
771
769
  | prop | type | req. | default | what it does |
772
770
  | --- | --- | --- | --- | --- |
773
771
  | `emphasis` | `"subtle" \| "strong"` | | | |
774
- | `icon` | `ReactNode` | | | Replaces the variant's mono glyph. Never an emoji: if you need something else, it is an SVG from `glyphs`. |
772
+ | `icon` | `ReactNode` | | | Replaces the variant's glyph. Never an emoji: if you need something else, it is `<Icon as={…} />` from `@eduardoalvarez/arrecife/icons`. |
775
773
  | `title` | `ReactNode` | | | |
776
774
  | `variant` | `"accent" \| "success" \| "warning" \| "error"` | | | |
777
775
 
@@ -1448,6 +1446,7 @@ Source: `src/components/footer/index.tsx`
1448
1446
  | `brand` | `ReactNode` | | | The brand row: the fin and the wordmark, at the very top. |
1449
1447
  | `columns` | `readonly FooterColumn[]` | | | The link columns. Mandatory: without them `full` is the default form with extra steps. |
1450
1448
  | `description` | `ReactNode` | | | One line under the brand, saying what the site is. |
1449
+ | `domain` | `string` | | | The domain the signature prints, defaulting to the identity's own. |
1451
1450
  | `linkAsChild` | `(props: { href: string; children: ReactNode; }) => ReactNode` | | | Renders the column links through the child, to plug in the framework's `Link`. It receives each `href` in the Slot's `props`. |
1452
1451
  | `signatureHref` | `string` | | | Makes the domain inside the signature a link, keeping the `$`, the path and the prompt's mark as text. |
1453
1452
  | `social` | `readonly SocialLink[]` | | | |
@@ -1695,48 +1694,6 @@ Tiburoncín's head, with an expression.
1695
1694
  | `basePath` | `string` | | `ASSETS_PATH` | |
1696
1695
  | `expression` | `"annoyed" \| "confused" \| "hearts" \| "laughing" \| "shades" \| "waiting" \| "wink"` | yes | | |
1697
1696
 
1698
- ## Social icons
1699
-
1700
- Imported from `@eduardoalvarez/arrecife/social` · or grouped as `social` from the root. 10 exports.
1701
-
1702
- ### GitHub, LinkedIn, X, Instagram, Discord, YouTube, Rss, Email, Newsletter, Website
1703
-
1704
- Source: `src/social/index.tsx`
1705
-
1706
- **GitHub**
1707
- - No own props: it passes through those of the element or primitive it wraps.
1708
-
1709
- **LinkedIn**
1710
- - No own props: it passes through those of the element or primitive it wraps.
1711
-
1712
- **X**
1713
- - No own props: it passes through those of the element or primitive it wraps.
1714
-
1715
- **Instagram**
1716
- - No own props: it passes through those of the element or primitive it wraps.
1717
-
1718
- **Discord**
1719
- - No own props: it passes through those of the element or primitive it wraps.
1720
-
1721
- **YouTube**
1722
- - No own props: it passes through those of the element or primitive it wraps.
1723
-
1724
- **Rss**
1725
- - No own props: it passes through those of the element or primitive it wraps.
1726
-
1727
- **Email**
1728
- - No own props: it passes through those of the element or primitive it wraps.
1729
-
1730
- **Newsletter**
1731
- The newsletter. It plays the same role as `Rss` — a way to follow, not a social network — which is why it belongs in this catalogue and does not open the door to an icon library.
1732
-
1733
- - No own props: it passes through those of the element or primitive it wraps.
1734
-
1735
- **Website**
1736
- «My other site»: the personal domain in a footer full of social networks.
1737
-
1738
- - No own props: it passes through those of the element or primitive it wraps.
1739
-
1740
1697
  ## Icons
1741
1698
 
1742
1699
  Imported from `@eduardoalvarez/arrecife/icons` · requires `@phosphor-icons/react`. 1 exports.
@@ -1863,6 +1820,8 @@ A series over time, with the fill fading out underneath it.
1863
1820
  | `stacked` | `boolean \| undefined` | | `false` | Adds the series up instead of overlaying them. |
1864
1821
  | `summary` | `ReactNode` | | | What the chart says, in words. It goes in a visually hidden `figcaption`. |
1865
1822
  | `xKey` | `string` | yes | | The key on the category axis: the day, the month, the course. |
1823
+ | `xTickFormatter` | `(value: unknown) => string` | | | Formats the TICK on the category axis. Returns a string, because an axis tick is an SVG `<text>` and not a place a node can go. |
1824
+ | `yTickFormatter` | `(value: unknown) => string` | | | Formats the tick on the VALUE axis — the currency symbol, the thousands separator, the percent sign. |
1866
1825
 
1867
1826
  **BarChart**
1868
1827
  Bars, upright or lying down.
@@ -1881,6 +1840,8 @@ Bars, upright or lying down.
1881
1840
  | `stacked` | `boolean \| undefined` | | `false` | Stacks the series instead of putting them side by side. |
1882
1841
  | `summary` | `ReactNode` | | | What the chart says, in words. It goes in a visually hidden `figcaption`. |
1883
1842
  | `xKey` | `string` | yes | | The key on the category axis: the day, the month, the course. |
1843
+ | `xTickFormatter` | `(value: unknown) => string` | | | Formats the TICK on the category axis. Returns a string, because an axis tick is an SVG `<text>` and not a place a node can go. |
1844
+ | `yTickFormatter` | `(value: unknown) => string` | | | Formats the tick on the VALUE axis — the currency symbol, the thousands separator, the percent sign. |
1884
1845
 
1885
1846
  **LineChart**
1886
1847
  Lines, for comparing series against each other.
@@ -1897,6 +1858,8 @@ Lines, for comparing series against each other.
1897
1858
  | `series` | `readonly ChartSeries[]` | yes | | |
1898
1859
  | `summary` | `ReactNode` | | | What the chart says, in words. It goes in a visually hidden `figcaption`. |
1899
1860
  | `xKey` | `string` | yes | | The key on the category axis: the day, the month, the course. |
1861
+ | `xTickFormatter` | `(value: unknown) => string` | | | Formats the TICK on the category axis. Returns a string, because an axis tick is an SVG `<text>` and not a place a node can go. |
1862
+ | `yTickFormatter` | `(value: unknown) => string` | | | Formats the tick on the VALUE axis — the currency symbol, the thousands separator, the percent sign. |
1900
1863
 
1901
1864
  ## Exports that are not components
1902
1865
 
@@ -1904,28 +1867,6 @@ The root re-exports everything from `./tokens` and `./brand` for convenience.
1904
1867
  Each one appears exactly once, under the most specific subpath that publishes
1905
1868
  it: if the code does not mount React, that subpath is the one to import.
1906
1869
 
1907
- ### `@eduardoalvarez/arrecife/social/data`
1908
-
1909
- | export | type | what it is |
1910
- | --- | --- | --- |
1911
- | `discordGlyph` | `SocialGlyph` | Discord's mark. Brand, so it is a solid silhouette. |
1912
- | `emailGlyph` | `SocialGlyph` | The envelope. Functional, so it is a 1.6 stroke. |
1913
- | `gitHubGlyph` | `SocialGlyph` | GitHub's mark. Brand, so it is a solid silhouette. |
1914
- | `instagramGlyph` | `SocialGlyph` | Instagram's mark. Brand, so it is a solid silhouette. |
1915
- | `linkedInGlyph` | `SocialGlyph` | LinkedIn's mark. Brand, so it is a solid silhouette. |
1916
- | `newsletterGlyph` | `SocialGlyph` | |
1917
- | `rssGlyph` | `SocialGlyph` | The feed. Functional, so it is a 1.6 stroke — with one filled dot, because a ring that small reads as a smudge. |
1918
- | `SOCIAL_STROKE_WIDTH` | `1.6` | The stroke width of a functional glyph, from the document. |
1919
- | `SOCIAL_VIEW_BOX` | `"0 0 24 24"` | The grid every glyph is drawn on. |
1920
- | `socialGlyphs` | `{ Discord, Email, GitHub, Instagram, LinkedIn, Newsletter, Rss, Website, X, YouTube }` | The whole catalogue, keyed by the name each glyph is exported under in `./social`. |
1921
- | `socialNames` | `readonly ("Discord" \| "Email" \| "GitHub" \| "Instagram" \| "LinkedIn" \| "Newsletter" \| "Rss" \| "Website" \| "X" \| "YouTube")[]` | The ten names, in the order the catalogue declares them. |
1922
- | `socialSvg` | `(name: "Discord" \| "Email" \| "GitHub" \| "Instagram" \| "LinkedIn" \| "Newsletter" \| "Rss" \| "Website" \| "X" \| "YouTube", extra?: Readonly<Record<string, string \| number>>): string` | One glyph as a complete `<svg>` string, for a template that cannot mount React. |
1923
- | `websiteGlyph` | `SocialGlyph` | «My other site», and the reason it is here rather than borrowed. |
1924
- | `xGlyph` | `SocialGlyph` | X's mark. Brand, so it is a solid silhouette. |
1925
- | `youTubeGlyph` | `SocialGlyph` | YouTube's mark. Brand, so it is a solid silhouette. |
1926
-
1927
- Types (3): `SocialGlyph`, `SocialGlyphShape`, `SocialName`.
1928
-
1929
1870
  ### `@eduardoalvarez/arrecife/variants`
1930
1871
 
1931
1872
  | export | type | what it is |
@@ -1967,10 +1908,6 @@ Types (3): `SocialGlyph`, `SocialGlyphShape`, `SocialName`.
1967
1908
 
1968
1909
  Types (13): `BrandToken`, `ColorMode`, `ColorToken`, `ControlToken`, `FontToken`, `GradientToken`, `RadiusToken`, `SeriesToken`, `SizeToken`, `SpacingToken`, `SyntaxToken`, `Tokens`, `TypeScaleToken`.
1969
1910
 
1970
- ### `@eduardoalvarez/arrecife/social`
1971
-
1972
- Types (1): `SocialIconProps`.
1973
-
1974
1911
  ### `@eduardoalvarez/arrecife/theme`
1975
1912
 
1976
1913
  | export | type | what it is |
@@ -2052,7 +1989,6 @@ Types (6): `ArticleData`, `BaseData`, `CourseData`, `DefaultData`, `SatoriNode`,
2052
1989
  | export | type | what it is |
2053
1990
  | --- | --- | --- |
2054
1991
  | `cn` | `(...inputs: ClassValue[]): string` | |
2055
- | `social` | `typeof import("src/social/index")` | |
2056
1992
  | `toast` | `(message: ReactNode, options?: ToastOptions \| undefined): string` | Fires a notice. It returns its id, which is what you keep in order to close it by hand — the «guardando…» case that gets replaced when the request finishes. |
2057
1993
  | `useTheme` | `(): Theme` | The theme set right now, for a project that needs to branch in React — a different logo per mode, an image with no light version. |
2058
1994
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eduardoalvarez/arrecife",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "The component library of Eduardo Álvarez’s visual identity",
5
5
  "license": "MIT",
6
6
  "author": "Eduardo Esteban Álvarez Castañeda <soy@eduardoalvarez.dev>",
@@ -49,16 +49,6 @@
49
49
  "import": "./dist/brand/index.js",
50
50
  "require": "./dist/brand/index.cjs"
51
51
  },
52
- "./social": {
53
- "types": "./dist/social/index.d.ts",
54
- "import": "./dist/social/index.js",
55
- "require": "./dist/social/index.cjs"
56
- },
57
- "./social/data": {
58
- "types": "./dist/social/data.d.ts",
59
- "import": "./dist/social/data.js",
60
- "require": "./dist/social/data.cjs"
61
- },
62
52
  "./icons": {
63
53
  "types": "./dist/icons/index.d.ts",
64
54
  "import": "./dist/icons/index.js",
@@ -126,9 +116,6 @@
126
116
  "recharts": "^3.0.0"
127
117
  },
128
118
  "peerDependenciesMeta": {
129
- "@phosphor-icons/react": {
130
- "optional": true
131
- },
132
119
  "react-hook-form": {
133
120
  "optional": true
134
121
  },
@@ -139,32 +126,33 @@
139
126
  "devDependencies": {
140
127
  "@eslint/js": "^10.0.1",
141
128
  "@phosphor-icons/react": "^2.1.10",
142
- "@storybook/addon-a11y": "^10.5.10",
143
- "@storybook/addon-docs": "^10.5.10",
144
- "@storybook/addon-themes": "^10.5.10",
145
- "@storybook/addon-vitest": "^10.5.10",
146
- "@storybook/react-vite": "^10.5.10",
129
+ "@storybook/addon-a11y": "^10.6.0",
130
+ "@storybook/addon-docs": "^10.6.0",
131
+ "@storybook/addon-themes": "^10.6.0",
132
+ "@storybook/addon-vitest": "^10.6.0",
133
+ "@storybook/react-vite": "^10.6.0",
147
134
  "@tailwindcss/vite": "^4.3.3",
148
135
  "@types/react": "^19.2.0",
149
- "@types/react-dom": "^19.2.5",
150
- "@vitest/browser": "^4.1.11",
151
- "@vitest/browser-playwright": "^4.1.11",
152
- "eslint": "^10.9.0",
136
+ "@types/react-dom": "^19.2.7",
137
+ "@vitest/browser": "^5.0.0",
138
+ "@vitest/browser-playwright": "^5.0.0",
139
+ "eslint": "^10.10.0",
153
140
  "eslint-plugin-react-hooks": "^7.0.0",
154
- "globals": "^17.11.0",
155
- "playwright": "^1.62.1",
141
+ "globals": "^17.12.0",
142
+ "playwright": "^1.63.0",
156
143
  "react": "^19.2.0",
157
144
  "react-dom": "^19.2.0",
158
145
  "react-hook-form": "^7.87.0",
159
146
  "recharts": "^3.10.1",
160
- "storybook": "^10.5.10",
161
- "storybook-addon-pseudo-states": "^10.5.10",
147
+ "storybook": "^10.6.0",
148
+ "storybook-addon-pseudo-states": "^10.6.0",
162
149
  "tailwindcss": "^4.3.3",
163
150
  "tsup": "^8.5.1",
164
- "typescript": "^5.3.0",
165
- "typescript-eslint": "^8.48.0",
151
+ "typescript": "^6.0.3",
152
+ "typescript-eslint": "^8.69.0",
166
153
  "vite": "^8.2.2",
167
- "vitest": "^4.1.11"
154
+ "vitest": "^5.0.0",
155
+ "eslint-plugin-storybook": "10.6.0"
168
156
  },
169
157
  "packageManager": "pnpm@11.20.0",
170
158
  "engines": {
@@ -1,72 +0,0 @@
1
- import { gitHubGlyph, linkedInGlyph, xGlyph, instagramGlyph, discordGlyph, youTubeGlyph, rssGlyph, emailGlyph, newsletterGlyph, websiteGlyph, SOCIAL_STROKE_WIDTH, SOCIAL_VIEW_BOX } from './chunk-LXRGQKMG.js';
2
- import { __export } from './chunk-MLKGABMK.js';
3
- import { jsx } from 'react/jsx-runtime';
4
-
5
- // src/social/index.tsx
6
- var social_exports = {};
7
- __export(social_exports, {
8
- Discord: () => Discord,
9
- Email: () => Email,
10
- GitHub: () => GitHub,
11
- Instagram: () => Instagram,
12
- LinkedIn: () => LinkedIn,
13
- Newsletter: () => Newsletter,
14
- Rss: () => Rss,
15
- Website: () => Website,
16
- X: () => X,
17
- YouTube: () => YouTube
18
- });
19
- var SOLID = { fill: "currentColor", stroke: "none" };
20
- function drawShape(shape, index) {
21
- if (shape.tag === "path") {
22
- return /* @__PURE__ */ jsx("path", { d: shape.d, ...shape.solid ? SOLID : {} }, index);
23
- }
24
- if (shape.tag === "circle") {
25
- return /* @__PURE__ */ jsx("circle", { cx: shape.cx, cy: shape.cy, r: shape.r, ...shape.solid ? SOLID : {} }, index);
26
- }
27
- return /* @__PURE__ */ jsx(
28
- "rect",
29
- {
30
- x: shape.x,
31
- y: shape.y,
32
- width: shape.width,
33
- height: shape.height,
34
- rx: shape.rx
35
- },
36
- index
37
- );
38
- }
39
- function Glyph({ glyph, ...props }) {
40
- const brand = glyph.kind === "brand";
41
- return /* @__PURE__ */ jsx(
42
- "svg",
43
- {
44
- viewBox: SOCIAL_VIEW_BOX,
45
- width: "1em",
46
- height: "1em",
47
- fill: brand ? "currentColor" : "none",
48
- ...brand ? {} : {
49
- stroke: "currentColor",
50
- strokeWidth: SOCIAL_STROKE_WIDTH,
51
- strokeLinecap: "round",
52
- strokeLinejoin: "round"
53
- },
54
- "aria-hidden": "true",
55
- focusable: "false",
56
- ...props,
57
- children: glyph.shapes.map(drawShape)
58
- }
59
- );
60
- }
61
- var GitHub = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: gitHubGlyph, ...props });
62
- var LinkedIn = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: linkedInGlyph, ...props });
63
- var X = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: xGlyph, ...props });
64
- var Instagram = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: instagramGlyph, ...props });
65
- var Discord = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: discordGlyph, ...props });
66
- var YouTube = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: youTubeGlyph, ...props });
67
- var Rss = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: rssGlyph, ...props });
68
- var Email = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: emailGlyph, ...props });
69
- var Newsletter = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: newsletterGlyph, ...props });
70
- var Website = (props) => /* @__PURE__ */ jsx(Glyph, { glyph: websiteGlyph, ...props });
71
-
72
- export { Discord, Email, GitHub, Instagram, LinkedIn, Newsletter, Rss, Website, X, YouTube, social_exports };