@atelic-action/artifact 7.0.0 → 7.0.2
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 +5 -3
- package/package.json +1 -1
- package/src/documents/Topic.tsx +18 -9
- package/src/documents/documents.css +0 -6
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Every export of the package, all from the one entry, `@atelic-action/artifact`.
|
|
|
21
21
|
|
|
22
22
|
| Export | What it is | Route |
|
|
23
23
|
|---|---|---|
|
|
24
|
-
| `TheRead`, `TheReadProps` | The graded document a business gets, built from one snapshot: the dated lede; the scorecard, a `ReportCard` with each row a link to its card and the earlier letter beside a row that moved, with an optional `note` callout over it for what the read leaves out; the plan's numbered steps between the scorecard and the cards when `plan` has any (superseded by the plan tab, and removed at the next major); then the tiers, each section on the card (the trade name linked to its definition, the one liner, the grade, the why line as the summary, the blocks, and the sources at the foot) plus the read's own today and after (a two column table) and what we recommend (a checklist), a tier opening on a `markets` table of letters and closing on the `rented` line when it has them; the closing line and the sign off. `access` says which depth it is (`"public"`, from public readings alone, or `"private"`, from the owner's consoles too), and a public read with no note gets the `publicNote` label over its scorecard. `print` adds the lockup
|
|
24
|
+
| `TheRead`, `TheReadProps` | The graded document a business gets, built from one snapshot: the dated lede; the scorecard, a `ReportCard` with each row a link to its card and the earlier letter beside a row that moved, with an optional `note` callout over it for what the read leaves out; the plan's numbered steps between the scorecard and the cards when `plan` has any (superseded by the plan tab, and removed at the next major); then the tiers, each section on the card (the trade name linked to its definition, the one liner, the grade, the why line as the summary, the blocks, and the sources at the foot) plus the read's own today and after (a two column table) and what we recommend (a checklist), a tier opening on a `markets` table of letters and closing on the `rented` line when it has them; the closing line and the sign off. `access` says which depth it is (`"public"`, from public readings alone, or `"private"`, from the owner's consoles too), and a public read with no note gets the `publicNote` label over its scorecard. `print` adds the lockup to the printed copy. A beat with no data is left out. The head is the same for every business: `title` left out is the `overviewTitle` label and `preparedFor` ("Overview of Summit Movement Studio"), `lede` left out is the `overviewLede` label with the business in it, and under the lede the fine print, a row each with its word on the left: `period` ("2026-08-01 to 2026-10-31", the window every reading on the page is read over, under the `periodLabel` word) and `sources` (the public sources on one line, the private ones on the next, each a link in a new tab, under the `sourcesLabel` word); a read that sets neither has no fine print. The page is up to four tabs under that head, in a fixed order, each document tab present only when its document is: given a `stateDocument`, The Situation (the problems, by tier, each linked to its card); given a `planDocument`, The Plan; given a `proposalDocument`, The Proposal; and The Full Read, which holds everything that sat between the head and the sign off, always last. The first tab present opens. The sign off stays under all of them, and the tab row's screen reader name, unless `labels` sets one, names the tabs present. The tabs are ui's `Tabs`, so a link or a hash naming a card in the read opens the read tab and lands on it, and on paper every panel prints in order, each after the first on a new page under its tab's name. `selectedTab` and `onSelectTab` let a route hold the open tab, for instance to swap the header's stops with it. The seed's `/the-read` route also opens the tab its query names (`?tab=plan`, with `situation` and `proposal` accepted), and the query is what a sent link uses, since the wall's sign in keeps the path and the query and drops the hash. With no document the page is the one it always was | `/the-read` |
|
|
25
25
|
| `readLabels`, `ReadLabels` | The fixed words the read sets (Prepared for, the scorecard's screen reader words, Before, Rented, Today, After, Recommendations, the plan's heading, the public note, the standard head's words (`overviewTitle`, `overviewLede` with `{business}` in it, `periodLabel`, `sourcesLabel`, `publicSources`, `privateSources`), the four tabs' names (`stateTab`, `planTab`, `proposalTab`, `readTab`: The Situation, The Plan, The Proposal, The Full Read), and the tab row's name for a screen reader, which names the tabs present when left out), each overridable through `labels` | `/the-read` |
|
|
26
26
|
| `StateDocument` | The situation tab's document, the same shape as `PlanDocument`: the problems the read found, one section per tier (Health, Visibility, Conversion), each line linked to the card that shows it, so the plan answers them in the same order. Its panel wears `rd-state-doc` beside `rd-plan-doc`. Its `id` defaults to `theStateTabId` and its `title` to the `stateTab` label | `/the-read` |
|
|
27
27
|
| `ReadSources` | The sources the read was built from, for the fine print's sources row: `public` links (the site, Google, PageSpeed, the AI answers) and the owner's `private` consoles | `/the-read` |
|
|
@@ -56,7 +56,7 @@ What a document is built from stays in `@atelic-action/ui`, and this package imp
|
|
|
56
56
|
bun add @atelic-action/artifact @atelic-action/ui
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Peer dependencies: `@atelic-action/ui` at `^
|
|
59
|
+
Peer dependencies: `@atelic-action/ui` at `^4.0.0`, `react` at `^19.0.0`, and `lucide-react` at `^1.23.0`. The package ships TSX and CSS as source, compiled inside the site's own Vite like ui's; a site whose `vite.config.ts` is one `artifactConfig` call from `@atelic-action/ui/vite` needs nothing more, for the build, the prerender, and the dev server alike. The default labels a document sets live in the document: the read's `readLabels` and the sealed document's gate copy are overridden through props, and the monthly page's four questions are fixed on purpose, since they are its contract with the Statement of Work.
|
|
60
60
|
|
|
61
61
|
```tsx
|
|
62
62
|
import { TheRead } from "@atelic-action/artifact";
|
|
@@ -104,7 +104,7 @@ No environment variables required. Visit [http://localhost:5173](http://localhos
|
|
|
104
104
|
A business's artifacts live in one folder of `atelic-action/artifacts`, named by the business's short name and served at `<short>.atelic.me` as its own Vercel project with the folder as its root directory, one path per artifact. That host is the business's one address with the practice: the website build, when one is previewed, sits on it at `/proto`, proxied from its own project ([DEPLOY.md](DEPLOY.md), The Website Build Under /proto). Cut it from this one with `git subtree add --prefix=<short> https://github.com/atelic-action/artifact.git main`, run in `artifacts`. A cut is a site, not the package, so it then takes the package from npm instead of carrying its source: delete `src/documents/` and `tst/documents/`, give `package.json` the folder's own name and drop the package's fields (`version`, `files`, `exports`, `sideEffects`, `peerDependencies`), and run `bun add @atelic-action/artifact`. The routes and content already import the documents by the package's name, so nothing else changes. Nothing is pulled forward from here afterward: a document reaches the folder with `bun update @atelic-action/artifact`, and everything else with logic in it is `@atelic-action/ui`'s and arrives with `bun update @atelic-action/ui` ([CLAUDE.md](CLAUDE.md), What a Cut Takes From Here). Delete the artifacts the engagement does not need (the route, the content module, and the prerender entry), then touch four surfaces:
|
|
105
105
|
|
|
106
106
|
1. **Content**, in `src/content/`. One module per artifact: the real read, every number dated and defensible in the room, graded and shaped by the practice's `FOOTPRINT.md` and written to its pitch surface rules (`Brand/VOICE.md`, Pitch Surfaces 15 to 21). In `the-read.tsx`, `access` says whether any reading came from the owner's own consoles, which picks the caveat over the scorecard and says nothing about the host; print flows the page across as many letter pages as it needs, and `theReadStops` names the header's stops.
|
|
107
|
-
2. **Images**, split by what they are. Logos are brand marks and go in `public/brand/` (the recipient's logo, e.g. `public/brand/<name>.svg`), which the access wall leaves open so the header and the login page can draw them. The owner's own screens (the full screenshot for the click through and a tight crop for the column)
|
|
107
|
+
2. **Images**, split by what they are. Logos are brand marks and go in `public/brand/` (the recipient's logo, e.g. `public/brand/<name>.svg`), which the access wall leaves open so the header and the login page can draw them. The owner's own screens (the full screenshot for the click through and a tight crop for the column) go in `public/images/`, which the wall holds on a private artifact. A cut made before this split moves its recipient logo from `public/images/` to `public/brand/` and repoints `recipient.logo.src`.
|
|
108
108
|
3. **Config**, in `src/site.config.ts`. `url` is the host, `access` is always `"private"`, since every document sits behind the wall (the depth of the readings is the read's own `access`, not this one), `recipient` is the business it was prepared for (with its `logo` under `/brand/`), `sender` is the practice, and `analytics` is the HubSpot loader so an open reports to the CRM, naming nobody, since the wall identifies whoever signs in ([DEPLOY.md](DEPLOY.md), Who Opened It).
|
|
109
109
|
4. **The printed copy**: `bun build`, then `bun run print dist/client public/the-read.pdf`, which prints with every collapsible open and reports the sheet count, or `bun run print dist/client <out.pdf> 1 /report` for the monthly page, which fails if it misses its one sheet. Commit the read's PDF beside the page, and file a dated copy in the client's folder of the practice repo.
|
|
110
110
|
|
|
@@ -151,6 +151,8 @@ A folder taking 3.0.0 moves three things in its own files, since 3.0.0 draws the
|
|
|
151
151
|
|
|
152
152
|
A folder taking 4.0.0 takes ui 3.0.0 with it (`bun update @atelic-action/artifact @atelic-action/ui --latest --cwd <short>`) and repoints its own routes, since ui 3.0.0 keeps acronyms capitalized with no alias for the old spelling: `canonicalUrl` from `@atelic-action/ui/artifact` becomes `canonicalURL` in `src/routes/index.tsx`, and the root route's `baseCss` import becomes `baseCSS`.
|
|
153
153
|
|
|
154
|
+
A folder taking 7.0.0 takes ui 4.0.0 with it (`bun update @atelic-action/artifact @atelic-action/ui --latest --cwd <short>`) and is armed in the same pass (the practice's `artifact arm <short>`, with the business's domain in the folder's `wall.json`), since its host is always behind the wall. It takes the seed's `src/routes/__root.tsx`, `tst/site-config.test.ts`, and `e2e/root.spec.ts`, which identify an open by the sign in alone; drops `identify` from `analytics` in `src/site.config.ts` and sets `access: "private"`; deletes `twin` from the read's `print` and `public/images/qr.png`; and drops the `.op-twin` line and `qrSrc` from its own read test. A send carries each reader's sign in (`artifact link`) from then on, never a `?k=` link.
|
|
155
|
+
|
|
154
156
|
## Releasing
|
|
155
157
|
|
|
156
158
|
1. Bump `version` in `package.json` and merge it to `main`: patch for a fix, minor for a new document or prop, major for a breaking prop, type, or class rename.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atelic-action/artifact",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"description": "The composed documents the Atelic practice hands or sends a business (the read, the monthly page, the note, the discovery sheet, the first call sheet, and the sealed document), built from the pieces in @atelic-action/ui",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/documents/Topic.tsx
CHANGED
|
@@ -446,19 +446,28 @@ function Speed({ block }: { block: ReadSpeed }) {
|
|
|
446
446
|
);
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
/**
|
|
450
|
-
|
|
451
|
-
|
|
449
|
+
/**
|
|
450
|
+
* One run of a paragraph: a string, a link `{ text, href }`, or a search query
|
|
451
|
+
* `{ query, href? }`. The query run is ui's from 7.1.0 and is read here by its
|
|
452
|
+
* shape alone, so the ui range this package peers on does not have to move.
|
|
453
|
+
*/
|
|
454
|
+
function isRun(run: unknown): boolean {
|
|
455
|
+
if (typeof run === "string") return true;
|
|
456
|
+
if (typeof run !== "object" || run === null) return false;
|
|
457
|
+
if ("text" in run && "href" in run) return true;
|
|
452
458
|
return (
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
typeof run === "string" ||
|
|
457
|
-
(typeof run === "object" && run !== null && "text" in run && "href" in run),
|
|
458
|
-
)
|
|
459
|
+
"query" in run &&
|
|
460
|
+
typeof run.query === "string" &&
|
|
461
|
+
(!("href" in run) || run.href === undefined || typeof run.href === "string")
|
|
459
462
|
);
|
|
460
463
|
}
|
|
461
464
|
|
|
465
|
+
/** A string or runs of text, links, and queries, the shape JSON content arrives in; a node of elements is anything else. */
|
|
466
|
+
export function isRuns(value: unknown): value is ArtifactParagraph {
|
|
467
|
+
if (typeof value === "string") return true;
|
|
468
|
+
return Array.isArray(value) && value.every(isRun);
|
|
469
|
+
}
|
|
470
|
+
|
|
462
471
|
/** A finding's body as a node, whichever way the content wrote it. */
|
|
463
472
|
function bodyNode(body: ReactNode | ArtifactParagraph | undefined): ReactNode {
|
|
464
473
|
if (body === undefined || body === null) return undefined;
|
|
@@ -1570,12 +1570,6 @@
|
|
|
1570
1570
|
gap: 16px;
|
|
1571
1571
|
padding: 16px 26px;
|
|
1572
1572
|
}
|
|
1573
|
-
.atelic-ui .op-close {
|
|
1574
|
-
flex-direction: row;
|
|
1575
|
-
justify-content: space-between;
|
|
1576
|
-
align-items: flex-end;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
1573
|
/* the markets as a real table */
|
|
1580
1574
|
.atelic-ui .op-markets-table {
|
|
1581
1575
|
display: table;
|