annotepage-client 2.31.0 → 2.33.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/README.md +1 -0
- package/dist/HASHES.txt +2 -0
- package/dist/annotepage.js +186 -50
- package/labels/fr.js +8 -4
- package/labels/fr.json +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,7 @@ the site.
|
|
|
64
64
|
| `data-mode` | `encrypted` (default) or `plain` |
|
|
65
65
|
| `data-path` | path prefix: which pages belong to the project. `/fr/` does not annotate `/en/`. One tool runs per page: several projects on one site means each page loads only its own tag |
|
|
66
66
|
| `data-zone` | a CSS selector list, `.article, main .content`: in annotation mode a remark can only be written on an element inside one of the matching elements, which are outlined, and a click elsewhere says so. Notes already written outside stay listed. A selector that does not parse, or matches nothing on the page, leaves nothing to annotate and says so in the console. It is guidance for reviewers, not a security boundary: the server never sees an element, and a hand-made client writes wherever it likes |
|
|
67
|
+
| `data-page` | the page this document is, written as a path: `/reviews/budget.html`. For a file that is **sent rather than served** — opened from a different directory by everyone who receives it, so each of them would otherwise be alone on a page of their own. With it, every copy shares one set of notes, and a copy declared with the path of a page that is online shares that page's. A single leading slash, no space, no `..`, 300 characters at most; anything else is refused and said. On one document only, never in a template shared by a site: it would make every page the same page |
|
|
67
68
|
| `data-domains` | origins of the project, separated by commas |
|
|
68
69
|
| `data-version` | the version really being served, as the site names it |
|
|
69
70
|
| `data-environment` | the name of the environment, written into the note as it stands |
|
package/dist/HASHES.txt
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
2.33.0 sha384-z7+ADpaUbIFjt8C2aZYeCJOAHwvqL/yRodW7VCoOly5BcFphOUygRPgqfBz1yTAY 338834 bytes
|
|
2
|
+
2.32.0 sha384-p7i+J4F2MfPvVTJ6iph3jr1gPefcV+/tKDQTzFeq1usqqpgFODKXD1gHTkt0jPU3 338834 bytes
|
|
1
3
|
2.31.0 sha384-Z6F1K1imsrF1kdOxmiDluPauBXZYUgCpQNkksyIc6Z7xVSov4D0ugF/sOOQrqJqc 331235 bytes
|
|
2
4
|
2.30.0 sha384-/pIpSIUKGK7sU+9ZGx0iUTxEY56cWBp5WzJf1XrE+bbNmq1/YQCL0rwiVbgV4z8W 315659 bytes
|
|
3
5
|
2.29.0 sha384-2N0B7fBqiLD7kE1Jg6ObeS+5JTqFZZWud4icxW2z4qn8qPr3F8CI02LNj429GId9 276739 bytes
|
package/dist/annotepage.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
2
|
annotepage -- the annotation layer, browser side.
|
|
3
3
|
|
|
4
|
-
Package version : 2.
|
|
4
|
+
Package version : 2.33.0
|
|
5
5
|
Format version : 2 (see FORMAT.md)
|
|
6
6
|
Licence : MIT
|
|
7
7
|
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
/* Injected by the build: they come from package.json and from
|
|
17
17
|
src/styles.css, so that no value is written in two places and can
|
|
18
18
|
therefore diverge. */
|
|
19
|
-
const TOOL_VERSION = "2.
|
|
19
|
+
const TOOL_VERSION = "2.33.0";
|
|
20
20
|
const FORMAT = 2;
|
|
21
|
-
const STYLES = "/* ============================================================================\n styles.css -- THE STYLES OF THE TOOL, AND OF NO OTHER ELEMENT.\n\n This sheet is INLINED into the served file by the build, then put into the\n tool's shadow root -- as a constructed sheet when the browser can do it, in\n a <style> otherwise. It was loaded by a <link> in the original tool; the\n move to a CDN under SRI brought it inside the file, so that there is only\n one digest to keep up to date. The containment itself has not changed, and\n is still twofold:\n\n - from the tool towards the site: no rule from here can reach an element\n of the host site, the browser sees to that. That is what makes the\n claim \"the layer touches nothing\" checkable rather than promised;\n - from the site towards the tool: no rule of the site can reach an\n element here. A redesign of the site's stylesheet therefore cannot\n distort the tool, nor the other way round.\n\n The \"ap-\" prefix on every class is the third safeguard: the day somebody\n loads these styles WITHOUT a shadow root -- by mistake, or to debug --\n nothing would answer a selector of the site.\n\n NO RULE TARGETS html, body, * OR ANY SELECTOR OF THE SITE. That is the one\n absolute prohibition of this file.\n\n COLOURS: the tool has its OWN palette, defined on the shadow root. It\n reads neither the site's variables nor its theme attribute: it has no\n reason to know how the site names its colours, and it must stay readable\n on a light site as on a dark one. The switch follows the system\n preference, the only information the tool has without asking anyone.\n ============================================================================ */\n\n\n:host {\n --ap-bg: #ffffff;\n --ap-bg-soft: #f4f6f8;\n --ap-bg-raised: #e9edf2;\n --ap-text: #1a1d21;\n --ap-text-soft: #5b6570;\n --ap-border: #d5dbe2;\n --ap-accent: #2f6fed;\n --ap-accent-dark: #1d55c8;\n --ap-accent-text: #ffffff;\n --ap-accent-veil: rgba(47, 111, 237, 0.14);\n --ap-alert-bg: #fdeceb;\n --ap-alert-border: #e3a9a4;\n --ap-alert-text: #8a1f16;\n /* THE TWO STATES A REMARK CAN BE IN ONCE IT IS ANSWERED, as tokens rather\n than as literals. They were literals, written once inside the card's\n state mark -- which meant the dark theme drew them at the LIGHT theme's\n ink: measured, 2.42:1 for \"resolved\" and 2.02:1 against the veil they\n sit on, where WCAG 1.4.3 asks 4.5. Below they are 4.68 and 5.23 in the\n light theme, 6.43 and 6.64 in the dark one, on the same composite.\n\n `pending` is the state that must never be mistaken for done: resolved,\n but not deployed -- the defect is still on the reader's screen. `fill`\n is the same colour asked to carry --ap-accent-text on top of it, for the\n badge on the page: 5.93:1 in light, 10.14:1 in dark. */\n --ap-done-ink: #0f7a52;\n --ap-done-veil: rgba(16, 185, 129, 0.14);\n --ap-pending-ink: #8a5a00;\n --ap-pending-veil: rgba(245, 158, 11, 0.16);\n --ap-pending-fill: #8a5a00;\n --ap-shadow: 0 6px 24px rgba(16, 24, 40, 0.18);\n --ap-radius: 10px;\n --ap-font: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\",\n Arial, sans-serif;\n}\n\n@media (prefers-color-scheme: dark) {\n :host {\n --ap-bg: #1d2126;\n --ap-bg-soft: #262b32;\n --ap-bg-raised: #323942;\n --ap-text: #e9ecf0;\n --ap-text-soft: #a4adb8;\n --ap-border: #3a424c;\n --ap-accent: #6d9bff;\n --ap-accent-dark: #8fb4ff;\n --ap-accent-text: #10151c;\n --ap-accent-veil: rgba(109, 155, 255, 0.18);\n --ap-alert-bg: #3a1f1c;\n --ap-alert-border: #7c3a33;\n --ap-alert-text: #ffb9b1;\n --ap-done-ink: #56d3a0;\n --ap-done-veil: rgba(16, 185, 129, 0.18);\n --ap-pending-ink: #f0b757;\n --ap-pending-veil: rgba(245, 158, 11, 0.16);\n --ap-pending-fill: #f0b757;\n --ap-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);\n }\n}\n\n/* ----------------------------------------------------------------------------\n The layer.\n\n It covers the viewport and receives NO click: that is what lets the page\n behave exactly as usual as long as the tool is not in annotation mode.\n Each widget re-enables clicks for itself alone.\n ---------------------------------------------------------------------------- */\n\n.ap-layer {\n position: absolute;\n inset: 0;\n pointer-events: none;\n font-family: var(--ap-font);\n font-size: 14px;\n line-height: 1.45;\n color: var(--ap-text);\n text-align: left;\n -webkit-font-smoothing: antialiased;\n}\n\n.ap-layer button,\n.ap-layer input,\n.ap-layer textarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n margin: 0;\n box-sizing: border-box;\n}\n\n/* ----------------------------------------------------------------------------\n The button: the only thing visible when the tool is at rest.\n ---------------------------------------------------------------------------- */\n\n.ap-button {\n position: fixed;\n right: 16px;\n bottom: 16px;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 9px 14px;\n border: 1px solid var(--ap-border);\n border-radius: 999px;\n background: var(--ap-bg);\n color: var(--ap-text);\n box-shadow: var(--ap-shadow);\n cursor: pointer;\n pointer-events: auto;\n opacity: 0.92;\n transition: opacity 0.15s ease, transform 0.15s ease;\n}\n\n.ap-button:hover,\n.ap-button:focus-visible {\n opacity: 1;\n transform: translateY(-1px);\n}\n\n.ap-button:focus-visible {\n outline: 2px solid var(--ap-accent);\n outline-offset: 2px;\n}\n\n.ap-button[aria-pressed=\"true\"] {\n background: var(--ap-accent);\n border-color: var(--ap-accent);\n color: var(--ap-accent-text);\n opacity: 1;\n}\n\n.ap-button-dot {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--ap-accent);\n flex: none;\n}\n\n.ap-button[aria-pressed=\"true\"] .ap-button-dot {\n background: var(--ap-accent-text);\n}\n\n.ap-button-count {\n padding: 1px 7px;\n border-radius: 999px;\n background: var(--ap-bg-raised);\n color: var(--ap-text-soft);\n font-size: 12px;\n}\n\n.ap-button[aria-pressed=\"true\"] .ap-button-count {\n background: rgba(255, 255, 255, 0.22);\n color: var(--ap-accent-text);\n}\n\n/* ----------------------------------------------------------------------------\n The pointing highlight.\n\n It is DRAWN HERE, from the coordinates of the element being pointed at.\n Nothing is put on the element itself: no class, no attribute, no style. So\n the site cannot move by a single pixel because of the pointing.\n ---------------------------------------------------------------------------- */\n\n.ap-highlight {\n position: fixed;\n border: 2px solid var(--ap-accent);\n border-radius: 3px;\n background: var(--ap-accent-veil);\n pointer-events: none;\n display: none;\n}\n\n.ap-highlight-label {\n position: fixed;\n max-width: 320px;\n padding: 4px 8px;\n border-radius: 6px;\n background: var(--ap-accent);\n color: var(--ap-accent-text);\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n display: none;\n box-shadow: var(--ap-shadow);\n}\n\n/* ----------------------------------------------------------------------------\n The zones a remark can be written in (data-zone), while annotation mode is on.\n\n DISCREET ON PURPOSE: a dashed line and no fill. The page under review is\n what the reviewer is reading, and a veil over every open area would tint\n the very colours they may be writing about. Drawn from coordinates, like\n the highlight: nothing is put on the site's element.\n ---------------------------------------------------------------------------- */\n\n.ap-zone {\n position: fixed;\n border: 1px dashed var(--ap-accent);\n border-radius: 4px;\n opacity: 0.6;\n pointer-events: none;\n box-sizing: border-box;\n}\n\n.ap-zone-notice {\n position: fixed;\n max-width: 280px;\n padding: 6px 10px;\n border: 1px solid var(--ap-border);\n border-radius: 6px;\n background: var(--ap-bg);\n color: var(--ap-text);\n font-size: 13px;\n box-shadow: var(--ap-shadow);\n pointer-events: none;\n display: none;\n}\n\n/* ----------------------------------------------------------------------------\n The markers: \"there are already notes here\".\n ---------------------------------------------------------------------------- */\n\n.ap-marker {\n position: fixed;\n min-width: 22px;\n height: 22px;\n padding: 0 6px;\n border: 2px solid var(--ap-bg);\n border-radius: 999px;\n background: var(--ap-accent);\n color: var(--ap-accent-text);\n font-size: 12px;\n font-weight: 700;\n line-height: 18px;\n text-align: center;\n cursor: pointer;\n pointer-events: auto;\n box-shadow: var(--ap-shadow);\n}\n\n/* THE STATE, IN THE BADGE ITSELF. The rule above is the OPEN state -- work to\n do -- and it stays the tool's accent, because that is what a badge on a page\n has always meant here. The other two are read against it:\n\n pending filled amber. Resolved, not deployed: the defect is still on the\n screen the reader is looking at, and it is the one state worth\n catching an eye that was not looking for it.\n done hollow, in the soft ink. History: there, countable, and not\n asking for anything.\n\n THE COLOUR IS NEVER ALONE. The count is written in the badge and the state\n is spelled out in its accessible name -- a badge that said \"still to fix\"\n by hue only would say nothing at all to a good part of its readers. */\n.ap-marker-pending {\n background: var(--ap-pending-fill);\n}\n.ap-marker-done {\n background: var(--ap-bg-soft);\n color: var(--ap-text-soft);\n font-weight: 600;\n /* The 2px border is the halo against the page and cannot be spent on the\n outline, so the outline is drawn inside. */\n box-shadow: var(--ap-shadow), inset 0 0 0 1px var(--ap-border);\n}\n\n.ap-marker:focus-visible {\n outline: 2px solid var(--ap-accent-dark);\n outline-offset: 2px;\n}\n\n/* ----------------------------------------------------------------------------\n The panel.\n ---------------------------------------------------------------------------- */\n\n.ap-panel {\n position: fixed;\n top: 12px;\n right: 12px;\n bottom: 72px;\n width: 360px;\n max-width: calc(100vw - 24px);\n display: none;\n flex-direction: column;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg);\n box-shadow: var(--ap-shadow);\n pointer-events: auto;\n overflow: hidden;\n}\n\n.ap-panel.ap-open {\n display: flex;\n}\n\n/* The other side. Two positions, right and left, and no third one: in\n annotation mode the layer takes every click, so every pixel of panel is a\n pixel of page that can no longer be pointed at. A floating panel would\n only move that loss around.\n\n \"bottom\" IS NOT REDECLARED, on purpose: the panel keeps the same 72 px of\n clearance above the floating button either way, and that clearance is the\n same on both sides because the button moves WITH it.\n\n AND THE BUTTON MOVES WITH IT, which was decided the other way first. The\n argument for leaving it was that it is the tool's only visible trace at\n rest, so an anchor that moved would stop being one. The owner's answer,\n and it is the better one: \"move left\" is asked of the TOOL, not of half of\n it. A panel on one edge and the control that opens it on the other makes\n the eye cross the whole window for one gesture, and somebody who set the\n side set it for the tool.\n\n TWO THINGS THIS RULE DEPENDS ON, both fragile:\n - it is written with ONE class, so it weighs exactly what \".ap-panel\"\n weighs;\n - it is written BEFORE the narrow block below.\n Reverse either and it wins under 560 px, where the panel is a bottom band\n spanning the width -- and a panel pinned to the left there is the full-\n height panel whose defect at 375 px is described in that block. */\n.ap-left {\n right: auto;\n left: 12px;\n}\n/* The button follows, and it is put on the LAYER and not on the panel: the\n button is not inside the panel, so the side has to be readable from a\n common ancestor. Same offset mirrored, same bottom -- only the edge\n changes. */\n.ap-layer.ap-left-side .ap-button {\n right: auto;\n left: 16px;\n}\n\n.ap-panel-header {\n display: flex;\n align-items: baseline;\n gap: 8px;\n padding: 12px 14px;\n border-bottom: 1px solid var(--ap-border);\n background: var(--ap-bg-soft);\n}\n\n.ap-panel-title {\n font-size: 15px;\n font-weight: 600;\n flex: 1 1 auto;\n}\n\n/* -- what the whole project holds ---------------------------------------\n THE FIRST LINE OF THE FOOTER, on its own row. The footer is a flex row of\n short things -- a name, two buttons -- so this takes the whole width and the\n rest wraps under it. No ground and no border of its own: it is IN the footer,\n not beside it. */\n/* The retention line, when there is one. `:empty` rather than a class the\n script has to add and remove: the element is always there, and CSS decides\n whether it takes any room -- so a server that deletes nothing costs the\n panel exactly nothing. */\n.ap-panel-keeps { margin-top: 6px; color: var(--ap-text-soft); }\n.ap-panel-keeps:empty { display: none; }\n\n.ap-panel-footer { flex-wrap: wrap; }\n\n/* WHO YOU ARE SIGNING AS, ON A LINE OF ITS OWN. `flex-basis: 100%` is the same\n device the block above uses, and for the same reason: the footer is one\n wrapping row and everything in it was being strung end to end. */\n.ap-foot-who {\n flex-basis: 100%;\n display: flex; align-items: baseline; gap: 8px;\n}\n\n/* -- the list of remarks -------------------------------------------------\n A ROW, AND EVERY ROW IS A BUTTON. Not a card with a link in it: the whole\n line is the target, which is what a list of things to open should be, and it\n is reachable with a keyboard for free.\n\n THE EXCERPT TAKES THE ROOM AND FOLDS TO ONE LINE. What a remark is about can\n be a paragraph; what a list can show is a line. The author keeps a fixed\n place at the end so the eye can run down it. */\n.ap-row {\n display: flex; align-items: baseline; gap: 8px;\n width: 100%; margin: 0 0 4px; padding: 8px 10px;\n border: 1px solid var(--ap-border); border-radius: 8px;\n background: var(--ap-bg); color: var(--ap-text);\n font: inherit; text-align: left; cursor: pointer;\n transition: border-color .15s ease, background-color .15s ease;\n}\n.ap-row:hover { background: var(--ap-bg-soft); border-color: var(--ap-accent); }\n.ap-row:focus-visible { outline: 2px solid var(--ap-accent); outline-offset: 2px; }\n.ap-row-about {\n flex: 1; min-width: 0;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n}\n.ap-row-who { flex: none; font-size: 12px; color: var(--ap-text-soft); }\n/* THE STATE, AS A DOT. Three of them, and the middle one is the one that must\n not read as done: resolved but not deployed is a defect still on screen. The\n accessible name spells all three out -- a colour is not a fact for\n everybody. */\n.ap-row-dot {\n flex: none; width: 8px; height: 8px; border-radius: 999px;\n background: var(--ap-accent); align-self: center;\n}\n.ap-row-pending .ap-row-dot { background: var(--ap-text-soft); }\n.ap-row-done .ap-row-dot { background: transparent; border: 1px solid var(--ap-border); }\n.ap-row-done .ap-row-about { color: var(--ap-text-soft); }\n@media (prefers-reduced-motion: reduce) { .ap-row { transition: none; } }\n\n/* -- a window that is not the panel --------------------------------------\n IT FLOATS OVER THE PAGE, and that is the point: the panel is a band down one\n edge, and what goes in here is not about the page beside it. Fixed rather\n than absolute -- the reader scrolls the page under it, and a window that\n scrolled away with the article would have to be chased.\n\n ABOVE THE PANEL AND BELOW NOTHING. It is opened from the panel's footer, so\n it must cover it; the tool's own layer already sits above the site.\n\n WIDTH: it is read, not filled in. 26rem is a paragraph, and min() keeps it\n inside a phone without a media query. */\n.ap-pop {\n position: fixed; z-index: 3;\n /* THE LAYER IS `pointer-events: none` so the site underneath keeps working,\n and every piece that must be reachable turns it back on. Without this\n line the window is a picture: no click on its buttons, and no drag on its\n bar -- which is exactly how it behaved when first measured. */\n pointer-events: auto;\n width: min(26rem, calc(100vw - 24px));\n max-height: calc(100vh - 24px);\n display: flex; flex-direction: column;\n border: 1px solid var(--ap-border); border-radius: 12px;\n background: var(--ap-bg); color: var(--ap-text);\n box-shadow: 0 18px 48px rgba(0, 0, 0, .22);\n overflow: hidden;\n}\n/* THE HANDLE. `touch-action: none` is what makes a finger drag the window\n instead of scrolling the page under it -- without it the browser claims the\n gesture before the first pointermove arrives. */\n.ap-pop-bar {\n display: flex; align-items: center; gap: 8px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--ap-border);\n background: var(--ap-bg-soft);\n cursor: grab; touch-action: none; user-select: none;\n}\n.ap-pop-moving .ap-pop-bar { cursor: grabbing; }\n.ap-pop-title { flex: 1; font-size: 13px; font-weight: 650; }\n/* `min-height: 0` is what makes the scroll happen INSIDE the window rather\n than the window growing past its own height: a flex item does not shrink\n below its content without it, and the end of a long remark would be behind\n the bottom edge with nothing to scroll. */\n.ap-pop-body { flex: 1 1 auto; min-height: 0; padding: 12px; overflow: auto; }\n/* The one line that says why the page stayed where it was. Drawn as the panel\n draws its own help text, not as an alert: nothing has gone wrong. */\n.ap-why {\n margin: 0 0 10px; padding: 8px 10px;\n border-radius: 8px; background: var(--ap-bg-soft);\n color: var(--ap-text-soft); font-size: 12.5px;\n}\n/* THE CORNER, AND IT IS DRAWN RATHER THAN LEFT TO THE BROWSER. `resize: both`\n would have done this in one line and does nothing under a finger on iOS; the\n window is moved with pointer events for exactly that reason, and it is\n resized with them too. Two hairlines, the shape everybody already reads as a\n grip, in the same ink as the borders around it. */\n.ap-pop-grip {\n position: absolute; right: 0; bottom: 0;\n width: 18px; height: 18px;\n cursor: nwse-resize; touch-action: none;\n background:\n linear-gradient(135deg, transparent 42%, var(--ap-border) 42%,\n var(--ap-border) 54%, transparent 54%),\n linear-gradient(135deg, transparent 66%, var(--ap-border) 66%,\n var(--ap-border) 78%, transparent 78%);\n}\n.ap-pop-sizing { user-select: none; }\n.ap-pop-sizing .ap-pop-grip { cursor: nwse-resize; }\n/* Inside a window, the block is the window: no second frame around it. */\n.ap-pop-body .ap-config { margin: 0; padding: 0; border: 0; background: none; }\n.ap-pop-body .ap-forget { margin: 0; }\n.ap-pop-body .ap-panel-stats { margin: 0; }\n.ap-pop-body .ap-stats { margin: 0; }\n/* A WINDOW HAS ROOM, SO THE FILE GETS IT. In the panel this field was two or\n four lines because the column had nothing to spare; here it can show the\n whole thing without being scrolled. */\n.ap-pop-body .ap-code { min-height: 9.5em; }\n\n/* -- the file the assistant needs ---------------------------------------\n Drawn like the other block the panel opens in its body -- a title, a\n sentence, the thing itself, two buttons -- so nothing here is a new shape to\n learn. The last line is the warning, and it is a line and not a dialog: the\n reviewer asked for this file. */\n.ap-config {\n margin: 10px 0 0; padding: 12px;\n border: 1px solid var(--ap-border); border-radius: 10px;\n background: var(--ap-bg-soft);\n}\n/* The warning is a line at the tool's own soft ink, not in an alert colour:\n the reviewer asked for this file, they are not being warned off it. There is\n no --ap-warn token and this does not invent one. */\n.ap-config .ap-warn { margin-top: 10px; }\n.ap-panel-stats {\n flex-basis: 100%;\n display: flex; flex-wrap: wrap; gap: 4px 18px;\n margin-bottom: 4px;\n}\n.ap-stat { display: inline-flex; align-items: baseline; gap: 5px; }\n/* The row says what it counts, once, and the three figures follow it. Without\n it, \"3 / 2 / 1\" beside a panel about one page reads as being about that\n page. */\n.ap-stat-label {\n flex-basis: 100%; margin-bottom: 2px;\n font-size: 11px; font-weight: 650; letter-spacing: .02em;\n text-transform: uppercase; color: var(--ap-text-soft);\n}\n.ap-stat-n { font-size: 15px; font-weight: 650; color: var(--ap-text); }\n.ap-stat-w { font-size: 12px; color: var(--ap-text-soft); }\n/* TWO BLOCKS, THIS SITE THEN THE WHOLE SERVER, and the second is absent on\n nearly every server. Each block is a label, the figures it holds, and -- when\n age takes anything here -- a second row for what it took. */\n.ap-stats { display: flex; flex-direction: column; gap: 16px; }\n.ap-stats-block { display: flex; flex-direction: column; gap: 4px; }\n.ap-stats .ap-panel-stats { margin-bottom: 0; }\n/* WHAT WAS REMOVED READS AS A FOOTNOTE TO THE ROW ABOVE, not as a second set of\n figures competing with it: same shapes, one step quieter, and indented under\n the count it belongs to. */\n.ap-stat-gone { padding-left: 10px; border-left: 2px solid var(--ap-border); }\n.ap-stat-gone .ap-stat-n { font-size: 13px; font-weight: 600; color: var(--ap-text-soft); }\n.ap-stat-since {\n font-size: 11px; font-weight: 650; letter-spacing: .02em;\n text-transform: uppercase; color: var(--ap-text-soft); align-self: baseline;\n}\n/* The date of the last sweep is context for the figures beside it, not another\n figure: soft ink, smaller, and it wraps under them rather than stretching\n the row. */\n.ap-stat-when { font-size: 12px; color: var(--ap-text-soft); align-self: baseline; }\n.ap-panel-instructions {\n padding: 10px 14px;\n border-bottom: 1px solid var(--ap-border);\n color: var(--ap-text-soft);\n font-size: 13px;\n}\n\n.ap-panel-body {\n flex: 1 1 auto;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 4px 14px 14px;\n}\n\n.ap-panel-footer {\n padding: 8px 14px;\n border-top: 1px solid var(--ap-border);\n background: var(--ap-bg-soft);\n color: var(--ap-text-soft);\n font-size: 12px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.ap-section-title {\n margin: 14px 0 6px;\n color: var(--ap-text-soft);\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n.ap-section-help {\n margin: 0 0 8px;\n color: var(--ap-text-soft);\n font-size: 12px;\n}\n\n.ap-empty {\n margin: 16px 0;\n color: var(--ap-text-soft);\n}\n\n/* ----------------------------------------------------------------------------\n THE MODE BADGE: one word, drawn in both modes, at the top of every draw.\n\n It replaced a paragraph that only the public mode ever drew. Two things\n were wrong with that: secure mode said nothing, so the panel never told a\n reviewer which of the two they were in; and a paragraph pinned to the top\n for ever is skipped after the second reading, while a single word is not.\n\n IT IS NOT A BUTTON AND MUST NOT LOOK LIKE ONE. No shadow, no pressed\n state, cursor stays default: there is nothing to press. What it does have\n is a focus ring, because it takes focus -- the description below has to be\n reachable without a pointer, and that is the only reason it is focusable.\n ---------------------------------------------------------------------------- */\n\n.ap-mode {\n /* The frame the description is positioned against. It spans the width of\n the panel body, so a description pinned to its two edges cannot spill\n sideways out of a body that scrolls -- and a scrolling body clips both\n axes, not just the one it scrolls. */\n position: relative;\n margin: 4px 0 10px;\n}\n\n.ap-mode-chip {\n display: inline-block;\n padding: 2px 9px 3px;\n border: 1px solid var(--ap-border);\n border-radius: 999px;\n background: var(--ap-bg-soft);\n color: var(--ap-text-soft);\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n cursor: default;\n}\n\n/* The public badge is the one that carries a consequence, so it is the one\n that is coloured -- in the tool's own accent, not in the alert colours: a\n public key is a choice somebody made on purpose, not an incident. Secure\n keeps the quiet frame: it is the case where nothing is being said. */\n/* The same ring as every other focusable thing in the panel. It is the only\n visual proof, for somebody arriving by Tab, that this word is where their\n focus went. */\n.ap-mode-chip:focus-visible {\n outline: 2px solid var(--ap-accent);\n outline-offset: 2px;\n}\n\n/* Plain wears the same coat as public, and for the same reason: both are a\n choice somebody made on purpose, and both carry a consequence for whoever\n is about to write. Neither is an incident, so neither takes an alert\n colour. They cannot both be true at once. */\n.ap-mode-public .ap-mode-chip,\n.ap-mode-plain .ap-mode-chip {\n border-color: var(--ap-accent);\n background: var(--ap-accent-veil);\n color: var(--ap-accent-dark);\n}\n\n/* The description. Hidden by DEFAULT and shown on demand, and hidden in a way\n that leaves it readable to a screen reader: it is the badge's\n aria-describedby target, and an accessible description is computed from the\n referenced element whether or not it is painted. It is taken out of the\n layout entirely (absolute) so that showing it moves not one pixel of the\n list underneath -- a tooltip that pushes the notes down is a tooltip that\n makes people lose their place. */\n.ap-mode-tip {\n position: absolute;\n z-index: 2;\n top: calc(100% + 6px);\n left: 0;\n right: 0;\n padding: 8px 10px;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg-raised);\n color: var(--ap-text);\n box-shadow: var(--ap-shadow);\n font-size: 12px;\n font-weight: 400;\n letter-spacing: normal;\n text-transform: none;\n line-height: 1.45;\n opacity: 0;\n visibility: hidden;\n transform: translateY(-3px);\n transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;\n pointer-events: none;\n}\n\n/* BOTH, and the keyboard one is not the afterthought: :focus-visible is what\n makes the sentence reachable by somebody who never touches a pointer. */\n.ap-mode-chip:hover ~ .ap-mode-tip,\n.ap-mode-chip:focus-visible ~ .ap-mode-tip {\n opacity: 1;\n visibility: visible;\n transform: none;\n transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ap-mode-tip {\n transform: none;\n transition: none;\n }\n .ap-mode-chip:hover ~ .ap-mode-tip,\n .ap-mode-chip:focus-visible ~ .ap-mode-tip {\n transition: none;\n }\n}\n\n/* The \"a newer client exists\" line and the \"this server speaks another\n format\" line are the same object on screen: a standing statement about what\n one is looking at, above the notes and above the failures. One rule, so\n they cannot drift apart -- and the second one joins it rather than\n inventing a colour, precisely because a protocol disagreement is a fact\n about the project, not an incident.\n\n Deliberately NOT the alert colours: neither is a failure, and an alarm that\n never goes away stops being read. */\n.ap-upgrade,\n.ap-format {\n margin: 0 0 10px;\n padding: 8px 10px;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg-soft);\n color: var(--ap-text-soft);\n font-size: 12px;\n line-height: 1.45;\n}\n\n/* ----------------------------------------------------------------------------\n A note, and its replies.\n ---------------------------------------------------------------------------- */\n\n.ap-note {\n margin: 8px 0;\n padding: 10px 12px;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg);\n}\n\n.ap-note.ap-orphan {\n background: var(--ap-bg-soft);\n}\n\n\n.ap-note-header {\n display: flex;\n align-items: baseline;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.ap-note-author {\n font-weight: 600;\n}\n\n.ap-note-date {\n color: var(--ap-text-soft);\n font-size: 12px;\n}\n\n.ap-note-target {\n margin: 4px 0 0;\n color: var(--ap-text-soft);\n font-size: 12px;\n font-style: italic;\n overflow-wrap: anywhere;\n}\n\n.ap-note-text {\n margin: 6px 0 0;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n.ap-note-actions {\n margin-top: 8px;\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.ap-replies {\n margin: 8px 0 0;\n padding-left: 10px;\n border-left: 2px solid var(--ap-border);\n}\n\n.ap-reply {\n margin: 8px 0 0;\n}\n\n/* ----------------------------------------------------------------------------\n The form, anchored near the element pointed at.\n ---------------------------------------------------------------------------- */\n\n.ap-form {\n position: fixed;\n width: 340px;\n max-width: calc(100vw - 24px);\n display: none;\n flex-direction: column;\n gap: 8px;\n padding: 14px;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg);\n box-shadow: var(--ap-shadow);\n pointer-events: auto;\n}\n\n.ap-form.ap-open {\n display: flex;\n}\n\n.ap-form-title {\n font-size: 15px;\n font-weight: 600;\n}\n\n.ap-form-target {\n color: var(--ap-text-soft);\n font-size: 12px;\n font-style: italic;\n overflow-wrap: anywhere;\n}\n\n.ap-label {\n display: block;\n margin-bottom: 3px;\n font-size: 12px;\n font-weight: 600;\n color: var(--ap-text-soft);\n}\n\n.ap-help {\n margin: 3px 0 0;\n font-size: 12px;\n color: var(--ap-text-soft);\n}\n\n.ap-field,\n.ap-area {\n width: 100%;\n padding: 8px 10px;\n border: 1px solid var(--ap-border);\n border-radius: 8px;\n background: var(--ap-bg-soft);\n color: var(--ap-text);\n}\n\n.ap-field:focus,\n.ap-area:focus {\n outline: 2px solid var(--ap-accent);\n outline-offset: 1px;\n}\n\n.ap-area {\n min-height: 92px;\n resize: vertical;\n}\n\n.ap-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.ap-counter {\n margin-left: auto;\n font-size: 12px;\n color: var(--ap-text-soft);\n}\n\n/* ----------------------------------------------------------------------------\n Buttons.\n ---------------------------------------------------------------------------- */\n\n.ap-primary,\n.ap-secondary,\n.ap-link {\n border-radius: 8px;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ap-primary {\n padding: 8px 14px;\n border: 1px solid var(--ap-accent);\n background: var(--ap-accent);\n color: var(--ap-accent-text);\n font-weight: 600;\n}\n\n.ap-primary:hover {\n background: var(--ap-accent-dark);\n border-color: var(--ap-accent-dark);\n}\n\n.ap-secondary {\n padding: 8px 14px;\n border: 1px solid var(--ap-border);\n background: var(--ap-bg);\n color: var(--ap-text);\n}\n\n.ap-secondary:hover {\n background: var(--ap-bg-raised);\n}\n\n.ap-link {\n padding: 2px 4px;\n border: 0;\n background: none;\n color: var(--ap-accent);\n text-decoration: underline;\n font-size: 13px;\n}\n\n.ap-primary:disabled,\n.ap-secondary:disabled,\n.ap-link:disabled {\n opacity: 0.6;\n cursor: default;\n}\n\n.ap-primary:focus-visible,\n.ap-secondary:focus-visible,\n.ap-link:focus-visible {\n outline: 2px solid var(--ap-accent);\n outline-offset: 2px;\n}\n\n/* ----------------------------------------------------------------------------\n The failures.\n\n They are RED, at the top of the block concerned, and carry the message the\n server returned as it stands: that is how a non-technical team learns that\n its remark is not saved, instead of believing it is.\n ---------------------------------------------------------------------------- */\n\n.ap-error {\n margin: 8px 0;\n padding: 10px 12px;\n border: 1px solid var(--ap-alert-border);\n border-radius: var(--ap-radius);\n background: var(--ap-alert-bg);\n color: var(--ap-alert-text);\n}\n\n.ap-error-title {\n font-weight: 700;\n margin-bottom: 4px;\n}\n\n.ap-error-detail {\n margin: 6px 0 0;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n font-size: 13px;\n}\n\n.ap-error .ap-link {\n color: var(--ap-alert-text);\n}\n\n/* ----------------------------------------------------------------------------\n Narrow: the panel takes the full width, and so does the form.\n ---------------------------------------------------------------------------- */\n\n/* ----------------------------------------------------------------------------\n Narrow.\n\n DEFECT OBSERVED at 375 px wide: a panel taking the full height covers the\n whole page, and no element can be pointed at any more -- every click lands\n on the panel. So it becomes a bottom band, which leaves the top half of\n the viewport free; one scrolls the page there to bring the wanted element\n into view. The form, for its part, hides the panel while typing (see\n notes.js): on a screen that size, writing and reading the list at the same\n time does not hold.\n ---------------------------------------------------------------------------- */\n\n/* On a narrow screen the panel becomes a bottom band and the form takes the\n full width.\n\n THE WIDTH CEILING IS KEPT, and it comes from a measured defect: \"left: 8;\n right: 8\" sizes the element against its CONTAINING BLOCK, which the host\n site's horizontal overflow can make wider than the visible window.\n Measured, in mobile emulation at 390 px: the site overflows to 407 px\n (with the tool and without it), and the panel came out 391 px wide\n starting at 8, that is 9 px off screen. \"100vw\" is the window, not the\n containing block: the ceiling therefore does nothing when the site does\n not overflow, and pulls the width back when it does. */\n@media (max-width: 560px) {\n .ap-panel {\n top: auto;\n right: 8px;\n left: 8px;\n bottom: 66px;\n height: 52vh;\n width: auto;\n max-width: calc(100vw - 16px);\n }\n\n /* A band spanning the width has no side, so the choice is inert here and\n the button says so by not being there. Offering a control that visibly\n does nothing is worse than offering none. The stored side is untouched:\n it is waiting for the wide screen it was chosen on. */\n .ap-side-toggle {\n display: none;\n }\n\n .ap-form {\n left: 8px;\n right: 8px;\n width: auto;\n max-width: calc(100vw - 16px);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ap-button {\n transition: none;\n }\n}\n\n/* The failure shows without opening the panel: the button's dot changes\n colour. A team that does not click must be able to see that something is\n wrong. */\n.ap-button.ap-failed .ap-button-dot {\n background: var(--ap-alert-text);\n}\n\n.ap-button.ap-failed {\n border-color: var(--ap-alert-border);\n}\n\n/* Signature reminder, in the note form.\n The name was shown at the foot of the panel only: invisible at the moment\n one writes. A user reported not knowing which name they were writing\n under. */\n.ap-form-signature {\n display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;\n margin: 0 0 .6rem; font-size: .85rem; opacity: .8;\n}\n\n/* Resolution state, said on the card.\n Two cases NOT to be confused: resolved and online, resolved but not\n deployed yet. The second keeps the defect on the reviewer's screen; hiding\n it or announcing it as fixed would cost them their trust in the tool. */\n.ap-state-mark {\n display: inline-block; margin: 0 0 .5rem;\n padding: .15rem .55rem; border-radius: 4px;\n font-size: .75rem; font-weight: 600; letter-spacing: .02em;\n}\n.ap-note.ap-resolved { opacity: .72; }\n.ap-note.ap-resolved .ap-state-mark {\n color: var(--ap-done-ink); background: var(--ap-done-veil);\n}\n.ap-note.ap-resolved-pending .ap-state-mark {\n color: var(--ap-pending-ink); background: var(--ap-pending-veil);\n}\n/* The \"it is fixed\" / \"reopen\" block, opened under the card. Same shape as\n the reply block: it is the same gesture, one answers a remark. */\n.ap-resolve,\n.ap-reply-form {\n margin-top: .6rem;\n padding-top: .6rem;\n border-top: 1px solid var(--ap-border);\n}\n\n/* The question asked before the key is dropped, at the foot of the list.\n Framed like the resolution block -- it is the same shape of gesture, one\n answers before something changes -- and set apart from the notes above it,\n because it is not about a note. */\n.ap-forget {\n margin-top: 1rem;\n padding-top: .6rem;\n border-top: 1px solid var(--ap-border);\n}\n\n.ap-forget .ap-actions {\n margin-top: .5rem;\n}\n\n.ap-history-toggle {\n display: block; width: 100%; margin: 1rem 0 .25rem;\n padding: .5rem .75rem; border: 1px dashed currentColor; border-radius: 6px;\n background: none; color: inherit; font: inherit; opacity: .7; cursor: pointer;\n}\n.ap-history-toggle:hover { opacity: 1; }\n\n\n/* ----------------------------------------------------------------------------\n Setup and pasting the salt.\n\n These are the only screens where something is copied by hand. Everything\n there is SELECTABLE and monospaced: a 43-character salt copied wrong\n cannot be recovered, and nothing helps less than a font that confuses I, l\n and 1.\n ---------------------------------------------------------------------------- */\n\n.ap-panel-wide {\n width: 560px;\n}\n\n.ap-copy {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin: 0 0 12px;\n}\n\n.ap-code {\n flex: 1 1 auto;\n width: 100%;\n padding: 8px 10px;\n border: 1px solid var(--ap-border);\n border-radius: 8px;\n background: var(--ap-bg-soft);\n color: var(--ap-text);\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\",\n monospace;\n font-size: 12.5px;\n line-height: 1.5;\n resize: vertical;\n white-space: pre;\n overflow-x: auto;\n}\n\n.ap-code:focus-visible {\n outline: 2px solid var(--ap-accent);\n outline-offset: 1px;\n}\n\n@media (max-width: 560px) {\n .ap-panel-wide {\n width: auto;\n }\n\n .ap-copy {\n flex-direction: column;\n }\n}\n";
|
|
21
|
+
const STYLES = "/* ============================================================================\n styles.css -- THE STYLES OF THE TOOL, AND OF NO OTHER ELEMENT.\n\n This sheet is INLINED into the served file by the build, then put into the\n tool's shadow root -- as a constructed sheet when the browser can do it, in\n a <style> otherwise. It was loaded by a <link> in the original tool; the\n move to a CDN under SRI brought it inside the file, so that there is only\n one digest to keep up to date. The containment itself has not changed, and\n is still twofold:\n\n - from the tool towards the site: no rule from here can reach an element\n of the host site, the browser sees to that. That is what makes the\n claim \"the layer touches nothing\" checkable rather than promised;\n - from the site towards the tool: no rule of the site can reach an\n element here. A redesign of the site's stylesheet therefore cannot\n distort the tool, nor the other way round.\n\n The \"ap-\" prefix on every class is the third safeguard: the day somebody\n loads these styles WITHOUT a shadow root -- by mistake, or to debug --\n nothing would answer a selector of the site.\n\n NO RULE TARGETS html, body, * OR ANY SELECTOR OF THE SITE. That is the one\n absolute prohibition of this file.\n\n COLOURS: the tool has its OWN palette, defined on the shadow root. It\n reads neither the site's variables nor its theme attribute: it has no\n reason to know how the site names its colours, and it must stay readable\n on a light site as on a dark one. The switch follows the system\n preference, the only information the tool has without asking anyone.\n ============================================================================ */\n\n\n:host {\n --ap-bg: #ffffff;\n --ap-bg-soft: #f4f6f8;\n --ap-bg-raised: #e9edf2;\n --ap-text: #1a1d21;\n --ap-text-soft: #5b6570;\n --ap-border: #d5dbe2;\n --ap-accent: #2f6fed;\n --ap-accent-dark: #1d55c8;\n --ap-accent-text: #ffffff;\n --ap-accent-veil: rgba(47, 111, 237, 0.14);\n --ap-alert-bg: #fdeceb;\n --ap-alert-border: #e3a9a4;\n --ap-alert-text: #8a1f16;\n /* THE TWO STATES A REMARK CAN BE IN ONCE IT IS ANSWERED, as tokens rather\n than as literals. They were literals, written once inside the card's\n state mark -- which meant the dark theme drew them at the LIGHT theme's\n ink: measured, 2.42:1 for \"resolved\" and 2.02:1 against the veil they\n sit on, where WCAG 1.4.3 asks 4.5. Below they are 4.68 and 5.23 in the\n light theme, 6.43 and 6.64 in the dark one, on the same composite.\n\n `pending` is the state that must never be mistaken for done: resolved,\n but not deployed -- the defect is still on the reader's screen. `fill`\n is the same colour asked to carry --ap-accent-text on top of it, for the\n badge on the page: 5.93:1 in light, 10.14:1 in dark. */\n --ap-done-ink: #0f7a52;\n --ap-done-veil: rgba(16, 185, 129, 0.14);\n --ap-pending-ink: #8a5a00;\n --ap-pending-veil: rgba(245, 158, 11, 0.16);\n --ap-pending-fill: #8a5a00;\n --ap-shadow: 0 6px 24px rgba(16, 24, 40, 0.18);\n --ap-radius: 10px;\n --ap-font: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\",\n Arial, sans-serif;\n}\n\n@media (prefers-color-scheme: dark) {\n :host {\n --ap-bg: #1d2126;\n --ap-bg-soft: #262b32;\n --ap-bg-raised: #323942;\n --ap-text: #e9ecf0;\n --ap-text-soft: #a4adb8;\n --ap-border: #3a424c;\n --ap-accent: #6d9bff;\n --ap-accent-dark: #8fb4ff;\n --ap-accent-text: #10151c;\n --ap-accent-veil: rgba(109, 155, 255, 0.18);\n --ap-alert-bg: #3a1f1c;\n --ap-alert-border: #7c3a33;\n --ap-alert-text: #ffb9b1;\n --ap-done-ink: #56d3a0;\n --ap-done-veil: rgba(16, 185, 129, 0.18);\n --ap-pending-ink: #f0b757;\n --ap-pending-veil: rgba(245, 158, 11, 0.16);\n --ap-pending-fill: #f0b757;\n --ap-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);\n }\n}\n\n/* ----------------------------------------------------------------------------\n The layer.\n\n It covers the viewport and receives NO click: that is what lets the page\n behave exactly as usual as long as the tool is not in annotation mode.\n Each widget re-enables clicks for itself alone.\n ---------------------------------------------------------------------------- */\n\n.ap-layer {\n position: absolute;\n inset: 0;\n pointer-events: none;\n font-family: var(--ap-font);\n font-size: 14px;\n line-height: 1.45;\n color: var(--ap-text);\n text-align: left;\n -webkit-font-smoothing: antialiased;\n}\n\n.ap-layer button,\n.ap-layer input,\n.ap-layer textarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n margin: 0;\n box-sizing: border-box;\n}\n\n/* ----------------------------------------------------------------------------\n The button: the only thing visible when the tool is at rest.\n ---------------------------------------------------------------------------- */\n\n.ap-button {\n position: fixed;\n right: 16px;\n bottom: 16px;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 9px 14px;\n border: 1px solid var(--ap-border);\n border-radius: 999px;\n background: var(--ap-bg);\n color: var(--ap-text);\n box-shadow: var(--ap-shadow);\n cursor: pointer;\n pointer-events: auto;\n opacity: 0.92;\n transition: opacity 0.15s ease, transform 0.15s ease;\n}\n\n.ap-button:hover,\n.ap-button:focus-visible {\n opacity: 1;\n transform: translateY(-1px);\n}\n\n.ap-button:focus-visible {\n outline: 2px solid var(--ap-accent);\n outline-offset: 2px;\n}\n\n.ap-button[aria-pressed=\"true\"] {\n background: var(--ap-accent);\n border-color: var(--ap-accent);\n color: var(--ap-accent-text);\n opacity: 1;\n}\n\n.ap-button-dot {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--ap-accent);\n flex: none;\n}\n\n.ap-button[aria-pressed=\"true\"] .ap-button-dot {\n background: var(--ap-accent-text);\n}\n\n.ap-button-count {\n padding: 1px 7px;\n border-radius: 999px;\n background: var(--ap-bg-raised);\n color: var(--ap-text-soft);\n font-size: 12px;\n}\n\n.ap-button[aria-pressed=\"true\"] .ap-button-count {\n background: rgba(255, 255, 255, 0.22);\n color: var(--ap-accent-text);\n}\n\n/* ----------------------------------------------------------------------------\n The pointing highlight.\n\n It is DRAWN HERE, from the coordinates of the element being pointed at.\n Nothing is put on the element itself: no class, no attribute, no style. So\n the site cannot move by a single pixel because of the pointing.\n ---------------------------------------------------------------------------- */\n\n.ap-highlight {\n position: fixed;\n border: 2px solid var(--ap-accent);\n border-radius: 3px;\n background: var(--ap-accent-veil);\n pointer-events: none;\n display: none;\n}\n\n.ap-highlight-label {\n position: fixed;\n max-width: 320px;\n padding: 4px 8px;\n border-radius: 6px;\n background: var(--ap-accent);\n color: var(--ap-accent-text);\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n pointer-events: none;\n display: none;\n box-shadow: var(--ap-shadow);\n}\n\n/* ----------------------------------------------------------------------------\n The zones a remark can be written in (data-zone), while annotation mode is on.\n\n DISCREET ON PURPOSE: a dashed line and no fill. The page under review is\n what the reviewer is reading, and a veil over every open area would tint\n the very colours they may be writing about. Drawn from coordinates, like\n the highlight: nothing is put on the site's element.\n ---------------------------------------------------------------------------- */\n\n.ap-zone {\n position: fixed;\n border: 1px dashed var(--ap-accent);\n border-radius: 4px;\n opacity: 0.6;\n pointer-events: none;\n box-sizing: border-box;\n}\n\n.ap-zone-notice {\n position: fixed;\n max-width: 280px;\n padding: 6px 10px;\n border: 1px solid var(--ap-border);\n border-radius: 6px;\n background: var(--ap-bg);\n color: var(--ap-text);\n font-size: 13px;\n box-shadow: var(--ap-shadow);\n pointer-events: none;\n display: none;\n}\n\n/* ----------------------------------------------------------------------------\n The markers: \"there are already notes here\".\n ---------------------------------------------------------------------------- */\n\n.ap-marker {\n position: fixed;\n min-width: 22px;\n height: 22px;\n padding: 0 6px;\n border: 2px solid var(--ap-bg);\n border-radius: 999px;\n background: var(--ap-accent);\n color: var(--ap-accent-text);\n font-size: 12px;\n font-weight: 700;\n line-height: 18px;\n text-align: center;\n cursor: pointer;\n pointer-events: auto;\n box-shadow: var(--ap-shadow);\n}\n\n/* THE STATE, IN THE BADGE ITSELF. The rule above is the OPEN state -- work to\n do -- and it stays the tool's accent, because that is what a badge on a page\n has always meant here. The other two are read against it:\n\n pending filled amber. Resolved, not deployed: the defect is still on the\n screen the reader is looking at, and it is the one state worth\n catching an eye that was not looking for it.\n done hollow, in the soft ink. History: there, countable, and not\n asking for anything.\n\n THE COLOUR IS NEVER ALONE. The count is written in the badge and the state\n is spelled out in its accessible name -- a badge that said \"still to fix\"\n by hue only would say nothing at all to a good part of its readers. */\n.ap-marker-pending {\n background: var(--ap-pending-fill);\n}\n.ap-marker-done {\n background: var(--ap-bg-soft);\n color: var(--ap-text-soft);\n font-weight: 600;\n /* The 2px border is the halo against the page and cannot be spent on the\n outline, so the outline is drawn inside. */\n box-shadow: var(--ap-shadow), inset 0 0 0 1px var(--ap-border);\n}\n\n.ap-marker:focus-visible {\n outline: 2px solid var(--ap-accent-dark);\n outline-offset: 2px;\n}\n\n/* ----------------------------------------------------------------------------\n The panel.\n ---------------------------------------------------------------------------- */\n\n.ap-panel {\n position: fixed;\n top: 12px;\n right: 12px;\n bottom: 72px;\n width: 360px;\n max-width: calc(100vw - 24px);\n display: none;\n flex-direction: column;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg);\n box-shadow: var(--ap-shadow);\n pointer-events: auto;\n overflow: hidden;\n}\n\n.ap-panel.ap-open {\n display: flex;\n}\n\n/* The other side. Two positions, right and left, and no third one: in\n annotation mode the layer takes every click, so every pixel of panel is a\n pixel of page that can no longer be pointed at. A floating panel would\n only move that loss around.\n\n \"bottom\" IS NOT REDECLARED, on purpose: the panel keeps the same 72 px of\n clearance above the floating button either way, and that clearance is the\n same on both sides because the button moves WITH it.\n\n AND THE BUTTON MOVES WITH IT, which was decided the other way first. The\n argument for leaving it was that it is the tool's only visible trace at\n rest, so an anchor that moved would stop being one. The owner's answer,\n and it is the better one: \"move left\" is asked of the TOOL, not of half of\n it. A panel on one edge and the control that opens it on the other makes\n the eye cross the whole window for one gesture, and somebody who set the\n side set it for the tool.\n\n TWO THINGS THIS RULE DEPENDS ON, both fragile:\n - it is written with ONE class, so it weighs exactly what \".ap-panel\"\n weighs;\n - it is written BEFORE the narrow block below.\n Reverse either and it wins under 560 px, where the panel is a bottom band\n spanning the width -- and a panel pinned to the left there is the full-\n height panel whose defect at 375 px is described in that block. */\n.ap-left {\n right: auto;\n left: 12px;\n}\n/* The button follows, and it is put on the LAYER and not on the panel: the\n button is not inside the panel, so the side has to be readable from a\n common ancestor. Same offset mirrored, same bottom -- only the edge\n changes. */\n.ap-layer.ap-left-side .ap-button {\n right: auto;\n left: 16px;\n}\n\n.ap-panel-header {\n display: flex;\n align-items: baseline;\n gap: 8px;\n padding: 12px 14px;\n border-bottom: 1px solid var(--ap-border);\n background: var(--ap-bg-soft);\n}\n\n.ap-panel-title {\n font-size: 15px;\n font-weight: 600;\n flex: 1 1 auto;\n}\n\n/* -- what the whole project holds ---------------------------------------\n THE FIRST LINE OF THE FOOTER, on its own row. The footer is a flex row of\n short things -- a name, two buttons -- so this takes the whole width and the\n rest wraps under it. No ground and no border of its own: it is IN the footer,\n not beside it. */\n/* The retention line, when there is one. `:empty` rather than a class the\n script has to add and remove: the element is always there, and CSS decides\n whether it takes any room -- so a server that deletes nothing costs the\n panel exactly nothing. */\n.ap-panel-keeps { margin-top: 6px; color: var(--ap-text-soft); }\n.ap-panel-keeps:empty { display: none; }\n\n.ap-panel-footer { flex-wrap: wrap; }\n\n/* WHO YOU ARE SIGNING AS, ON A LINE OF ITS OWN. `flex-basis: 100%` is the same\n device the block above uses, and for the same reason: the footer is one\n wrapping row and everything in it was being strung end to end. */\n.ap-foot-who {\n flex-basis: 100%;\n display: flex; align-items: baseline; gap: 8px;\n}\n\n/* -- the list of remarks -------------------------------------------------\n A ROW, AND EVERY ROW IS A BUTTON. Not a card with a link in it: the whole\n line is the target, which is what a list of things to open should be, and it\n is reachable with a keyboard for free.\n\n THE EXCERPT TAKES THE ROOM AND FOLDS TO ONE LINE. What a remark is about can\n be a paragraph; what a list can show is a line. The author keeps a fixed\n place at the end so the eye can run down it. */\n.ap-row {\n display: flex; align-items: baseline; gap: 8px;\n width: 100%; margin: 0 0 4px; padding: 8px 10px;\n border: 1px solid var(--ap-border); border-radius: 8px;\n background: var(--ap-bg); color: var(--ap-text);\n font: inherit; text-align: left; cursor: pointer;\n transition: border-color .15s ease, background-color .15s ease;\n}\n.ap-row:hover { background: var(--ap-bg-soft); border-color: var(--ap-accent); }\n.ap-row:focus-visible { outline: 2px solid var(--ap-accent); outline-offset: 2px; }\n.ap-row-about {\n flex: 1; min-width: 0;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n}\n.ap-row-who { flex: none; font-size: 12px; color: var(--ap-text-soft); }\n/* THE STATE, AS A DOT. Three of them, and the middle one is the one that must\n not read as done: resolved but not deployed is a defect still on screen. The\n accessible name spells all three out -- a colour is not a fact for\n everybody. */\n.ap-row-dot {\n flex: none; width: 8px; height: 8px; border-radius: 999px;\n background: var(--ap-accent); align-self: center;\n}\n.ap-row-pending .ap-row-dot { background: var(--ap-text-soft); }\n.ap-row-done .ap-row-dot { background: transparent; border: 1px solid var(--ap-border); }\n.ap-row-done .ap-row-about { color: var(--ap-text-soft); }\n@media (prefers-reduced-motion: reduce) { .ap-row { transition: none; } }\n\n/* -- a window that is not the panel --------------------------------------\n IT FLOATS OVER THE PAGE, and that is the point: the panel is a band down one\n edge, and what goes in here is not about the page beside it. Fixed rather\n than absolute -- the reader scrolls the page under it, and a window that\n scrolled away with the article would have to be chased.\n\n ABOVE THE PANEL AND BELOW NOTHING. It is opened from the panel's footer, so\n it must cover it; the tool's own layer already sits above the site.\n\n WIDTH: it is read, not filled in. 26rem is a paragraph, and min() keeps it\n inside a phone without a media query. */\n.ap-pop {\n position: fixed; z-index: 3;\n /* THE LAYER IS `pointer-events: none` so the site underneath keeps working,\n and every piece that must be reachable turns it back on. Without this\n line the window is a picture: no click on its buttons, and no drag on its\n bar -- which is exactly how it behaved when first measured. */\n pointer-events: auto;\n width: min(26rem, calc(100vw - 24px));\n max-height: calc(100vh - 24px);\n display: flex; flex-direction: column;\n border: 1px solid var(--ap-border); border-radius: 12px;\n background: var(--ap-bg); color: var(--ap-text);\n box-shadow: 0 18px 48px rgba(0, 0, 0, .22);\n overflow: hidden;\n}\n/* THE HANDLE. `touch-action: none` is what makes a finger drag the window\n instead of scrolling the page under it -- without it the browser claims the\n gesture before the first pointermove arrives. */\n.ap-pop-bar {\n display: flex; align-items: center; gap: 8px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--ap-border);\n background: var(--ap-bg-soft);\n cursor: grab; touch-action: none; user-select: none;\n}\n.ap-pop-moving .ap-pop-bar { cursor: grabbing; }\n.ap-pop-title { flex: 1; font-size: 13px; font-weight: 650; }\n/* `min-height: 0` is what makes the scroll happen INSIDE the window rather\n than the window growing past its own height: a flex item does not shrink\n below its content without it, and the end of a long remark would be behind\n the bottom edge with nothing to scroll. */\n.ap-pop-body { flex: 1 1 auto; min-height: 0; padding: 12px; overflow: auto; }\n/* The one line that says why the page stayed where it was. Drawn as the panel\n draws its own help text, not as an alert: nothing has gone wrong. */\n.ap-why {\n margin: 0 0 10px; padding: 8px 10px;\n border-radius: 8px; background: var(--ap-bg-soft);\n color: var(--ap-text-soft); font-size: 12.5px;\n}\n/* THE CORNER, AND IT IS DRAWN RATHER THAN LEFT TO THE BROWSER. `resize: both`\n would have done this in one line and does nothing under a finger on iOS; the\n window is moved with pointer events for exactly that reason, and it is\n resized with them too. Two hairlines, the shape everybody already reads as a\n grip, in the same ink as the borders around it. */\n.ap-pop-grip {\n position: absolute; right: 0; bottom: 0;\n width: 18px; height: 18px;\n cursor: nwse-resize; touch-action: none;\n background:\n linear-gradient(135deg, transparent 42%, var(--ap-border) 42%,\n var(--ap-border) 54%, transparent 54%),\n linear-gradient(135deg, transparent 66%, var(--ap-border) 66%,\n var(--ap-border) 78%, transparent 78%);\n}\n.ap-pop-sizing { user-select: none; }\n.ap-pop-sizing .ap-pop-grip { cursor: nwse-resize; }\n/* Inside a window, the block is the window: no second frame around it. */\n.ap-pop-body .ap-config { margin: 0; padding: 0; border: 0; background: none; }\n.ap-pop-body .ap-forget { margin: 0; }\n.ap-pop-body .ap-panel-stats { margin: 0; }\n.ap-pop-body .ap-stats { margin: 0; }\n/* A WINDOW HAS ROOM, SO THE FILE GETS IT. In the panel this field was two or\n four lines because the column had nothing to spare; here it can show the\n whole thing without being scrolled. */\n.ap-pop-body .ap-code { min-height: 9.5em; }\n\n/* -- the file the assistant needs ---------------------------------------\n Drawn like the other block the panel opens in its body -- a title, a\n sentence, the thing itself, two buttons -- so nothing here is a new shape to\n learn. The last line is the warning, and it is a line and not a dialog: the\n reviewer asked for this file. */\n.ap-config {\n margin: 10px 0 0; padding: 12px;\n border: 1px solid var(--ap-border); border-radius: 10px;\n background: var(--ap-bg-soft);\n}\n/* The warning is a line at the tool's own soft ink, not in an alert colour:\n the reviewer asked for this file, they are not being warned off it. There is\n no --ap-warn token and this does not invent one. */\n.ap-config .ap-warn { margin-top: 10px; }\n.ap-panel-stats {\n flex-basis: 100%;\n display: flex; flex-wrap: wrap; gap: 4px 18px;\n margin-bottom: 4px;\n}\n.ap-stat { display: inline-flex; align-items: baseline; gap: 5px; }\n/* The row says what it counts, once, and the three figures follow it. Without\n it, \"3 / 2 / 1\" beside a panel about one page reads as being about that\n page. */\n.ap-stat-label {\n flex-basis: 100%; margin-bottom: 2px;\n font-size: 11px; font-weight: 650; letter-spacing: .02em;\n text-transform: uppercase; color: var(--ap-text-soft);\n}\n.ap-stat-n { font-size: 15px; font-weight: 650; color: var(--ap-text); }\n.ap-stat-w { font-size: 12px; color: var(--ap-text-soft); }\n/* UP TO THREE BLOCKS: this site, the server, every server. Each is a label and\n the figures it holds, and the figures are the same size in all three. */\n.ap-stats { display: flex; flex-direction: column; gap: 14px; }\n.ap-stats-block { display: flex; flex-direction: column; gap: 4px; }\n.ap-stats .ap-panel-stats { margin-bottom: 0; }\n/* What follows a label on its line -- \"updated daily\" -- is about the label,\n not part of it: lower case, lighter, after a dot. */\n.ap-stat-aside { font-weight: 400; letter-spacing: 0; text-transform: none; }\n.ap-stat-aside::before { content: \"\\00b7\"; margin: 0 6px; }\n/* THE LAST BLOCK IS NOT THIS SERVER'S. A soft ground sets it apart from the\n two above it, which are; nothing about it is larger. */\n.ap-stats-world {\n margin: 0 -8px; padding: 8px;\n background: var(--ap-bg-soft); border-radius: 8px;\n}\n.ap-panel-instructions {\n padding: 10px 14px;\n border-bottom: 1px solid var(--ap-border);\n color: var(--ap-text-soft);\n font-size: 13px;\n}\n\n.ap-panel-body {\n flex: 1 1 auto;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 4px 14px 14px;\n}\n\n.ap-panel-footer {\n padding: 8px 14px;\n border-top: 1px solid var(--ap-border);\n background: var(--ap-bg-soft);\n color: var(--ap-text-soft);\n font-size: 12px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.ap-section-title {\n margin: 14px 0 6px;\n color: var(--ap-text-soft);\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n.ap-section-help {\n margin: 0 0 8px;\n color: var(--ap-text-soft);\n font-size: 12px;\n}\n\n.ap-empty {\n margin: 16px 0;\n color: var(--ap-text-soft);\n}\n\n/* ----------------------------------------------------------------------------\n THE MODE BADGE: one word, drawn in both modes, at the top of every draw.\n\n It replaced a paragraph that only the public mode ever drew. Two things\n were wrong with that: secure mode said nothing, so the panel never told a\n reviewer which of the two they were in; and a paragraph pinned to the top\n for ever is skipped after the second reading, while a single word is not.\n\n IT IS NOT A BUTTON AND MUST NOT LOOK LIKE ONE. No shadow, no pressed\n state, cursor stays default: there is nothing to press. What it does have\n is a focus ring, because it takes focus -- the description below has to be\n reachable without a pointer, and that is the only reason it is focusable.\n ---------------------------------------------------------------------------- */\n\n.ap-mode {\n /* The frame the description is positioned against. It spans the width of\n the panel body, so a description pinned to its two edges cannot spill\n sideways out of a body that scrolls -- and a scrolling body clips both\n axes, not just the one it scrolls. */\n position: relative;\n margin: 4px 0 10px;\n}\n\n.ap-mode-chip {\n display: inline-block;\n padding: 2px 9px 3px;\n border: 1px solid var(--ap-border);\n border-radius: 999px;\n background: var(--ap-bg-soft);\n color: var(--ap-text-soft);\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n cursor: default;\n}\n\n/* The public badge is the one that carries a consequence, so it is the one\n that is coloured -- in the tool's own accent, not in the alert colours: a\n public key is a choice somebody made on purpose, not an incident. Secure\n keeps the quiet frame: it is the case where nothing is being said. */\n/* The same ring as every other focusable thing in the panel. It is the only\n visual proof, for somebody arriving by Tab, that this word is where their\n focus went. */\n.ap-mode-chip:focus-visible {\n outline: 2px solid var(--ap-accent);\n outline-offset: 2px;\n}\n\n/* Plain wears the same coat as public, and for the same reason: both are a\n choice somebody made on purpose, and both carry a consequence for whoever\n is about to write. Neither is an incident, so neither takes an alert\n colour. They cannot both be true at once. */\n.ap-mode-public .ap-mode-chip,\n.ap-mode-plain .ap-mode-chip {\n border-color: var(--ap-accent);\n background: var(--ap-accent-veil);\n color: var(--ap-accent-dark);\n}\n\n/* The description. Hidden by DEFAULT and shown on demand, and hidden in a way\n that leaves it readable to a screen reader: it is the badge's\n aria-describedby target, and an accessible description is computed from the\n referenced element whether or not it is painted. It is taken out of the\n layout entirely (absolute) so that showing it moves not one pixel of the\n list underneath -- a tooltip that pushes the notes down is a tooltip that\n makes people lose their place. */\n.ap-mode-tip {\n position: absolute;\n z-index: 2;\n top: calc(100% + 6px);\n left: 0;\n right: 0;\n padding: 8px 10px;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg-raised);\n color: var(--ap-text);\n box-shadow: var(--ap-shadow);\n font-size: 12px;\n font-weight: 400;\n letter-spacing: normal;\n text-transform: none;\n line-height: 1.45;\n opacity: 0;\n visibility: hidden;\n transform: translateY(-3px);\n transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;\n pointer-events: none;\n}\n\n/* BOTH, and the keyboard one is not the afterthought: :focus-visible is what\n makes the sentence reachable by somebody who never touches a pointer. */\n.ap-mode-chip:hover ~ .ap-mode-tip,\n.ap-mode-chip:focus-visible ~ .ap-mode-tip {\n opacity: 1;\n visibility: visible;\n transform: none;\n transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ap-mode-tip {\n transform: none;\n transition: none;\n }\n .ap-mode-chip:hover ~ .ap-mode-tip,\n .ap-mode-chip:focus-visible ~ .ap-mode-tip {\n transition: none;\n }\n}\n\n/* The \"a newer client exists\" line and the \"this server speaks another\n format\" line are the same object on screen: a standing statement about what\n one is looking at, above the notes and above the failures. One rule, so\n they cannot drift apart -- and the second one joins it rather than\n inventing a colour, precisely because a protocol disagreement is a fact\n about the project, not an incident.\n\n Deliberately NOT the alert colours: neither is a failure, and an alarm that\n never goes away stops being read. */\n.ap-upgrade,\n.ap-format {\n margin: 0 0 10px;\n padding: 8px 10px;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg-soft);\n color: var(--ap-text-soft);\n font-size: 12px;\n line-height: 1.45;\n}\n\n/* ----------------------------------------------------------------------------\n A note, and its replies.\n ---------------------------------------------------------------------------- */\n\n.ap-note {\n margin: 8px 0;\n padding: 10px 12px;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg);\n}\n\n.ap-note.ap-orphan {\n background: var(--ap-bg-soft);\n}\n\n\n.ap-note-header {\n display: flex;\n align-items: baseline;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.ap-note-author {\n font-weight: 600;\n}\n\n.ap-note-date {\n color: var(--ap-text-soft);\n font-size: 12px;\n}\n\n.ap-note-target {\n margin: 4px 0 0;\n color: var(--ap-text-soft);\n font-size: 12px;\n font-style: italic;\n overflow-wrap: anywhere;\n}\n\n.ap-note-text {\n margin: 6px 0 0;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n.ap-note-actions {\n margin-top: 8px;\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.ap-replies {\n margin: 8px 0 0;\n padding-left: 10px;\n border-left: 2px solid var(--ap-border);\n}\n\n.ap-reply {\n margin: 8px 0 0;\n}\n\n/* ----------------------------------------------------------------------------\n The form, anchored near the element pointed at.\n ---------------------------------------------------------------------------- */\n\n.ap-form {\n position: fixed;\n width: 340px;\n max-width: calc(100vw - 24px);\n display: none;\n flex-direction: column;\n gap: 8px;\n padding: 14px;\n border: 1px solid var(--ap-border);\n border-radius: var(--ap-radius);\n background: var(--ap-bg);\n box-shadow: var(--ap-shadow);\n pointer-events: auto;\n}\n\n.ap-form.ap-open {\n display: flex;\n}\n\n.ap-form-title {\n font-size: 15px;\n font-weight: 600;\n}\n\n.ap-form-target {\n color: var(--ap-text-soft);\n font-size: 12px;\n font-style: italic;\n overflow-wrap: anywhere;\n}\n\n.ap-label {\n display: block;\n margin-bottom: 3px;\n font-size: 12px;\n font-weight: 600;\n color: var(--ap-text-soft);\n}\n\n.ap-help {\n margin: 3px 0 0;\n font-size: 12px;\n color: var(--ap-text-soft);\n}\n\n.ap-field,\n.ap-area {\n width: 100%;\n padding: 8px 10px;\n border: 1px solid var(--ap-border);\n border-radius: 8px;\n background: var(--ap-bg-soft);\n color: var(--ap-text);\n}\n\n.ap-field:focus,\n.ap-area:focus {\n outline: 2px solid var(--ap-accent);\n outline-offset: 1px;\n}\n\n.ap-area {\n min-height: 92px;\n resize: vertical;\n}\n\n.ap-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.ap-counter {\n margin-left: auto;\n font-size: 12px;\n color: var(--ap-text-soft);\n}\n\n/* ----------------------------------------------------------------------------\n Buttons.\n ---------------------------------------------------------------------------- */\n\n.ap-primary,\n.ap-secondary,\n.ap-link {\n border-radius: 8px;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ap-primary {\n padding: 8px 14px;\n border: 1px solid var(--ap-accent);\n background: var(--ap-accent);\n color: var(--ap-accent-text);\n font-weight: 600;\n}\n\n.ap-primary:hover {\n background: var(--ap-accent-dark);\n border-color: var(--ap-accent-dark);\n}\n\n.ap-secondary {\n padding: 8px 14px;\n border: 1px solid var(--ap-border);\n background: var(--ap-bg);\n color: var(--ap-text);\n}\n\n.ap-secondary:hover {\n background: var(--ap-bg-raised);\n}\n\n.ap-link {\n padding: 2px 4px;\n border: 0;\n background: none;\n color: var(--ap-accent);\n text-decoration: underline;\n font-size: 13px;\n}\n\n.ap-primary:disabled,\n.ap-secondary:disabled,\n.ap-link:disabled {\n opacity: 0.6;\n cursor: default;\n}\n\n.ap-primary:focus-visible,\n.ap-secondary:focus-visible,\n.ap-link:focus-visible {\n outline: 2px solid var(--ap-accent);\n outline-offset: 2px;\n}\n\n/* ----------------------------------------------------------------------------\n The failures.\n\n They are RED, at the top of the block concerned, and carry the message the\n server returned as it stands: that is how a non-technical team learns that\n its remark is not saved, instead of believing it is.\n ---------------------------------------------------------------------------- */\n\n.ap-error {\n margin: 8px 0;\n padding: 10px 12px;\n border: 1px solid var(--ap-alert-border);\n border-radius: var(--ap-radius);\n background: var(--ap-alert-bg);\n color: var(--ap-alert-text);\n}\n\n.ap-error-title {\n font-weight: 700;\n margin-bottom: 4px;\n}\n\n.ap-error-detail {\n margin: 6px 0 0;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n font-size: 13px;\n}\n\n.ap-error .ap-link {\n color: var(--ap-alert-text);\n}\n\n/* ----------------------------------------------------------------------------\n Narrow: the panel takes the full width, and so does the form.\n ---------------------------------------------------------------------------- */\n\n/* ----------------------------------------------------------------------------\n Narrow.\n\n DEFECT OBSERVED at 375 px wide: a panel taking the full height covers the\n whole page, and no element can be pointed at any more -- every click lands\n on the panel. So it becomes a bottom band, which leaves the top half of\n the viewport free; one scrolls the page there to bring the wanted element\n into view. The form, for its part, hides the panel while typing (see\n notes.js): on a screen that size, writing and reading the list at the same\n time does not hold.\n ---------------------------------------------------------------------------- */\n\n/* On a narrow screen the panel becomes a bottom band and the form takes the\n full width.\n\n THE WIDTH CEILING IS KEPT, and it comes from a measured defect: \"left: 8;\n right: 8\" sizes the element against its CONTAINING BLOCK, which the host\n site's horizontal overflow can make wider than the visible window.\n Measured, in mobile emulation at 390 px: the site overflows to 407 px\n (with the tool and without it), and the panel came out 391 px wide\n starting at 8, that is 9 px off screen. \"100vw\" is the window, not the\n containing block: the ceiling therefore does nothing when the site does\n not overflow, and pulls the width back when it does. */\n@media (max-width: 560px) {\n .ap-panel {\n top: auto;\n right: 8px;\n left: 8px;\n bottom: 66px;\n height: 52vh;\n width: auto;\n max-width: calc(100vw - 16px);\n }\n\n /* A band spanning the width has no side, so the choice is inert here and\n the button says so by not being there. Offering a control that visibly\n does nothing is worse than offering none. The stored side is untouched:\n it is waiting for the wide screen it was chosen on. */\n .ap-side-toggle {\n display: none;\n }\n\n .ap-form {\n left: 8px;\n right: 8px;\n width: auto;\n max-width: calc(100vw - 16px);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ap-button {\n transition: none;\n }\n}\n\n/* The failure shows without opening the panel: the button's dot changes\n colour. A team that does not click must be able to see that something is\n wrong. */\n.ap-button.ap-failed .ap-button-dot {\n background: var(--ap-alert-text);\n}\n\n.ap-button.ap-failed {\n border-color: var(--ap-alert-border);\n}\n\n/* Signature reminder, in the note form.\n The name was shown at the foot of the panel only: invisible at the moment\n one writes. A user reported not knowing which name they were writing\n under. */\n.ap-form-signature {\n display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;\n margin: 0 0 .6rem; font-size: .85rem; opacity: .8;\n}\n\n/* Resolution state, said on the card.\n Two cases NOT to be confused: resolved and online, resolved but not\n deployed yet. The second keeps the defect on the reviewer's screen; hiding\n it or announcing it as fixed would cost them their trust in the tool. */\n.ap-state-mark {\n display: inline-block; margin: 0 0 .5rem;\n padding: .15rem .55rem; border-radius: 4px;\n font-size: .75rem; font-weight: 600; letter-spacing: .02em;\n}\n.ap-note.ap-resolved { opacity: .72; }\n.ap-note.ap-resolved .ap-state-mark {\n color: var(--ap-done-ink); background: var(--ap-done-veil);\n}\n.ap-note.ap-resolved-pending .ap-state-mark {\n color: var(--ap-pending-ink); background: var(--ap-pending-veil);\n}\n/* The \"it is fixed\" / \"reopen\" block, opened under the card. Same shape as\n the reply block: it is the same gesture, one answers a remark. */\n.ap-resolve,\n.ap-reply-form {\n margin-top: .6rem;\n padding-top: .6rem;\n border-top: 1px solid var(--ap-border);\n}\n\n/* The question asked before the key is dropped, at the foot of the list.\n Framed like the resolution block -- it is the same shape of gesture, one\n answers before something changes -- and set apart from the notes above it,\n because it is not about a note. */\n.ap-forget {\n margin-top: 1rem;\n padding-top: .6rem;\n border-top: 1px solid var(--ap-border);\n}\n\n.ap-forget .ap-actions {\n margin-top: .5rem;\n}\n\n.ap-history-toggle {\n display: block; width: 100%; margin: 1rem 0 .25rem;\n padding: .5rem .75rem; border: 1px dashed currentColor; border-radius: 6px;\n background: none; color: inherit; font: inherit; opacity: .7; cursor: pointer;\n}\n.ap-history-toggle:hover { opacity: 1; }\n\n\n/* ----------------------------------------------------------------------------\n Setup and pasting the salt.\n\n These are the only screens where something is copied by hand. Everything\n there is SELECTABLE and monospaced: a 43-character salt copied wrong\n cannot be recovered, and nothing helps less than a font that confuses I, l\n and 1.\n ---------------------------------------------------------------------------- */\n\n.ap-panel-wide {\n width: 560px;\n}\n\n.ap-copy {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n margin: 0 0 12px;\n}\n\n.ap-code {\n flex: 1 1 auto;\n width: 100%;\n padding: 8px 10px;\n border: 1px solid var(--ap-border);\n border-radius: 8px;\n background: var(--ap-bg-soft);\n color: var(--ap-text);\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\",\n monospace;\n font-size: 12.5px;\n line-height: 1.5;\n resize: vertical;\n white-space: pre;\n overflow-x: auto;\n}\n\n.ap-code:focus-visible {\n outline: 2px solid var(--ap-accent);\n outline-offset: 1px;\n}\n\n@media (max-width: 560px) {\n .ap-panel-wide {\n width: auto;\n }\n\n .ap-copy {\n flex-direction: column;\n }\n}\n";
|
|
22
22
|
|
|
23
23
|
/* ==== 00-preamble.js ==== */
|
|
24
24
|
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
window.annotepageConfig is ours alone, so a name we do not know there is a
|
|
147
147
|
typo, and a typo that is ignored is a setting somebody believes they set. */
|
|
148
148
|
const SETTINGS = ['server', 'project', 'key', 'setup', 'mode', 'path',
|
|
149
|
-
'domains', 'version', 'environment', 'labels', 'zone'];
|
|
149
|
+
'domains', 'version', 'environment', 'labels', 'zone', 'page'];
|
|
150
150
|
|
|
151
151
|
/* Not "written": 60-ui already holds a local of that name, and a helper of the
|
|
152
152
|
whole file shadowed inside one function is a reader's trap for nothing. */
|
|
@@ -234,8 +234,10 @@
|
|
|
234
234
|
order, so one more setting is one more member in every identity -- the same
|
|
235
235
|
configuration written another way. Left at 1, a copy of the release before
|
|
236
236
|
still holding the document would read this one's identity as a different
|
|
237
|
-
configuration and warn about a second tool, on a page carrying one tag.
|
|
238
|
-
|
|
237
|
+
configuration and warn about a second tool, on a page carrying one tag.
|
|
238
|
+
|
|
239
|
+
3 SINCE `page` JOINED THEM, for that same reason. */
|
|
240
|
+
const IDENTITY_FORMAT = 'annotepage/identity/3';
|
|
239
241
|
const readableIdentity = (value) =>
|
|
240
242
|
typeof value === 'string' && value.indexOf('["' + IDENTITY_FORMAT + '",') === 0;
|
|
241
243
|
const REFUSED_KEPT = 8;
|
|
@@ -467,6 +469,64 @@
|
|
|
467
469
|
return;
|
|
468
470
|
}
|
|
469
471
|
|
|
472
|
+
/* THE PAGE, WHEN THE DOCUMENT NAMES ITS OWN (data-page, or `page`).
|
|
473
|
+
|
|
474
|
+
The page index is computed from the path of the address (20-crypto), and a
|
|
475
|
+
document that is not served has no address worth the name: a file sent by
|
|
476
|
+
mail is opened from wherever each person saved it, so two people holding
|
|
477
|
+
the same file under the same key are on two pages, and neither sees the
|
|
478
|
+
other's remarks. Nothing fails and nothing is said -- each of them simply
|
|
479
|
+
gets an empty page.
|
|
480
|
+
|
|
481
|
+
So such a document can SAY which page it is: a path, written the way an
|
|
482
|
+
address would carry it, and used in the place of location.pathname. The
|
|
483
|
+
derivation does not move (FORMAT.md section 4) -- what goes into it does.
|
|
484
|
+
It is a path and not a free name ON PURPOSE: everything downstream already
|
|
485
|
+
knows what a path is -- the server's own rule for `page` in plain mode, the
|
|
486
|
+
text export, the assistant, which recomputes an index from it -- and a copy
|
|
487
|
+
of a page of a site, declared with that page's path, shares its notes with
|
|
488
|
+
the page that is online.
|
|
489
|
+
|
|
490
|
+
JUDGED HERE, BY THE SERVER'S RULE (ap_field_page, input.php), because in
|
|
491
|
+
encrypted mode the server never sees it: a single leading slash, no `..`,
|
|
492
|
+
the characters a path is made of, 300 at most. NOTHING IS REPAIRED. A
|
|
493
|
+
missing slash added here would be a second spelling of one page, and the
|
|
494
|
+
next implementation would not add it.
|
|
495
|
+
|
|
496
|
+
AN EMPTY ONE IS REFUSED, like an empty key: somebody meant to fill it in,
|
|
497
|
+
and falling back on the address is the very thing they wrote it to avoid.
|
|
498
|
+
|
|
499
|
+
AND IT HAS TO SIT INSIDE THE DECLARED PREFIX when there is one. The scope
|
|
500
|
+
is checked against the page this copy is on (30-state), which is now the
|
|
501
|
+
declared one: outside the prefix the tool would stand down on every load,
|
|
502
|
+
in the silence the scope is allowed -- on a document somebody configured.
|
|
503
|
+
|
|
504
|
+
IT BELONGS TO ONE DOCUMENT, NEVER TO A SHARED TEMPLATE. On every page of a
|
|
505
|
+
site it makes them all one page. Nothing here can tell, so the
|
|
506
|
+
documentation says it. */
|
|
507
|
+
const MAX_PAGE = 300;
|
|
508
|
+
const pageProblem = (page, prefix) => {
|
|
509
|
+
if (page.length > MAX_PAGE || page.indexOf('..') !== -1
|
|
510
|
+
|| !/^\/(?!\/)[A-Za-z0-9/._~%()@+,;=:&-]*$/.test(page)) return 'shape';
|
|
511
|
+
if (prefix && page.indexOf(prefix) !== 0) return 'outside';
|
|
512
|
+
return '';
|
|
513
|
+
};
|
|
514
|
+
if (!CONFIG_FAILURE && declaredIn(config, 'page')) {
|
|
515
|
+
const problem = pageProblem(config.page, declaredIn(config, 'path') ? config.path : '');
|
|
516
|
+
if (problem === 'shape') {
|
|
517
|
+
refuse('tag.page_shape', null,
|
|
518
|
+
'the page this document declares (data-page, or "page") is not a page '
|
|
519
|
+
+ 'path. It is written like the path of an address, /reviews/budget.html: '
|
|
520
|
+
+ 'a single leading slash, no space, no "..", ' + MAX_PAGE + ' characters '
|
|
521
|
+
+ 'at most. Nothing was sent.');
|
|
522
|
+
} else if (problem === 'outside') {
|
|
523
|
+
refuse('tag.page_outside_path', null,
|
|
524
|
+
'the page this document declares (data-page, or "page") is outside the '
|
|
525
|
+
+ 'path prefix it declares as well (data-path, or "path"), so the tool '
|
|
526
|
+
+ 'would never start here. Nothing was sent. Correct one of the two.');
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
470
530
|
/* A refusal adopts NOTHING. Half a configuration would start the tool on
|
|
471
531
|
whichever half happened to be readable, which is the guess this whole file
|
|
472
532
|
exists to avoid. 90-boot shows the reason instead. */
|
|
@@ -562,6 +622,11 @@
|
|
|
562
622
|
and the key writes wherever they like. */
|
|
563
623
|
const PATH_PREFIX = read('path');
|
|
564
624
|
|
|
625
|
+
/* The page this document says it is, or '' when it says nothing and the
|
|
626
|
+
address answers (see THE PAGE, above, where it was judged). One reader:
|
|
627
|
+
pagePath() in 20-crypto, which is the only place a page comes from. */
|
|
628
|
+
const DECLARED_PAGE = read('page');
|
|
629
|
+
|
|
565
630
|
/* The project origins. The real lock is the server's (FORMAT.md section
|
|
566
631
|
6.2); this one only avoids talking to a server that is going to say no,
|
|
567
632
|
for instance when the declaration was copied onto another site along with
|
|
@@ -761,6 +826,19 @@
|
|
|
761
826
|
const pageLanguage = () =>
|
|
762
827
|
(document.documentElement.getAttribute('lang') || '').trim();
|
|
763
828
|
|
|
829
|
+
/**
|
|
830
|
+
* A count, with its thousands apart: 6204 is read digit by digit, 6,204 at a
|
|
831
|
+
* glance. Written the way the DOCUMENT's language writes it, like the dates
|
|
832
|
+
* below, and the plain digits where that language is not one the browser knows.
|
|
833
|
+
*/
|
|
834
|
+
const readableNumber = (n) => {
|
|
835
|
+
try {
|
|
836
|
+
return Number(n).toLocaleString(pageLanguage() || 'en');
|
|
837
|
+
} catch (e) {
|
|
838
|
+
return String(n);
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
|
|
764
842
|
/**
|
|
765
843
|
* ISO date from the server -> THE READER'S LOCAL TIME.
|
|
766
844
|
*
|
|
@@ -948,29 +1026,29 @@
|
|
|
948
1026
|
'config.author': 'Assistant',
|
|
949
1027
|
'config.warn': 'It carries your key. Anyone holding this file can read '
|
|
950
1028
|
+ 'these notes and write them.',
|
|
951
|
-
'panel.
|
|
1029
|
+
'panel.stats_written': 'notes written',
|
|
1030
|
+
'panel.stats_servers': 'servers',
|
|
952
1031
|
'panel.stats_open': 'still open',
|
|
953
1032
|
'panel.stats_pages': 'pages',
|
|
954
1033
|
'panel.stats_sites': 'sites',
|
|
955
1034
|
/* THE SINGULAR OF EACH, looked up when the figure is 1. A translation
|
|
956
1035
|
that writes none of these falls back on the plural above, in English,
|
|
957
1036
|
like every other missing label. */
|
|
958
|
-
'panel.
|
|
1037
|
+
'panel.stats_written_one': 'note written',
|
|
1038
|
+
'panel.stats_servers_one': 'server',
|
|
959
1039
|
'panel.stats_open_one': 'still open',
|
|
960
1040
|
'panel.stats_pages_one': 'page',
|
|
961
1041
|
'panel.stats_sites_one': 'site',
|
|
962
|
-
/* WHAT WENT, AND WHY THE WINDOW SAYS IT AT ALL. The panel already warns
|
|
963
|
-
that this server removes a thread after so many days; a reviewer who
|
|
964
|
-
comes back to a page they annotated and finds it bare deserves the
|
|
965
|
-
figure that turns a hole into a fact. "Removed by age" and not
|
|
966
|
-
"deleted": nobody chose these, which is the whole point. */
|
|
967
1042
|
'panel.stats_here_label': 'On this site',
|
|
968
|
-
'panel.stats_gone_label': 'Removed by age',
|
|
969
|
-
'panel.stats_swept': 'last sweep {d}',
|
|
970
1043
|
/* THE WHOLE SERVER, on the servers that publish it -- most do not, and
|
|
971
1044
|
then this line is never drawn. "This server" and not "the API": the
|
|
972
1045
|
reviewer is being told about the machine holding their notes. */
|
|
973
1046
|
'panel.stats_server_label': 'On this whole server',
|
|
1047
|
+
/* EVERY SERVER TOGETHER, where this one takes part in the statistics. The
|
|
1048
|
+
second label follows the first on the same line, quieter: the figures
|
|
1049
|
+
came with the server's last daily report and are as old as it is. */
|
|
1050
|
+
'panel.stats_world_label': 'On all annotepage servers',
|
|
1051
|
+
'panel.stats_daily': 'updated daily',
|
|
974
1052
|
'panel.refresh': 'Refresh',
|
|
975
1053
|
|
|
976
1054
|
/* -- Notes whose element cannot be found any more ------------------- */
|
|
@@ -1258,7 +1336,7 @@
|
|
|
1258
1336
|
/* -- A configuration that cannot be used, wherever it was written --
|
|
1259
1337
|
The settings can also be declared in window.annotepageConfig, for the
|
|
1260
1338
|
pages where a tag cannot carry them -- concatenated scripts, a module,
|
|
1261
|
-
an asset pipeline (00-preamble). These
|
|
1339
|
+
an asset pipeline (00-preamble). These say what is wrong with one,
|
|
1262
1340
|
and they never name a tag: whoever reads them may not have one. */
|
|
1263
1341
|
'tag.title_config': 'This annotepage configuration cannot be used',
|
|
1264
1342
|
'tag.two_sources':
|
|
@@ -1286,6 +1364,22 @@
|
|
|
1286
1364
|
'window.annotepageConfig on this page is not an object. It is written '
|
|
1287
1365
|
+ 'window.annotepageConfig = { server: "...", key: "..." }, before the '
|
|
1288
1366
|
+ 'client is loaded. Nothing was read from it.',
|
|
1367
|
+
/* The page a document declares for itself (data-page). Said for both
|
|
1368
|
+
sources, like the five above: the reader may hold either. */
|
|
1369
|
+
'tag.page_shape':
|
|
1370
|
+
'This document declares which page it is (data-page on the tag, or '
|
|
1371
|
+
+ 'page in window.annotepageConfig), and what it declares is not a '
|
|
1372
|
+
+ 'page path. It is written like the path of an address -- '
|
|
1373
|
+
+ '/reviews/budget.html -- with a single leading slash, no space, no '
|
|
1374
|
+
+ '".." and 300 characters at most. Nothing was sent and nothing was '
|
|
1375
|
+
+ 'decrypted: a page named wrongly is a page whose remarks nobody '
|
|
1376
|
+
+ 'else would find.',
|
|
1377
|
+
'tag.page_outside_path':
|
|
1378
|
+
'This document declares which page it is (data-page) and a path '
|
|
1379
|
+
+ 'prefix (data-path), and the page is outside the prefix: the tool '
|
|
1380
|
+
+ 'would never start here. Nothing was sent. Correct one of the two, '
|
|
1381
|
+
+ 'or remove the prefix -- a document that names its own page does '
|
|
1382
|
+
+ 'not need one.',
|
|
1289
1383
|
|
|
1290
1384
|
/* -- Setup --------------------------------------------------------- */
|
|
1291
1385
|
'setup.title': 'Install annotepage on this site',
|
|
@@ -1432,8 +1526,14 @@
|
|
|
1432
1526
|
*
|
|
1433
1527
|
* The computation happens IN BOTH MODES: one code path, one way of grouping.
|
|
1434
1528
|
* Two would have diverged by the second fix.
|
|
1529
|
+
*
|
|
1530
|
+
* A DOCUMENT THAT DECLARES ITS PAGE IS THAT PAGE, wherever it was opened from
|
|
1531
|
+
* (data-page, 00-preamble). Already judged there, so it is returned as it was
|
|
1532
|
+
* written: this is the one place a page comes from, and everything that asks
|
|
1533
|
+
* -- the index, the scope, the note, the navigation watch -- gets one answer.
|
|
1435
1534
|
*/
|
|
1436
1535
|
const pagePath = () => {
|
|
1536
|
+
if (DECLARED_PAGE) return DECLARED_PAGE;
|
|
1437
1537
|
let c = String(location.pathname || '/');
|
|
1438
1538
|
if (c.charAt(0) !== '/') c = '/' + c;
|
|
1439
1539
|
c = c.replace(/^\/+/, '/');
|
|
@@ -1570,6 +1670,10 @@
|
|
|
1570
1670
|
let serverWide = null; // { projects, notes, pages } for the WHOLE server,
|
|
1571
1671
|
// and only where its operator published them.
|
|
1572
1672
|
// Absent everywhere else, on purpose
|
|
1673
|
+
let world = null; // { servers|null, sites|null, notes } for EVERY annotepage
|
|
1674
|
+
// server together, as this one was last told.
|
|
1675
|
+
// null where the server takes no part in the
|
|
1676
|
+
// statistics, or has not reported yet
|
|
1573
1677
|
let target = null; // element being annotated
|
|
1574
1678
|
let hovered = null; // element under the pointer
|
|
1575
1679
|
let currentFailure = null; // { title, detail } shown in the panel
|
|
@@ -2243,6 +2347,23 @@
|
|
|
2243
2347
|
};
|
|
2244
2348
|
};
|
|
2245
2349
|
|
|
2350
|
+
/* WHAT EVERY ANNOTEPAGE SERVER HOLDS, TOGETHER. Three numbers this server was
|
|
2351
|
+
handed with the answer to its daily report and passes on: this page asks
|
|
2352
|
+
nobody else for them. Absent from a server that takes no part in the
|
|
2353
|
+
statistics and from one older than the field, and then null draws nothing. */
|
|
2354
|
+
const readWorld = (data) => {
|
|
2355
|
+
const w = data && data.world;
|
|
2356
|
+
if (!w || typeof w !== 'object') return null;
|
|
2357
|
+
const n = (v) => (typeof v === 'number' && isFinite(v) && v >= 0 ? Math.floor(v) : null);
|
|
2358
|
+
const notes = n(w.notes);
|
|
2359
|
+
if (notes === null) return null;
|
|
2360
|
+
/* THE COUNTS OF SERVERS AND OF SITES ARE THE SERVER'S TO GIVE OR NOT. It
|
|
2361
|
+
leaves each out while there are few -- "2 servers" beside five thousand
|
|
2362
|
+
notes reads as a small thing, and it is not one -- and then the row is
|
|
2363
|
+
the figures that are there. */
|
|
2364
|
+
return { servers: n(w.servers), sites: n(w.sites), notes: notes };
|
|
2365
|
+
};
|
|
2366
|
+
|
|
2246
2367
|
const readList = (data) => {
|
|
2247
2368
|
skipped = { newer: 0, unreadable: 0, unknown: 0 };
|
|
2248
2369
|
const raw = data && Array.isArray(data.notes) ? data.notes : [];
|
|
@@ -2691,60 +2812,64 @@
|
|
|
2691
2812
|
one, which is the rule everywhere else here. */
|
|
2692
2813
|
const figure = (n, word) => {
|
|
2693
2814
|
const box = create('span', 'ap-stat');
|
|
2694
|
-
box.appendChild(create('span', 'ap-stat-n',
|
|
2815
|
+
box.appendChild(create('span', 'ap-stat-n', readableNumber(n)));
|
|
2695
2816
|
box.appendChild(create('span', 'ap-stat-w', T(n === 1 ? word + '_one' : word)));
|
|
2696
2817
|
return box;
|
|
2697
2818
|
};
|
|
2698
2819
|
|
|
2699
|
-
/*
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
const block = (label) => {
|
|
2820
|
+
/* UP TO THREE ROWS OF ONE SHAPE: this site, the server holding it, every
|
|
2821
|
+
server there is. A label and at most three figures each, the same size
|
|
2822
|
+
in all three -- the last row is one more scope, not an advertisement.
|
|
2823
|
+
The first is always there; each of the others only where this server
|
|
2824
|
+
has it to give. */
|
|
2825
|
+
const block = (label, aside) => {
|
|
2705
2826
|
const box = create('div', 'ap-stats-block');
|
|
2706
|
-
|
|
2827
|
+
const head = create('span', 'ap-stat-label', T(label));
|
|
2828
|
+
if (aside) head.appendChild(create('span', 'ap-stat-aside', T(aside)));
|
|
2829
|
+
box.appendChild(head);
|
|
2707
2830
|
const row = create('div', 'ap-panel-stats');
|
|
2708
2831
|
box.appendChild(row);
|
|
2709
2832
|
rows.appendChild(box);
|
|
2710
2833
|
return { box: box, row: row };
|
|
2711
2834
|
};
|
|
2712
2835
|
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
T('panel.stats_swept', { d: readableDate(last) })));
|
|
2721
|
-
}
|
|
2722
|
-
box.appendChild(line);
|
|
2723
|
-
};
|
|
2836
|
+
/* NOTES WRITTEN, AND WHAT AGE TOOK IS AMONG THEM. A server that removes
|
|
2837
|
+
old threads used to show what was left and, on a line of its own, what
|
|
2838
|
+
had gone: two figures to add up for one answer, and a count of notes
|
|
2839
|
+
that went DOWN on a site people were still using. What was written was
|
|
2840
|
+
written. "Written" is in the label so that "still open" beside it reads
|
|
2841
|
+
as a part of it and not as a second count of the same thing. */
|
|
2842
|
+
const gone = expired !== null ? expired : { notes: 0, pages: 0 };
|
|
2724
2843
|
|
|
2725
2844
|
const here = block('panel.stats_here_label');
|
|
2726
|
-
here.row.appendChild(figure(totals.notes, 'panel.
|
|
2845
|
+
here.row.appendChild(figure(totals.notes + gone.notes, 'panel.stats_written'));
|
|
2727
2846
|
here.row.appendChild(figure(totals.open, 'panel.stats_open'));
|
|
2728
|
-
here.row.appendChild(figure(totals.pages, 'panel.stats_pages'));
|
|
2729
|
-
/* Drawn only where the server counts AND something can go: a server with
|
|
2730
|
-
no retention has nothing to report, and one that has never swept says
|
|
2731
|
-
zero, which is an answer and not a blank. */
|
|
2732
|
-
if (expired !== null && (retention > 0 || expired.notes > 0 || expired.pages > 0)) {
|
|
2733
|
-
removed(here.box, expired.notes, expired.pages, expired.last);
|
|
2734
|
-
}
|
|
2847
|
+
here.row.appendChild(figure(totals.pages + gone.pages, 'panel.stats_pages'));
|
|
2735
2848
|
|
|
2736
|
-
/*
|
|
2849
|
+
/* THE WHOLE SERVER, on the servers whose operator chose to publish it.
|
|
2737
2850
|
Absent everywhere else -- see `publish_server_totals`, which is off until
|
|
2738
|
-
somebody writes it
|
|
2739
|
-
|
|
2851
|
+
somebody writes it. Sites and notes: pages are a figure of the site,
|
|
2852
|
+
where the reader can see them. */
|
|
2740
2853
|
if (serverWide !== null) {
|
|
2741
2854
|
const all = block('panel.stats_server_label');
|
|
2742
2855
|
all.row.appendChild(figure(serverWide.projects, 'panel.stats_sites'));
|
|
2743
|
-
all.row.appendChild(figure(serverWide.notes, 'panel.
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2856
|
+
all.row.appendChild(figure(serverWide.notes + serverWide.expiredNotes, 'panel.stats_written'));
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
/* AND EVERY SERVER TOGETHER, where this one takes part in the statistics.
|
|
2860
|
+
SERVERS AND SITES BEFORE NOTES: a count of notes alone could be one
|
|
2861
|
+
person's, and what a reader wants to know is whether anybody else uses
|
|
2862
|
+
this. The figures are a day old, and the label says so. */
|
|
2863
|
+
if (world !== null) {
|
|
2864
|
+
const everywhere = block('panel.stats_world_label', 'panel.stats_daily');
|
|
2865
|
+
everywhere.box.classList.add('ap-stats-world');
|
|
2866
|
+
if (world.servers !== null) {
|
|
2867
|
+
everywhere.row.appendChild(figure(world.servers, 'panel.stats_servers'));
|
|
2747
2868
|
}
|
|
2869
|
+
if (world.sites !== null) {
|
|
2870
|
+
everywhere.row.appendChild(figure(world.sites, 'panel.stats_sites'));
|
|
2871
|
+
}
|
|
2872
|
+
everywhere.row.appendChild(figure(world.notes, 'panel.stats_written'));
|
|
2748
2873
|
}
|
|
2749
2874
|
|
|
2750
2875
|
return rows;
|
|
@@ -4624,6 +4749,7 @@
|
|
|
4624
4749
|
lines.push(" project: '" + id + "'");
|
|
4625
4750
|
if (MODE === 'plain') lines.push(" mode: 'plain'");
|
|
4626
4751
|
if (PATH_PREFIX) lines.push(" path: '" + PATH_PREFIX + "'");
|
|
4752
|
+
if (DECLARED_PAGE) lines.push(" page: '" + DECLARED_PAGE + "'");
|
|
4627
4753
|
return '<script>\n'
|
|
4628
4754
|
+ ' window.annotepageConfig = {\n'
|
|
4629
4755
|
+ lines.join(',\n') + '\n'
|
|
@@ -4644,6 +4770,9 @@
|
|
|
4644
4770
|
t += '\n data-project="' + id + '"';
|
|
4645
4771
|
if (MODE === 'plain') t += '\n data-mode="plain"';
|
|
4646
4772
|
if (PATH_PREFIX) t += '\n data-path="' + PATH_PREFIX + '"';
|
|
4773
|
+
// A document that names its page keeps naming it: the tag pasted back
|
|
4774
|
+
// without it would file the same document under its address again.
|
|
4775
|
+
if (DECLARED_PAGE) t += '\n data-page="' + DECLARED_PAGE + '"';
|
|
4647
4776
|
t += '\n defer></' + 'script>';
|
|
4648
4777
|
return t;
|
|
4649
4778
|
};
|
|
@@ -5112,6 +5241,11 @@
|
|
|
5112
5241
|
takes it back when it returns (50-anchors). A query string or a fragment
|
|
5113
5242
|
that changes is the same page too, for the same reason.
|
|
5114
5243
|
|
|
5244
|
+
A DOCUMENT THAT DECLARES ITS PAGE (data-page) NEVER CHANGES PAGE: pagePath()
|
|
5245
|
+
answers the declared one whatever the address does, so every sign of
|
|
5246
|
+
navigation below compares it with itself and does nothing. That is the
|
|
5247
|
+
declaration being kept, not a navigation being missed.
|
|
5248
|
+
|
|
5115
5249
|
NOTHING HERE TOUCHES THE DERIVATION. pagePath() and indexOfPath() are
|
|
5116
5250
|
called exactly as the boot calls them; what changed is how often. */
|
|
5117
5251
|
|
|
@@ -5541,6 +5675,7 @@
|
|
|
5541
5675
|
retention = readRetention(r.data);
|
|
5542
5676
|
expired = readExpired(r.data);
|
|
5543
5677
|
serverWide = readServerTotals(r.data);
|
|
5678
|
+
world = readWorld(r.data);
|
|
5544
5679
|
return readList(r.data).then((read) => {
|
|
5545
5680
|
if (index !== PAGE_INDEX) return null;
|
|
5546
5681
|
notes = read;
|
|
@@ -5774,6 +5909,7 @@
|
|
|
5774
5909
|
retention = readRetention(first.data);
|
|
5775
5910
|
expired = readExpired(first.data);
|
|
5776
5911
|
serverWide = readServerTotals(first.data);
|
|
5912
|
+
world = readWorld(first.data);
|
|
5777
5913
|
return readList(first.data).then((read) => {
|
|
5778
5914
|
if (staleBoot(run, index)) return null;
|
|
5779
5915
|
notes = read;
|
package/labels/fr.js
CHANGED
|
@@ -26,17 +26,19 @@
|
|
|
26
26
|
"panel.refresh": "Actualiser",
|
|
27
27
|
"panel.stats_label": "Les chiffres",
|
|
28
28
|
"panel.stats_here_label": "Sur ce site",
|
|
29
|
-
"panel.
|
|
29
|
+
"panel.stats_written": "notes écrites",
|
|
30
|
+
"panel.stats_servers": "serveurs",
|
|
30
31
|
"panel.stats_open": "encore ouvertes",
|
|
31
32
|
"panel.stats_pages": "pages",
|
|
32
33
|
"panel.stats_sites": "sites",
|
|
33
|
-
"panel.
|
|
34
|
+
"panel.stats_written_one": "note écrite",
|
|
35
|
+
"panel.stats_servers_one": "serveur",
|
|
34
36
|
"panel.stats_open_one": "encore ouverte",
|
|
35
37
|
"panel.stats_pages_one": "page",
|
|
36
38
|
"panel.stats_sites_one": "site",
|
|
37
|
-
"panel.stats_gone_label": "Supprimées par ancienneté",
|
|
38
|
-
"panel.stats_swept": "dernier passage {d}",
|
|
39
39
|
"panel.stats_server_label": "Sur tout le serveur",
|
|
40
|
+
"panel.stats_world_label": "Sur tous les serveurs annotepage",
|
|
41
|
+
"panel.stats_daily": "mis à jour chaque jour",
|
|
40
42
|
"orphans.title": "Notes dont l’élément a changé",
|
|
41
43
|
"orphans.help": "Ces remarques portaient sur un élément qui n’existe plus sous la même forme. Elles sont conservées telles quelles.",
|
|
42
44
|
"note.about": "À propos de : {excerpt}",
|
|
@@ -144,6 +146,8 @@
|
|
|
144
146
|
"tag.config_setting": "La configuration annotepage de cette page (window.annotepageConfig) porte « {name} », qui n’est pas un réglage de cet outil. Rien n’en a été lu — un réglage dont le nom est faux est un réglage que personne n’a réglé. Les noms sont ceux écrits sur la balise, sans data-.",
|
|
145
147
|
"tag.config_value": "Le réglage « {name} » de la configuration annotepage de cette page (window.annotepageConfig) doit être écrit en texte, entre guillemets. Rien n’en a été lu.",
|
|
146
148
|
"tag.config_shape": "window.annotepageConfig, sur cette page, n’est pas un objet. Il s’écrit window.annotepageConfig = { server: \"...\", key: \"...\" }, avant le chargement du client. Rien n’en a été lu.",
|
|
149
|
+
"tag.page_shape": "Ce document déclare quelle page il est (data-page sur la balise, ou page dans window.annotepageConfig), et ce qu’il déclare n’est pas un chemin de page. Il s’écrit comme le chemin d’une adresse — /revues/budget.html — avec une seule barre oblique en tête, sans espace, sans « .. » et en 300 caractères au plus. Rien n’a été envoyé, rien n’a été déchiffré : une page mal nommée est une page dont personne d’autre ne retrouverait les remarques.",
|
|
150
|
+
"tag.page_outside_path": "Ce document déclare quelle page il est (data-page) et un préfixe de chemin (data-path), et la page est hors du préfixe : l’outil ne démarrerait jamais ici. Rien n’a été envoyé. Corrigez l’un des deux, ou retirez le préfixe — un document qui nomme sa propre page n’en a pas besoin.",
|
|
147
151
|
"setup.title": "Installer annotepage sur ce site",
|
|
148
152
|
"setup.generate": "Engendrer une clé et créer le projet",
|
|
149
153
|
"setup.warning_title": "À lire avant de continuer",
|
package/labels/fr.json
CHANGED
|
@@ -22,17 +22,19 @@
|
|
|
22
22
|
"panel.refresh": "Actualiser",
|
|
23
23
|
"panel.stats_label": "Les chiffres",
|
|
24
24
|
"panel.stats_here_label": "Sur ce site",
|
|
25
|
-
"panel.
|
|
25
|
+
"panel.stats_written": "notes écrites",
|
|
26
|
+
"panel.stats_servers": "serveurs",
|
|
26
27
|
"panel.stats_open": "encore ouvertes",
|
|
27
28
|
"panel.stats_pages": "pages",
|
|
28
29
|
"panel.stats_sites": "sites",
|
|
29
|
-
"panel.
|
|
30
|
+
"panel.stats_written_one": "note écrite",
|
|
31
|
+
"panel.stats_servers_one": "serveur",
|
|
30
32
|
"panel.stats_open_one": "encore ouverte",
|
|
31
33
|
"panel.stats_pages_one": "page",
|
|
32
34
|
"panel.stats_sites_one": "site",
|
|
33
|
-
"panel.stats_gone_label": "Supprimées par ancienneté",
|
|
34
|
-
"panel.stats_swept": "dernier passage {d}",
|
|
35
35
|
"panel.stats_server_label": "Sur tout le serveur",
|
|
36
|
+
"panel.stats_world_label": "Sur tous les serveurs annotepage",
|
|
37
|
+
"panel.stats_daily": "mis à jour chaque jour",
|
|
36
38
|
"orphans.title": "Notes dont l’élément a changé",
|
|
37
39
|
"orphans.help": "Ces remarques portaient sur un élément qui n’existe plus sous la même forme. Elles sont conservées telles quelles.",
|
|
38
40
|
"note.about": "À propos de : {excerpt}",
|
|
@@ -140,6 +142,8 @@
|
|
|
140
142
|
"tag.config_setting": "La configuration annotepage de cette page (window.annotepageConfig) porte « {name} », qui n’est pas un réglage de cet outil. Rien n’en a été lu — un réglage dont le nom est faux est un réglage que personne n’a réglé. Les noms sont ceux écrits sur la balise, sans data-.",
|
|
141
143
|
"tag.config_value": "Le réglage « {name} » de la configuration annotepage de cette page (window.annotepageConfig) doit être écrit en texte, entre guillemets. Rien n’en a été lu.",
|
|
142
144
|
"tag.config_shape": "window.annotepageConfig, sur cette page, n’est pas un objet. Il s’écrit window.annotepageConfig = { server: \"...\", key: \"...\" }, avant le chargement du client. Rien n’en a été lu.",
|
|
145
|
+
"tag.page_shape": "Ce document déclare quelle page il est (data-page sur la balise, ou page dans window.annotepageConfig), et ce qu’il déclare n’est pas un chemin de page. Il s’écrit comme le chemin d’une adresse — /revues/budget.html — avec une seule barre oblique en tête, sans espace, sans « .. » et en 300 caractères au plus. Rien n’a été envoyé, rien n’a été déchiffré : une page mal nommée est une page dont personne d’autre ne retrouverait les remarques.",
|
|
146
|
+
"tag.page_outside_path": "Ce document déclare quelle page il est (data-page) et un préfixe de chemin (data-path), et la page est hors du préfixe : l’outil ne démarrerait jamais ici. Rien n’a été envoyé. Corrigez l’un des deux, ou retirez le préfixe — un document qui nomme sa propre page n’en a pas besoin.",
|
|
143
147
|
"setup.title": "Installer annotepage sur ce site",
|
|
144
148
|
"setup.generate": "Engendrer une clé et créer le projet",
|
|
145
149
|
"setup.warning_title": "À lire avant de continuer",
|
package/package.json
CHANGED