ketatlas 0.1.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE.md +10 -0
  4. package/README.md +130 -0
  5. package/assets/INTER-LICENSE +93 -0
  6. package/assets/KETJS-LICENSE +21 -0
  7. package/assets/LUCIDE-LICENSE +43 -0
  8. package/assets/design-system.lock.json +56 -0
  9. package/assets/inter-latin-wght-normal.woff2 +0 -0
  10. package/assets/inter-vietnamese-wght-normal.woff2 +0 -0
  11. package/bin/audit.js +116 -0
  12. package/bin/ketatlas.js +148 -0
  13. package/bin/server.js +93 -0
  14. package/bin/viewer.js +20 -0
  15. package/docs/architecture.md +57 -0
  16. package/docs/authoring.md +49 -0
  17. package/docs/cli.md +70 -0
  18. package/docs/configuration.md +65 -0
  19. package/docs/integration.md +108 -0
  20. package/docs/migration.md +35 -0
  21. package/docs/releasing.md +40 -0
  22. package/package.json +59 -0
  23. package/schema.json +187 -0
  24. package/src/config.js +196 -0
  25. package/src/icons.js +23 -0
  26. package/src/index.d.ts +106 -0
  27. package/src/index.js +679 -0
  28. package/src/layout.js +103 -0
  29. package/src/template.js +38 -0
  30. package/styles/design-system.css +2838 -0
  31. package/styles/design-system.document.css +2838 -0
  32. package/styles/fonts.css +17 -0
  33. package/styles/ketatlas.css +992 -0
  34. package/templates/basic/README.md +14 -0
  35. package/templates/basic/atlas.json +45 -0
  36. package/templates/basic/ketatlas.schema.json +187 -0
  37. package/templates/basic/screens/done.html +18 -0
  38. package/templates/basic/screens/screen.css +48 -0
  39. package/templates/basic/screens/welcome.html +21 -0
  40. package/templates/basic/styles/LICENSE +21 -0
  41. package/templates/basic/styles/design-system.css +2838 -0
  42. package/templates/process/README.md +14 -0
  43. package/templates/process/atlas.json +83 -0
  44. package/templates/process/ketatlas.schema.json +187 -0
  45. package/templates/web/README.md +14 -0
  46. package/templates/web/atlas.json +77 -0
  47. package/templates/web/ketatlas.schema.json +187 -0
  48. package/templates/web/screens/demo.css +255 -0
  49. package/templates/web/screens/portal.html +41 -0
  50. package/templates/web/styles/LICENSE +21 -0
  51. package/templates/web/styles/design-system.css +2838 -0
