From 177ec4e9374ce168ee7389acf7244d88148a96a9 Mon Sep 17 00:00:00 2001 From: bailey <74082460+bmjcoding@users.noreply.github.com> Date: Sun, 22 Nov 2026 17:12:28 -0600 Subject: [PATCH 1/4] B7 notices and search: the pending ring, grouped repeats, NotificationList (the page form), in-page search with server results, NotificationCenter (cimip-gaps-2, DECISIONS 265) - NotificationEntry: status "pending" (Phosphor Circle at 16, secondary ink), entries/count (a group that opens in place on the reveal's track), current. - NotificationList: the center's rows in the page (a phone's tab-bar destination, a sidebar's entries; head={false}), no popover, title, rim or glide. - NotificationCenter and NotificationCenterProps, with the British names as aliases. - SearchField, SearchPassages, SearchPassage, SearchMatch, markMatches: search in a page or panel over a server's passages, loading in a LoadingShape. - useReveal takes focusFirst (engineering, no pixel). - The HTML skill's notifications module draws pending, groups and current (cap 9,250 to 11,350). - Round 56 (to be renumbered at merge), foundations, README, tests. Co-Authored-By: Claude Opus 5.5 --- .agent/skills/basalt-html/parts/icons.json | 2 +- .agent/skills/basalt-html/parts/manifest.json | 11 +- .../basalt-html/parts/notifications.css | 2 +- .../skills/basalt-html/parts/notifications.js | 2 +- .../basalt-html/parts/usage/notifications.md | 7 +- docs/foundations.md | 44 ++- packages/react/README.md | 4 +- packages/react/src/index.ts | 8 +- packages/react/src/notifications.tsx | 203 +++++++++-- packages/react/src/reveal.tsx | 9 +- packages/react/src/search.tsx | 177 ++++++++++ packages/react/src/styles/components.css | 102 +++++- packages/react/test/bundle.test.mjs | 8 +- packages/react/test/export-sizes.json | 33 +- packages/react/test/icons.test.mjs | 8 +- packages/react/test/notices-search.test.mjs | 319 ++++++++++++++++++ packages/react/test/overlays-search.test.mjs | 2 +- tools/html-skill/src/icons.json | 2 +- tools/html-skill/src/modules.json | 11 +- .../html-skill/src/modules/notifications.css | 13 +- tools/html-skill/src/modules/notifications.js | 50 ++- tools/html-skill/src/usage/notifications.md | 7 +- tools/html-skill/test/parity.test.mjs | 9 +- tools/review/round56.tsx | 287 ++++++++++++++++ tools/review/rounds.tsx | 2 + 25 files changed, 1228 insertions(+), 94 deletions(-) create mode 100644 packages/react/test/notices-search.test.mjs create mode 100644 tools/review/round56.tsx diff --git a/.agent/skills/basalt-html/parts/icons.json b/.agent/skills/basalt-html/parts/icons.json index 2a8d11fa..748d4ebe 100644 --- a/.agent/skills/basalt-html/parts/icons.json +++ b/.agent/skills/basalt-html/parts/icons.json @@ -1 +1 @@ -{"notice":"/*! The icon paths below are from Phosphor Icons (@phosphor-icons/react):\nMIT License\n\nCopyright (c) 2020 Phosphor Icons\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/","icons":{"Command":["M180,140H164V116h16a40,40,0,1,0-40-40V92H116V76a40,40,0,1,0-40,40H92v24H76a40,40,0,1,0,40,40V164h24v16a40,40,0,1,0,40-40ZM164,76a16,16,0,1,1,16,16H164ZM60,76a16,16,0,0,1,32,0V92H76A16,16,0,0,1,60,76ZM92,180a16,16,0,1,1-16-16H92Zm24-64h24v24H116Zm64,80a16,16,0,0,1-16-16V164h16a16,16,0,0,1,0,32Z"],"Option":["M236,192a12,12,0,0,1-12,12H160.94a19.89,19.89,0,0,1-17.88-11.06L92.58,92H32a12,12,0,0,1,0-24H95.06a19.89,19.89,0,0,1,17.88,11.06L163.42,180H224A12,12,0,0,1,236,192ZM152,92h72a12,12,0,0,0,0-24H152a12,12,0,0,0,0,24Z"],"Control":["M208.49,128.49a12,12,0,0,1-17,0L128,65,64.49,128.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,128.49Z"],"Sun":["M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"],"Moon":["M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z"],"Info":["M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"],"Warning":["M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"],"ArrowRight":["M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"],"ArrowLeft":["M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"],"ArrowUp":["M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"],"ArrowDown":["M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z"],"CaretUpDown":["M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"],"Trash":["M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"],"Download":["M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z"],"ArrowClockwise":["M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"],"CheckCircle":["M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"],"XCircle":["M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"],"GithubLogo":["M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z"],"XLogo":["M218.12,209.56l-61-95.8,59.72-65.69a12,12,0,0,0-17.76-16.14L143.81,92.77,106.12,33.56A12,12,0,0,0,96,28H48A12,12,0,0,0,37.88,46.44l61,95.8L39.12,207.93a12,12,0,1,0,17.76,16.14l55.31-60.84,37.69,59.21A12,12,0,0,0,160,228h48a12,12,0,0,0,10.12-18.44ZM166.59,204,69.86,52H89.41l96.73,152Z"],"LinkedinLogo":["M216,20H40A20,20,0,0,0,20,40V216a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V40A20,20,0,0,0,216,20Zm-4,192H44V44H212ZM112,176V120a12,12,0,0,1,21.43-7.41A40,40,0,0,1,192,148v28a12,12,0,0,1-24,0V148a16,16,0,0,0-32,0v28a12,12,0,0,1-24,0ZM96,120v56a12,12,0,0,1-24,0V120a12,12,0,0,1,24,0ZM68,80A16,16,0,1,1,84,96,16,16,0,0,1,68,80Z"],"InstagramLogo":["M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,152ZM176,20H80A60.07,60.07,0,0,0,20,80v96a60.07,60.07,0,0,0,60,60h96a60.07,60.07,0,0,0,60-60V80A60.07,60.07,0,0,0,176,20Zm36,156a36,36,0,0,1-36,36H80a36,36,0,0,1-36-36V80A36,36,0,0,1,80,44h96a36,36,0,0,1,36,36ZM196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Z"],"YoutubeLogo":["M170.49,117.91l-56-36A12,12,0,0,0,96,92v72a12,12,0,0,0,18.49,10.09l56-36a12,12,0,0,0,0-20.18ZM120,142V114l21.81,14Zm118.21-73.5a28.05,28.05,0,0,0-16.93-19.14C186.4,35.91,131.29,36,128,36s-58.4-.09-93.28,13.38A28.05,28.05,0,0,0,17.79,68.52C15.15,78.72,12,97.32,12,128s3.15,49.28,5.79,59.48a28.05,28.05,0,0,0,16.93,19.14C68.21,219.55,120.36,220,127.37,220h1.26c7,0,59.16-.45,92.65-13.38a28.05,28.05,0,0,0,16.93-19.14c2.64-10.2,5.79-28.8,5.79-59.48S240.85,78.72,238.21,68.52ZM215,181.46a4,4,0,0,1-2.34,2.77C182.78,195.76,132.27,196,128.32,196h-.39c-.53,0-53.64.17-84.56-11.77A4,4,0,0,1,41,181.46c-1.88-7.24-5-23.82-5-53.46s3.15-46.22,5-53.46a4,4,0,0,1,2.34-2.77C74.29,59.83,127.39,60,127.92,60h.15c.54,0,53.64-.17,84.56,11.77A4,4,0,0,1,215,74.54c1.88,7.24,5,23.82,5,53.46S216.85,174.22,215,181.46Z"],"EnvelopeSimple":["M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z"],"TerminalWindow":["M72.5,150.63,100.79,128,72.5,105.37a12,12,0,1,1,15-18.74l40,32a12,12,0,0,1,0,18.74l-40,32a12,12,0,0,1-15-18.74ZM144,172h32a12,12,0,0,0,0-24H144a12,12,0,0,0,0,24ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z"]}} +{"notice":"/*! The icon paths below are from Phosphor Icons (@phosphor-icons/react):\nMIT License\n\nCopyright (c) 2020 Phosphor Icons\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/","icons":{"Command":["M180,140H164V116h16a40,40,0,1,0-40-40V92H116V76a40,40,0,1,0-40,40H92v24H76a40,40,0,1,0,40,40V164h24v16a40,40,0,1,0,40-40ZM164,76a16,16,0,1,1,16,16H164ZM60,76a16,16,0,0,1,32,0V92H76A16,16,0,0,1,60,76ZM92,180a16,16,0,1,1-16-16H92Zm24-64h24v24H116Zm64,80a16,16,0,0,1-16-16V164h16a16,16,0,0,1,0,32Z"],"Option":["M236,192a12,12,0,0,1-12,12H160.94a19.89,19.89,0,0,1-17.88-11.06L92.58,92H32a12,12,0,0,1,0-24H95.06a19.89,19.89,0,0,1,17.88,11.06L163.42,180H224A12,12,0,0,1,236,192ZM152,92h72a12,12,0,0,0,0-24H152a12,12,0,0,0,0,24Z"],"Control":["M208.49,128.49a12,12,0,0,1-17,0L128,65,64.49,128.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,128.49Z"],"Sun":["M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"],"Moon":["M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z"],"Info":["M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"],"Warning":["M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"],"ArrowRight":["M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"],"ArrowLeft":["M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"],"ArrowUp":["M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"],"ArrowDown":["M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z"],"CaretUpDown":["M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"],"Trash":["M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"],"Download":["M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z"],"ArrowClockwise":["M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"],"CheckCircle":["M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"],"XCircle":["M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"],"Circle":["M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z"],"GithubLogo":["M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z"],"XLogo":["M218.12,209.56l-61-95.8,59.72-65.69a12,12,0,0,0-17.76-16.14L143.81,92.77,106.12,33.56A12,12,0,0,0,96,28H48A12,12,0,0,0,37.88,46.44l61,95.8L39.12,207.93a12,12,0,1,0,17.76,16.14l55.31-60.84,37.69,59.21A12,12,0,0,0,160,228h48a12,12,0,0,0,10.12-18.44ZM166.59,204,69.86,52H89.41l96.73,152Z"],"LinkedinLogo":["M216,20H40A20,20,0,0,0,20,40V216a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V40A20,20,0,0,0,216,20Zm-4,192H44V44H212ZM112,176V120a12,12,0,0,1,21.43-7.41A40,40,0,0,1,192,148v28a12,12,0,0,1-24,0V148a16,16,0,0,0-32,0v28a12,12,0,0,1-24,0ZM96,120v56a12,12,0,0,1-24,0V120a12,12,0,0,1,24,0ZM68,80A16,16,0,1,1,84,96,16,16,0,0,1,68,80Z"],"InstagramLogo":["M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,152ZM176,20H80A60.07,60.07,0,0,0,20,80v96a60.07,60.07,0,0,0,60,60h96a60.07,60.07,0,0,0,60-60V80A60.07,60.07,0,0,0,176,20Zm36,156a36,36,0,0,1-36,36H80a36,36,0,0,1-36-36V80A36,36,0,0,1,80,44h96a36,36,0,0,1,36,36ZM196,76a16,16,0,1,1-16-16A16,16,0,0,1,196,76Z"],"YoutubeLogo":["M170.49,117.91l-56-36A12,12,0,0,0,96,92v72a12,12,0,0,0,18.49,10.09l56-36a12,12,0,0,0,0-20.18ZM120,142V114l21.81,14Zm118.21-73.5a28.05,28.05,0,0,0-16.93-19.14C186.4,35.91,131.29,36,128,36s-58.4-.09-93.28,13.38A28.05,28.05,0,0,0,17.79,68.52C15.15,78.72,12,97.32,12,128s3.15,49.28,5.79,59.48a28.05,28.05,0,0,0,16.93,19.14C68.21,219.55,120.36,220,127.37,220h1.26c7,0,59.16-.45,92.65-13.38a28.05,28.05,0,0,0,16.93-19.14c2.64-10.2,5.79-28.8,5.79-59.48S240.85,78.72,238.21,68.52ZM215,181.46a4,4,0,0,1-2.34,2.77C182.78,195.76,132.27,196,128.32,196h-.39c-.53,0-53.64.17-84.56-11.77A4,4,0,0,1,41,181.46c-1.88-7.24-5-23.82-5-53.46s3.15-46.22,5-53.46a4,4,0,0,1,2.34-2.77C74.29,59.83,127.39,60,127.92,60h.15c.54,0,53.64-.17,84.56,11.77A4,4,0,0,1,215,74.54c1.88,7.24,5,23.82,5,53.46S216.85,174.22,215,181.46Z"],"EnvelopeSimple":["M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z"],"TerminalWindow":["M72.5,150.63,100.79,128,72.5,105.37a12,12,0,1,1,15-18.74l40,32a12,12,0,0,1,0,18.74l-40,32a12,12,0,0,1-15-18.74ZM144,172h32a12,12,0,0,0,0-24H144a12,12,0,0,0,0,24ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z"]}} diff --git a/.agent/skills/basalt-html/parts/manifest.json b/.agent/skills/basalt-html/parts/manifest.json index 6f69410e..cfb51fa0 100644 --- a/.agent/skills/basalt-html/parts/manifest.json +++ b/.agent/skills/basalt-html/parts/manifest.json @@ -1071,7 +1071,11 @@ "notification-text", "notification-title", "notification-line", - "notification-time" + "notification-time", + "notification-head", + "notification-count", + "notification-caret", + "notification-entries" ], "text": [ "Basalt\\s*\\.\\s*notifications\\b" @@ -1086,9 +1090,10 @@ "icons": [ "CheckCircle", "Warning", - "XCircle" + "XCircle", + "Circle" ], - "budget": 9250, + "budget": 11350, "usage": 1100, "builds": [ "popover", diff --git a/.agent/skills/basalt-html/parts/notifications.css b/.agent/skills/basalt-html/parts/notifications.css index 37c38be4..0f7f2d20 100644 --- a/.agent/skills/basalt-html/parts/notifications.css +++ b/.agent/skills/basalt-html/parts/notifications.css @@ -1 +1 @@ -@layer basalt{.notifications-dot{position:absolute;top:var(--basalt-space-1-5);right:var(--basalt-space-1-5);width:var(--basalt-size-dot);height:var(--basalt-size-dot);border-radius:var(--basalt-radius-full);background:var(--basalt-text-primary);pointer-events:none}.popover.notifications:popover-open{display:flex}.popover.notifications{flex-direction:column;width:min(var(--basalt-size-toast-width),calc(100vw - 2 * var(--basalt-space-4)));max-width:none;max-height:var(--available-height, 100vh);padding:0;overflow:hidden}.notifications-head{display:flex;align-items:center;gap:var(--basalt-space-2);padding:var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-4);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.notifications-title{flex:none;line-height:var(--basalt-text-base-line-height)}.notifications-count{flex:1;min-width:0;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-secondary);font-variant-numeric:tabular-nums}.notifications-mark{flex:none}.notifications-foot{display:flex;justify-content:flex-end;padding:var(--basalt-space-2-5);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.notifications-empty{margin:0;padding:var(--basalt-space-6) var(--basalt-space-4);text-align:center;color:var(--basalt-text-secondary)}.notifications-scroll{position:relative;flex:1;min-height:0;overflow-y:auto}.notifications-list{margin:0;padding:var(--basalt-space-1-5);list-style:none}.notification{--_inset: var(--basalt-space-0-5);box-sizing:border-box;position:relative;isolation:isolate;display:grid;grid-template-columns:var(--basalt-size-dot) var(--basalt-size-icon-sm) minmax(0,1fr) auto;align-items:start;column-gap:var(--basalt-space-2-5);width:100%;margin:0;padding:calc(var(--basalt-space-2) + var(--_inset)) var(--basalt-space-3);border:0;border-radius:calc(var(--basalt-radius-md) + var(--_inset));background:none;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);text-align:start;text-decoration:none;cursor:pointer;user-select:none}@media(pointer:coarse){.notification{min-height:var(--basalt-size-tap-min);align-content:center}}.notification:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.notification:hover:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.notifications-scroll[data-keys] .notification:hover:before{background-color:transparent}.notification:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(var(--basalt-size-focus-offset) - var(--_inset))}.notification-dot{width:var(--basalt-size-dot);height:var(--basalt-size-dot);margin-top:calc((var(--basalt-text-base-line-height) - var(--basalt-size-dot)) / 2);border-radius:var(--basalt-radius-full)}.notification[data-unread] .notification-dot{background:var(--basalt-text-primary)}.notification-mark{display:grid;place-items:center;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);margin-top:calc((var(--basalt-text-base-line-height) - var(--basalt-size-icon-sm)) / 2)}.notification[data-status=success] .notification-mark{color:var(--basalt-status-success)}.notification[data-status=warning] .notification-mark{color:var(--basalt-status-warning)}.notification[data-status=danger] .notification-mark{color:var(--basalt-status-danger)}.notification-text{display:flex;flex-direction:column;min-width:0}.notification-title,.notification-line{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.notification[data-unread] .notification-title,.notification:hover .notification-title{color:var(--basalt-text-primary)}.notification-line{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary)}.notification-time{margin-top:calc(var(--basalt-space-0-5) / 2);font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--basalt-text-tertiary)}.notification:hover .notification-line,.notification:hover .notification-time{color:var(--basalt-text-secondary)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.notifications-scroll[data-glide] .notification:before{background-color:transparent}}@media(forced-colors:active){.notifications-dot,.notification[data-unread] .notification-dot{box-sizing:border-box;border:calc(var(--basalt-size-dot) / 2) solid;background:none}.notification[data-status] .notification-mark{color:CanvasText}.notification:hover{forced-color-adjust:none;background:Highlight;color:HighlightText}.notification:hover:before{background-color:transparent}.notification:hover :is(.notification-title,.notification-line,.notification-time,.notification-mark){color:HighlightText}}} +@layer basalt{.notifications-dot{position:absolute;top:var(--basalt-space-1-5);right:var(--basalt-space-1-5);width:var(--basalt-size-dot);height:var(--basalt-size-dot);border-radius:var(--basalt-radius-full);background:var(--basalt-text-primary);pointer-events:none}.popover.notifications:popover-open{display:flex}.popover.notifications{flex-direction:column;width:min(var(--basalt-size-toast-width),calc(100vw - 2 * var(--basalt-space-4)));max-width:none;max-height:var(--available-height, 100vh);padding:0;overflow:hidden}.notifications-head{display:flex;align-items:center;gap:var(--basalt-space-2);padding:var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-2-5) var(--basalt-space-4);border-bottom:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.notifications-title{flex:none;line-height:var(--basalt-text-base-line-height)}.notifications-count{flex:1;min-width:0;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-secondary);font-variant-numeric:tabular-nums}.notifications-mark{flex:none}.notifications-foot{display:flex;justify-content:flex-end;padding:var(--basalt-space-2-5);border-top:var(--basalt-size-hairline) solid var(--basalt-border-divider)}.notifications-empty{margin:0;padding:var(--basalt-space-6) var(--basalt-space-4);text-align:center;color:var(--basalt-text-secondary)}.notifications-scroll{position:relative;flex:1;min-height:0;overflow-y:auto}.notifications-list{margin:0;padding:var(--basalt-space-1-5);list-style:none}.notification{--_inset: var(--basalt-space-0-5);box-sizing:border-box;position:relative;isolation:isolate;display:grid;grid-template-columns:var(--basalt-size-dot) var(--basalt-size-icon-sm) minmax(0,1fr) auto;align-items:start;column-gap:var(--basalt-space-2-5);width:100%;margin:0;padding:calc(var(--basalt-space-2) + var(--_inset)) var(--basalt-space-3);border:0;border-radius:calc(var(--basalt-radius-md) + var(--_inset));background:none;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);text-align:start;text-decoration:none;cursor:pointer;user-select:none}@media(pointer:coarse){.notification{min-height:var(--basalt-size-tap-min);align-content:center}}.notification:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.notification:hover:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.notifications-scroll[data-keys] .notification:hover:before{background-color:transparent}.notification:focus-visible{outline:var(--basalt-size-focus-width) solid var(--basalt-border-focus);outline-offset:calc(var(--basalt-size-focus-offset) - var(--_inset))}.notification-dot{width:var(--basalt-size-dot);height:var(--basalt-size-dot);margin-top:calc((var(--basalt-text-base-line-height) - var(--basalt-size-dot)) / 2);border-radius:var(--basalt-radius-full)}.notification[data-unread] .notification-dot{background:var(--basalt-text-primary)}.notification-mark{display:grid;place-items:center;width:var(--basalt-size-icon-sm);height:var(--basalt-size-icon-sm);margin-top:calc((var(--basalt-text-base-line-height) - var(--basalt-size-icon-sm)) / 2)}.notification[data-status=success] .notification-mark{color:var(--basalt-status-success)}.notification[data-status=warning] .notification-mark{color:var(--basalt-status-warning)}.notification[data-status=danger] .notification-mark{color:var(--basalt-status-danger)}.notification-text{display:flex;flex-direction:column;min-width:0}.notification-title,.notification-line{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.notification[data-unread] .notification-title,.notification:hover .notification-title{color:var(--basalt-text-primary)}.notification-line{font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary)}.notification-time{margin-top:calc(var(--basalt-space-0-5) / 2);font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--basalt-text-tertiary)}.notification:hover .notification-line,.notification:hover .notification-time,.notification[data-status=pending] .notification-mark{color:var(--basalt-text-secondary)}.notification[data-current] .notification-title{color:var(--basalt-text-primary);font-weight:var(--basalt-font-weight-semibold)}.notification-head{display:flex;align-items:center;min-width:0}.notification-head>.notification-title{position:relative;flex:0 1 auto}.notification-count{flex:none;margin-inline-start:var(--basalt-space-1-5);font-variant-numeric:tabular-nums;color:var(--basalt-text-secondary)}.notification-caret{flex:none;margin-inline-start:var(--basalt-space-1);color:var(--basalt-text-secondary)}.notification[aria-expanded=true] .notification-caret{transform:rotate(180deg)}.notification-entries{margin:0;padding:0;padding-inline-start:calc(var(--basalt-size-dot) + var(--basalt-size-icon-sm) + 2 * var(--basalt-space-2-5));list-style:none}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.notifications-scroll[data-glide] .notification:before{background-color:transparent}}@media(forced-colors:active){.notifications-dot,.notification[data-unread] .notification-dot{box-sizing:border-box;border:calc(var(--basalt-size-dot) / 2) solid;background:none}.notification[data-status] .notification-mark{color:CanvasText}.notification:hover{forced-color-adjust:none;background:Highlight;color:HighlightText}.notification:hover:before{background-color:transparent}.notification-count,.notification-caret{color:CanvasText}.notification:hover :is(.notification-title,.notification-line,.notification-time,.notification-mark,.notification-count,.notification-caret){color:HighlightText}}} diff --git a/.agent/skills/basalt-html/parts/notifications.js b/.agent/skills/basalt-html/parts/notifications.js index 47f108f8..e93b4336 100644 --- a/.agent/skills/basalt-html/parts/notifications.js +++ b/.agent/skills/basalt-html/parts/notifications.js @@ -1 +1 @@ -(function(b){"use strict";var n=b._,M=0,m={success:"CheckCircle",warning:"Warning",danger:"XCircle"},C='';function A(o,L){var i=L||{};typeof o=="string"&&(o=document.querySelector(o));var r="bh-notes-"+ ++M,u=i.label||"Notifications",s=i.entries||[];o.innerHTML='

'+n.esc(u)+'

    ';var l=o.firstElementChild,a=o.lastElementChild,S=l.querySelector(".notifications-dot"),E=a.querySelector(".notifications-count"),c=a.querySelector(".notifications-mark"),q=a.querySelector(".notifications-empty"),f=a.querySelector(".notifications-scroll"),g=a.querySelector(".notifications-list"),y=a.querySelector(".notifications-foot");y.innerHTML=i.viewAllHref?'View all':'';var x=y.firstElementChild,d;function p(){a.matches(":popover-open")&&a.hidePopover()}function w(){var e=s.reduce(function(t,v){return t+(v.unread?1:0)},0);l.setAttribute("aria-label",e>0?u+", "+e+" unread":u),S.hidden=e===0,E.textContent=e+" unread",e===0?c.setAttribute("aria-disabled","true"):c.removeAttribute("aria-disabled"),q.hidden=s.length>0,f.hidden=s.length===0,g.innerHTML=s.map(function(t,v){var h=t.status||"neutral",k=t.href?"a":"button";return"
  • <"+k+(t.href?' href="'+n.esc(t.href)+'"':' type="button"')+' class="notification" data-index="'+v+'"'+(t.unread?" data-unread":"")+' data-status="'+n.esc(h)+'">'+(t.unread?'Unread: ':"")+n.esc(t.title)+""+(t.description?''+n.esc(t.description)+"":"")+'
  • "}).join("")}return g.addEventListener("click",function(e){var t=e.target.closest(".notification");t&&(i.onSelect&&i.onSelect(s[Number(t.dataset.index)]),p())}),c.addEventListener("click",function(){c.getAttribute("aria-disabled")!=="true"&&i.onMarkAllRead&&i.onMarkAllRead()}),x.addEventListener("click",function(){i.onViewAll&&i.onViewAll(),p()}),a.addEventListener("toggle",function(e){e.newState==="open"?d=n.glide(f,f.firstElementChild,{active:".notification[data-hovered]",item:".notification"}):d&&(d(),d=null)}),w(),{element:a,button:l,setEntries:function(e){s=e||[],w()},open:function(){a.showPopover({source:l})},close:p}}b.notifications=A})(window.Basalt); +(function(k){"use strict";var o=k._,S=0,w={success:"CheckCircle",warning:"Warning",danger:"XCircle",pending:"Circle"},q='',x='';function T(l,H){var e=H||{};typeof l=="string"&&(l=document.querySelector(l));var d="bh-notes-"+ ++S,h=e.label||"Notifications",c=e.entries||[];l.innerHTML='

    '+o.esc(h)+'

      ';var u=l.firstElementChild,a=l.lastElementChild,j=u.querySelector(".notifications-dot"),B=a.querySelector(".notifications-count"),f=a.querySelector(".notifications-mark"),N=a.querySelector(".notifications-empty"),b=a.querySelector(".notifications-scroll"),A=a.querySelector(".notifications-list"),C=a.querySelector(".notifications-foot");C.innerHTML=e.viewAllHref?'View all':'';var R=C.firstElementChild,p;function g(){a.matches(":popover-open")&&a.hidePopover()}function m(t){return!!(t.entries&&t.entries.length)}function V(t){return t.unread!=null?!!t.unread:m(t)&&t.entries.some(function(n){return n.unread})}function y(t,n,i){var r=t.status||"neutral",s=i||!t.href?"button":"a",v=V(t),L=i?t.count||t.entries.length:0,E=''+(v?'Unread: ':"")+o.esc(t.title)+(i?', '+L+" times":"")+"";return"<"+s+(s==="a"?' href="'+o.esc(t.href)+'"':' type="button"')+' class="notification" data-index="'+n+'"'+(v?" data-unread":"")+' data-status="'+o.esc(r)+'"'+(t.current?' data-current aria-current="'+(s==="a"?"page":"true")+'"':"")+(i?' data-group aria-expanded="false" aria-controls="'+i+'"':"")+'>'+(i?''+E+'"+q+"":E)+(t.description?''+o.esc(t.description)+"":"")+'"}function M(){var t=c.reduce(function(n,i){return n+(m(i)?i.entries.filter(function(r){return r.unread}).length:i.unread?1:0)},0);u.setAttribute("aria-label",t>0?h+", "+t+" unread":h),j.hidden=t===0,B.textContent=t+" unread",t===0?f.setAttribute("aria-disabled","true"):f.removeAttribute("aria-disabled"),N.hidden=c.length>0,b.hidden=c.length===0,A.innerHTML=c.map(function(n,i){if(!m(n))return"
    • "+y(n,i)+"
    • ";var r=d+"-g"+i;return"
    • "+y(n,i,r)+'
    • "}).join("")}return A.addEventListener("click",function(t){var n=t.target.closest(".notification");if(n){var i=n.dataset.index.split(".");if(n.hasAttribute("data-group")){var r=n.getAttribute("aria-expanded")!=="true";n.setAttribute("aria-expanded",String(r)),document.getElementById(n.getAttribute("aria-controls")).hidden=!r;return}var s=c[Number(i[0])];e.onSelect&&e.onSelect(i.length>1?s.entries[Number(i[1])]:s),g()}}),f.addEventListener("click",function(){f.getAttribute("aria-disabled")!=="true"&&e.onMarkAllRead&&e.onMarkAllRead()}),R.addEventListener("click",function(){e.onViewAll&&e.onViewAll(),g()}),a.addEventListener("toggle",function(t){t.newState==="open"?p=o.glide(b,b.firstElementChild,{active:".notification[data-hovered]",item:".notification"}):p&&(p(),p=null)}),M(),{element:a,button:u,setEntries:function(t){c=t||[],M()},open:function(){a.showPopover({source:u})},close:g}}k.notifications=T})(window.Basalt); diff --git a/.agent/skills/basalt-html/parts/usage/notifications.md b/.agent/skills/basalt-html/parts/usage/notifications.md index dc3b8ec2..1354898b 100644 --- a/.agent/skills/basalt-html/parts/usage/notifications.md +++ b/.agent/skills/basalt-html/parts/usage/notifications.md @@ -12,7 +12,6 @@ var centre = Basalt.notifications('#bell', { ``` -- The page owns the entries, their read state and persistence; call `setEntries` after any change. Entries run newest first. An entry with `href` is a link, one without is a button. `time` is the words you write ("2m ago"); `status` is `success`, `warning` or `danger`. -- It is where a toast's `home: 'centre'` lives. Keep an entry's action reachable while it is valid. -- Put it in a bar's end, 32px. The unread count is in the button's name, never drawn. -- On touch a one-line entry is 44 tall, its line centred. +- The page owns the entries and read state; call `setEntries` after a change. Newest first; `href` makes a link, else a button. `time` is your words ("2m ago"); `status`: `success`, `warning`, `danger`, `pending` (waiting; the title says it). +- A group: `entries: [...]` on an entry, its title naming who and what; the row adds "×N" (`count`) and opens to them. +- Home of a toast's `home: 'centre'`. In a bar's end, 32px; the unread count is in the button's name. diff --git a/docs/foundations.md b/docs/foundations.md index fc0df50e..674d4bc5 100644 --- a/docs/foundations.md +++ b/docs/foundations.md @@ -454,7 +454,31 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer their read state, persistence and the "View all" page; the component is presentational. **The hover glide** is navigation's, in the same plumbing: one plate follows the pointer between entries (40 or 58 tall; 44 or 58 on touch); the first key hides it and the resting hover, so only the shipped rounded control ring at +2, outside the row, shows; the next pointer move brings the plate back. - Off on touch, under reduced motion and in forced colours, where each entry paints its own. + Off on touch, under reduced motion and in forced colours, where each entry paints its own. Its US name is `NotificationCenter` + (`NotificationCenterProps`); `NotificationCentre` and `NotificationCentreProps` stay as aliases. + - **Pending** (waiting on the reader, in review, queued) is the toast's ring with nothing in it: Phosphor's Circle at 16 in the mark's + seat, the same drawing as CheckCircle and XCircle, in secondary ink and no colour, because waiting is not a warning. Badge's 6px ring is + pending's mark in a badge; in the entry's 16px seat it would sit beside the 6px unread dot as a second, hollow dot and read as a read + state, so the entry draws the ring at the size of its own marks. Like every mark it is `aria-hidden`, and the title says it in words + ("Waiting on you: approve release 4.2"). In forced colours it is `CanvasText`, as the other marks are. + - **Grouped repeats.** The app groups (an entry's `entries`, one level deep) and writes the group's title, naming who and what ("Sam, Priya + and Marcus mentioned you"); the row draws the four seats, then after the title the toast's count ("×3", `aria-hidden`, spoken ", 3 times") + and the core chevron. The title is cut first; the count and the chevron always show, and the time keeps the column every time ends on. + `count` stands for more than the entries listed. A group's row is a button with `aria-expanded`; its entries open in place under it on + the reveal's track (0fr to 1fr over `duration-slow` on `ease-out`, back at 0.75× on `ease-in`, at once under reduced motion; `inert` + while closed), indented by the dot's and the mark's seats and their gaps, so their seats sit under the group's words, and the chevron + turns. Focus stays on the row (the entries are the next tab stops) and choosing the row never leaves the center. A group left without + `unread` is unread while any of its entries is, and the unread count counts entries, not groups. Errors are never grouped, as the toast + never groups them. + - **The page form** (`NotificationList`) is the same rows in the page: the app's own notifications page ("View all" opens it), and on a + phone the tab bar's destination, because a bell does not fit a phone's header beside the page's buttons. A tab bar's cells are links to + pages, so the phone form is a page, never a sheet: the app's `TabBarItem` with `NotificationsGlyph` links to it and carries the + new-activity `dot` ("3 unread", spoken; counts are never drawn), and from 720 the app shows the bell in its header instead. It has no + popover, no title (the page's heading names the list, `aria-labelledby`), no rim and no glide: each entry paints its own plate, the + page's solid plate where it has no level. Its head band holds the count and "Mark all as read", its count lined up with the entries' + dots; `head={false}` drops it, for a list of entries in a sidebar or a page column. Paging is the app's (`ListBand` under it). + - **The current entry** (`current`, in a list of entries beside the page they open) is `aria-current` and its title at 600 from 400, the + selected rule's one of many; the title is one cut line, so nothing moves. - **Callouts** keep a neutral fill at their own level, with no tint. Status is the icon and the words, and success, warning and danger also draw the rim in their status colour, mixed in sRGB at 45% over the callout's own level (the danger Button's hairline recipe, but one solid colour on every side, in both themes). The icon takes the status @@ -1085,6 +1109,22 @@ implementation hasn't been reviewed. listbox keeps its ring on the list. A part whose text is not cut opens nothing. The open list keeps its "…" at rest. On touch the listbox has no hover, so its options wrap at rest (the name and detail wrap, the mark and the trailing word sit on the first line; the 44px floor holds) and none is cut, and the open list opens its plate on a 500ms long press: the release opens nothing, and a touch elsewhere closes it. Right to left mirrors the plate's edges and seats, and in forced colours it is `Canvas` with a `CanvasText` rim. +- **Search in a page or a panel, with results from a server** (`SearchField`, `SearchPassages`, `SearchPassage`, `SearchMatch`, `markMatches`). A search + over one place (a document, a channel's history, a project's records) that runs on the app's server and returns passages, drawn in the page or a + panel, never the site search dialog (whose results are a fixed-height area of picture rows). `SearchField` is an `Input` in a `role="search"` form + with the core search glyph 10px inside its start in tertiary, and while there are words a 24px clear button (the core ×, "Clear search") 4px inside + its end; both seats are padding, kept whether the button shows or not, so the words never move, and the browser's own × is hidden. The first Esc + empties the words and goes no further; the next is the app's (`onEscape`: it closes its search). The count line is the app's `FilterResult` (drawn at once in + tertiary, spoken once it holds still). `SearchPassages` is an ordered list in the server's ranking that keeps `space-1-5` from its edges; a `SearchPassage` + is a link (`href`) or a button with the notification entry's row geometry (a plate inset 2px, radius 8, 12px to the words, the control ring at +2): + a head line of the source (who said it, or the section it is in) in primary at 400, cut, and the meta at its end (`text-sm`, tertiary, tabular, + lifting to secondary on the plate), then the passage in secondary at `text-base`, wrapping (its length is the server's). A **match** is a `mark` in + primary ink at 600 with no fill: monochrome, so the ink and the weight are the mark, never a highlighter colour; in forced colours it keeps its + weight in `CanvasText`. `markMatches(text, ranges)` draws a server's ranges (UTF-16 offsets, joined where they overlap or touch, clamped, in any + order) and never parses HTML. `current` is the passage shown beside the results: `aria-current` and the source at 600. **Loading:** the first + results are a `LoadingShape` of stand-in passages (bones in the list's own shape); a changed query keeps the last results on screen + (`refreshing`) and shows `Refreshing` ("Searching") only after a second; no results is the app's sentence in the list's place. React's alone (the + HTML skill has no search over a server). - **The notice bar** is a full-width band above the header, in the level-1 fill with a `border-divider` under it (no majority, the first option stands), `text-sm` secondary with its first words primary at 600; it is a named region, not a live region, and under 720 it keeps 6px more above its line. @@ -2177,7 +2217,7 @@ as if it were known, which Basalt can't detect. ## What the HTML skill does not draw -The log slots, the status bar, the command block, the event log, the source stamp, the inline-label rows, the filter toolbar, the notice bar, the listbox, the open list, the drawer and `Reflow` are React's alone: the HTML skill has no module for them (DECISIONS 167, Q8). So are `Pagination` and `ListBand` (DECISIONS 222: the skill has no pagination module and none is added). The skill's modules draw the rest (DECISIONS 230, the owner approved the caps): `select` has `data-numeric` (the width of its widest option, measured once fonts are ready; cap 9,000), `filter` has a toolbar trigger that holds its widest value (cap 17,450), and the form dialog is a module of its own, `dialog-form` (`data-form`: the 480 box, the held head and foot, the scrolling body, full screen under 720, the top held as it opens and first focus by the input that opened it; cap 2,200), so the plain and alert dialog keep `dialog`'s 5,150. React's alone: `FormGrid` and the rest of Declare's gaps (DECISIONS 242: the form grid, a segmented control's `fullWidth`, `required`, `invalid` and its tab stop on the chosen value, a `Switch` description, `TextButton` keeping focus and underlining a `Reserve`), the held top's re-measure on a window resize, and the scrim closing a form only while nothing has been entered (the skill's scrim closes it). React's alone too: `LoadingShape` and its parts (DECISIONS 258; the skill's loading shape is a follow-up batch). Whether the skill gets the links and the charts is not decided. +The log slots, the status bar, the command block, the event log, the source stamp, the inline-label rows, the filter toolbar, the notice bar, the listbox, the open list, the drawer and `Reflow` are React's alone: the HTML skill has no module for them (DECISIONS 167, Q8). So are `Pagination` and `ListBand` (DECISIONS 222: the skill has no pagination module and none is added). The skill's modules draw the rest (DECISIONS 230, the owner approved the caps): `select` has `data-numeric` (the width of its widest option, measured once fonts are ready; cap 9,000), `filter` has a toolbar trigger that holds its widest value (cap 17,450), and the form dialog is a module of its own, `dialog-form` (`data-form`: the 480 box, the held head and foot, the scrolling body, full screen under 720, the top held as it opens and first focus by the input that opened it; cap 2,200), so the plain and alert dialog keep `dialog`'s 5,150. React's alone: `FormGrid` and the rest of Declare's gaps (DECISIONS 242: the form grid, a segmented control's `fullWidth`, `required`, `invalid` and its tab stop on the chosen value, a `Switch` description, `TextButton` keeping focus and underlining a `Reserve`), the held top's re-measure on a window resize, and the scrim closing a form only while nothing has been entered (the skill's scrim closes it). React's alone too: `LoadingShape` and its parts (DECISIONS 258; the skill's loading shape is a follow-up batch). React's alone as well: `NotificationList` (the center's page form), a group's reveal track (the skill's group opens at once), and the search over a server (`SearchField`, `SearchPassages`, `SearchPassage`, `markMatches`); the skill's `notifications` module draws the pending ring and groups (cimip-gaps-2, B7). Whether the skill gets the links and the charts is not decided. ## Logs, status and forms diff --git a/packages/react/README.md b/packages/react/README.md index d970aa47..4353fb8d 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -103,10 +103,12 @@ only where `prefers-reduced-transparency` is evaluated (Chromium 118 and later); | `RadioGroup`, `Radio` | A few options, all visible; arrow keys move the choice. | | `Select` | `options` of `{ value, label, disabled? }`; labelled by its `Field`. `numeric` makes a Select of numbers (a page size) as wide as its widest option, below `size-select-min`, whatever is chosen. | | `ToastProvider`, `useToast` | `useToast().show({ title, description?, status?, action?, home?, group?, running? })`, then `update(id, patch)`, `close(id)` or `promise(work, { running, success, error })`. A toast stays until dismissed unless it names a `home` for what it says (`"centre"`, `"row"`, `"key"` or `"page"`; an action needs one that is not the page), and then it closes after 5s. Level 1, three deep, danger announced assertively. A toast with an `action` is announced with one more sentence: "Undo is available. Press F6 to reach it." (F6 moves to the stack's named region, where the action is a stop.) Pass `actionWords={(label) => string}` to `ToastProvider` to say it in another language or other words; a toast with no action says nothing extra. Nothing extra is drawn, and it is said once. | -| `NotificationCentre` | The durable copy a toast points to: a bell button with a dot (count in its name) opening a popover of `entries` (`{ id, title, description?, time, status?, unread?, href? }`), "Mark all as read" and "View all". Presentational: you own the entries, their read state and the page. | +| `NotificationCenter` (alias `NotificationCentre`) | The durable copy a toast points to: a bell button with a dot (count in its name) opening a popover of `entries` (`{ id, title, description?, time, dateTime?, status?, unread?, href?, current?, entries?, count? }`), "Mark all as read" and "View all". `status` is `success`, `warning`, `danger` or `pending` (waiting: the empty ring, no colour). An entry with `entries` is a group: its row shows the title, "×N" (`count`, default `entries.length`) and a chevron, and opens in place to them. Presentational: you own the entries, the grouping, their read state and the page. | +| `NotificationList` | The center's entries in the page: your notifications page (what "View all" opens) and, on a phone, the tab bar's destination (`TabBarItem` with `NotificationsGlyph` and its `dot`). A head band with the count and "Mark all as read" (`head={false}` drops it, for a list in a sidebar), the list named by `label` or `aria-labelledby`, `empty`. No popover, title, rim or glide. `current` on an entry is `aria-current` and its title at 600. | | `CommandMenu` | ⌘K: `groups` of `{ label, commands }`, each command `{ id, label, icon?, description?, shortcut?, keywords?, danger?, onSelect? }`; you bind the shortcut. A `description` is a second line, and is searched below the label; `danger` draws the command in the danger colour, as in `Menu`. | | `CommandList` | The same panel set in the page (no dialog): a level-1 panel whose field keeps focus, with a count in its foot. `label` names it; `detail={(command) => pane}` adds a preview beside the list (a push under 816px); `bindShortcut` gives it ⌘K. One command surface per page owns ⌘K. | | `SearchTrigger`, `SearchDialog`, `SearchResults`, `SearchResult` | Search by following links. `SearchTrigger` is a button shaped like a field (a 1px input boundary, the glyph and the word, 200 by 44) from 720 and a 44px icon button under it; it opens whatever you open. `SearchDialog` is a centred dialog: a `type="search"` field and a close button (one ×: the browser's is hidden), a count line (`count` is a string, drawn at once and spoken once) and a results area of a fixed height, a full result's, so the field and the count never move. `SearchResults` holds `SearchResult` links: each a tab stop, `media` (96 by 48 with `mediaShape="logo"`, 48 by 60 by default), a name and a `detail` line, a `trailing` value, as tall as its picture plus 6px above and below (never under 48). Enter in the field calls `onSubmit(query)`. There is no active row and no arrow-key movement. | +| `SearchField`, `SearchPassages`, `SearchPassage`, `SearchMatch`, `markMatches` | Search in a page or a panel whose results come from your server. `SearchField` (`label`, `value`, `onValueChange`, `onSubmit`, `onEscape`, `clearLabel`, `controlSize`) is an Input in a `role="search"` form with the search glyph and a clear ×; the first Esc empties it, the next calls `onEscape`. `SearchPassages` is the ordered list (name it); a `SearchPassage` is a link (`href`) or button with `source` (who or where), `meta` (when) and the passage as children, `current` for the one shown. `markMatches(text, ranges)` marks a server's `[start, end)` ranges with `SearchMatch` (primary ink at 600, no fill) and never parses HTML. Draw the first load in a `LoadingShape` of stand-in passages; keep the last results while a changed query runs (`refreshing`). | | `Listbox`, `ListboxGroup`, `ListboxOption` | One choice from a list that stays in the page: `role="listbox"` with one tab stop and `aria-activedescendant`, whose choice follows ↑ ↓ Home End. Options have a `detail` second line and a `trailing` cell; groups are named by their header. The chosen option has a chevron in its gutter and primary ink, never a heavier weight. Focus is a ring on the list's own box, 2px at +2 with radius 8 (DECISIONS 159: the owner, on a 2 to 2 deadlock in DECISIONS 157, Q2); `flush` draws it inside at −2 where the list meets a clipping edge. The rows scroll in a box inside the focused one (`.basalt-listbox-scroll`), so the corners clip nothing and a script that scrolls the list scrolls that box. | | `OpenList`, `OpenListGroup`, `OpenListRow` | Rows that open (not a listbox). The name is a button stretched over the row; one row, the cursor, holds the tab stop; ↓ ↑ `j` `k`, Home `g`, End `G` move it and Enter opens. A row has `part`, `state` and `detail` cells, aligned down the list, and says what it `opens` into. `off` leaves a row in place that a filter does not match (unavailable to every input, DECISIONS 168: disabled ink, no cells, skipped by the cursor, `aria-disabled`, no hover step, a `not-allowed` cursor, and a press does not open it); count with a `FilterResult` outside the list. `OpenListGroup` is a named `group`, not a landmark. | | `NoticeBar` | One short notice across the top of a page, above the header: a named region (`label`, not a live region), the level-1 fill with a divider under it, `title` in primary at 600. | diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index d4214b8b..9699b8a7 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -14,8 +14,8 @@ export { Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuIte export type { MenuCheckboxItemProps, MenuContentProps, MenuItemProps, MenuProps, MenuRadioGroupProps, MenuRadioItemProps, MenuRowProps, MenuSubmenuProps, MenuSubmenuTriggerProps, MenuTriggerProps } from "./menu"; export { Dialog, DialogActions, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "./dialog"; export type { DialogCloseProps, DialogContentProps, DialogProps, DialogSize, DialogTriggerProps } from "./dialog"; -export { SearchDialog, SearchResult, SearchResults, SearchTrigger } from "./search"; -export type { SearchDialogProps, SearchResultProps, SearchResultsProps, SearchTriggerProps } from "./search"; +export { markMatches, SearchDialog, SearchField, SearchMatch, SearchPassage, SearchPassages, SearchResult, SearchResults, SearchTrigger } from "./search"; +export type { MatchRange, SearchDialogProps, SearchFieldProps, SearchMatchProps, SearchPassageProps, SearchPassagesProps, SearchResultProps, SearchResultsProps, SearchTriggerProps } from "./search"; export { Drawer, DrawerSection, DrawerTrigger } from "./drawer"; export type { DrawerProps, DrawerSectionProps, DrawerTriggerProps } from "./drawer"; export { Listbox, ListboxGroup, ListboxOption } from "./listbox"; @@ -78,8 +78,8 @@ export { Checkbox, Radio, RadioGroup, Select, Switch } from "./choice"; export type { CheckboxProps, RadioGroupProps, RadioProps, SelectOption, SelectProps, SwitchProps } from "./choice"; export { ToastProvider, useToast } from "./toast"; export type { ToastAction, ToastApi, ToastHome, ToastProviderProps, ToastOptions, ToastPromiseOptions, ToastStatus, ToastUpdate } from "./toast"; -export { NotificationCentre } from "./notifications"; -export type { NotificationCentreProps, NotificationEntry } from "./notifications"; +export { NotificationCenter, NotificationCentre, NotificationList } from "./notifications"; +export type { NotificationCenterProps, NotificationCentreProps, NotificationEntry, NotificationListProps, NotificationStatus } from "./notifications"; export { CommandList, CommandMenu } from "./command"; export type { Command, CommandGroup, CommandListProps, CommandMenuProps } from "./command"; export { Sparkline } from "./sparkline"; diff --git a/packages/react/src/notifications.tsx b/packages/react/src/notifications.tsx index 09cbf275..0ca29232 100644 --- a/packages/react/src/notifications.tsx +++ b/packages/react/src/notifications.tsx @@ -1,42 +1,68 @@ import { CheckCircleIcon } from "@phosphor-icons/react/dist/csr/CheckCircle"; +import { CircleIcon } from "@phosphor-icons/react/dist/csr/Circle"; import { WarningIcon } from "@phosphor-icons/react/dist/csr/Warning"; import { XCircleIcon } from "@phosphor-icons/react/dist/csr/XCircle"; import * as React from "react"; import { Button, IconButton } from "./button"; import { Popover, PopoverContent, PopoverTitle, PopoverTrigger } from "./feedback"; +import { ChevronDownGlyph } from "./glyphs/chevron-down"; import { NotificationsGlyph } from "./glyphs/notifications"; import { Icon } from "./icon"; import { GlidePlate } from "./plate"; +import { useReveal } from "./reveal"; import type { ToastStatus } from "./toast"; import type { Align, IconComponent, OpenChangeDetails, PopupActions, Side } from "./types"; +import { join } from "./utils"; + +/** + * An entry's mark. Success, warning and danger are the toast's marks; `pending` (waiting on someone, in review, queued) is the empty ring of + * the same drawing, in secondary ink and no colour, because waiting is not a warning. Neutral draws none (its seat stays, so titles line up). + */ +export type NotificationStatus = ToastStatus | "pending"; export interface NotificationEntry { /** Stable, for the list's keys. */ id: string; - /** What happened, in one line: "Deploy finished". It is cut with an ellipsis if it is long; the whole text is still read. */ + /** What happened, in one line: "Deploy finished". It is cut with an ellipsis if it is long; the whole text is still read. A group's title names who and what ("Sam, Priya and Marcus mentioned you"); Basalt adds the count. */ title: string; - /** A secondary line: what it was about ("blacksand-api, production"). */ + /** A secondary line: what it was about ("api, production"). */ description?: string; - /** The time, as the app writes it ("2m ago", "Yesterday"). Basalt does not format dates. */ + /** The time, as the app writes it ("2m ago", "Yesterday"). Basalt does not format dates. A group's time is its newest entry's. */ time: string; /** The same moment for machines, as `