@atelic-action/artifact 0.0.0-stage → 1.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 +153 -2
- package/package.json +68 -5
- package/src/documents/Gate.tsx +342 -0
- package/src/documents/Note.tsx +158 -0
- package/src/documents/Paragraph.tsx +65 -0
- package/src/documents/Read.tsx +544 -0
- package/src/documents/Report.tsx +135 -0
- package/src/documents/Shot.tsx +38 -0
- package/src/documents/Writeup.tsx +771 -0
- package/src/documents/documents.css +2722 -0
- package/src/documents/index.ts +11 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { newTabProps } from "@atelic-action/ui/artifact";
|
|
2
|
+
import { Maximize2 } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
export interface WriteupShot {
|
|
5
|
+
/** The crop shown on the page. */
|
|
6
|
+
src: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
/** The full screenshot the crop opens in a new tab; omit to render the crop alone. */
|
|
9
|
+
href?: string;
|
|
10
|
+
caption: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The owner's own screen: the crop, opening the full screenshot in a new tab
|
|
15
|
+
* when it has one, over its caption. The writeup and the note both wear it;
|
|
16
|
+
* its styles (.op-shot) are the writeup's, and the note only sizes it. A
|
|
17
|
+
* linked crop says it opens: a hover title, and an expand badge the note
|
|
18
|
+
* shows on its thumbnails and the writeup keeps hidden.
|
|
19
|
+
*/
|
|
20
|
+
export function Shot({ shot }: { shot: WriteupShot }) {
|
|
21
|
+
return (
|
|
22
|
+
<figure className="op-shot">
|
|
23
|
+
{shot.href ? (
|
|
24
|
+
<a href={shot.href} title="Open the full picture" {...newTabProps(shot.href, true)}>
|
|
25
|
+
<img src={shot.src} alt={shot.alt} loading="lazy" />
|
|
26
|
+
<span className="op-shot-open" aria-hidden="true">
|
|
27
|
+
<Maximize2 size={12} />
|
|
28
|
+
</span>
|
|
29
|
+
</a>
|
|
30
|
+
) : (
|
|
31
|
+
<span className="op-shot-frame">
|
|
32
|
+
<img src={shot.src} alt={shot.alt} loading="lazy" />
|
|
33
|
+
</span>
|
|
34
|
+
)}
|
|
35
|
+
<figcaption>{shot.caption}</figcaption>
|
|
36
|
+
</figure>
|
|
37
|
+
);
|
|
38
|
+
}
|