@graview/core 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 (327) hide show
  1. package/LICENSE +96 -0
  2. package/README.md +35 -0
  3. package/dist/app.d.ts +294 -0
  4. package/dist/app.d.ts.map +1 -0
  5. package/dist/app.js +49 -0
  6. package/dist/app.js.map +1 -0
  7. package/dist/arrange.d.ts +185 -0
  8. package/dist/arrange.d.ts.map +1 -0
  9. package/dist/arrange.js +456 -0
  10. package/dist/arrange.js.map +1 -0
  11. package/dist/beginning.d.ts +65 -0
  12. package/dist/beginning.d.ts.map +1 -0
  13. package/dist/beginning.js +94 -0
  14. package/dist/beginning.js.map +1 -0
  15. package/dist/bind.d.ts +42 -0
  16. package/dist/bind.d.ts.map +1 -0
  17. package/dist/bind.js +26 -0
  18. package/dist/bind.js.map +1 -0
  19. package/dist/city.d.ts +93 -0
  20. package/dist/city.d.ts.map +1 -0
  21. package/dist/city.js +160 -0
  22. package/dist/city.js.map +1 -0
  23. package/dist/cli/check/arrangement.d.ts +13 -0
  24. package/dist/cli/check/arrangement.d.ts.map +1 -0
  25. package/dist/cli/check/arrangement.js +63 -0
  26. package/dist/cli/check/arrangement.js.map +1 -0
  27. package/dist/cli/check/beginnings.d.ts +16 -0
  28. package/dist/cli/check/beginnings.d.ts.map +1 -0
  29. package/dist/cli/check/beginnings.js +53 -0
  30. package/dist/cli/check/beginnings.js.map +1 -0
  31. package/dist/cli/check/brand.d.ts +17 -0
  32. package/dist/cli/check/brand.d.ts.map +1 -0
  33. package/dist/cli/check/brand.js +153 -0
  34. package/dist/cli/check/brand.js.map +1 -0
  35. package/dist/cli/check/city.d.ts +17 -0
  36. package/dist/cli/check/city.d.ts.map +1 -0
  37. package/dist/cli/check/city.js +58 -0
  38. package/dist/cli/check/city.js.map +1 -0
  39. package/dist/cli/check/context.d.ts +50 -0
  40. package/dist/cli/check/context.d.ts.map +1 -0
  41. package/dist/cli/check/context.js +37 -0
  42. package/dist/cli/check/context.js.map +1 -0
  43. package/dist/cli/check/fields.d.ts +16 -0
  44. package/dist/cli/check/fields.d.ts.map +1 -0
  45. package/dist/cli/check/fields.js +237 -0
  46. package/dist/cli/check/fields.js.map +1 -0
  47. package/dist/cli/check/index.d.ts +14 -0
  48. package/dist/cli/check/index.d.ts.map +1 -0
  49. package/dist/cli/check/index.js +14 -0
  50. package/dist/cli/check/index.js.map +1 -0
  51. package/dist/cli/check/intelligence.d.ts +17 -0
  52. package/dist/cli/check/intelligence.d.ts.map +1 -0
  53. package/dist/cli/check/intelligence.js +136 -0
  54. package/dist/cli/check/intelligence.js.map +1 -0
  55. package/dist/cli/check/lenses.d.ts +17 -0
  56. package/dist/cli/check/lenses.d.ts.map +1 -0
  57. package/dist/cli/check/lenses.js +239 -0
  58. package/dist/cli/check/lenses.js.map +1 -0
  59. package/dist/cli/check/migrations.d.ts +16 -0
  60. package/dist/cli/check/migrations.d.ts.map +1 -0
  61. package/dist/cli/check/migrations.js +43 -0
  62. package/dist/cli/check/migrations.js.map +1 -0
  63. package/dist/cli/check/modules.d.ts +16 -0
  64. package/dist/cli/check/modules.d.ts.map +1 -0
  65. package/dist/cli/check/modules.js +123 -0
  66. package/dist/cli/check/modules.js.map +1 -0
  67. package/dist/cli/check/policy.d.ts +16 -0
  68. package/dist/cli/check/policy.d.ts.map +1 -0
  69. package/dist/cli/check/policy.js +90 -0
  70. package/dist/cli/check/policy.js.map +1 -0
  71. package/dist/cli/check/relations.d.ts +29 -0
  72. package/dist/cli/check/relations.d.ts.map +1 -0
  73. package/dist/cli/check/relations.js +279 -0
  74. package/dist/cli/check/relations.js.map +1 -0
  75. package/dist/cli/check/routes.d.ts +16 -0
  76. package/dist/cli/check/routes.d.ts.map +1 -0
  77. package/dist/cli/check/routes.js +31 -0
  78. package/dist/cli/check/routes.js.map +1 -0
  79. package/dist/cli/check/settings.d.ts +16 -0
  80. package/dist/cli/check/settings.d.ts.map +1 -0
  81. package/dist/cli/check/settings.js +81 -0
  82. package/dist/cli/check/settings.js.map +1 -0
  83. package/dist/cli/check.d.ts +36 -0
  84. package/dist/cli/check.d.ts.map +1 -0
  85. package/dist/cli/check.js +76 -0
  86. package/dist/cli/check.js.map +1 -0
  87. package/dist/cli/create.d.ts +20 -0
  88. package/dist/cli/create.d.ts.map +1 -0
  89. package/dist/cli/create.js +251 -0
  90. package/dist/cli/create.js.map +1 -0
  91. package/dist/cli/describe.d.ts +35 -0
  92. package/dist/cli/describe.d.ts.map +1 -0
  93. package/dist/cli/describe.js +230 -0
  94. package/dist/cli/describe.js.map +1 -0
  95. package/dist/cli/docs.d.ts +11 -0
  96. package/dist/cli/docs.d.ts.map +1 -0
  97. package/dist/cli/docs.js +152 -0
  98. package/dist/cli/docs.js.map +1 -0
  99. package/dist/cli/index.d.ts +18 -0
  100. package/dist/cli/index.d.ts.map +1 -0
  101. package/dist/cli/index.js +281 -0
  102. package/dist/cli/index.js.map +1 -0
  103. package/dist/extend.d.ts +23 -0
  104. package/dist/extend.d.ts.map +1 -0
  105. package/dist/extend.js +53 -0
  106. package/dist/extend.js.map +1 -0
  107. package/dist/graph/diff.d.ts +31 -0
  108. package/dist/graph/diff.d.ts.map +1 -0
  109. package/dist/graph/diff.js +71 -0
  110. package/dist/graph/diff.js.map +1 -0
  111. package/dist/graph/graph.d.ts +69 -0
  112. package/dist/graph/graph.d.ts.map +1 -0
  113. package/dist/graph/graph.js +284 -0
  114. package/dist/graph/graph.js.map +1 -0
  115. package/dist/graph/primitives.d.ts +52 -0
  116. package/dist/graph/primitives.d.ts.map +1 -0
  117. package/dist/graph/primitives.js +62 -0
  118. package/dist/graph/primitives.js.map +1 -0
  119. package/dist/graph/tracked.d.ts +31 -0
  120. package/dist/graph/tracked.d.ts.map +1 -0
  121. package/dist/graph/tracked.js +69 -0
  122. package/dist/graph/tracked.js.map +1 -0
  123. package/dist/graph/types.d.ts +34 -0
  124. package/dist/graph/types.d.ts.map +1 -0
  125. package/dist/graph/types.js +0 -0
  126. package/dist/graph/types.js.map +1 -0
  127. package/dist/index.d.ts +100 -0
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/index.js +90 -0
  130. package/dist/index.js.map +1 -0
  131. package/dist/installation.d.ts +112 -0
  132. package/dist/installation.d.ts.map +1 -0
  133. package/dist/installation.js +193 -0
  134. package/dist/installation.js.map +1 -0
  135. package/dist/intelligence-bridge.d.ts +73 -0
  136. package/dist/intelligence-bridge.d.ts.map +1 -0
  137. package/dist/intelligence-bridge.js +31 -0
  138. package/dist/intelligence-bridge.js.map +1 -0
  139. package/dist/invariants/engine.d.ts +36 -0
  140. package/dist/invariants/engine.d.ts.map +1 -0
  141. package/dist/invariants/engine.js +88 -0
  142. package/dist/invariants/engine.js.map +1 -0
  143. package/dist/invariants/types.d.ts +75 -0
  144. package/dist/invariants/types.d.ts.map +1 -0
  145. package/dist/invariants/types.js +2 -0
  146. package/dist/invariants/types.js.map +1 -0
  147. package/dist/modules.d.ts +75 -0
  148. package/dist/modules.d.ts.map +1 -0
  149. package/dist/modules.js +87 -0
  150. package/dist/modules.js.map +1 -0
  151. package/dist/mutations/decidable.d.ts +26 -0
  152. package/dist/mutations/decidable.d.ts.map +1 -0
  153. package/dist/mutations/decidable.js +39 -0
  154. package/dist/mutations/decidable.js.map +1 -0
  155. package/dist/mutations/define-mutation.d.ts +32 -0
  156. package/dist/mutations/define-mutation.d.ts.map +1 -0
  157. package/dist/mutations/define-mutation.js +181 -0
  158. package/dist/mutations/define-mutation.js.map +1 -0
  159. package/dist/mutations/derive-edits.d.ts +75 -0
  160. package/dist/mutations/derive-edits.d.ts.map +1 -0
  161. package/dist/mutations/derive-edits.js +240 -0
  162. package/dist/mutations/derive-edits.js.map +1 -0
  163. package/dist/mutations/form.d.ts +63 -0
  164. package/dist/mutations/form.d.ts.map +1 -0
  165. package/dist/mutations/form.js +113 -0
  166. package/dist/mutations/form.js.map +1 -0
  167. package/dist/mutations/node-ref.d.ts +83 -0
  168. package/dist/mutations/node-ref.d.ts.map +1 -0
  169. package/dist/mutations/node-ref.js +113 -0
  170. package/dist/mutations/node-ref.js.map +1 -0
  171. package/dist/mutations/types.d.ts +136 -0
  172. package/dist/mutations/types.d.ts.map +1 -0
  173. package/dist/mutations/types.js +2 -0
  174. package/dist/mutations/types.js.map +1 -0
  175. package/dist/ops/log.d.ts +35 -0
  176. package/dist/ops/log.d.ts.map +1 -0
  177. package/dist/ops/log.js +103 -0
  178. package/dist/ops/log.js.map +1 -0
  179. package/dist/ops/types.d.ts +52 -0
  180. package/dist/ops/types.d.ts.map +1 -0
  181. package/dist/ops/types.js +2 -0
  182. package/dist/ops/types.js.map +1 -0
  183. package/dist/ops/undo.d.ts +33 -0
  184. package/dist/ops/undo.d.ts.map +1 -0
  185. package/dist/ops/undo.js +65 -0
  186. package/dist/ops/undo.js.map +1 -0
  187. package/dist/permissions/policy.d.ts +68 -0
  188. package/dist/permissions/policy.d.ts.map +1 -0
  189. package/dist/permissions/policy.js +191 -0
  190. package/dist/permissions/policy.js.map +1 -0
  191. package/dist/permissions/types.d.ts +78 -0
  192. package/dist/permissions/types.d.ts.map +1 -0
  193. package/dist/permissions/types.js +17 -0
  194. package/dist/permissions/types.js.map +1 -0
  195. package/dist/persistence/memory.d.ts +6 -0
  196. package/dist/persistence/memory.d.ts.map +1 -0
  197. package/dist/persistence/memory.js +31 -0
  198. package/dist/persistence/memory.js.map +1 -0
  199. package/dist/persistence/sqlite.d.ts +59 -0
  200. package/dist/persistence/sqlite.d.ts.map +1 -0
  201. package/dist/persistence/sqlite.js +131 -0
  202. package/dist/persistence/sqlite.js.map +1 -0
  203. package/dist/persistence/types.d.ts +22 -0
  204. package/dist/persistence/types.d.ts.map +1 -0
  205. package/dist/persistence/types.js +2 -0
  206. package/dist/persistence/types.js.map +1 -0
  207. package/dist/presence.d.ts +38 -0
  208. package/dist/presence.d.ts.map +1 -0
  209. package/dist/presence.js +50 -0
  210. package/dist/presence.js.map +1 -0
  211. package/dist/scaffold/domain.d.ts +8 -0
  212. package/dist/scaffold/domain.d.ts.map +1 -0
  213. package/dist/scaffold/domain.js +331 -0
  214. package/dist/scaffold/domain.js.map +1 -0
  215. package/dist/scaffold/index.d.ts +66 -0
  216. package/dist/scaffold/index.d.ts.map +1 -0
  217. package/dist/scaffold/index.js +142 -0
  218. package/dist/scaffold/index.js.map +1 -0
  219. package/dist/scaffold/lens.d.ts +31 -0
  220. package/dist/scaffold/lens.d.ts.map +1 -0
  221. package/dist/scaffold/lens.js +176 -0
  222. package/dist/scaffold/lens.js.map +1 -0
  223. package/dist/scaffold/names.d.ts +44 -0
  224. package/dist/scaffold/names.d.ts.map +1 -0
  225. package/dist/scaffold/names.js +69 -0
  226. package/dist/scaffold/names.js.map +1 -0
  227. package/dist/scaffold/project.d.ts +41 -0
  228. package/dist/scaffold/project.d.ts.map +1 -0
  229. package/dist/scaffold/project.js +604 -0
  230. package/dist/scaffold/project.js.map +1 -0
  231. package/dist/scaffold/ui.d.ts +15 -0
  232. package/dist/scaffold/ui.d.ts.map +1 -0
  233. package/dist/scaffold/ui.js +536 -0
  234. package/dist/scaffold/ui.js.map +1 -0
  235. package/dist/schema/define-node.d.ts +132 -0
  236. package/dist/schema/define-node.d.ts.map +1 -0
  237. package/dist/schema/define-node.js +254 -0
  238. package/dist/schema/define-node.js.map +1 -0
  239. package/dist/schema/figures.d.ts +42 -0
  240. package/dist/schema/figures.d.ts.map +1 -0
  241. package/dist/schema/figures.js +220 -0
  242. package/dist/schema/figures.js.map +1 -0
  243. package/dist/schema/json-schema.d.ts +39 -0
  244. package/dist/schema/json-schema.d.ts.map +1 -0
  245. package/dist/schema/json-schema.js +74 -0
  246. package/dist/schema/json-schema.js.map +1 -0
  247. package/dist/schema/schema.d.ts +43 -0
  248. package/dist/schema/schema.d.ts.map +1 -0
  249. package/dist/schema/schema.js +102 -0
  250. package/dist/schema/schema.js.map +1 -0
  251. package/dist/schema/types.d.ts +201 -0
  252. package/dist/schema/types.d.ts.map +1 -0
  253. package/dist/schema/types.js +2 -0
  254. package/dist/schema/types.js.map +1 -0
  255. package/dist/search.d.ts +215 -0
  256. package/dist/search.d.ts.map +1 -0
  257. package/dist/search.js +449 -0
  258. package/dist/search.js.map +1 -0
  259. package/dist/settings.d.ts +30 -0
  260. package/dist/settings.d.ts.map +1 -0
  261. package/dist/settings.js +74 -0
  262. package/dist/settings.js.map +1 -0
  263. package/dist/store.d.ts +284 -0
  264. package/dist/store.d.ts.map +1 -0
  265. package/dist/store.js +660 -0
  266. package/dist/store.js.map +1 -0
  267. package/dist/studio-door.d.ts +187 -0
  268. package/dist/studio-door.d.ts.map +1 -0
  269. package/dist/studio-door.js +20 -0
  270. package/dist/studio-door.js.map +1 -0
  271. package/dist/sync/conflict.d.ts +37 -0
  272. package/dist/sync/conflict.d.ts.map +1 -0
  273. package/dist/sync/conflict.js +56 -0
  274. package/dist/sync/conflict.js.map +1 -0
  275. package/dist/sync/engine.d.ts +118 -0
  276. package/dist/sync/engine.d.ts.map +1 -0
  277. package/dist/sync/engine.js +341 -0
  278. package/dist/sync/engine.js.map +1 -0
  279. package/dist/sync/google-calendar.d.ts +54 -0
  280. package/dist/sync/google-calendar.d.ts.map +1 -0
  281. package/dist/sync/google-calendar.js +167 -0
  282. package/dist/sync/google-calendar.js.map +1 -0
  283. package/dist/sync/types.d.ts +125 -0
  284. package/dist/sync/types.d.ts.map +1 -0
  285. package/dist/sync/types.js +6 -0
  286. package/dist/sync/types.js.map +1 -0
  287. package/dist/temporal/effectivity.d.ts +75 -0
  288. package/dist/temporal/effectivity.d.ts.map +1 -0
  289. package/dist/temporal/effectivity.js +89 -0
  290. package/dist/temporal/effectivity.js.map +1 -0
  291. package/dist/testing.d.ts +63 -0
  292. package/dist/testing.d.ts.map +1 -0
  293. package/dist/testing.js +194 -0
  294. package/dist/testing.js.map +1 -0
  295. package/dist/theme/contrast.d.ts +47 -0
  296. package/dist/theme/contrast.d.ts.map +1 -0
  297. package/dist/theme/contrast.js +172 -0
  298. package/dist/theme/contrast.js.map +1 -0
  299. package/dist/theme/derive.d.ts +81 -0
  300. package/dist/theme/derive.d.ts.map +1 -0
  301. package/dist/theme/derive.js +171 -0
  302. package/dist/theme/derive.js.map +1 -0
  303. package/dist/theme/kit.d.ts +106 -0
  304. package/dist/theme/kit.d.ts.map +1 -0
  305. package/dist/theme/kit.js +84 -0
  306. package/dist/theme/kit.js.map +1 -0
  307. package/dist/theme/palettes.d.ts +32 -0
  308. package/dist/theme/palettes.d.ts.map +1 -0
  309. package/dist/theme/palettes.js +96 -0
  310. package/dist/theme/palettes.js.map +1 -0
  311. package/dist/theme/types.d.ts +131 -0
  312. package/dist/theme/types.d.ts.map +1 -0
  313. package/dist/theme/types.js +23 -0
  314. package/dist/theme/types.js.map +1 -0
  315. package/dist/views/types.d.ts +89 -0
  316. package/dist/views/types.d.ts.map +1 -0
  317. package/dist/views/types.js +88 -0
  318. package/dist/views/types.js.map +1 -0
  319. package/dist/watched.d.ts +33 -0
  320. package/dist/watched.d.ts.map +1 -0
  321. package/dist/watched.js +50 -0
  322. package/dist/watched.js.map +1 -0
  323. package/dist/who.d.ts +26 -0
  324. package/dist/who.d.ts.map +1 -0
  325. package/dist/who.js +20 -0
  326. package/dist/who.js.map +1 -0
  327. package/package.json +77 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kit.js","sourceRoot":"","sources":["../../src/theme/kit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAa,MAAM,eAAe,CAAC;AAgFpE,MAAM,CAAC,MAAM,WAAW,GAAQ;IAC9B,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IAClE,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IAC3B,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;IACjC,OAAO,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AAM,CAAC,CAAC;IACtC,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7G,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,qHAAqH;AACrH,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,OAAO,GAAG,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { Scheme, ThemeTokens } from "./types.js";
