@addiscorp/kit 0.2.6 → 0.2.7
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/dist/tool/index.d.ts +40 -3
- package/dist/tool/index.js +17 -4
- package/dist/tool/tools.js +1 -1
- package/dist/tool.css +29 -0
- package/package.json +1 -1
package/dist/tool/index.d.ts
CHANGED
|
@@ -46,8 +46,30 @@ export type ReelScene = {
|
|
|
46
46
|
caption: string;
|
|
47
47
|
lines: ReelLine[];
|
|
48
48
|
};
|
|
49
|
-
/**
|
|
50
|
-
|
|
49
|
+
/**
|
|
50
|
+
* A screenshot of the app, in each theme: images the site serves itself
|
|
51
|
+
* (`dark` when the app looks different on a dark ground). Width and height
|
|
52
|
+
* are the image's own, so the page keeps its place while it loads.
|
|
53
|
+
*/
|
|
54
|
+
export type Shot = {
|
|
55
|
+
light: string;
|
|
56
|
+
dark?: string;
|
|
57
|
+
alt: string;
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
};
|
|
61
|
+
/** A screen of the app and what it shows, for the tour. */
|
|
62
|
+
export type Feature = {
|
|
63
|
+
title: string;
|
|
64
|
+
text: string;
|
|
65
|
+
shot: Shot;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* The hero: headline, buttons, install commands under them, and the demo
|
|
69
|
+
* beside them: the reel for a tool you run in a terminal, or, for an app, a
|
|
70
|
+
* screenshot of it, under the words and as wide as the page.
|
|
71
|
+
*/
|
|
72
|
+
export declare function Hero({ headline, sub, status, docs, github, installs, reel, shot, Link }: {
|
|
51
73
|
headline: Headline;
|
|
52
74
|
sub: string;
|
|
53
75
|
/** Where the tool stands, when a visitor should know before installing: "Early: not yet audited." */
|
|
@@ -57,8 +79,23 @@ export declare function Hero({ headline, sub, status, docs, github, installs, re
|
|
|
57
79
|
github?: string;
|
|
58
80
|
/** Empty until the tool can be installed; say why in `status`. */
|
|
59
81
|
installs: Install[];
|
|
60
|
-
reel: ReelScene[];
|
|
61
82
|
Link?: LinkComponent;
|
|
83
|
+
} & ({
|
|
84
|
+
reel: ReelScene[];
|
|
85
|
+
shot?: never;
|
|
86
|
+
} | {
|
|
87
|
+
shot: Shot;
|
|
88
|
+
reel?: never;
|
|
89
|
+
})): import("react/jsx-runtime").JSX.Element;
|
|
90
|
+
/** A screenshot in a window frame, in the page's theme. */
|
|
91
|
+
export declare function Screen({ shot, eager }: {
|
|
92
|
+
shot: Shot;
|
|
93
|
+
eager?: boolean;
|
|
94
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
/** The app, screen by screen: what each one is for, beside it, sides alternating. */
|
|
96
|
+
export declare function Tour({ features, title }: {
|
|
97
|
+
features: Feature[];
|
|
98
|
+
title?: string;
|
|
62
99
|
}): import("react/jsx-runtime").JSX.Element;
|
|
63
100
|
/**
|
|
64
101
|
* The demo: a terminal that plays its scenes in turn, a few seconds each,
|
package/dist/tool/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Footer } from '../footer/index.js';
|
|
3
3
|
import { CopyButton } from './copy.js';
|
|
4
4
|
import { MARKS } from './marks.js';
|
|
@@ -17,9 +17,22 @@ export function ToolSite({ tool, home = '/', docs = '/docs/', links = [], footno
|
|
|
17
17
|
return (_jsxs("div", { className: "akt", "data-tool": tool, children: [_jsxs("main", { className: "akt-main", children: [_jsxs("header", { className: "akt-header", children: [_jsxs(Link, { className: "akt-brand", href: home, children: [_jsx(Mark, { tool: tool }), toolName(tool)] }), _jsxs("nav", { "aria-label": "Main", children: [_jsx(Link, { href: docs, children: "docs" }), links.map((link) => _jsx(Link, { href: link.href, children: link.label }, link.href))] })] }), children] }), _jsx(Footer, { site: toolInfo(tool).domain, note: footnote })] }));
|
|
18
18
|
}
|
|
19
19
|
const SCENE_SECONDS = 5;
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The hero: headline, buttons, install commands under them, and the demo
|
|
22
|
+
* beside them: the reel for a tool you run in a terminal, or, for an app, a
|
|
23
|
+
* screenshot of it, under the words and as wide as the page.
|
|
24
|
+
*/
|
|
25
|
+
export function Hero({ headline, sub, status, docs = '/docs/', github, installs, reel, shot, Link = PlainLink }) {
|
|
26
|
+
return (_jsxs("section", { className: shot ? 'akt-hero akt-hero-app' : 'akt-hero', children: [_jsxs("div", { children: [_jsxs("h1", { children: [headline.before, _jsx("em", { children: headline.accent }), headline.after] }), _jsx("p", { className: "akt-sub", children: sub }), status && _jsx("p", { className: "akt-status", children: status }), _jsxs("div", { className: "akt-btns", children: [_jsx(Link, { className: "akt-btn akt-main-btn", href: docs, children: "docs" }), github && _jsx("a", { className: "akt-btn", href: github, children: "GitHub" })] }), installs.length > 0 && _jsx("div", { className: "akt-installs", children: installs.map((install) => (_jsxs("div", { children: [_jsx("div", { className: "akt-ilabel", children: install.label }), _jsxs("div", { className: "akt-cmd", children: [_jsxs("code", { children: [_jsx("b", { children: "$ " }), install.command] }), _jsx(CopyButton, { text: install.command })] })] }, install.command))) })] }), shot ? _jsx(Screen, { shot: shot, eager: true }) : _jsx(Reel, { scenes: reel ?? [] })] }));
|
|
27
|
+
}
|
|
28
|
+
/** A screenshot in a window frame, in the page's theme. */
|
|
29
|
+
export function Screen({ shot, eager = false }) {
|
|
30
|
+
const img = (src, className) => (_jsx("img", { className: className, src: src, alt: shot.alt, width: shot.width, height: shot.height, loading: eager ? 'eager' : 'lazy', decoding: "async" }));
|
|
31
|
+
return (_jsxs("figure", { className: "akt-screen", children: [_jsxs("div", { className: "akt-chrome", "aria-hidden": "true", children: [_jsx("i", {}), _jsx("i", {}), _jsx("i", {})] }), shot.dark ? _jsxs(_Fragment, { children: [img(shot.light, 'akt-light'), img(shot.dark, 'akt-dark')] }) : img(shot.light)] }));
|
|
32
|
+
}
|
|
33
|
+
/** The app, screen by screen: what each one is for, beside it, sides alternating. */
|
|
34
|
+
export function Tour({ features, title = 'A look around' }) {
|
|
35
|
+
return (_jsxs("section", { className: "akt-tour", children: [_jsx("h2", { children: title }), features.map((feature) => (_jsxs("div", { className: "akt-feature", children: [_jsxs("div", { className: "akt-feature-text", children: [_jsx("div", { className: "akt-dash" }), _jsx("h3", { children: feature.title }), _jsx("p", { children: feature.text })] }), _jsx(Screen, { shot: feature.shot })] }, feature.title)))] }));
|
|
23
36
|
}
|
|
24
37
|
/**
|
|
25
38
|
* The demo: a terminal that plays its scenes in turn, a few seconds each,
|
package/dist/tool/tools.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const TOOLS = [
|
|
2
|
-
{ id: 'rixse', domain: 'rixse.
|
|
2
|
+
{ id: 'rixse', domain: 'rixse.addis.gg', short: 'The gateway. Agents ask, you decide.' },
|
|
3
3
|
{ id: 'mirab', domain: 'mirab.addis.gg', short: 'Agents in VMs on your own machine.' },
|
|
4
4
|
{ id: 'woreda', domain: 'woreda.addis.gg', short: 'Self-hosted GitHub Actions runners.' },
|
|
5
5
|
{ id: 'kebele', domain: 'kebele.addis.gg', short: 'Container stacks over the Docker socket.' },
|
package/dist/tool.css
CHANGED
|
@@ -56,6 +56,33 @@
|
|
|
56
56
|
.akt-copy { flex: none; border: 1px solid var(--akt-faint); border-radius: 5px; background: transparent; padding: 2px 8px; font: 11px var(--akt-mono); color: var(--akt-soft); cursor: pointer; }
|
|
57
57
|
.akt-copy:hover { color: var(--akt-ink); }
|
|
58
58
|
|
|
59
|
+
/* An app's hero: the words, then the app as wide as the page. */
|
|
60
|
+
.akt-hero-app { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-bottom: 40px; }
|
|
61
|
+
.akt-hero-app h1 { font-size: clamp(36px, 5vw, 60px); }
|
|
62
|
+
.akt-hero-app .akt-sub { max-width: 52ch; }
|
|
63
|
+
|
|
64
|
+
/* A screenshot in a window frame; both themes' images drawn, the theme shows one. */
|
|
65
|
+
.akt-screen { margin: 0; border: 1px solid var(--akt-faint); border-radius: 12px; overflow: hidden; background: var(--akt-card); box-shadow: 0 30px 70px -40px rgb(0 0 0 / .55); }
|
|
66
|
+
.akt-screen img { display: block; width: 100%; height: auto; }
|
|
67
|
+
.akt-chrome { display: flex; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--akt-faint); }
|
|
68
|
+
.akt-chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--akt-faint); }
|
|
69
|
+
.akt-screen .akt-dark { display: none; }
|
|
70
|
+
:root[data-theme="dark"] .akt-screen .akt-light { display: none; }
|
|
71
|
+
:root[data-theme="dark"] .akt-screen .akt-dark { display: block; }
|
|
72
|
+
@media (prefers-color-scheme: dark) {
|
|
73
|
+
:root:not([data-theme="light"]) .akt-screen .akt-light { display: none; }
|
|
74
|
+
:root:not([data-theme="light"]) .akt-screen .akt-dark { display: block; }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* The tour: a screen and what it's for, sides alternating. */
|
|
78
|
+
.akt-tour { padding: 40px 0 24px; }
|
|
79
|
+
.akt-tour h2 { font: 800 30px/1.1 var(--akt-display); letter-spacing: -0.02em; margin: 0 0 28px; }
|
|
80
|
+
.akt-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 44px; align-items: center; padding: 28px 0; }
|
|
81
|
+
.akt-feature:nth-of-type(even) .akt-feature-text { order: 2; }
|
|
82
|
+
.akt-feature:nth-of-type(even) { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); }
|
|
83
|
+
.akt-feature h3 { font: 700 22px/1.2 var(--akt-display); margin: 0 0 10px; }
|
|
84
|
+
.akt-feature p { margin: 0; color: var(--akt-soft); }
|
|
85
|
+
|
|
59
86
|
/* The demo reel: dark in both themes, tinted with the brand. */
|
|
60
87
|
.akt-reel { background: var(--akt-reel); color: #E8ECEF; border: 1px solid var(--akt-reelline); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-height: 340px; box-shadow: 0 20px 50px -30px rgb(0 0 0 / .5); }
|
|
61
88
|
.akt-stage { display: grid; flex: 1; }
|
|
@@ -142,6 +169,8 @@
|
|
|
142
169
|
.akt-code .akt-copy { position: absolute; top: 12px; right: 12px; }
|
|
143
170
|
|
|
144
171
|
@media (max-width: 860px) {
|
|
172
|
+
.akt-feature, .akt-feature:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
|
|
173
|
+
.akt-feature:nth-of-type(even) .akt-feature-text { order: 0; }
|
|
145
174
|
.akt-main { width: calc(100% - 32px); }
|
|
146
175
|
.akt > .ak-foot { width: calc(100% - 32px); }
|
|
147
176
|
.akt-hero { grid-template-columns: minmax(0, 1fr); padding: 44px 0 40px; gap: 36px; }
|
package/package.json
CHANGED