@addiscorp/kit 0.2.4 → 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/tool/index.d.ts +28 -3
- package/dist/tool/index.js +11 -3
- package/dist/tool.css +8 -0
- package/package.json +1 -1
package/dist/tool/index.d.ts
CHANGED
|
@@ -72,11 +72,36 @@ export type Benefit = {
|
|
|
72
72
|
title: string;
|
|
73
73
|
text: string;
|
|
74
74
|
};
|
|
75
|
-
/**
|
|
76
|
-
|
|
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 }: {
|
|
77
97
|
tool: ToolId;
|
|
98
|
+
} & ({
|
|
78
99
|
benefits: [Benefit, Benefit, Benefit];
|
|
79
|
-
|
|
100
|
+
works?: never;
|
|
101
|
+
} | {
|
|
102
|
+
benefits: [Benefit, Benefit];
|
|
103
|
+
works: WorksWith;
|
|
104
|
+
})): import("react/jsx-runtime").JSX.Element;
|
|
80
105
|
export type DocsPage = {
|
|
81
106
|
href: string;
|
|
82
107
|
title: string;
|
package/dist/tool/index.js
CHANGED
|
@@ -34,9 +34,17 @@ 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
50
|
export function DocsLayout({ tool, pages, pathname, eyebrow = 'Documentation', title, lede, note, footnote, home = '/', Link = PlainLink, children }) {
|
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