2
+ /**
3
+ * The two the framework ships with, as DATA.
4
+ *
5
+ * They live in core rather than beside the components that read them for two
6
+ * reasons: `graview check` verifies a palette and must not import React to do
7
+ * it, and an app declaring its own brand in its domain layer needs a neutral
8
+ * base to build on without reaching into the UI package. A theme is a
9
+ * declaration, and declarations live here.
10
+ *
11
+ * Two schemes, and they are not inversions of each other. Depth is the thing
12
+ * being drawn, and depth behaves differently in the two:
13
+ *
14
+ * - **Dark** is a lit control surface. Things at depth lose luminance and
15
+ * dissolve into the ground; the accent reads as light, and separation comes
16
+ * from glow and a lit edge.
17
+ * - **Light** is daylight and paper. Things at depth lose CONTRAST and gain
18
+ * haze — real atmospheric perspective — and separation comes from soft cast
19
+ * shadow, the way objects on a desk separate. Inverting the dark scheme
20
+ * would give grey-on-grey mush, because glow does not exist in daylight.
21
+ *
22
+ * One rule holds across both: **secondary text is a colour, never an
23
+ * opacity.** Opacity composites against whatever is behind and fails contrast
24
+ * silently. `checkContrast` measures every pair on both, and axe-core checks
25
+ * the rendered result on every run of the a11y harness.
26
+ */
27
+ /** A lit control surface. */
28
+ export declare const DARK: ThemeTokens;
29
+ /** Daylight and paper. */
30
+ export declare const LIGHT: ThemeTokens;
31
+ export declare const SCHEMES: Record<Scheme, ThemeTokens>;
32
+ //# sourceMappingURL=palettes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palettes.d.ts","sourceRoot":"","sources":["../../src/theme/palettes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,6BAA6B;AAC7B,eAAO,MAAM,IAAI,EAAE,WA+BlB,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,KAAK,EAAE,WAoCnB,CAAC;AAGF,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAgC,CAAC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * The two the framework ships with, as DATA.
3
+ *
4
+ * They live in core rather than beside the components that read them for two
5
+ * reasons: `graview check` verifies a palette and must not import React to do
6
+ * it, and an app declaring its own brand in its domain layer needs a neutral
7
+ * base to build on without reaching into the UI package. A theme is a
8
+ * declaration, and declarations live here.
9
+ *
10
+ * Two schemes, and they are not inversions of each other. Depth is the thing
11
+ * being drawn, and depth behaves differently in the two:
12
+ *
13
+ * - **Dark** is a lit control surface. Things at depth lose luminance and
14
+ * dissolve into the ground; the accent reads as light, and separation comes
15
+ * from glow and a lit edge.
16
+ * - **Light** is daylight and paper. Things at depth lose CONTRAST and gain
17
+ * haze — real atmospheric perspective — and separation comes from soft cast
18
+ * shadow, the way objects on a desk separate. Inverting the dark scheme
19
+ * would give grey-on-grey mush, because glow does not exist in daylight.
20
+ *
21
+ * One rule holds across both: **secondary text is a colour, never an
22
+ * opacity.** Opacity composites against whatever is behind and fails contrast
23
+ * silently. `checkContrast` measures every pair on both, and axe-core checks
24
+ * the rendered result on every run of the a11y harness.
25
+ */
26
+ /** A lit control surface. */
27
+ export const DARK = {
28
+ // Not black: a deep blue-green that lets the accent read as light rather
29
+ // than as paint.
30
+ ground: "#080d12",
31
+ groundDeep: "#04070a",
32
+ wash: "radial-gradient(120% 80% at 50% -10%, var(--graview-glow) 0%, transparent 60%), " +
33
+ "radial-gradient(90% 60% at 12% 108%, rgba(111,220,234,0.10) 0%, transparent 62%)",
34
+ // Nearly opaque, by necessity as much as taste: a captured subtree has
35
+ // nothing behind it, so `backdrop-filter` is a no-op and a translucent fill
36
+ // composites against transparency.
37
+ panel: "rgba(20, 31, 39, 0.94)",
38
+ panelMuted: "rgba(15, 23, 30, 0.92)",
39
+ panelWarning: "rgba(44, 30, 17, 0.94)",
40
+ edge: "rgba(126, 196, 214, 0.20)",
41
+ edgeBright: "rgba(126, 220, 232, 0.55)",
42
+ ink: "#e8f3f6",
43
+ inkMuted: "#9fb6bf",
44
+ inkFaint: "#8aa3ad",
45
+ accent: "#6fdcea",
46
+ accentDim: "rgba(111, 220, 234, 0.35)",
47
+ accentInk: "#06232a",
48
+ warn: "#f0a868",
49
+ glow: "rgba(111, 220, 234, 0.28)",
50
+ bar: "linear-gradient(rgba(10,16,21,0.92), rgba(6,10,14,0.78))",
51
+ float: "linear-gradient(rgba(14,22,29,0.96), rgba(8,13,18,0.97))",
52
+ liftLow: "0 18px 50px -26px #000, inset 0 1px 0 rgba(126,196,214,0.20)",
53
+ liftHigh: "0 30px 70px -30px #000",
54
+ tintAlpha: 0.2,
55
+ tintLightness: 52,
56
+ gridAlpha: 0.35,
57
+ };
58
+ /** Daylight and paper. */
59
+ export const LIGHT = {
60
+ // Warm off-white rather than pure white: pure white under a full-bleed
61
+ // scene glares, and paper is never #fff.
62
+ ground: "#f6f4f0",
63
+ groundDeep: "#efece6",
64
+ wash: "radial-gradient(120% 80% at 50% -20%, rgba(255,255,255,0.9) 0%, transparent 58%), " +
65
+ "radial-gradient(80% 60% at 92% 104%, rgba(12,110,120,0.06) 0%, transparent 60%)",
66
+ panel: "#ffffff",
67
+ panelMuted: "#faf8f5",
68
+ panelWarning: "#fdf4ea",
69
+ edge: "rgba(24, 34, 38, 0.10)",
70
+ /*
71
+ * 0.67, not 0.42. A lit edge is not text and still owes 3:1 — an outline
72
+ * nobody can see is a panel with no edge — and at 0.42 over white this read
73
+ * at 1.93:1. Found by pointing the framework's own contrast check at the
74
+ * framework's own palette, which is the argument for having one.
75
+ */
76
+ edgeBright: "rgba(12, 110, 120, 0.67)",
77
+ ink: "#15201f",
78
+ // Both clear 4.5:1 on white and on the muted panel.
79
+ inkMuted: "#54605f",
80
+ inkFaint: "#67716f",
81
+ accent: "#0c6e78",
82
+ accentDim: "rgba(12, 110, 120, 0.22)",
83
+ accentInk: "#ffffff",
84
+ warn: "#9a5312",
85
+ glow: "rgba(12, 110, 120, 0.10)",
86
+ bar: "linear-gradient(rgba(255,255,255,0.96), rgba(250,248,245,0.86))",
87
+ float: "linear-gradient(#ffffff, #fcfbf9)",
88
+ // Layered, short-then-long: how something actually casts on a desk.
89
+ liftLow: "0 1px 2px rgba(20,30,32,0.06), 0 8px 24px -12px rgba(20,30,32,0.18)",
90
+ liftHigh: "0 2px 6px rgba(20,30,32,0.08), 0 28px 60px -24px rgba(20,30,32,0.28)",
91
+ tintAlpha: 0.16,
92
+ tintLightness: 46,
93
+ gridAlpha: 0.5,
94
+ };
95
+ export const SCHEMES = { dark: DARK, light: LIGHT };
96
+ //# sourceMappingURL=palettes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palettes.js","sourceRoot":"","sources":["../../src/theme/palettes.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,6BAA6B;AAC7B,MAAM,CAAC,MAAM,IAAI,GAAgB;IAC/B,yEAAyE;IACzE,iBAAiB;IACjB,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,SAAS;IACrB,IAAI,EACF,kFAAkF;QAClF,kFAAkF;IACpF,uEAAuE;IACvE,4EAA4E;IAC5E,mCAAmC;IACnC,KAAK,EAAE,wBAAwB;IAC/B,UAAU,EAAE,wBAAwB;IACpC,YAAY,EAAE,wBAAwB;IACtC,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,2BAA2B;IACvC,GAAG,EAAE,SA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} from "./kit.js";
2
+ /**
3
+ * The token contract, declared in core so it can be CHECKED.
4
+ *
5
+ * The palettes themselves live in `@graview/primitives`, which is where the
6
+ * components that read them live. The contract lives here for the same reason
7
+ * the schema does: `graview check` reads declarations, and a theme is a
8
+ * declaration. A custom palette can be wrong in ways nobody notices — a
9
+ * secondary text colour that clears 4.5:1 on a dark ground and fails badly on
10
+ * paper — and contrast is a property the framework can verify rather than
11
+ * trust.
12
+ */
13
+ export type Scheme = "light" | "dark";
14
+ export interface ThemeTokens {
15
+ readonly ground: string;
16
+ readonly groundDeep: string;
17
+ /** The wash behind the scene: gradients over the ground. */
18
+ readonly wash: string;
19
+ readonly panel: string;
20
+ readonly panelMuted: string;
21
+ readonly panelWarning: string;
22
+ readonly edge: string;
23
+ readonly edgeBright: string;
24
+ readonly ink: string;
25
+ readonly inkMuted: string;
26
+ readonly inkFaint: string;
27
+ readonly accent: string;
28
+ readonly accentDim: string;
29
+ readonly accentInk: string;
30
+ readonly warn: string;
31
+ readonly glow: string;
32
+ /** The command bar's ground. Chrome, not scene. */
33
+ readonly bar: string;
34
+ /** A surface floating over the scene — the inspector. */
35
+ readonly float: string;
36
+ /** Elevation for a panel sitting in the scene. */
37
+ readonly liftLow: string;
38
+ /** Elevation for something floating over it. */
39
+ readonly liftHigh: string;
40
+ /** How strongly a chip or span tint reads over the panel ground. */
41
+ readonly tintAlpha: number;
42
+ readonly tintLightness: number;
43
+ readonly gridAlpha: number;
44
+ }
45
+ /**
46
+ * Everything an installation puts its name on.
47
+ *
48
+ * Palette, wordmark and typography together, because they are one decision:
49
+ * a brand handing over a hex code has not given you a theme, and a brand
50
+ * handing over a logo without a colour has not either.
51
+ */
52
+ export interface Brand {
53
+ /** The product name, shown where the framework shows a wordmark. */
54
+ readonly name: string;
55
+ /**
56
+ * A logo, as an inline SVG string or a URL.
57
+ *
58
+ * Inline is preferred and is what `currentColor` support is for: a logo
59
+ * that inherits the ink colour works in both schemes without two files.
60
+ */
61
+ readonly logo?: string;
62
+ readonly typography?: {
63
+ /** Applied to everything. Include a real fallback stack. */
64
+ readonly body?: string;
65
+ /** Headings and the wordmark, when they differ from the body. */
66
+ readonly display?: string;
67
+ /** Code, ids, anything that must align in columns. */
68
+ readonly mono?: string;
69
+ };
70
+ /**
71
+ * How square and how tight this product is.
72
+ *
73
+ * The third axis of an identity, and the one that was missing: with only a
74
+ * palette and a wordmark, four apps built on this looked like the same
75
+ * application four times in different colours. A bid desk is square and
76
+ * dense; a household planner is round and roomy. Neither is a component
77
+ * change — both are one number.
78
+ */
79
+ readonly shape?: {
80
+ /** Corner radius for a panel, in pixels. Smaller reads as more formal. */
81
+ readonly radius?: number;
82
+ /** Padding multiplier. 1 is the framework's own spacing. */
83
+ readonly density?: number;
84
+ };
85
+ /**
86
+ * A HUE PER KIND, in degrees (0–360).
87
+ *
88
+ * The default is a stable hash — fine for "each kind looks like itself",
89
+ * useless for "our people are warm amber and our money is green". Declared
90
+ * here it reaches every surface that colours by kind (chips, districts,
91
+ * calendars) through one lookup, and `graview check` refuses a key that
92
+ * names no declared kind — a silent typo would just quietly hash instead.
93
+ */
94
+ readonly accents?: Readonly<Record<string, number>>;
95
+ readonly schemes: Readonly<Record<Scheme, ThemeTokens>>;
96
+ /**
97
+ * The kit: what the scene draws that is not a view — connectors, captions,
98
+ * grid, lattice, tags, marks — as this brand wants it. Any part; the rest
99
+ * as shipped. See `resolveKit`.
100
+ */
101
+ readonly kit?: KitOverrides;
102
+ /**
103
+ * A FIGURE PER KIND, the way a brand already overrides a kind's hue.
104
+ *
105
+ * An installation that has its own drawing of a person, or of the thing
106
+ * its domain calls a plot, says so here and the declaration stays the
107
+ * domain's. Same rules as a declared figure, and `graview check` holds
108
+ * both to them.
109
+ */
110
+ readonly figures?: Readonly<Record<string, string>>;
111
+ }
112
+ /**
113
+ * One place text is drawn on a ground, and what contrast it owes there.
114
+ *
115
+ * Enumerated rather than discovered, because "which pairs carry text" is a
116
+ * fact about the components and not about any particular palette — a brand
117
+ * cannot introduce a new pairing without changing a component, and if it
118
+ * does, this list is where that shows up.
119
+ */
120
+ export interface TextPair {
121
+ readonly ink: keyof ThemeTokens;
122
+ readonly on: keyof ThemeTokens;
123
+ /** What `on` composites over when it is translucent. */
124
+ readonly over?: keyof ThemeTokens;
125
+ /** WCAG AA: 4.5 for body text, 3 for large text and for meaningful edges. */
126
+ readonly requires: number;
127
+ /** Where this pairing actually happens, so a failure is findable. */
128
+ readonly where: string;
129
+ }
130
+ export declare const TEXT_PAIRS: readonly TextPair[];
131
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC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AC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IACxD;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACrD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,WAAW,CAAC;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,WAAW,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,WAAW,CAAC;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAqBzC,CAAC"}
@@ -0,0 +1,23 @@
1
+ export const TEXT_PAIRS = [
2
+ { ink: "ink", on: "panel", over: "ground", requires: 4.5, where: "body text in a panel" },
3
+ { ink: "ink", on: "panelMuted", over: "ground", requires: 4.5, where: "body text in a receded panel" },
4
+ { ink: "ink", on: "panelWarning", over: "ground", requires: 4.5, where: "body text in a flagged panel" },
5
+ { ink: "ink", on: "float", over: "ground", requires: 4.5, where: "the actions strip and the context menu" },
6
+ { ink: "ink", on: "bar", over: "ground", requires: 4.5, where: "the command bar" },
7
+ { ink: "inkMuted", on: "panel", over: "ground", requires: 4.5, where: "a subtitle" },
8
+ { ink: "inkMuted", on: "panelMuted", over: "ground", requires: 4.5, where: "a subtitle in a receded panel" },
9
+ { ink: "inkMuted", on: "float", over: "ground", requires: 4.5, where: "an observation in the strip" },
10
+ { ink: "inkFaint", on: "panel", over: "ground", requires: 4.5, where: "a field name" },
11
+ { ink: "inkFaint", on: "panelMuted", over: "ground", requires: 4.5, where: "a kind card's count" },
12
+ { ink: "inkFaint", on: "float", over: "ground", requires: 4.5, where: "a hint in the strip" },
13
+ { ink: "accent", on: "panel", over: "ground", requires: 4.5, where: "a selected label" },
14
+ { ink: "accent", on: "float", over: "ground", requires: 4.5, where: "a pending action" },
15
+ { ink: "accentInk", on: "accent", requires: 4.5, where: "text on a filled accent" },
16
+ { ink: "warn", on: "panel", over: "ground", requires: 4.5, where: "a problem count" },
17
+ { ink: "warn", on: "panelWarning", over: "ground", requires: 4.5, where: "a warning inside a flagged panel" },
18
+ { ink: "warn", on: "float", over: "ground", requires: 4.5, where: "a failed agent call" },
19
+ // An edge is not text, but a border that carries meaning owes 3:1 all the
20
+ // same — a panel outline nobody can see is a panel with no edge.
21
+ { ink: "edgeBright", on: "panel", over: "ground", requires: 3, where: "a lit edge" },
22
+ ];
23
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAqIA,MAAM,CAAC,MAAM,UAAU,GAAwB;IAC7C,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,sBAAsB,EAAE;IACzF,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,8BAA8B,EAAE;IACtG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,8BAA8B,EAAE;IACxG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,wCAAwC,EAAE;IAC3G,EAAE,GAAG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AG,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,yBAAyB,EAAE;IACnF,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACrF,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,kCAAkC,EAAE;IAC7G,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,qBAAqB,EAAE;IACzF,0EAA0E;IAC1E,iEAAiE;IACjE,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE;CACrF,CAAC"}
@@ -0,0 +1,89 @@
1
+ import type { AnySchema, KindOfSchema } from "../schema/schema.js";
2
+ /** One node, or a group of them standing in for a kind. */
3
+ export type Cardinality = "one" | "many";
4
+ /**
5
+ * How much of a node is drawn. This is the axis that keeps receded text
6
+ * legible: a calendar at depth switches to a denser summary view rather than
7
+ * scaling down into mush.
8
+ *
9
+ * - `full` live DOM, captured every frame it moves
10
+ * - `summary` captured on change into a cached texture
11
+ * - `glyph` painted in the shader, never captured
12
+ */
13
+ export type Fidelity = "full" | "summary" | "glyph";
14
+ export declare const FIDELITIES: readonly Fidelity[];
15
+ /** Views form a matrix, not a list. This names one cell of it. */
16
+ export interface ViewCell {
17
+ readonly cardinality: Cardinality;
18
+ readonly fidelity: Fidelity;
19
+ }
20
+ export interface ViewRegistration<V = unknown> {
21
+ readonly kind: string;
22
+ readonly cardinality: Cardinality;
23
+ readonly fidelity: Fidelity;
24
+ readonly view: V;
25
+ /** The place's name, when the registration gave it one. */
26
+ readonly title?: string;
27
+ }
28
+ /**
29
+ * What a registration may say about itself beyond the cell it fills.
30
+ *
31
+ * A `title` on a group view makes it a PLACE: a lens over the gardeners is
32
+ * "Who tends what", and an interface can list it, press it, and say where
33
+ * you are. Without a name a lens was only reachable by focusing the group
34
+ * it happened to be registered on, and once you had clicked into a member
35
+ * there was no way to know it existed, let alone get back to it.
36
+ */
37
+ export interface ViewMeta {
38
+ readonly title?: string;
39
+ /**
40
+ * For a picture over TWO kinds — a coverage matrix of practices against
41
+ * concerns — the other kind. A drive-in for such a picture stands on the
42
+ * road between the two plots rather than on one of them.
43
+ */
44
+ readonly across?: string;
45
+ }
46
+ /** A named group view: somewhere to go, by name. */
47
+ export interface Place {
48
+ readonly kind: string;
49
+ readonly title: string;
50
+ /** The other kind, when the picture is over two. */
51
+ readonly across?: string;
52
+ /**
53
+ * The short name this place answers to in a stop, from its title.
54
+ *
55
+ * A kind may have SEVERAL pictures — the week and the month are two
56
+ * questions about one pile of tasks — and a stop that could only say
57
+ * which GROUP you were looking at could not say which of them. So a place
58
+ * is addressable: `focus=aggregate:task&in.view=the-month`.
59
+ */
60
+ readonly as: string;
61
+ }
62
+ /** A place's own name in an address: its title, lower-cased and hyphenated. */
63
+ export declare function placeSlug(title: string): string;
64
+ export interface ViewRegistry<S extends AnySchema, V = unknown> {
65
+ /**
66
+ * Registering a view for a kind the schema never declared is a typecheck
67
+ * failure — `K` is constrained to the schema's kinds, so the mistake
68
+ * surfaces at build time rather than at render.
69
+ */
70
+ register<K extends KindOfSchema<S>>(kind: K, cell: ViewCell, view: V, meta?: ViewMeta): ViewRegistry<S, V>;
71
+ /** The exact cell, with no fallback. */
72
+ lookup(kind: string, cell: ViewCell): V | undefined;
73
+ /** Every named group view, in registration order. */
74
+ places(): readonly Place[];
75
+ /**
76
+ * The best available view for a cell: exact match, then a coarser fidelity,
77
+ * then the primitive fallback the caller supplies.
78
+ *
79
+ * `as` asks for one PLACE in particular — the month rather than the week
80
+ * over the same tasks. A name nothing was registered under falls through
81
+ * to the cell's own view rather than drawing nothing, because an address
82
+ * naming a place that has since been renamed should land you somewhere.
83
+ */
84
+ resolve(kind: string, cell: ViewCell, as?: string): ViewRegistration<V> | undefined;
85
+ all(): readonly ViewRegistration<V>[];
86
+ kindsWithViews(): readonly string[];
87
+ }
88
+ export declare function createViewRegistry<S extends AnySchema, V = unknown>(_schema: S): ViewRegistry<S, V>;
89
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/views/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnE,2DAA2D;AAC3D,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpD,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAAiC,CAAC;AAE5E,kEAAkE;AAClE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,OAAO;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAA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C,GACT,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAoEpB"}
@@ -0,0 +1,88 @@
1
+ export const FIDELITIES = ["full", "summary", "glyph"];
2
+ /** A place's own name in an address: its title, lower-cased and hyphenated. */
3
+ export function placeSlug(title) {
4
+ return title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
5
+ }
6
+ const key = (kind, cell, as = "") => `${kind}|${cell.cardinality}|${cell.fidelity}|${as}`;
7
+ /** Fidelity fallback order, coarsest-first from a given starting point. */
8
+ function fallbacks(fidelity) {
9
+ switch (fidelity) {
10
+ case "full":
11
+ return ["full", "summary", "glyph"];
12
+ case "summary":
13
+ return ["summary", "full", "glyph"];
14
+ case "glyph":
15
+ return ["glyph", "summary", "full"];
16
+ }
17
+ }
18
+ export function createViewRegistry(_schema) {
19
+ const entries = new Map();
20
+ /** Every named place, in the order it was registered. */
21
+ const named = [];
22
+ const registry = {
23
+ register(kind, cell, view, meta) {
24
+ const registration = {
25
+ kind,
26
+ cardinality: cell.cardinality,
27
+ fidelity: cell.fidelity,
28
+ view,
29
+ ...(meta?.title ? { title: meta.title } : {}),
30
+ };
31
+ /*
32
+ * A titled registration fills its cell AND stands on its own.
33
+ *
34
+ * The cell is what a group draws by default and the last registration
35
+ * wins it, as it always has — an app replacing the framework's own
36
+ * view is the whole point of the registry. The named copy is what
37
+ * makes a SECOND picture of one group reachable: the week and the
38
+ * month are two questions about one pile of tasks, and before this a
39
+ * kind could only ever have one answer.
40
+ */
41
+ entries.set(key(kind, cell), registration);
42
+ if (meta?.title) {
43
+ const as = placeSlug(meta.title);
44
+ entries.set(key(kind, cell, as), registration);
45
+ if (cell.cardinality === "many" && !named.some((place) => place.kind === kind && place.as === as)) {
46
+ named.push({ kind, title: meta.title, as, ...(meta.across ? { across: meta.across } : {}) });
47
+ }
48
+ }
49
+ return registry;
50
+ },
51
+ places: () => named,
52
+ lookup(kind, cell) {
53
+ return entries.get(key(kind, cell))?.view;
54
+ },
55
+ resolve(kind, cell, as) {
56
+ if (as) {
57
+ for (const fidelity of fallbacks(cell.fidelity)) {
58
+ const found = entries.get(key(kind, { cardinality: cell.cardinality, fidelity }, as));
59
+ if (found)
60
+ return found;
61
+ }
62
+ }
63
+ for (const fidelity of fallbacks(cell.fidelity)) {
64
+ const found = entries.get(key(kind, { cardinality: cell.cardinality, fidelity }));
65
+ if (found)
66
+ return found;
67
+ }
68
+ // A `one` view standing in for `many` is wrong; a `many` view standing
69
+ // in for `one` is merely dull. Only fall back in the safe direction.
70
+ if (cell.cardinality === "one") {
71
+ for (const fidelity of fallbacks(cell.fidelity)) {
72
+ const found = entries.get(key(kind, { cardinality: "many", fidelity }));
73
+ if (found)
74
+ return found;
75
+ }
76
+ }
77
+ return undefined;
78
+ },
79
+ all() {
80
+ return [...entries.values()];
81
+ },
82
+ kindsWithViews() {
83
+ return [...new Set([...entries.values()].map((e) => e.kind))];
84
+ },
85
+ };
86
+ return registry;
87
+ }
88
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/views/types.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAqD5E,+EAA+E;AAC/E,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC/E,CAAC;AAgCD,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,IAAc,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CACpD,GAAG,IAAI,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;AAEvD,2EAA2E;AAC3E,SAAS,SAAS,CAAC,QAAkB;IACnC,QAAQ,QAAQ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;YACrE,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;gBAC/B,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAChD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;oBACxE,IAAI,KAAK;wBAAE,OAAO,KAAK,CAAC;gBAC1B,CAAC;YACH,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,GAAG;YACD,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/B,CAAC;QACD,cAAc;YACZ,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChE,CAAC;KACF,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * WHAT A WATCHING HARNESS IS TOLD.
3
+ *
4
+ * The browser harnesses judge every screen they reach against the rules that
5
+ * hold everywhere (`scripts/lib/watch.mjs`). Two of those rules need what
6
+ * only the store knows: which strings are the declaration's own names — an
7
+ * act called `close-deal`, a role called `sales-manager`, a seat called
8
+ * `user-lena` — so that text showing one to a person can be caught exactly
9
+ * rather than guessed at; and which acts a press reached that the policy
10
+ * then refused, which is an act offered to somebody who may not take it.
11
+ *
12
+ * A page is watched when the harness defined `globalThis.__graviewWatch`
13
+ * before the app ran. Anywhere else this is one property read.
14
+ */
15
+ import type { Policy, Refusal } from "./permissions/types.js";
16
+ import type { AnySchema } from "./schema/schema.js";
17
+ /** The declaration's names, and the words it has for them. */
18
+ export declare function tellTheWatchItsNames(schema: AnySchema, mutations: Iterable<{
19
+ readonly name: string;
20
+ readonly title?: string;
21
+ }>, policy: Policy | undefined): void;
22
+ /**
23
+ * THE STORE ITSELF, for a harness that measures whether a person got a job
24
+ * done (`scripts/verify-journeys.mjs`). It drives the page as a person
25
+ * would and reads the log afterwards to say whether the press did what it
26
+ * meant — the screen saying so is the claim under test, not the evidence.
27
+ */
28
+ export declare function tellTheWatchOfAStore(store: unknown): void;
29
+ /** An author's id, once it has signed something: a seat's id is a name too. */
30
+ export declare function tellTheWatchOfAnAuthor(id: string | undefined): void;
31
+ /** A press reached the store and the policy refused it. */
32
+ export declare function tellTheWatchOfARefusal(refusal: Refusal, author: string | undefined): void;
33
+ //# sourceMappingURL=watched.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watched.d.ts","sourceRoot":"","sources":["../src/watched.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAUpD,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,QAAQ,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACvE,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,IAAI,CAuBN;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEzD;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAGnE;AAED,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAEzF"}
@@ -0,0 +1,50 @@
1
+ const theWatch = () => globalThis.__graviewWatch;
2
+ /** The declaration's names, and the words it has for them. */
3
+ export function tellTheWatchItsNames(schema, mutations, policy) {
4
+ const watch = theWatch();
5
+ if (!watch?.learn)
6
+ return;
7
+ const ids = [];
8
+ const words = [];
9
+ for (const definition of schema.definitions) {
10
+ ids.push(definition.kind);
11
+ words.push(definition.plural ?? "", definition.noun ?? "", definition.description ?? "");
12
+ const shape = definition.fields.shape ?? {};
13
+ ids.push(...Object.keys(shape));
14
+ for (const label of Object.values(definition.display?.labels ?? {}))
15
+ words.push(label);
16
+ for (const [name, edge] of Object.entries(definition.edges ?? {})) {
17
+ ids.push(name);
18
+ words.push(edge.description ?? "", edge.inverse ?? "");
19
+ }
20
+ }
21
+ for (const mutation of mutations) {
22
+ ids.push(mutation.name);
23
+ words.push(mutation.title ?? "");
24
+ }
25
+ for (const grant of policy?.grants ?? [])
26
+ if (grant.roles !== "*")
27
+ ids.push(...grant.roles);
28
+ ids.push(...(policy?.roles ?? []));
29
+ watch.learn({ ids, words: words.filter(Boolean) });
30
+ }
31
+ /**
32
+ * THE STORE ITSELF, for a harness that measures whether a person got a job
33
+ * done (`scripts/verify-journeys.mjs`). It drives the page as a person
34
+ * would and reads the log afterwards to say whether the press did what it
35
+ * meant — the screen saying so is the claim under test, not the evidence.
36
+ */
37
+ export function tellTheWatchOfAStore(store) {
38
+ theWatch()?.store?.(store);
39
+ }
40
+ /** An author's id, once it has signed something: a seat's id is a name too. */
41
+ export function tellTheWatchOfAnAuthor(id) {
42
+ if (id === undefined)
43
+ return;
44
+ theWatch()?.learn?.({ ids: [id], words: [] });
45
+ }
46
+ /** A press reached the store and the policy refused it. */
47
+ export function tellTheWatchOfARefusal(refusal, author) {
48
+ theWatch()?.refused?.({ ...refusal, ...(author === undefined ? {} : { author }) });
49
+ }
50
+ //# sourceMappingURL=watched.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watched.js","sourceRoot":"","sources":["../src/watched.ts"],"names":[],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./ops/types.js";
2
+ import type { Principal } from "./permissions/types.js";
3
+ import type { AnySchema } from "./schema/schema.js";
4
+ /**
5
+ * AN AUTHOR BY NAME. A principal's id is its user node's id where the app
6
+ * has an installation; where it has seats and no installation, the seat
7
+ * carries the name the person was offered it under. The rail said
8
+ * "user-lena Hometown (Again) no longer features Mara Vey" and the profile
9
+ * "U user-june" — ids, in two places a person reads — while the seats had
10
+ * been handed to the provider as "Lena, the label" and "June Arlo,
11
+ * producer".
12
+ */
13
+ export declare function nameOfAuthor(author: Pick<Author, "kind" | "id">, where: {
14
+ readonly graph: {
15
+ getNode(id: string): ({
16
+ id: string;
17
+ kind: string;
18
+ } & Record<string, unknown>) | undefined;
19
+ };
20
+ readonly schema: AnySchema;
21
+ readonly seats?: readonly {
22
+ readonly label: string;
23
+ readonly principal: Principal;
24
+ }[];
25
+ }): string;
26
+ //# sourceMappingURL=who.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"who.d.ts","sourceRoot":"","sources":["../src/who.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,EACnC,KAAK,EAAE;IACL,QAAQ,CAAC,KAAK,EAAE;QAAE,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAA;KAAE,CAAC;IAC9G,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;KAAE,EAAE,CAAC;CACvF,GACA,MAAM,CAMR"}