@addiscorp/kit 0.2.1 → 0.2.3

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 CHANGED
@@ -58,7 +58,7 @@ import { Header, Footer, HeaderButton, PersonIcon, themeBoot } from '@addiscorp/
58
58
 
59
59
  ## A tool's site
60
60
 
61
- Every Addis tool (rixse, mirab, woreda, kebele, gelada, harar, p8) gets the
61
+ Every Addis tool (rixse, mirab, woreda, kebele, gelada, harar, p8, securecore) gets the
62
62
  same site, after zega.dev: a hero with the install commands under the
63
63
  headline and a demo reel beside it, three benefits, the other Addis tools; and
64
64
  docs after rixse.dev. **Structure = kit, content = per site**: a site passes
@@ -86,7 +86,7 @@ import { ToolSite, Hero, Why, DocsLayout, Code, Step, Callout } from '@addiscorp
86
86
  </DocsLayout>
87
87
  ```
88
88
 
89
- - **The header** is the mark, the name and `docs`; nothing else until a tool needs it.
89
+ - **The header** is the mark, the name and `docs`. A tool that has more to link adds it after docs with `links` (p8: `links={[{ label: 'test suite', href: 'https://p8-test-suite.addis.gg' }]}`).
90
90
  - **The reel** is CSS only: its scenes play in turn, 5 s each, and each scene's lines appear one after another. With reduced motion it shows the first scene, still.
91
91
  - **Colours**: `data-tool` picks the tool's palette (`src/tool/palettes.css`, generated from its colour layout): one pale ground in light mode, a ground tinted with the brand in dark. The kit's footer and theme switch take the same colours.
92
92
  - **Marks** (`MARKS`, `<Mark tool size />`) are inline SVG for light and dark; the cut-outs between parts are `var(--ak-cut)`, set to whatever is behind the mark.
@@ -9,11 +9,18 @@ export declare function Mark({ tool, size }: {
9
9
  tool: ToolId;
10
10
  size?: number;
11
11
  }): import("react/jsx-runtime").JSX.Element;
12
+ /** A link in a tool site's header, after docs: `{ label: 'test suite', href: 'https://p8-test-suite.addis.gg' }`. */
13
+ export type HeaderLink = {
14
+ label: string;
15
+ href: string;
16
+ };
12
17
  /** Everything a tool site shows sits inside this: it sets the tool's colours, the header and the footer. */
13
- export declare function ToolSite({ tool, home, docs, Link, children }: {
18
+ export declare function ToolSite({ tool, home, docs, links, Link, children }: {
14
19
  tool: ToolId;
15
20
  home?: string;
16
21
  docs?: string;
22
+ /** More header links, after docs, for what only this tool has. */
23
+ links?: HeaderLink[];
17
24
  Link?: LinkComponent;
18
25
  children: ReactNode;
19
26
  }): import("react/jsx-runtime").JSX.Element;
@@ -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/', 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] }), _jsx("nav", { "aria-label": "Main", children: _jsx(Link, { href: docs, children: "docs" }) })] }), children] }), _jsx(Footer, { site: toolInfo(tool).domain })] }));
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 })] }));
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. */
@@ -27,4 +27,9 @@ export const MARKS = {
27
27
  light: "<rect width=\"24\" height=\"24\" rx=\"5.3\" fill=\"#6183BB\"/><g transform=\"translate(12 12) scale(0.0335) translate(-188.3 -114.7)\"><g transform=\"skewX(-10.5)\"><path d=\"M0 280V0H120C185 0 226 40 226 100C226 165 185 208 120 208H69V280Z\" fill=\"#FFFFFF\"/><path d=\"M69 54H112C140 54 154 70 154 96C154 132 135 155 105 155H69Z\" fill=\"#6183BB\"/></g><path transform=\"translate(207.5 208) scale(0.37)\" d=\"M267.49951171875 12.0Q186.04296875 12.0 130.6083984375 -8.684814453125Q75.173828125 -29.36962890625 46.7392578125 -66.95654296875Q18.3046875 -104.54345703125 18.3046875 -155.4345703125Q18.3046875 -201.4345703125 35.163330078125 -239.075927734375Q52.02197265625 -276.71728515625 84.02197265625 -305.358642578125Q116.02197265625 -334.0 159.2177734375 -350.36962890625Q126.84814453125 -372.54345703125 110.706787109375 -404.5Q94.5654296875 -436.45654296875 94.5654296875 -472.826171875Q94.5654296875 -523.2607421875 115.326171875 -564.619384765625Q136.0869140625 -605.97802734375 173.47802734375 -636.162841796875Q210.869140625 -666.34765625 260.67333984375 -682.71728515625Q310.4775390625 -699.0869140625 369.10791015625 -699.0869140625Q438.4775390625 -699.0869140625 489.596923828125 -678.13037109375Q540.71630859375 -657.173828125 568.922607421875 -619.0869140625Q597.12890625 -581.0 597.12890625 -529.10888671875Q597.12890625 -491.10888671875 583.67236328125 -457.69580078125Q570.2158203125 -424.28271484375 544.074462890625 -397.097900390625Q517.93310546875 -369.9130859375 479.10693359375 -350.36962890625Q519.2158203125 -331.0 541.661376953125 -297.315185546875Q564.10693359375 -263.63037109375 564.10693359375 -216.45654296875Q564.10693359375 -146.2177734375 526.683349609375 -95.032958984375Q489.259765625 -43.84814453125 422.60791015625 -15.924072265625Q355.9560546875 12.0 267.49951171875 12.0ZM275.6513671875 -106.564453125Q293.10791015625 -106.564453125 308.52099609375 -110.064453125Q323.93408203125 -113.564453125 337.8037109375 -120.292724609375Q351.67333984375 -127.02099609375 362.58642578125 -136.4775390625Q379.32568359375 -151.3037109375 389.380126953125 -172.227783203125Q399.4345703125 -193.15185546875 399.4345703125 -219.63037109375Q399.4345703125 -255.826171875 374.749755859375 -274.60888671875Q350.06494140625 -293.3916015625 308.76025390625 -293.3916015625Q292.390625 -293.3916015625 276.9775390625 -290.119873046875Q261.564453125 -286.84814453125 248.379638671875 -280.84814453125Q235.19482421875 -274.84814453125 224.28173828125 -265.3046875Q207.1728515625 -250.478515625 197.118408203125 -228.597900390625Q187.06396484375 -206.71728515625 187.06396484375 -179.32568359375Q187.06396484375 -144.1298828125 210.39013671875 -125.34716796875Q233.71630859375 -106.564453125 275.6513671875 -106.564453125ZM328.4775390625 -407.6083984375Q344.76025390625 -407.6083984375 359.814697265625 -411.021484375Q374.869140625 -414.4345703125 387.73876953125 -420.7607421875Q400.6083984375 -427.0869140625 411.06494140625 -436.28271484375Q426.6953125 -449.10888671875 435.32568359375 -468.43505859375Q443.9560546875 -487.76123046875 443.9560546875 -512.67431640625Q443.9560546875 -546.95703125 421.184326171875 -563.73974609375Q398.41259765625 -580.5224609375 359.58642578125 -580.5224609375Q343.1298828125 -580.5224609375 328.445068359375 -577.294189453125Q313.76025390625 -574.06591796875 301.3037109375 -568.15283203125Q288.84716796875 -562.23974609375 278.93408203125 -553.32666015625Q263.564453125 -539.50048828125 254.6513671875 -519.532958984375Q245.73828125 -499.5654296875 245.73828125 -473.45654296875Q245.73828125 -440.173828125 268.053466796875 -423.89111328125Q290.36865234375 -407.6083984375 328.4775390625 -407.6083984375Z\" fill=\"#FFFFFF\"/></g>",
28
28
  dark: "<rect width=\"24\" height=\"24\" rx=\"5.3\" fill=\"#6183BB\"/><g transform=\"translate(12 12) scale(0.0335) translate(-188.3 -114.7)\"><g transform=\"skewX(-10.5)\"><path d=\"M0 280V0H120C185 0 226 40 226 100C226 165 185 208 120 208H69V280Z\" fill=\"#FFFFFF\"/><path d=\"M69 54H112C140 54 154 70 154 96C154 132 135 155 105 155H69Z\" fill=\"#6183BB\"/></g><path transform=\"translate(207.5 208) scale(0.37)\" d=\"M267.49951171875 12.0Q186.04296875 12.0 130.6083984375 -8.684814453125Q75.173828125 -29.36962890625 46.7392578125 -66.95654296875Q18.3046875 -104.54345703125 18.3046875 -155.4345703125Q18.3046875 -201.4345703125 35.163330078125 -239.075927734375Q52.02197265625 -276.71728515625 84.02197265625 -305.358642578125Q116.02197265625 -334.0 159.2177734375 -350.36962890625Q126.84814453125 -372.54345703125 110.706787109375 -404.5Q94.5654296875 -436.45654296875 94.5654296875 -472.826171875Q94.5654296875 -523.2607421875 115.326171875 -564.619384765625Q136.0869140625 -605.97802734375 173.47802734375 -636.162841796875Q210.869140625 -666.34765625 260.67333984375 -682.71728515625Q310.4775390625 -699.0869140625 369.10791015625 -699.0869140625Q438.4775390625 -699.0869140625 489.596923828125 -678.13037109375Q540.71630859375 -657.173828125 568.922607421875 -619.0869140625Q597.12890625 -581.0 597.12890625 -529.10888671875Q597.12890625 -491.10888671875 583.67236328125 -457.69580078125Q570.2158203125 -424.28271484375 544.074462890625 -397.097900390625Q517.93310546875 -369.9130859375 479.10693359375 -350.36962890625Q519.2158203125 -331.0 541.661376953125 -297.315185546875Q564.10693359375 -263.63037109375 564.10693359375 -216.45654296875Q564.10693359375 -146.2177734375 526.683349609375 -95.032958984375Q489.259765625 -43.84814453125 422.60791015625 -15.924072265625Q355.9560546875 12.0 267.49951171875 12.0ZM275.6513671875 -106.564453125Q293.10791015625 -106.564453125 308.52099609375 -110.064453125Q323.93408203125 -113.564453125 337.8037109375 -120.292724609375Q351.67333984375 -127.02099609375 362.58642578125 -136.4775390625Q379.32568359375 -151.3037109375 389.380126953125 -172.227783203125Q399.4345703125 -193.15185546875 399.4345703125 -219.63037109375Q399.4345703125 -255.826171875 374.749755859375 -274.60888671875Q350.06494140625 -293.3916015625 308.76025390625 -293.3916015625Q292.390625 -293.3916015625 276.9775390625 -290.119873046875Q261.564453125 -286.84814453125 248.379638671875 -280.84814453125Q235.19482421875 -274.84814453125 224.28173828125 -265.3046875Q207.1728515625 -250.478515625 197.118408203125 -228.597900390625Q187.06396484375 -206.71728515625 187.06396484375 -179.32568359375Q187.06396484375 -144.1298828125 210.39013671875 -125.34716796875Q233.71630859375 -106.564453125 275.6513671875 -106.564453125ZM328.4775390625 -407.6083984375Q344.76025390625 -407.6083984375 359.814697265625 -411.021484375Q374.869140625 -414.4345703125 387.73876953125 -420.7607421875Q400.6083984375 -427.0869140625 411.06494140625 -436.28271484375Q426.6953125 -449.10888671875 435.32568359375 -468.43505859375Q443.9560546875 -487.76123046875 443.9560546875 -512.67431640625Q443.9560546875 -546.95703125 421.184326171875 -563.73974609375Q398.41259765625 -580.5224609375 359.58642578125 -580.5224609375Q343.1298828125 -580.5224609375 328.445068359375 -577.294189453125Q313.76025390625 -574.06591796875 301.3037109375 -568.15283203125Q288.84716796875 -562.23974609375 278.93408203125 -553.32666015625Q263.564453125 -539.50048828125 254.6513671875 -519.532958984375Q245.73828125 -499.5654296875 245.73828125 -473.45654296875Q245.73828125 -440.173828125 268.053466796875 -423.89111328125Q290.36865234375 -407.6083984375 328.4775390625 -407.6083984375Z\" fill=\"#FFFFFF\"/></g>",
29
29
  },
30
+ // SecureCore's icon: a padlock with a teal keyhole on its dark tile, the same in both themes.
31
+ securecore: {
32
+ light: "<rect width=\"24\" height=\"24\" rx=\"5.3\" fill=\"#11161D\"/><g transform=\"translate(2.16 2.16) scale(0.82)\"><path d=\"M7.6 11V7.6a4.4 4.4 0 0 1 8.8 0V11\" fill=\"none\" stroke=\"#E8ECEF\" stroke-width=\"2.9\"/><rect x=\"4\" y=\"10\" width=\"16\" height=\"12.2\" rx=\"2.6\" fill=\"#E8ECEF\"/><path d=\"M12 12.4a2.3 2.3 0 0 1 1.25 4.23L14 19.6h-4l0.75-2.97A2.3 2.3 0 0 1 12 12.4Z\" fill=\"#2DD4BF\"/></g>",
33
+ dark: "<rect width=\"24\" height=\"24\" rx=\"5.3\" fill=\"#11161D\"/><g transform=\"translate(2.16 2.16) scale(0.82)\"><path d=\"M7.6 11V7.6a4.4 4.4 0 0 1 8.8 0V11\" fill=\"none\" stroke=\"#E8ECEF\" stroke-width=\"2.9\"/><rect x=\"4\" y=\"10\" width=\"16\" height=\"12.2\" rx=\"2.6\" fill=\"#E8ECEF\"/><path d=\"M12 12.4a2.3 2.3 0 0 1 1.25 4.23L14 19.6h-4l0.75-2.97A2.3 2.3 0 0 1 12 12.4Z\" fill=\"#2DD4BF\"/></g>",
34
+ },
30
35
  };
@@ -1,4 +1,4 @@
1
- export type ToolId = 'rixse' | 'mirab' | 'woreda' | 'kebele' | 'gelada' | 'harar' | 'p8';
1
+ export type ToolId = 'rixse' | 'mirab' | 'woreda' | 'kebele' | 'gelada' | 'harar' | 'p8' | 'securecore';
2
2
  export type ToolInfo = {
3
3
  id: ToolId;
4
4
  /** Its site, without the scheme: `mirab.addis.gg`. */
@@ -6,6 +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
10
  ];
10
11
  export function toolInfo(id) {
11
12
  const info = TOOLS.find((t) => t.id === id);
package/dist/tool.css CHANGED
@@ -172,3 +172,6 @@
172
172
  .akt[data-tool="p8"] { --akt-reel: #141C2E; --akt-reelline: #2C3343; --akt-reelhl: #273147; --akt-reelacc: #9DB4E0; --akt-accent: #4A6AA3; --akt-btn: #4A6AA3; --akt-onbtn: #FFFFFF; --akt-dotoff: #BBBFC4; }
173
173
  :root[data-theme="dark"] .akt[data-tool="p8"] { --akt-reel: #141C2E; --akt-reelline: #2C3343; --akt-reelhl: #273147; --akt-reelacc: #9DB4E0; --akt-ground: #162035; --akt-card: #0E1522; --akt-faint: #323B4D; --akt-dots: #293245; --akt-accent: #9DB4E0; --akt-btn: #9DB4E0; --akt-onbtn: #11161D; --akt-dotoff: #465061; }
174
174
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .akt[data-tool="p8"] { --akt-reel: #141C2E; --akt-reelline: #2C3343; --akt-reelhl: #273147; --akt-reelacc: #9DB4E0; --akt-ground: #162035; --akt-card: #0E1522; --akt-faint: #323B4D; --akt-dots: #293245; --akt-accent: #9DB4E0; --akt-btn: #9DB4E0; --akt-onbtn: #11161D; --akt-dotoff: #465061; } }
175
+ .akt[data-tool="securecore"] { --akt-reel: #0E1514; --akt-reelline: #262D2C; --akt-reelhl: #15302C; --akt-reelacc: #2DD4BF; --akt-accent: #0F766E; --akt-btn: #0F766E; --akt-onbtn: #FFFFFF; --akt-dotoff: #BBBFC4; }
176
+ :root[data-theme="dark"] .akt[data-tool="securecore"] { --akt-reel: #0E1514; --akt-reelline: #262D2C; --akt-reelhl: #15302C; --akt-reelacc: #2DD4BF; --akt-ground: #0F1918; --akt-card: #0A1110; --akt-faint: #2B3433; --akt-dots: #222B2A; --akt-accent: #2DD4BF; --akt-btn: #2DD4BF; --akt-onbtn: #11161D; --akt-dotoff: #414C4B; }
177
+ @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .akt[data-tool="securecore"] { --akt-reel: #0E1514; --akt-reelline: #262D2C; --akt-reelhl: #15302C; --akt-reelacc: #2DD4BF; --akt-ground: #0F1918; --akt-card: #0A1110; --akt-faint: #2B3433; --akt-dots: #222B2A; --akt-accent: #2DD4BF; --akt-btn: #2DD4BF; --akt-onbtn: #11161D; --akt-dotoff: #414C4B; } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@addiscorp/kit",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "The header, footer, theme and tool-site layout every Addis site shares, in each project's own brand colours.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",