@blueshed/joined 0.0.0-stage → 0.1.19
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/.claude/skills/joined/SKILL.md +17 -0
- package/.claude/skills/joined/reference.md +768 -0
- package/LICENSE +19 -0
- package/README.md +115 -2
- package/docs/design.md +148 -0
- package/docs/introduction.md +193 -0
- package/docs/learning.md +76 -0
- package/docs/stories.md +82 -0
- package/examples/app.css +27 -0
- package/examples/cafe/books.html +38 -0
- package/examples/cafe/books.json +13 -0
- package/examples/cafe/books.ts +64 -0
- package/examples/cafe/cafe.css +512 -0
- package/examples/cafe/front.html +115 -0
- package/examples/cafe/front.ts +7 -0
- package/examples/cafe/generated/books.elements.ts +52 -0
- package/examples/cafe/generated/books.queries.ts +11 -0
- package/examples/cafe/generated/books.rules.ts +42 -0
- package/examples/cafe/generated/kitchen.elements.ts +87 -0
- package/examples/cafe/generated/kitchen.queries.ts +47 -0
- package/examples/cafe/generated/kitchen.rules.ts +98 -0
- package/examples/cafe/generated/menu.elements.ts +61 -0
- package/examples/cafe/generated/menu.queries.ts +28 -0
- package/examples/cafe/generated/menu.rules.ts +65 -0
- package/examples/cafe/generated/order.elements.ts +87 -0
- package/examples/cafe/generated/order.queries.ts +47 -0
- package/examples/cafe/generated/order.rules.ts +95 -0
- package/examples/cafe/generated/staff.elements.ts +55 -0
- package/examples/cafe/generated/staff.queries.ts +27 -0
- package/examples/cafe/generated/staff.rules.ts +59 -0
- package/examples/cafe/generated/supplies.elements.ts +62 -0
- package/examples/cafe/generated/supplies.queries.ts +43 -0
- package/examples/cafe/generated/supplies.rules.ts +84 -0
- package/examples/cafe/generated/till.elements.ts +93 -0
- package/examples/cafe/generated/till.queries.ts +57 -0
- package/examples/cafe/generated/till.rules.ts +113 -0
- package/examples/cafe/index.html +70 -0
- package/examples/cafe/kitchen.css +107 -0
- package/examples/cafe/kitchen.html +39 -0
- package/examples/cafe/kitchen.ts +125 -0
- package/examples/cafe/menu.html +55 -0
- package/examples/cafe/menu.json +41 -0
- package/examples/cafe/menu.ts +84 -0
- package/examples/cafe/migrations/001-cafe.ts +11 -0
- package/examples/cafe/order.html +37 -0
- package/examples/cafe/order.ts +45 -0
- package/examples/cafe/rail-drag.ts +30 -0
- package/examples/cafe/routes.ts +32 -0
- package/examples/cafe/staff.json +20 -0
- package/examples/cafe/stories.jsonl +43 -0
- package/examples/cafe/supplies.html +77 -0
- package/examples/cafe/supplies.json +33 -0
- package/examples/cafe/supplies.ts +170 -0
- package/examples/cafe/till.json +95 -0
- package/examples/cafe/till.ts +122 -0
- package/examples/cafe/trust.ts +20 -0
- package/examples/cafe/views.ts +171 -0
- package/examples/docs.ts +28 -0
- package/examples/film.jpg +0 -0
- package/examples/hello/generated/elements.ts +45 -0
- package/examples/hello/generated/queries.ts +24 -0
- package/examples/hello/generated/rules.ts +45 -0
- package/examples/hello/hello.css +27 -0
- package/examples/hello/hello.json +1 -0
- package/examples/hello/index.html +32 -0
- package/examples/hello/migrations/001-hello.ts +6 -0
- package/examples/hello/page.ts +49 -0
- package/examples/hello/routes.ts +6 -0
- package/examples/hello/stories.jsonl +3 -0
- package/examples/index.html +146 -0
- package/examples/page.ts +11 -0
- package/examples/people/adding.ts +20 -0
- package/examples/people/generated/elements.ts +68 -0
- package/examples/people/generated/queries.ts +28 -0
- package/examples/people/generated/rules.ts +85 -0
- package/examples/people/links.ts +124 -0
- package/examples/people/migrations/001-people.ts +6 -0
- package/examples/people/migrations/002-add-people-member-and-guard-people.ts +7 -0
- package/examples/people/migrations/003-add-people-rank-and-guard-people.ts +7 -0
- package/examples/people/order.ts +61 -0
- package/examples/people/people.css +65 -0
- package/examples/people/people.json +26 -0
- package/examples/people/routes.ts +12 -0
- package/examples/people/stories.jsonl +20 -0
- package/examples/people/trust.ts +14 -0
- package/examples/people/view.ts +115 -0
- package/examples/routes.ts +11 -0
- package/examples/trip/answer-rows.ts +70 -0
- package/examples/trip/answers.ts +11 -0
- package/examples/trip/bar.ts +89 -0
- package/examples/trip/calendar-map.css +709 -0
- package/examples/trip/calendar-map.ts +249 -0
- package/examples/trip/drags.ts +143 -0
- package/examples/trip/drawer.ts +250 -0
- package/examples/trip/event-form.ts +199 -0
- package/examples/trip/generated/elements.ts +144 -0
- package/examples/trip/generated/queries.ts +46 -0
- package/examples/trip/generated/rules.ts +239 -0
- package/examples/trip/holding.ts +61 -0
- package/examples/trip/ics.ts +117 -0
- package/examples/trip/index.html +82 -0
- package/examples/trip/line-stops.ts +92 -0
- package/examples/trip/line-words.ts +79 -0
- package/examples/trip/line.ts +121 -0
- package/examples/trip/map.ts +234 -0
- package/examples/trip/mercator.ts +28 -0
- package/examples/trip/migrations/001-trip.ts +7 -0
- package/examples/trip/migrations/002-add-events-zone-and-guard-events.ts +7 -0
- package/examples/trip/migrations/003-guard-events-and-create-events_asked-and-more.ts +9 -0
- package/examples/trip/migrations/004-create-stays.ts +6 -0
- package/examples/trip/migrations/005-guard-events-and-create-events_arrives-and-more.ts +8 -0
- package/examples/trip/month.ts +87 -0
- package/examples/trip/other-weeks.ts +67 -0
- package/examples/trip/page.ts +121 -0
- package/examples/trip/peek.ts +71 -0
- package/examples/trip/people-chips.ts +74 -0
- package/examples/trip/place-search.ts +51 -0
- package/examples/trip/places.ts +34 -0
- package/examples/trip/routes.ts +27 -0
- package/examples/trip/shell.ts +39 -0
- package/examples/trip/stays.css +51 -0
- package/examples/trip/stays.ts +68 -0
- package/examples/trip/stories.jsonl +72 -0
- package/examples/trip/time.ts +46 -0
- package/examples/trip/told.ts +48 -0
- package/examples/trip/trip.json +69 -0
- package/examples/trip/trust.ts +51 -0
- package/examples/trip/week.ts +237 -0
- package/examples/trip/words.ts +4 -0
- package/examples/trip/writes.ts +91 -0
- package/examples/trip/zones.ts +16 -0
- package/examples/trips/card.ts +149 -0
- package/examples/trips/generated/elements.ts +60 -0
- package/examples/trips/generated/queries.ts +28 -0
- package/examples/trips/generated/rules.ts +62 -0
- package/examples/trips/index.html +47 -0
- package/examples/trips/map.ts +52 -0
- package/examples/trips/migrations/001-trips.ts +8 -0
- package/examples/trips/new-trip.ts +46 -0
- package/examples/trips/page.ts +9 -0
- package/examples/trips/routes.ts +7 -0
- package/examples/trips/stories.jsonl +12 -0
- package/examples/trips/trips.css +183 -0
- package/examples/trips/trips.json +7 -0
- package/examples/weeks/derive.ts +23 -0
- package/examples/weeks/generated/elements.ts +52 -0
- package/examples/weeks/generated/rules.ts +33 -0
- package/examples/weeks/routes.ts +4 -0
- package/examples/weeks/weeks.json +1 -0
- package/examples/welcome.css +299 -0
- package/package.json +51 -4
- package/src/attachment.ts +70 -0
- package/src/cli.ts +52 -0
- package/src/client.ts +98 -0
- package/src/compile.ts +2034 -0
- package/src/css.d.ts +5 -0
- package/src/definitions.ts +268 -0
- package/src/demo.css +29 -0
- package/src/demo.ts +42 -0
- package/src/draft.ts +69 -0
- package/src/engine.ts +288 -0
- package/src/file-value.ts +13 -0
- package/src/files.ts +187 -0
- package/src/follow.ts +56 -0
- package/src/hues.ts +3 -0
- package/src/icon-names.ts +77 -0
- package/src/icon.png +0 -0
- package/src/icons.ts +32 -0
- package/src/keep.ts +33 -0
- package/src/link.ts +31 -0
- package/src/mcp.ts +252 -0
- package/src/members/demo.ts +53 -0
- package/src/members/generated/elements.ts +68 -0
- package/src/members/generated/queries.ts +29 -0
- package/src/members/generated/rules.ts +65 -0
- package/src/members/group.ts +294 -0
- package/src/members/keys.ts +221 -0
- package/src/members/members.json +9 -0
- package/src/members/migrations/001-members.ts +6 -0
- package/src/members/migrations/002-guard-members.ts +11 -0
- package/src/members/migrations/003-add-members-act-and-guard-members.ts +7 -0
- package/src/members/panel.css +208 -0
- package/src/members/panel.ts +398 -0
- package/src/members/routes.ts +4 -0
- package/src/members/stories.jsonl +27 -0
- package/src/members/trust.ts +116 -0
- package/src/migrate.ts +597 -0
- package/src/migrations/001-joined.ts +13 -0
- package/src/migrations/002-group-keys.ts +16 -0
- package/src/migrations/003-change-inverse.ts +10 -0
- package/src/migrations/004-change-followed.ts +6 -0
- package/src/ops.ts +61 -0
- package/src/page.css +79 -0
- package/src/page.ts +413 -0
- package/src/parts.css +471 -0
- package/src/parts.ts +152 -0
- package/src/server.ts +862 -0
- package/src/settings.ts +94 -0
- package/src/starter.ts +89 -0
- package/src/store.ts +815 -0
- package/src/stories.ts +387 -0
- package/src/toast.ts +52 -0
- package/src/together.ts +167 -0
- package/src/tokens.css +85 -0
- package/src/tokens.json +457 -0
- package/src/upkeep.ts +86 -0
- package/src/visitors.ts +43 -0
- package/src/write.ts +567 -0
- package/starter/CLAUDE.md +37 -0
- package/starter/gitignore +3 -0
- package/starter/tests/hello-page.test.ts +14 -0
- package/starter/tests/hello.test.ts +8 -0
- package/starter/tsconfig.json +17 -0
package/examples/app.css
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* The examples' own look, linked by each of their pages after joined/page.css (every page's layout,
|
|
2
|
+
src/page.css): the add form and the edge links. The root page's own is welcome.css. */
|
|
3
|
+
|
|
4
|
+
form.add {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
gap: var(--space-8);
|
|
8
|
+
}
|
|
9
|
+
/* a sheet's add field is its foot, the whole width */
|
|
10
|
+
footer > form.add {
|
|
11
|
+
flex: 1;
|
|
12
|
+
}
|
|
13
|
+
/* its refusal, under it (Said) */
|
|
14
|
+
form.add .said {
|
|
15
|
+
flex-basis: 100%;
|
|
16
|
+
}
|
|
17
|
+
form.add input {
|
|
18
|
+
flex: 1;
|
|
19
|
+
}
|
|
20
|
+
.edge {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
gap: var(--space-16);
|
|
24
|
+
align-items: center;
|
|
25
|
+
margin: var(--space-16) 0 0;
|
|
26
|
+
font: var(--font-small);
|
|
27
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>joined: your books</title>
|
|
7
|
+
<link rel="stylesheet" href="joined/tokens.css" />
|
|
8
|
+
<link rel="stylesheet" href="joined/page.css" />
|
|
9
|
+
<link rel="stylesheet" href="../app.css" />
|
|
10
|
+
<link rel="stylesheet" href="./cafe.css" />
|
|
11
|
+
</head>
|
|
12
|
+
<body data-flavour="grape">
|
|
13
|
+
<a class="brand" href="/"><img src="joined/icon.png" alt="" width="28" height="28" />joined</a>
|
|
14
|
+
<header class="band">
|
|
15
|
+
<h1>Your books</h1>
|
|
16
|
+
<p class="lead">
|
|
17
|
+
What you bought and sold, from each supply delivered. No one writes it: it's worked out as a supplier says
|
|
18
|
+
Delivered, and the supplier's books have the same delivery, sold.
|
|
19
|
+
</p>
|
|
20
|
+
<nav class="bar">
|
|
21
|
+
<members-panel></members-panel>
|
|
22
|
+
<a href="/cafe">The cafe</a> <a href="/cafe/till" data-holds="till">Till</a>
|
|
23
|
+
<a href="/cafe/menu" data-holds="menu">Menu</a>
|
|
24
|
+
<a href="/cafe/kitchen" data-holds="kitchen">Kitchen</a>
|
|
25
|
+
<a href="/cafe/supplies" data-holds="supplies">Supplies</a>
|
|
26
|
+
<a href="/cafe/books" data-holds="books" aria-current="page">Books</a>
|
|
27
|
+
</nav>
|
|
28
|
+
</header>
|
|
29
|
+
<main class="cafe books">
|
|
30
|
+
<section class="card" aria-label="Your books">
|
|
31
|
+
<j-entries></j-entries>
|
|
32
|
+
<p class="none" hidden>Nothing delivered yet. A supply you buy or sell shows here once it's delivered.</p>
|
|
33
|
+
<p class="sums"></p>
|
|
34
|
+
</section>
|
|
35
|
+
</main>
|
|
36
|
+
<script type="module" src="./books.ts"></script>
|
|
37
|
+
</body>
|
|
38
|
+
</html>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Your books: each supply delivered that you're party to, bought from whom or sold to whom, and its total; and what
|
|
2
|
+
// you've bought and sold in all. No one writes them: they're worked out from the supplies, as each is delivered. The
|
|
3
|
+
// supplier's books have the same delivery, sold.
|
|
4
|
+
|
|
5
|
+
import { members } from "joined/panel";
|
|
6
|
+
import "joined/toast";
|
|
7
|
+
import * as books from "./generated/books.rules.ts";
|
|
8
|
+
import { JEntry } from "./generated/books.elements.ts";
|
|
9
|
+
import { money, nameOf } from "./views.ts";
|
|
10
|
+
|
|
11
|
+
/** Every entry on the page, a live list. */
|
|
12
|
+
const entries = document.getElementsByTagName(books.collections.entries.tag) as HTMLCollectionOf<JEntry>;
|
|
13
|
+
/** What's bought and sold in all, said once for all the entries drawn at one time (not again for each). */
|
|
14
|
+
let summing = false;
|
|
15
|
+
const sum = () => summing || ((summing = true), queueMicrotask(sums));
|
|
16
|
+
const sums = () => {
|
|
17
|
+
summing = false;
|
|
18
|
+
const all = [...entries];
|
|
19
|
+
// none yet: said, in place of nothing at all
|
|
20
|
+
document.querySelector(".none")!.toggleAttribute("hidden", all.length > 0);
|
|
21
|
+
const of = (side: string) => all.filter((e) => e.data.side === side).reduce((n, e) => n + e.data.total, 0);
|
|
22
|
+
document.querySelector(".sums")!.replaceChildren(
|
|
23
|
+
...[
|
|
24
|
+
["Bought", of("bought")],
|
|
25
|
+
["Sold", of("sold")],
|
|
26
|
+
].map(([side, n]) => {
|
|
27
|
+
const row = document.createElement("span");
|
|
28
|
+
row.append(side as string, Object.assign(document.createElement("b"), { textContent: money(n as number) }));
|
|
29
|
+
return row;
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
class Entry extends JEntry {
|
|
34
|
+
connectedCallback() {
|
|
35
|
+
this.draw();
|
|
36
|
+
}
|
|
37
|
+
draw() {
|
|
38
|
+
const { title, side, buyer, supplier } = this.data;
|
|
39
|
+
const head = document.createElement("span");
|
|
40
|
+
head.append(
|
|
41
|
+
Object.assign(document.createElement("b"), { textContent: title }),
|
|
42
|
+
Object.assign(document.createElement("small"), {
|
|
43
|
+
textContent: side === "bought" ? `from ${nameOf(members, supplier)}` : `to ${nameOf(members, buyer)}`,
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
this.replaceChildren(
|
|
47
|
+
head,
|
|
48
|
+
Object.assign(document.createElement("span"), {
|
|
49
|
+
className: `pill ${this.data.side}`,
|
|
50
|
+
textContent: this.data.side,
|
|
51
|
+
}),
|
|
52
|
+
Object.assign(document.createElement("b"), { textContent: money(this.data.total) }),
|
|
53
|
+
);
|
|
54
|
+
sum();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// defined last, once all it draws with is made; then the sums, said once though there are no entries to draw
|
|
58
|
+
customElements.define(books.collections.entries.tag, Entry);
|
|
59
|
+
sum();
|
|
60
|
+
// the group's members, as they come: each entry's other side named again
|
|
61
|
+
new MutationObserver(() => [...entries].forEach((e) => (e as Entry).draw())).observe(
|
|
62
|
+
document.querySelector("members-panel")!,
|
|
63
|
+
{ subtree: true, childList: true, attributes: true },
|
|
64
|
+
);
|
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
/* The cafe's look: the till's form and board, the kitchen's rail, a customer's steps, supplies and books. Each
|
|
2
|
+
order a card of its own: its number and name, its lines, its moves.
|
|
3
|
+
|
|
4
|
+
Each page has a colour of its own, as the iMacs had: the cafe's face to its customers Bondi Blue (its front page, and
|
|
5
|
+
a customer's order), the till Tangerine, the kitchen Strawberry, the menu Blueberry, supplies Lime, books Grape (its
|
|
6
|
+
<body data-flavour>). One colour a page, on
|
|
7
|
+
white: a tint behind its band, its own tab, its main button, an order's state; the rest as joined draws it. Each
|
|
8
|
+
flavour is said four ways: bright, for its tints; deep, for its words; solid, a fill, with the words on it that
|
|
9
|
+
read (white, or for the light ones a dark of their own); and its hover, the fill under the pointer, darker, or for
|
|
10
|
+
the light ones lighter, so its words read more, never less (above 4.5:1 at rest and under the pointer). */
|
|
11
|
+
body[data-flavour="bondi"] {
|
|
12
|
+
--flavour: #0095b6;
|
|
13
|
+
--flavour-deep: #00728b;
|
|
14
|
+
--flavour-solid: #00728b;
|
|
15
|
+
--on-flavour: #fff;
|
|
16
|
+
--flavour-hover: #005a6e;
|
|
17
|
+
}
|
|
18
|
+
body[data-flavour="blueberry"] {
|
|
19
|
+
--flavour: #1e8cd7;
|
|
20
|
+
--flavour-deep: #1a6fb0;
|
|
21
|
+
--flavour-solid: #1a6fb0;
|
|
22
|
+
--on-flavour: #fff;
|
|
23
|
+
--flavour-hover: #155a90;
|
|
24
|
+
}
|
|
25
|
+
body[data-flavour="strawberry"] {
|
|
26
|
+
--flavour: #e83c6e;
|
|
27
|
+
--flavour-deep: #c42a5a;
|
|
28
|
+
--flavour-solid: #c42a5a;
|
|
29
|
+
--on-flavour: #fff;
|
|
30
|
+
--flavour-hover: #a2214a;
|
|
31
|
+
}
|
|
32
|
+
body[data-flavour="tangerine"] {
|
|
33
|
+
--flavour: #ff8c28;
|
|
34
|
+
--flavour-deep: #b35500;
|
|
35
|
+
--flavour-solid: #ff8c28;
|
|
36
|
+
--on-flavour: #3d1c00;
|
|
37
|
+
--flavour-hover: #ffa75c;
|
|
38
|
+
}
|
|
39
|
+
body[data-flavour="grape"] {
|
|
40
|
+
--flavour: #8a5cd6;
|
|
41
|
+
--flavour-deep: #6f45bd;
|
|
42
|
+
--flavour-solid: #6f45bd;
|
|
43
|
+
--on-flavour: #fff;
|
|
44
|
+
--flavour-hover: #5a379c;
|
|
45
|
+
}
|
|
46
|
+
body[data-flavour="lime"] {
|
|
47
|
+
--flavour: #5cbf3a;
|
|
48
|
+
--flavour-deep: #3a7f1e;
|
|
49
|
+
--flavour-solid: #5cbf3a;
|
|
50
|
+
--on-flavour: #133d05;
|
|
51
|
+
--flavour-hover: #7dcf61;
|
|
52
|
+
}
|
|
53
|
+
/* and the page's main button in it: joined's own tokens for it, set here, so a display's shadow has it too */
|
|
54
|
+
body[data-flavour] {
|
|
55
|
+
--flavour-tint: color-mix(in srgb, var(--flavour) 18%, transparent);
|
|
56
|
+
--flavour-ink: color-mix(in srgb, var(--flavour-deep) 45%, var(--ink));
|
|
57
|
+
--add: var(--flavour-solid);
|
|
58
|
+
--add-ink: var(--on-flavour);
|
|
59
|
+
--add-hover: var(--flavour-hover);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* the band: the page's title, its note and its bar, on its flavour's tint; its own tab filled */
|
|
63
|
+
header.band {
|
|
64
|
+
margin: 0 0 var(--space-16);
|
|
65
|
+
padding: var(--space-12) var(--space-16);
|
|
66
|
+
border-radius: 4px;
|
|
67
|
+
background: var(--flavour-tint);
|
|
68
|
+
color: var(--flavour-ink);
|
|
69
|
+
}
|
|
70
|
+
header.band h1 {
|
|
71
|
+
margin-top: 0;
|
|
72
|
+
color: inherit;
|
|
73
|
+
}
|
|
74
|
+
header.band .lead {
|
|
75
|
+
color: inherit;
|
|
76
|
+
}
|
|
77
|
+
nav.bar a {
|
|
78
|
+
padding: 2px var(--space-10);
|
|
79
|
+
border-radius: 99px;
|
|
80
|
+
background: color-mix(in srgb, var(--card) 60%, transparent);
|
|
81
|
+
color: var(--flavour-ink);
|
|
82
|
+
text-decoration: none;
|
|
83
|
+
}
|
|
84
|
+
nav.bar a[aria-current="page"] {
|
|
85
|
+
background: var(--flavour-solid);
|
|
86
|
+
color: var(--on-flavour);
|
|
87
|
+
}
|
|
88
|
+
.cafe {
|
|
89
|
+
display: grid;
|
|
90
|
+
gap: var(--space-16);
|
|
91
|
+
}
|
|
92
|
+
.cafe .card {
|
|
93
|
+
padding: var(--space-12);
|
|
94
|
+
border: 1px solid var(--edge);
|
|
95
|
+
border-radius: 4px;
|
|
96
|
+
background: var(--card);
|
|
97
|
+
}
|
|
98
|
+
.cafe h2 {
|
|
99
|
+
margin: 0 0 var(--space-8);
|
|
100
|
+
font: var(--font-heading);
|
|
101
|
+
}
|
|
102
|
+
nav.bar {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-wrap: wrap;
|
|
105
|
+
gap: var(--space-12);
|
|
106
|
+
align-items: center;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* what its person may not do isn't offered: a new order, to those who may add one (the till's orders' may), and a
|
|
110
|
+
supply, the same */
|
|
111
|
+
main.till:not(:has(j-orders[may~="add"])) .card:has(form.place),
|
|
112
|
+
main.supplies:not(:has(j-supplies[may~="add"])) .card:has(form.buy) {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* the till's new order: the menu, each item how many are wanted of how many are left, and the order building beside
|
|
117
|
+
it; on a phone, the order held at the foot of the screen, who it's for, its total and Place order in reach as
|
|
118
|
+
items are tapped (its lines are there in the items' own counts) */
|
|
119
|
+
form.place {
|
|
120
|
+
display: grid;
|
|
121
|
+
grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
|
|
122
|
+
gap: var(--space-16);
|
|
123
|
+
align-items: start;
|
|
124
|
+
}
|
|
125
|
+
@media (max-width: 40rem) {
|
|
126
|
+
form.place {
|
|
127
|
+
grid-template-columns: minmax(0, 1fr);
|
|
128
|
+
}
|
|
129
|
+
form.place .order {
|
|
130
|
+
top: auto;
|
|
131
|
+
bottom: 0;
|
|
132
|
+
}
|
|
133
|
+
form.place .order .lines {
|
|
134
|
+
display: none;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
form.place j-items {
|
|
138
|
+
display: grid;
|
|
139
|
+
grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
|
|
140
|
+
gap: var(--space-8);
|
|
141
|
+
}
|
|
142
|
+
form.place j-item {
|
|
143
|
+
display: grid;
|
|
144
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: var(--space-4) var(--space-8);
|
|
147
|
+
padding: var(--space-8) var(--space-12);
|
|
148
|
+
border: 1px solid var(--edge);
|
|
149
|
+
border-radius: 4px;
|
|
150
|
+
background: var(--card);
|
|
151
|
+
}
|
|
152
|
+
form.place j-item p {
|
|
153
|
+
margin: 0;
|
|
154
|
+
}
|
|
155
|
+
form.place j-item .head b {
|
|
156
|
+
font: var(--font-heading);
|
|
157
|
+
}
|
|
158
|
+
form.place j-item .price {
|
|
159
|
+
color: var(--muted);
|
|
160
|
+
font: var(--font-row);
|
|
161
|
+
}
|
|
162
|
+
/* one fewer, how many, one more: a thumb's size */
|
|
163
|
+
form.place j-item .steps {
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
gap: var(--space-8);
|
|
167
|
+
}
|
|
168
|
+
form.place j-item .steps .act {
|
|
169
|
+
min-width: 40px;
|
|
170
|
+
min-height: 40px;
|
|
171
|
+
justify-content: center;
|
|
172
|
+
font: var(--font-heading);
|
|
173
|
+
}
|
|
174
|
+
form.place j-item output {
|
|
175
|
+
min-width: 2ch;
|
|
176
|
+
text-align: center;
|
|
177
|
+
font: var(--font-heading);
|
|
178
|
+
}
|
|
179
|
+
/* how many of what's left: a bar the whole width, and its words */
|
|
180
|
+
form.place j-item .bar {
|
|
181
|
+
grid-column: 1 / -1;
|
|
182
|
+
height: 6px;
|
|
183
|
+
border-radius: 3px;
|
|
184
|
+
background: var(--well);
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
}
|
|
187
|
+
form.place j-item .bar i {
|
|
188
|
+
display: block;
|
|
189
|
+
height: 100%;
|
|
190
|
+
background: var(--flavour-solid);
|
|
191
|
+
}
|
|
192
|
+
form.place j-item .left {
|
|
193
|
+
grid-column: 1 / -1;
|
|
194
|
+
color: var(--muted);
|
|
195
|
+
font: var(--font-small);
|
|
196
|
+
}
|
|
197
|
+
/* all of what's left taken, said; none left, quiet */
|
|
198
|
+
form.place j-item[all] {
|
|
199
|
+
border-color: var(--flavour-deep);
|
|
200
|
+
}
|
|
201
|
+
form.place j-item[all] .left {
|
|
202
|
+
color: var(--flavour-ink);
|
|
203
|
+
}
|
|
204
|
+
form.place j-item[none] {
|
|
205
|
+
opacity: 0.5;
|
|
206
|
+
}
|
|
207
|
+
/* the order: who it's for, its lines and its total, and Place order */
|
|
208
|
+
form.place .order {
|
|
209
|
+
display: grid;
|
|
210
|
+
gap: var(--space-8);
|
|
211
|
+
padding: var(--space-12);
|
|
212
|
+
border: 1px solid var(--edge);
|
|
213
|
+
border-radius: 4px;
|
|
214
|
+
background: var(--card);
|
|
215
|
+
position: sticky;
|
|
216
|
+
top: var(--space-16);
|
|
217
|
+
}
|
|
218
|
+
form.place .lines {
|
|
219
|
+
display: grid;
|
|
220
|
+
gap: var(--space-4);
|
|
221
|
+
margin: 0;
|
|
222
|
+
padding: 0;
|
|
223
|
+
list-style: none;
|
|
224
|
+
font: var(--font-row);
|
|
225
|
+
}
|
|
226
|
+
form.place .lines li,
|
|
227
|
+
form.place .total {
|
|
228
|
+
display: flex;
|
|
229
|
+
justify-content: space-between;
|
|
230
|
+
margin: 0;
|
|
231
|
+
}
|
|
232
|
+
form.place .total {
|
|
233
|
+
padding-top: var(--space-8);
|
|
234
|
+
border-top: 1px solid var(--line);
|
|
235
|
+
font: var(--font-heading);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* the board: the kitchen's, ready to collect, finished, in three columns where there's room */
|
|
239
|
+
.board .heads,
|
|
240
|
+
.board j-orders {
|
|
241
|
+
display: grid;
|
|
242
|
+
grid-template-columns: repeat(3, 1fr);
|
|
243
|
+
gap: var(--space-12);
|
|
244
|
+
}
|
|
245
|
+
.board j-order {
|
|
246
|
+
grid-column: 1;
|
|
247
|
+
}
|
|
248
|
+
.board j-order[status="ready"] {
|
|
249
|
+
grid-column: 2;
|
|
250
|
+
}
|
|
251
|
+
.board j-order[status="collected"],
|
|
252
|
+
.board j-order[status="cancelled"] {
|
|
253
|
+
grid-column: 3;
|
|
254
|
+
opacity: 0.7;
|
|
255
|
+
}
|
|
256
|
+
@media (max-width: 40rem) {
|
|
257
|
+
.board .heads {
|
|
258
|
+
display: none;
|
|
259
|
+
}
|
|
260
|
+
.board j-orders {
|
|
261
|
+
grid-template-columns: 1fr;
|
|
262
|
+
}
|
|
263
|
+
.board j-order {
|
|
264
|
+
grid-column: 1 !important;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* an order: its number and name, its state, its lines, its moves. Its state a tag in the page's flavour, stronger
|
|
269
|
+
as it's made, outlined when ready; late after ten minutes, the tag filled and the card outlined */
|
|
270
|
+
j-orders {
|
|
271
|
+
display: grid;
|
|
272
|
+
gap: var(--space-8);
|
|
273
|
+
}
|
|
274
|
+
j-order {
|
|
275
|
+
display: block;
|
|
276
|
+
padding: var(--space-8) var(--space-12);
|
|
277
|
+
border: 1px solid var(--line);
|
|
278
|
+
border-radius: 4px;
|
|
279
|
+
}
|
|
280
|
+
j-order .state {
|
|
281
|
+
padding: 1px var(--space-8);
|
|
282
|
+
border-radius: 99px;
|
|
283
|
+
background: var(--flavour-tint);
|
|
284
|
+
color: var(--flavour-ink);
|
|
285
|
+
font: var(--font-small);
|
|
286
|
+
}
|
|
287
|
+
j-order[status="being made"] .state {
|
|
288
|
+
background: color-mix(in srgb, var(--flavour) 24%, transparent);
|
|
289
|
+
}
|
|
290
|
+
j-order[status="ready"] .state {
|
|
291
|
+
background: none;
|
|
292
|
+
box-shadow: inset 0 0 0 1px var(--flavour-deep);
|
|
293
|
+
}
|
|
294
|
+
j-order[status="collected"] .state,
|
|
295
|
+
j-order[status="cancelled"] .state {
|
|
296
|
+
background: var(--well);
|
|
297
|
+
color: var(--muted);
|
|
298
|
+
}
|
|
299
|
+
j-order[late] {
|
|
300
|
+
border-color: var(--flavour-deep);
|
|
301
|
+
}
|
|
302
|
+
j-order[late] .state {
|
|
303
|
+
background: var(--flavour-solid);
|
|
304
|
+
color: var(--on-flavour);
|
|
305
|
+
}
|
|
306
|
+
j-order p,
|
|
307
|
+
j-order ul {
|
|
308
|
+
margin: var(--space-4) 0;
|
|
309
|
+
}
|
|
310
|
+
j-order ul {
|
|
311
|
+
padding-left: var(--space-20);
|
|
312
|
+
}
|
|
313
|
+
j-order .acts {
|
|
314
|
+
display: flex;
|
|
315
|
+
gap: var(--space-8);
|
|
316
|
+
}
|
|
317
|
+
j-lines {
|
|
318
|
+
display: none;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* a customer's steps: where their order is; four across where there's room, two by two on a phone, so none wraps */
|
|
322
|
+
ol.steps {
|
|
323
|
+
display: grid;
|
|
324
|
+
grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
|
|
325
|
+
gap: var(--space-8);
|
|
326
|
+
padding: 0;
|
|
327
|
+
list-style: none;
|
|
328
|
+
}
|
|
329
|
+
ol.steps li {
|
|
330
|
+
padding: var(--space-4) var(--space-8);
|
|
331
|
+
border-radius: 99px;
|
|
332
|
+
background: var(--flavour-tint);
|
|
333
|
+
color: var(--flavour-ink);
|
|
334
|
+
text-align: center;
|
|
335
|
+
}
|
|
336
|
+
body[data-status="placed"] [data-step="placed"],
|
|
337
|
+
body[data-status="being made"] [data-step="being made"],
|
|
338
|
+
body[data-status="ready"] [data-step="ready"],
|
|
339
|
+
body[data-status="collected"] [data-step="collected"] {
|
|
340
|
+
background: var(--flavour-solid);
|
|
341
|
+
color: var(--on-flavour);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/* the supply form: each field over its name, Order at the end of the row */
|
|
345
|
+
form.add.buy {
|
|
346
|
+
display: grid;
|
|
347
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
|
|
348
|
+
align-items: end;
|
|
349
|
+
gap: var(--space-12);
|
|
350
|
+
}
|
|
351
|
+
form.add.buy label {
|
|
352
|
+
display: grid;
|
|
353
|
+
gap: var(--space-4);
|
|
354
|
+
font: var(--font-label);
|
|
355
|
+
}
|
|
356
|
+
form.add.buy button {
|
|
357
|
+
min-height: 40px;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/* supplies and books: a row each */
|
|
361
|
+
j-supplies,
|
|
362
|
+
j-entries {
|
|
363
|
+
display: grid;
|
|
364
|
+
}
|
|
365
|
+
j-supply,
|
|
366
|
+
j-entry {
|
|
367
|
+
display: block;
|
|
368
|
+
padding: var(--space-12) 0;
|
|
369
|
+
border-bottom: 1px solid var(--line);
|
|
370
|
+
}
|
|
371
|
+
j-supply:last-child,
|
|
372
|
+
j-entry:last-child {
|
|
373
|
+
border-bottom: 0;
|
|
374
|
+
}
|
|
375
|
+
/* a supply: what it is and where it is, what's in it at what terms, whose each part is, and its supplier's moves */
|
|
376
|
+
j-supply {
|
|
377
|
+
display: grid;
|
|
378
|
+
gap: var(--space-4);
|
|
379
|
+
}
|
|
380
|
+
j-supply p {
|
|
381
|
+
margin: 0;
|
|
382
|
+
}
|
|
383
|
+
j-supply .head {
|
|
384
|
+
display: flex;
|
|
385
|
+
flex-wrap: wrap;
|
|
386
|
+
align-items: baseline;
|
|
387
|
+
gap: var(--space-4) var(--space-12);
|
|
388
|
+
}
|
|
389
|
+
j-supply .head b {
|
|
390
|
+
font: var(--font-title);
|
|
391
|
+
}
|
|
392
|
+
j-supply .what {
|
|
393
|
+
font: var(--font-row);
|
|
394
|
+
}
|
|
395
|
+
j-supply .whose {
|
|
396
|
+
color: var(--muted);
|
|
397
|
+
font: var(--font-small);
|
|
398
|
+
}
|
|
399
|
+
j-supply .acts {
|
|
400
|
+
display: flex;
|
|
401
|
+
align-items: center;
|
|
402
|
+
gap: var(--space-8);
|
|
403
|
+
}
|
|
404
|
+
j-supply .acts:empty {
|
|
405
|
+
display: none;
|
|
406
|
+
}
|
|
407
|
+
.pill {
|
|
408
|
+
border-radius: 99px;
|
|
409
|
+
padding: 0 var(--space-8);
|
|
410
|
+
border: 1px solid var(--flavour);
|
|
411
|
+
font: var(--font-tiny);
|
|
412
|
+
}
|
|
413
|
+
.pill.here,
|
|
414
|
+
.pill.sold {
|
|
415
|
+
background: var(--flavour-solid);
|
|
416
|
+
border-color: var(--flavour-solid);
|
|
417
|
+
color: var(--on-flavour);
|
|
418
|
+
}
|
|
419
|
+
/* a statement: what it was, bought or sold, its total at the right */
|
|
420
|
+
j-entry {
|
|
421
|
+
display: grid;
|
|
422
|
+
grid-template-columns: minmax(0, 1fr) auto 6rem;
|
|
423
|
+
align-items: center;
|
|
424
|
+
gap: var(--space-12);
|
|
425
|
+
font: var(--font-row);
|
|
426
|
+
}
|
|
427
|
+
j-entry > span {
|
|
428
|
+
display: grid;
|
|
429
|
+
}
|
|
430
|
+
j-entry small {
|
|
431
|
+
color: var(--muted);
|
|
432
|
+
font: var(--font-small);
|
|
433
|
+
}
|
|
434
|
+
j-entry > b,
|
|
435
|
+
.sums b {
|
|
436
|
+
text-align: right;
|
|
437
|
+
font: var(--font-title);
|
|
438
|
+
}
|
|
439
|
+
.sums {
|
|
440
|
+
display: grid;
|
|
441
|
+
gap: var(--space-6);
|
|
442
|
+
margin: var(--space-12) 0 0;
|
|
443
|
+
padding-top: var(--space-12);
|
|
444
|
+
border-top: 2px solid var(--ink);
|
|
445
|
+
}
|
|
446
|
+
.sums span {
|
|
447
|
+
display: flex;
|
|
448
|
+
justify-content: space-between;
|
|
449
|
+
font: var(--font-row);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* the menu: an item a row, its words and, where its person may change it, the way into the drawer */
|
|
453
|
+
main.menu j-item {
|
|
454
|
+
display: flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
justify-content: space-between;
|
|
457
|
+
gap: var(--space-8);
|
|
458
|
+
padding: var(--space-4) 0;
|
|
459
|
+
border-top: 1px solid var(--line);
|
|
460
|
+
font: var(--font-row);
|
|
461
|
+
}
|
|
462
|
+
main.menu j-item:first-child {
|
|
463
|
+
border-top: 0;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* the cafe's front page: how to try it, a card for each page saying whose it is, and what it shows */
|
|
467
|
+
.front {
|
|
468
|
+
display: grid;
|
|
469
|
+
gap: var(--space-16);
|
|
470
|
+
}
|
|
471
|
+
.front .go {
|
|
472
|
+
display: flex;
|
|
473
|
+
flex-wrap: wrap;
|
|
474
|
+
gap: var(--space-8);
|
|
475
|
+
}
|
|
476
|
+
.front .pages {
|
|
477
|
+
display: grid;
|
|
478
|
+
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
|
|
479
|
+
gap: var(--space-12);
|
|
480
|
+
}
|
|
481
|
+
.front a.page {
|
|
482
|
+
display: grid;
|
|
483
|
+
align-content: start;
|
|
484
|
+
gap: var(--space-4);
|
|
485
|
+
padding: var(--space-12) var(--space-16);
|
|
486
|
+
border: 1px solid var(--edge);
|
|
487
|
+
border-radius: 4px;
|
|
488
|
+
background: var(--card);
|
|
489
|
+
color: var(--ink);
|
|
490
|
+
text-decoration: none;
|
|
491
|
+
}
|
|
492
|
+
.front a.page:hover {
|
|
493
|
+
border-color: var(--ink);
|
|
494
|
+
}
|
|
495
|
+
.front a.page b {
|
|
496
|
+
font: var(--font-heading);
|
|
497
|
+
}
|
|
498
|
+
.front a.page span {
|
|
499
|
+
font: var(--font-row);
|
|
500
|
+
}
|
|
501
|
+
.front a.page small {
|
|
502
|
+
color: var(--muted);
|
|
503
|
+
font: var(--font-small);
|
|
504
|
+
}
|
|
505
|
+
.front .how ul {
|
|
506
|
+
margin: 0;
|
|
507
|
+
padding-left: var(--space-20);
|
|
508
|
+
font: var(--font-row);
|
|
509
|
+
}
|
|
510
|
+
.front .go .act {
|
|
511
|
+
text-decoration: none;
|
|
512
|
+
}
|