@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 CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.10.0](https://github.com/Proskynete/arrecife/compare/v0.9.0...v0.10.0) (2026-09-09)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **icons:** `@phosphor-icons/react` becomes a REQUIRED peer dependency, and `@eduardoalvarez/arrecife/social`, `/social/data` and the root's `social` namespace are removed. Phosphor has all ten marks; the mapping table and the `tone` each one takes are in docs/runbooks/migration-0.10.md.
9
+
10
+ ### 🚀 Novedades
11
+
12
+ * **icons:** Phosphor is the only hand the library draws in ([833090e](https://github.com/Proskynete/arrecife/commit/833090e80d8d259f6965f389bc455cc72945a9c0))
13
+ * **primitives:** the alert's four marks come from Phosphor ([0a4c86e](https://github.com/Proskynete/arrecife/commit/0a4c86ef7a8f5375c27bd7cea3afa3ab7ec76c35))
14
+ * **storybook:** a way in, and a generated agent block on every component ([08eb4dd](https://github.com/Proskynete/arrecife/commit/08eb4ddcc8044ce561f88eb30894faaf00ff6e95))
15
+
16
+
17
+ ### 🐛 Correcciones
18
+
19
+ * **a11y:** the code block's scroll region is reachable by keyboard ([5de3618](https://github.com/Proskynete/arrecife/commit/5de3618a81badb92a374e7dc40d0d251c133794d))
20
+ * **components:** the audio player's waveform is Phosphor's, not five spans ([a0d92cd](https://github.com/Proskynete/arrecife/commit/a0d92cd99eaecbe1c506b60d03fa4b76f623faf0))
21
+ * **components:** the footer stacks and centres below sm ([723920e](https://github.com/Proskynete/arrecife/commit/723920e0d3513d2834ac6215b6245491ac82be54))
22
+ * **components:** the nav item row scrolls instead of pushing the page sideways ([716bb55](https://github.com/Proskynete/arrecife/commit/716bb55ccdecb796132928a73caa09e980b78015))
23
+ * **components:** ThemeToggle switches the theme without onThemeChange ([c947036](https://github.com/Proskynete/arrecife/commit/c9470363618c3c70948616fb8e1a49b54921a830))
24
+ * **primitives:** the tab list scrolls and the pagination row wraps ([e44a3dc](https://github.com/Proskynete/arrecife/commit/e44a3dc43022e25545c5802543f77e26b5bccdad))
25
+ * **primitives:** the toast carries its tone as a surface, not as a hairline ([f1c6352](https://github.com/Proskynete/arrecife/commit/f1c6352de323acef2cb4ab55555d088da380b8ae))
26
+
27
+
28
+ ### 📚 Documentación
29
+
30
+ * § 51 names the waveform, and the runbook says it moved ([aea65a1](https://github.com/Proskynete/arrecife/commit/aea65a108e11e3352c4fa35a2f27c19b2b6fac9b))
31
+ * **readme:** the library stops drawing icons of its own ([7d56012](https://github.com/Proskynete/arrecife/commit/7d5601241eef5855148f3075a805585bc56b0fcf))
32
+ * the 0.10 decision log ([254ab6a](https://github.com/Proskynete/arrecife/commit/254ab6a72a662c7303cac690eeb2e887735bd7d4))
33
+ * the 0.10 migration runbook ([1118afd](https://github.com/Proskynete/arrecife/commit/1118afdc6221f6b7a22d5b7d8f7478ea875890dc))
34
+
35
+
36
+ ### 📦 Dependencias
37
+
38
+ * ignoreDeprecations, because tsup injects a baseUrl TypeScript 6 rejects ([5eb20c8](https://github.com/Proskynete/arrecife/commit/5eb20c897346ed68b98e03b1c7f1519d57e7b513))
39
+
40
+
41
+ ### 🚀 CI/CD
42
+
43
+ * the social scope goes with the subpath that named it ([b02ab52](https://github.com/Proskynete/arrecife/commit/b02ab525f6e30a6114abada71afcd8bb6f3d06a7))
44
+
3
45
  ## [0.9.0](https://github.com/Proskynete/arrecife/compare/v0.8.0...v0.9.0) (2026-09-08)
4
46
 
5
47
 
package/README.md CHANGED
@@ -130,6 +130,22 @@ so the command reports the value on each side and only fails on the ones that
130
130
  differ. A collision that agrees is worth knowing about and is not worth failing
131
131
  over.
132
132
 
133
+ > **Coming from 0.9.0.** Two breaks and they are the same one twice: the library
134
+ > stopped drawing icons of its own. `@phosphor-icons/react` becomes a REQUIRED
135
+ > peer dependency — even if your project draws no icons, the `Alert` and the
136
+ > `Select` you import do — and `./social` and `./social/data` are removed.
137
+ > Phosphor has all ten marks and `tsc` points at every call site; the mapping
138
+ > table is in the runbook.
139
+ >
140
+ > Everything else is additive and asks nothing of you: the footer centres itself
141
+ > on a phone, `Nav` and `TabsList` scroll instead of pushing the page sideways,
142
+ > `Pagination` wraps, `Toast` carries a real colour again, `Alert`'s four mono
143
+ > characters become Phosphor marks, and `ThemeToggle` toggles without
144
+ > `onThemeChange` — which was a genuine bug.
145
+ >
146
+ > Run `npx arrecife` first, then read
147
+ > [`docs/runbooks/migration-0.10.md`](docs/runbooks/migration-0.10.md).
148
+
133
149
  > **Coming from 0.7.0.** Four breaks, and three of them are things the library
134
150
  > takes back OUT because nothing in the four projects drew them: the `caret`
135
151
  > utility, the footer's row of loose text links, and `SidebarNav`.
@@ -141,7 +157,7 @@ over.
141
157
  >
142
158
  > Everything else is additive: `Footer variant="full"` with columns, three chart
143
159
  > shapes, `./social/data` for a project that mounts no React, and a `Website`
144
- > glyph.
160
+ > glyph. Both `./social` subpaths were removed again in 0.10.0.
145
161
  >
146
162
  > Run `npx arrecife` first, then read
147
163
  > [`docs/runbooks/migration-0.8.md`](docs/runbooks/migration-0.8.md).
@@ -346,60 +362,63 @@ Verified by packing the library with `pnpm pack` and installing it in a separate
346
362
  project: the types resolve from `dist/`, `./tokens` loads without dragging React
347
363
  in and `./tokens/theme.css` resolves by subpath.
348
364
 
349
- ### The social icons come from `./social`
365
+ ### The social icons are yours too, and they come from Phosphor
350
366
 
351
- ```tsx
352
- // ❌ does not exist: the root publishes them grouped, not loose
353
- import { GitHub, LinkedIn } from '@eduardoalvarez/arrecife';
367
+ Until 0.10.0 this section documented a catalogue of ten hand-drawn marks at
368
+ `./social`, published a second time as shapes at `./social/data` for a consumer
369
+ that mounts no React. Both are gone.
354
370
 
355
- // ✅ the normal form
371
+ ```tsx
372
+ // ❌ removed in 0.10.0
356
373
  import { GitHub, LinkedIn } from '@eduardoalvarez/arrecife/social';
357
-
358
- // ✅ for iterating the catalogue
359
374
  import { social } from '@eduardoalvarez/arrecife';
360
- <social.GitHub />
375
+
376
+ // ✅
377
+ import { GithubLogo, LinkedinLogo } from '@phosphor-icons/react';
378
+ import { Icon } from '@eduardoalvarez/arrecife/icons';
379
+
380
+ <Icon as={GithubLogo} tone="current" />
361
381
  ```
362
382
 
363
- All ten are `GitHub`, `LinkedIn`, `X`, `Instagram`, `Discord`, `YouTube`, `Rss`,
364
- `Email`, `Newsletter` and `Website`. The last one is «my other site» — the
365
- personal domain in a footer full of networks — and it exists so that footer stops
366
- borrowing a globe from an icon set, which brings its own stroke weight and its
367
- own margins with it.
368
-
369
- **And the shapes are published a second time, without React.** `./social/data`
370
- imports nothing: it holds every glyph as structured shapes plus `socialSvg`,
371
- which returns a complete `<svg>` as a string. It is for the consumer that mounts
372
- no React and used to paste the `<path>` into its own template — `links` had four
373
- of them and `cursos` had six. The React components above are drawn from that same
374
- file, so a `d` that changes changes in both or in neither. See
375
- `docs/decisions/0.8.md` § 42.
376
-
377
- **The two forms are not taste, and in Next they are not interchangeable.** The
378
- root carries `"use client"`, and what crosses into a Server Component is a client
379
- reference **per export** — the properties of a plain object are not exports. So
380
- from a Server Component `social.LinkedIn` is `undefined`, and `undefined` as an
381
- element type kills the build at prerender. `./social` carries no directive: the
382
- icon renders on the server, ships no client JS, and pulls 5.6 KB instead of the
383
- root's 116 KB. Reach for the subpath by default; reach for `social` when you are
384
- mapping a list of link names onto icons.
385
-
386
- The namespace stays because **one of them is called `X`**. An `export const X` at
387
- the root of a component library collides with anything — a generic's type
388
- variable, an `import { X }` from somewhere else — and the failure shows up far
389
- from here. In the subpath you asked for icons, so the collision is yours to
390
- resolve and it takes one word: `import { X as XIcon }`.
391
-
392
- `Newsletter` is the bell, and it is named for what it means and not for what it
393
- draws — same as everything else in the system. It plays `Rss`'s role: a way to
394
- follow, not a social network. That is what keeps it inside this catalogue and
395
- keeps the catalogue from turning into an icon library.
396
-
397
- **The internal glyphs are NOT exported.** `Close`, `ChevronDown`, `Copy`, `Sun`
398
- and company are the minimum set the primitives need and they stay inside.
399
- Publishing them would turn `lib/glyphs.tsx` into the icon library the system
400
- decided not to have, and from there it grows on its own. A project that needs an
401
- icon passes its own: `Stat` receives `icon`, `Footer` receives each social link's
402
- `icon`.
383
+ | Removed | Phosphor | `tone` |
384
+ | --- | --- | --- |
385
+ | `GitHub` | `GithubLogo` | `current` |
386
+ | `LinkedIn` | `LinkedinLogo` | `current` |
387
+ | `X` | `XLogo` | `current` |
388
+ | `Instagram` | `InstagramLogo` | `current` |
389
+ | `Discord` | `DiscordLogo` | `current` |
390
+ | `YouTube` | `YoutubeLogo` | `current` |
391
+ | `Rss` | `Rss` | `action` |
392
+ | `Email` | `Envelope` | `action` |
393
+ | `Newsletter` | `BellSimple` | `action` |
394
+ | `Website` | `Globe` | `action` |
395
+
396
+ **The `tone` column is the old drawing rule, not a new one.** Six are brands and
397
+ went SOLID, which is `tone="current"` — Phosphor's `fill`. Four were functional
398
+ and used the document's 1.6 stroke, which is the default `action`. Nothing about
399
+ how the row looks changed; what changed is who draws it.
400
+
401
+ **Why they went, when the whole point of `./social/data` was that `links` had
402
+ pasted four `<path>`s by hand.** Because `links` left first. Its `Footer.astro`
403
+ now draws Phosphor through `astro-icon` and its own docstring lists the divergence:
404
+ «every icon on the page — the six in the cards and the four here — is then one set
405
+ at one weight». `eduardoalvarez.dev` did the same in `site-footer.tsx`. Two
406
+ consumers walking away from a subpath built for them is the library being out of
407
+ step, not the consumers. See `docs/decisions/0.10.md` § 51.
408
+
409
+ **In a Next Server Component, take the glyph from `@phosphor-icons/react/ssr`.**
410
+ `./icons` carries no `"use client"` on purpose, so an icon renders on the server
411
+ and ships no client JS. Phosphor's default build reads `IconContext` through
412
+ `useContext` and a hook in a Server Component throws; the `/ssr` entry is the same
413
+ icons without that read, and `Icon` works with either.
414
+
415
+ **There are no internal glyphs left to not export.** `lib/glyphs.tsx` held
416
+ `Close`, `ChevronDown`, `Copy`, `Sun` and fifteen others, and the rule was that
417
+ publishing them would turn it into the icon library the system decided not to
418
+ have. The file is deleted: the primitives draw from Phosphor like everything else.
419
+ A component that needs an icon still takes it as a prop — `Stat` receives `icon`,
420
+ `Footer` receives each social link's `icon` — and the project passes
421
+ `<Icon as={…} />`.
403
422
 
404
423
  ### The icons are yours, the way they are drawn is not
405
424
 
@@ -427,15 +446,17 @@ names. Measured on the `Minus` path itself, whose regular form is a bar of radiu
427
446
  | --- | --- | --- |
428
447
  | phosphor `regular` | 16 on a 256 grid | **0.0625em** |
429
448
  | the document | 1.6 on a 24 grid | **0.0667em** |
430
- | `lib/glyphs.tsx` | 1.75 on a 16 grid | 0.109em |
449
+ | `lib/glyphs.tsx`, until 0.10.0 | 1.75 on a 16 grid | 0.109em |
431
450
 
432
451
  Six per cent apart, which is no pixel on any screen. Nothing had to be derived and
433
452
  no number had to be invented. The `Icons/Icon` → `regular IS the document's
434
- stroke` story alternates the bars so the claim can be checked instead of believed
435
- — and it also shows the third row, because **`glyphs.tsx` is the outlier**: at
436
- 0.109em it is three quarters heavier than both, it was never argued anywhere, and
437
- aligning it would restyle every primitive in the library. That is a separate
438
- change and `docs/decisions/0.7.md` § 29 says so.
453
+ stroke` story shows the bars so the claim can be checked instead of believed.
454
+
455
+ **The third row is history now, and it is left in because it is the argument.**
456
+ `glyphs.tsx` drew at 0.109em — three quarters heavier than both — and 0.7.0
457
+ measured it, said so and left it alone, because aligning it restyles every
458
+ primitive in the library. 0.10.0 is that change: the file is gone and there is
459
+ one line in the system. See `docs/decisions/0.10.md` § 51.
439
460
 
440
461
  **The weight is an axis with three values, and `tone` is how you name them.**
441
462
  `weight` is not a prop: Phosphor ships six and this system reads three, because
@@ -483,16 +504,17 @@ It blocked `cursos` for a whole version, and the workaround there was a
483
504
  that is a `<span>` with no interaction. It cost 272 KB of client chunk.
484
505
 
485
506
  The five portable subpaths do NOT carry it — `./tokens`, `./theme`,
486
- `./variants`, `./social/data`, `./og` and `./shiki` — and that is the half that matters more.
507
+ `./variants`, `./og` and `./shiki` — and that is the half that matters more.
487
508
  Marking them client would be a lie with a cost: a Server Component importing
488
509
  `buttonVariants`, a function that returns a string, would pull a client boundary
489
510
  in with it.
490
511
 
491
- `./social` is the third case, and it is why the check stopped looking only at the
492
- portable ones. It renders React — it is ten `<svg>` — so it can never be
512
+ `./icons` is the third case, and it is why the check stopped looking only at the
513
+ portable ones. It renders React — it is one `<svg>` — so it can never be
493
514
  portable, and it holds no state, so it must not be a client entry either. Listed
494
515
  in neither set, nothing would have noticed it being marked client by mistake, and
495
- that mistake undoes the only reason the subpath exists. See `docs/decisions/0.7.md` § 26.
516
+ that mistake undoes the only reason the subpath exists: an icon in a Server
517
+ Component with no client boundary opened for it.
496
518
 
497
519
  It is stamped by `scripts/add-use-client.mjs` after tsup, and not by tsup's
498
520
  `banner`. That was tried first: esbuild writes the directive and the bundling
@@ -566,8 +588,8 @@ vertical={false}`, two axes with the line and the tick off, a `type="natural"`
566
588
  and a `strokeWidth` — which `cursos` wrote four times, once per chart. None of
567
589
  that is a decision the project made. See `docs/decisions/0.8.md` § 43.
568
590
 
569
- `check:exports` verifies that the six portable ones — `./tokens`, `./theme`,
570
- `./variants`, `./social/data`, `./og` and `./shiki` — bring no React into the published `dist/`,
591
+ `check:exports` verifies that the five portable ones — `./tokens`, `./theme`,
592
+ `./variants`, `./og` and `./shiki` — bring no React into the published `dist/`,
571
593
  **by following the relative imports**. Without that the check was worthless: with `treeshake`
572
594
  on, each portable entry ends up as two lines re-exporting from a
573
595
  `chunk-XXXX.js`, and a grep over those two lines finds no React even when the
@@ -869,12 +891,17 @@ about as library pieces. They get in anyway: the CLI aesthetic — the bar's
869
891
 
870
892
  ### Phase 3 decisions
871
893
 
872
- - **It ships no icon set**, and that has not changed. The eight glyphs the
873
- primitives need are inline in `src/lib/glyphs.tsx`, inherit `currentColor` and
874
- measure 1em, and they are not exported. What DID change is that
875
- `@phosphor-icons/react` is now an optional peer on `./icons`, so the set a
876
- project chooses is drawn at the system's weight — see «The icons are yours»
877
- above. Optional and on a subpath is the point: the two projects that use no
894
+ - **It shipped no icon set, and by 0.10.0 that position had been abandoned from
895
+ both ends.** Phase 3 said the eight glyphs the primitives need are inline in
896
+ `src/lib/glyphs.tsx` and not exported; 0.7.0 added `@phosphor-icons/react` as an
897
+ optional peer on `./icons` so the set a project chooses is drawn at the system's
898
+ weight; and 0.10.0 deleted `glyphs.tsx` and `./social` and made Phosphor
899
+ required, because a library drawing in three hands cannot say which one is
900
+ right. See «The social icons are yours too» above and `docs/decisions/0.10.md`
901
+ § 51. What survives verbatim is the part that was always the real rule: the
902
+ icons are the project's, the LINE is the system's. The rest of this bullet is
903
+ the 0.7.0 argument, kept because it is what the reversal was measured against:
904
+ optional and on a subpath was the point, since the two projects that use no
878
905
  icons install nothing.
879
906
  - **No entrance animations.** Modals, menus, tooltips and toasts appear where
880
907
  they will stay. The `Switch` knob changes position without sliding. The
@@ -968,8 +995,11 @@ skips, the 1 → 1.25 → 1.5 → 1.75 → 2 speed cycle and the volume with mut
968
995
  portfolio's. What changed:
969
996
 
970
997
  **Two dependencies a package cannot have.** The portfolio's `Icon` became
971
- `src/lib/glyphs.tsx` with identical paths; `trackEvent` became the `onFirstPlay`
972
- prop, which still fires exactly once per load.
998
+ `src/lib/glyphs.tsx` with identical paths — and since 0.10.0 those eight paths are
999
+ gone too, replaced by `Play`, `Pause`, `SpeakerHigh`, `SpeakerSlash`,
1000
+ `CircleNotch`, `ArrowsClockwise` and the two seek arrows from Phosphor.
1001
+ `trackEvent` became the `onFirstPlay` prop, which still fires exactly once per
1002
+ load.
973
1003
 
974
1004
  **One API change.** `compact`/`banner` as two booleans became
975
1005
  `mode="full" | "compact" | "banner"`, which is the vocabulary the three modes were
@@ -1,6 +1,5 @@
1
1
  'use client';
2
- export { Isotype, Logo, Mascot, MascotFace } from '../chunk-MPZBF2TZ.js';
3
- export { ASSETS_PATH, faceList, faceUsage, faces, fins, poseList, poses } from '../chunk-CKRSQPTX.js';
2
+ export { Isotype, Logo, Mascot, MascotFace } from '../chunk-IIT3YLYN.js';
4
3
  import '../chunk-FAAGZG7A.js';
4
+ export { ASSETS_PATH, faceList, faceUsage, faces, fins, poseList, poses } from '../chunk-CKRSQPTX.js';
5
5
  import '../chunk-FGFNK72B.js';
6
- import '../chunk-MLKGABMK.js';
@@ -3,7 +3,6 @@ import { Text } from '../chunk-TRPBID2W.js';
3
3
  import '../chunk-ODBFN44D.js';
4
4
  import { cn } from '../chunk-FAAGZG7A.js';
5
5
  import { radius } from '../chunk-FGFNK72B.js';
6
- import '../chunk-MLKGABMK.js';
7
6
  import { useId } from 'react';
8
7
  import { ResponsiveContainer, Tooltip, Legend, AreaChart as AreaChart$1, CartesianGrid, XAxis, YAxis, Area, BarChart as BarChart$1, Bar, LineChart as LineChart$1, Line } from 'recharts';
9
8
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -0,0 +1,26 @@
1
+ import { cn } from './chunk-FAAGZG7A.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ var ICON_WEIGHT = "regular";
5
+ var TONE_WEIGHT = {
6
+ action: ICON_WEIGHT,
7
+ current: "fill",
8
+ quiet: "light"
9
+ };
10
+ function Icon({ as: Glyph, tone = "action", label, className, ...props }) {
11
+ return /* @__PURE__ */ jsx(
12
+ Glyph,
13
+ {
14
+ size: "1em",
15
+ weight: TONE_WEIGHT[tone],
16
+ "aria-hidden": label ? void 0 : true,
17
+ "aria-label": label,
18
+ role: label ? "img" : void 0,
19
+ focusable: "false",
20
+ className: cn("shrink-0", className),
21
+ ...props
22
+ }
23
+ );
24
+ }
25
+
26
+ export { ICON_WEIGHT, Icon, TONE_WEIGHT };
@@ -4,7 +4,6 @@ import { Text } from '../chunk-TRPBID2W.js';
4
4
  import '../chunk-ODBFN44D.js';
5
5
  import { cn } from '../chunk-FAAGZG7A.js';
6
6
  import '../chunk-FGFNK72B.js';
7
- import '../chunk-MLKGABMK.js';
8
7
  import { createContext, useContext, useId } from 'react';
9
8
  import { FormProvider, Controller, useFormContext, useFormState } from 'react-hook-form';
10
9
  import { Slot } from '@radix-ui/react-slot';
@@ -2,14 +2,20 @@ import * as react from 'react';
2
2
  import { IconWeight, IconProps as IconProps$1, Icon as Icon$1 } from '@phosphor-icons/react';
3
3
 
4
4
  /**
5
- * The system adopts `@phosphor-icons/react`, and this is the whole of what
6
- * «adopts» means: an optional peer dependency, and one place that fixes what a
7
- * call site was getting wrong on its own.
5
+ * The system adopts `@phosphor-icons/react`, and since 0.10.0 «adopts» means
6
+ * ALL of it: a required peer dependency, one place that fixes what a call site
7
+ * was getting wrong on its own, and no second set anywhere in the library.
8
+ *
9
+ * It was optional for three releases, and what made it required is that the
10
+ * library stopped keeping a set of its own to fall back on. That is the trade
11
+ * and it is worth naming: the two consumers that draw no icons of their own now
12
+ * install Phosphor anyway, because the `Alert` and the `Select` they DO draw are
13
+ * drawn with it.
8
14
  *
9
15
  * WHY IT IS HERE AT ALL. The position used to be that the system has no icons.
10
- * That was right for what the library was — five reading sites, where
11
- * `lib/glyphs.tsx` covers everything a primitive needs — and it stopped being
12
- * right when an admin panel arrived. Measured across the four consumers, the one
16
+ * That was right for what the library was — five reading sites, where a
17
+ * hand-drawn `lib/glyphs.tsx` covered everything a primitive needed — and it
18
+ * stopped being right when an admin panel arrived. Measured across the four consumers, the one
13
19
  * admin app imports 89 distinct icons in 229 places and the other three import
14
20
  * 9, 0 and 0. Seventy-seven of the 89 are domain icons for a course admin —
15
21
  * `GraduationCap`, `TicketPercent`, `Webhook` — and no design system was ever
@@ -39,10 +45,13 @@ import { IconWeight, IconProps as IconProps$1, Icon as Icon$1 } from '@phosphor-
39
45
  * because Phosphor's other three — `thin`, `bold`, `duotone` — say nothing this
40
46
  * system means. See `TONE_WEIGHT` below and `docs/decisions/0.7.md` § 35.
41
47
  *
42
- * `lib/glyphs.tsx` is the outlier and it is NOT reconciled here: it draws at
43
- * 1.75 on a 16 grid, which is 0.109em — three quarters heavier than both the
44
- * document and this. Aligning it restyles every primitive in the library and is
45
- * its own change. See `docs/decisions/0.7.md` § 29.
48
+ * IT IS NOW THE ONLY LINE THE LIBRARY DRAWS, which is what 0.10.0 changed.
49
+ * `lib/glyphs.tsx` drew at 1.75 on a 16 grid — 0.109em, three quarters heavier
50
+ * than both the document and this — and `./social` drew ten brand marks in a
51
+ * third hand. 0.7.0 left both alone because reconciling them restyles every
52
+ * primitive in the library; that is exactly what 0.10.0 did, and both files are
53
+ * gone. There is one description of what a line looks like here, and it is
54
+ * Phosphor's. See `docs/decisions/0.10.md` § 51.
46
55
  *
47
56
  * IN NEXT, IMPORT FROM `@phosphor-icons/react/ssr` inside a Server Component.
48
57
  * Phosphor's default build reads `IconContext` through `useContext`, and a hook
@@ -2,14 +2,20 @@ import * as react from 'react';
2
2
  import { IconWeight, IconProps as IconProps$1, Icon as Icon$1 } from '@phosphor-icons/react';
3
3
 
4
4
  /**
5
- * The system adopts `@phosphor-icons/react`, and this is the whole of what
6
- * «adopts» means: an optional peer dependency, and one place that fixes what a
7
- * call site was getting wrong on its own.
5
+ * The system adopts `@phosphor-icons/react`, and since 0.10.0 «adopts» means
6
+ * ALL of it: a required peer dependency, one place that fixes what a call site
7
+ * was getting wrong on its own, and no second set anywhere in the library.
8
+ *
9
+ * It was optional for three releases, and what made it required is that the
10
+ * library stopped keeping a set of its own to fall back on. That is the trade
11
+ * and it is worth naming: the two consumers that draw no icons of their own now
12
+ * install Phosphor anyway, because the `Alert` and the `Select` they DO draw are
13
+ * drawn with it.
8
14
  *
9
15
  * WHY IT IS HERE AT ALL. The position used to be that the system has no icons.
10
- * That was right for what the library was — five reading sites, where
11
- * `lib/glyphs.tsx` covers everything a primitive needs — and it stopped being
12
- * right when an admin panel arrived. Measured across the four consumers, the one
16
+ * That was right for what the library was — five reading sites, where a
17
+ * hand-drawn `lib/glyphs.tsx` covered everything a primitive needed — and it
18
+ * stopped being right when an admin panel arrived. Measured across the four consumers, the one
13
19
  * admin app imports 89 distinct icons in 229 places and the other three import
14
20
  * 9, 0 and 0. Seventy-seven of the 89 are domain icons for a course admin —
15
21
  * `GraduationCap`, `TicketPercent`, `Webhook` — and no design system was ever
@@ -39,10 +45,13 @@ import { IconWeight, IconProps as IconProps$1, Icon as Icon$1 } from '@phosphor-
39
45
  * because Phosphor's other three — `thin`, `bold`, `duotone` — say nothing this
40
46
  * system means. See `TONE_WEIGHT` below and `docs/decisions/0.7.md` § 35.
41
47
  *
42
- * `lib/glyphs.tsx` is the outlier and it is NOT reconciled here: it draws at
43
- * 1.75 on a 16 grid, which is 0.109em — three quarters heavier than both the
44
- * document and this. Aligning it restyles every primitive in the library and is
45
- * its own change. See `docs/decisions/0.7.md` § 29.
48
+ * IT IS NOW THE ONLY LINE THE LIBRARY DRAWS, which is what 0.10.0 changed.
49
+ * `lib/glyphs.tsx` drew at 1.75 on a 16 grid — 0.109em, three quarters heavier
50
+ * than both the document and this — and `./social` drew ten brand marks in a
51
+ * third hand. 0.7.0 left both alone because reconciling them restyles every
52
+ * primitive in the library; that is exactly what 0.10.0 did, and both files are
53
+ * gone. There is one description of what a line looks like here, and it is
54
+ * Phosphor's. See `docs/decisions/0.10.md` § 51.
46
55
  *
47
56
  * IN NEXT, IMPORT FROM `@phosphor-icons/react/ssr` inside a Server Component.
48
57
  * Phosphor's default build reads `IconContext` through `useContext`, and a hook
@@ -1,28 +1,3 @@
1
- import { cn } from '../chunk-FAAGZG7A.js';
1
+ export { ICON_WEIGHT, Icon, TONE_WEIGHT } from '../chunk-ZSCSKCTY.js';
2
+ import '../chunk-FAAGZG7A.js';
2
3
  import '../chunk-FGFNK72B.js';
3
- import '../chunk-MLKGABMK.js';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- var ICON_WEIGHT = "regular";
7
- var TONE_WEIGHT = {
8
- action: ICON_WEIGHT,
9
- current: "fill",
10
- quiet: "light"
11
- };
12
- function Icon({ as: Glyph, tone = "action", label, className, ...props }) {
13
- return /* @__PURE__ */ jsx(
14
- Glyph,
15
- {
16
- size: "1em",
17
- weight: TONE_WEIGHT[tone],
18
- "aria-hidden": label ? void 0 : true,
19
- "aria-label": label,
20
- role: label ? "img" : void 0,
21
- focusable: "false",
22
- className: cn("shrink-0", className),
23
- ...props
24
- }
25
- );
26
- }
27
-
28
- export { ICON_WEIGHT, Icon, TONE_WEIGHT };