@jam-overture/loom 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 (401) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +743 -0
  3. package/dist/catalogue.d.ts +70 -0
  4. package/dist/catalogue.js +88 -0
  5. package/dist/cli/args.d.ts +17 -0
  6. package/dist/cli/args.js +83 -0
  7. package/dist/cli/filesystem.d.ts +15 -0
  8. package/dist/cli/filesystem.js +31 -0
  9. package/dist/cli/index.d.ts +12 -0
  10. package/dist/cli/index.js +12 -0
  11. package/dist/cli/main.d.ts +3 -0
  12. package/dist/cli/main.js +30 -0
  13. package/dist/cli/namespace.d.ts +40 -0
  14. package/dist/cli/namespace.js +40 -0
  15. package/dist/cli/plan.d.ts +84 -0
  16. package/dist/cli/plan.js +113 -0
  17. package/dist/cli/run.d.ts +17 -0
  18. package/dist/cli/run.js +75 -0
  19. package/dist/cli/templates.d.ts +43 -0
  20. package/dist/cli/templates.js +134 -0
  21. package/dist/closed-set.d.ts +34 -0
  22. package/dist/closed-set.js +34 -0
  23. package/dist/data/adapter.d.ts +123 -0
  24. package/dist/data/adapter.js +91 -0
  25. package/dist/data/binding.d.ts +48 -0
  26. package/dist/data/binding.js +39 -0
  27. package/dist/data/catalogue.d.ts +26 -0
  28. package/dist/data/catalogue.js +6 -0
  29. package/dist/data/index.d.ts +14 -0
  30. package/dist/data/index.js +14 -0
  31. package/dist/data/plan.d.ts +58 -0
  32. package/dist/data/plan.js +0 -0
  33. package/dist/data/resolution.d.ts +91 -0
  34. package/dist/data/resolution.js +96 -0
  35. package/dist/data/resolve.d.ts +46 -0
  36. package/dist/data/resolve.js +37 -0
  37. package/dist/data/source.d.ts +40 -0
  38. package/dist/data/source.js +45 -0
  39. package/dist/deadline.d.ts +57 -0
  40. package/dist/deadline.js +78 -0
  41. package/dist/frame/catalogue.d.ts +24 -0
  42. package/dist/frame/catalogue.js +5 -0
  43. package/dist/frame/index.d.ts +12 -0
  44. package/dist/frame/index.js +12 -0
  45. package/dist/frame/origin.d.ts +87 -0
  46. package/dist/frame/origin.js +114 -0
  47. package/dist/frame/resolution.d.ts +85 -0
  48. package/dist/frame/resolution.js +79 -0
  49. package/dist/grammar.d.ts +26 -0
  50. package/dist/grammar.js +28 -0
  51. package/dist/ids.d.ts +57 -0
  52. package/dist/ids.js +104 -0
  53. package/dist/index.d.ts +26 -0
  54. package/dist/index.js +26 -0
  55. package/dist/interactivity.d.ts +50 -0
  56. package/dist/interactivity.js +22 -0
  57. package/dist/interpretation/anthropic.d.ts +22 -0
  58. package/dist/interpretation/anthropic.js +76 -0
  59. package/dist/interpretation/client.d.ts +83 -0
  60. package/dist/interpretation/client.js +2 -0
  61. package/dist/interpretation/draft.d.ts +234 -0
  62. package/dist/interpretation/draft.js +84 -0
  63. package/dist/interpretation/index.d.ts +15 -0
  64. package/dist/interpretation/index.js +15 -0
  65. package/dist/interpretation/interpreter.d.ts +62 -0
  66. package/dist/interpretation/interpreter.js +151 -0
  67. package/dist/interpretation/materialize.d.ts +42 -0
  68. package/dist/interpretation/materialize.js +107 -0
  69. package/dist/interpretation/prompt.d.ts +229 -0
  70. package/dist/interpretation/prompt.js +285 -0
  71. package/dist/interpretation/render.d.ts +76 -0
  72. package/dist/interpretation/render.js +272 -0
  73. package/dist/interpretation/schema.d.ts +49 -0
  74. package/dist/interpretation/schema.js +131 -0
  75. package/dist/json.d.ts +35 -0
  76. package/dist/json.js +11 -0
  77. package/dist/paging.d.ts +60 -0
  78. package/dist/paging.js +49 -0
  79. package/dist/primitive-type.d.ts +32 -0
  80. package/dist/primitive-type.js +39 -0
  81. package/dist/render/addressing.d.ts +59 -0
  82. package/dist/render/addressing.js +60 -0
  83. package/dist/render/anchor.d.ts +105 -0
  84. package/dist/render/anchor.js +84 -0
  85. package/dist/render/behaviour-adjust.d.ts +62 -0
  86. package/dist/render/behaviour-adjust.js +78 -0
  87. package/dist/render/behaviour-copy.d.ts +53 -0
  88. package/dist/render/behaviour-copy.js +75 -0
  89. package/dist/render/behaviour-disclose.d.ts +74 -0
  90. package/dist/render/behaviour-disclose.js +77 -0
  91. package/dist/render/behaviour-present.d.ts +123 -0
  92. package/dist/render/behaviour-present.js +173 -0
  93. package/dist/render/behaviour.d.ts +243 -0
  94. package/dist/render/behaviour.js +284 -0
  95. package/dist/render/control.d.ts +81 -0
  96. package/dist/render/control.js +80 -0
  97. package/dist/render/decorative.d.ts +62 -0
  98. package/dist/render/decorative.js +2 -0
  99. package/dist/render/diagnostics.d.ts +260 -0
  100. package/dist/render/diagnostics.js +61 -0
  101. package/dist/render/disclosed.d.ts +37 -0
  102. package/dist/render/disclosed.js +37 -0
  103. package/dist/render/editable.d.ts +34 -0
  104. package/dist/render/editable.js +35 -0
  105. package/dist/render/frame.d.ts +42 -0
  106. package/dist/render/frame.js +31 -0
  107. package/dist/render/index.d.ts +35 -0
  108. package/dist/render/index.js +35 -0
  109. package/dist/render/inline-variables.d.ts +77 -0
  110. package/dist/render/inline-variables.js +220 -0
  111. package/dist/render/presented.d.ts +82 -0
  112. package/dist/render/presented.js +82 -0
  113. package/dist/render/primitive.d.ts +228 -0
  114. package/dist/render/primitive.js +36 -0
  115. package/dist/render/props.d.ts +48 -0
  116. package/dist/render/props.js +2 -0
  117. package/dist/render/reads.d.ts +73 -0
  118. package/dist/render/reads.js +45 -0
  119. package/dist/render/render.d.ts +164 -0
  120. package/dist/render/render.js +571 -0
  121. package/dist/render/request.d.ts +111 -0
  122. package/dist/render/request.js +60 -0
  123. package/dist/render/text.d.ts +91 -0
  124. package/dist/render/text.js +44 -0
  125. package/dist/render/theme.d.ts +61 -0
  126. package/dist/render/theme.js +52 -0
  127. package/dist/reserved-props.d.ts +35 -0
  128. package/dist/reserved-props.js +45 -0
  129. package/dist/result.d.ts +27 -0
  130. package/dist/result.js +30 -0
  131. package/dist/role.d.ts +71 -0
  132. package/dist/role.js +22 -0
  133. package/dist/runtime/analysis.d.ts +149 -0
  134. package/dist/runtime/analysis.js +187 -0
  135. package/dist/runtime/assessment.d.ts +35 -0
  136. package/dist/runtime/assessment.js +13 -0
  137. package/dist/runtime/disposition.d.ts +102 -0
  138. package/dist/runtime/disposition.js +59 -0
  139. package/dist/runtime/events.d.ts +187 -0
  140. package/dist/runtime/events.js +7 -0
  141. package/dist/runtime/gate.d.ts +43 -0
  142. package/dist/runtime/gate.js +169 -0
  143. package/dist/runtime/index.d.ts +27 -0
  144. package/dist/runtime/index.js +27 -0
  145. package/dist/runtime/intent.d.ts +60 -0
  146. package/dist/runtime/intent.js +36 -0
  147. package/dist/runtime/interpreter.d.ts +117 -0
  148. package/dist/runtime/interpreter.js +46 -0
  149. package/dist/runtime/inverse-interpreter.d.ts +90 -0
  150. package/dist/runtime/inverse-interpreter.js +56 -0
  151. package/dist/runtime/inverse.d.ts +87 -0
  152. package/dist/runtime/inverse.js +48 -0
  153. package/dist/runtime/narration.d.ts +24 -0
  154. package/dist/runtime/narration.js +36 -0
  155. package/dist/runtime/nesting.d.ts +31 -0
  156. package/dist/runtime/nesting.js +46 -0
  157. package/dist/runtime/pipeline.d.ts +124 -0
  158. package/dist/runtime/pipeline.js +178 -0
  159. package/dist/runtime/policy-fingerprint.d.ts +29 -0
  160. package/dist/runtime/policy-fingerprint.js +119 -0
  161. package/dist/runtime/policy-source.d.ts +42 -0
  162. package/dist/runtime/policy-source.js +8 -0
  163. package/dist/runtime/policy.d.ts +156 -0
  164. package/dist/runtime/policy.js +107 -0
  165. package/dist/runtime/proposal.d.ts +423 -0
  166. package/dist/runtime/proposal.js +109 -0
  167. package/dist/runtime/redirection.d.ts +53 -0
  168. package/dist/runtime/redirection.js +38 -0
  169. package/dist/runtime/repointing.d.ts +71 -0
  170. package/dist/runtime/repointing.js +0 -0
  171. package/dist/runtime/reversibility.d.ts +36 -0
  172. package/dist/runtime/reversibility.js +39 -0
  173. package/dist/runtime/stake-level.d.ts +33 -0
  174. package/dist/runtime/stake-level.js +58 -0
  175. package/dist/runtime/stakes.d.ts +47 -0
  176. package/dist/runtime/stakes.js +305 -0
  177. package/dist/runtime/vocabulary.d.ts +122 -0
  178. package/dist/runtime/vocabulary.js +87 -0
  179. package/dist/sdk/audit.d.ts +195 -0
  180. package/dist/sdk/audit.js +128 -0
  181. package/dist/sdk/catalogue.d.ts +37 -0
  182. package/dist/sdk/catalogue.js +16 -0
  183. package/dist/sdk/conformance.d.ts +342 -0
  184. package/dist/sdk/conformance.js +494 -0
  185. package/dist/sdk/copy.d.ts +105 -0
  186. package/dist/sdk/copy.js +90 -0
  187. package/dist/sdk/definition.d.ts +242 -0
  188. package/dist/sdk/definition.js +64 -0
  189. package/dist/sdk/index.d.ts +19 -0
  190. package/dist/sdk/index.js +19 -0
  191. package/dist/sdk/interactivity.d.ts +29 -0
  192. package/dist/sdk/interactivity.js +34 -0
  193. package/dist/sdk/pairings.d.ts +124 -0
  194. package/dist/sdk/pairings.js +81 -0
  195. package/dist/sdk/registry.d.ts +162 -0
  196. package/dist/sdk/registry.js +329 -0
  197. package/dist/sdk/selection.d.ts +46 -0
  198. package/dist/sdk/selection.js +24 -0
  199. package/dist/sdk/text.d.ts +100 -0
  200. package/dist/sdk/text.js +105 -0
  201. package/dist/sdk/vocabulary.d.ts +39 -0
  202. package/dist/sdk/vocabulary.js +36 -0
  203. package/dist/signals/broadcast.d.ts +134 -0
  204. package/dist/signals/broadcast.js +451 -0
  205. package/dist/signals/collect.d.ts +184 -0
  206. package/dist/signals/collect.js +196 -0
  207. package/dist/signals/deliver.d.ts +64 -0
  208. package/dist/signals/deliver.js +85 -0
  209. package/dist/signals/fold.d.ts +112 -0
  210. package/dist/signals/fold.js +76 -0
  211. package/dist/signals/index.d.ts +31 -0
  212. package/dist/signals/index.js +31 -0
  213. package/dist/signals/ingest.d.ts +51 -0
  214. package/dist/signals/ingest.js +70 -0
  215. package/dist/signals/intake.d.ts +149 -0
  216. package/dist/signals/intake.js +154 -0
  217. package/dist/signals/journal.d.ts +94 -0
  218. package/dist/signals/journal.js +11 -0
  219. package/dist/signals/kinds.d.ts +22 -0
  220. package/dist/signals/kinds.js +22 -0
  221. package/dist/signals/ledger.d.ts +46 -0
  222. package/dist/signals/ledger.js +81 -0
  223. package/dist/signals/memory.d.ts +17 -0
  224. package/dist/signals/memory.js +99 -0
  225. package/dist/signals/migrate.d.ts +27 -0
  226. package/dist/signals/migrate.js +78 -0
  227. package/dist/signals/postgres.d.ts +7 -0
  228. package/dist/signals/postgres.js +295 -0
  229. package/dist/signals/rollup.d.ts +142 -0
  230. package/dist/signals/rollup.js +0 -0
  231. package/dist/signals/schema.d.ts +534 -0
  232. package/dist/signals/schema.js +92 -0
  233. package/dist/signals/signal.d.ts +381 -0
  234. package/dist/signals/signal.js +150 -0
  235. package/dist/signals/tally.d.ts +70 -0
  236. package/dist/signals/tally.js +2 -0
  237. package/dist/signals/view.d.ts +51 -0
  238. package/dist/signals/view.js +54 -0
  239. package/dist/store/attribution.d.ts +125 -0
  240. package/dist/store/attribution.js +116 -0
  241. package/dist/store/database.d.ts +14 -0
  242. package/dist/store/database.js +2 -0
  243. package/dist/store/driver.d.ts +29 -0
  244. package/dist/store/driver.js +39 -0
  245. package/dist/store/errors.d.ts +56 -0
  246. package/dist/store/errors.js +37 -0
  247. package/dist/store/index.d.ts +16 -0
  248. package/dist/store/index.js +16 -0
  249. package/dist/store/memory.d.ts +3 -0
  250. package/dist/store/memory.js +115 -0
  251. package/dist/store/migrate.d.ts +54 -0
  252. package/dist/store/migrate.js +122 -0
  253. package/dist/store/postgres-holds.d.ts +4 -0
  254. package/dist/store/postgres-holds.js +192 -0
  255. package/dist/store/postgres.d.ts +8 -0
  256. package/dist/store/postgres.js +262 -0
  257. package/dist/store/replay.d.ts +94 -0
  258. package/dist/store/replay.js +82 -0
  259. package/dist/store/revert.d.ts +116 -0
  260. package/dist/store/revert.js +243 -0
  261. package/dist/store/schema.d.ts +371 -0
  262. package/dist/store/schema.js +78 -0
  263. package/dist/store/source.d.ts +23 -0
  264. package/dist/store/source.js +37 -0
  265. package/dist/store/store.d.ts +231 -0
  266. package/dist/store/store.js +52 -0
  267. package/dist/store/undone.d.ts +18 -0
  268. package/dist/store/undone.js +89 -0
  269. package/dist/submit/catalogue.d.ts +20 -0
  270. package/dist/submit/catalogue.js +5 -0
  271. package/dist/submit/declaration.d.ts +39 -0
  272. package/dist/submit/declaration.js +30 -0
  273. package/dist/submit/endpoint.d.ts +131 -0
  274. package/dist/submit/endpoint.js +160 -0
  275. package/dist/submit/index.d.ts +13 -0
  276. package/dist/submit/index.js +13 -0
  277. package/dist/submit/plan.d.ts +49 -0
  278. package/dist/submit/plan.js +47 -0
  279. package/dist/submit/resolution.d.ts +61 -0
  280. package/dist/submit/resolution.js +64 -0
  281. package/dist/submit/resolve.d.ts +45 -0
  282. package/dist/submit/resolve.js +36 -0
  283. package/dist/telemetry/calibration.d.ts +132 -0
  284. package/dist/telemetry/calibration.js +151 -0
  285. package/dist/telemetry/episode.d.ts +140 -0
  286. package/dist/telemetry/episode.js +272 -0
  287. package/dist/telemetry/event.d.ts +2310 -0
  288. package/dist/telemetry/event.js +405 -0
  289. package/dist/telemetry/index.d.ts +15 -0
  290. package/dist/telemetry/index.js +15 -0
  291. package/dist/telemetry/journal.d.ts +116 -0
  292. package/dist/telemetry/journal.js +11 -0
  293. package/dist/telemetry/memory.d.ts +24 -0
  294. package/dist/telemetry/memory.js +75 -0
  295. package/dist/telemetry/migrate.d.ts +26 -0
  296. package/dist/telemetry/migrate.js +40 -0
  297. package/dist/telemetry/postgres.d.ts +6 -0
  298. package/dist/telemetry/postgres.js +139 -0
  299. package/dist/telemetry/retention.d.ts +131 -0
  300. package/dist/telemetry/retention.js +217 -0
  301. package/dist/telemetry/schema.d.ts +113 -0
  302. package/dist/telemetry/schema.js +33 -0
  303. package/dist/telemetry/sink.d.ts +42 -0
  304. package/dist/telemetry/sink.js +61 -0
  305. package/dist/testing/contracts.d.ts +34 -0
  306. package/dist/testing/contracts.js +34 -0
  307. package/dist/testing/definitions.d.ts +15 -0
  308. package/dist/testing/definitions.js +48 -0
  309. package/dist/testing/doubles.d.ts +94 -0
  310. package/dist/testing/doubles.js +141 -0
  311. package/dist/testing/episode-harness.d.ts +49 -0
  312. package/dist/testing/episode-harness.js +65 -0
  313. package/dist/testing/filesystem.d.ts +17 -0
  314. package/dist/testing/filesystem.js +17 -0
  315. package/dist/testing/fixtures.d.ts +57 -0
  316. package/dist/testing/fixtures.js +84 -0
  317. package/dist/testing/hold-contract.d.ts +19 -0
  318. package/dist/testing/hold-contract.js +374 -0
  319. package/dist/testing/index.d.ts +41 -0
  320. package/dist/testing/index.js +41 -0
  321. package/dist/testing/journal-contract.d.ts +17 -0
  322. package/dist/testing/journal-contract.js +353 -0
  323. package/dist/testing/model-replies.d.ts +34 -0
  324. package/dist/testing/model-replies.js +101 -0
  325. package/dist/testing/primitives.d.ts +7 -0
  326. package/dist/testing/primitives.js +29 -0
  327. package/dist/testing/reader-signal-contract.d.ts +38 -0
  328. package/dist/testing/reader-signal-contract.js +318 -0
  329. package/dist/testing/row-security.d.ts +17 -0
  330. package/dist/testing/row-security.js +21 -0
  331. package/dist/testing/store-contract.d.ts +25 -0
  332. package/dist/testing/store-contract.js +500 -0
  333. package/dist/theme/apply.d.ts +17 -0
  334. package/dist/theme/apply.js +60 -0
  335. package/dist/theme/contrast.d.ts +197 -0
  336. package/dist/theme/contrast.js +259 -0
  337. package/dist/theme/derive.d.ts +77 -0
  338. package/dist/theme/derive.js +167 -0
  339. package/dist/theme/faces.d.ts +73 -0
  340. package/dist/theme/faces.js +119 -0
  341. package/dist/theme/font-packs.d.ts +25 -0
  342. package/dist/theme/font-packs.js +257 -0
  343. package/dist/theme/index.d.ts +20 -0
  344. package/dist/theme/index.js +20 -0
  345. package/dist/theme/lab.d.ts +30 -0
  346. package/dist/theme/lab.js +46 -0
  347. package/dist/theme/library.d.ts +114 -0
  348. package/dist/theme/library.js +300 -0
  349. package/dist/theme/measure.d.ts +144 -0
  350. package/dist/theme/measure.js +145 -0
  351. package/dist/theme/palettes.d.ts +64 -0
  352. package/dist/theme/palettes.js +497 -0
  353. package/dist/theme/registry.d.ts +59 -0
  354. package/dist/theme/registry.js +60 -0
  355. package/dist/theme/separation.d.ts +177 -0
  356. package/dist/theme/separation.js +203 -0
  357. package/dist/theme/style-presets.d.ts +60 -0
  358. package/dist/theme/style-presets.js +124 -0
  359. package/dist/theme/theme.d.ts +253 -0
  360. package/dist/theme/theme.js +171 -0
  361. package/dist/tree/apply.d.ts +16 -0
  362. package/dist/tree/apply.js +104 -0
  363. package/dist/tree/builders.d.ts +19 -0
  364. package/dist/tree/builders.js +20 -0
  365. package/dist/tree/compare.d.ts +68 -0
  366. package/dist/tree/compare.js +75 -0
  367. package/dist/tree/configuration.d.ts +25 -0
  368. package/dist/tree/configuration.js +108 -0
  369. package/dist/tree/delta.d.ts +288 -0
  370. package/dist/tree/delta.js +88 -0
  371. package/dist/tree/errors.d.ts +69 -0
  372. package/dist/tree/errors.js +34 -0
  373. package/dist/tree/identity.d.ts +117 -0
  374. package/dist/tree/identity.js +145 -0
  375. package/dist/tree/index.d.ts +21 -0
  376. package/dist/tree/index.js +21 -0
  377. package/dist/tree/inverse.d.ts +24 -0
  378. package/dist/tree/inverse.js +112 -0
  379. package/dist/tree/mutation.d.ts +18 -0
  380. package/dist/tree/mutation.js +49 -0
  381. package/dist/tree/naming.d.ts +4 -0
  382. package/dist/tree/naming.js +35 -0
  383. package/dist/tree/navigation.d.ts +38 -0
  384. package/dist/tree/navigation.js +83 -0
  385. package/dist/tree/node.d.ts +103 -0
  386. package/dist/tree/node.js +46 -0
  387. package/dist/tree/outline.d.ts +28 -0
  388. package/dist/tree/outline.js +10 -0
  389. package/dist/tree/tree.d.ts +83 -0
  390. package/dist/tree/tree.js +62 -0
  391. package/dist/write/commit.d.ts +124 -0
  392. package/dist/write/commit.js +234 -0
  393. package/dist/write/held.d.ts +674 -0
  394. package/dist/write/held.js +185 -0
  395. package/dist/write/index.d.ts +11 -0
  396. package/dist/write/index.js +11 -0
  397. package/dist/write/liveness.d.ts +132 -0
  398. package/dist/write/liveness.js +91 -0
  399. package/dist/write/revert.d.ts +79 -0
  400. package/dist/write/revert.js +134 -0
  401. package/package.json +160 -0
