@particle-academy/react-fancy 5.35.0 → 5.35.1
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 +30 -0
- package/dist/activity-light.cjs +2 -2
- package/dist/activity-light.js +1 -1
- package/dist/{chunk-PZTA6NCD.js → chunk-DCVR6NPP.js} +3 -3
- package/dist/chunk-DCVR6NPP.js.map +1 -0
- package/dist/{chunk-EHNMKQ4O.cjs → chunk-WNUU7T62.cjs} +3 -3
- package/dist/chunk-WNUU7T62.cjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-EHNMKQ4O.cjs.map +0 -1
- package/dist/chunk-PZTA6NCD.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [5.35.1] - 2026-10-10
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`ActivityLight direction="both"` drew as a tofu box in a container carrying
|
|
19
|
+
only the Liberation fonts.** The mark was U+21C4 (`⇄`), which those fonts do not
|
|
20
|
+
cover; it is now U+2194 (`↔`), which they do. **Nothing to do** — the prop, the
|
|
21
|
+
data attributes and the accessible name are unchanged, and the mark is
|
|
22
|
+
decorative (`aria-hidden`).
|
|
23
|
+
|
|
24
|
+
**One of three states failing is the expensive shape**, which is why this was
|
|
25
|
+
worth a release rather than a note. `in` and `out` drew arrows and `both` drew
|
|
26
|
+
a box, so a reader saw two working indicators and one they had no reason to
|
|
27
|
+
distrust — a font gap and a state are indistinguishable at that point, and a
|
|
28
|
+
direction mark going missing is the kind of absence nobody notices.
|
|
29
|
+
|
|
30
|
+
The choice is measured, not reasoned. `claude · tynn` rasterised each candidate
|
|
31
|
+
in a Liberation-only container and compared it pixel-for-pixel against a
|
|
32
|
+
Private Use Area codepoint no font covers: U+2190–2195 draw, U+21C4 and U+21C6
|
|
33
|
+
do not. **U+21C6 was included as a falsifier** — had it drawn, the finding
|
|
34
|
+
would have been "Liberation covers arrows" rather than "Liberation covers
|
|
35
|
+
WGL4", and this set would be the wrong fix.
|
|
36
|
+
|
|
37
|
+
Two glyph families in the kit are still outside that repertoire and are
|
|
38
|
+
deliberately NOT changed: the Dingbats (`✓` `✕` in `Checkbox`, `✦` in
|
|
39
|
+
`MagicWand`) have no in-repertoire substitute, so they are a genuine
|
|
40
|
+
glyph-versus-SVG trade rather than a one-character fix, and paying it for an
|
|
41
|
+
environment nobody ships a desktop app into is the wrong call today. A test
|
|
42
|
+
pins the `ActivityLight` set so a prettier arrow cannot drift back in.
|
|
43
|
+
|
|
14
44
|
## [5.35.0] - 2026-10-10
|
|
15
45
|
|
|
16
46
|
### Fixed
|
package/dist/activity-light.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWNUU7T62_cjs = require('./chunk-WNUU7T62.cjs');
|
|
4
4
|
require('./chunk-ZU5Q77OT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "ActivityLight", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkWNUU7T62_cjs.ActivityLight; }
|
|
11
11
|
});
|
|
12
12
|
//# sourceMappingURL=activity-light.cjs.map
|
|
13
13
|
//# sourceMappingURL=activity-light.cjs.map
|
package/dist/activity-light.js
CHANGED
|
@@ -61,9 +61,9 @@ var LEVEL_CLASS = {
|
|
|
61
61
|
var DIRECTION_GLYPH = {
|
|
62
62
|
in: "\u2190",
|
|
63
63
|
out: "\u2192",
|
|
64
|
-
both: "\
|
|
64
|
+
both: "\u2194"
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
export { ActivityLight };
|
|
68
|
-
//# sourceMappingURL=chunk-
|
|
69
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-DCVR6NPP.js.map
|
|
69
|
+
//# sourceMappingURL=chunk-DCVR6NPP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ActivityLight/ActivityLight.tsx"],"names":[],"mappings":";;;;AAkCO,IAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,EAAE,KAAA,EAAO,SAAA,EAAW,KAAA,GAAQ,IAAA,EAAM,KAAA,EAAO,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAEvE,IAAA,IAAI,KAAA,KAAU,MAAM,OAAO,IAAA;AAE3B,IAAA,MAAM,UAAU,OAAO,KAAA,KAAU,QAAA,IAAY,MAAA,CAAO,SAAS,KAAK,CAAA;AAElE,IAAA,uBACE,IAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,iCAAA,EAAiC,KAAA;AAAA,QAChC,GAAI,SAAA,GAAY,EAAE,2CAAA,EAA6C,SAAA,KAAc,EAAC;AAAA,QAC/E,YAAA,EAAY,OAAA,GAAU,CAAA,EAAG,KAAK,CAAA,EAAA,EAAK,KAAK,CAAA,EAAA,EAAK,KAAK,CAAA,CAAA,GAAK,CAAA,EAAG,KAAK,CAAA,EAAA,EAAK,KAAK,CAAA,CAAA;AAAA,QACzE,IAAA,EAAK,KAAA;AAAA,QACL,SAAA,EAAW,EAAA;AAAA,UACT,6CAAA;AAAA,UACA,YAAY,KAAK,CAAA;AAAA,UACjB;AAAA,SACF;AAAA,QACC,GAAG,KAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,qCAAA,EAAoC,EAAA;AAAA,cACpC,aAAA,EAAY,MAAA;AAAA,cACZ,SAAA,EAAW,EAAA,CAAG,yCAAA,EAA2C,KAAA,KAAU,UAAU,eAAe;AAAA;AAAA,WAC9F;AAAA,UAEC,SAAA,oBACC,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,uCAAA,EAAsC,EAAA;AAAA,cACtC,aAAA,EAAY,MAAA;AAAA,cACZ,SAAA,EAAU,wCAAA;AAAA,cAET,0BAAgB,SAAS;AAAA;AAAA,WAC5B;AAAA,UAID,OAAA,oBACC,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,uCAAA,EAAsC,EAAA;AAAA,cACtC,SAAA,EAAU,6CAAA;AAAA,cAET,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;AAM5B,IAAM,WAAA,GAA6C;AAAA,EACjD,IAAA,EAAM,wCAAA;AAAA,EACN,MAAA,EAAQ,gCAAA;AAAA,EACR,KAAA,EAAO,kCAAA;AAAA,EACP,MAAA,EAAQ;AACV,CAAA;AAwBA,IAAM,eAAA,GAAyD;AAAA,EAC7D,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,QAAA;AAAA,EACL,IAAA,EAAM;AACR,CAAA","file":"chunk-DCVR6NPP.js","sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { ActivityLightProps, ActivityLevel } from \"./ActivityLight.types\";\n\n/**\n * Activity on an **edge** — a relationship between two parties — with a recency\n * ramp and an optional volume.\n *\n * Not a presence dot. `Avatar status` belongs to one party and says whether\n * *they* are online; this belongs to a pair and says when *the link between\n * them* last moved. Use it in a comms column, a collaborator lane, anywhere the\n * subject is the relationship rather than the participant.\n *\n * ## Two kinds of nothing, and they must not look alike\n *\n * - **`level: null`** — the edge is real, its recency is not observable. Renders\n * NOTHING: no dot, no dash, no placeholder. A grey dot would assert \"quiet\",\n * which is a claim we cannot make.\n * - **`count: null`** or omitted — the edge's recency is known but its volume is\n * not. Renders the light with no number.\n * - **`count: 0`** — measured, and none. Renders `0`, because that is a fact.\n * Suppressing it would be indistinguishable from not having looked.\n *\n * The distinction reads as pedantic until a count is wrong in the direction\n * that flatters: a `0` where the truth is \"unknown\" tells the reader an agent\n * works alone, and they believe it.\n *\n * @example\n * ```tsx\n * <ActivityLight level=\"live\" direction=\"both\" count={12} label=\"Genie and Tynn\" />\n * <ActivityLight level=\"quiet\" count={0} label=\"Genie and Weaver\" />\n * <ActivityLight level={null} label=\"Genie and an unknown peer\" />\n * ```\n */\nexport const ActivityLight = forwardRef<HTMLSpanElement, ActivityLightProps>(\n ({ level, direction, count = null, label, className, ...props }, ref) => {\n // The one early return in the component, and the most important line in it.\n if (level === null) return null;\n\n const counted = typeof count === \"number\" && Number.isFinite(count);\n\n return (\n <span\n ref={ref}\n data-react-fancy-activity-light={level}\n {...(direction ? { \"data-react-fancy-activity-light-direction\": direction } : {})}\n aria-label={counted ? `${label}: ${level}, ${count}` : `${label}: ${level}`}\n role=\"img\"\n className={cn(\n \"inline-flex items-center gap-1 align-middle\",\n LEVEL_CLASS[level],\n className,\n )}\n {...props}\n >\n <span\n data-react-fancy-activity-light-dot=\"\"\n aria-hidden=\"true\"\n className={cn(\"size-2 shrink-0 rounded-full bg-current\", level === \"live\" && \"animate-pulse\")}\n />\n\n {direction && (\n <span\n data-react-fancy-activity-light-arrow=\"\"\n aria-hidden=\"true\"\n className=\"font-mono text-[0.625rem] leading-none\"\n >\n {DIRECTION_GLYPH[direction]}\n </span>\n )}\n\n {/* `counted` is the gate, NOT `count` — `0` is falsy and would vanish. */}\n {counted && (\n <span\n data-react-fancy-activity-light-count=\"\"\n className=\"font-mono text-xs tabular-nums leading-none\"\n >\n {count}\n </span>\n )}\n </span>\n );\n },\n);\n\nActivityLight.displayName = \"ActivityLight\";\n\n/**\n * The ramp. Each level is visually distinct from every other — a test asserts\n * that, because two levels that look alike make the ramp a lie.\n */\nconst LEVEL_CLASS: Record<ActivityLevel, string> = {\n live: \"text-emerald-500 dark:text-emerald-400\",\n recent: \"text-sky-500 dark:text-sky-400\",\n quiet: \"text-zinc-400 dark:text-zinc-500\",\n unseen: \"text-amber-500 dark:text-amber-400\",\n};\n\n/**\n * The direction marks, CHOSEN FOR FONT COVERAGE as much as for meaning.\n *\n * `both` was U+21C4 (⇄), which has no coverage in the Liberation fonts — so in\n * a container carrying only those, `in` and `out` drew arrows and `both` drew a\n * tofu box. One of three states failing is worse than all three failing,\n * because the reader cannot tell a font gap from a state: they see two working\n * indicators and one they have no reason to distrust.\n *\n * U+2194 (↔) is in **WGL4**, the repertoire Liberation targets, and that is the\n * line these three sit on — U+2190–2195 are in it, U+21C4 and the whole\n * Dingbats block are not. MEASURED by `claude · tynn` in a Liberation-only\n * container (2026-10-10), rasterising each character and comparing it\n * pixel-for-pixel against a Private Use Area codepoint no font covers: `↔`\n * draws, and U+21C6 `⇆` — the near neighbour, included as a falsifier — does\n * not, which is what makes it evidence of the repertoire rather than of\n * \"Liberation covers arrows\".\n *\n * **So do not \"improve\" `both` back to a prettier arrow.** U+21C4, U+21C6 and\n * the Dingbats (`✓` `✕` `✦`) all need a font many lean images do not ship.\n * A test pins this set.\n */\nconst DIRECTION_GLYPH: Record<\"in\" | \"out\" | \"both\", string> = {\n in: \"←\",\n out: \"→\",\n both: \"↔\",\n};\n"]}
|
|
@@ -63,9 +63,9 @@ var LEVEL_CLASS = {
|
|
|
63
63
|
var DIRECTION_GLYPH = {
|
|
64
64
|
in: "\u2190",
|
|
65
65
|
out: "\u2192",
|
|
66
|
-
both: "\
|
|
66
|
+
both: "\u2194"
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
exports.ActivityLight = ActivityLight;
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-WNUU7T62.cjs.map
|
|
71
|
+
//# sourceMappingURL=chunk-WNUU7T62.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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EAAY,MAAA;AAAA,cACZ,SAAA,EAAU,wCAAA;AAAA,cAET,0BAAgB,SAAS;AAAA;AAAA,WAC5B;AAAA,UAID,OAAA,oBACCA,cAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,uCAAA,EAAsC,EAAA;AAAA,cACtC,SAAA,EAAU,6CAAA;AAAA,cAET,QAAA,EAAA;AAAA;AAAA;AACH;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;AAEA,aAAA,CAAc,WAAA,GAAc,eAAA;AAM5B,IAAM,WAAA,GAA6C;AAAA,EACjD,IAAA,EAAM,wCAAA;AAAA,EACN,MAAA,EAAQ,gCAAA;AAAA,EACR,KAAA,EAAO,kCAAA;AAAA,EACP,MAAA,EAAQ;AACV,CAAA;AAwBA,IAAM,eAAA,GAAyD;AAAA,EAC7D,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,QAAA;AAAA,EACL,IAAA,EAAM;AACR,CAAA","file":"chunk-WNUU7T62.cjs","sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { ActivityLightProps, ActivityLevel } from \"./ActivityLight.types\";\n\n/**\n * Activity on an **edge** — a relationship between two parties — with a recency\n * ramp and an optional volume.\n *\n * Not a presence dot. `Avatar status` belongs to one party and says whether\n * *they* are online; this belongs to a pair and says when *the link between\n * them* last moved. Use it in a comms column, a collaborator lane, anywhere the\n * subject is the relationship rather than the participant.\n *\n * ## Two kinds of nothing, and they must not look alike\n *\n * - **`level: null`** — the edge is real, its recency is not observable. Renders\n * NOTHING: no dot, no dash, no placeholder. A grey dot would assert \"quiet\",\n * which is a claim we cannot make.\n * - **`count: null`** or omitted — the edge's recency is known but its volume is\n * not. Renders the light with no number.\n * - **`count: 0`** — measured, and none. Renders `0`, because that is a fact.\n * Suppressing it would be indistinguishable from not having looked.\n *\n * The distinction reads as pedantic until a count is wrong in the direction\n * that flatters: a `0` where the truth is \"unknown\" tells the reader an agent\n * works alone, and they believe it.\n *\n * @example\n * ```tsx\n * <ActivityLight level=\"live\" direction=\"both\" count={12} label=\"Genie and Tynn\" />\n * <ActivityLight level=\"quiet\" count={0} label=\"Genie and Weaver\" />\n * <ActivityLight level={null} label=\"Genie and an unknown peer\" />\n * ```\n */\nexport const ActivityLight = forwardRef<HTMLSpanElement, ActivityLightProps>(\n ({ level, direction, count = null, label, className, ...props }, ref) => {\n // The one early return in the component, and the most important line in it.\n if (level === null) return null;\n\n const counted = typeof count === \"number\" && Number.isFinite(count);\n\n return (\n <span\n ref={ref}\n data-react-fancy-activity-light={level}\n {...(direction ? { \"data-react-fancy-activity-light-direction\": direction } : {})}\n aria-label={counted ? `${label}: ${level}, ${count}` : `${label}: ${level}`}\n role=\"img\"\n className={cn(\n \"inline-flex items-center gap-1 align-middle\",\n LEVEL_CLASS[level],\n className,\n )}\n {...props}\n >\n <span\n data-react-fancy-activity-light-dot=\"\"\n aria-hidden=\"true\"\n className={cn(\"size-2 shrink-0 rounded-full bg-current\", level === \"live\" && \"animate-pulse\")}\n />\n\n {direction && (\n <span\n data-react-fancy-activity-light-arrow=\"\"\n aria-hidden=\"true\"\n className=\"font-mono text-[0.625rem] leading-none\"\n >\n {DIRECTION_GLYPH[direction]}\n </span>\n )}\n\n {/* `counted` is the gate, NOT `count` — `0` is falsy and would vanish. */}\n {counted && (\n <span\n data-react-fancy-activity-light-count=\"\"\n className=\"font-mono text-xs tabular-nums leading-none\"\n >\n {count}\n </span>\n )}\n </span>\n );\n },\n);\n\nActivityLight.displayName = \"ActivityLight\";\n\n/**\n * The ramp. Each level is visually distinct from every other — a test asserts\n * that, because two levels that look alike make the ramp a lie.\n */\nconst LEVEL_CLASS: Record<ActivityLevel, string> = {\n live: \"text-emerald-500 dark:text-emerald-400\",\n recent: \"text-sky-500 dark:text-sky-400\",\n quiet: \"text-zinc-400 dark:text-zinc-500\",\n unseen: \"text-amber-500 dark:text-amber-400\",\n};\n\n/**\n * The direction marks, CHOSEN FOR FONT COVERAGE as much as for meaning.\n *\n * `both` was U+21C4 (⇄), which has no coverage in the Liberation fonts — so in\n * a container carrying only those, `in` and `out` drew arrows and `both` drew a\n * tofu box. One of three states failing is worse than all three failing,\n * because the reader cannot tell a font gap from a state: they see two working\n * indicators and one they have no reason to distrust.\n *\n * U+2194 (↔) is in **WGL4**, the repertoire Liberation targets, and that is the\n * line these three sit on — U+2190–2195 are in it, U+21C4 and the whole\n * Dingbats block are not. MEASURED by `claude · tynn` in a Liberation-only\n * container (2026-10-10), rasterising each character and comparing it\n * pixel-for-pixel against a Private Use Area codepoint no font covers: `↔`\n * draws, and U+21C6 `⇆` — the near neighbour, included as a falsifier — does\n * not, which is what makes it evidence of the repertoire rather than of\n * \"Liberation covers arrows\".\n *\n * **So do not \"improve\" `both` back to a prettier arrow.** U+21C4, U+21C6 and\n * the Dingbats (`✓` `✕` `✦`) all need a font many lean images do not ship.\n * A test pins this set.\n */\nconst DIRECTION_GLYPH: Record<\"in\" | \"out\" | \"both\", string> = {\n in: \"←\",\n out: \"→\",\n both: \"↔\",\n};\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ var chunkXLFGWNW4_cjs = require('./chunk-XLFGWNW4.cjs');
|
|
|
109
109
|
var chunk65HKNZFG_cjs = require('./chunk-65HKNZFG.cjs');
|
|
110
110
|
var chunkN4VHOTMK_cjs = require('./chunk-N4VHOTMK.cjs');
|
|
111
111
|
var chunkS5KUYX3Z_cjs = require('./chunk-S5KUYX3Z.cjs');
|
|
112
|
-
var
|
|
112
|
+
var chunkWNUU7T62_cjs = require('./chunk-WNUU7T62.cjs');
|
|
113
113
|
var chunkQW66UHWO_cjs = require('./chunk-QW66UHWO.cjs');
|
|
114
114
|
var chunkQBNR5IVM_cjs = require('./chunk-QBNR5IVM.cjs');
|
|
115
115
|
var chunkJ2DI6RMR_cjs = require('./chunk-J2DI6RMR.cjs');
|
|
@@ -793,7 +793,7 @@ Object.defineProperty(exports, "useAccordionSection", {
|
|
|
793
793
|
});
|
|
794
794
|
Object.defineProperty(exports, "ActivityLight", {
|
|
795
795
|
enumerable: true,
|
|
796
|
-
get: function () { return
|
|
796
|
+
get: function () { return chunkWNUU7T62_cjs.ActivityLight; }
|
|
797
797
|
});
|
|
798
798
|
Object.defineProperty(exports, "AudioViewer", {
|
|
799
799
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -107,7 +107,7 @@ export { Text } from './chunk-5RLP77KK.js';
|
|
|
107
107
|
export { Heading } from './chunk-CESGP5AF.js';
|
|
108
108
|
export { Accordion, useAccordion } from './chunk-LYHQ4VBR.js';
|
|
109
109
|
export { AccordionPanel, AccordionPanelContent, AccordionPanelSection, AccordionPanelTrigger, useAccordionPanel, useAccordionSection } from './chunk-RUSRAKKA.js';
|
|
110
|
-
export { ActivityLight } from './chunk-
|
|
110
|
+
export { ActivityLight } from './chunk-DCVR6NPP.js';
|
|
111
111
|
export { AudioViewer } from './chunk-UIJR26YW.js';
|
|
112
112
|
export { Autocomplete } from './chunk-O2ZHORSC.js';
|
|
113
113
|
export { useFloatingPosition } from './chunk-MQ6VGG62.js';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ActivityLight/ActivityLight.tsx"],"names":["forwardRef","jsxs","cn","jsx"],"mappings":";;;;;;AAkCO,IAAM,aAAA,GAAgBA,gBAAA;AAAA,EAC3B,CAAC,EAAE,KAAA,EAAO,SAAA,EAAW,KAAA,GAAQ,IAAA,EAAM,KAAA,EAAO,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAEvE,IAAA,IAAI,KAAA,KAAU,MAAM,OAAO,IAAA;AAE3B,IAAA,MAAM,UAAU,OAAO,KAAA,KAAU,QAAA,IAAY,MAAA,CAAO,SAAS,KAAK,CAAA;AAElE,IAAA,uBACEC,eAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,iCAAA,EAAiC,KAAA;AAAA,QA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AyD;AAAA,EAC7D,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,QAAA;AAAA,EACL,IAAA,EAAM;AACR,CAAA","file":"chunk-EHNMKQ4O.cjs","sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { ActivityLightProps, ActivityLevel } from \"./ActivityLight.types\";\n\n/**\n * Activity on an **edge** — a relationship between two parties — with a recency\n * ramp and an optional volume.\n *\n * Not a presence dot. `Avatar status` belongs to one party and says whether\n * *they* are online; this belongs to a pair and says when *the link between\n * them* last moved. Use it in a comms column, a collaborator lane, anywhere the\n * subject is the relationship rather than the participant.\n *\n * ## Two kinds of nothing, and they must not look alike\n *\n * - **`level: null`** — the edge is real, its recency is not observable. Renders\n * NOTHING: no dot, no dash, no placeholder. A grey dot would assert \"quiet\",\n * which is a claim we cannot make.\n * - **`count: null`** or omitted — the edge's recency is known but its volume is\n * not. Renders the light with no number.\n * - **`count: 0`** — measured, and none. Renders `0`, because that is a fact.\n * Suppressing it would be indistinguishable from not having looked.\n *\n * The distinction reads as pedantic until a count is wrong in the direction\n * that flatters: a `0` where the truth is \"unknown\" tells the reader an agent\n * works alone, and they believe it.\n *\n * @example\n * ```tsx\n * <ActivityLight level=\"live\" direction=\"both\" count={12} label=\"Genie and Tynn\" />\n * <ActivityLight level=\"quiet\" count={0} label=\"Genie and Weaver\" />\n * <ActivityLight level={null} label=\"Genie and an unknown peer\" />\n * ```\n */\nexport const ActivityLight = forwardRef<HTMLSpanElement, ActivityLightProps>(\n ({ level, direction, count = null, label, className, ...props }, ref) => {\n // The one early return in the component, and the most important line in it.\n if (level === null) return null;\n\n const counted = typeof count === \"number\" && Number.isFinite(count);\n\n return (\n <span\n ref={ref}\n data-react-fancy-activity-light={level}\n {...(direction ? { \"data-react-fancy-activity-light-direction\": direction } : {})}\n aria-label={counted ? `${label}: ${level}, ${count}` : `${label}: ${level}`}\n role=\"img\"\n className={cn(\n \"inline-flex items-center gap-1 align-middle\",\n LEVEL_CLASS[level],\n className,\n )}\n {...props}\n >\n <span\n data-react-fancy-activity-light-dot=\"\"\n aria-hidden=\"true\"\n className={cn(\"size-2 shrink-0 rounded-full bg-current\", level === \"live\" && \"animate-pulse\")}\n />\n\n {direction && (\n <span\n data-react-fancy-activity-light-arrow=\"\"\n aria-hidden=\"true\"\n className=\"font-mono text-[0.625rem] leading-none\"\n >\n {DIRECTION_GLYPH[direction]}\n </span>\n )}\n\n {/* `counted` is the gate, NOT `count` — `0` is falsy and would vanish. */}\n {counted && (\n <span\n data-react-fancy-activity-light-count=\"\"\n className=\"font-mono text-xs tabular-nums leading-none\"\n >\n {count}\n </span>\n )}\n </span>\n );\n },\n);\n\nActivityLight.displayName = \"ActivityLight\";\n\n/**\n * The ramp. Each level is visually distinct from every other — a test asserts\n * that, because two levels that look alike make the ramp a lie.\n */\nconst LEVEL_CLASS: Record<ActivityLevel, string> = {\n live: \"text-emerald-500 dark:text-emerald-400\",\n recent: \"text-sky-500 dark:text-sky-400\",\n quiet: \"text-zinc-400 dark:text-zinc-500\",\n unseen: \"text-amber-500 dark:text-amber-400\",\n};\n\nconst DIRECTION_GLYPH: Record<\"in\" | \"out\" | \"both\", string> = {\n in: \"←\",\n out: \"→\",\n both: \"⇄\",\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ActivityLight/ActivityLight.tsx"],"names":[],"mappings":";;;;AAkCO,IAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CAAC,EAAE,KAAA,EAAO,SAAA,EAAW,KAAA,GAAQ,IAAA,EAAM,KAAA,EAAO,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAEvE,IAAA,IAAI,KAAA,KAAU,MAAM,OAAO,IAAA;AAE3B,IAAA,MAAM,UAAU,OAAO,KAAA,KAAU,QAAA,IAAY,MAAA,CAAO,SAAS,KAAK,CAAA;AAElE,IAAA,uBACE,IAAA;AAAA,MAAC,MAAA;AA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A;AAAA,EACP,MAAA,EAAQ;AACV,CAAA;AAEA,IAAM,eAAA,GAAyD;AAAA,EAC7D,EAAA,EAAI,QAAA;AAAA,EACJ,GAAA,EAAK,QAAA;AAAA,EACL,IAAA,EAAM;AACR,CAAA","file":"chunk-PZTA6NCD.js","sourcesContent":["import { forwardRef } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport type { ActivityLightProps, ActivityLevel } from \"./ActivityLight.types\";\n\n/**\n * Activity on an **edge** — a relationship between two parties — with a recency\n * ramp and an optional volume.\n *\n * Not a presence dot. `Avatar status` belongs to one party and says whether\n * *they* are online; this belongs to a pair and says when *the link between\n * them* last moved. Use it in a comms column, a collaborator lane, anywhere the\n * subject is the relationship rather than the participant.\n *\n * ## Two kinds of nothing, and they must not look alike\n *\n * - **`level: null`** — the edge is real, its recency is not observable. Renders\n * NOTHING: no dot, no dash, no placeholder. A grey dot would assert \"quiet\",\n * which is a claim we cannot make.\n * - **`count: null`** or omitted — the edge's recency is known but its volume is\n * not. Renders the light with no number.\n * - **`count: 0`** — measured, and none. Renders `0`, because that is a fact.\n * Suppressing it would be indistinguishable from not having looked.\n *\n * The distinction reads as pedantic until a count is wrong in the direction\n * that flatters: a `0` where the truth is \"unknown\" tells the reader an agent\n * works alone, and they believe it.\n *\n * @example\n * ```tsx\n * <ActivityLight level=\"live\" direction=\"both\" count={12} label=\"Genie and Tynn\" />\n * <ActivityLight level=\"quiet\" count={0} label=\"Genie and Weaver\" />\n * <ActivityLight level={null} label=\"Genie and an unknown peer\" />\n * ```\n */\nexport const ActivityLight = forwardRef<HTMLSpanElement, ActivityLightProps>(\n ({ level, direction, count = null, label, className, ...props }, ref) => {\n // The one early return in the component, and the most important line in it.\n if (level === null) return null;\n\n const counted = typeof count === \"number\" && Number.isFinite(count);\n\n return (\n <span\n ref={ref}\n data-react-fancy-activity-light={level}\n {...(direction ? { \"data-react-fancy-activity-light-direction\": direction } : {})}\n aria-label={counted ? `${label}: ${level}, ${count}` : `${label}: ${level}`}\n role=\"img\"\n className={cn(\n \"inline-flex items-center gap-1 align-middle\",\n LEVEL_CLASS[level],\n className,\n )}\n {...props}\n >\n <span\n data-react-fancy-activity-light-dot=\"\"\n aria-hidden=\"true\"\n className={cn(\"size-2 shrink-0 rounded-full bg-current\", level === \"live\" && \"animate-pulse\")}\n />\n\n {direction && (\n <span\n data-react-fancy-activity-light-arrow=\"\"\n aria-hidden=\"true\"\n className=\"font-mono text-[0.625rem] leading-none\"\n >\n {DIRECTION_GLYPH[direction]}\n </span>\n )}\n\n {/* `counted` is the gate, NOT `count` — `0` is falsy and would vanish. */}\n {counted && (\n <span\n data-react-fancy-activity-light-count=\"\"\n className=\"font-mono text-xs tabular-nums leading-none\"\n >\n {count}\n </span>\n )}\n </span>\n );\n },\n);\n\nActivityLight.displayName = \"ActivityLight\";\n\n/**\n * The ramp. Each level is visually distinct from every other — a test asserts\n * that, because two levels that look alike make the ramp a lie.\n */\nconst LEVEL_CLASS: Record<ActivityLevel, string> = {\n live: \"text-emerald-500 dark:text-emerald-400\",\n recent: \"text-sky-500 dark:text-sky-400\",\n quiet: \"text-zinc-400 dark:text-zinc-500\",\n unseen: \"text-amber-500 dark:text-amber-400\",\n};\n\nconst DIRECTION_GLYPH: Record<\"in\" | \"out\" | \"both\", string> = {\n in: \"←\",\n out: \"→\",\n both: \"⇄\",\n};\n"]}
|