@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,604 @@
1
+ /** The packages a product depends on, in the order the skill lists them. */
2
+ export const GRAVIEW_PACKAGES = [
3
+ "core",
4
+ "layout",
5
+ "tools",
6
+ "render",
7
+ "react",
8
+ "primitives",
9
+ "pages",
10
+ "ship",
11
+ /*
12
+ * `embed` too, because the pages skill's last section tells a project to
13
+ * `mount` itself into somebody else's page — and a project scaffolded
14
+ * without it could not, in a repository that ships the package.
15
+ */
16
+ "embed",
17
+ /*
18
+ * `studio` too: the studio skill opens the project's own declaration as a
19
+ * graph, and a project without the package could not follow it.
20
+ */
21
+ "studio",
22
+ ];
23
+ /**
24
+ * Everything a linked project resolves from the framework checkout: the
25
+ * packages a product imports, plus the skills and the tool it takes as
26
+ * devDependencies. Each must be built before `--link` can work.
27
+ */
28
+ export const LINKED_PACKAGES = [...GRAVIEW_PACKAGES, "skills", "graview"];
29
+ /*
30
+ * THE PROJECT AROUND THE APP: its manifest, its compilers, its dev server,
31
+ * its README, its CI and the harnesses its own verify runs.
32
+ */
33
+ export const SURVEY_SAYS = [
34
+ "Photograph every place a person can land, at both widths and in both schemes,",
35
+ "and write the shots somewhere a person can flick through them. A screenshot",
36
+ "of every state is the cheapest way to find the one that is wrong.",
37
+ ];
38
+ export const AUDIT_SAYS = [
39
+ "Ask the questions a photograph makes you squint at, in numbers: is a control",
40
+ "under 24px, is one card drawn on top of another, is a caption cut mid-word,",
41
+ "is the same string on screen twice, does anything paint past the edge with",
42
+ "nowhere to scroll. Every one of these is found by eye first, which is exactly",
43
+ "why it belongs in a script.",
44
+ ];
45
+ export const A11Y_SAYS = [
46
+ "Run axe-core over every route at both widths in both schemes, and read the",
47
+ "real accessibility tree rather than assuming it. A populated tree is",
48
+ "necessary, not sufficient — it does not replace a screen-reader pass.",
49
+ ];
50
+ /**
51
+ * A harness that has not been written yet, and says so rather than passing.
52
+ *
53
+ * A green verdict from a script that measured nothing is worse than no
54
+ * script: it is a claim. This one exits non-zero, names what it is for, and
55
+ * points at the framework's own implementation to steal.
56
+ */
57
+ export function harness(name, says, ids) {
58
+ const quoted = (line) => JSON.stringify(line);
59
+ return `#!/usr/bin/env node
60
+ /**
61
+ * ${name} — NOT WRITTEN YET.
62
+ *
63
+ ${says.map((line) => ` * ${line}`).join("\n")}
64
+ *
65
+ * The framework's own is the one to steal: scripts/${name}.mjs in the
66
+ * Graview checkout. Run the app on http://localhost:${ids.port} and drive it.
67
+ */
68
+ for (const line of [
69
+ ${quoted(`${name}: this harness has not been written yet.`)},
70
+ ${says.map((line) => ` ${quoted(` ${line}`)},`).join("\n")}
71
+ "",
72
+ ${quoted(` Steal the framework's scripts/${name}.mjs and point it at this app.`)},
73
+ ]) {
74
+ console.error(line);
75
+ }
76
+ process.exit(1);
77
+ `;
78
+ }
79
+ /** The workspace root: what the app is, and where the harnesses go. */
80
+ export function workspaceRoot(ids, link) {
81
+ const run = ids.packageManager === "pnpm" ? "pnpm" : "npm run";
82
+ const inApp = (script) => ids.packageManager === "pnpm" ? `pnpm --filter ${ids.packageName} ${script}` : `npm run ${script} --workspace app`;
83
+ return `${JSON.stringify({
84
+ name: `${ids.packageName}-workspace`,
85
+ version: "0.0.0",
86
+ private: true,
87
+ type: "module",
88
+ description: `${ids.name}, on Graview.`,
89
+ engines: { node: ">=22" },
90
+ ...(ids.packageManager === "npm" ? { workspaces: ["app"] } : {}),
91
+ scripts: {
92
+ dev: inApp("dev"),
93
+ build: inApp("build"),
94
+ test: "vitest run",
95
+ typecheck: inApp("typecheck"),
96
+ check: inApp("check"),
97
+ verify: `${run} typecheck && ${run} test && ${run} build && ${run} check`,
98
+ // The harnesses, at the root, driving the app. Stubs until written.
99
+ survey: "node scripts/survey.mjs",
100
+ "audit-ui": "node scripts/audit-ui.mjs",
101
+ a11y: "node scripts/a11y.mjs",
102
+ },
103
+ ...(ids.packageManager === "pnpm" ? { pnpm: { onlyBuiltDependencies: ["esbuild"] } } : {}),
104
+ devDependencies: { typescript: "^5.7.2", vitest: "^2.1.8" },
105
+ ...(link ? { graview: { link } } : {}),
106
+ }, null, 2)}\n`;
107
+ }
108
+ /** The compiler options both the app and anything beside it share. */
109
+ export function tsconfigBase() {
110
+ return `${JSON.stringify({
111
+ compilerOptions: {
112
+ target: "ES2022",
113
+ lib: ["ES2022", "DOM", "DOM.Iterable"],
114
+ module: "ESNext",
115
+ moduleResolution: "Bundler",
116
+ strict: true,
117
+ noUncheckedIndexedAccess: true,
118
+ noImplicitOverride: true,
119
+ isolatedModules: true,
120
+ verbatimModuleSyntax: true,
121
+ skipLibCheck: true,
122
+ esModuleInterop: true,
123
+ forceConsistentCasingInFileNames: true,
124
+ jsx: "react-jsx",
125
+ },
126
+ }, null, 2)}\n`;
127
+ }
128
+ /** One test run for the whole workspace, whatever grows beside the app. */
129
+ export function rootVitest() {
130
+ return `import { defineConfig } from "vitest/config";
131
+
132
+ export default defineConfig({
133
+ test: { include: ["app/tests/**/*.test.ts?(x)", "tests/**/*.test.ts?(x)"] },
134
+ });
135
+ `;
136
+ }
137
+ /* ------------------------------------------------------------ manifests */
138
+ export function packageJson(ids, workspace) {
139
+ const dep = (pkg) => ids.link ? `link:${ids.link}/packages/${pkg}` : ids.range;
140
+ const graview = Object.fromEntries(GRAVIEW_PACKAGES.map((pkg) => [`@graview/${pkg}`, dep(pkg)]));
141
+ const run = ids.packageManager === "pnpm" ? "pnpm" : "npm run";
142
+ const manifest = {
143
+ name: ids.packageName,
144
+ version: "0.0.0",
145
+ private: true,
146
+ type: "module",
147
+ description: `${ids.name}, on Graview.`,
148
+ // Top-level await in main.tsx, and the framework's own floor.
149
+ engines: { node: ">=22" },
150
+ scripts: {
151
+ dev: "vite",
152
+ typecheck: "tsc -p tsconfig.json",
153
+ test: "vitest run",
154
+ // The declaration as plain modules — what check, docs and a host load.
155
+ "build:domain": "tsc -p tsconfig.build.json",
156
+ build: `${run} build:domain && vite build`,
157
+ // Each of these builds what it needs, so any one works cold.
158
+ check: `${run} build:domain && graview check ./dist/domain/app.js`,
159
+ docs: `${run} build:domain && graview docs ./dist/domain/app.js --out docs`,
160
+ // The store where the data is, and the door an agent comes in by. Both
161
+ // build the declaration first, so either works cold.
162
+ serve: `${run} build:domain && graview serve ./dist/domain/app.js --data data`,
163
+ mcp: `${run} build:domain && graview mcp ./dist/domain/app.js --data data`,
164
+ skills: "graview skills install .",
165
+ verify: `${run} typecheck && ${run} test && ${run} build && ${run} check`,
166
+ },
167
+ /*
168
+ * pnpm 10 refuses postinstall scripts it was not told about, and says so
169
+ * on every install; esbuild's is the one this project has. In a
170
+ * workspace the field only takes effect at the ROOT — pnpm warns about
171
+ * it here — so the root carries it and this does not.
172
+ */
173
+ ...(ids.packageManager === "pnpm" && !workspace
174
+ ? { pnpm: { onlyBuiltDependencies: ["esbuild"] } }
175
+ : {}),
176
+ dependencies: {
177
+ ...graview,
178
+ react: "^19.2.0",
179
+ "react-dom": "^19.2.0",
180
+ "react-router-dom": "^7.1.1",
181
+ /*
182
+ * NO ZOD. A kind's fields are a `z.ZodObject`, and a second copy of
183
+ * zod makes them a nominally different type — which tsc reports by
184
+ * exhausting its heap rather than by saying so. `@graview/core`
185
+ * re-exports `z`, so the project builds its schemas with exactly the
186
+ * copy the framework was built with and has nothing to keep in step.
187
+ */
188
+ },
189
+ devDependencies: {
190
+ // The tool: `graview check`, `graview docs`, `graview skills`. The
191
+ // framework is the @graview/* above; this is the command line over it.
192
+ graview: dep("graview"),
193
+ "@types/node": "^22.10.0",
194
+ "@types/react": "^19.2.0",
195
+ "@types/react-dom": "^19.2.0",
196
+ typescript: "^5.7.2",
197
+ vite: "^5.4.11",
198
+ vitest: "^2.1.8",
199
+ },
200
+ };
201
+ return `${JSON.stringify(manifest, null, 2)}\n`;
202
+ }
203
+ export function tsconfig(workspace) {
204
+ /*
205
+ * NOTHING POINTS INTO ANOTHER REPOSITORY'S PACKAGE MANAGER.
206
+ *
207
+ * This used to carry a `paths` entry for zod naming an exact version
208
+ * inside the framework's pnpm store — `../../graview/node_modules/.pnpm/
209
+ * zod@4.4.3/node_modules/zod` — because two copies of zod make a declared
210
+ * field schema a nominally different type. It typechecked, and it broke on
211
+ * the day the framework bumped zod, as a missing file in somebody else's
212
+ * internals rather than as a version bump. The project imports `z` from
213
+ * `@graview/core` now: one copy, by re-export, with nothing to pin.
214
+ */
215
+ return `${JSON.stringify({
216
+ /* In a workspace the shared half lives at the root, where a second
217
+ package beside the app can extend the same one. */
218
+ ...(workspace ? { extends: "../tsconfig.base.json" } : {}),
219
+ compilerOptions: {
220
+ target: "ES2022",
221
+ lib: ["ES2022", "DOM", "DOM.Iterable"],
222
+ module: "ESNext",
223
+ moduleResolution: "Bundler",
224
+ jsx: "react-jsx",
225
+ strict: true,
226
+ noUncheckedIndexedAccess: true,
227
+ noImplicitOverride: true,
228
+ noFallthroughCasesInSwitch: true,
229
+ isolatedModules: true,
230
+ verbatimModuleSyntax: true,
231
+ esModuleInterop: true,
232
+ forceConsistentCasingInFileNames: true,
233
+ resolveJsonModule: true,
234
+ skipLibCheck: true,
235
+ types: ["node"],
236
+ noEmit: true,
237
+ },
238
+ include: ["src", "tests", "vite.config.ts"],
239
+ }, null, 2)}\n`;
240
+ }
241
+ export function tsconfigBuild() {
242
+ // The domain compiled to plain modules, so `graview check` and the docs
243
+ // generator can load the declaration with no bundler in the way. No
244
+ // declaration files: nothing imports this project, and emitting them
245
+ // would make the framework's zod a named dependency of every type.
246
+ return `${JSON.stringify({
247
+ extends: "./tsconfig.json",
248
+ compilerOptions: {
249
+ noEmit: false,
250
+ rootDir: "src",
251
+ outDir: "dist",
252
+ declaration: false,
253
+ sourceMap: true,
254
+ },
255
+ include: ["src"],
256
+ }, null, 2)}\n`;
257
+ }
258
+ export function viteConfig(ids) {
259
+ if (!ids.link) {
260
+ return `import { studioDoor } from "@graview/ship/dev";
261
+ import { defineConfig } from "vitest/config";
262
+
263
+ export default defineConfig({
264
+ esbuild: { jsx: "automatic" },
265
+ // The studio writes a declaration change into src/domain through this, in development only.
266
+ plugins: [studioDoor()],
267
+ // The declaration compiles to dist/ for \`graview check\`; the site goes
268
+ // somewhere else so neither build overwrites the other. ES2022 because
269
+ // main.tsx awaits the store at the top level, and every browser the
270
+ // framework supports (Safari 16.4+, Firefox 101+, Chromium 99+) has it.
271
+ /*
272
+ * THE FRAMEWORK SPLIT FROM THE APP, ALONG THE FRAMEWORK'S OWN TIER
273
+ * BOUNDARY.
274
+ *
275
+ * A one-kind scaffold's first build used to print
276
+ * "(!) Some chunks are larger than 500 kB" — a performance warning about
277
+ * the framework, on the first command anybody runs. It was not wrong; it
278
+ * was simply the first impression, and a scaffold that warns on its first
279
+ * run teaches people to ignore build output.
280
+ *
281
+ * Measured on a one-kind app: as one bundle, 700 kB and a warning; as
282
+ * framework-and-app, 512 + 189 and still a warning; headless / UI / app,
283
+ * 218 + 295 + 189 and no warning at all. The headless half is core,
284
+ * layout, tools and ship — the tiers with no React in them — and it
285
+ * changes on a different schedule from the UI binding, so a returning
286
+ * visitor keeps the larger half cached across every change to the app.
287
+ */
288
+ build: {
289
+ outDir: "build",
290
+ target: "es2022",
291
+ rollupOptions: {
292
+ output: {
293
+ /*
294
+ * Which half a module belongs to, from its path alone: rollup ids
295
+ * use forward slashes on every platform, and a framework package is
296
+ * under "@graview/<name>" installed, or "packages/<name>" linked.
297
+ */
298
+ manualChunks(id: string) {
299
+ const parts = id.split("/");
300
+ const owner = Math.max(parts.lastIndexOf("@graview"), parts.lastIndexOf("packages"));
301
+ const name = owner === -1 ? undefined : parts[owner + 1];
302
+ if (name && ["core", "layout", "tools", "ship"].includes(name)) return "graview";
303
+ if (name && ["react", "primitives", "pages", "render", "embed", "studio"].includes(name)) {
304
+ return "graview-ui";
305
+ }
306
+ const vendor = parts.lastIndexOf("node_modules");
307
+ const from = vendor === -1 ? undefined : parts[vendor + 1];
308
+ // Zod rides with the headless half, which is what declares against
309
+ // it: in the other chunk the two would import each other.
310
+ if (from === "zod") return "graview";
311
+ // React and the router keep their own, because they change on
312
+ // nobody's schedule but their own.
313
+ if (from && ["react", "react-dom", "react-router", "react-router-dom", "scheduler"].includes(from)) {
314
+ return "vendor";
315
+ }
316
+ return undefined;
317
+ },
318
+ },
319
+ },
320
+ },
321
+ server: { port: ${ids.port}, strictPort: true },
322
+ test: { environment: "node" },
323
+ });
324
+ `;
325
+ }
326
+ return `import { studioDoor } from "@graview/ship/dev";
327
+ import { searchForWorkspaceRoot } from "vite";
328
+ import { defineConfig } from "vitest/config";
329
+ import { fileURLToPath } from "node:url";
330
+
331
+ /*
332
+ * THE FRAMEWORK IS A SIBLING CHECKOUT. This project consumes \`@graview/*\`
333
+ * by path (\`link:\` dependencies) and, in development, straight from the
334
+ * framework's sources. Two things follow: the dev server must be allowed
335
+ * to serve files from that directory, and React must be deduplicated, or
336
+ * the framework's components and this app's would each hold their own copy
337
+ * and hooks would break. Build the framework first: \`pnpm -C ${ids.link} build\`.
338
+ */
339
+ const framework = (p: string) =>
340
+ fileURLToPath(new URL(\`${ids.link}/packages/\${p}\`, import.meta.url));
341
+
342
+ export default defineConfig({
343
+ esbuild: { jsx: "automatic" },
344
+ // The studio writes a declaration change into src/domain through this, in development only.
345
+ plugins: [studioDoor()],
346
+ /*
347
+ * THE FRAMEWORK SPLIT FROM THE APP, ALONG THE FRAMEWORK'S OWN TIER
348
+ * BOUNDARY.
349
+ *
350
+ * A one-kind scaffold's first build used to print
351
+ * "(!) Some chunks are larger than 500 kB" — a performance warning about
352
+ * the framework, on the first command anybody runs. It was not wrong; it
353
+ * was simply the first impression, and a scaffold that warns on its first
354
+ * run teaches people to ignore build output.
355
+ *
356
+ * Measured on a one-kind app: as one bundle, 700 kB and a warning; as
357
+ * framework-and-app, 512 + 189 and still a warning; headless / UI / app,
358
+ * 218 + 295 + 189 and no warning at all. The headless half is core,
359
+ * layout, tools and ship — the tiers with no React in them — and it
360
+ * changes on a different schedule from the UI binding, so a returning
361
+ * visitor keeps the larger half cached across every change to the app.
362
+ */
363
+ build: {
364
+ outDir: "build",
365
+ target: "es2022",
366
+ rollupOptions: {
367
+ output: {
368
+ /*
369
+ * Which half a module belongs to, from its path alone: rollup ids
370
+ * use forward slashes on every platform, and a framework package is
371
+ * under "@graview/<name>" installed, or "packages/<name>" linked.
372
+ */
373
+ manualChunks(id: string) {
374
+ const parts = id.split("/");
375
+ const owner = Math.max(parts.lastIndexOf("@graview"), parts.lastIndexOf("packages"));
376
+ const name = owner === -1 ? undefined : parts[owner + 1];
377
+ if (name && ["core", "layout", "tools", "ship"].includes(name)) return "graview";
378
+ if (name && ["react", "primitives", "pages", "render", "embed", "studio"].includes(name)) {
379
+ return "graview-ui";
380
+ }
381
+ const vendor = parts.lastIndexOf("node_modules");
382
+ const from = vendor === -1 ? undefined : parts[vendor + 1];
383
+ // Zod rides with the headless half, which is what declares against
384
+ // it: in the other chunk the two would import each other.
385
+ if (from === "zod") return "graview";
386
+ // React and the router keep their own, because they change on
387
+ // nobody's schedule but their own.
388
+ if (from && ["react", "react-dom", "react-router", "react-router-dom", "scheduler"].includes(from)) {
389
+ return "vendor";
390
+ }
391
+ return undefined;
392
+ },
393
+ },
394
+ },
395
+ },
396
+ resolve: {
397
+ /*
398
+ * React and the router, and NOT zod. Two copies of React break hooks,
399
+ * so they are forced to one — resolved from this project, which has
400
+ * them. Zod is not this project's dependency at all any more: the
401
+ * schemas are built with the copy "@graview/core" re-exports, and
402
+ * listing it here would force the framework's own import to resolve
403
+ * from a place that does not have it.
404
+ */
405
+ dedupe: ["react", "react-dom", "react-router-dom"],
406
+ alias: {
407
+ "@graview/core": framework("core/src/index.ts"),
408
+ "@graview/layout": framework("layout/src/index.ts"),
409
+ "@graview/tools": framework("tools/src/index.ts"),
410
+ // The subpath first: an alias for the bare name would swallow it.
411
+ "@graview/render/gpu": framework("render/src/gpu.ts"),
412
+ "@graview/render": framework("render/src/index.ts"),
413
+ "@graview/react": framework("react/src/index.ts"),
414
+ "@graview/primitives": framework("primitives/src/index.ts"),
415
+ "@graview/pages": framework("pages/src/index.ts"),
416
+ // The browser entry, so the file adapter's node:fs never meets the bundler.
417
+ "@graview/ship/browser": framework("ship/src/browser.ts"),
418
+ "@graview/ship": framework("ship/src/index.ts"),
419
+ "@graview/embed": framework("embed/src/index.ts"),
420
+ "@graview/studio": framework("studio/src/index.ts"),
421
+ },
422
+ },
423
+ server: {
424
+ port: ${ids.port},
425
+ strictPort: true,
426
+ fs: {
427
+ allow: [
428
+ searchForWorkspaceRoot(process.cwd()),
429
+ fileURLToPath(new URL("${ids.link}", import.meta.url)),
430
+ ],
431
+ },
432
+ },
433
+ test: { environment: "node" },
434
+ });
435
+ `;
436
+ }
437
+ /*
438
+ * `data/` is the store `graview serve --data data` writes, wherever the app
439
+ * sits — and alone it also matched `src/data/`, so every project's seed, the
440
+ * graph it opens on, was quietly never committed. The seed is the source.
441
+ */
442
+ export function gitignore() {
443
+ return `node_modules/
444
+ dist/
445
+ build/
446
+ data/
447
+ !**/src/data/
448
+ docs/llms.txt
449
+ docs/agents.md
450
+ *.tsbuildinfo
451
+ .DS_Store
452
+ `;
453
+ }
454
+ export function readme(ids) {
455
+ const pm = ids.packageManager;
456
+ const run = pm === "pnpm" ? "pnpm" : "npm run";
457
+ const linked = ids.link
458
+ ? `
459
+ This project consumes the framework **by path** from \`${ids.link}\`. Build it
460
+ first (\`pnpm -C ${ids.link} build\`) and again whenever its sources change; the
461
+ dev server reads the framework's sources directly, so in development you see
462
+ framework edits without a rebuild.
463
+ `
464
+ : "";
465
+ return `# ${ids.name}
466
+
467
+ A product on [Graview](https://github.com/en-dash-consulting/graview): a typed
468
+ context graph that **is** the interface. Everything below the shell is
469
+ derived from one declaration in \`src/domain/\`.
470
+ ${linked}
471
+ \`\`\`sh
472
+ ${pm} install
473
+ ${run} dev # http://localhost:${ids.port} — the scene; /pages is the routed face
474
+ ${run} verify # typecheck, tests, build, and graview check
475
+ ${run} skills # the authoring skills, for Claude Code and Codex
476
+ \`\`\`
477
+
478
+ ## Where things are
479
+
480
+ \`\`\`
481
+ src/domain/ the declaration — no React in here; this is what graview check reads
482
+ schema.ts the ${ids.kind} kind: its fields, its one edge, its horizon
483
+ mutations.ts add, link, unlink, close — every change is a named, typed act
484
+ invariants.ts one rule, and the repair it names
485
+ brand.ts name, mark, typeface, palette — derived from one accent
486
+ app.ts defineApp: the whole surface, in one object
487
+ src/ui/
488
+ views.tsx registerDefaultViews, then your own where the generic one is wrong
489
+ app.tsx the provider, the Shell primitive, and a seat — under sixty lines
490
+ pages.tsx the ${ids.kind}'s page on the routed face, in your words, over the derived ones
491
+ src/main.tsx the theme, the store that remembers, the two faces
492
+ tests/ the rule fires on a graph that breaks it, and its repair resolves it
493
+ \`\`\`
494
+
495
+ ## The loop
496
+
497
+ Declare something, run the check, look at it, declare more:
498
+
499
+ \`\`\`sh
500
+ ${run} build && ${run} check
501
+ \`\`\`
502
+
503
+ The useful early findings are \`mutation-untitled\`, \`mutation-undescribed\` and
504
+ \`required-invariant-unregistered\` — things that look fine until somebody reads
505
+ the interface, or an agent reads a tool schema.
506
+
507
+ ## What comes for free
508
+
509
+ - **The empty state is generative.** \`creates\` on a mutation is how an empty
510
+ ${ids.Plural} district offers its own beginnings.
511
+ - **Lines are actionable.** \`connects\` and \`severs\` on a mutation make the
512
+ drawn relation selectable, and offer the acts from either end.
513
+ - **The past is a horizon.** \`lifecycle\` on the kind keeps a closed ${ids.spoken}
514
+ in the record and out of the counts; \`?past=1\` widens the view.
515
+ - **A seat, a chat, a tool surface.** The agent seat in the activity rail, the
516
+ chat panel and the derived tool schemas all read the same declaration.
517
+ - **Two faces.** \`/\` is the spatial workbench; \`/pages\` is the same app as
518
+ ordinary routed pages, at phone widths. It lands on a gallery of the app's
519
+ pictures — every kind drawn as a card until you title a lens, then the lens
520
+ by its name — with lists, records, forms, the map and the problems derived
521
+ from the declaration, and any of them replaceable with a page you write
522
+ (see \`src/ui/pages.tsx\`).
523
+ - **It remembers.** Edits persist in this browser, attributed and undoable;
524
+ "Start fresh" is the way back.
525
+ `;
526
+ }
527
+ /* ------------------------------------------------------------------- ci */
528
+ export function ciYml(ids) {
529
+ const pnpm = ids.packageManager === "pnpm";
530
+ if (ids.link)
531
+ return linkedCiYml(ids, pnpm);
532
+ return `name: CI
533
+
534
+ on:
535
+ push:
536
+ branches: [main]
537
+ pull_request:
538
+
539
+ jobs:
540
+ verify:
541
+ runs-on: ubuntu-latest
542
+ steps:
543
+ - uses: actions/checkout@v4
544
+ ${pnpm ? " - uses: pnpm/action-setup@v4\n" : ""} - uses: actions/setup-node@v4
545
+ with:
546
+ node-version: 22
547
+ cache: ${pnpm ? "pnpm" : "npm"}
548
+ - run: ${pnpm ? "pnpm install --frozen-lockfile" : "npm ci"}
549
+ # typecheck: an edge to an undeclared kind fails here.
550
+ # test: the rule fires, and its repair resolves it.
551
+ # build, then check: everything tsc cannot see — a repair naming a
552
+ # mutation nobody registered, a palette pair below AA. Errors fail
553
+ # the build; warnings are a judgement call.
554
+ - run: ${pnpm ? "pnpm verify" : "npm run verify"}
555
+ `;
556
+ }
557
+ /**
558
+ * A project that consumes the framework by path needs the framework on the
559
+ * runner, at the same relative path, built. The project is checked out into
560
+ * a directory of its own and the framework beside it, so \`link:../<name>\`
561
+ * resolves exactly as it does on a laptop.
562
+ */
563
+ export function linkedCiYml(ids, pnpm) {
564
+ const link = ids.link ?? "../graview";
565
+ const sibling = link.split("/").filter((part) => part && part !== "..").pop() ?? "graview";
566
+ const repo = ids.frameworkRepo ?? "OWNER/graview # ← the framework repository";
567
+ const install = pnpm ? "pnpm install --frozen-lockfile" : "npm ci";
568
+ return `name: CI
569
+
570
+ on:
571
+ push:
572
+ branches: [main]
573
+ pull_request:
574
+
575
+ # This project consumes the framework by path (link:${link}). The runner
576
+ # needs the framework checked out at that path and built, so both are
577
+ # checked out side by side inside the workspace. A private framework
578
+ # repository needs a token that can read it in the FRAMEWORK_TOKEN secret.
579
+
580
+ jobs:
581
+ verify:
582
+ runs-on: ubuntu-latest
583
+ steps:
584
+ - uses: actions/checkout@v4
585
+ with:
586
+ path: app
587
+ - uses: actions/checkout@v4
588
+ with:
589
+ repository: ${repo}
590
+ path: ${sibling}
591
+ token: \${{ secrets.FRAMEWORK_TOKEN || github.token }}
592
+ - uses: pnpm/action-setup@v4
593
+ - uses: actions/setup-node@v4
594
+ with:
595
+ node-version: 22
596
+ - name: Build the framework
597
+ working-directory: ${sibling}
598
+ run: pnpm install --frozen-lockfile && pnpm build
599
+ - name: Verify the app
600
+ working-directory: app
601
+ run: ${install} && ${pnpm ? "pnpm verify" : "npm run verify"}
602
+ `;
603
+ }
604
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/scaffold/project.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAg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AI,GAAG,GAAG,CAAC,aAAa,IAAI,8CAA8C,CAAC;IACjF,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACnE,OAAO;;;;;;;sDAO6C,IAAI;;;;;;;;;;;;;;wBAclC,IAAI;kBACV,OAAO;;;;;;;6BAOI,OAAO;;;;eAIrB,OAAO,OAAO,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,gBAAgB;CACnE,CAAC;AACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type Ids } from "./names.js";
2
+ export declare function indexHtml(ids: Ids): string;
3
+ /**
4
+ * SOMEBODY ELSE'S PAGE. The `graview-embed` skill, shipped
5
+ * as a page rather than as a paragraph — so a project has a place to put an
6
+ * embed, and so the project's own `pnpm typecheck` covers the embed surface.
7
+ * Delete both files if the app is never going anywhere but its own address.
8
+ */
9
+ export declare function embedHtml(ids: Ids): string;
10
+ export declare function embedTsx(ids: Ids): string;
11
+ export declare function viewsTsx(ids: Ids): string;
12
+ export declare function uiAppTsx(ids: Ids): string;
13
+ export declare function pagesTsx(ids: Ids): string;
14
+ export declare function mainTsx(ids: Ids): string;
15
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/scaffold/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAA4C,MAAM,YAAY,CAAC;AAOhF,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAc1C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAwC1C;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAyBzC;AAID,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAkBzC;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CA+GzC;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CA0NzC;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CA0FxC"}