@knpkv/herdr-work 0.2.0

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/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@knpkv/herdr-work",
3
+ "version": "0.2.0",
4
+ "description": "Durable fleet work checkpoints and departure-board projections",
5
+ "license": "MIT",
6
+ "author": "knpkv",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/knpkv/npm.git",
10
+ "directory": "packages/herdr-work"
11
+ },
12
+ "type": "module",
13
+ "sideEffects": [
14
+ "*.css",
15
+ "**/*.css"
16
+ ],
17
+ "main": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ },
24
+ "./model": {
25
+ "types": "./dist/model.d.ts",
26
+ "import": "./dist/model.js"
27
+ },
28
+ "./react": {
29
+ "types": "./dist/view.d.ts",
30
+ "import": "./dist/view.js"
31
+ },
32
+ "./styles.css": "./src/styles.css"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "src/styles.css",
37
+ "README.md"
38
+ ],
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "engines": {
43
+ "node": ">=26"
44
+ },
45
+ "dependencies": {
46
+ "effect": "4.0.0-rc.109",
47
+ "@knpkv/herdr-fleet": "^0.2.0",
48
+ "@knpkv/rly": "^0.4.1"
49
+ },
50
+ "devDependencies": {
51
+ "@effect/platform-node": "4.0.0-rc.109",
52
+ "@effect/vitest": "4.0.0-rc.109",
53
+ "@types/node": "^26.2.0",
54
+ "@types/react": "^19.2.18",
55
+ "react": "^19.2.8",
56
+ "rimraf": "^6.1.3",
57
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
58
+ "vitest": "^4.1.10"
59
+ },
60
+ "peerDependencies": {
61
+ "react": "^19.2.8"
62
+ },
63
+ "scripts": {
64
+ "build": "rimraf dist && tsc -b --force",
65
+ "check": "tsc -b tsconfig.json",
66
+ "clean": "rimraf dist *.tsbuildinfo",
67
+ "lint": "eslint \"{src,test}/**/*.{ts,tsx}\"",
68
+ "pack:deterministic": "pnpm build && node ../../scripts/pack-herdr.mjs .",
69
+ "test": "vitest run"
70
+ }
71
+ }
package/src/styles.css ADDED
@@ -0,0 +1,197 @@
1
+ @layer herdr-work {
2
+ .work-page {
3
+ display: grid;
4
+ gap: var(--rly-space-24);
5
+ }
6
+ .work-page-intro {
7
+ align-items: end;
8
+ display: flex;
9
+ gap: var(--rly-space-32);
10
+ justify-content: space-between;
11
+ padding-block: var(--rly-space-24) var(--rly-space-8);
12
+ }
13
+ .work-page-intro > div:first-child {
14
+ display: grid;
15
+ gap: var(--rly-space-12);
16
+ max-inline-size: 60rem;
17
+ }
18
+ .work-snapshot-stamp {
19
+ align-items: end;
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: var(--rly-space-4);
23
+ white-space: nowrap;
24
+ }
25
+ .work-time-travel {
26
+ display: grid;
27
+ gap: var(--rly-space-12);
28
+ }
29
+ .work-time-heading,
30
+ .work-time-controls {
31
+ align-items: center;
32
+ display: flex;
33
+ gap: var(--rly-space-8);
34
+ }
35
+ .work-time-heading {
36
+ justify-content: space-between;
37
+ }
38
+ .work-time-heading > div {
39
+ display: grid;
40
+ gap: var(--rly-space-4);
41
+ }
42
+ .work-time-controls {
43
+ flex-wrap: wrap;
44
+ }
45
+ .work-summary-grid {
46
+ display: grid;
47
+ gap: var(--rly-space-8);
48
+ grid-template-columns: repeat(5, minmax(0, 1fr));
49
+ }
50
+ .work-summary-cell {
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: var(--rly-space-8);
54
+ }
55
+ .work-board-layout {
56
+ align-items: start;
57
+ display: grid;
58
+ gap: var(--rly-space-16);
59
+ grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.32fr);
60
+ }
61
+ .work-departure-board {
62
+ overflow: hidden;
63
+ }
64
+ .work-board-head,
65
+ .work-board-row {
66
+ align-items: center;
67
+ display: grid;
68
+ gap: var(--rly-space-16);
69
+ grid-template-columns: 7.5rem minmax(15rem, 1.4fr) minmax(8.75rem, 0.6fr) minmax(10.5rem, 0.7fr) 6rem 7rem;
70
+ padding: var(--rly-space-12) var(--rly-space-16);
71
+ }
72
+ .work-board-head {
73
+ color: var(--rly-color-text-3);
74
+ font: var(--rly-type-meta-weight) var(--rly-type-meta-size)/var(--rly-type-meta-line-height)
75
+ var(--rly-type-meta-font);
76
+ }
77
+ .work-board-row {
78
+ appearance: none;
79
+ background: var(--rly-color-surface-1);
80
+ border: 0;
81
+ border-block-start: 1px solid var(--rly-color-border-1);
82
+ color: var(--rly-color-text-1);
83
+ cursor: pointer;
84
+ inline-size: 100%;
85
+ min-block-size: 5.5rem;
86
+ text-align: start;
87
+ }
88
+ .work-board-row[aria-pressed="true"] {
89
+ background: var(--rly-color-surface-3);
90
+ }
91
+ .work-board-copy {
92
+ display: flex;
93
+ flex-direction: column;
94
+ gap: var(--rly-space-4);
95
+ min-inline-size: 0;
96
+ overflow-wrap: anywhere;
97
+ }
98
+ .work-inspector {
99
+ display: grid;
100
+ gap: var(--rly-space-16);
101
+ inset-block-start: var(--rly-space-16);
102
+ position: sticky;
103
+ }
104
+ .work-connect-link {
105
+ background: var(--rly-color-action-background);
106
+ border-radius: var(--rly-radius-field);
107
+ color: var(--rly-color-action-foreground);
108
+ font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)
109
+ var(--rly-type-label-font);
110
+ padding: var(--rly-space-12) var(--rly-space-16);
111
+ text-align: center;
112
+ text-decoration: none;
113
+ }
114
+ .work-facts {
115
+ display: grid;
116
+ gap: var(--rly-space-8);
117
+ margin: 0;
118
+ }
119
+ .work-facts > div {
120
+ border-block-start: 1px solid var(--rly-color-border-1);
121
+ display: grid;
122
+ gap: var(--rly-space-6);
123
+ padding-block-start: var(--rly-space-12);
124
+ }
125
+ .work-facts dt {
126
+ color: var(--rly-color-text-3);
127
+ font: var(--rly-type-meta-weight) var(--rly-type-meta-size)/var(--rly-type-meta-line-height)
128
+ var(--rly-type-meta-font);
129
+ }
130
+ .work-facts dd {
131
+ font: var(--rly-type-code-weight) var(--rly-type-code-size)/var(--rly-type-code-line-height)
132
+ var(--rly-type-code-font);
133
+ margin: 0;
134
+ overflow-wrap: anywhere;
135
+ }
136
+ @media (hover: hover) {
137
+ .work-board-row:hover {
138
+ background: var(--rly-color-surface-2);
139
+ }
140
+ }
141
+ @media (max-width: 74rem) {
142
+ .work-board-layout {
143
+ grid-template-columns: minmax(0, 1fr);
144
+ }
145
+ .work-inspector {
146
+ position: static;
147
+ }
148
+ .work-departure-board {
149
+ overflow-x: auto;
150
+ }
151
+ .work-board-head,
152
+ .work-board-row {
153
+ min-inline-size: 61rem;
154
+ }
155
+ }
156
+ @media (max-width: 47.5rem) {
157
+ .work-page-intro {
158
+ align-items: start;
159
+ flex-direction: column;
160
+ }
161
+ .work-snapshot-stamp {
162
+ align-items: start;
163
+ }
164
+ .work-summary-grid {
165
+ grid-template-columns: 1fr 1fr;
166
+ }
167
+ .work-departure-board {
168
+ overflow: hidden;
169
+ }
170
+ .work-board-head {
171
+ display: none;
172
+ }
173
+ .work-board-row {
174
+ align-items: start;
175
+ gap: var(--rly-space-12);
176
+ grid-template-columns: 1fr;
177
+ min-inline-size: 0;
178
+ padding: var(--rly-space-20);
179
+ }
180
+ .work-board-row > [data-label] {
181
+ display: grid;
182
+ gap: var(--rly-space-8);
183
+ grid-template-columns: 5.5rem minmax(0, 1fr);
184
+ }
185
+ .work-board-row > [data-label]::before {
186
+ color: var(--rly-color-text-3);
187
+ content: attr(data-label);
188
+ font: var(--rly-type-meta-weight) var(--rly-type-meta-size)/var(--rly-type-meta-line-height)
189
+ var(--rly-type-meta-font);
190
+ }
191
+ }
192
+ @media (max-width: 27.5rem) {
193
+ .work-summary-grid {
194
+ grid-template-columns: 1fr;
195
+ }
196
+ }
197
+ }