@atelic-action/artifact 3.0.0 → 4.1.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 +5 -3
- package/package.json +3 -3
- package/src/documents/Gate.tsx +4 -4
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The documents the practice hands or sends a business, as a published package and as the site a business's folder is cut from. This repo is two things at once:
|
|
4
4
|
|
|
5
5
|
- **The package**, `@atelic-action/artifact` on npm: the composed documents (the writeup, the read, the monthly page, the note, and the sealed document), each with its prop types and its default labels, and the stylesheet they wear. It ships `src/documents/` and nothing else, as source, the way `@atelic-action/ui` does, and depends on that package for every piece a document is built from.
|
|
6
|
-
- **The seed**: the routes, the content stubs, the config, the stub files the host finds by path, and the tests a new folder of `atelic-action/
|
|
6
|
+
- **The seed**: the routes, the content stubs, the config, the stub files the host finds by path, and the tests a new folder of `atelic-action/artifacts` is cut from, and the template site that shows every document on fictional content.
|
|
7
7
|
|
|
8
8
|
Three layers, each a version the next depends on (ATE-671): `@atelic-action/ui` holds the pieces, this package holds the documents built from them, and each business's folder holds only its content, routes, and config. A document fix reaches a folder by bumping this package; a piece fix by bumping ui here, then this package in the folder.
|
|
9
9
|
|
|
@@ -45,7 +45,7 @@ What a document is built from stays in `@atelic-action/ui`, and this package imp
|
|
|
45
45
|
bun add @atelic-action/artifact @atelic-action/ui
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Peer dependencies: `@atelic-action/ui` at `^
|
|
48
|
+
Peer dependencies: `@atelic-action/ui` at `^3.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.
|
|
49
49
|
|
|
50
50
|
```tsx
|
|
51
51
|
import { Writeup } from "@atelic-action/artifact";
|
|
@@ -90,7 +90,7 @@ No environment variables required. Visit [http://localhost:5173](http://localhos
|
|
|
90
90
|
|
|
91
91
|
## Building a Client Artifact
|
|
92
92
|
|
|
93
|
-
A business's artifacts live in one folder of `atelic-action/
|
|
93
|
+
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:
|
|
94
94
|
|
|
95
95
|
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 `writeup.tsx`, `sheets[]` only groups the blocks; print flows the page across as many letter pages as it needs, and `writeupStops` names the header's stops.
|
|
96
96
|
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) and the QR for the twin, pointing at the bare host (`qr "https://<short>.atelic.me" > public/images/qr.png` with the `qrcode` package), 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`.
|
|
@@ -136,6 +136,8 @@ Static files. `vercel.json` points Vercel at `dist/client` with no framework pre
|
|
|
136
136
|
|
|
137
137
|
A document is fixed or grown here, in `src/documents/`, with its test in `tst/documents/`, and released as a version of this package; a folder takes it with `bun update @atelic-action/artifact`. A piece a document is built from (the grade chip, the sign off, a page component, the chrome, the wall, a command) is fixed in `@atelic-action/ui` and released there first, then taken here by bumping the ui range. An improvement to the seed itself (a route, a stub file, the example content) is made here and copied into the folders by hand.
|
|
138
138
|
|
|
139
|
+
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`.
|
|
140
|
+
|
|
139
141
|
## Releasing
|
|
140
142
|
|
|
141
143
|
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": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "The composed documents the Atelic practice hands or sends a business (the writeup, the read, the monthly page, the note, and the sealed document), built from the pieces in @atelic-action/ui",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"format": "biome format . --write"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@atelic-action/ui": "^
|
|
40
|
+
"@atelic-action/ui": "^3.1.0",
|
|
41
41
|
"lucide-react": "^1.23.0",
|
|
42
42
|
"react": "^19.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@atelic-action/ui": "^
|
|
45
|
+
"@atelic-action/ui": "^3.1.0",
|
|
46
46
|
"@biomejs/biome": "^2.0.0",
|
|
47
47
|
"@playwright/test": "^1.60.0",
|
|
48
48
|
"@sentry/react": "^10.0.0",
|
package/src/documents/Gate.tsx
CHANGED
|
@@ -227,7 +227,7 @@ export function Gate({
|
|
|
227
227
|
errorText = "That email does not open this document. Use the address it was sent to.",
|
|
228
228
|
onUnlock,
|
|
229
229
|
}: GateProps) {
|
|
230
|
-
const [html,
|
|
230
|
+
const [html, setHTML] = useState<string | null>(null);
|
|
231
231
|
const [failed, setFailed] = useState(false);
|
|
232
232
|
const [busy, setBusy] = useState(false);
|
|
233
233
|
const [value, setValue] = useState("");
|
|
@@ -253,7 +253,7 @@ export function Gate({
|
|
|
253
253
|
if (opened) {
|
|
254
254
|
writeStored(storageKey, fromQuery);
|
|
255
255
|
identifyReader(opened.email, identifyDomain);
|
|
256
|
-
|
|
256
|
+
setHTML(opened.html);
|
|
257
257
|
onUnlockRef.current?.(opened.person);
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
@@ -267,7 +267,7 @@ export function Gate({
|
|
|
267
267
|
const opened = await openDocument(payload, stored);
|
|
268
268
|
if (cancelled || !opened) return;
|
|
269
269
|
identifyReader(opened.email, identifyDomain);
|
|
270
|
-
|
|
270
|
+
setHTML(opened.html);
|
|
271
271
|
onUnlockRef.current?.(opened.person);
|
|
272
272
|
}
|
|
273
273
|
|
|
@@ -290,7 +290,7 @@ export function Gate({
|
|
|
290
290
|
}
|
|
291
291
|
writeStored(storageKey, value);
|
|
292
292
|
identifyReader(opened.email, identifyDomain);
|
|
293
|
-
|
|
293
|
+
setHTML(opened.html);
|
|
294
294
|
onUnlockRef.current?.(opened.person);
|
|
295
295
|
}
|
|
296
296
|
|