@@ -0,0 +1,255 @@
1
+ /* Example product styles, separate from KetAtlas's viewer. */
2
+ @import url("../styles/design-system.css");
3
+ * {
4
+ box-sizing: border-box;
5
+ }
6
+ html,
7
+ body {
8
+ margin: 0;
9
+ height: 100%;
10
+ font-family: var(--kv-font-sans);
11
+ font-size: 15px;
12
+ color: var(--kv-text-main);
13
+ background: var(--kv-panel-bg);
14
+ }
15
+ body {
16
+ display: flex;
17
+ flex-direction: column;
18
+ }
19
+ button,
20
+ input {
21
+ font: inherit;
22
+ }
23
+ button,
24
+ a {
25
+ cursor: pointer;
26
+ }
27
+ button {
28
+ border-radius: var(--kv-radius-md);
29
+ }
30
+ h1,
31
+ h2,
32
+ h3,
33
+ p {
34
+ margin: 0;
35
+ }
36
+ p {
37
+ line-height: 1.65;
38
+ color: var(--kv-text-secondary);
39
+ }
40
+ small {
41
+ color: var(--kv-text-muted);
42
+ }
43
+ .status {
44
+ height: 32px;
45
+ display: flex;
46
+ justify-content: space-between;
47
+ padding: 10px 20px;
48
+ font-size: 12px;
49
+ flex: none;
50
+ }
51
+ .mobile-header {
52
+ padding: 20px;
53
+ border-bottom: 1px solid var(--kv-panel-border);
54
+ display: flex;
55
+ justify-content: space-between;
56
+ align-items: center;
57
+ }
58
+ .wordmark {
59
+ font-weight: 700;
60
+ letter-spacing: -0.03em;
61
+ font-size: 20px;
62
+ }
63
+ .logo {
64
+ background: var(--kv-accent);
65
+ color: var(--kv-on-accent);
66
+ width: 42px;
67
+ height: 42px;
68
+ border-radius: var(--kv-radius-lg);
69
+ display: grid;
70
+ place-items: center;
71
+ font-weight: 700;
72
+ font-size: 22px;
73
+ }
74
+ .mobile-body {
75
+ padding: 48px 28px;
76
+ flex: 1;
77
+ overflow: auto;
78
+ }
79
+ .eyebrow {
80
+ font-size: 11px;
81
+ font-weight: 600;
82
+ letter-spacing: 0.09em;
83
+ color: var(--kv-accent);
84
+ text-transform: uppercase;
85
+ margin-bottom: 12px;
86
+ }
87
+ .mobile-body h1 {
88
+ font-size: 32px;
89
+ letter-spacing: -0.045em;
90
+ line-height: 1.15;
91
+ margin: 28px 0 16px;
92
+ }
93
+ .mobile-body label {
94
+ display: block;
95
+ font-size: 13px;
96
+ font-weight: 600;
97
+ margin: 30px 0 10px;
98
+ }
99
+ .mobile-body input {
100
+ width: 100%;
101
+ height: 48px;
102
+ border: 1px solid var(--kv-input-border);
103
+ background: var(--kv-input-bg);
104
+ color: var(--kv-text-main);
105
+ border-radius: var(--kv-radius-md);
106
+ padding: 12px;
107
+ }
108
+ .mobile-footer {
109
+ border-top: 1px solid var(--kv-panel-border);
110
+ padding: 16px 20px 26px;
111
+ }
112
+ .mobile-footer button {
113
+ width: 100%;
114
+ height: 48px;
115
+ }
116
+ .alert {
117
+ padding: 16px;
118
+ border: 1px solid var(--kv-warning-border);
119
+ background: var(--kv-warning-bg);
120
+ color: var(--kv-warning);
121
+ border-radius: var(--kv-radius-md);
122
+ margin-top: 24px;
123
+ font-size: 13px;
124
+ }
125
+ .row-card {
126
+ padding: 20px 0;
127
+ border-bottom: 1px solid var(--kv-panel-border);
128
+ display: flex;
129
+ justify-content: space-between;
130
+ gap: 16px;
131
+ }
132
+ .row-card strong {
133
+ display: block;
134
+ margin-bottom: 6px;
135
+ }
136
+ .stat {
137
+ background: var(--kv-page-bg);
138
+ padding: 24px;
139
+ border-radius: var(--kv-radius-lg);
140
+ margin: 24px 0;
141
+ }
142
+ .stat strong {
143
+ font-size: 40px;
144
+ display: block;
145
+ letter-spacing: -0.05em;
146
+ }
147
+ .portal {
148
+ display: grid;
149
+ grid-template-columns: 220px 1fr;
150
+ height: 100%;
151
+ background: var(--kv-page-bg);
152
+ }
153
+ .portal aside {
154
+ padding: 30px 24px;
155
+ background: var(--kv-panel-bg);
156
+ border-right: 1px solid var(--kv-panel-border);
157
+ }
158
+ .portal nav {
159
+ margin-top: 56px;
160
+ display: grid;
161
+ gap: 12px;
162
+ }
163
+ .portal nav span {
164
+ padding: 12px;
165
+ border-radius: var(--kv-radius-md);
166
+ color: var(--kv-text-secondary);
167
+ }
168
+ .portal nav .active {
169
+ color: var(--kv-accent);
170
+ background: var(--kv-accent-subtle);
171
+ }
172
+ .portal main {
173
+ padding: 32px 48px;
174
+ overflow: auto;
175
+ }
176
+ .portal header {
177
+ display: flex;
178
+ justify-content: space-between;
179
+ align-items: center;
180
+ border-bottom: 1px solid var(--kv-panel-border);
181
+ padding-bottom: 26px;
182
+ margin-bottom: 36px;
183
+ }
184
+ .portal h1 {
185
+ font-size: 30px;
186
+ letter-spacing: -0.04em;
187
+ margin-bottom: 12px;
188
+ }
189
+ .portal .content-header {
190
+ display: flex;
191
+ justify-content: space-between;
192
+ align-items: center;
193
+ margin-bottom: 28px;
194
+ }
195
+ .panel {
196
+ border: 1px solid var(--kv-panel-border);
197
+ background: var(--kv-panel-bg);
198
+ border-radius: var(--kv-radius-lg);
199
+ padding: 28px;
200
+ }
201
+ table {
202
+ border-collapse: collapse;
203
+ width: 100%;
204
+ }
205
+ th,
206
+ td {
207
+ text-align: left;
208
+ padding: 19px 12px;
209
+ border-bottom: 1px solid var(--kv-panel-border);
210
+ font-size: 14px;
211
+ }
212
+ th {
213
+ font-size: 12px;
214
+ color: var(--kv-text-muted);
215
+ font-weight: 500;
216
+ }
217
+ tr:last-child td {
218
+ border: 0;
219
+ }
220
+ .pill {
221
+ background: var(--kv-warning-bg);
222
+ color: var(--kv-warning);
223
+ padding: 6px 10px;
224
+ border-radius: var(--kv-radius-full);
225
+ font-size: 12px;
226
+ }
227
+ .pill.success {
228
+ color: var(--kv-positive);
229
+ background: var(--kv-positive-bg);
230
+ }
231
+ .summary {
232
+ display: grid;
233
+ grid-template-columns: 1fr 1fr;
234
+ gap: 24px;
235
+ margin-bottom: 30px;
236
+ }
237
+ .summary small {
238
+ display: block;
239
+ margin-bottom: 8px;
240
+ }
241
+ .actions {
242
+ display: flex;
243
+ justify-content: flex-end;
244
+ gap: 12px;
245
+ margin-top: 24px;
246
+ }
247
+ .success-block {
248
+ padding: 50px 30px;
249
+ text-align: center;
250
+ }
251
+ .success-block .logo {
252
+ margin: 0 auto 24px;
253
+ background: var(--kv-positive-bg);
254
+ color: var(--kv-positive);
255
+ }
@@ -0,0 +1,41 @@
1
+ <!doctype html>
2
+ <html lang="en" data-theme="light">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
6
+ <title>Northstar purchasing</title>
7
+ <link rel="stylesheet" href="demo.css" />
8
+ </head>
9
+ <body data-kv-design-system>
10
+ <div class="portal">
11
+ <aside>
12
+ <div class="wordmark">northstar</div>
13
+ <nav>
14
+ <span>Overview</span><span class="active">Purchasing</span><span>Inventory</span
15
+ ><span>Suppliers</span><span>Reports</span>
16
+ </nav>
17
+ </aside>
18
+ <main>
19
+ <header><small>Operations / Purchasing</small><span>Alex Morgan · AM</span></header>
20
+ <div id="content"></div>
21
+ </main>
22
+ </div>
23
+ <script>
24
+ const screen = new URLSearchParams(location.search).get("screen") || "list";
25
+ const content = document.getElementById("content");
26
+ const go = (id) => (location.href = "?screen=" + id);
27
+ if (screen === "list")
28
+ content.innerHTML =
29
+ '<div class="content-header"><div><div class="eyebrow">Your approval queue</div><h1>Purchase requests</h1><p>Review requests before they reach your suppliers.</p></div><span class="pill">3 waiting for review</span></div><div class="panel"><table><thead><tr><th>Request</th><th>Requested by</th><th>Supplier</th><th>Amount</th><th>Status</th><th></th></tr></thead><tbody><tr><td><strong>PR-1042</strong><br><small>Office equipment</small></td><td>Jamie Chen</td><td>Paper & Co.</td><td>$1,240.00</td><td><span class="pill">Pending</span></td><td><button data-ui="action" data-variant="secondary" id="open">Review</button></td></tr><tr><td>PR-1041<br><small>Packaging supplies</small></td><td>Robin Lee</td><td>Packworks</td><td>$860.00</td><td><span class="pill">Pending</span></td><td></td></tr><tr><td>PR-1040<br><small>Warehouse shelving</small></td><td>Sam Taylor</td><td>Storage Lab</td><td>$2,180.00</td><td><span class="pill">Pending</span></td><td></td></tr></tbody></table></div>';
30
+ else if (screen === "review")
31
+ content.innerHTML =
32
+ '<div class="content-header"><div><div class="eyebrow">PR-1042</div><h1>Office equipment</h1><p>Requested by Jamie Chen · September 7, 2026</p></div><span class="pill">Pending review</span></div><div class="panel"><div class="summary"><div><small>Supplier</small><strong>Paper & Co.</strong></div><div><small>Delivery location</small><strong>Northstar · Main office</strong></div></div><table><thead><tr><th>Item</th><th>Quantity</th><th>Unit price</th><th>Amount</th></tr></thead><tbody><tr><td>Ergonomic desk chair</td><td>4</td><td>$260.00</td><td>$1,040.00</td></tr><tr><td>Adjustable monitor stand</td><td>4</td><td>$50.00</td><td>$200.00</td></tr></tbody></table><div class="actions"><strong>Total · $1,240.00</strong></div></div><div class="actions"><button id="back" data-ui="action" data-variant="secondary">Back to requests</button><button id="approve" data-ui="action" data-variant="primary">Approve request</button></div>';
33
+ else
34
+ content.innerHTML =
35
+ '<div class="panel success-block"><div class="logo">✓</div><div class="eyebrow">Approval recorded</div><h1>Ready for purchasing.</h1><p>PR-1042 has been approved for $1,240.00.<br>The purchasing team can now issue the order.</p><div class="actions" style="justify-content:center"><button id="back" data-ui="action" data-variant="primary">Back to requests</button></div></div>';
36
+ document.getElementById("open")?.addEventListener("click", () => go("review"));
37
+ document.getElementById("back")?.addEventListener("click", () => go("list"));
38
+ document.getElementById("approve")?.addEventListener("click", () => go("approved"));
39
+ </script>
40
+ </body>
41
+ </html>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 KETVIET JSC, Vietnam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.