@addiscorp/kit 0.2.3 → 0.2.5
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/footer/index.d.ts +3 -1
- package/dist/footer/index.js +2 -2
- package/dist/kit.css +1 -0
- package/dist/tool/index.d.ts +35 -6
- package/dist/tool/index.js +17 -9
- package/dist/tool/tools.d.ts +4 -0
- package/dist/tool/tools.js +5 -1
- package/dist/tool.css +8 -0
- package/package.json +1 -1
package/dist/footer/index.d.ts
CHANGED
|
@@ -14,5 +14,7 @@ export type FooterProps = {
|
|
|
14
14
|
year?: number;
|
|
15
15
|
/** Anything else for the end of the footer, before the theme switch. */
|
|
16
16
|
children?: ReactNode;
|
|
17
|
+
/** A small line under the footer row, e.g. trademark notices. */
|
|
18
|
+
note?: ReactNode;
|
|
17
19
|
};
|
|
18
|
-
export declare function Footer({ site, owner, year, children }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function Footer({ site, owner, year, children, note }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/footer/index.js
CHANGED
|
@@ -6,8 +6,8 @@ export const ADDIS = {
|
|
|
6
6
|
href: 'https://addis.gg',
|
|
7
7
|
logo: _jsx(AddisMark, {}),
|
|
8
8
|
};
|
|
9
|
-
export function Footer({ site, owner = ADDIS, year = new Date().getFullYear(), children }) {
|
|
10
|
-
return (_jsxs("footer", { className: "ak-foot", children: [_jsxs("a", { className: "ak-credit", href: owner.href, children: [owner.logo, "\u00A9 ", year, " ", owner.name] }), _jsxs("span", { className: "ak-foot-end", children: [children, _jsx("span", { children: site }), _jsx(ThemeToggle, {})] })] }));
|
|
9
|
+
export function Footer({ site, owner = ADDIS, year = new Date().getFullYear(), children, note }) {
|
|
10
|
+
return (_jsxs("footer", { className: "ak-foot", children: [_jsxs("a", { className: "ak-credit", href: owner.href, children: [owner.logo, "\u00A9 ", year, " ", owner.name] }), _jsxs("span", { className: "ak-foot-end", children: [children, _jsx("span", { children: site }), _jsx(ThemeToggle, {})] }), note && _jsx("p", { className: "ak-foot-note", children: note })] }));
|
|
11
11
|
}
|
|
12
12
|
function AddisMark() {
|
|
13
13
|
return (_jsx("svg", { className: "ak-owner-mark", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: 32, height: 32, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: '<circle cx="32" cy="32" r="31" fill="#1b1914"/><path fill="#f3efe3" d="M28.48 41L23.89 41L29.63 28.07Q26.87 27.73 25.60 26.27Q24.33 24.82 24.33 22.28L24.33 22.28L24.33 18.87L28.73 18.87L28.73 21.44Q28.73 23.27 29.52 23.95Q30.31 24.63 32.11 24.63L32.11 24.63L35.70 24.63L28.48 41ZM40.17 41L35.55 41Q35.52 38.21 35.08 36.51Q34.65 34.80 33.81 33.85Q32.98 32.91 31.74 32.38L31.74 32.38L33.19 28.91Q35.39 29.69 36.93 31.11Q38.46 32.54 39.28 34.92Q40.11 37.31 40.17 41L40.17 41Z"/><rect x="20" y="47.5" width="8" height="3" fill="#078930"/><rect x="28" y="47.5" width="8" height="3" fill="#fcdd09"/><rect x="36" y="47.5" width="8" height="3" fill="#da121a"/>' } }));
|
package/dist/kit.css
CHANGED
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
.ak-credit { display: inline-flex; align-items: center; gap: 8px; color: var(--ak-ink); text-decoration: none; }
|
|
109
109
|
.ak-credit img, .ak-owner-mark { width: 32px; height: 32px; border-radius: 50%; }
|
|
110
110
|
.ak-foot-end { display: inline-flex; align-items: center; gap: 12px; }
|
|
111
|
+
.ak-foot-note { flex-basis: 100%; margin: 0; font-size: 11px; line-height: 1.6; color: var(--ak-soft); opacity: .8; }
|
|
111
112
|
|
|
112
113
|
/* The theme switch */
|
|
113
114
|
.ak-theme-toggle { box-sizing: border-box; border: 0; background: transparent; border-radius: 4px; color: inherit; cursor: pointer; display: inline-flex; height: 32px; width: 32px; align-items: center; justify-content: center; padding: 8px; }
|
package/dist/tool/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { LinkComponent } from '../header/index.js';
|
|
3
3
|
import { type ToolId } from './tools.js';
|
|
4
|
-
export { TOOLS, toolInfo, type ToolId, type ToolInfo } from './tools.js';
|
|
4
|
+
export { TOOLS, toolInfo, toolName, type ToolId, type ToolInfo } from './tools.js';
|
|
5
5
|
export { MARKS } from './marks.js';
|
|
6
6
|
export { CopyButton } from './copy.js';
|
|
7
7
|
/** A tool's mark, drawn for light and dark; the theme picks one. */
|
|
@@ -15,12 +15,14 @@ export type HeaderLink = {
|
|
|
15
15
|
href: string;
|
|
16
16
|
};
|
|
17
17
|
/** Everything a tool site shows sits inside this: it sets the tool's colours, the header and the footer. */
|
|
18
|
-
export declare function ToolSite({ tool, home, docs, links, Link, children }: {
|
|
18
|
+
export declare function ToolSite({ tool, home, docs, links, footnote, Link, children }: {
|
|
19
19
|
tool: ToolId;
|
|
20
20
|
home?: string;
|
|
21
21
|
docs?: string;
|
|
22
22
|
/** More header links, after docs, for what only this tool has. */
|
|
23
23
|
links?: HeaderLink[];
|
|
24
|
+
/** A small line under the footer, e.g. trademark notices. */
|
|
25
|
+
footnote?: ReactNode;
|
|
24
26
|
Link?: LinkComponent;
|
|
25
27
|
children: ReactNode;
|
|
26
28
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -70,17 +72,42 @@ export type Benefit = {
|
|
|
70
72
|
title: string;
|
|
71
73
|
text: string;
|
|
72
74
|
};
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Something the tool works with: a name, and its logo when the owner allows reference use
|
|
77
|
+
* (an image the site serves itself; `dark` when it needs another one on a dark ground).
|
|
78
|
+
*/
|
|
79
|
+
export type WorksItem = {
|
|
80
|
+
name: string;
|
|
81
|
+
logo?: {
|
|
82
|
+
light: string;
|
|
83
|
+
dark?: string;
|
|
84
|
+
};
|
|
85
|
+
note?: string;
|
|
86
|
+
};
|
|
87
|
+
export type WorksWith = {
|
|
88
|
+
title: string;
|
|
89
|
+
note?: string;
|
|
90
|
+
items: WorksItem[];
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* "Why <tool> · the short version": three benefits, and the other Addis tools. A tool can put a
|
|
94
|
+
* "Works with" card in the third benefit's place instead.
|
|
95
|
+
*/
|
|
96
|
+
export declare function Why({ tool, benefits, works }: {
|
|
75
97
|
tool: ToolId;
|
|
98
|
+
} & ({
|
|
76
99
|
benefits: [Benefit, Benefit, Benefit];
|
|
77
|
-
|
|
100
|
+
works?: never;
|
|
101
|
+
} | {
|
|
102
|
+
benefits: [Benefit, Benefit];
|
|
103
|
+
works: WorksWith;
|
|
104
|
+
})): import("react/jsx-runtime").JSX.Element;
|
|
78
105
|
export type DocsPage = {
|
|
79
106
|
href: string;
|
|
80
107
|
title: string;
|
|
81
108
|
};
|
|
82
109
|
/** The docs, after rixse.dev: the pages down the side, the page on the right. */
|
|
83
|
-
export declare function DocsLayout({ tool, pages, pathname, eyebrow, title, lede, note, home, Link, children }: {
|
|
110
|
+
export declare function DocsLayout({ tool, pages, pathname, eyebrow, title, lede, note, footnote, home, Link, children }: {
|
|
84
111
|
tool: ToolId;
|
|
85
112
|
pages: DocsPage[];
|
|
86
113
|
pathname: string;
|
|
@@ -89,6 +116,8 @@ export declare function DocsLayout({ tool, pages, pathname, eyebrow, title, lede
|
|
|
89
116
|
lede?: string;
|
|
90
117
|
/** A small note under the page list, e.g. what the docs describe. */
|
|
91
118
|
note?: string;
|
|
119
|
+
/** A small line under the footer, e.g. trademark notices. */
|
|
120
|
+
footnote?: ReactNode;
|
|
92
121
|
home?: string;
|
|
93
122
|
Link?: LinkComponent;
|
|
94
123
|
children: ReactNode;
|
package/dist/tool/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } 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';
|
|
5
|
-
import { TOOLS, toolInfo } from './tools.js';
|
|
6
|
-
export { TOOLS, toolInfo } from './tools.js';
|
|
5
|
+
import { TOOLS, toolInfo, toolName } from './tools.js';
|
|
6
|
+
export { TOOLS, toolInfo, toolName } from './tools.js';
|
|
7
7
|
export { MARKS } from './marks.js';
|
|
8
8
|
export { CopyButton } from './copy.js';
|
|
9
9
|
const PlainLink = (props) => _jsx("a", { ...props });
|
|
@@ -13,8 +13,8 @@ export function Mark({ tool, size = 26 }) {
|
|
|
13
13
|
return (_jsxs("span", { className: "akt-mark", style: { width: size, height: size }, "aria-hidden": "true", children: [_jsx("svg", { className: "akt-light", viewBox: "0 0 24 24", width: size, height: size, dangerouslySetInnerHTML: { __html: mark.light } }), _jsx("svg", { className: "akt-dark", viewBox: "0 0 24 24", width: size, height: size, dangerouslySetInnerHTML: { __html: mark.dark } })] }));
|
|
14
14
|
}
|
|
15
15
|
/** Everything a tool site shows sits inside this: it sets the tool's colours, the header and the footer. */
|
|
16
|
-
export function ToolSite({ tool, home = '/', docs = '/docs/', links = [], Link = PlainLink, children }) {
|
|
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 }), 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 })] }));
|
|
16
|
+
export function ToolSite({ tool, home = '/', docs = '/docs/', links = [], footnote, Link = PlainLink, children }) {
|
|
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
20
|
/** The hero: headline, buttons, install commands under them, and the demo reel on the right. */
|
|
@@ -34,14 +34,22 @@ export function Reel({ scenes }) {
|
|
|
34
34
|
+ `@keyframes akt-dot-${scenes.length}{0%,${(share - 0.01).toFixed(2)}%{background:var(--akt-accent);width:28px}${share.toFixed(2)}%,100%{background:var(--akt-dotoff);width:14px}}`;
|
|
35
35
|
return (_jsxs("div", { children: [_jsx("style", { children: css }), _jsx("div", { className: "akt-reel", children: _jsx("div", { className: "akt-stage", children: scenes.map((scene, i) => (_jsxs("div", { className: "akt-scene", style: { animation: `akt-scene-${scenes.length} ${cycle}s ${i * SCENE_SECONDS}s infinite both` }, children: [_jsxs("div", { className: "akt-tab", children: [_jsx("i", {}), scene.title] }), _jsx("div", { className: "akt-term", children: scene.lines.map((line, j) => (_jsxs("div", { className: `akt-ln akt-${line.kind ?? 'output'}`, style: { animation: `akt-line ${cycle}s ${(i * SCENE_SECONDS + 0.3 + j * 0.45).toFixed(2)}s infinite both` }, children: [_jsx("span", { className: "akt-no", children: j + 1 }), _jsx("span", { className: "akt-tx", children: line.text })] }, j))) }), _jsx("div", { className: "akt-cap", children: scene.caption })] }, i))) }) }), _jsx("div", { className: "akt-dots", "aria-hidden": "true", children: scenes.map((_, i) => _jsx("i", { style: { animation: `akt-dot-${scenes.length} ${cycle}s ${i * SCENE_SECONDS}s infinite` } }, i)) })] }));
|
|
36
36
|
}
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
/**
|
|
38
|
+
* "Why <tool> · the short version": three benefits, and the other Addis tools. A tool can put a
|
|
39
|
+
* "Works with" card in the third benefit's place instead.
|
|
40
|
+
*/
|
|
41
|
+
export function Why({ tool, benefits, works }) {
|
|
42
|
+
return (_jsxs("section", { className: "akt-why", children: [_jsxs("h2", { children: ["Why ", toolName(tool), _jsx("small", { children: "the short version" })] }), _jsxs("div", { className: "akt-cards", children: [benefits.map((benefit) => (_jsxs("div", { className: "akt-card", children: [_jsx("div", { className: "akt-dash" }), _jsx("h3", { children: benefit.title }), _jsx("p", { children: benefit.text })] }, benefit.title))), works && _jsx(Works, { works: works }), _jsxs("div", { className: "akt-card", children: [_jsxs("h3", { children: ["Addis tools", _jsx("small", { children: "they work together" })] }), _jsx("div", { className: "akt-family", children: TOOLS.filter((t) => t.id !== tool).map((t) => (_jsxs("a", { className: "akt-row", href: `https://${t.domain}`, children: [_jsxs("strong", { children: [_jsx(Mark, { tool: t.id, size: 18 }), t.name ?? t.id] }), _jsx("span", { children: t.short })] }, t.id))) })] })] })] }));
|
|
43
|
+
}
|
|
44
|
+
function Works({ works }) {
|
|
45
|
+
return (_jsxs("div", { className: "akt-card akt-works", children: [_jsxs("h3", { children: [works.title, works.note && _jsx("small", { children: works.note })] }), _jsx("div", { className: "akt-family", children: works.items.map((item) => (_jsxs("div", { className: "akt-work", children: [item.logo && (item.logo.dark
|
|
46
|
+
? _jsxs("span", { className: "akt-mark akt-work-logo", children: [_jsx("img", { className: "akt-light", src: item.logo.light, alt: "" }), _jsx("img", { className: "akt-dark", src: item.logo.dark, alt: "" })] })
|
|
47
|
+
: _jsx("span", { className: "akt-work-logo", children: _jsx("img", { src: item.logo.light, alt: "" }) })), _jsxs("div", { children: [_jsx("strong", { children: item.name }), item.note && _jsx("span", { children: item.note })] })] }, item.name))) })] }));
|
|
40
48
|
}
|
|
41
49
|
/** The docs, after rixse.dev: the pages down the side, the page on the right. */
|
|
42
|
-
export function DocsLayout({ tool, pages, pathname, eyebrow = 'Documentation', title, lede, note, home = '/', Link = PlainLink, children }) {
|
|
50
|
+
export function DocsLayout({ tool, pages, pathname, eyebrow = 'Documentation', title, lede, note, footnote, home = '/', Link = PlainLink, children }) {
|
|
43
51
|
const here = (href) => href.replace(/\/$/, '') === pathname.replace(/\/$/, '');
|
|
44
|
-
return (_jsxs("div", { className: "akt akt-docs", "data-tool": tool, children: [_jsxs("div", { className: "akt-docs-grid", children: [_jsxs("aside", { className: "akt-side", children: [_jsxs(Link, { className: "akt-brand", href: home, children: [_jsx(Mark, { tool: tool }), tool, _jsx("span", { className: "akt-brand-docs", children: "docs" })] }), _jsx("nav", { "aria-label": "Docs", children: pages.map((page) => (_jsx(Link, { href: page.href, "aria-current": here(page.href) ? 'page' : undefined, children: page.title }, page.href))) }), note && _jsx("p", { className: "akt-side-note", children: note })] }), _jsxs("article", { className: "akt-doc", children: [_jsx("div", { className: "akt-eyebrow", children: eyebrow }), _jsx("h1", { children: title }), lede && _jsx("p", { className: "akt-lede", children: lede }), _jsx("div", { className: "akt-prose", children: children })] })] }), _jsx(Footer, { site: toolInfo(tool).domain })] }));
|
|
52
|
+
return (_jsxs("div", { className: "akt akt-docs", "data-tool": tool, children: [_jsxs("div", { className: "akt-docs-grid", children: [_jsxs("aside", { className: "akt-side", children: [_jsxs(Link, { className: "akt-brand", href: home, children: [_jsx(Mark, { tool: tool }), toolName(tool), _jsx("span", { className: "akt-brand-docs", children: "docs" })] }), _jsx("nav", { "aria-label": "Docs", children: pages.map((page) => (_jsx(Link, { href: page.href, "aria-current": here(page.href) ? 'page' : undefined, children: page.title }, page.href))) }), note && _jsx("p", { className: "akt-side-note", children: note })] }), _jsxs("article", { className: "akt-doc", children: [_jsx("div", { className: "akt-eyebrow", children: eyebrow }), _jsx("h1", { children: title }), lede && _jsx("p", { className: "akt-lede", children: lede }), _jsx("div", { className: "akt-prose", children: children })] })] }), _jsx(Footer, { site: toolInfo(tool).domain, note: footnote })] }));
|
|
45
53
|
}
|
|
46
54
|
/** A boxed aside. */
|
|
47
55
|
export function Callout({ children }) {
|
package/dist/tool/tools.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export type ToolInfo = {
|
|
|
5
5
|
domain: string;
|
|
6
6
|
/** One line, as the family list shows it. */
|
|
7
7
|
short: string;
|
|
8
|
+
/** The name as shown, when it isn't the id: `SecureCore`. */
|
|
9
|
+
name?: string;
|
|
8
10
|
};
|
|
9
11
|
export declare const TOOLS: ToolInfo[];
|
|
10
12
|
export declare function toolInfo(id: ToolId): ToolInfo;
|
|
13
|
+
/** A tool's name as every site shows it: its display name, else its id. */
|
|
14
|
+
export declare function toolName(id: ToolId): string;
|
package/dist/tool/tools.js
CHANGED
|
@@ -6,7 +6,7 @@ export const TOOLS = [
|
|
|
6
6
|
{ id: 'gelada', domain: 'gelada.addis.gg', short: 'OS sandboxes, without a container.' },
|
|
7
7
|
{ id: 'harar', domain: 'harar.addis.gg', short: 'A simple vault for your keys.' },
|
|
8
8
|
{ id: 'p8', domain: 'p8.addis.gg', short: 'PHP in pure Rust. Memory-safe.' },
|
|
9
|
-
{ id: 'securecore', domain: 'securecore.addis.gg', short: 'Every WordPress plugin in its own sandbox.' },
|
|
9
|
+
{ id: 'securecore', name: 'SecureCore', domain: 'securecore.addis.gg', short: 'Every WordPress plugin in its own sandbox.' },
|
|
10
10
|
];
|
|
11
11
|
export function toolInfo(id) {
|
|
12
12
|
const info = TOOLS.find((t) => t.id === id);
|
|
@@ -14,3 +14,7 @@ export function toolInfo(id) {
|
|
|
14
14
|
throw new Error(`unknown tool: ${id}`);
|
|
15
15
|
return info;
|
|
16
16
|
}
|
|
17
|
+
/** A tool's name as every site shows it: its display name, else its id. */
|
|
18
|
+
export function toolName(id) {
|
|
19
|
+
return toolInfo(id).name ?? id;
|
|
20
|
+
}
|
package/dist/tool.css
CHANGED
|
@@ -98,6 +98,14 @@
|
|
|
98
98
|
.akt-row strong { display: flex; align-items: center; gap: 8px; font: var(--akt-wm-weight) 16px/1 var(--akt-display); letter-spacing: var(--akt-wm-spacing); }
|
|
99
99
|
.akt-row span { color: var(--akt-soft); }
|
|
100
100
|
.akt-row:hover span { color: var(--akt-ink); }
|
|
101
|
+
/* "Works with": a logo (or nothing, where the owner allows the name only), the name, a note under it. */
|
|
102
|
+
.akt-work { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--akt-faint); }
|
|
103
|
+
.akt-work:last-child { border-bottom: 0; }
|
|
104
|
+
.akt-work > div { grid-column: 2; display: flex; flex-direction: column; gap: 3px; }
|
|
105
|
+
.akt-work strong { font: var(--akt-wm-weight) 16px/1.2 var(--akt-display); letter-spacing: var(--akt-wm-spacing); }
|
|
106
|
+
.akt-work span:not(.akt-work-logo) { font: 12px/1.5 var(--akt-mono); color: var(--akt-soft); }
|
|
107
|
+
.akt-work-logo { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
|
|
108
|
+
.akt-work-logo img { width: 28px; height: 28px; object-fit: contain; }
|
|
101
109
|
|
|
102
110
|
/* Docs, after rixse.dev: the pages down the side, the page on the right. */
|
|
103
111
|
.akt-docs { background-image: none; }
|
package/package.json
CHANGED