@@ -0,0 +1,342 @@
1
+ import type { ClosedChoice } from "../catalogue.js";
2
+ import { type NodeData } from "../data/resolution.js";
3
+ import type { JsonObject } from "../json.js";
4
+ import { type BehaviourName } from "../render/behaviour.js";
5
+ import { type LoomPrimitive } from "../render/primitive.js";
6
+ import { type PrimitiveText } from "../render/text.js";
7
+ import { type PaletteSlot } from "../theme/theme.js";
8
+ /**
9
+ * The conformance probe (0010).
10
+ *
11
+ * Edit mode decorates by handing a primitive `loom.editable` and trusting it to
12
+ * spread the attributes onto its own root element. A primitive that ignores them
13
+ * renders perfectly and is invisible to the portal — nothing to click, no id to
14
+ * address, and no error anywhere. 0010 asked §4 to catch that at registration
15
+ * rather than leave it as a runtime surprise.
16
+ *
17
+ * This is a probe, not a proof. It calls the component once, with a synthetic
18
+ * render context, and looks through the elements it returned for the attributes
19
+ * it was given. That answers the common case honestly and says so when it
20
+ * cannot answer at all:
21
+ *
22
+ * - a component that hands a *copy* of the decoration to another component
23
+ * reads as `not-decorated`, which is a false negative — identity is all there
24
+ * is to go on once the object has been rebuilt under a name of the
25
+ * primitive's choosing
26
+ * - a component that uses hooks, or is a class, cannot be called outside a
27
+ * renderer and reads as `not-probeable`
28
+ *
29
+ * Both are reported rather than guessed at, and neither blocks registration —
30
+ * `registry.ts` never calls a primitive. Enforcement is the host's call, which
31
+ * is why the verdict is a value.
32
+ */
33
+ /** A configuration the schema accepts that the component threw on. */
34
+ export type ProbeFailure = {
35
+ readonly props: JsonObject;
36
+ readonly reason: string;
37
+ /**
38
+ * The binding names the node had answers under when it threw, sorted, and
39
+ * absent when it had none.
40
+ *
41
+ * Without it two failures of `loom.feed` at its default props read as the
42
+ * same line twice, and the one that matters — *it renders until you answer
43
+ * it* — is the one a reader cannot pick out (0185).
44
+ */
45
+ readonly answered?: readonly string[];
46
+ };
47
+ /**
48
+ * Why a probe declined to answer.
49
+ *
50
+ * 0012 made `not-probeable` a third answer rather than a failure, because a
51
+ * hook-using component and a class component are both legitimate primitives the
52
+ * probe cannot judge. That is still true, and it was hiding a second population
53
+ * that is never legitimate: a component that is perfectly callable and throws on
54
+ * every configuration its own schema accepts.
55
+ *
56
+ * The two are told apart by whether anything was called at all.
57
+ *
58
+ * - `not-callable` — nothing was called. Not a function, or a class component.
59
+ * `failures` is empty because there is nothing to report.
60
+ * - `threw` — it was called under every configuration and threw under all of
61
+ * them, and `failures` carries each one.
62
+ *
63
+ * A hook-using component lands in `threw` alongside a broken one, and no
64
+ * function-call probe can separate them: both are functions, both throw, and the
65
+ * error React raises for a hook outside a render is a message rather than a
66
+ * type. So this does not say *which* fault it is. It says the probe got as far
67
+ * as calling the component, which is the line a host can act on.
68
+ */
69
+ export type NotProbeableCause = "not-callable" | "threw";
70
+ export type NotProbeable = {
71
+ readonly outcome: "not-probeable";
72
+ readonly cause: NotProbeableCause;
73
+ readonly reason: string;
74
+ /** Every configuration that threw. Empty exactly when nothing was called. */
75
+ readonly failures: readonly ProbeFailure[];
76
+ };
77
+ /**
78
+ * Named rather than counted. Whoever reads this has to reproduce it, and
79
+ * `{"type":"select"}` is the whole reproduction.
80
+ */
81
+ export declare const describeProbeFailures: (failures: readonly ProbeFailure[]) => string;
82
+ export type ConformanceVerdict = {
83
+ readonly outcome: "decorates";
84
+ } | {
85
+ readonly outcome: "not-decorated";
86
+ } | NotProbeable;
87
+ /**
88
+ * One call of the probe: the props the node carries, and the answers it had.
89
+ *
90
+ * The second half was `NO_DATA` for every probe in this module until 0185, and
91
+ * that was not a default — it was the only state reachable. A primitive that
92
+ * places a region only when a source failed placed it in no probe, so
93
+ * `unplacedSlots` read that region as dropped content and 0180 wrote the
94
+ * consequence down as a rule about what a bound primitive may declare. The
95
+ * rule was the probe's limit wearing the library's clothes.
96
+ */
97
+ export type ProbeConfiguration = {
98
+ readonly props: JsonObject;
99
+ /** `NO_DATA` means *this node asked nothing*, which is most of them. */
100
+ readonly data: NodeData;
101
+ };
102
+ /** Props with nothing answered beside them, which is most configurations (0185). */
103
+ export declare const unasked: (props: JsonObject) => ProbeConfiguration;
104
+ /**
105
+ * An answer state a caller wants a primitive probed in, beside the states its
106
+ * own schema closes over.
107
+ *
108
+ * Supplied rather than derived, for the reason the specimen's `endpoints` is:
109
+ * the probe would have to invent a value, and an invented answer is either one
110
+ * the primitive happens to be able to draw — in which case the probe is
111
+ * measuring the guess — or one it cannot, in which case every bound primitive
112
+ * reports its failure region as the only one it places. Whoever registered the
113
+ * primitive knows what it reads; the probe does not.
114
+ */
115
+ export type ProbeAnswers = {
116
+ /** Answers by binding name, as the render walk would hand them over. */
117
+ readonly data: NodeData;
118
+ /**
119
+ * The props the node carries in this state. Absent means its defaults, which
120
+ * is the configuration a binding name's default was chosen for (0184).
121
+ */
122
+ readonly props?: JsonObject;
123
+ };
124
+ /**
125
+ * The prop configurations a primitive is probed under (0075).
126
+ *
127
+ * The default configuration first, then each closed choice's values one at a
128
+ * time with everything else left alone. The **sum** of the choices rather than
129
+ * their product: a schema with six enums of eight members is forty-eight
130
+ * renders this way and two hundred and sixty thousand the other, and the cost
131
+ * of the cheap answer is that a primitive which places children only under two
132
+ * particular values together is not found. Nothing in the library is shaped
133
+ * that way, and a primitive that were would be one nobody can read.
134
+ */
135
+ export declare const probeConfigurations: (choices: readonly ClosedChoice[]) => readonly JsonObject[];
136
+ /**
137
+ * The states a primitive is probed in: what its schema closes over, then what
138
+ * its registrant declared it can be answered with (0185).
139
+ *
140
+ * Two functions rather than one, and the split is the argument. What a schema
141
+ * closes over is **derived** — `probeConfigurations` reads it off the
142
+ * registration and cannot be wrong about it. What a bound primitive can be
143
+ * answered with is **supplied**, because nothing here knows it. Folding the
144
+ * second into the first would put a caller's declaration and a machine's
145
+ * enumeration behind one name, and the day they disagree is the day nobody can
146
+ * tell which half was wrong.
147
+ *
148
+ * The answers are summed in rather than crossed with every prop value, for the
149
+ * reason 0075 sums the choices, and it costs less here: what a bound primitive
150
+ * draws turns on the *answer*, and the state a caller has to reach to find an
151
+ * unplaced region is the answer under the props that name it — which is why an
152
+ * answer carries its own optional props.
153
+ */
154
+ export declare const probeStates: (configurations: readonly JsonObject[], answers?: readonly ProbeAnswers[]) => readonly ProbeConfiguration[];
155
+ /**
156
+ * Decoration is a promise that holds however the primitive is configured, so
157
+ * one configuration that fails to decorate makes the answer `not-decorated`
158
+ * even if the rest pass. A configuration that throws answers nothing either
159
+ * way and is skipped; when none of them answer, every failure is carried on the
160
+ * verdict, so the reason the probe declined is a value rather than the prose of
161
+ * whichever configuration happened to be first.
162
+ */
163
+ export declare const probeEditableDecoration: (primitive: LoomPrimitive, text?: PrimitiveText<string>, configurations?: readonly ProbeConfiguration[], declaredFrames?: readonly string[]) => ConformanceVerdict;
164
+ /**
165
+ * The second probe: does a primitive place what it was handed?
166
+ *
167
+ * A declared behaviour is a promise of the same kind and fails the same way. A
168
+ * primitive that asks for the copy control and never reads
169
+ * `loom.behaviours.copy` registers cleanly, renders correctly and simply has no
170
+ * copy button — the gap the behaviour was declared to close, still open, with
171
+ * the declaration saying otherwise.
172
+ *
173
+ * A declared slot is a promise. The catalogue tells a model the region exists,
174
+ * a proposal puts content there, and a primitive that never reads
175
+ * `loom.slots.aside` drops it — rendering correctly, reporting nothing, with the
176
+ * content gone from the page and still present in the tree. That is the same
177
+ * failure shape as ignoring `loom.editable`, and 0051 made it more likely by
178
+ * making slots mean something: before, a region nobody placed still appeared
179
+ * inline in `children`.
180
+ *
181
+ * It answers a second question at the same time, because one call can. A
182
+ * primitive that renders no `children` is a leaf: `loom.stat` holds its value
183
+ * and label as props, so a text node underneath it has nowhere to go and is
184
+ * dropped just as silently. The renderer cannot tell a leaf from a container —
185
+ * the registry records declared slots, not whether a component reads
186
+ * `children` — but the probe can simply look, which is cheaper than asking
187
+ * every author to declare it and impossible to get out of step with the code.
188
+ *
189
+ * Reported, never enforced, for the reason `audit.ts` gives: a primitive that
190
+ * deliberately ignores a region under some prop combination is a design choice.
191
+ *
192
+ * **It answers from every configuration the schema closes over** (0075), not
193
+ * from one render. `loom.field` places children only when its `type` is
194
+ * `select`, because only a select has choices, and probed at its default type
195
+ * alone it reported as a leaf — a primitive with nowhere to put a child node,
196
+ * which is false and is the one thing a portal reads this to decide. A claim
197
+ * about a primitive that holds under one prop value is not a claim about the
198
+ * primitive.
199
+ */
200
+ export type PlacementVerdict = {
201
+ readonly outcome: "probed";
202
+ /** Declared slots that no probed configuration placed. */
203
+ readonly unplacedSlots: readonly string[];
204
+ /** Declared behaviours whose control no probed configuration placed. */
205
+ readonly unplacedBehaviours: readonly BehaviourName[];
206
+ /** Whether any probed configuration placed the children it was handed. */
207
+ readonly rendersChildren: boolean;
208
+ /**
209
+ * The configurations that answered — one unasked `{}` alone when the
210
+ * schema closes over nothing and the caller supplied no answers.
211
+ */
212
+ readonly probed: readonly ProbeConfiguration[];
213
+ /**
214
+ * Configurations built from the primitive's own schema that it threw on.
215
+ * Never a reason to distrust the verdict — the configurations that
216
+ * answered still answered — and always a fault: a component that throws
217
+ * on a value its schema accepts is one a valid tree can crash a page with.
218
+ */
219
+ readonly threw: readonly ProbeFailure[];
220
+ } | NotProbeable;
221
+ export declare const probePlacement: (primitive: LoomPrimitive, declaredSlots: readonly string[], text?: PrimitiveText<string>, configurations?: readonly ProbeConfiguration[], declaredBehaviours?: readonly BehaviourName[], declaredFrames?: readonly string[]) => PlacementVerdict;
222
+ /**
223
+ * The third probe: does a primitive that posts put the address on the page?
224
+ *
225
+ * `loom.submit` is the one thing on the render context whose absence is
226
+ * survivable and whose *silent* absence is not (0065). A tree names an
227
+ * endpoint, a deployment resolves it before the walk, and the primitive is
228
+ * handed a target — but nothing makes it read one. A form that ignores it
229
+ * renders a set of fields and a submit control with no `action` at all, which a
230
+ * browser resolves by posting to the page the form is sitting on. Nothing
231
+ * throws, nothing is logged, and the first person to find out is whoever filled
232
+ * it in.
233
+ *
234
+ * So the probe hands the component a target whose action is a string nothing
235
+ * else would produce, and looks for that string in what came back. Placing the
236
+ * address is the claim, because the address is the whole of what the seam
237
+ * delivers: a primitive that reads the outcome only to choose between two
238
+ * sentences has not connected anything.
239
+ *
240
+ * Its false negative is the one `containsMarker` cannot avoid: a primitive that
241
+ * rebuilds the action — appending a query string, say — has posted somewhere
242
+ * real and reads here as `not-placed`. That is the same bargain the decoration
243
+ * probe makes with identity, and it errs towards reporting a fault that is not
244
+ * one, which a person reading the audit can dismiss in a second. The reverse
245
+ * error is the one this exists to prevent.
246
+ */
247
+ export type SubmissionVerdict = {
248
+ readonly outcome: "places";
249
+ } | {
250
+ readonly outcome: "not-placed";
251
+ } | NotProbeable;
252
+ /**
253
+ * `some` rather than `every`, matching `probePlacement`. The question is
254
+ * whether this primitive posts at all, and a primitive that renders a form
255
+ * under one layout and a summary under another is answering honestly in both.
256
+ */
257
+ export declare const probeSubmissionPlacement: (primitive: LoomPrimitive, text?: PrimitiveText<string>, configurations?: readonly ProbeConfiguration[], declaredFrames?: readonly string[]) => SubmissionVerdict;
258
+ /**
259
+ * The fourth probe: which colours does this primitive put on which grounds?
260
+ *
261
+ * `PALETTE_TEXT_PAIRINGS` in `src/theme/contrast.ts` says of itself that it is
262
+ * *read off `src/primitives` rather than imagined*, and until now that was a
263
+ * promise a person kept by hand. A pairing a new primitive rendered was audited
264
+ * only if somebody remembered to add a row, and the audit's silence about the
265
+ * rest read exactly like a pass. This answers the question from the components
266
+ * instead, the same way `submits` stopped being a declaration and became an
267
+ * observation.
268
+ *
269
+ * ## Painted and floating
270
+ *
271
+ * A primitive that sets `color` under a ground it painted itself has said
272
+ * everything about that pair: both ends are its own and no container can change
273
+ * them. That is a **painted** pairing.
274
+ *
275
+ * A primitive that sets `color` and paints no ground under it — `loom.perk`'s
276
+ * subtle note, `loom.milestone`'s marker — has said only half. The other half
277
+ * is whatever it is placed in, and 0008 leaves parentage to the tree, so the
278
+ * ground is any ground a container puts children on. Those inks are reported
279
+ * as **floating**, with the grounds separately, and pairing them up is
280
+ * `pairings.ts`'s job because it needs the whole registry to know what the
281
+ * grounds are.
282
+ *
283
+ * ## A ground is not always an ancestor
284
+ *
285
+ * CSS inherits `color` down the tree and paints a background on whatever box
286
+ * is behind the glyphs, and those two are not the same walk. A run of text sits
287
+ * on the ground of the nearest box *behind* it, which is an ancestor only when
288
+ * nothing is stacked in between.
289
+ *
290
+ * `loom.overlay` is the case that proves it. It sets `fg-default` on its root
291
+ * and paints nothing there; a scrim child paints `bg-overlay` in grid cell
292
+ * `1 / 1` at `zIndex: 1`; the content sits in the same cell at `zIndex: 2` and
293
+ * sets no colour of its own. Every word of it renders in `fg-default` on
294
+ * `bg-overlay` — and read as an ancestor chain the two ends never meet, so the
295
+ * pairing was invisible here from the day the primitive shipped.
296
+ *
297
+ * So two things travel down: the ground in effect **and the ink in effect**,
298
+ * and a pairing is recorded wherever either changes under the other. Siblings
299
+ * that declare the same `gridArea` are one stack ordered by `zIndex`, and an
300
+ * element's ground is the nearest member below it that paints one.
301
+ *
302
+ * ## What it does not see
303
+ *
304
+ * Only `children` is walked, matching `carriesDecoration`, so an element handed
305
+ * to another component through a prop of the primitive's own naming is not
306
+ * followed. Only `background`, `backgroundColor` and `color` are read, and only
307
+ * where the value is exactly the `var(--loom-…)` form `colour()` produces — a
308
+ * primitive that composes a gradient or interpolates a variable into a longhand
309
+ * answers nothing rather than a guess, for the reason `contrastRatio` declines
310
+ * a colour it would have to parse.
311
+ *
312
+ * **Stacking is read from `gridArea` and from nothing else.** An absolutely
313
+ * positioned sibling also lies under its neighbours, and whether it lies under
314
+ * *all* of them is a question about an arbitrary length expression —
315
+ * `inset: calc(-1 * 4px)` is `loom.halo`'s, and no reading of that string says
316
+ * what it covers. A grid area is a name two elements either share or do not.
317
+ * Neither `loom.halo` nor `loom.backdrop` paints a palette slot under its
318
+ * content today (both draw gradients, which `slotOf` declines), so the narrow
319
+ * rule costs nothing real and the wide one would have been a guess.
320
+ */
321
+ export type ColourPairing = {
322
+ readonly foreground: PaletteSlot;
323
+ readonly background: PaletteSlot;
324
+ };
325
+ export type ColourVerdict = {
326
+ readonly outcome: "probed";
327
+ /** Ink and ground both set by this primitive. */
328
+ readonly painted: readonly ColourPairing[];
329
+ /** Ink set here, ground left to whatever this is placed in. */
330
+ readonly floating: readonly PaletteSlot[];
331
+ /** Grounds this primitive puts its declared children and slots on. */
332
+ readonly childGrounds: readonly PaletteSlot[];
333
+ } | NotProbeable;
334
+ /**
335
+ * The union across every configuration, rather than the intersection the
336
+ * decoration probe takes. Decoration is a promise that has to hold however the
337
+ * primitive is configured; a colour pairing is a fact about one configuration,
338
+ * and a `loom.section` that paints `accent-subtle` only under `tone: "accent"`
339
+ * renders that pairing on a real page whatever the other tones do.
340
+ */
341
+ export declare const probeColourPairings: (primitive: LoomPrimitive, declaredSlots?: readonly string[], text?: PrimitiveText<string>, configurations?: readonly ProbeConfiguration[], declaredFrames?: readonly string[]) => ColourVerdict;
342
+ //# sourceMappingURL=conformance.d.ts.map