@wildo-ai/framework-knowledge 1.1.10 → 1.1.12

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 (1349) hide show
  1. package/dist/claude-marketplace/.claude-plugin/marketplace.json +1 -1
  2. package/dist/claude-marketplace/plugins/wildo/.claude-plugin/plugin.json +1 -1
  3. package/dist/claude-marketplace/plugins/wildo/references/acceptance.md +4 -0
  4. package/dist/claude-marketplace/plugins/wildo/references/composites-and-the-loop.md +25 -3
  5. package/dist/claude-marketplace/plugins/wildo/references/creation-state.md +40 -12
  6. package/dist/claude-marketplace/plugins/wildo/references/derived-artifacts.md +7 -5
  7. package/dist/claude-marketplace/plugins/wildo/references/runs-judges-and-questions.md +12 -0
  8. package/dist/claude-marketplace/plugins/wildo/skills/answer/SKILL.md +19 -2
  9. package/dist/claude-marketplace/plugins/wildo/skills/build/SKILL.md +33 -9
  10. package/dist/esm/framework-knowledge.definitions.d.ts +2 -3
  11. package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -1
  12. package/dist/esm/framework-knowledge.definitions.js +628 -107
  13. package/dist/esm/framework-knowledge.definitions.js.map +1 -1
  14. package/dist/esm/framework-knowledge.loader.js.map +1 -1
  15. package/dist/esm/framework-knowledge.research-provenance.d.ts +90 -0
  16. package/dist/esm/framework-knowledge.research-provenance.d.ts.map +1 -0
  17. package/dist/esm/framework-knowledge.research-provenance.js +140 -0
  18. package/dist/esm/framework-knowledge.research-provenance.js.map +1 -0
  19. package/dist/esm/framework-knowledge.schemas.d.ts.map +1 -1
  20. package/dist/esm/framework-knowledge.schemas.js.map +1 -1
  21. package/dist/esm/index.d.ts +2 -0
  22. package/dist/esm/index.d.ts.map +1 -1
  23. package/dist/esm/index.js +2 -0
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts +2 -3
  26. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts.map +1 -1
  27. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js +4 -12
  28. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js.map +1 -1
  29. package/dist/esm/playbooks/bottom_up.build/playbook.definition.d.ts.map +1 -1
  30. package/dist/esm/playbooks/bottom_up.build/playbook.definition.js +12 -1
  31. package/dist/esm/playbooks/bottom_up.build/playbook.definition.js.map +1 -1
  32. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +10 -4
  33. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -1
  34. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +82 -15
  35. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -1
  36. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +1 -5
  37. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -1
  38. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +4 -16
  39. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -1
  40. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts.map +1 -1
  41. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -1
  42. package/dist/esm/playbooks/bottom_up.capability-composition/playbook.definition.d.ts +1 -1
  43. package/dist/esm/playbooks/bottom_up.capability-composition/playbook.definition.d.ts.map +1 -1
  44. package/dist/esm/playbooks/bottom_up.capability-composition/playbook.definition.js +1 -1
  45. package/dist/esm/playbooks/bottom_up.capability-composition/playbook.definition.js.map +1 -1
  46. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.d.ts +9 -5
  47. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.d.ts.map +1 -1
  48. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js +11 -7
  49. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js.map +1 -1
  50. package/dist/esm/playbooks/bottom_up.documentation-plan/playbook.definition.d.ts +1 -1
  51. package/dist/esm/playbooks/bottom_up.documentation-plan/playbook.definition.d.ts.map +1 -1
  52. package/dist/esm/playbooks/bottom_up.documentation-plan/playbook.definition.js +1 -1
  53. package/dist/esm/playbooks/bottom_up.documentation-plan/playbook.definition.js.map +1 -1
  54. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -1
  55. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +38 -14
  56. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -1
  57. package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.d.ts +16 -8
  58. package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.d.ts.map +1 -1
  59. package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.js +20 -8
  60. package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.js.map +1 -1
  61. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +29 -3
  62. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -1
  63. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +80 -16
  64. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -1
  65. package/dist/esm/playbooks/bottom_up.integration-plan/playbook.definition.d.ts +2 -2
  66. package/dist/esm/playbooks/bottom_up.integration-plan/playbook.definition.d.ts.map +1 -1
  67. package/dist/esm/playbooks/bottom_up.integration-plan/playbook.definition.js +7 -2
  68. package/dist/esm/playbooks/bottom_up.integration-plan/playbook.definition.js.map +1 -1
  69. package/dist/esm/playbooks/bottom_up.maturity-reading/playbook.definition.d.ts +2 -2
  70. package/dist/esm/playbooks/bottom_up.maturity-reading/playbook.definition.d.ts.map +1 -1
  71. package/dist/esm/playbooks/bottom_up.maturity-reading/playbook.definition.js +2 -2
  72. package/dist/esm/playbooks/bottom_up.maturity-reading/playbook.definition.js.map +1 -1
  73. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +6 -2
  74. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -1
  75. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +4 -3
  76. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -1
  77. package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.d.ts +26 -7
  78. package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.d.ts.map +1 -1
  79. package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.js +23 -6
  80. package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.js.map +1 -1
  81. package/dist/esm/playbooks/cross_cutting.application-creation/playbook.definition.d.ts +45 -10
  82. package/dist/esm/playbooks/cross_cutting.application-creation/playbook.definition.d.ts.map +1 -1
  83. package/dist/esm/playbooks/cross_cutting.application-creation/playbook.definition.js +61 -21
  84. package/dist/esm/playbooks/cross_cutting.application-creation/playbook.definition.js.map +1 -1
  85. package/dist/esm/playbooks/cross_cutting.compliance/playbook.definition.d.ts +4 -3
  86. package/dist/esm/playbooks/cross_cutting.compliance/playbook.definition.d.ts.map +1 -1
  87. package/dist/esm/playbooks/cross_cutting.compliance/playbook.definition.js +8 -5
  88. package/dist/esm/playbooks/cross_cutting.compliance/playbook.definition.js.map +1 -1
  89. package/dist/esm/playbooks/cross_cutting.feature-development/playbook.definition.js.map +1 -1
  90. package/dist/esm/playbooks/cross_cutting.refinement/playbook.definition.d.ts +2 -2
  91. package/dist/esm/playbooks/cross_cutting.refinement/playbook.definition.d.ts.map +1 -1
  92. package/dist/esm/playbooks/cross_cutting.refinement/playbook.definition.js +7 -3
  93. package/dist/esm/playbooks/cross_cutting.refinement/playbook.definition.js.map +1 -1
  94. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts +1 -1
  95. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js +3 -3
  96. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js.map +1 -1
  97. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts.map +1 -1
  98. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +9 -7
  99. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -1
  100. package/dist/esm/playbooks/refinement.feature-contribution/playbook.definition.d.ts +5 -0
  101. package/dist/esm/playbooks/refinement.feature-contribution/playbook.definition.d.ts.map +1 -1
  102. package/dist/esm/playbooks/refinement.feature-contribution/playbook.definition.js +9 -2
  103. package/dist/esm/playbooks/refinement.feature-contribution/playbook.definition.js.map +1 -1
  104. package/dist/esm/playbooks/refinement.governance-document-candidate/playbook.definition.js.map +1 -1
  105. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +5 -2
  106. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -1
  107. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +15 -5
  108. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -1
  109. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js +1 -1
  110. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js.map +1 -1
  111. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts.map +1 -1
  112. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js +6 -4
  113. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js.map +1 -1
  114. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts +3 -1
  115. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts.map +1 -1
  116. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js +4 -1
  117. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js.map +1 -1
  118. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +10 -1
  119. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -1
  120. package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +36 -13
  121. package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -1
  122. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts +8 -2
  123. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -1
  124. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js +7 -1
  125. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js.map +1 -1
  126. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts +4 -1
  127. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts.map +1 -1
  128. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js +34 -6
  129. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js.map +1 -1
  130. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts +7 -3
  131. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts.map +1 -1
  132. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js +6 -4
  133. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js.map +1 -1
  134. package/dist/esm/playbooks/top_down.compliance-evidence-adequacy/playbook.definition.js +2 -2
  135. package/dist/esm/playbooks/top_down.compliance-evidence-adequacy/playbook.definition.js.map +1 -1
  136. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +22 -10
  137. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -1
  138. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +39 -29
  139. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -1
  140. package/dist/esm/playbooks/top_down.compliance-research/playbook.definition.js.map +1 -1
  141. package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts +8 -3
  142. package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts.map +1 -1
  143. package/dist/esm/playbooks/top_down.definition/playbook.definition.js +24 -9
  144. package/dist/esm/playbooks/top_down.definition/playbook.definition.js.map +1 -1
  145. package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.d.ts +8 -2
  146. package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.d.ts.map +1 -1
  147. package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.js +8 -2
  148. package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.js.map +1 -1
  149. package/dist/esm/playbooks/top_down.feature-drafts/playbook.definition.js +1 -1
  150. package/dist/esm/playbooks/top_down.feature-drafts/playbook.definition.js.map +1 -1
  151. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js.map +1 -1
  152. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js +2 -2
  153. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js.map +1 -1
  154. package/dist/esm/playbooks/top_down.market-research/playbook.definition.js.map +1 -1
  155. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +1 -1
  156. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -1
  157. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -1
  158. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +13 -5
  159. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -1
  160. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +3 -7
  161. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -1
  162. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +12 -14
  163. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -1
  164. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts +3 -0
  165. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts.map +1 -1
  166. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.js +2 -1
  167. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.js.map +1 -1
  168. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +3 -1
  169. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -1
  170. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +2 -1
  171. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -1
  172. package/dist/esm/playbooks/top_down.service-method/playbook.definition.d.ts +98 -0
  173. package/dist/esm/playbooks/top_down.service-method/playbook.definition.d.ts.map +1 -0
  174. package/dist/esm/playbooks/top_down.service-method/playbook.definition.js +124 -0
  175. package/dist/esm/playbooks/top_down.service-method/playbook.definition.js.map +1 -0
  176. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts +3 -1
  177. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -1
  178. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js +4 -2
  179. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js.map +1 -1
  180. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +34 -1
  181. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -1
  182. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +39 -20
  183. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -1
  184. package/dist/esm/source-anchor-grammar.d.ts +70 -0
  185. package/dist/esm/source-anchor-grammar.d.ts.map +1 -0
  186. package/dist/esm/source-anchor-grammar.js +114 -0
  187. package/dist/esm/source-anchor-grammar.js.map +1 -0
  188. package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -1
  189. package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/external-framework-mapping.json +1 -1
  190. package/dist/knowledge/manifest.json +8 -8
  191. package/dist/knowledge/playbooks/bottom_up.assemble-verify/method.md +12 -0
  192. package/dist/knowledge/playbooks/bottom_up.assemble-verify/playbook.json +4 -4
  193. package/dist/knowledge/playbooks/bottom_up.build/method.md +12 -2
  194. package/dist/knowledge/playbooks/bottom_up.build/playbook.json +5 -3
  195. package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-protocol.json +1 -1
  196. package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-treatment.json +1 -1
  197. package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +788 -49
  198. package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +18 -4
  199. package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +451 -16
  200. package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +3 -6
  201. package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +1 -0
  202. package/dist/knowledge/playbooks/bottom_up.capability-composition/method.md +2 -2
  203. package/dist/knowledge/playbooks/bottom_up.capability-composition/playbook.json +3 -2
  204. package/dist/knowledge/playbooks/bottom_up.conception/method.md +12 -7
  205. package/dist/knowledge/playbooks/bottom_up.conception/playbook.json +4 -3
  206. package/dist/knowledge/playbooks/bottom_up.documentation-plan/method.md +2 -2
  207. package/dist/knowledge/playbooks/bottom_up.documentation-plan/playbook.json +2 -1
  208. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -1
  209. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -1
  210. package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +115 -2
  211. package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +11 -4
  212. package/dist/knowledge/playbooks/bottom_up.experience-plan/method.md +71 -7
  213. package/dist/knowledge/playbooks/bottom_up.experience-plan/playbook.json +19 -6
  214. package/dist/knowledge/playbooks/bottom_up.foundation/method.md +126 -24
  215. package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +51 -7
  216. package/dist/knowledge/playbooks/bottom_up.integration-plan/method.md +28 -9
  217. package/dist/knowledge/playbooks/bottom_up.integration-plan/playbook.json +5 -3
  218. package/dist/knowledge/playbooks/bottom_up.maturity-reading/method.md +10 -2
  219. package/dist/knowledge/playbooks/bottom_up.maturity-reading/playbook.json +4 -3
  220. package/dist/knowledge/playbooks/bottom_up.placement-plan/method.md +67 -5
  221. package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +10 -3
  222. package/dist/knowledge/playbooks/bottom_up.website-plan/method.md +176 -22
  223. package/dist/knowledge/playbooks/bottom_up.website-plan/playbook.json +21 -3
  224. package/dist/knowledge/playbooks/cross_cutting.application-creation/method.md +27 -12
  225. package/dist/knowledge/playbooks/cross_cutting.application-creation/playbook.json +11 -5
  226. package/dist/knowledge/playbooks/cross_cutting.compliance/method.md +4 -4
  227. package/dist/knowledge/playbooks/cross_cutting.compliance/playbook.json +7 -2
  228. package/dist/knowledge/playbooks/cross_cutting.feature-development/playbook.json +1 -0
  229. package/dist/knowledge/playbooks/cross_cutting.refinement/method.md +6 -5
  230. package/dist/knowledge/playbooks/cross_cutting.refinement/playbook.json +5 -2
  231. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/evaluation-protocol.json +1 -1
  232. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/evaluation-treatment.json +1 -1
  233. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +153 -28
  234. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +3 -2
  235. package/dist/knowledge/playbooks/refinement.document-facts/method.md +36 -7
  236. package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +6 -2
  237. package/dist/knowledge/playbooks/refinement.feature-contribution/playbook.json +9 -2
  238. package/dist/knowledge/playbooks/refinement.governance-document-candidate/method.md +8 -6
  239. package/dist/knowledge/playbooks/refinement.governance-document-candidate/playbook.json +2 -1
  240. package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-protocol.json +1 -1
  241. package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-treatment.json +1 -1
  242. package/dist/knowledge/playbooks/top_down.brand-identity/method.md +9 -2
  243. package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +17 -5
  244. package/dist/knowledge/playbooks/top_down.brand-name-research/method.md +11 -4
  245. package/dist/knowledge/playbooks/top_down.brand-name-research/playbook.json +3 -2
  246. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-protocol.json +1 -1
  247. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-treatment.json +1 -1
  248. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/method.md +16 -6
  249. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/playbook.json +3 -2
  250. package/dist/knowledge/playbooks/top_down.brand-naming/playbook.json +5 -1
  251. package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -1
  252. package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -1
  253. package/dist/knowledge/playbooks/top_down.business-model/method.md +49 -11
  254. package/dist/knowledge/playbooks/top_down.business-model/playbook.json +24 -8
  255. package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +6 -2
  256. package/dist/knowledge/playbooks/top_down.compliance-analysis/method.md +1 -1
  257. package/dist/knowledge/playbooks/top_down.compliance-analysis/playbook.json +49 -14
  258. package/dist/knowledge/playbooks/top_down.compliance-conception/method.md +15 -5
  259. package/dist/knowledge/playbooks/top_down.compliance-conception/playbook.json +6 -2
  260. package/dist/knowledge/playbooks/top_down.compliance-evidence-adequacy/method.md +20 -0
  261. package/dist/knowledge/playbooks/top_down.compliance-evidence-adequacy/playbook.json +4 -3
  262. package/dist/knowledge/playbooks/top_down.compliance-posture/evaluation-protocol.json +1 -1
  263. package/dist/knowledge/playbooks/top_down.compliance-posture/evaluation-treatment.json +1 -1
  264. package/dist/knowledge/playbooks/top_down.compliance-posture/method.md +69 -65
  265. package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +11 -7
  266. package/dist/knowledge/playbooks/top_down.compliance-research/playbook.json +1 -0
  267. package/dist/knowledge/playbooks/top_down.definition/method.md +10 -3
  268. package/dist/knowledge/playbooks/top_down.definition/playbook.json +14 -5
  269. package/dist/knowledge/playbooks/top_down.expert-personas/method.md +10 -3
  270. package/dist/knowledge/playbooks/top_down.expert-personas/playbook.json +4 -3
  271. package/dist/knowledge/playbooks/top_down.feature-drafts/playbook.json +2 -1
  272. package/dist/knowledge/playbooks/top_down.market-analysis/playbook.json +1 -0
  273. package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/method.md +4 -2
  274. package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/playbook.json +4 -3
  275. package/dist/knowledge/playbooks/top_down.market-research/playbook.json +1 -0
  276. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/method.md +3 -0
  277. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +3 -2
  278. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -1
  279. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -1
  280. package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +1 -0
  281. package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +10 -6
  282. package/dist/knowledge/playbooks/top_down.risk-register/method.md +8 -1
  283. package/dist/knowledge/playbooks/top_down.risk-register/playbook.json +5 -1
  284. package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +6 -1
  285. package/dist/knowledge/playbooks/top_down.service-method/method.md +216 -0
  286. package/dist/knowledge/playbooks/top_down.service-method/playbook.json +108 -0
  287. package/dist/knowledge/playbooks/top_down.value-proposition/method.md +5 -2
  288. package/dist/knowledge/playbooks/top_down.value-proposition/playbook.json +9 -3
  289. package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-protocol.json +1 -1
  290. package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-treatment.json +1 -1
  291. package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +21 -2
  292. package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +63 -18
  293. package/dist/knowledge/references/acp.execution-profile.md +9 -1
  294. package/dist/knowledge/references/application-documentation-chapters.config.md +45 -10
  295. package/dist/knowledge/references/application-documentation-plan.config.md +2 -2
  296. package/dist/knowledge/references/application-maturity.config.md +28 -2
  297. package/dist/knowledge/references/backend.inbound-channels.attachment-adoption.md +57 -0
  298. package/dist/knowledge/references/backend.inbound-channels.handler-definition.md +65 -13
  299. package/dist/knowledge/references/backend.inbound-handlers.agents.md +10 -3
  300. package/dist/knowledge/references/backend.inbound-handlers.definition.md +463 -5
  301. package/dist/knowledge/references/backend.inbound-handlers.pipelines.md +62 -0
  302. package/dist/knowledge/references/blueprint.definition-contract.md +483 -0
  303. package/dist/knowledge/references/brand.name-screening.config.md +30 -3
  304. package/dist/knowledge/references/brand.visual-tone.config.md +26 -8
  305. package/dist/knowledge/references/build-plan.task-graph.config.md +438 -12
  306. package/dist/knowledge/references/business-model.pricing-plan.config.md +19 -9
  307. package/dist/knowledge/references/business-model.snapshot.config.md +29 -2
  308. package/dist/knowledge/references/business-model.snapshot.validation.md +29 -8
  309. package/dist/knowledge/references/capability-composition.config.md +4 -3
  310. package/dist/knowledge/references/cli.market.generate-command.md +2 -1
  311. package/dist/knowledge/references/companion.introspection.behaviors.market.md +3 -0
  312. package/dist/knowledge/references/companion.market.generation-service.md +46 -5
  313. package/dist/knowledge/references/companion.market.prompt-renderer.md +1 -1
  314. package/dist/knowledge/references/companion.technical-doc.service.md +342 -76
  315. package/dist/knowledge/references/domain-plan.record-partition.md +105 -0
  316. package/dist/knowledge/references/engine.client-bundle.allow-list.md +16 -0
  317. package/dist/knowledge/references/engine.saas-technical-doc.config.md +69 -15
  318. package/dist/knowledge/references/engine.saas-website.config.md +16 -44
  319. package/dist/knowledge/references/example.ai-use-declaration.agent.md +37 -0
  320. package/dist/knowledge/references/example.authorization.application-roles.office-and-field.md +10 -0
  321. package/dist/knowledge/references/{example.authorization.service-provider-organization-wide-access.md → example.authorization.relationship-organization-wide-access.md} +2 -2
  322. package/dist/knowledge/references/example.backend.addon-wiring.module.md +6 -0
  323. package/dist/knowledge/references/example.backend.custom-operation.child-line-total.md +4 -3
  324. package/dist/knowledge/references/example.backend.custom-operation.create-related-resource.md +22 -0
  325. package/dist/knowledge/references/example.backend.custom-operation.declared-refusal-code.md +41 -0
  326. package/dist/knowledge/references/example.backend.custom-operation.external-effect-reservation.md +107 -0
  327. package/dist/knowledge/references/example.blueprint.definition.internal-tool.md +47 -0
  328. package/dist/knowledge/references/example.config.app-shell.full.md +6 -3
  329. package/dist/knowledge/references/example.config.app-shell.hosted-components.md +4 -1
  330. package/dist/knowledge/references/example.config.backend.inbound-email.md +4 -2
  331. package/dist/knowledge/references/example.config.backend.required-floors.md +4 -2
  332. package/dist/knowledge/references/example.config.design-system.full.md +40 -116
  333. package/dist/knowledge/references/example.flows-actors.autonomous-agent.reviewed-write.md +10 -0
  334. package/dist/knowledge/references/example.flows-actors.chat-assistant.md +78 -19
  335. package/dist/knowledge/references/example.flows-actors.declared-flow.md +115 -0
  336. package/dist/knowledge/references/example.flows-actors.llm-agent-one-shot.md +12 -0
  337. package/dist/knowledge/references/example.inbound.email-channel-handler.md +10 -1
  338. package/dist/knowledge/references/example.infra.environment-config.local.md +34 -63
  339. package/dist/knowledge/references/example.layout-2d.registration.md +11 -0
  340. package/dist/knowledge/references/example.minion.contained-tick.md +1 -1
  341. package/dist/knowledge/references/example.module.companion-exports.full.md +1 -0
  342. package/dist/knowledge/references/example.module.relationships.actor-edge-back-to-scope-owner.md +35 -35
  343. package/dist/knowledge/references/example.module.relationships.scope-membership-junction.md +8 -10
  344. package/dist/knowledge/references/example.navigation.one-entry-per-concept.md +47 -0
  345. package/dist/knowledge/references/example.organization-identity.system-of-record-partitions.md +18 -0
  346. package/dist/knowledge/references/example.organizations.relationship-kinds.md +26 -0
  347. package/dist/knowledge/references/example.professional-qualifications.declaration.md +10 -0
  348. package/dist/knowledge/references/example.professional-qualifications.gate.md +25 -0
  349. package/dist/knowledge/references/example.provider.backend-module-shape.md +38 -4
  350. package/dist/knowledge/references/example.provider.frontend-facet.on-demand-sdk.md +41 -0
  351. package/dist/knowledge/references/example.provider.frontend-file-picker.contribution.md +4 -5
  352. package/dist/knowledge/references/example.rate-limit.resource-operation-surface.md +7 -5
  353. package/dist/knowledge/references/example.resource.add-resource.module-factory-map.md +0 -5
  354. package/dist/knowledge/references/example.resource.custom-view.backend-refusal.md +75 -0
  355. package/dist/knowledge/references/example.resource.status-lifecycle.quote.md +8 -7
  356. package/dist/knowledge/references/example.resource.ui-behavior.enum-badge.md +23 -7
  357. package/dist/knowledge/references/example.resource.ui-behavior.operation-icon.md +87 -22
  358. package/dist/knowledge/references/example.resource.ui-behavior.record-template.md +80 -0
  359. package/dist/knowledge/references/example.resource.ui-behavior.surface-decision.md +20 -21
  360. package/dist/knowledge/references/example.resource.ui-behavior.workflow-record-page.md +212 -0
  361. package/dist/knowledge/references/example.spec.composite-view.workspace.md +10 -2
  362. package/dist/knowledge/references/example.subject-export.portability-archive.md +42 -0
  363. package/dist/knowledge/references/example.views.app-level.workflow-home.md +238 -0
  364. package/dist/knowledge/references/example.views.composite-view.workspace.md +10 -3
  365. package/dist/knowledge/references/example.website.blocks.section.md +20 -0
  366. package/dist/knowledge/references/example.website.blocks.site-choices.md +78 -0
  367. package/dist/knowledge/references/example.website.blocks.site-configs.md +155 -0
  368. package/dist/knowledge/references/example.website.demo.append.md +57 -0
  369. package/dist/knowledge/references/example.website.demo.approval.md +47 -0
  370. package/dist/knowledge/references/example.website.demo.celebrate.md +39 -0
  371. package/dist/knowledge/references/example.website.demo.complete-items.md +103 -0
  372. package/dist/knowledge/references/example.website.demo.connect.md +45 -0
  373. package/dist/knowledge/references/example.website.demo.dashboard.md +74 -0
  374. package/dist/knowledge/references/example.website.demo.query-answer.md +77 -0
  375. package/dist/knowledge/references/example.website.demo.status-lifecycle.md +71 -0
  376. package/dist/knowledge/references/example.website.demo.transform.md +43 -0
  377. package/dist/knowledge/references/example.website.page.manifest.md +2 -6
  378. package/dist/knowledge/references/example.website.pricing.audit-payloads.md +38 -0
  379. package/dist/knowledge/references/example.website.pricing.catalog-load.md +77 -0
  380. package/dist/knowledge/references/example.website.pricing.offers.md +43 -0
  381. package/dist/knowledge/references/example.website.pricing.plans-section.md +20 -0
  382. package/dist/knowledge/references/example.website.pricing.plans.md +88 -0
  383. package/dist/knowledge/references/example.website.section.bento.md +27 -0
  384. package/dist/knowledge/references/example.website.section.contact-form.md +15 -0
  385. package/dist/knowledge/references/example.website.section.factories.md +82 -0
  386. package/dist/knowledge/references/example.website.section.faq.md +17 -0
  387. package/dist/knowledge/references/example.website.section.footer-cta.md +13 -0
  388. package/dist/knowledge/references/example.website.section.hero.md +16 -0
  389. package/dist/knowledge/references/example.website.section.latest-posts.md +15 -0
  390. package/dist/knowledge/references/example.website.section.marquee.md +26 -0
  391. package/dist/knowledge/references/example.website.section.roadmap.md +25 -0
  392. package/dist/knowledge/references/example.website.section.site-block.md +43 -0
  393. package/dist/knowledge/references/example.website.section.solution-paths.md +17 -0
  394. package/dist/knowledge/references/example.website.section.stats.md +23 -0
  395. package/dist/knowledge/references/example.website.section.steps.md +15 -0
  396. package/dist/knowledge/references/example.website.showcase.tour.md +49 -0
  397. package/dist/knowledge/references/example.website.theme.composed.md +69 -0
  398. package/dist/knowledge/references/experience-plan.config.md +127 -1
  399. package/dist/knowledge/references/external-connectors.frontend-provider-consent-classification.md +8 -0
  400. package/dist/knowledge/references/external-connectors.frontend-provider-sdk-activation-mode.md +27 -0
  401. package/dist/knowledge/references/external-connectors.models.connection-target.md +99 -0
  402. package/dist/knowledge/references/external-connectors.models.file-storage-adapter.md +13 -0
  403. package/dist/knowledge/references/external-connectors.models.hook-inbound-endpoint.md +352 -0
  404. package/dist/knowledge/references/external-connectors.models.hook-signature-algorithms.md +168 -0
  405. package/dist/knowledge/references/external-connectors.models.hook-trigger-strategy.md +97 -0
  406. package/dist/knowledge/references/external-connectors.models.oauth2-audiences.md +72 -8
  407. package/dist/knowledge/references/external-connectors.models.oauth2-incremental-consent.md +235 -0
  408. package/dist/knowledge/references/external-connectors.models.rest-operation-contract.md +1272 -3
  409. package/dist/knowledge/references/external-connectors.models.subject-erasure-effect.md +105 -0
  410. package/dist/knowledge/references/external-connectors.private.provider-compliance-state-collector.md +36 -0
  411. package/dist/knowledge/references/external-connectors.private.provider-configuration-check.md +69 -0
  412. package/dist/knowledge/references/integration-plan.config.md +28 -8
  413. package/dist/knowledge/references/market.references.weighted-edges.md +14 -1
  414. package/dist/knowledge/references/minions.tick-contract.md +2 -2
  415. package/dist/knowledge/references/placement-plan.config.md +94 -13
  416. package/dist/knowledge/references/platform.config.backing-services.md +9 -11
  417. package/dist/knowledge/references/platform.config.environment.deployment.md +140 -7
  418. package/dist/knowledge/references/platform.config.infra-provider-resolution.md +3 -3
  419. package/dist/knowledge/references/platform.config.infrastructure-host.md +2 -1
  420. package/dist/knowledge/references/platform.config.platform-key-management.md +282 -0
  421. package/dist/knowledge/references/platform.config.saas.md +126 -32
  422. package/dist/knowledge/references/platform.key-management.vault-custody.md +78 -0
  423. package/dist/knowledge/references/presets.3d.frame-style-resolution.md +65 -0
  424. package/dist/knowledge/references/presets.3d.layout-contract.md +4 -30
  425. package/dist/knowledge/references/presets.3d.register-layout.md +14 -36
  426. package/dist/knowledge/references/presets.layouts-2d.authoring.md +157 -0
  427. package/dist/knowledge/references/presets.layouts-2d.register-layout.md +53 -0
  428. package/dist/knowledge/references/presets.layouts-2d.settings.md +53 -0
  429. package/dist/knowledge/references/presets.layouts-2d.vocabulary.md +41 -0
  430. package/dist/knowledge/references/presets.models.field-form-control-variant.md +32 -0
  431. package/dist/knowledge/references/presets.models.labelling.sections.md +39 -0
  432. package/dist/knowledge/references/presets.models.palette-contrast.md +183 -0
  433. package/dist/knowledge/references/presets.models.palette-derivation.md +93 -0
  434. package/dist/knowledge/references/presets.models.surface-policy.defaults.md +27 -0
  435. package/dist/knowledge/references/presets.models.surface-variant.md +11 -0
  436. package/dist/knowledge/references/presets.models.theme-contract.md +136 -0
  437. package/dist/knowledge/references/presets.models.theme-personality-lexicon.md +81 -0
  438. package/dist/knowledge/references/presets.models.theme-personality.md +159 -0
  439. package/dist/knowledge/references/presets.themes.compose-theme.md +47 -0
  440. package/dist/knowledge/references/requirements.non-functional-requirement.config.md +4 -4
  441. package/dist/knowledge/references/requirements.snapshot.config.md +2 -3
  442. package/dist/knowledge/references/roadmap.phase.config.md +2 -16
  443. package/dist/knowledge/references/saas.approval-seals.admin-endpoints.md +158 -0
  444. package/dist/knowledge/references/saas.backend.a2a.token-budget.md +85 -12
  445. package/dist/knowledge/references/saas.backend.actor-execution-continuation.md +179 -0
  446. package/dist/knowledge/references/saas.backend.app-config.backend-authored.md +5 -1
  447. package/dist/knowledge/references/saas.backend.application-initialization.assembly.md +3 -1
  448. package/dist/knowledge/references/saas.backend.authorization.role-ceiling.md +13 -1
  449. package/dist/knowledge/references/saas.backend.crypto-keys.application-keys.md +100 -0
  450. package/dist/knowledge/references/saas.backend.custom-operation.authoritative-fields.md +4 -1
  451. package/dist/knowledge/references/saas.backend.custom-operation.commit-outcome-read-back.md +208 -0
  452. package/dist/knowledge/references/saas.backend.custom-operation.core-write-precondition.md +38 -0
  453. package/dist/knowledge/references/saas.backend.custom-operation.external-effect-reservation.md +109 -0
  454. package/dist/knowledge/references/saas.backend.custom-operation.hook-transaction-posture.md +43 -0
  455. package/dist/knowledge/references/saas.backend.custom-operation.target-authority.md +33 -0
  456. package/dist/knowledge/references/saas.backend.custom-operation.transactional-core.md +131 -1
  457. package/dist/knowledge/references/saas.backend.document-sequence.issue-in-operation.md +1 -1
  458. package/dist/knowledge/references/saas.backend.document-sequence.raise-floor.md +62 -13
  459. package/dist/knowledge/references/saas.backend.domain-module.md +105 -1
  460. package/dist/knowledge/references/saas.backend.email-template.definition.md +34 -0
  461. package/dist/knowledge/references/saas.backend.email-template.words.md +98 -0
  462. package/dist/knowledge/references/saas.backend.email.send.md +7 -0
  463. package/dist/knowledge/references/saas.backend.flows-actors.a2a-task-surface.md +35 -4
  464. package/dist/knowledge/references/saas.backend.flows-actors.ask-person-tool.md +79 -0
  465. package/dist/knowledge/references/saas.backend.flows-actors.autonomous-agent-case-selector.md +71 -0
  466. package/dist/knowledge/references/saas.backend.flows-actors.autonomous-agent-declaration.md +21 -10
  467. package/dist/knowledge/references/saas.backend.flows-actors.autonomous-agent-schedule.md +11 -5
  468. package/dist/knowledge/references/saas.backend.flows-actors.chat-agent-declaration.md +51 -0
  469. package/dist/knowledge/references/saas.backend.flows-actors.chat-reply-handler.md +219 -0
  470. package/dist/knowledge/references/saas.backend.flows-actors.decision-notice-handler.md +239 -0
  471. package/dist/knowledge/references/saas.backend.flows-actors.function-tool.md +661 -3
  472. package/dist/knowledge/references/saas.backend.flows-actors.invoke-agent.md +15 -2
  473. package/dist/knowledge/references/saas.backend.flows-actors.operation-approval-resolvers.md +50 -0
  474. package/dist/knowledge/references/saas.backend.flows-actors.present-records-tool.md +106 -0
  475. package/dist/knowledge/references/saas.backend.flows-actors.resource-read-tool.md +14 -1
  476. package/dist/knowledge/references/saas.backend.flows-actors.resource-write-tool.md +9 -4
  477. package/dist/knowledge/references/saas.backend.flows-actors.retrieval-tool.md +205 -0
  478. package/dist/knowledge/references/saas.backend.flows-actors.tool-dispatch-obligations.md +21 -5
  479. package/dist/knowledge/references/saas.backend.flows.start-flow-method.md +28 -0
  480. package/dist/knowledge/references/saas.backend.flows.start-flow.md +47 -0
  481. package/dist/knowledge/references/saas.backend.pdf-template.collection-definition.md +5 -3
  482. package/dist/knowledge/references/saas.backend.privacy.subject-export-archive.md +26 -0
  483. package/dist/knowledge/references/saas.backend.providers.connection-target-credential-resolution.md +21 -19
  484. package/dist/knowledge/references/saas.backend.providers.optional-runtime-peers.md +15 -25
  485. package/dist/knowledge/references/saas.backend.rate-limit-service.check-policy.md +3 -2
  486. package/dist/knowledge/references/saas.backend.submission-challenge.md +4 -0
  487. package/dist/knowledge/references/saas.backend.system-access-service.md +394 -104
  488. package/dist/knowledge/references/saas.config.content-security-policy.md +26 -10
  489. package/dist/knowledge/references/saas.data-seeding.definition-input.md +1 -1
  490. package/dist/knowledge/references/saas.data-seeding.modes.md +4 -1
  491. package/dist/knowledge/references/saas.data-seeding.row-reference.md +2 -4
  492. package/dist/knowledge/references/saas.data-seeding.run-ledger.md +3 -0
  493. package/dist/knowledge/references/saas.external-data.admin-endpoints.md +70 -3
  494. package/dist/knowledge/references/saas.external-providers.backend-provider-loader.md +6 -0
  495. package/dist/knowledge/references/saas.external-providers.backend-provider-registry.runtime-filter.md +2 -0
  496. package/dist/knowledge/references/saas.external-providers.llm.model-configuration.md +3 -0
  497. package/dist/knowledge/references/saas.frontend.app-level-component.configuration.md +10 -2
  498. package/dist/knowledge/references/saas.frontend.app-level-component.vocabulary.md +10 -16
  499. package/dist/knowledge/references/saas.frontend.app-shell.building-blocks.md +7 -3
  500. package/dist/knowledge/references/saas.frontend.app-shell.register-shell-layout.md +97 -0
  501. package/dist/knowledge/references/saas.frontend.app-shell.shell-layout-contract.md +60 -0
  502. package/dist/knowledge/references/saas.frontend.app-shell.shell-motion-contract.md +274 -0
  503. package/dist/knowledge/references/saas.frontend.app-shell.use-shell-motion.md +73 -0
  504. package/dist/knowledge/references/saas.frontend.brand-identity.md +6 -0
  505. package/dist/knowledge/references/saas.frontend.chart-dashboard-view.md +43 -0
  506. package/dist/knowledge/references/saas.frontend.chart-dashboard.md +130 -0
  507. package/dist/knowledge/references/saas.frontend.chart-view.inserted-declaration.md +13 -0
  508. package/dist/knowledge/references/saas.frontend.chart-view.resource-chart-data.md +8 -4
  509. package/dist/knowledge/references/saas.frontend.chat-sign-in-completion.md +99 -0
  510. package/dist/knowledge/references/saas.frontend.collection-filter-presets.md +92 -23
  511. package/dist/knowledge/references/saas.frontend.command-menu.search-resource.md +3 -3
  512. package/dist/knowledge/references/saas.frontend.display-layout.reading-measure.md +9 -3
  513. package/dist/knowledge/references/saas.frontend.domain-module.md +5 -0
  514. package/dist/knowledge/references/saas.frontend.embedded-resource-descent.md +2 -1
  515. package/dist/knowledge/references/saas.frontend.errors.backend-refusal.md +96 -0
  516. package/dist/knowledge/references/saas.frontend.execution-view.definition.md +57 -3
  517. package/dist/knowledge/references/saas.frontend.field-tiles.md +76 -0
  518. package/dist/knowledge/references/saas.frontend.flows-actors-view.md +10 -2
  519. package/dist/knowledge/references/saas.frontend.focus-indicator.md +119 -0
  520. package/dist/knowledge/references/saas.frontend.launcher.item-refs.md +14 -2
  521. package/dist/knowledge/references/saas.frontend.launcher.merge-rules.md +7 -4
  522. package/dist/knowledge/references/saas.frontend.launcher.runtime-availability.md +17 -16
  523. package/dist/knowledge/references/saas.frontend.linked-conversations-embed.md +3 -5
  524. package/dist/knowledge/references/saas.frontend.operation-key-and-resource-config-like.md +68 -1
  525. package/dist/knowledge/references/saas.frontend.providers.execute-operation.md +14 -24
  526. package/dist/knowledge/references/saas.frontend.record-page-parts.md +117 -0
  527. package/dist/knowledge/references/saas.frontend.related-resource-embeds.md +184 -5
  528. package/dist/knowledge/references/saas.frontend.related-resource-sections.md +6 -0
  529. package/dist/knowledge/references/saas.frontend.resource-header-title.md +98 -34
  530. package/dist/knowledge/references/saas.frontend.resource-label-params.md +3 -1
  531. package/dist/knowledge/references/saas.frontend.resource-layout-templates.md +59 -19
  532. package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +344 -62
  533. package/dist/knowledge/references/saas.frontend.resource-ui-behavior-config.md +13 -8
  534. package/dist/knowledge/references/saas.frontend.section-stages.md +63 -0
  535. package/dist/knowledge/references/saas.frontend.settings-hub.engine-destinations.md +183 -32
  536. package/dist/knowledge/references/saas.frontend.settings-hub.placement.md +72 -13
  537. package/dist/knowledge/references/saas.frontend.viewer-may-perform-operation.md +52 -0
  538. package/dist/knowledge/references/saas.models.agent-suspension.md +75 -0
  539. package/dist/knowledge/references/saas.models.agent-work-capture-settings.md +2 -2
  540. package/dist/knowledge/references/saas.models.agent-work-decision-contents-read.md +69 -0
  541. package/dist/knowledge/references/saas.models.agent-work-decision-surface.md +11 -2
  542. package/dist/knowledge/references/saas.models.agent-work-decision-vocabulary.md +20 -3
  543. package/dist/knowledge/references/saas.models.agent-work-output-review.md +3 -3
  544. package/dist/knowledge/references/saas.models.agent-work-override-rate.md +6 -5
  545. package/dist/knowledge/references/saas.models.agent-work-review-config.md +22 -4
  546. package/dist/knowledge/references/saas.models.analytics.value-moments.md +22 -0
  547. package/dist/knowledge/references/saas.models.application-agent-policy.md +28 -0
  548. package/dist/knowledge/references/saas.models.application-entry-points.md +45 -0
  549. package/dist/knowledge/references/saas.models.audit-trails.actor-attribution.md +21 -0
  550. package/dist/knowledge/references/saas.models.audit.trail-config.md +18 -5
  551. package/dist/knowledge/references/saas.models.auth.relationship-grantor-authentication.md +175 -0
  552. package/dist/knowledge/references/saas.models.authorization.administrative-continuity-codes.md +4 -4
  553. package/dist/knowledge/references/saas.models.chat-identity-link-host.md +38 -0
  554. package/dist/knowledge/references/saas.models.compliance.ai-use-classification.md +179 -0
  555. package/dist/knowledge/references/saas.models.compliance.ai-use-posture.md +121 -0
  556. package/dist/knowledge/references/saas.models.config.declared-type-renames.md +246 -0
  557. package/dist/knowledge/references/saas.models.config.organization-types.md +54 -74
  558. package/dist/knowledge/references/saas.models.conversation-threads.md +43 -6
  559. package/dist/knowledge/references/saas.models.crypto-keys.floors.md +32 -0
  560. package/dist/knowledge/references/saas.models.crypto-keys.key-management-config.md +130 -0
  561. package/dist/knowledge/references/saas.models.crypto-keys.local-provider.md +29 -0
  562. package/dist/knowledge/references/saas.models.crypto-keys.purpose-descriptor.md +442 -0
  563. package/dist/knowledge/references/saas.models.crypto-keys.purposes.md +91 -0
  564. package/dist/knowledge/references/saas.models.data-mode-read-list.md +24 -79
  565. package/dist/knowledge/references/saas.models.engine-capabilities.md +39 -2
  566. package/dist/knowledge/references/saas.models.engine-capabilities.required-provider-floor.md +3 -0
  567. package/dist/knowledge/references/saas.models.evaluation-dataset-export.md +16 -9
  568. package/dist/knowledge/references/saas.models.evaluation-export-authorization.md +23 -6
  569. package/dist/knowledge/references/saas.models.external-data-conflict-vocabulary.md +53 -0
  570. package/dist/knowledge/references/saas.models.external-data-pipeline.md +96 -26
  571. package/dist/knowledge/references/saas.models.flows-actors.agent-behavior-report-config.md +28 -0
  572. package/dist/knowledge/references/saas.models.flows-actors.agent-behavior-report.md +321 -0
  573. package/dist/knowledge/references/saas.models.flows-actors.agent-configuration.md +29 -0
  574. package/dist/knowledge/references/saas.models.flows-actors.agent-content-guardrails.md +150 -0
  575. package/dist/knowledge/references/saas.models.flows-actors.agent-definition.md +45 -0
  576. package/dist/knowledge/references/saas.models.flows-actors.agent-operation-record.md +154 -0
  577. package/dist/knowledge/references/saas.models.flows-actors.autonomous-agents-vocabulary.md +49 -7
  578. package/dist/knowledge/references/saas.models.flows-actors.chat-agents-vocabulary.md +26 -0
  579. package/dist/knowledge/references/saas.models.flows-actors.decision-card-wording.md +284 -0
  580. package/dist/knowledge/references/saas.models.flows-actors.decision-notice-recorded-cards.md +93 -0
  581. package/dist/knowledge/references/saas.models.flows-actors.human-decision-decider.md +70 -0
  582. package/dist/knowledge/references/saas.models.flows-actors.human-input-form.md +349 -0
  583. package/dist/knowledge/references/saas.models.flows-actors.operation-approval-pending.md +55 -0
  584. package/dist/knowledge/references/saas.models.flows-actors.operation-approval-requirement.md +93 -0
  585. package/dist/knowledge/references/saas.models.flows-actors.review-deadline-vocabulary.md +6 -0
  586. package/dist/knowledge/references/saas.models.flows-actors.review-deadlines-declaration.md +4 -3
  587. package/dist/knowledge/references/saas.models.flows.run-state.md +49 -0
  588. package/dist/knowledge/references/saas.models.flows.runnable-model.md +274 -0
  589. package/dist/knowledge/references/saas.models.frontend-on-demand-capability-contract.md +54 -0
  590. package/dist/knowledge/references/saas.models.guidance-flow.md +1 -1
  591. package/dist/knowledge/references/saas.models.http-api-binding.md +176 -50
  592. package/dist/knowledge/references/saas.models.http-api-binding.rest-write-operations.md +3 -3
  593. package/dist/knowledge/references/saas.models.http-api-population-filter.md +51 -0
  594. package/dist/knowledge/references/saas.models.human-decision-review-marker.md +1 -1
  595. package/dist/knowledge/references/saas.models.inbound-channels.md +75 -3
  596. package/dist/knowledge/references/saas.models.inbound-email-domains.md +5 -5
  597. package/dist/knowledge/references/saas.models.inbound-email.md +2 -2
  598. package/dist/knowledge/references/saas.models.m2m-webhook-events.md +73 -0
  599. package/dist/knowledge/references/saas.models.model-cost-accounting-config.md +1 -1
  600. package/dist/knowledge/references/saas.models.model-cost-summary.md +56 -20
  601. package/dist/knowledge/references/saas.models.notifications.targets.md +28 -3
  602. package/dist/knowledge/references/saas.models.notifications.user-notification-definition.md +259 -21
  603. package/dist/knowledge/references/saas.models.on-demand-provider-capabilities.md +28 -0
  604. package/dist/knowledge/references/saas.models.organization-agent-policy.md +43 -0
  605. package/dist/knowledge/references/saas.models.organization-assigned-rows-declaration.md +74 -0
  606. package/dist/knowledge/references/saas.models.organization-own-rows-declaration.md +51 -0
  607. package/dist/knowledge/references/saas.models.organization-unit-narrowing-containment.md +6 -6
  608. package/dist/knowledge/references/saas.models.organizations.application-owner-codes.md +9 -10
  609. package/dist/knowledge/references/saas.models.organizations.identity-declaration.md +201 -0
  610. package/dist/knowledge/references/saas.models.organizations.organization-relationships.md +933 -0
  611. package/dist/knowledge/references/saas.models.organizations.professional-qualification-kinds.md +46 -0
  612. package/dist/knowledge/references/saas.models.organizations.professional-qualifications.md +168 -0
  613. package/dist/knowledge/references/{saas.models.organizations.service-provider-capability-grants.md → saas.models.organizations.relationship-capability-grants.md} +56 -35
  614. package/dist/knowledge/references/saas.models.organizations.relationship-grantor-controls.md +62 -0
  615. package/dist/knowledge/references/saas.models.organizations.relationship-invitations.md +228 -0
  616. package/dist/knowledge/references/saas.models.organizations.relationship-kinds.md +291 -0
  617. package/dist/knowledge/references/saas.models.organizations.relationship-record-separation.md +114 -0
  618. package/dist/knowledge/references/saas.models.privacy.data-residency.md +676 -0
  619. package/dist/knowledge/references/saas.models.privacy.legal-holds.md +114 -7
  620. package/dist/knowledge/references/saas.models.privacy.provider-capability-disclosure.md +73 -2
  621. package/dist/knowledge/references/saas.models.privacy.redaction-treatments.md +13 -14
  622. package/dist/knowledge/references/saas.models.privacy.retention-binding.md +84 -1
  623. package/dist/knowledge/references/saas.models.privacy.retention-enforcement-record.md +10 -0
  624. package/dist/knowledge/references/saas.models.privacy.retention-schedule.md +5 -3
  625. package/dist/knowledge/references/saas.models.privacy.subject-data-recipients.md +280 -40
  626. package/dist/knowledge/references/saas.models.privacy.subject-export.md +134 -0
  627. package/dist/knowledge/references/saas.models.provider-capabilities.md +38 -0
  628. package/dist/knowledge/references/saas.models.provider-usage-pricing-authority.md +50 -1
  629. package/dist/knowledge/references/saas.models.providers.capability-activation-policy.md +28 -0
  630. package/dist/knowledge/references/saas.models.providers.capability-resolution-mode.md +20 -6
  631. package/dist/knowledge/references/saas.models.providers.compliance-choice.md +52 -0
  632. package/dist/knowledge/references/saas.models.providers.execute-operation-request.md +25 -0
  633. package/dist/knowledge/references/saas.models.providers.processing-region-reach.md +132 -0
  634. package/dist/knowledge/references/saas.models.providers.processing-region-selection.md +139 -0
  635. package/dist/knowledge/references/saas.models.providers.scope-reauthorization.md +1 -1
  636. package/dist/knowledge/references/saas.models.queue.scheduled-recovery.md +13 -1
  637. package/dist/knowledge/references/saas.models.rate-limit-configuration.md +4 -4
  638. package/dist/knowledge/references/saas.models.representative-activity.md +69 -0
  639. package/dist/knowledge/references/saas.models.resource-config.builder-parameters.md +165 -44
  640. package/dist/knowledge/references/saas.models.resource-config.metered-usage-recording.md +24 -0
  641. package/dist/knowledge/references/saas.models.resource-config.operation-api-call.md +92 -11
  642. package/dist/knowledge/references/saas.models.resource-config.operation-auditable-event.md +4 -2
  643. package/dist/knowledge/references/saas.models.resource-config.operation-base.md +20 -3
  644. package/dist/knowledge/references/saas.models.resource-config.operation-bulk.md +37 -0
  645. package/dist/knowledge/references/saas.models.resource-config.operation-chat-command.md +39 -0
  646. package/dist/knowledge/references/saas.models.resource-config.operation-condition-parameters.md +56 -0
  647. package/dist/knowledge/references/saas.models.resource-config.operation-idempotency-key.md +16 -6
  648. package/dist/knowledge/references/saas.models.resource-config.operation-mcp-exposure.md +1 -1
  649. package/dist/knowledge/references/saas.models.resource-config.operation-required-qualifications.md +30 -0
  650. package/dist/knowledge/references/saas.models.resource-config.operation-scope-admissions.md +137 -2
  651. package/dist/knowledge/references/saas.models.resource-config.operation-submission-challenge.md +1 -1
  652. package/dist/knowledge/references/saas.models.resource-config.operation-union.md +0 -1
  653. package/dist/knowledge/references/saas.models.resource-config.operation-variant-client-timeout.md +1 -1
  654. package/dist/knowledge/references/saas.models.resource-config.record-label-fields.md +23 -0
  655. package/dist/knowledge/references/saas.models.resource-config.request-field-offers.md +104 -0
  656. package/dist/knowledge/references/saas.models.resource-config.required-features.md +20 -0
  657. package/dist/knowledge/references/saas.models.resource-config.resource-configuration.md +23 -16
  658. package/dist/knowledge/references/saas.models.resource-config.resources-registry.md +25 -3
  659. package/dist/knowledge/references/saas.models.resource-config.retention-policy.md +46 -0
  660. package/dist/knowledge/references/saas.models.resource-config.system-access-policy.md +32 -15
  661. package/dist/knowledge/references/saas.models.resource-config.system-managed-fields.md +2 -1
  662. package/dist/knowledge/references/saas.models.resource-config.token-generation.md +1 -1
  663. package/dist/knowledge/references/saas.models.resource-operation-display-risk.md +5 -4
  664. package/dist/knowledge/references/saas.models.resource-operation-variant-runtime.md +3 -2
  665. package/dist/knowledge/references/saas.models.resource-relationship-builder-parameters.md +6 -2
  666. package/dist/knowledge/references/saas.models.roadmap.phase-horizon.md +31 -0
  667. package/dist/knowledge/references/saas.models.roles.definition.md +12 -1
  668. package/dist/knowledge/references/saas.models.roles.organization-defaults.md +12 -6
  669. package/dist/knowledge/references/saas.models.schema-family-builder.md +32 -4
  670. package/dist/knowledge/references/saas.models.scope-membership.md +2 -2
  671. package/dist/knowledge/references/saas.models.system-of-record-actions.md +65 -1
  672. package/dist/knowledge/references/saas.models.system-of-record-capabilities.md +123 -0
  673. package/dist/knowledge/references/saas.models.system-of-record-error-codes.md +19 -2
  674. package/dist/knowledge/references/saas.models.systems-of-record.md +110 -14
  675. package/dist/knowledge/references/saas.models.work-attribution-vocabulary.md +7 -3
  676. package/dist/knowledge/references/saas.models.work-unit-ref.md +17 -2
  677. package/dist/knowledge/references/saas.public-runtime.contract.md +75 -25
  678. package/dist/knowledge/references/saas.rag.retrieval-refusals.md +3 -2
  679. package/dist/knowledge/references/saas.specifications.assurance-control-markers.md +3 -2
  680. package/dist/knowledge/references/saas.specifications.assurance-document-blueprint.contract.md +13 -0
  681. package/dist/knowledge/references/saas.specifications.assurance-program.contract.md +287 -17
  682. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.catalog-spec-shared.md +5 -4
  683. package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +30 -2
  684. package/dist/knowledge/references/saas.specifications.engine-resource-sub-domain.md +105 -0
  685. package/dist/knowledge/references/saas.specifications.governed-document-release.contract.md +22 -4
  686. package/dist/knowledge/references/saas.specifications.processor-register.md +10 -1
  687. package/dist/knowledge/references/saas.specifications.recipient-disclosures.md +111 -2
  688. package/dist/knowledge/references/saas.specifications.recipient-population.md +46 -0
  689. package/dist/knowledge/references/saas.specifications.resource-frontend-configuration-aspect.md +7 -0
  690. package/dist/knowledge/references/saas.specifications.resource-operation-spec.md +44 -5
  691. package/dist/knowledge/references/saas.specifications.resource-spec-config.md +21 -7
  692. package/dist/knowledge/references/saas.specifications.resource-spec-factory.md +113 -70
  693. package/dist/knowledge/references/saas.specifications.subject-data-recipients.md +136 -6
  694. package/dist/knowledge/references/saas.specifications.translation-glossary.md +80 -0
  695. package/dist/knowledge/references/saas.website.astro.bridge.md +51 -14
  696. package/dist/knowledge/references/saas.website.astro.head-renderer.md +63 -27
  697. package/dist/knowledge/references/saas.website.astro.i18n-helper.md +39 -10
  698. package/dist/knowledge/references/saas.website.astro.label-key-collector.md +12 -11
  699. package/dist/knowledge/references/saas.website.astro.label-loader.md +77 -14
  700. package/dist/knowledge/references/saas.website.astro.pick-labels-for-page.md +1 -2
  701. package/dist/knowledge/references/saas.website.astro.runtime-helper.md +49 -17
  702. package/dist/knowledge/references/saas.website.astro.site-context.md +17 -8
  703. package/dist/knowledge/references/saas.website.astro.structured-data-renderer.md +29 -8
  704. package/dist/knowledge/references/saas.website.blocks.actions.md +91 -0
  705. package/dist/knowledge/references/saas.website.blocks.band.md +41 -0
  706. package/dist/knowledge/references/saas.website.blocks.bento.md +70 -0
  707. package/dist/knowledge/references/saas.website.blocks.card-grid.md +115 -0
  708. package/dist/knowledge/references/saas.website.blocks.card.md +77 -0
  709. package/dist/knowledge/references/saas.website.blocks.cta-band.md +94 -0
  710. package/dist/knowledge/references/saas.website.blocks.define-block.md +123 -0
  711. package/dist/knowledge/references/saas.website.blocks.definitions.md +132 -0
  712. package/dist/knowledge/references/saas.website.blocks.faq.md +89 -0
  713. package/dist/knowledge/references/saas.website.blocks.feature-row.md +109 -0
  714. package/dist/knowledge/references/saas.website.blocks.hero.md +140 -0
  715. package/dist/knowledge/references/saas.website.blocks.intro.md +68 -0
  716. package/dist/knowledge/references/saas.website.blocks.latest-posts.md +104 -0
  717. package/dist/knowledge/references/saas.website.blocks.marquee.md +76 -0
  718. package/dist/knowledge/references/saas.website.blocks.pricing.md +395 -0
  719. package/dist/knowledge/references/saas.website.blocks.product-tour.md +158 -0
  720. package/dist/knowledge/references/saas.website.blocks.quote-cards.md +64 -0
  721. package/dist/knowledge/references/saas.website.blocks.roadmap.md +108 -0
  722. package/dist/knowledge/references/saas.website.blocks.section-slots.md +64 -0
  723. package/dist/knowledge/references/saas.website.blocks.solution-paths.md +71 -0
  724. package/dist/knowledge/references/saas.website.blocks.stats.md +183 -0
  725. package/dist/knowledge/references/saas.website.blocks.steps.md +69 -0
  726. package/dist/knowledge/references/saas.website.blocks.stylesheet.md +68 -0
  727. package/dist/knowledge/references/saas.website.blocks.tables.md +153 -0
  728. package/dist/knowledge/references/saas.website.blocks.vocabulary.md +227 -0
  729. package/dist/knowledge/references/saas.website.blog.bridge.md +98 -53
  730. package/dist/knowledge/references/saas.website.blog.collection-config.md +105 -49
  731. package/dist/knowledge/references/saas.website.blog.cover-resolver.md +93 -0
  732. package/dist/knowledge/references/saas.website.blog.frontmatter.md +106 -9
  733. package/dist/knowledge/references/saas.website.blog.head-renderer.md +37 -19
  734. package/dist/knowledge/references/saas.website.blog.index-builder.md +63 -0
  735. package/dist/knowledge/references/saas.website.blog.index.md +43 -0
  736. package/dist/knowledge/references/saas.website.blog.post-cover.md +38 -0
  737. package/dist/knowledge/references/saas.website.blog.post-renderer.md +115 -87
  738. package/dist/knowledge/references/saas.website.blog.react-mdx-integration.md +188 -0
  739. package/dist/knowledge/references/saas.website.blog.react-mdx-query.md +26 -0
  740. package/dist/knowledge/references/saas.website.blog.vocabulary-labels.md +113 -0
  741. package/dist/knowledge/references/saas.website.config.pricing-catalog-loader.md +5 -2
  742. package/dist/knowledge/references/saas.website.config.site-context-loader.md +26 -3
  743. package/dist/knowledge/references/saas.website.consent.banner.md +1 -1
  744. package/dist/knowledge/references/saas.website.consent.context.md +1 -1
  745. package/dist/knowledge/references/saas.website.design-tokens.bundle.md +28 -6
  746. package/dist/knowledge/references/saas.website.design-tokens.colors.md +7 -6
  747. package/dist/knowledge/references/saas.website.design-tokens.compose-function.md +35 -0
  748. package/dist/knowledge/references/saas.website.design-tokens.compose.md +76 -0
  749. package/dist/knowledge/references/saas.website.design-tokens.personality-derivation.md +22 -0
  750. package/dist/knowledge/references/saas.website.design-tokens.personality-lexicon.md +31 -0
  751. package/dist/knowledge/references/saas.website.design-tokens.personality.md +82 -0
  752. package/dist/knowledge/references/saas.website.design-tokens.product.md +122 -0
  753. package/dist/knowledge/references/saas.website.design-tokens.radius.md +12 -1
  754. package/dist/knowledge/references/saas.website.design-tokens.readers.md +58 -0
  755. package/dist/knowledge/references/saas.website.design-tokens.spacing.md +61 -0
  756. package/dist/knowledge/references/saas.website.design-tokens.surface-depth.md +60 -0
  757. package/dist/knowledge/references/saas.website.design-tokens.tones.md +75 -0
  758. package/dist/knowledge/references/saas.website.design-tokens.typography.md +115 -0
  759. package/dist/knowledge/references/saas.website.factories.define-page-manifest.md +23 -21
  760. package/dist/knowledge/references/saas.website.factories.define-section.md +36 -38
  761. package/dist/knowledge/references/saas.website.format.publication-date.md +26 -0
  762. package/dist/knowledge/references/saas.website.label-keys.compose-helper.md +1 -1
  763. package/dist/knowledge/references/saas.website.label-keys.format.md +4 -3
  764. package/dist/knowledge/references/saas.website.label-pack.validator.md +9 -8
  765. package/dist/knowledge/references/saas.website.labels.section-labels.md +34 -0
  766. package/dist/knowledge/references/saas.website.legal.public-document-links.md +19 -4
  767. package/dist/knowledge/references/saas.website.locale-switcher.label-keys.md +35 -0
  768. package/dist/knowledge/references/saas.website.menu.icons.md +123 -0
  769. package/dist/knowledge/references/saas.website.menu.label-keys.md +112 -0
  770. package/dist/knowledge/references/saas.website.menu.schema.md +92 -0
  771. package/dist/knowledge/references/saas.website.menu.vocabulary.md +79 -0
  772. package/dist/knowledge/references/saas.website.motion.demo-player.md +105 -0
  773. package/dist/knowledge/references/saas.website.motion.demo-scenario.md +460 -0
  774. package/dist/knowledge/references/saas.website.motion.demo.md +324 -0
  775. package/dist/knowledge/references/saas.website.motion.element-attributes.md +115 -0
  776. package/dist/knowledge/references/saas.website.motion.reveal-renditions.md +67 -0
  777. package/dist/knowledge/references/saas.website.motion.stylesheet.md +82 -0
  778. package/dist/knowledge/references/saas.website.motion.tempo-table.md +99 -0
  779. package/dist/knowledge/references/saas.website.motion.tokens.md +46 -0
  780. package/dist/knowledge/references/saas.website.motion.vocabulary.md +85 -0
  781. package/dist/knowledge/references/saas.website.page-layout.component.md +34 -8
  782. package/dist/knowledge/references/saas.website.page-manifest.meta-label-keys.md +4 -4
  783. package/dist/knowledge/references/saas.website.page-manifest.route-path.md +1 -1
  784. package/dist/knowledge/references/saas.website.page-manifest.schema.md +25 -29
  785. package/dist/knowledge/references/saas.website.page-manifest.seo.md +1 -1
  786. package/dist/knowledge/references/saas.website.page-navigation.md +44 -0
  787. package/dist/knowledge/references/saas.website.page.context.md +9 -2
  788. package/dist/knowledge/references/saas.website.primitives.button.md +6 -6
  789. package/dist/knowledge/references/saas.website.primitives.heading.md +17 -18
  790. package/dist/knowledge/references/saas.website.primitives.image.md +18 -15
  791. package/dist/knowledge/references/saas.website.primitives.internal-button.md +11 -12
  792. package/dist/knowledge/references/saas.website.primitives.internal-link.md +11 -35
  793. package/dist/knowledge/references/saas.website.primitives.link.md +22 -11
  794. package/dist/knowledge/references/saas.website.primitives.text.md +10 -8
  795. package/dist/knowledge/references/saas.website.product.atoms.md +366 -0
  796. package/dist/knowledge/references/saas.website.product.figures.md +320 -0
  797. package/dist/knowledge/references/saas.website.product.hooks.md +278 -0
  798. package/dist/knowledge/references/saas.website.product.panels.md +324 -0
  799. package/dist/knowledge/references/saas.website.product.stylesheet.md +1086 -0
  800. package/dist/knowledge/references/saas.website.refs.section.md +2 -2
  801. package/dist/knowledge/references/saas.website.root-config.schema.md +34 -17
  802. package/dist/knowledge/references/saas.website.routing.link-target.md +70 -0
  803. package/dist/knowledge/references/saas.website.routing.localized-path.md +15 -8
  804. package/dist/knowledge/references/saas.website.runtime.context.md +44 -17
  805. package/dist/knowledge/references/saas.website.section.component.md +21 -19
  806. package/dist/knowledge/references/saas.website.sections.category-enum.md +21 -2
  807. package/dist/knowledge/references/saas.website.sections.definition-schema.md +47 -39
  808. package/dist/knowledge/references/saas.website.site-footer.menu.md +47 -0
  809. package/dist/knowledge/references/saas.website.site-header.component.md +100 -0
  810. package/dist/knowledge/references/saas.website.site-header.scroll-behavior.md +26 -0
  811. package/dist/knowledge/references/saas.website.stacking.md +86 -0
  812. package/dist/knowledge/references/saas.website.structured-data.payload-shape.md +162 -0
  813. package/dist/knowledge/references/saas.website.use-blog-index.hook.md +27 -0
  814. package/dist/knowledge/references/saas.website.use-label.hook.md +6 -4
  815. package/dist/knowledge/references/service-method.config.md +303 -0
  816. package/dist/knowledge/references/vision.constraint.config.md +4 -2
  817. package/dist/knowledge/references/website-plan.config.md +544 -32
  818. package/dist/knowledge/references/website-plan.menu-placement.md +118 -0
  819. package/dist/knowledge/references/website-plan.page-kind-essentials.md +42 -0
  820. package/dist/knowledge/references/website-plan.page-routes.md +39 -0
  821. package/dist/knowledge/references/workers.node.worker-init-contract.md +4 -2
  822. package/dist/knowledge/references/zod.decorators.chainable-runtime.md +133 -9
  823. package/dist/knowledge/references/zod.decorators.chrome-modes.md +92 -0
  824. package/dist/knowledge/references/zod.decorators.data-categories.md +124 -34
  825. package/dist/knowledge/references/zod.decorators.decorator-vocabulary.md +99 -6
  826. package/dist/knowledge/references/zod.decorators.display-edit-modes.md +34 -1
  827. package/dist/knowledge/references/zod.decorators.enums.frontend-handling.md +41 -7
  828. package/dist/knowledge/references/zod.decorators.file-schema.md +10 -8
  829. package/dist/knowledge/references/zod.decorators.per-primitive-ui.md +25 -9
  830. package/dist/knowledge/references/zod.decorators.primitive-ui.md +15 -3
  831. package/dist/knowledge/references/zod.decorators.rag-source.md +20 -20
  832. package/dist/knowledge/references/zod.decorators.schema-metadata.md +6 -0
  833. package/dist/knowledge/references/zod.decorators.shared-structural-methods.md +52 -18
  834. package/dist/knowledge/references/zod.decorators.shared-structural-params.md +107 -5
  835. package/dist/knowledge/references/zod.decorators.structural-lifecycle-params.md +193 -9
  836. package/dist/knowledge/references/zod.factories.bigdecimal.md +17 -8
  837. package/dist/knowledge/references/zod.factories.code.md +18 -9
  838. package/dist/knowledge/references/zod.factories.duration.md +23 -14
  839. package/dist/knowledge/references/zod.factories.money.md +24 -15
  840. package/dist/knowledge/references/zod.factories.phone.md +23 -14
  841. package/dist/knowledge/references/zod.factories.range.md +5 -1
  842. package/dist/knowledge/references/zod.factories.year-month.md +79 -0
  843. package/dist/knowledge/registries/assurance-authority-bases.json +3 -3
  844. package/dist/knowledge/registries/framework-topics.json +5250 -2565
  845. package/dist/knowledge/registries/playbooks.json +88 -55
  846. package/dist/knowledge/registries/source-tags.json +9347 -4807
  847. package/dist/knowledge/rules/database-migration-obligation.md +10 -5
  848. package/dist/knowledge/rules/live-context-door.md +1 -1
  849. package/dist/knowledge/skills/INDEX.md +62 -33
  850. package/dist/knowledge/skills/agent-work-review/SKILL.md +86 -23
  851. package/dist/knowledge/skills/agent-work-review/references/framework-actor-execution-continuation-api.md +227 -0
  852. package/dist/knowledge/skills/agent-work-review/references/framework-agent-work-capture-settings-api.md +2 -2
  853. package/dist/knowledge/skills/agent-work-review/references/framework-agent-work-decision-contents-api.md +79 -0
  854. package/dist/knowledge/skills/agent-work-review/references/framework-agent-work-output-review-api.md +4 -4
  855. package/dist/knowledge/skills/agent-work-review/references/framework-agent-work-override-rate-api.md +6 -5
  856. package/dist/knowledge/skills/agent-work-review/references/framework-agent-work-review-config-api.md +22 -4
  857. package/dist/knowledge/skills/agent-work-review/references/framework-agent-work-review-marker-api.md +16 -4
  858. package/dist/knowledge/skills/agent-work-review/references/framework-agent-work-vocabulary-api.md +20 -3
  859. package/dist/knowledge/skills/agent-work-review/references/framework-evaluation-dataset-export-api.md +16 -9
  860. package/dist/knowledge/skills/agent-work-review/references/framework-evaluation-export-authorization-api.md +24 -7
  861. package/dist/knowledge/skills/agent-work-review/references/framework-human-input-form-api.md +376 -0
  862. package/dist/knowledge/skills/ai-use-declaration/SKILL.md +192 -0
  863. package/dist/knowledge/skills/ai-use-declaration/references/choosing-the-domain-and-class.md +73 -0
  864. package/dist/knowledge/skills/ai-use-declaration/references/framework-ai-use-classification-api.md +194 -0
  865. package/dist/knowledge/skills/ai-use-declaration/references/framework-ai-use-posture-api.md +136 -0
  866. package/dist/knowledge/skills/application-consumer-documentation-authoring/SKILL.md +30 -19
  867. package/dist/knowledge/skills/application-consumer-documentation-authoring/references/framework-documentation-chapters-api.md +48 -13
  868. package/dist/knowledge/skills/application-consumer-documentation-authoring/references/source-and-ownership-routing.md +2 -2
  869. package/dist/knowledge/skills/application-database-migrations/SKILL.md +26 -9
  870. package/dist/knowledge/skills/application-database-migrations/references/postgresql-supported-surfaces.md +64 -0
  871. package/dist/knowledge/skills/application-database-migrations/references/postgresql-vs-mongodb-obligations.md +37 -1
  872. package/dist/knowledge/skills/application-roles-authoring/SKILL.md +28 -3
  873. package/dist/knowledge/skills/application-roles-authoring/references/framework-application-roles-api.md +24 -7
  874. package/dist/knowledge/skills/application-roles-authoring/references/office-and-field-worked-example.md +22 -1
  875. package/dist/knowledge/skills/authorization-unit-narrowing/SKILL.md +168 -3
  876. package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-assigned-rows-declaration-api.md +92 -0
  877. package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-organization-identity-declaration-api.md +247 -0
  878. package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-own-rows-declaration-api.md +66 -0
  879. package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-unit-narrowing-declaration-api.md +6 -6
  880. package/dist/knowledge/skills/backend-addon-wiring/SKILL.md +6 -0
  881. package/dist/knowledge/skills/backend-addon-wiring/references/framework-backend-bootstrap-api.md +108 -2
  882. package/dist/knowledge/skills/backend-custom-operation/SKILL.md +81 -10
  883. package/dist/knowledge/skills/backend-custom-operation/references/after-the-operation.md +4 -1
  884. package/dist/knowledge/skills/backend-custom-operation/references/declared-refusal-codes.md +95 -0
  885. package/dist/knowledge/skills/backend-custom-operation/references/framework-assurance-control-markers.md +3 -2
  886. package/dist/knowledge/skills/backend-custom-operation/references/framework-audit-log-event-api.md +5 -2
  887. package/dist/knowledge/skills/backend-custom-operation/references/framework-core-write-precondition-api.md +73 -0
  888. package/dist/knowledge/skills/backend-custom-operation/references/framework-error-handling-api.md +5 -0
  889. package/dist/knowledge/skills/backend-custom-operation/references/framework-external-effect-reservation-api.md +276 -0
  890. package/dist/knowledge/skills/backend-custom-operation/references/framework-hook-transaction-posture-api.md +79 -0
  891. package/dist/knowledge/skills/backend-custom-operation/references/framework-operation-base-and-path-api.md +20 -3
  892. package/dist/knowledge/skills/backend-custom-operation/references/framework-target-authority-api.md +61 -0
  893. package/dist/knowledge/skills/backend-custom-operation/references/framework-transactional-core-api.md +368 -1
  894. package/dist/knowledge/skills/blueprint-authoring/SKILL.md +191 -0
  895. package/dist/knowledge/skills/blueprint-authoring/references/blueprint-content-kinds.md +29 -0
  896. package/dist/knowledge/skills/blueprint-authoring/references/framework-blueprint-definition-api.md +490 -0
  897. package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +127 -2
  898. package/dist/knowledge/skills/brand-logo-authoring/references/brand-authoring-decisions.md +15 -3
  899. package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-snapshot-api.md +26 -8
  900. package/dist/knowledge/skills/brand-logo-authoring/references/framework-style-word-lexicon-api.md +126 -0
  901. package/dist/knowledge/skills/brand-name-screening/SKILL.md +13 -2
  902. package/dist/knowledge/skills/brand-name-screening/references/framework-brand-name-screening-api.md +30 -3
  903. package/dist/knowledge/skills/chat-agent-conversations/SKILL.md +166 -0
  904. package/dist/knowledge/skills/chat-agent-conversations/references/framework-chat-conversations-api.md +307 -0
  905. package/dist/knowledge/skills/compliance-document-authoring/SKILL.md +2 -1
  906. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-governance.md +8 -6
  907. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +179 -37
  908. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-service-terms.md +4 -3
  909. package/dist/knowledge/skills/compliance-document-authoring/references/framework-assurance-document-blueprint-contract.md +13 -0
  910. package/dist/knowledge/skills/compliance-document-authoring/references/framework-governed-document-after-drafting.md +48 -11
  911. package/dist/knowledge/skills/compliance-document-authoring/references/framework-processor-register-authoring.md +10 -1
  912. package/dist/knowledge/skills/compliance-document-authoring/references/framework-provider-compliance-choice-api.md +896 -0
  913. package/dist/knowledge/skills/compliance-document-authoring/references/framework-recipient-disclosures.md +184 -4
  914. package/dist/knowledge/skills/compliance-document-authoring/references/framework-recipient-population.md +46 -0
  915. package/dist/knowledge/skills/compliance-document-authoring/references/framework-subject-data-recipients.md +487 -61
  916. package/dist/knowledge/skills/config-app-shell/SKILL.md +62 -29
  917. package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-api.md +20 -18
  918. package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-building-blocks-api.md +7 -3
  919. package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-hosted-components-api.md +13 -0
  920. package/dist/knowledge/skills/config-app-shell/references/framework-brand-identity-api.md +20 -0
  921. package/dist/knowledge/skills/config-app-shell/references/framework-command-menu-omnibox-api.md +3 -3
  922. package/dist/knowledge/skills/config-app-shell/references/framework-launcher-items-api.md +21 -6
  923. package/dist/knowledge/skills/config-app-shell/references/framework-launcher-visibility-api.md +24 -22
  924. package/dist/knowledge/skills/config-app-shell/references/framework-shell-layout-api.md +528 -0
  925. package/dist/knowledge/skills/config-design-system/SKILL.md +245 -162
  926. package/dist/knowledge/skills/config-design-system/references/design-system-file.md +5 -1
  927. package/dist/knowledge/skills/config-design-system/references/framework-focus-indicator-api.md +182 -0
  928. package/dist/knowledge/skills/config-design-system/references/framework-palette-contrast-api.md +195 -0
  929. package/dist/knowledge/skills/config-design-system/references/framework-palette-derivation-api.md +108 -0
  930. package/dist/knowledge/skills/config-design-system/references/framework-surface-policy-api.md +38 -0
  931. package/dist/knowledge/skills/config-design-system/references/framework-theme-composition-api.md +278 -0
  932. package/dist/knowledge/skills/config-design-system/references/theme-design-principles.md +202 -0
  933. package/dist/knowledge/skills/config-navigation/SKILL.md +2 -0
  934. package/dist/knowledge/skills/config-navigation/references/framework-content-width-api.md +16 -5
  935. package/dist/knowledge/skills/config-navigation/references/how-navigation-resolves.md +1 -1
  936. package/dist/knowledge/skills/config-navigation/references/navigation-configuration-map.md +12 -1
  937. package/dist/knowledge/skills/config-navigation/references/one-entry-per-concept.md +101 -0
  938. package/dist/knowledge/skills/config-saas/SKILL.md +4 -2
  939. package/dist/knowledge/skills/config-saas/references/compliance-declarations.md +51 -6
  940. package/dist/knowledge/skills/config-saas/references/framework-audit-trail-config-api.md +18 -5
  941. package/dist/knowledge/skills/config-saas/references/framework-auditable-event-catalog.md +333 -0
  942. package/dist/knowledge/skills/config-saas/references/framework-background-work-api.md +29 -1
  943. package/dist/knowledge/skills/config-saas/references/framework-capability-resolution-api.md +83 -11
  944. package/dist/knowledge/skills/config-saas/references/framework-connection-target-credentials.md +21 -19
  945. package/dist/knowledge/skills/config-saas/references/framework-content-security-policy-api.md +26 -10
  946. package/dist/knowledge/skills/config-saas/references/framework-key-management-api.md +1370 -0
  947. package/dist/knowledge/skills/config-saas/references/framework-provider-capabilities-api.md +77 -2
  948. package/dist/knowledge/skills/config-saas/references/framework-systems-of-record-api.md +171 -26
  949. package/dist/knowledge/skills/config-saas/references/framework-value-moments-api.md +22 -0
  950. package/dist/knowledge/skills/config-saas/references/framework-wildo-saas-config-api.md +126 -32
  951. package/dist/knowledge/skills/config-saas/references/saas-config-scope.md +1 -1
  952. package/dist/knowledge/skills/config-saas-backend/SKILL.md +16 -4
  953. package/dist/knowledge/skills/config-saas-backend/references/framework-application-owner-organization-codes-api.md +9 -10
  954. package/dist/knowledge/skills/config-saas-backend/references/framework-backend-authored-config-api.md +5 -1
  955. package/dist/knowledge/skills/config-saas-backend/references/framework-declared-type-renames-api.md +261 -0
  956. package/dist/knowledge/skills/config-saas-backend/references/framework-federated-identity-provider-private-networks-api.md +6 -4
  957. package/dist/knowledge/skills/config-saas-backend/references/framework-organization-types-api.md +167 -84
  958. package/dist/knowledge/skills/config-saas-backend/references/renaming-organization-and-user-types.md +69 -0
  959. package/dist/knowledge/skills/configure-billing/SKILL.md +20 -0
  960. package/dist/knowledge/skills/configure-billing/references/example-backend-provider-module-shape.md +38 -4
  961. package/dist/knowledge/skills/configure-billing/references/framework-backend-provider-reachability-api.md +2 -0
  962. package/dist/knowledge/skills/configure-billing/references/framework-metered-usage-recording-api.md +109 -0
  963. package/dist/knowledge/skills/configure-billing/references/framework-subscription-behavior-policy.md +4 -1
  964. package/dist/knowledge/skills/configure-coding-agent/references/framework-acp-execution-profile-api.md +18 -2
  965. package/dist/knowledge/skills/electronic-signature-deliverables/SKILL.md +131 -0
  966. package/dist/knowledge/skills/electronic-signature-deliverables/references/what-makes-a-request-signed.md +61 -0
  967. package/dist/knowledge/skills/email-add-template/SKILL.md +47 -6
  968. package/dist/knowledge/skills/email-add-template/references/framework-email-attachments-and-limits.md +11 -8
  969. package/dist/knowledge/skills/email-add-template/references/framework-email-send-api.md +10 -2
  970. package/dist/knowledge/skills/email-add-template/references/framework-email-template-api.md +134 -0
  971. package/dist/knowledge/skills/engine-product-definitions/references/framework-metered-usage-recording-api.md +28 -0
  972. package/dist/knowledge/skills/flows-actors-a2a-exposure/SKILL.md +102 -23
  973. package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-a2a-token-budget-api.md +103 -14
  974. package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-flows-actors-a2a-contract.md +35 -4
  975. package/dist/knowledge/skills/flows-actors-autonomous-agents/SKILL.md +98 -9
  976. package/dist/knowledge/skills/flows-actors-autonomous-agents/references/binding-and-review.md +71 -16
  977. package/dist/knowledge/skills/flows-actors-autonomous-agents/references/framework-autonomous-agent-api.md +160 -23
  978. package/dist/knowledge/skills/flows-actors-autonomous-agents/references/framework-inbound-agents-api.md +10 -3
  979. package/dist/knowledge/skills/flows-actors-autonomous-agents/references/tool-posture.md +14 -2
  980. package/dist/knowledge/skills/flows-actors-chat-assistant/SKILL.md +298 -26
  981. package/dist/knowledge/skills/flows-actors-chat-assistant/examples/todo-assistant.example.md +78 -19
  982. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-agent-behavior-reports-api.md +455 -0
  983. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-agent-content-guardrails-api.md +446 -0
  984. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-agent-operation-record-api.md +208 -0
  985. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-agent-suspension-api.md +174 -0
  986. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-ask-person-tool-api.md +121 -0
  987. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-audit-agent-attribution-api.md +21 -0
  988. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-decision-deadlines-api.md +10 -3
  989. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-realtime-catalog.md +69 -0
  990. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-tool-api.md +695 -11
  991. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-view-api.md +124 -6
  992. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-model-spend-limits-api.md +276 -0
  993. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-present-records-tool-api.md +150 -0
  994. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-retrieval-tool-api.md +251 -0
  995. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-tool-dispatch-obligations-api.md +120 -16
  996. package/dist/knowledge/skills/flows-actors-declared-flow/SKILL.md +339 -0
  997. package/dist/knowledge/skills/flows-actors-declared-flow/references/framework-flow-model-api.md +283 -0
  998. package/dist/knowledge/skills/flows-actors-declared-flow/references/framework-start-flow-api.md +134 -0
  999. package/dist/knowledge/skills/flows-actors-declared-flow/references/step-kinds.md +16 -0
  1000. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/SKILL.md +91 -5
  1001. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-definition-api.md +78 -1
  1002. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-invocation-api.md +16 -3
  1003. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-operation-and-model-api.md +13 -6
  1004. package/dist/knowledge/skills/frontend-component-catalog/SKILL.md +5 -4
  1005. package/dist/knowledge/skills/frontend-component-catalog/references/framework-component-catalog.md +29 -19
  1006. package/dist/knowledge/skills/frontend-component-catalog/references/framework-component-usage.md +166 -21
  1007. package/dist/knowledge/skills/guidance-onboarding-authoring/references/framework-guidance-flow-api.md +1 -1
  1008. package/dist/knowledge/skills/human-decision-notices/SKILL.md +150 -0
  1009. package/dist/knowledge/skills/human-decision-notices/references/framework-decision-card-wording-api.md +292 -0
  1010. package/dist/knowledge/skills/human-decision-notices/references/framework-decision-notice-handler-api.md +340 -0
  1011. package/dist/knowledge/skills/i18n-label-generation/SKILL.md +17 -1
  1012. package/dist/knowledge/skills/i18n-label-generation/references/framework-labelling-sections-api.md +39 -0
  1013. package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +1 -1
  1014. package/dist/knowledge/skills/i18n-rerun-pipeline/references/framework-labelling-sections-api.md +39 -0
  1015. package/dist/knowledge/skills/i18n-translation-rerun/SKILL.md +35 -3
  1016. package/dist/knowledge/skills/i18n-translation-rerun/references/framework-labelling-sections-api.md +39 -0
  1017. package/dist/knowledge/skills/i18n-translation-rerun/references/framework-translation-glossary-api.md +87 -0
  1018. package/dist/knowledge/skills/inbound-channels/SKILL.md +93 -13
  1019. package/dist/knowledge/skills/inbound-channels/references/email-channel.md +49 -4
  1020. package/dist/knowledge/skills/inbound-channels/references/framework-inbound-channel-api.md +245 -27
  1021. package/dist/knowledge/skills/inbound-channels/references/framework-inbound-email-api.md +8 -8
  1022. package/dist/knowledge/skills/inbound-channels/references/framework-inbound-handler-api.md +471 -6
  1023. package/dist/knowledge/skills/inbound-channels/references/framework-inbound-pipelines-api.md +73 -0
  1024. package/dist/knowledge/skills/inbound-channels/references/inbound-delivery-lifecycle.md +44 -5
  1025. package/dist/knowledge/skills/inbound-channels/references/receiving-email.md +39 -16
  1026. package/dist/knowledge/skills/inbound-channels/references/sms-channel.md +93 -0
  1027. package/dist/knowledge/skills/infra-environment-config/SKILL.md +226 -73
  1028. package/dist/knowledge/skills/infra-environment-config/references/framework-backing-services-api.md +12 -14
  1029. package/dist/knowledge/skills/infra-environment-config/references/framework-environment-deployment-api.md +140 -7
  1030. package/dist/knowledge/skills/infra-environment-config/references/framework-infrastructure-host-api.md +2 -1
  1031. package/dist/knowledge/skills/infra-environment-config/references/framework-platform-key-management-api.md +370 -0
  1032. package/dist/knowledge/skills/layout-2d-adoption/SKILL.md +158 -0
  1033. package/dist/knowledge/skills/layout-2d-adoption/references/choosing-a-layout.md +43 -0
  1034. package/dist/knowledge/skills/layout-2d-adoption/references/framework-2d-layout-authoring-api.md +167 -0
  1035. package/dist/knowledge/skills/layout-2d-adoption/references/framework-2d-layout-registration-api.md +101 -0
  1036. package/dist/knowledge/skills/layout-2d-adoption/references/framework-2d-layout-settings-api.md +59 -0
  1037. package/dist/knowledge/skills/layout-2d-adoption/references/framework-shell-motion-api.md +415 -0
  1038. package/dist/knowledge/skills/layout-3d-adoption/SKILL.md +1 -0
  1039. package/dist/knowledge/skills/layout-3d-adoption/references/framework-3d-focal-plane-settings-api.md +16 -0
  1040. package/dist/knowledge/skills/layout-3d-adoption/references/framework-3d-frame-style-overrides-api.md +72 -0
  1041. package/dist/knowledge/skills/layout-3d-adoption/references/framework-3d-layout-contract-api.md +65 -32
  1042. package/dist/knowledge/skills/layout-3d-adoption/references/framework-3d-layout-registration-api.md +14 -36
  1043. package/dist/knowledge/skills/layout-3d-adoption/references/framework-shell-building-blocks-api.md +7 -3
  1044. package/dist/knowledge/skills/layout-3d-adoption/references/manual-adoption-and-removal.md +2 -2
  1045. package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +12 -9
  1046. package/dist/knowledge/skills/local-environment-bootstrap/references/derived-artifact-currency.md +7 -5
  1047. package/dist/knowledge/skills/local-environment-bootstrap/references/framework-upgrade-and-dependency-alignment.md +2 -2
  1048. package/dist/knowledge/skills/local-environment-bootstrap/references/local-environment-troubleshooting.md +18 -10
  1049. package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +7 -7
  1050. package/dist/knowledge/skills/market-authoring-overview/references/framework-market-references-api.md +14 -1
  1051. package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +33 -2
  1052. package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +42 -2
  1053. package/dist/knowledge/skills/market-generation-cli/SKILL.md +49 -7
  1054. package/dist/knowledge/skills/market-generation-cli/references/framework-market-generation-cli.md +63 -9
  1055. package/dist/knowledge/skills/minion-authoring/examples/contained-tick.example.md +1 -1
  1056. package/dist/knowledge/skills/minion-authoring/references/framework-minion-tick-contract.md +2 -2
  1057. package/dist/knowledge/skills/model-cost-attribution/SKILL.md +43 -11
  1058. package/dist/knowledge/skills/model-cost-attribution/references/framework-model-cost-pricing-api.md +58 -3
  1059. package/dist/knowledge/skills/model-cost-attribution/references/framework-model-cost-summary-api.md +57 -21
  1060. package/dist/knowledge/skills/model-cost-attribution/references/framework-work-attribution-api.md +7 -3
  1061. package/dist/knowledge/skills/model-cost-attribution/references/framework-work-unit-api.md +257 -46
  1062. package/dist/knowledge/skills/module-companion-exports/SKILL.md +1 -0
  1063. package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +30 -2
  1064. package/dist/knowledge/skills/module-registration/references/framework-domain-modules-api.md +110 -1
  1065. package/dist/knowledge/skills/module-relationships/SKILL.md +143 -119
  1066. package/dist/knowledge/skills/module-relationships/references/framework-resource-relationship-authoring-api.md +8 -4
  1067. package/dist/knowledge/skills/organization-relationships/SKILL.md +668 -0
  1068. package/dist/knowledge/skills/organization-relationships/references/framework-organization-relationships-api.md +1259 -0
  1069. package/dist/knowledge/skills/organization-relationships/references/framework-relationship-capability-grants-api.md +243 -0
  1070. package/dist/knowledge/skills/organization-relationships/references/framework-relationship-grantor-authentication-api.md +284 -0
  1071. package/dist/knowledge/skills/organization-relationships/references/framework-relationship-kinds-api.md +555 -0
  1072. package/dist/knowledge/skills/organization-relationships/references/framework-relationship-record-separation-api.md +163 -0
  1073. package/dist/knowledge/skills/organization-relationships/references/framework-representative-activity-api.md +149 -0
  1074. package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-collection-template-api.md +5 -3
  1075. package/dist/knowledge/skills/professional-qualifications/SKILL.md +173 -0
  1076. package/dist/knowledge/skills/professional-qualifications/references/choosing-who-may-decide.md +53 -0
  1077. package/dist/knowledge/skills/professional-qualifications/references/framework-operation-approval-requirement-api.md +98 -0
  1078. package/dist/knowledge/skills/professional-qualifications/references/framework-operation-required-qualifications-api.md +39 -0
  1079. package/dist/knowledge/skills/professional-qualifications/references/framework-professional-qualifications-api.md +223 -0
  1080. package/dist/knowledge/skills/provider-address-lookup/SKILL.md +1 -1
  1081. package/dist/knowledge/skills/provider-address-lookup/references/framework-browser-operation-policy-api.md +3 -3
  1082. package/dist/knowledge/skills/provider-backend-package/SKILL.md +388 -11
  1083. package/dist/knowledge/skills/provider-backend-package/references/framework-optional-runtime-peers.md +31 -28
  1084. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-augmentation-api.md +16 -0
  1085. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-compliance-state-collector-api.md +96 -0
  1086. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-configuration-check-api.md +130 -0
  1087. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-file-storage-adapter-api.md +13 -0
  1088. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-inbound-endpoint-api.md +755 -0
  1089. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-incremental-consent-api.md +235 -0
  1090. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-loader-api.md +6 -0
  1091. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-processing-region-api.md +340 -0
  1092. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-shared-connection-api.md +72 -8
  1093. package/dist/knowledge/skills/provider-backend-package/references/framework-provider-subject-erasure-effect-api.md +222 -0
  1094. package/dist/knowledge/skills/provider-frontend-file-picker/SKILL.md +9 -5
  1095. package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-frontend-provider-consent-api.md +11 -2
  1096. package/dist/knowledge/skills/provider-frontend-module/SKILL.md +50 -5
  1097. package/dist/knowledge/skills/provider-frontend-module/references/framework-on-demand-capabilities-api.md +306 -0
  1098. package/dist/knowledge/skills/provider-frontend-module/references/package-frontend-facets.md +11 -3
  1099. package/dist/knowledge/skills/provider-operation-calls/SKILL.md +41 -15
  1100. package/dist/knowledge/skills/provider-operation-calls/references/browser-door-answers.md +56 -18
  1101. package/dist/knowledge/skills/provider-operation-calls/references/framework-browser-operation-policy-api.md +1 -1
  1102. package/dist/knowledge/skills/provider-operation-calls/references/framework-frontend-execute-operation-api.md +143 -25
  1103. package/dist/knowledge/skills/provider-operation-calls/references/framework-provider-operation-executor-api.md +6 -0
  1104. package/dist/knowledge/skills/provider-operation-calls/references/framework-provider-scope-reauthorization-api.md +9 -6
  1105. package/dist/knowledge/skills/provider-operation-calls/references/framework-rest-operation-contract-api.md +1275 -4
  1106. package/dist/knowledge/skills/rate-limit-authoring/SKILL.md +71 -35
  1107. package/dist/knowledge/skills/rate-limit-authoring/references/framework-rate-limit-policy-api.md +27 -13
  1108. package/dist/knowledge/skills/resource-add-field/SKILL.md +7 -0
  1109. package/dist/knowledge/skills/resource-add-field/examples/add-priority-field-to-todos.example.md +32 -12
  1110. package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +451 -67
  1111. package/dist/knowledge/skills/resource-add-resource/SKILL.md +57 -8
  1112. package/dist/knowledge/skills/resource-add-resource/references/framework-engine-api-reference-categories-api.md +119 -0
  1113. package/dist/knowledge/skills/resource-add-resource/references/framework-new-resource-core-config-api.md +165 -44
  1114. package/dist/knowledge/skills/resource-chat-commands/SKILL.md +138 -0
  1115. package/dist/knowledge/skills/resource-chat-commands/references/framework-resource-chat-command-contract.md +72 -0
  1116. package/dist/knowledge/skills/resource-config-wiring/SKILL.md +171 -7
  1117. package/dist/knowledge/skills/resource-config-wiring/references/framework-administrative-continuity-codes-api.md +4 -4
  1118. package/dist/knowledge/skills/resource-config-wiring/references/framework-authority-audit-interpretation.md +17 -8
  1119. package/dist/knowledge/skills/resource-config-wiring/references/framework-collection-operation-declarations.md +8 -2
  1120. package/dist/knowledge/skills/resource-config-wiring/references/framework-operation-approval-api.md +371 -0
  1121. package/dist/knowledge/skills/resource-config-wiring/references/framework-operation-audit-api.md +51 -7
  1122. package/dist/knowledge/skills/resource-config-wiring/references/framework-operation-bulk-api.md +163 -0
  1123. package/dist/knowledge/skills/resource-config-wiring/references/framework-operation-idempotency-key-api.md +66 -27
  1124. package/dist/knowledge/skills/resource-config-wiring/references/framework-personal-data-declaration-api.md +200 -61
  1125. package/dist/knowledge/skills/resource-config-wiring/references/framework-request-field-offers-api.md +168 -0
  1126. package/dist/knowledge/skills/resource-config-wiring/references/framework-required-features-api.md +20 -0
  1127. package/dist/knowledge/skills/resource-config-wiring/references/framework-retention-policy-operations.md +8 -3
  1128. package/dist/knowledge/skills/resource-config-wiring/references/framework-role-ceiling-api.md +34 -10
  1129. package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-operation-scope-enums-api.md +8 -6
  1130. package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +351 -159
  1131. package/dist/knowledge/skills/resource-config-wiring/references/framework-scope-admissions-api.md +160 -2
  1132. package/dist/knowledge/skills/resource-config-wiring/references/framework-system-access-reads-api.md +440 -119
  1133. package/dist/knowledge/skills/resource-config-wiring/references/framework-user-notifications-api.md +426 -32
  1134. package/dist/knowledge/skills/resource-config-wiring/references/framework-webhook-events-api.md +116 -0
  1135. package/dist/knowledge/skills/resource-custom-view/SKILL.md +126 -1
  1136. package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +344 -62
  1137. package/dist/knowledge/skills/resource-custom-view/references/framework-backend-refusal-api.md +110 -0
  1138. package/dist/knowledge/skills/resource-external-data/SKILL.md +326 -76
  1139. package/dist/knowledge/skills/resource-external-data/references/bidirectional-pipelines.md +335 -0
  1140. package/dist/knowledge/skills/resource-external-data/references/declared-expressions.md +18 -6
  1141. package/dist/knowledge/skills/resource-external-data/references/erasure-suppression.md +71 -12
  1142. package/dist/knowledge/skills/resource-external-data/references/facet-augmentations.md +6 -0
  1143. package/dist/knowledge/skills/resource-external-data/references/framework-external-data-pipeline-api.md +96 -26
  1144. package/dist/knowledge/skills/resource-external-data/references/framework-http-api-binding-api.md +257 -57
  1145. package/dist/knowledge/skills/resource-external-data/references/framework-pipeline-admin-endpoints-api.md +111 -11
  1146. package/dist/knowledge/skills/resource-external-data/references/framework-system-of-record-capabilities-api.md +147 -0
  1147. package/dist/knowledge/skills/resource-external-data/references/incremental-extraction.md +30 -4
  1148. package/dist/knowledge/skills/resource-external-data/references/local-test-doubles.md +121 -0
  1149. package/dist/knowledge/skills/resource-external-data/references/odata-v2-sources.md +21 -9
  1150. package/dist/knowledge/skills/resource-external-data/references/outbound-pipelines.md +62 -15
  1151. package/dist/knowledge/skills/resource-external-data/references/partition-from-the-domain-plan.md +230 -0
  1152. package/dist/knowledge/skills/resource-external-data/references/presenting-a-copy-and-a-read-through.md +73 -0
  1153. package/dist/knowledge/skills/resource-external-data/references/provenance-cue.md +18 -2
  1154. package/dist/knowledge/skills/resource-external-data/references/rate-budgets-and-pacing.md +3 -1
  1155. package/dist/knowledge/skills/resource-external-data/references/read-through-writes.md +65 -18
  1156. package/dist/knowledge/skills/resource-external-data/references/remote-references.md +17 -7
  1157. package/dist/knowledge/skills/resource-external-data/references/requested-keys.md +104 -0
  1158. package/dist/knowledge/skills/resource-external-data/references/system-of-record-actions.md +77 -7
  1159. package/dist/knowledge/skills/resource-mcp-tool-exposure/SKILL.md +25 -4
  1160. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-resource-mcp-exposure-contract.md +2 -2
  1161. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-catalogue-withdrawal-and-verification.md +1 -1
  1162. package/dist/knowledge/skills/resource-rag-source-fields/SKILL.md +18 -9
  1163. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-embeddings-capability-api.md +42 -3
  1164. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-retrieval-api.md +29 -2
  1165. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-source-decorator-api.md +20 -20
  1166. package/dist/knowledge/skills/resource-retention-binding/SKILL.md +21 -3
  1167. package/dist/knowledge/skills/resource-retention-binding/references/framework-legal-holds-api.md +114 -7
  1168. package/dist/knowledge/skills/resource-retention-binding/references/framework-retention-binding-api.md +84 -1
  1169. package/dist/knowledge/skills/resource-retention-binding/references/framework-retention-enforcement-records-api.md +10 -0
  1170. package/dist/knowledge/skills/resource-retention-binding/references/framework-retention-schedule-api.md +5 -3
  1171. package/dist/knowledge/skills/resource-retention-binding/references/framework-statutory-retention-api.md +46 -0
  1172. package/dist/knowledge/skills/resource-retention-binding/references/start-point-decisions.md +14 -2
  1173. package/dist/knowledge/skills/resource-schema-authoring/SKILL.md +27 -11
  1174. package/dist/knowledge/skills/resource-schema-authoring/examples/add-enum-field-with-ui.example.md +23 -7
  1175. package/dist/knowledge/skills/resource-schema-authoring/references/computed-totals.md +13 -8
  1176. package/dist/knowledge/skills/resource-schema-authoring/references/document-numbers.md +78 -17
  1177. package/dist/knowledge/skills/resource-schema-authoring/references/field-type-selection.md +4 -0
  1178. package/dist/knowledge/skills/resource-schema-authoring/references/framework-decorator-vocabulary-api.md +105 -6
  1179. package/dist/knowledge/skills/resource-schema-authoring/references/framework-erasure-scrub-treatments-api.md +19 -22
  1180. package/dist/knowledge/skills/resource-schema-authoring/references/framework-personal-data-category-api.md +150 -35
  1181. package/dist/knowledge/skills/resource-schema-authoring/references/framework-schema-family-api.md +32 -4
  1182. package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-decorator-methods-api.md +58 -18
  1183. package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-structural-params-api.md +107 -5
  1184. package/dist/knowledge/skills/resource-schema-authoring/references/framework-special-factories-api.md +200 -69
  1185. package/dist/knowledge/skills/resource-schema-authoring/references/framework-system-managed-fields-api.md +2 -1
  1186. package/dist/knowledge/skills/resource-schema-authoring/references/framework-zod-lifecycle-and-chainable-api.md +326 -18
  1187. package/dist/knowledge/skills/resource-schema-authoring/references/shared-layer-decorator-checklist.md +7 -0
  1188. package/dist/knowledge/skills/resource-schema-authoring/references/special-factories.md +72 -0
  1189. package/dist/knowledge/skills/resource-status-lifecycle/SKILL.md +42 -2
  1190. package/dist/knowledge/skills/resource-status-lifecycle/references/framework-operation-condition-parameters-api.md +67 -0
  1191. package/dist/knowledge/skills/resource-status-lifecycle/references/quote-lifecycle-worked-example.md +16 -12
  1192. package/dist/knowledge/skills/resource-ui-behavior/SKILL.md +219 -77
  1193. package/dist/knowledge/skills/resource-ui-behavior/references/framework-collection-filter-presets-api.md +105 -24
  1194. package/dist/knowledge/skills/resource-ui-behavior/references/framework-display-edit-modes-api.md +131 -1
  1195. package/dist/knowledge/skills/resource-ui-behavior/references/framework-enum-frontend-handling-api.md +41 -7
  1196. package/dist/knowledge/skills/resource-ui-behavior/references/framework-field-tiles-api.md +114 -0
  1197. package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +428 -72
  1198. package/dist/knowledge/skills/resource-ui-behavior/references/framework-per-primitive-ui-api.md +25 -9
  1199. package/dist/knowledge/skills/resource-ui-behavior/references/framework-primitive-ui-api.md +15 -3
  1200. package/dist/knowledge/skills/resource-ui-behavior/references/framework-record-page-parts-api.md +155 -0
  1201. package/dist/knowledge/skills/resource-ui-behavior/references/framework-related-resource-embeds-api.md +223 -6
  1202. package/dist/knowledge/skills/resource-ui-behavior/references/framework-resource-layout-templates-api.md +186 -65
  1203. package/dist/knowledge/skills/resource-ui-behavior/references/framework-section-stages-api.md +102 -0
  1204. package/dist/knowledge/skills/resource-ui-behavior/references/record-page-anatomy.md +138 -0
  1205. package/dist/knowledge/skills/resource-ui-behavior/references/surface-decisions.md +89 -32
  1206. package/dist/knowledge/skills/resource-ui-behavior/references/visual-quality-rubric.md +73 -0
  1207. package/dist/knowledge/skills/resource-ui-behavior/references/workflow-record-page.md +264 -0
  1208. package/dist/knowledge/skills/seeding-authoring/SKILL.md +24 -4
  1209. package/dist/knowledge/skills/seeding-authoring/references/cross-seed-row-references.md +12 -0
  1210. package/dist/knowledge/skills/seeding-authoring/references/data-seeding-mode-picker.md +16 -1
  1211. package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +7 -6
  1212. package/dist/knowledge/skills/seeding-operations/references/data-seeding-admin-runbook.md +15 -8
  1213. package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +3 -0
  1214. package/dist/knowledge/skills/settings-placement-authoring/SKILL.md +48 -11
  1215. package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-destinations-catalog.md +183 -32
  1216. package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-placement-api.md +72 -13
  1217. package/dist/knowledge/skills/spec-catalog-authoring/SKILL.md +5 -4
  1218. package/dist/knowledge/skills/spec-catalog-authoring/references/catalog-spec-pattern-overview.md +5 -4
  1219. package/dist/knowledge/skills/spec-companion-exports/SKILL.md +1 -0
  1220. package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +30 -2
  1221. package/dist/knowledge/skills/spec-composite-view-update/SKILL.md +15 -7
  1222. package/dist/knowledge/skills/spec-resource-update/SKILL.md +26 -0
  1223. package/dist/knowledge/skills/spec-resource-update/references/framework-spec-resource-contracts-api.md +186 -83
  1224. package/dist/knowledge/skills/spec-resource-update/references/workflow-record-page-specification.md +237 -0
  1225. package/dist/knowledge/skills/spec-update-after-change/references/framework-spec-factory-api.md +113 -70
  1226. package/dist/knowledge/skills/subject-data-export/SKILL.md +176 -0
  1227. package/dist/knowledge/skills/subject-data-export/references/file-content-exclusions.md +15 -0
  1228. package/dist/knowledge/skills/subject-data-export/references/framework-subject-export-api.md +142 -0
  1229. package/dist/knowledge/skills/subject-data-export/references/framework-subject-export-archive-api.md +33 -0
  1230. package/dist/knowledge/skills/views-add-composite-view/SKILL.md +14 -5
  1231. package/dist/knowledge/skills/views-add-custom-view/SKILL.md +10 -1
  1232. package/dist/knowledge/skills/views-add-custom-view/references/framework-focus-indicator-api.md +145 -0
  1233. package/dist/knowledge/skills/views-app-level/SKILL.md +3 -1
  1234. package/dist/knowledge/skills/views-app-level/references/workflow-home.md +373 -0
  1235. package/dist/knowledge/skills/views-chart-authoring/SKILL.md +41 -5
  1236. package/dist/knowledge/skills/views-chart-authoring/references/framework-chart-view-contracts-api.md +13 -0
  1237. package/dist/knowledge/skills/views-chart-authoring/references/framework-resource-chart-data-api.md +9 -5
  1238. package/dist/knowledge/skills/views-composite-authoring/SKILL.md +15 -4
  1239. package/dist/knowledge/skills/views-composite-authoring/references/framework-chart-dashboard-api.md +244 -0
  1240. package/dist/knowledge/skills/views-execution-authoring/SKILL.md +11 -2
  1241. package/dist/knowledge/skills/views-execution-authoring/references/framework-execution-view-contracts-api.md +57 -3
  1242. package/dist/knowledge/skills/website-anonymous-session/SKILL.md +61 -25
  1243. package/dist/knowledge/skills/website-blog-authoring/SKILL.md +253 -78
  1244. package/dist/knowledge/skills/website-blog-authoring/references/blog-adapter-api.md +1105 -222
  1245. package/dist/knowledge/skills/website-building-blocks/SKILL.md +337 -0
  1246. package/dist/knowledge/skills/website-building-blocks/references/framework-website-blocks-api.md +3050 -0
  1247. package/dist/knowledge/skills/website-building-blocks/references/framework-website-demo-examples.md +627 -0
  1248. package/dist/knowledge/skills/website-building-blocks/references/framework-website-product-kit-api.md +3309 -0
  1249. package/dist/knowledge/skills/website-building-blocks/references/website-visual-quality-rubric.md +75 -0
  1250. package/dist/knowledge/skills/website-bundle-discipline/SKILL.md +42 -19
  1251. package/dist/knowledge/skills/website-bundle-discipline/references/example-website-button-override.md +8 -12
  1252. package/dist/knowledge/skills/website-bundle-discipline/references/website-bundle-rules.md +20 -5
  1253. package/dist/knowledge/skills/website-consent-gate-overrides/SKILL.md +84 -28
  1254. package/dist/knowledge/skills/website-factory-advanced/SKILL.md +67 -64
  1255. package/dist/knowledge/skills/website-inbound-contact-forms/SKILL.md +58 -23
  1256. package/dist/knowledge/skills/website-inbound-contact-forms/references/framework-submission-challenge-api.md +5 -1
  1257. package/dist/knowledge/skills/website-label-pack/SKILL.md +43 -21
  1258. package/dist/knowledge/skills/website-layout-overrides/SKILL.md +112 -77
  1259. package/dist/knowledge/skills/website-marketing-metadata-extension/SKILL.md +24 -13
  1260. package/dist/knowledge/skills/website-motion-design/SKILL.md +277 -0
  1261. package/dist/knowledge/skills/website-motion-design/references/framework-motion-api.md +1562 -0
  1262. package/dist/knowledge/skills/website-motion-design/references/industry-practice.md +28 -0
  1263. package/dist/knowledge/skills/website-navigation-authoring/SKILL.md +255 -397
  1264. package/dist/knowledge/skills/website-navigation-authoring/references/framework-menu-api.md +712 -0
  1265. package/dist/knowledge/skills/website-navigation-authoring/references/framework-public-document-links-api.md +28 -6
  1266. package/dist/knowledge/skills/website-navigation-authoring/references/menu-keys-and-styling.md +151 -0
  1267. package/dist/knowledge/skills/website-navigation-authoring/references/worked-examples-header-footer.md +131 -326
  1268. package/dist/knowledge/skills/website-page-authoring/SKILL.md +160 -67
  1269. package/dist/knowledge/skills/website-page-authoring/references/framework-page-kinds-api.md +982 -0
  1270. package/dist/knowledge/skills/website-page-authoring/references/framework-site-context-loader-api.md +29 -5
  1271. package/dist/knowledge/skills/website-page-authoring/references/homepage-content-and-art-direction.md +19 -0
  1272. package/dist/knowledge/skills/website-page-authoring/references/page-kinds.md +118 -0
  1273. package/dist/knowledge/skills/website-page-variants/SKILL.md +70 -69
  1274. package/dist/knowledge/skills/website-primitive-overrides/SKILL.md +48 -28
  1275. package/dist/knowledge/skills/website-section-comparison/SKILL.md +1171 -0
  1276. package/dist/knowledge/skills/website-section-comparison/references/define-website-section-api.md +679 -0
  1277. package/dist/knowledge/skills/website-section-comparison/references/framework-website-tables-api.md +487 -0
  1278. package/dist/knowledge/skills/website-section-contact/SKILL.md +409 -186
  1279. package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +197 -119
  1280. package/dist/knowledge/skills/website-section-cta/SKILL.md +399 -235
  1281. package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +197 -119
  1282. package/dist/knowledge/skills/website-section-faq/SKILL.md +562 -303
  1283. package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +197 -119
  1284. package/dist/knowledge/skills/website-section-faq/references/framework-website-faq-api.md +489 -0
  1285. package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +648 -275
  1286. package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +197 -119
  1287. package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +573 -265
  1288. package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +197 -119
  1289. package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +533 -234
  1290. package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +197 -119
  1291. package/dist/knowledge/skills/website-section-hero/SKILL.md +604 -333
  1292. package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +198 -120
  1293. package/dist/knowledge/skills/website-section-how-it-works/SKILL.md +1150 -0
  1294. package/dist/knowledge/skills/website-section-how-it-works/references/define-website-section-api.md +679 -0
  1295. package/dist/knowledge/skills/website-section-how-it-works/references/framework-website-steps-api.md +337 -0
  1296. package/dist/knowledge/skills/website-section-integrations/SKILL.md +974 -0
  1297. package/dist/knowledge/skills/website-section-integrations/references/define-website-section-api.md +679 -0
  1298. package/dist/knowledge/skills/website-section-integrations/references/framework-website-marquee-api.md +825 -0
  1299. package/dist/knowledge/skills/website-section-latest-posts/SKILL.md +928 -0
  1300. package/dist/knowledge/skills/website-section-latest-posts/references/define-website-section-api.md +679 -0
  1301. package/dist/knowledge/skills/website-section-latest-posts/references/framework-website-latest-posts-api.md +465 -0
  1302. package/dist/knowledge/skills/website-section-pricing/SKILL.md +594 -379
  1303. package/dist/knowledge/skills/website-section-pricing/examples/pricing-offers.example.md +189 -0
  1304. package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +197 -119
  1305. package/dist/knowledge/skills/website-section-pricing/references/framework-pricing-catalog-api.md +5 -2
  1306. package/dist/knowledge/skills/website-section-pricing/references/framework-website-pricing-api.md +670 -0
  1307. package/dist/knowledge/skills/website-section-problem/SKILL.md +1150 -0
  1308. package/dist/knowledge/skills/website-section-problem/references/define-website-section-api.md +679 -0
  1309. package/dist/knowledge/skills/website-section-problem/references/framework-website-card-grid-api.md +664 -0
  1310. package/dist/knowledge/skills/website-section-product-showcase/SKILL.md +1322 -0
  1311. package/dist/knowledge/skills/website-section-product-showcase/references/define-website-section-api.md +679 -0
  1312. package/dist/knowledge/skills/website-section-product-showcase/references/framework-website-card-grid-api.md +533 -0
  1313. package/dist/knowledge/skills/website-section-product-showcase/references/framework-website-product-tour-api.md +917 -0
  1314. package/dist/knowledge/skills/website-section-roadmap/SKILL.md +1133 -0
  1315. package/dist/knowledge/skills/website-section-roadmap/references/define-website-section-api.md +679 -0
  1316. package/dist/knowledge/skills/website-section-roadmap/references/framework-website-roadmap-api.md +475 -0
  1317. package/dist/knowledge/skills/website-section-social-proof/SKILL.md +740 -316
  1318. package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +197 -119
  1319. package/dist/knowledge/skills/website-section-social-proof/references/framework-website-quote-cards-api.md +623 -0
  1320. package/dist/knowledge/skills/website-section-solution-paths/SKILL.md +1057 -0
  1321. package/dist/knowledge/skills/website-section-solution-paths/references/define-website-section-api.md +679 -0
  1322. package/dist/knowledge/skills/website-section-solution-paths/references/framework-website-solution-paths-api.md +477 -0
  1323. package/dist/knowledge/skills/website-section-stats/SKILL.md +1086 -0
  1324. package/dist/knowledge/skills/website-section-stats/references/define-website-section-api.md +679 -0
  1325. package/dist/knowledge/skills/website-section-stats/references/framework-website-stats-api.md +517 -0
  1326. package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +183 -67
  1327. package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +576 -57
  1328. package/dist/knowledge/skills/website-seo-aeo-geo/references/geo-api.md +1 -1
  1329. package/dist/knowledge/skills/website-seo-aeo-geo/references/seo-api.md +6 -94
  1330. package/dist/knowledge/skills/website-theme-authoring/SKILL.md +226 -0
  1331. package/dist/knowledge/skills/website-theme-authoring/references/framework-website-theme-api.md +893 -0
  1332. package/dist/knowledge/skills/worker-authoring/SKILL.md +4 -2
  1333. package/dist/knowledge/skills/worker-authoring/references/framework-worker-init-contract.md +4 -2
  1334. package/dist/knowledge/topic-index.json +17998 -8568
  1335. package/dist/tsconfig.build.tsbuildinfo +1 -1
  1336. package/package.json +6 -6
  1337. package/dist/knowledge/references/example.organizations.serves-as-provider.md +0 -12
  1338. package/dist/knowledge/references/saas.models.auth.service-provider-client-authentication.md +0 -169
  1339. package/dist/knowledge/references/saas.models.organizations.service-provider-activity-feed.md +0 -121
  1340. package/dist/knowledge/references/saas.models.organizations.service-provider-client-controls.md +0 -49
  1341. package/dist/knowledge/references/saas.models.organizations.service-provider-relationships.md +0 -567
  1342. package/dist/knowledge/references/saas.website.root-config.navigation.md +0 -37
  1343. package/dist/knowledge/skills/service-provider-relationships/SKILL.md +0 -455
  1344. package/dist/knowledge/skills/service-provider-relationships/references/framework-organization-types-api.md +0 -270
  1345. package/dist/knowledge/skills/service-provider-relationships/references/framework-service-provider-activity-feed-api.md +0 -129
  1346. package/dist/knowledge/skills/service-provider-relationships/references/framework-service-provider-capability-grants-api.md +0 -161
  1347. package/dist/knowledge/skills/service-provider-relationships/references/framework-service-provider-client-authentication-api.md +0 -224
  1348. package/dist/knowledge/skills/service-provider-relationships/references/framework-service-provider-relationships-api.md +0 -576
  1349. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,3309 @@
1
+ # Website drawn-product kit — API (source-backed)
2
+
3
+ The atoms a section draws the PRODUCT with (a hero's application window, a product tour's screens, a bento tile's
4
+ drawing, a feature's visual), the frames a drawing sits in, and the stylesheet that paints them from the product
5
+ tokens (`--website-product-*`, the application's own colours). Read it when a section shows the product.
6
+
7
+ - Compose a drawing from these atoms rather than writing markup and CSS: each atom's look is the application's, its
8
+ states are props, and its transitions run on the site's tempo.
9
+ - Put the drawing in a frame: `WebsiteMotionDemo`'s `frame` (a demo with its own pause control) or
10
+ `WebsiteDemoFrame` (a drawing inside a tour or bento, whose group already has one).
11
+ - Pass the site's icons and words in; the atoms own no icon set and no copy.
12
+ - Give the drawings their character through the theme first: corners, spacing, the selection and hairlines come from
13
+ the personality (`shape`, `density`, `selectionEmphasis`, `edgeWeight`), colours from the application's palette. A
14
+ site that needs one drawing to differ sets `--website-product-*` on that drawing's frame.
15
+ - A scene's own spacing uses the kit's property where there is one: `--website-kit-stack-gap` on the stack it means.
16
+ Where a scene keeps a spacing, weight or size the kit names no property for (a tighter line, a heavier caption),
17
+ write a SCENE RULE on the kit's hook, scoped to that scene: `.my-scene [data-website-product='line'] { padding: … }`.
18
+ Its colours come from a token (`var(--website-product-ink)`), or, for a colour the theme names nowhere (a scanned
19
+ page's paper), from a custom property declared ONCE on the scene's root and read by its rules. Never a timing other
20
+ than the motion tokens, and never an unscoped rule that restyles an atom everywhere.
21
+ - Anything the kit does not draw (a bespoke scene, a grid of cards) is the site's own CSS: scoped under
22
+ `[data-website-demo-stage]`, coloured from the product tokens (or, for a colour the theme names nowhere, from a
23
+ custom property declared once on the scene's root) and timed on the motion tokens.
24
+ `check:website-site-css` holds a site's own CSS to a shrink-only count of rules, literal colours, literal timings
25
+ and breakpoints. A literal parked in a custom property still counts: naming a colour does not make it a token.
26
+ - Chart series are colours in ORDER OF EMPHASIS: `FIRST` is the strongest, and the bars are drawn from `SECOND` to
27
+ `FIRST`. A site that sets `product.series` in its theme lists its colours that way, never in a chart's left-to-right
28
+ order, and each donut slice and legend item names the series its value deserves.
29
+
30
+ ## The frames (with the demo, its group and its stage)
31
+
32
+ ## Import Origins
33
+
34
+ - `@wildo-ai/saas-website`
35
+
36
+ ## Source Excerpts
37
+
38
+ ### Origin Package: `@wildo-ai/saas-website`
39
+
40
+ ```tsx
41
+ *
42
+ * `WebsiteMotionDemo` — the frame around an ANIMATED PRODUCT DEMO: a drawn interface that plays on its own (a task
43
+ * list completing itself, an invoice assembling, an agent answering). Modern product sites show the product moving;
44
+ * this primitive owns the obligations that come with it, so a section only draws the interface and its keyframes.
45
+ *
46
+ * What it guarantees:
47
+ * - **A pause control** (WCAG 2.2.2 "Pause, Stop, Hide": content that moves on its own for more than five seconds,
48
+ * beside other content, must be pausable). A real `<button>` whose text says what it will do — `pauseLabel` while
49
+ * playing, `playLabel` while paused — so its name is the action, never a pressed state that contradicts it.
50
+ * - **Paused while off screen.** An IntersectionObserver marks the frame `data-website-demo-offscreen`, and the
51
+ * engine's motion stylesheet pauses every keyframe animation inside it. A page with six demos animates only what is
52
+ * seen. Paused — by the visitor or off screen — a demo HOLDS what it shows, as a paused video does, and resumes
53
+ * from there.
54
+ * - **A still frame under reduced motion, or a STILL tempo.** The stylesheet removes the stage's animations
55
+ * (`prefers-reduced-motion: reduce`, or a site whose tempo plays no choreography) and hides the control, since
56
+ * there is nothing to pause. So AUTHOR THE STAGE'S BASE STYLES AS THE FINAL STILL FRAME and let the keyframes only
57
+ * add movement: the no-motion-first pattern every other motion rule here follows. A scenario driven by
58
+ * `useWebsiteMotionDemoTimeline` shows its last step, also when the preference changes while the page is open.
59
+ * - **One accessible description instead of fake UI read aloud.** The drawn interface is decorative to a screen
60
+ * reader (`aria-hidden`), and `label` names what it shows (`<figure aria-label>`), the way an image's `alt` would.
61
+ *
62
+ * Demos driven by JavaScript (a tab rotation, a typed message) read `useWebsiteMotionDemoPlaying()` and advance only
63
+ * while it is `true`: the same three conditions (not paused, on screen, motion allowed) gate them.
64
+ *
65
+ * Every word comes from the section's label pack: the engine owns no copy here.
66
+ *
67
+ * @example
68
+ * <WebsiteMotionDemo
69
+ * label={useWebsiteLabel('demo.label')}
70
+ * pauseLabel={useWebsiteLabel('demo.pause')}
71
+ * playLabel={useWebsiteLabel('demo.play')}
72
+ * className="board-demo"
73
+ * >
74
+ * <TaskBoardScreen />
75
+ * </WebsiteMotionDemo>
76
+ */
77
+ export interface WebsiteMotionDemoProps {
78
+ /** What the demo shows, for assistive technology — the demo's `alt`. From the label pack. */
79
+ label: string;
80
+ /** The control's text while the demo plays. From the label pack (e.g. "Pause the animation"). */
81
+ pauseLabel: string;
82
+ /** The control's text while the demo is paused. From the label pack (e.g. "Play the animation"). */
83
+ playLabel: string;
84
+ /** The drawn interface. Its base styles are the still frame; its keyframes add the movement. */
85
+ children: ReactNode;
86
+ /** The frame the drawing sits in (`WebsiteDemoFrameVariant`); none by default, for a site that frames it itself. */
87
+ frame?: WebsiteDemoFrameVariant;
88
+ className?: string;
89
+ style?: CSSProperties;
90
+ }
91
+
92
+ interface WebsiteMotionDemoPlaybackValue {
93
+ readonly playing: boolean;
94
+ /**
95
+ * Motion is not allowed at all (a reduced-motion preference, or a tempo that plays no choreography), as opposed to
96
+ * merely paused. A still demo shows its finished picture; a paused one holds what it shows.
97
+ */
98
+ readonly still: boolean;
99
+ }
100
+
101
+ const WebsiteMotionDemoPlaybackContext = createContext<WebsiteMotionDemoPlaybackValue | null>(null);
102
+
103
+ const REDUCED_MOTION_QUERY = '(prefers-reduced-motion: reduce)';
104
+
105
+ function subscribeToReducedMotion(onChange: () => void): () => void {
106
+ if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return () => undefined;
107
+ const query = window.matchMedia(REDUCED_MOTION_QUERY);
108
+ query.addEventListener('change', onChange);
109
+ return () => query.removeEventListener('change', onChange);
110
+ }
111
+
112
+ function readReducedMotion(): boolean {
113
+ if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;
114
+ return window.matchMedia(REDUCED_MOTION_QUERY).matches;
115
+ }
116
+
117
+ /**
118
+ * Whether the enclosing demo is playing right now: not paused by the visitor, on screen, and allowed to move (no
119
+ * reduced-motion preference, a tempo that plays choreography). `false` on the server and before the frame has been
120
+ * observed, so a JavaScript-driven demo renders its first frame and starts only once it is known to be seen.
121
+ *
122
+ * Throws outside a `WebsiteMotionDemo` or `WebsiteMotionDemoGroup`: a timer that ignored the pause control would be the WCAG 2.2.2 failure this
123
+ * primitive exists to prevent, so there is no silent default.
124
+ */
125
+ export function useWebsiteMotionDemoPlaying(): boolean {
126
+ const value = useContext(WebsiteMotionDemoPlaybackContext);
127
+ if (value === null) {
128
+ throw new Error('useWebsiteMotionDemoPlaying() must be called inside a <WebsiteMotionDemo> or a <WebsiteMotionDemoGroup>.');
129
+ }
130
+ return value.playing;
131
+ }
132
+
133
+ const VISUALLY_HIDDEN: CSSProperties = {
134
+ position: 'absolute',
135
+ width: 1,
136
+ height: 1,
137
+ padding: 0,
138
+ margin: -1,
139
+ overflow: 'hidden',
140
+ clip: 'rect(0, 0, 0, 0)',
141
+ whiteSpace: 'nowrap',
142
+ border: 0,
143
+ };
144
+
145
+ /** The control's glyph: two bars while playing (the action is "pause"), a triangle while paused. */
146
+ function DemoToggleGlyph({ paused }: { paused: boolean }): ReactNode {
147
+ return (
148
+ <svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true" focusable="false">
149
+ {paused ? (
150
+ <path d="M3 1.5v9l7.5-4.5z" fill="currentColor" />
151
+ ) : (
152
+ <path d="M2.5 1.5h2.5v9H2.5zM7 1.5h2.5v9H7z" fill="currentColor" />
153
+ )}
154
+ </svg>
155
+ );
156
+ }
157
+
158
+ /** What both frames share: the observed frame, the visitor's pause, and the playback flag their timers read. */
159
+ function useMotionDemoPlayback(): {
160
+ readonly attachFrame: (element: HTMLElement | null) => void;
161
+ readonly paused: boolean;
162
+ readonly toggle: () => void;
163
+ readonly playing: boolean;
164
+ readonly still: boolean;
165
+ readonly frameAttributes: Record<string, string>;
166
+ } {
167
+ const frameRef = useRef<HTMLElement | null>(null);
168
+ const [paused, setPaused] = useState(false);
169
+ /** `null` until the observer has answered: neither "on screen" nor "off screen" is known yet. */
170
+ const [onScreen, setOnScreen] = useState<boolean | null>(null);
171
+ const reducedMotion = useSyncExternalStore(subscribeToReducedMotion, readReducedMotion, () => false);
172
+ const tempo = resolveWebsiteMotionTokens(useWebsiteDesignTokens().motion).tempo;
173
+ const tempoMoves = WEBSITE_MOTION_TEMPO[tempo].playsChoreography;
174
+
175
+ useEffect(() => {
176
+ const frame = frameRef.current;
177
+ if (frame === null) return undefined;
178
+ if (typeof IntersectionObserver === 'undefined') {
179
+ // No observer (an old engine, a test environment): treat the demo as seen rather than freezing it forever.
180
+ setOnScreen(true);
181
+ return undefined;
182
+ }
183
+ const observer = new IntersectionObserver((entries) => {
184
+ const entry = entries[entries.length - 1];
185
+ if (entry !== undefined) setOnScreen(entry.isIntersecting);
186
+ });
187
+ observer.observe(frame);
188
+ return () => observer.disconnect();
189
+ }, []);
190
+
191
+ const toggle = useCallback(() => setPaused((current) => !current), []);
192
+ const attachFrame = useCallback((element: HTMLElement | null) => {
193
+ frameRef.current = element;
194
+ }, []);
195
+ const frameAttributes: Record<string, string> = { [WebsiteMotionDemoAttribute.FRAME]: '' };
196
+ if (paused) frameAttributes[WebsiteMotionDemoAttribute.PAUSED] = '';
197
+ if (onScreen === false) frameAttributes[WebsiteMotionDemoAttribute.OFFSCREEN] = '';
198
+ const still = reducedMotion || !tempoMoves;
199
+ return { attachFrame, paused, toggle, playing: !paused && onScreen === true && !still, still, frameAttributes };
200
+ }
201
+
202
+ /** The pause / play control both frames render: a real button whose text is the action it will take. */
203
+ function DemoToggle({ paused, toggle, pauseLabel, playLabel }: { paused: boolean; toggle: () => void; pauseLabel: string; playLabel: string }): ReactNode {
204
+ return (
205
+ <button type="button" onClick={toggle} title={paused ? playLabel : pauseLabel} {...{ [WebsiteMotionDemoAttribute.TOGGLE]: '' }}>
206
+ <DemoToggleGlyph paused={paused} />
207
+ <span style={VISUALLY_HIDDEN}>{paused ? playLabel : pauseLabel}</span>
208
+ </button>
209
+ );
210
+ }
211
+
212
+ export function WebsiteMotionDemo({ label, pauseLabel, playLabel, children, frame, className, style }: WebsiteMotionDemoProps): ReactNode {
213
+ const { attachFrame, paused, toggle, playing, still, frameAttributes } = useMotionDemoPlayback();
214
+ return (
215
+ <WebsiteMotionDemoPlaybackContext.Provider value={{ playing, still }}>
216
+ <figure ref={attachFrame} className={className} style={style} aria-label={label} {...frameAttributes} {...websiteDemoFrameAttributes(frame)}>
217
+ <div {...{ [WebsiteMotionDemoAttribute.STAGE]: '' }} aria-hidden="true" inert>
218
+ {children}
219
+ </div>
220
+ <DemoToggle paused={paused} toggle={toggle} pauseLabel={pauseLabel} playLabel={playLabel} />
221
+ </figure>
222
+ </WebsiteMotionDemoPlaybackContext.Provider>
223
+ );
224
+ }
225
+ WebsiteMotionDemo.displayName = 'WebsiteMotionDemo';
226
+
227
+ /**
228
+ * `WebsiteMotionDemoGroup` — ONE pause control for several small animated visuals that sit among readable content:
229
+ * a bento grid whose tiles each carry a tiny loop, an integrations marquee beside its accessible list. Unlike
230
+ * `WebsiteMotionDemo`, the group's own content stays readable; each drawn visual inside it goes in a
231
+ * `WebsiteMotionDemoStage`, which is what the stylesheet pauses and assistive technology skips. Same guarantees:
232
+ * paused off screen, still under reduced motion, `useWebsiteMotionDemoPlaying()` for JavaScript timers.
233
+ */
234
+ export interface WebsiteMotionDemoGroupProps {
235
+ /** The control's text while the visuals play. From the label pack. */
236
+ pauseLabel: string;
237
+ /** The control's text while they are paused. From the label pack. */
238
+ playLabel: string;
239
+ children: ReactNode;
240
+ className?: string;
241
+ style?: CSSProperties;
242
+ }
243
+
244
+ export function WebsiteMotionDemoGroup({ pauseLabel, playLabel, children, className, style }: WebsiteMotionDemoGroupProps): ReactNode {
245
+ const { attachFrame, paused, toggle, playing, still, frameAttributes } = useMotionDemoPlayback();
246
+ return (
247
+ <WebsiteMotionDemoPlaybackContext.Provider value={{ playing, still }}>
248
+ <div ref={attachFrame} className={className} style={style} {...frameAttributes}>
249
+ {/* First in reading order, before what it controls (the APG carousel pattern); drawn where the stylesheet places it. */}
250
+ <DemoToggle paused={paused} toggle={toggle} pauseLabel={pauseLabel} playLabel={playLabel} />
251
+ {children}
252
+ </div>
253
+ </WebsiteMotionDemoPlaybackContext.Provider>
254
+ );
255
+ }
256
+ WebsiteMotionDemoGroup.displayName = 'WebsiteMotionDemoGroup';
257
+
258
+ /**
259
+ * One drawn, animated visual inside a `WebsiteMotionDemoGroup`: decorative to assistive technology (the readable
260
+ * content beside it carries the meaning), and governed by the group's pause control. Refuses outside a group or a
261
+ * demo, so a loop can never escape the control.
262
+ */
263
+ export function WebsiteMotionDemoStage({ children, className }: { children: ReactNode; className?: string }): ReactNode {
264
+ if (useContext(WebsiteMotionDemoPlaybackContext) === null) {
265
+ throw new Error('<WebsiteMotionDemoStage> must be placed inside a <WebsiteMotionDemoGroup> or a <WebsiteMotionDemo>.');
266
+ }
267
+ return (
268
+ <div className={className} aria-hidden="true" inert {...{ [WebsiteMotionDemoAttribute.STAGE]: '' }}>
269
+ {children}
270
+ </div>
271
+ );
272
+ }
273
+ WebsiteMotionDemoStage.displayName = 'WebsiteMotionDemoStage';
274
+
275
+ /**
276
+ * A drawn demo's scenario as STEPS, each held for its duration (ms) before the next; returns the step to draw.
277
+ *
278
+ * The LAST step is the still frame: what the server renders, and what a visitor who asked for reduced motion (or a
279
+ * site whose tempo is STILL) sees, also when that preference changes while the page is open. Author the scenario so
280
+ * its last step is the finished picture (the item completed, the change approved): the loop opens by holding it,
281
+ * then replays from step 0.
282
+ *
283
+ * PAUSED is different from still. When the visitor presses the control, or the demo leaves the screen, the timeline
284
+ * HOLDS the step it is on, as a paused video does, and resumes from it.
285
+ *
286
+ * Steps advance only while the enclosing demo plays (`useWebsiteMotionDemoPlaying`), which gives the visitor's pause
287
+ * control (WCAG 2.2.2) authority over the JavaScript half of a demo. The CSS half is the stage's keyframe animations,
288
+ * which the engine's stylesheet pauses; a transition runs only when a step changes, so a held step starts none.
289
+ * Throws outside a demo, for the same reason the playback flag does, and for an empty scenario.
290
+ *
291
+ * The durations are read by value, so an inline array is fine: a re-render with the same numbers keeps the timer.
292
+ *
293
+ * @example
294
+ * ```tsx
295
+ * const step = useWebsiteMotionDemoTimeline([700, 900, 3200]); // typed → added → completed (the still frame)
296
+ * return <li className={step >= 2 ? 'task task--done' : 'task'}>…</li>;
297
+ * ```
298
+ */
299
+ export function useWebsiteMotionDemoTimeline(stepDurations: readonly number[]): number {
300
+ return useWebsiteMotionDemoTimelinePosition(stepDurations).step;
301
+ }
302
+
303
+ /**
304
+ * `useWebsiteMotionDemoTimeline`, with how many times the timeline has advanced. A step reached again on the next loop
305
+ * is a new VISIT of it, and `advances` tells the two apart where the step number cannot: the scenario player starts
306
+ * each visit's typing afresh by it, and a bespoke scene restarts anything it runs within a step the same way.
307
+ */
308
+ export function useWebsiteMotionDemoTimelinePosition(stepDurations: readonly number[]): { readonly step: number; readonly advances: number } {
309
+ const playback = useContext(WebsiteMotionDemoPlaybackContext);
310
+ if (playback === null) {
311
+ throw new Error('A demo timeline (useWebsiteMotionDemoTimeline, useWebsiteDemoScenario) must run inside a <WebsiteMotionDemo> or a <WebsiteMotionDemoGroup>.');
312
+ }
313
+ if (stepDurations.length === 0) throw new Error('A demo timeline needs at least one step.');
314
+ const { playing, still } = playback;
315
+ const last = stepDurations.length - 1;
316
+ const durationsKey = stepDurations.join(',');
317
+ const durations = useRef(stepDurations);
318
+ durations.current = stepDurations;
319
+ const [position, setPosition] = useState({ step: last, advances: 0 });
320
+ useEffect(() => {
321
+ if (!playing) return undefined;
322
+ const timer = setTimeout(
323
+ () => setPosition((current) => ({ step: (current.step + 1) % durations.current.length, advances: current.advances + 1 })),
324
+ durations.current[position.step] ?? 1000,
325
+ );
326
+ return () => clearTimeout(timer);
327
+ }, [playing, position, durationsKey]);
328
+ return still ? { step: last, advances: position.advances } : { step: Math.min(position.step, last), advances: position.advances };
329
+ }
330
+
331
+ /**
332
+ * The frame a drawn product sits in on the page (#2742): `STAGE`, `PLAIN` or `BACKDROP` (`WebsiteDemoFrameVariant`).
333
+ * A frame is also the SIZE CONTAINER a drawing measures itself against, so the drawing inside scales with the frame as
334
+ * one picture, and it takes its container's full width, so it never collapses to its padding inside a parent that
335
+ * centres its children. On an INVERSE band a stage and a backdrop take the product's night colours; a site sets
336
+ * `--website-kit-frame-background` on a frame to give it its own background.
337
+ *
338
+ * Give `WebsiteMotionDemo` a `frame`, or wrap a drawing that sits inside another block's demo group (a product tour's
339
+ * screen, a bento tile) in `WebsiteDemoFrame`. Like a stage, a standalone frame refuses outside a group or a demo: a
340
+ * drawing's loops must always answer a pause control.
341
+ */
342
+ export function websiteDemoFrameAttributes(variant: WebsiteDemoFrameVariant | undefined): Record<string, string> {
343
+ return variant === undefined ? {} : { [WebsiteMotionDemoAttribute.FRAME_VARIANT]: variant };
344
+ }
345
+
346
+ export function WebsiteDemoFrame({ variant, children }: { readonly variant: WebsiteDemoFrameVariant; readonly children: ReactNode }): ReactNode {
347
+ if (useContext(WebsiteMotionDemoPlaybackContext) === null) {
348
+ throw new Error('<WebsiteDemoFrame> must be placed inside a <WebsiteMotionDemoGroup> or a <WebsiteMotionDemo>.');
349
+ }
350
+ return <div {...websiteDemoFrameAttributes(variant)}>{children}</div>;
351
+ }
352
+ WebsiteDemoFrame.displayName = 'WebsiteDemoFrame';
353
+ ```
354
+
355
+ ## The hooks: atoms, parts and states
356
+
357
+ ## Import Origins
358
+
359
+ - `@wildo-ai/saas-website`
360
+
361
+ ## Source Excerpts
362
+
363
+ ### Origin Package: `@wildo-ai/saas-website`
364
+
365
+ ```typescript
366
+ *
367
+ * The hooks a drawn product carries (#2742): which atom an element is, which part of it, and which states it is in.
368
+ * Named once, in the import-free schema layer, so the kit's components and its stylesheet cannot drift, and the
369
+ * stylesheet learns them without importing a React component. A site's own rule targets the same names.
370
+ *
371
+ * - `WebsiteProductAtom` on an atom's root: `data-website-product="<atom>"`.
372
+ * - `WebsiteProductPart` on a part, named `<atom>.<part>`: `data-website-product-part="<part>"`.
373
+ * - `WebsiteProductState`, present while true: `data-website-product-<state>`.
374
+ */
375
+ import type { IndicatorVariant, InteractiveVariant, SelectableVariant } from '@wildo-ai/presets-components-models/public-runtime';
376
+
377
+ import type { WebsiteProductAvatar, WebsiteProductSeries } from '../design-tokens/website-design-tokens.shared.schemas';
378
+
379
+ /** What a drawn element IS: a window, a row, a chip. */
380
+ export enum WebsiteProductAtom {
381
+ AREA = 'area',
382
+ ARROW = 'arrow',
383
+ AVATAR = 'avatar',
384
+ BARS = 'bars',
385
+ BUBBLE = 'bubble',
386
+ BUTTON = 'button',
387
+ CAPTION = 'caption',
388
+ CARD = 'card',
389
+ CHAT = 'chat',
390
+ CHECK = 'check',
391
+ CHIP = 'chip',
392
+ COMMAND = 'command',
393
+ COMMAND_ITEM = 'command-item',
394
+ CONNECTION = 'connection',
395
+ DECISION = 'decision',
396
+ DONUT = 'donut',
397
+ FIELD = 'field',
398
+ GRAPH = 'graph',
399
+ HANDOFF = 'handoff',
400
+ HEADING = 'heading',
401
+ LEGEND = 'legend',
402
+ LINE = 'line',
403
+ LINES = 'lines',
404
+ LIST = 'list',
405
+ METER = 'meter',
406
+ NOTE = 'note',
407
+ PASSAGE = 'passage',
408
+ PASSAGES = 'passages',
409
+ RECORD = 'record',
410
+ ROW = 'row',
411
+ SEARCH = 'search',
412
+ STACK = 'stack',
413
+ STREAM = 'stream',
414
+ STREAM_ROW = 'stream-row',
415
+ SWAP = 'swap',
416
+ TERMINAL = 'terminal',
417
+ TERMINAL_CALL = 'terminal-call',
418
+ TOAST = 'toast',
419
+ TYPED = 'typed',
420
+ WINDOW = 'window',
421
+ }
422
+
423
+ /** A part of an atom, `<atom>.<part>`. */
424
+ export enum WebsiteProductPart {
425
+ AREA_FILL = 'area.fill',
426
+ AREA_LINE = 'area.line',
427
+ BARS_BAR = 'bars.bar',
428
+ CARD_TITLE = 'card.title',
429
+ CHAT_HEAD = 'chat.head',
430
+ CHAT_INPUT = 'chat.input',
431
+ CHAT_LOG = 'chat.log',
432
+ CHAT_MARK = 'chat.mark',
433
+ COMMAND_INPUT = 'command.input',
434
+ COMMAND_RESULTS = 'command.results',
435
+ CONNECTION_END = 'connection.end',
436
+ CONNECTION_LINK = 'connection.link',
437
+ CONNECTION_PACKET = 'connection.packet',
438
+ CONNECTION_STATUS = 'connection.status',
439
+ DECISION_ACTIONS = 'decision.actions',
440
+ DECISION_CHANGE = 'decision.change',
441
+ DECISION_RESULT = 'decision.result',
442
+ DECISION_SUBJECT = 'decision.subject',
443
+ DECISION_TITLE = 'decision.title',
444
+ FIELD_HINT = 'field.hint',
445
+ FIELD_INPUT = 'field.input',
446
+ FIELD_PLUS = 'field.plus',
447
+ GRAPH_EDGE_LABEL = 'graph.edge-label',
448
+ GRAPH_EDGES = 'graph.edges',
449
+ GRAPH_NODE = 'graph.node',
450
+ HANDOFF_SOURCE = 'handoff.source',
451
+ HANDOFF_TARGET = 'handoff.target',
452
+ HEADING_END = 'heading.end',
453
+ HEADING_META = 'heading.meta',
454
+ HEADING_TEXT = 'heading.text',
455
+ HEADING_TITLE = 'heading.title',
456
+ LINE_TEXT = 'line.text',
457
+ METER_FILL = 'meter.fill',
458
+ PASSAGE_QUOTE = 'passage.quote',
459
+ PASSAGE_SOURCE = 'passage.source',
460
+ RECORD_ACTION = 'record.action',
461
+ RECORD_ICON = 'record.icon',
462
+ RECORD_MAIN = 'record.main',
463
+ RECORD_STATUS = 'record.status',
464
+ ROW_CELL = 'row.cell',
465
+ ROW_DETAIL = 'row.detail',
466
+ ROW_META = 'row.meta',
467
+ ROW_TITLE = 'row.title',
468
+ STREAM_ROW_EVENT = 'stream-row.event',
469
+ STREAM_ROW_ICON = 'stream-row.icon',
470
+ STREAM_ROW_TIME = 'stream-row.time',
471
+ STREAM_HEAD = 'stream.head',
472
+ STREAM_LIVE = 'stream.live',
473
+ STREAM_ROWS = 'stream.rows',
474
+ TERMINAL_BAR = 'terminal.bar',
475
+ TERMINAL_CALLS = 'terminal.calls',
476
+ TERMINAL_DOTS = 'terminal.dots',
477
+ TERMINAL_SERVER = 'terminal.server',
478
+ WINDOW_BAR = 'window.bar',
479
+ WINDOW_BODY = 'window.body',
480
+ WINDOW_DOTS = 'window.dots',
481
+ WINDOW_MAIN = 'window.main',
482
+ WINDOW_MARK = 'window.mark',
483
+ WINDOW_RAIL = 'window.rail',
484
+ WINDOW_RAIL_ITEM = 'window.rail-item',
485
+ WINDOW_RAIL_SPACER = 'window.rail-spacer',
486
+ WINDOW_TITLE = 'window.title',
487
+ }
488
+
489
+ /** A state an atom is drawn in, present while true (`data-website-product-<state>`). */
490
+ export enum WebsiteProductState {
491
+ ACTIVE = 'active',
492
+ ARRIVING = 'arriving',
493
+ COLLAPSED = 'collapsed',
494
+ COMPACT = 'compact',
495
+ DECIDED = 'decided',
496
+ DETAILED = 'detailed',
497
+ DONE = 'done',
498
+ DRAWN = 'drawn',
499
+ FLOATING = 'floating',
500
+ FILLED = 'filled',
501
+ FOCUS = 'focus',
502
+ IN = 'in',
503
+ LANDED = 'landed',
504
+ LEADING = 'leading',
505
+ LINKED = 'linked',
506
+ NARROW = 'narrow',
507
+ OUTLINE = 'outline',
508
+ PRESSED = 'pressed',
509
+ RAILLESS = 'railless',
510
+ SHARED = 'shared',
511
+ SHOWN = 'shown',
512
+ SWAPPED = 'swapped',
513
+ TARGET = 'target',
514
+ TRAILING = 'trailing',
515
+ TYPING = 'typing',
516
+ WORKING = 'working',
517
+ }
518
+
519
+ /** The attribute naming an element's atom. */
520
+ export const WEBSITE_PRODUCT_ATOM_ATTRIBUTE = 'data-website-product';
521
+ /** The attribute naming an element's part. */
522
+ export const WEBSITE_PRODUCT_PART_ATTRIBUTE = 'data-website-product-part';
523
+
524
+ /** The attribute a state is drawn by. */
525
+ export function websiteProductStateAttribute(state: WebsiteProductState): string {
526
+ return `data-website-product-${state}`;
527
+ }
528
+
529
+ /** Who speaks in a drawn conversation. */
530
+ export enum WebsiteProductSpeaker {
531
+ /** The person using the product: their bubble sits at the end, in the product's colour. */
532
+ PERSON = 'person',
533
+ /** The product's agent: its bubble sits at the start, on a surface. */
534
+ AGENT = 'agent',
535
+ }
536
+
537
+ /** The surface a line sits on. */
538
+ export enum WebsiteProductLineSurface {
539
+ /** A card's surface, edged: an item standing on a tinted area. */
540
+ RAISED = 'raised',
541
+ /** A recessed well: an item inside a card. */
542
+ SUNKEN = 'sunken',
543
+ }
544
+
545
+ /** How an item that appears during a scenario arrives. */
546
+ export enum WebsiteProductArrival {
547
+ /** It is there from the start, faint, and comes up to full strength (a list being confirmed one by one). */
548
+ FADE = 'fade',
549
+ /** It is absent, then slides in from the start (a list being produced one by one). */
550
+ SLIDE = 'slide',
551
+ }
552
+
553
+ /**
554
+ * The attributes that carry a VALUE rather than a presence: which variant of an application vocabulary an element
555
+ * is drawn in. Each value is a member of an enum (named per attribute), so the stylesheet draws one rule per member
556
+ * and a member added to that enum is drawn or refused by a test, never silently unstyled.
557
+ */
558
+ export enum WebsiteProductValueAttribute {
559
+ /** A chip's status: the application's `IndicatorVariant` (`WebsiteProductStatus`). */
560
+ STATUS = 'data-website-status',
561
+ /** A button's variant: the application's `InteractiveVariant` (`WebsiteProductAction`). */
562
+ INTERACTIVE = 'data-website-interactive',
563
+ /** How a window's rail draws its active item: the application's `SelectableVariant` (`WebsiteProductSelection`). */
564
+ SELECTABLE = 'data-website-selectable',
565
+ /** Who says a bubble: `WebsiteProductSpeaker`. */
566
+ SPEAKER = 'data-website-speaker',
567
+ /** An avatar's colour slot: `WebsiteProductAvatar`. */
568
+ AVATAR = 'data-website-avatar',
569
+ /** A legend dot's series: `WebsiteProductSeries`. */
570
+ SERIES = 'data-website-series',
571
+ /** An item line's surface: `WebsiteProductLineSurface`. */
572
+ SURFACE = 'data-website-surface',
573
+ /** How an item line arrives on its step: `WebsiteProductArrival`. */
574
+ ARRIVAL = 'data-website-arrival',
575
+ }
576
+
577
+ /**
578
+ * Which enum each value attribute takes, so an element cannot carry a value its attribute does not draw (a series
579
+ * number on a chip's status). Type-only: the vocabulary stays import-free at runtime.
580
+ */
581
+ export interface WebsiteProductValues {
582
+ readonly [WebsiteProductValueAttribute.STATUS]?: IndicatorVariant;
583
+ readonly [WebsiteProductValueAttribute.INTERACTIVE]?: InteractiveVariant;
584
+ readonly [WebsiteProductValueAttribute.SELECTABLE]?: SelectableVariant;
585
+ readonly [WebsiteProductValueAttribute.SPEAKER]?: WebsiteProductSpeaker;
586
+ readonly [WebsiteProductValueAttribute.AVATAR]?: WebsiteProductAvatar;
587
+ readonly [WebsiteProductValueAttribute.SERIES]?: WebsiteProductSeries;
588
+ readonly [WebsiteProductValueAttribute.SURFACE]?: WebsiteProductLineSurface;
589
+ readonly [WebsiteProductValueAttribute.ARRIVAL]?: WebsiteProductArrival;
590
+ }
591
+
592
+ /** The attributes an element carries: its atom or its part, every state that is true, and its values. */
593
+ export function websiteProductHooks(hooks: {
594
+ readonly atom?: WebsiteProductAtom;
595
+ readonly part?: WebsiteProductPart;
596
+ readonly states?: Partial<Readonly<Record<WebsiteProductState, boolean | undefined>>>;
597
+ readonly values?: WebsiteProductValues;
598
+ }): Record<string, string> {
599
+ const attributes: Record<string, string> = {};
600
+ if (hooks.atom !== undefined) attributes[WEBSITE_PRODUCT_ATOM_ATTRIBUTE] = hooks.atom;
601
+ if (hooks.part !== undefined) attributes[WEBSITE_PRODUCT_PART_ATTRIBUTE] = hooks.part;
602
+ for (const [state, on] of Object.entries(hooks.states ?? {}) as [WebsiteProductState, boolean | undefined][]) {
603
+ if (on === true) attributes[websiteProductStateAttribute(state)] = '';
604
+ }
605
+ for (const [attribute, value] of Object.entries(hooks.values ?? {}) as [WebsiteProductValueAttribute, string | undefined][]) {
606
+ if (value !== undefined) attributes[attribute] = value;
607
+ }
608
+ return attributes;
609
+ }
610
+
611
+ /** The selector of an atom, for a stylesheet: `[data-website-product='<atom>']`. */
612
+ export function websiteProductAtomSelector(atom: WebsiteProductAtom): string {
613
+ return `[${WEBSITE_PRODUCT_ATOM_ATTRIBUTE}='${atom}']`;
614
+ }
615
+
616
+ /** The selector of a part: `[data-website-product-part='<part>']`. */
617
+ export function websiteProductPartSelector(part: WebsiteProductPart): string {
618
+ return `[${WEBSITE_PRODUCT_PART_ATTRIBUTE}='${part}']`;
619
+ }
620
+
621
+ /** The selector of a state: `[data-website-product-<state>]`. */
622
+ export function websiteProductStateSelector(state: WebsiteProductState): string {
623
+ return `[${websiteProductStateAttribute(state)}]`;
624
+ }
625
+ /** The selector of a value: `[data-website-<attribute>='<value>']`, or of any value when none is given. */
626
+ export function websiteProductValueSelector<Attribute extends WebsiteProductValueAttribute>(
627
+ attribute: Attribute,
628
+ value?: NonNullable<WebsiteProductValues[Attribute]>,
629
+ ): string {
630
+ return value === undefined ? `[${attribute}]` : `[${attribute}='${value}']`;
631
+ }
632
+ ```
633
+
634
+ ## The atoms
635
+
636
+ ## Import Origins
637
+
638
+ - `@wildo-ai/saas-website`
639
+
640
+ ## Source Excerpts
641
+
642
+ ### Origin Package: `@wildo-ai/saas-website`
643
+
644
+ ```tsx
645
+ *
646
+ * The drawn-product kit (#2742): the atoms a demo draws the application with. A drawing of the product, not the
647
+ * product: no state, no events, no focusable element, and every word comes from the site's labels (pass the words in,
648
+ * as `children` or a `title`). The demo stage around a drawing hides it from assistive technology, makes it inert, and
649
+ * holds it still when the visitor pauses, scrolls away, or prefers reduced motion.
650
+ *
651
+ * Each atom's look is the application's: colours from `--website-product-*` (derived from the application's palette),
652
+ * its character from the personality (corners from `shape`, spacing from `density`, a selection from
653
+ * `selectionEmphasis`, hairlines from `edgeWeight`), and variants in the application's own vocabulary: a chip's status
654
+ * is `WebsiteProductStatus` (`IndicatorVariant`), a button's variant `WebsiteProductAction` (`InteractiveVariant`), a
655
+ * rail's selection `WebsiteProductSelection` (`SelectableVariant`). A state an atom shows (a row done, a button
656
+ * pressed, a field being typed in) is a prop; the transition between two states runs on the site's tempo, so a
657
+ * scenario changes props step by step and the kit animates the difference. Its hooks are `WebsiteProductAtom`,
658
+ * `WebsiteProductPart` and `WebsiteProductState`.
659
+ *
660
+ * - `WebsiteProductWindow`: the application window, a title bar and an optional icon rail beside the screen.
661
+ * - `WebsiteProductStack`, `WebsiteProductHeading`: a screen's column, and its title, meta line and trailing slot.
662
+ * - `WebsiteProductList`, `WebsiteProductRow`, `WebsiteProductRowTitle`, `WebsiteProductRowMeta`, `WebsiteProductRowCell`:
663
+ * a list of records.
664
+ * - `WebsiteProductRecord`: one record as a card (a request, an invoice): an icon, its title, a status, an action.
665
+ * - `WebsiteProductCheck`, `WebsiteProductChip`, `WebsiteProductSwap`, `WebsiteProductAvatarDisc`, `WebsiteProductMeter`,
666
+ * `WebsiteProductButton`.
667
+ * - `WebsiteProductField` with `WebsiteProductTyped`: a field, focused on the `typing` step, showing the words typed so
668
+ * far (a scenario's player passes them: `useWebsiteDemoScenario`).
669
+ * - `WebsiteProductToast`: a notice that slides in.
670
+ */
671
+
672
+ /**
673
+ * A drawn button's variant, in the application's own vocabulary (`InteractiveVariant`), under the website's name so a
674
+ * site needs no other package to draw one (as `WebsiteProductStatus` is for a chip).
675
+ */
676
+ export const WebsiteProductAction: typeof InteractiveVariant = InteractiveVariant;
677
+ export type WebsiteProductAction = InteractiveVariant;
678
+
679
+ /** How a rail draws its selected item, in the application's own vocabulary (`SelectableVariant`). */
680
+ export const WebsiteProductSelection: typeof SelectableVariant = SelectableVariant;
681
+ export type WebsiteProductSelection = SelectableVariant;
682
+
683
+ /** One icon in a window's rail: the area it stands for, drawn by the site's own icon. */
684
+ export interface WebsiteProductRailItem {
685
+ readonly key: string;
686
+ readonly icon: ReactNode;
687
+ /** The area the screen belongs to. */
688
+ readonly active?: boolean;
689
+ }
690
+
691
+ /** A window's rail: the workspace mark, the areas, and the items pinned to its foot (a profile, settings). */
692
+ export interface WebsiteProductRail {
693
+ /** The image the workspace mark shows, usually the brand's symbol. */
694
+ readonly markSrc?: string;
695
+ readonly items: readonly WebsiteProductRailItem[];
696
+ readonly end?: readonly WebsiteProductRailItem[];
697
+ /** How the active item is drawn; FILLED by default, the application's sidebar if it draws its selection otherwise. */
698
+ readonly selection?: SelectableVariant;
699
+ }
700
+
701
+ export interface WebsiteProductWindowProps {
702
+ /** What the title bar names: the screen. */
703
+ readonly title: ReactNode;
704
+ readonly rail?: WebsiteProductRail;
705
+ readonly children: ReactNode;
706
+ }
707
+
708
+ function RailItem({ item }: { item: WebsiteProductRailItem }): ReactNode {
709
+ return <span {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_RAIL_ITEM, states: { [WebsiteProductState.ACTIVE]: item.active } })}>{item.icon}</span>;
710
+ }
711
+
712
+ export function WebsiteProductWindow({ title, rail, children }: WebsiteProductWindowProps): ReactNode {
713
+ const markStyle = rail?.markSrc === undefined ? undefined : ({ '--website-kit-mark': `url(${JSON.stringify(rail.markSrc)})` } as CSSProperties);
714
+ return (
715
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.WINDOW })}>
716
+ <div {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_BAR })}>
717
+ <span {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_DOTS })}>
718
+ <i />
719
+ <i />
720
+ <i />
721
+ </span>
722
+ <span {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_TITLE })}>{title}</span>
723
+ <span />
724
+ </div>
725
+ <div {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_BODY, states: { [WebsiteProductState.RAILLESS]: rail === undefined } })}>
726
+ {rail !== undefined && (
727
+ <span {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_RAIL, values: { [WebsiteProductValueAttribute.SELECTABLE]: rail.selection ?? SelectableVariant.FILLED } })}>
728
+ <span {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_MARK })} style={markStyle} />
729
+ {rail.items.map((item) => (
730
+ <RailItem key={item.key} item={item} />
731
+ ))}
732
+ <span {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_RAIL_SPACER })} />
733
+ {(rail.end ?? []).map((item) => (
734
+ <RailItem key={item.key} item={item} />
735
+ ))}
736
+ </span>
737
+ )}
738
+ <div {...websiteProductHooks({ part: WebsiteProductPart.WINDOW_MAIN })}>{children}</div>
739
+ </div>
740
+ </div>
741
+ );
742
+ }
743
+ WebsiteProductWindow.displayName = 'WebsiteProductWindow';
744
+
745
+ /**
746
+ * A screen's column: its heading, lists and fields, one under the other. `narrow`: at most a reading width. The gap is
747
+ * 1em, scaled by the personality's density. A scene that wants another sets `--website-kit-stack-gap` on the stack
748
+ * itself (`.my-scene > [data-website-product='stack']`): every stack sets its own, so a value set on an ancestor never
749
+ * reaches it, and a nested stack never inherits its parent's.
750
+ */
751
+ export function WebsiteProductStack({ narrow, children }: { readonly narrow?: boolean; readonly children: ReactNode }): ReactNode {
752
+ return <div {...websiteProductHooks({ atom: WebsiteProductAtom.STACK, states: { [WebsiteProductState.NARROW]: narrow } })}>{children}</div>;
753
+ }
754
+ WebsiteProductStack.displayName = 'WebsiteProductStack';
755
+
756
+ /**
757
+ * A screen's heading: its title, a meta line under it, and a slot at its end (a status, a button). The end sits on the
758
+ * meta line's level when there is one, and centred on the title otherwise. `compact`: a heading inside a screen (a
759
+ * panel's) rather than the screen's own title, smaller and untracked.
760
+ */
761
+ export function WebsiteProductHeading({ title, meta, end, compact }: { readonly title: ReactNode; readonly meta?: ReactNode; readonly end?: ReactNode; readonly compact?: boolean }): ReactNode {
762
+ return (
763
+ <header {...websiteProductHooks({ atom: WebsiteProductAtom.HEADING, states: { [WebsiteProductState.COMPACT]: compact } })}>
764
+ <div {...websiteProductHooks({ part: WebsiteProductPart.HEADING_TEXT })}>
765
+ <p {...websiteProductHooks({ part: WebsiteProductPart.HEADING_TITLE })}>{title}</p>
766
+ {meta !== undefined && <p {...websiteProductHooks({ part: WebsiteProductPart.HEADING_META })}>{meta}</p>}
767
+ </div>
768
+ {end !== undefined && <div {...websiteProductHooks({ part: WebsiteProductPart.HEADING_END })}>{end}</div>}
769
+ </header>
770
+ );
771
+ }
772
+ WebsiteProductHeading.displayName = 'WebsiteProductHeading';
773
+
774
+ /** A bordered list of rows. `compact`: tighter rows, for a short list of people or accounts rather than of work. */
775
+ export function WebsiteProductList({ compact, children }: { readonly compact?: boolean; readonly children: ReactNode }): ReactNode {
776
+ return <ul {...websiteProductHooks({ atom: WebsiteProductAtom.LIST, states: { [WebsiteProductState.COMPACT]: compact } })}>{children}</ul>;
777
+ }
778
+ WebsiteProductList.displayName = 'WebsiteProductList';
779
+
780
+ export interface WebsiteProductRowProps {
781
+ /** The record is done: its title is struck through. */
782
+ readonly done?: boolean;
783
+ /** The row arrives during the scenario: collapsed until `shown`, then highlighted as new. */
784
+ readonly arriving?: boolean;
785
+ readonly shown?: boolean;
786
+ /** The row's first column is a `WebsiteProductCheck` (or another fixed-width lead), so the title takes the rest. */
787
+ readonly leading?: boolean;
788
+ readonly children: ReactNode;
789
+ }
790
+
791
+ /**
792
+ * One record of a list. Its children are its columns, left to right: the title takes the free width (the second
793
+ * column after a `leading` check, else the first), every other column its content. A column the row may drop when the
794
+ * drawing is narrow is `trailing` (`WebsiteProductRowMeta`, `WebsiteProductRowCell`, a chip, an avatar).
795
+ */
796
+ export function WebsiteProductRow({ done, arriving, shown, leading, children }: WebsiteProductRowProps): ReactNode {
797
+ return (
798
+ <li
799
+ {...websiteProductHooks({
800
+ atom: WebsiteProductAtom.ROW,
801
+ states: {
802
+ [WebsiteProductState.DONE]: done,
803
+ [WebsiteProductState.ARRIVING]: arriving,
804
+ [WebsiteProductState.IN]: arriving === true && shown === true,
805
+ [WebsiteProductState.LEADING]: leading,
806
+ },
807
+ })}
808
+ >
809
+ {children}
810
+ </li>
811
+ );
812
+ }
813
+ WebsiteProductRow.displayName = 'WebsiteProductRow';
814
+
815
+ /** A row's title. With a `detail`, a second, quieter line under it (a customer's scope, a todo's list). */
816
+ export function WebsiteProductRowTitle({ detail, children }: { readonly detail?: ReactNode; readonly children: ReactNode }): ReactNode {
817
+ return (
818
+ <span {...websiteProductHooks({ part: WebsiteProductPart.ROW_TITLE, states: { [WebsiteProductState.DETAILED]: detail !== undefined } })}>
819
+ {children}
820
+ {detail !== undefined && <small {...websiteProductHooks({ part: WebsiteProductPart.ROW_DETAIL })}>{detail}</small>}
821
+ </span>
822
+ );
823
+ }
824
+ WebsiteProductRowTitle.displayName = 'WebsiteProductRowTitle';
825
+
826
+ /** A row's secondary text (a due day, a count). `trailing`: the row drops it when the drawing is narrow. */
827
+ export function WebsiteProductRowMeta({ trailing, children }: { readonly trailing?: boolean; readonly children: ReactNode }): ReactNode {
828
+ return <span {...websiteProductHooks({ part: WebsiteProductPart.ROW_META, states: { [WebsiteProductState.TRAILING]: trailing } })}>{children}</span>;
829
+ }
830
+ WebsiteProductRowMeta.displayName = 'WebsiteProductRowMeta';
831
+
832
+ /** A column of a row that is none of the others (a button, a figure). `trailing`: dropped when the drawing is narrow. */
833
+ export function WebsiteProductRowCell({ trailing, children }: { readonly trailing?: boolean; readonly children: ReactNode }): ReactNode {
834
+ return <span {...websiteProductHooks({ part: WebsiteProductPart.ROW_CELL, states: { [WebsiteProductState.TRAILING]: trailing } })}>{children}</span>;
835
+ }
836
+ WebsiteProductRowCell.displayName = 'WebsiteProductRowCell';
837
+
838
+ export interface WebsiteProductRecordProps {
839
+ readonly icon?: ReactNode;
840
+ readonly title: ReactNode;
841
+ readonly detail?: ReactNode;
842
+ /** Its status (a chip, or a `WebsiteProductSwap` of two). */
843
+ readonly status?: ReactNode;
844
+ /** Its action (a `WebsiteProductButton`); dropped when the drawing is narrow. */
845
+ readonly action?: ReactNode;
846
+ /** The record the scenario is acting on: outlined in the product's colour (the same state as a line's `focus`). */
847
+ readonly focus?: boolean;
848
+ }
849
+
850
+ /** One record as a card: an icon, its title and detail, its status and its action, in one row. */
851
+ export function WebsiteProductRecord({ icon, title, detail, status, action, focus }: WebsiteProductRecordProps): ReactNode {
852
+ return (
853
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.RECORD, states: { [WebsiteProductState.FOCUS]: focus } })}>
854
+ <span {...websiteProductHooks({ part: WebsiteProductPart.RECORD_ICON })}>{icon}</span>
855
+ <span {...websiteProductHooks({ part: WebsiteProductPart.RECORD_MAIN })}>
856
+ <strong>{title}</strong>
857
+ {detail !== undefined && <small>{detail}</small>}
858
+ </span>
859
+ {status !== undefined && <span {...websiteProductHooks({ part: WebsiteProductPart.RECORD_STATUS })}>{status}</span>}
860
+ {action !== undefined && <span {...websiteProductHooks({ part: WebsiteProductPart.RECORD_ACTION, states: { [WebsiteProductState.TRAILING]: true } })}>{action}</span>}
861
+ </div>
862
+ );
863
+ }
864
+ WebsiteProductRecord.displayName = 'WebsiteProductRecord';
865
+
866
+ /** A checkbox, drawn. `glyph` is the site's check icon. */
867
+ export function WebsiteProductCheck({ done, glyph }: { readonly done?: boolean; readonly glyph?: ReactNode }): ReactNode {
868
+ return <span {...websiteProductHooks({ atom: WebsiteProductAtom.CHECK, states: { [WebsiteProductState.DONE]: done } })}>{glyph}</span>;
869
+ }
870
+ WebsiteProductCheck.displayName = 'WebsiteProductCheck';
871
+
872
+ export interface WebsiteProductChipProps {
873
+ /** The application's indicator variant; NEUTRAL by default. */
874
+ readonly status?: IndicatorVariant;
875
+ /** Drawn as an outline on no fill (a rule, a scope). */
876
+ readonly outline?: boolean;
877
+ /** `trailing`: the row drops it when the drawing is narrow. */
878
+ readonly trailing?: boolean;
879
+ readonly icon?: ReactNode;
880
+ readonly children: ReactNode;
881
+ }
882
+
883
+ export function WebsiteProductChip({ status = IndicatorVariant.NEUTRAL, outline, trailing, icon, children }: WebsiteProductChipProps): ReactNode {
884
+ return (
885
+ <span {...websiteProductHooks({ atom: WebsiteProductAtom.CHIP, states: { [WebsiteProductState.OUTLINE]: outline, [WebsiteProductState.TRAILING]: trailing }, values: { [WebsiteProductValueAttribute.STATUS]: status } })}>
886
+ {icon}
887
+ {children}
888
+ </span>
889
+ );
890
+ }
891
+ WebsiteProductChip.displayName = 'WebsiteProductChip';
892
+
893
+ /**
894
+ * Two things in one place, the second replacing the first on the step the scenario `swapped` them: a status that
895
+ * changes (draft → posted), drawn as both chips stacked so the change does not move anything around it.
896
+ */
897
+ export function WebsiteProductSwap({ from, to, swapped }: { readonly from: ReactNode; readonly to: ReactNode; readonly swapped?: boolean }): ReactNode {
898
+ return (
899
+ <span {...websiteProductHooks({ atom: WebsiteProductAtom.SWAP, states: { [WebsiteProductState.SWAPPED]: swapped } })}>
900
+ {from}
901
+ {to}
902
+ </span>
903
+ );
904
+ }
905
+ WebsiteProductSwap.displayName = 'WebsiteProductSwap';
906
+
907
+ const AVATAR_SLOTS: readonly WebsiteProductAvatar[] = Object.values(WebsiteProductAvatar);
908
+
909
+ /** The avatar a person's initials draw: chosen from the initials, so a person keeps their colour across a page. */
910
+ export function websiteProductAvatarFor(initials: string): WebsiteProductAvatar {
911
+ const sum = Array.from(initials).reduce((total, character) => total + character.charCodeAt(0), 0);
912
+ return AVATAR_SLOTS[sum % AVATAR_SLOTS.length] ?? WebsiteProductAvatar.FIRST;
913
+ }
914
+
915
+ /** A person's initials on their avatar colour. `trailing`: the row drops it when the drawing is narrow. */
916
+ export function WebsiteProductAvatarDisc({ initials, trailing }: { readonly initials: string; readonly trailing?: boolean }): ReactNode {
917
+ return (
918
+ <span {...websiteProductHooks({ atom: WebsiteProductAtom.AVATAR, states: { [WebsiteProductState.TRAILING]: trailing }, values: { [WebsiteProductValueAttribute.AVATAR]: websiteProductAvatarFor(initials) } })}>
919
+ {initials}
920
+ </span>
921
+ );
922
+ }
923
+ WebsiteProductAvatarDisc.displayName = 'WebsiteProductAvatarDisc';
924
+
925
+ /** A progress bar, `value` from 0 to 1. */
926
+ export function WebsiteProductMeter({ value }: { readonly value: number }): ReactNode {
927
+ const share = `${Math.round(Math.min(Math.max(value, 0), 1) * 1000) / 10}%`;
928
+ return (
929
+ <span {...websiteProductHooks({ atom: WebsiteProductAtom.METER })}>
930
+ <span {...websiteProductHooks({ part: WebsiteProductPart.METER_FILL })} style={{ '--website-kit-meter': share } as CSSProperties} />
931
+ </span>
932
+ );
933
+ }
934
+ WebsiteProductMeter.displayName = 'WebsiteProductMeter';
935
+
936
+ export interface WebsiteProductButtonProps {
937
+ /** The application's interactive variant: PRIMARY, SECONDARY (the default) or OUTLINE (an action already taken). */
938
+ readonly variant?: InteractiveVariant.PRIMARY | InteractiveVariant.SECONDARY | InteractiveVariant.OUTLINE;
939
+ /** Drawn mid-press: the step on which the scenario's visitor clicks it. */
940
+ readonly pressed?: boolean;
941
+ readonly icon?: ReactNode;
942
+ readonly children: ReactNode;
943
+ }
944
+
945
+ export function WebsiteProductButton({ variant = InteractiveVariant.SECONDARY, pressed, icon, children }: WebsiteProductButtonProps): ReactNode {
946
+ return (
947
+ <span {...websiteProductHooks({ atom: WebsiteProductAtom.BUTTON, states: { [WebsiteProductState.PRESSED]: pressed }, values: { [WebsiteProductValueAttribute.INTERACTIVE]: variant } })}>
948
+ {icon}
949
+ {children}
950
+ </span>
951
+ );
952
+ }
953
+ WebsiteProductButton.displayName = 'WebsiteProductButton';
954
+
955
+ /**
956
+ * The words in a field. While the field is `typing`, a scenario's player (`useWebsiteDemoScenario`) passes them as they
957
+ * are typed, one character at a time; otherwise they are simply there.
958
+ */
959
+ export function WebsiteProductTyped({ children }: { readonly children: ReactNode }): ReactNode {
960
+ return <span {...websiteProductHooks({ atom: WebsiteProductAtom.TYPED })}>{children}</span>;
961
+ }
962
+ WebsiteProductTyped.displayName = 'WebsiteProductTyped';
963
+
964
+ export interface WebsiteProductFieldProps {
965
+ /** What the field says before anything is typed. */
966
+ readonly hint: ReactNode;
967
+ /** What is typed into it. */
968
+ readonly text: ReactNode;
969
+ /** The typing step: the field is focused, and `text` is what has been typed so far. */
970
+ readonly typing?: boolean;
971
+ /** Filled in, without the typing: the field as it reads once written (a static step). */
972
+ readonly filled?: boolean;
973
+ /** The mark before the field (a plus for quick add). */
974
+ readonly lead?: ReactNode;
975
+ }
976
+
977
+ export function WebsiteProductField({ hint, text, typing, filled, lead }: WebsiteProductFieldProps): ReactNode {
978
+ return (
979
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.FIELD, states: { [WebsiteProductState.TYPING]: typing, [WebsiteProductState.FILLED]: filled } })}>
980
+ {lead !== undefined && <span {...websiteProductHooks({ part: WebsiteProductPart.FIELD_PLUS })}>{lead}</span>}
981
+ <span {...websiteProductHooks({ part: WebsiteProductPart.FIELD_INPUT })}>
982
+ <WebsiteProductTyped>{text}</WebsiteProductTyped>
983
+ <span {...websiteProductHooks({ part: WebsiteProductPart.FIELD_HINT })}>{hint}</span>
984
+ </span>
985
+ </div>
986
+ );
987
+ }
988
+ WebsiteProductField.displayName = 'WebsiteProductField';
989
+
990
+ export function WebsiteProductToast({ shown, icon, children }: { readonly shown?: boolean; readonly icon?: ReactNode; readonly children: ReactNode }): ReactNode {
991
+ return (
992
+ <p {...websiteProductHooks({ atom: WebsiteProductAtom.TOAST, states: { [WebsiteProductState.SHOWN]: shown } })}>
993
+ {icon}
994
+ {children}
995
+ </p>
996
+ );
997
+ }
998
+ WebsiteProductToast.displayName = 'WebsiteProductToast';
999
+ ```
1000
+
1001
+ ## The panels: conversation, knowledge, activity, commands
1002
+
1003
+ ## Import Origins
1004
+
1005
+ - `@wildo-ai/saas-website`
1006
+
1007
+ ## Source Excerpts
1008
+
1009
+ ### Origin Package: `@wildo-ai/saas-website`
1010
+
1011
+ ```tsx
1012
+ *
1013
+ * The drawn-product kit's panels (#2742): the conversational, knowledge and activity surfaces a demo draws, built from
1014
+ * the same rules as the atoms (words passed in, states as props, colours from `--website-product-*`).
1015
+ *
1016
+ * - `WebsiteProductCaption`: a small muted line with an icon (the scope of a search, a team's name).
1017
+ * - `WebsiteProductChat` with `WebsiteProductBubble` and `WebsiteProductTypingBubble`: a conversation with an agent.
1018
+ * - `WebsiteProductDecision`: a request the person decides (an approval): what is asked, the change it makes, the
1019
+ * actions, and the result once decided.
1020
+ * - `WebsiteProductSearch`, `WebsiteProductNote`, `WebsiteProductPassages` and `WebsiteProductPassage`: a question,
1021
+ * the agent working on it, and the quoted passages it answers from, each naming its source.
1022
+ * - `WebsiteProductStream` with `WebsiteProductStreamRow`: a live activity feed on the night panel's colours (the brand's
1023
+ * dark, as the site adjusts its dark band).
1024
+ * - `WebsiteProductTerminal` with `WebsiteProductTerminalCall`: calls a client makes, on the dark.
1025
+ * - `WebsiteProductCommandPalette` with `WebsiteProductCommandItem`: a command palette and the query typed into it.
1026
+ */
1027
+
1028
+ export function WebsiteProductCaption({ icon, children }: { readonly icon?: ReactNode; readonly children: ReactNode }): ReactNode {
1029
+ return (
1030
+ <p {...websiteProductHooks({ atom: WebsiteProductAtom.CAPTION })}>
1031
+ {icon}
1032
+ {children}
1033
+ </p>
1034
+ );
1035
+ }
1036
+ WebsiteProductCaption.displayName = 'WebsiteProductCaption';
1037
+
1038
+ export interface WebsiteProductChatProps {
1039
+ /** The agent's mark, drawn in the product's colour. */
1040
+ readonly mark: ReactNode;
1041
+ readonly name: ReactNode;
1042
+ /** What the agent is working in (a workspace, a list). */
1043
+ readonly context: ReactNode;
1044
+ /** The composer's placeholder. */
1045
+ readonly input: ReactNode;
1046
+ /** The log: bubbles, a typing bubble, decision cards, in order. */
1047
+ readonly children: ReactNode;
1048
+ }
1049
+
1050
+ export function WebsiteProductChat({ mark, name, context, input, children }: WebsiteProductChatProps): ReactNode {
1051
+ return (
1052
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.CHAT })}>
1053
+ <header {...websiteProductHooks({ part: WebsiteProductPart.CHAT_HEAD })}>
1054
+ <span {...websiteProductHooks({ part: WebsiteProductPart.CHAT_MARK })}>{mark}</span>
1055
+ <span>
1056
+ <strong>{name}</strong>
1057
+ <small>{context}</small>
1058
+ </span>
1059
+ </header>
1060
+ <div {...websiteProductHooks({ part: WebsiteProductPart.CHAT_LOG })}>{children}</div>
1061
+ <p {...websiteProductHooks({ part: WebsiteProductPart.CHAT_INPUT })}>{input}</p>
1062
+ </div>
1063
+ );
1064
+ }
1065
+ WebsiteProductChat.displayName = 'WebsiteProductChat';
1066
+
1067
+ export function WebsiteProductBubble({ from, shown, children }: { readonly from: WebsiteProductSpeaker; readonly shown?: boolean; readonly children: ReactNode }): ReactNode {
1068
+ return (
1069
+ <p {...websiteProductHooks({ atom: WebsiteProductAtom.BUBBLE, states: { [WebsiteProductState.SHOWN]: shown }, values: { [WebsiteProductValueAttribute.SPEAKER]: from } })}>
1070
+ {children}
1071
+ </p>
1072
+ );
1073
+ }
1074
+ WebsiteProductBubble.displayName = 'WebsiteProductBubble';
1075
+
1076
+ /** The agent composing a reply: three dots, drawn only on the step it is `shown`, taking no room otherwise. */
1077
+ export function WebsiteProductTypingBubble({ shown }: { readonly shown?: boolean }): ReactNode {
1078
+ return (
1079
+ <p {...websiteProductHooks({ atom: WebsiteProductAtom.BUBBLE, states: { [WebsiteProductState.TYPING]: true, [WebsiteProductState.SHOWN]: shown } })}>
1080
+ <i />
1081
+ <i />
1082
+ <i />
1083
+ </p>
1084
+ );
1085
+ }
1086
+ WebsiteProductTypingBubble.displayName = 'WebsiteProductTypingBubble';
1087
+
1088
+ export interface WebsiteProductDecisionProps {
1089
+ readonly icon?: ReactNode;
1090
+ /** What kind of request this is ("Needs your approval"). */
1091
+ readonly title: ReactNode;
1092
+ /** What it is about (the record). */
1093
+ readonly subject: ReactNode;
1094
+ /** The field the request changes, and the value it proposes. */
1095
+ readonly field: ReactNode;
1096
+ readonly value: ReactNode;
1097
+ /** The buttons (`WebsiteProductButton`), drawn until the request is decided. */
1098
+ readonly actions: ReactNode;
1099
+ /** What is shown once decided, with its icon. */
1100
+ readonly result: ReactNode;
1101
+ readonly resultIcon?: ReactNode;
1102
+ readonly shown?: boolean;
1103
+ readonly decided?: boolean;
1104
+ /** Sized for a small tile rather than a conversation. */
1105
+ readonly compact?: boolean;
1106
+ }
1107
+
1108
+ export function WebsiteProductDecision({ icon, title, subject, field, value, actions, result, resultIcon, shown, decided, compact }: WebsiteProductDecisionProps): ReactNode {
1109
+ return (
1110
+ <div
1111
+ {...websiteProductHooks({ atom: WebsiteProductAtom.DECISION, states: { [WebsiteProductState.SHOWN]: shown, [WebsiteProductState.DECIDED]: decided, [WebsiteProductState.COMPACT]: compact } })}
1112
+ >
1113
+ <p {...websiteProductHooks({ part: WebsiteProductPart.DECISION_TITLE })}>
1114
+ {icon}
1115
+ {title}
1116
+ </p>
1117
+ <p {...websiteProductHooks({ part: WebsiteProductPart.DECISION_SUBJECT })}>{subject}</p>
1118
+ <p {...websiteProductHooks({ part: WebsiteProductPart.DECISION_CHANGE })}>
1119
+ <span>{field}</span>
1120
+ <ins>{value}</ins>
1121
+ </p>
1122
+ <p {...websiteProductHooks({ part: WebsiteProductPart.DECISION_ACTIONS })}>{actions}</p>
1123
+ <p {...websiteProductHooks({ part: WebsiteProductPart.DECISION_RESULT })}>
1124
+ {resultIcon}
1125
+ {result}
1126
+ </p>
1127
+ </div>
1128
+ );
1129
+ }
1130
+ WebsiteProductDecision.displayName = 'WebsiteProductDecision';
1131
+
1132
+ /**
1133
+ * A search box. `text` is the question as typed so far: a scenario's player passes it one character at a time on the
1134
+ * typing step (`moment.typed(ref)`), and `typing` marks that step.
1135
+ */
1136
+ export function WebsiteProductSearch({ icon, text, typing }: { readonly icon?: ReactNode; readonly text: ReactNode; readonly typing?: boolean }): ReactNode {
1137
+ return (
1138
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.SEARCH, states: { [WebsiteProductState.TYPING]: typing } })}>
1139
+ {icon}
1140
+ <WebsiteProductTyped>{text}</WebsiteProductTyped>
1141
+ </div>
1142
+ );
1143
+ }
1144
+ WebsiteProductSearch.displayName = 'WebsiteProductSearch';
1145
+
1146
+ export interface WebsiteProductNoteProps {
1147
+ readonly shown?: boolean;
1148
+ /** The agent is working: the note pulses while shown ("Searching your documents…"). */
1149
+ readonly working?: boolean;
1150
+ /** Takes no room until shown, rather than keeping its place while hidden. */
1151
+ readonly collapsed?: boolean;
1152
+ readonly children: ReactNode;
1153
+ }
1154
+
1155
+ /** A muted line that appears on its step: what the agent is doing, or what it found. */
1156
+ export function WebsiteProductNote({ shown, working, collapsed, children }: WebsiteProductNoteProps): ReactNode {
1157
+ return (
1158
+ <p
1159
+ {...websiteProductHooks({ atom: WebsiteProductAtom.NOTE, states: { [WebsiteProductState.SHOWN]: shown, [WebsiteProductState.WORKING]: working, [WebsiteProductState.COLLAPSED]: collapsed } })}
1160
+ >
1161
+ {children}
1162
+ </p>
1163
+ );
1164
+ }
1165
+ WebsiteProductNote.displayName = 'WebsiteProductNote';
1166
+
1167
+ /** Inside `WebsiteProductPassages`, a passage is one of its items. */
1168
+ const PassageListContext = createContext(false);
1169
+
1170
+ export function WebsiteProductPassages({ children }: { readonly children: ReactNode }): ReactNode {
1171
+ return (
1172
+ <ol {...websiteProductHooks({ atom: WebsiteProductAtom.PASSAGES })}>
1173
+ <PassageListContext.Provider value>{children}</PassageListContext.Provider>
1174
+ </ol>
1175
+ );
1176
+ }
1177
+ WebsiteProductPassages.displayName = 'WebsiteProductPassages';
1178
+
1179
+ export interface WebsiteProductPassageProps {
1180
+ readonly icon?: ReactNode;
1181
+ /** The document the passage is quoted from. */
1182
+ readonly source: ReactNode;
1183
+ /** A chip at the end of the source line (the document's status). */
1184
+ readonly status?: ReactNode;
1185
+ readonly quote: ReactNode;
1186
+ readonly shown?: boolean;
1187
+ }
1188
+
1189
+ /** A quoted passage and the document it is from: an item of `WebsiteProductPassages`, or a passage on its own. */
1190
+ export function WebsiteProductPassage({ icon, source, status, quote, shown }: WebsiteProductPassageProps): ReactNode {
1191
+ const Element = useContext(PassageListContext) ? 'li' : 'div';
1192
+ return (
1193
+ <Element {...websiteProductHooks({ atom: WebsiteProductAtom.PASSAGE, states: { [WebsiteProductState.SHOWN]: shown } })}>
1194
+ <p {...websiteProductHooks({ part: WebsiteProductPart.PASSAGE_SOURCE })}>
1195
+ {icon}
1196
+ {source}
1197
+ {status}
1198
+ </p>
1199
+ <blockquote {...websiteProductHooks({ part: WebsiteProductPart.PASSAGE_QUOTE })}>{quote}</blockquote>
1200
+ </Element>
1201
+ );
1202
+ }
1203
+ WebsiteProductPassage.displayName = 'WebsiteProductPassage';
1204
+
1205
+ export interface WebsiteProductStreamProps {
1206
+ readonly title: ReactNode;
1207
+ /** The live mark's word ("Live"). */
1208
+ readonly live: ReactNode;
1209
+ /** `WebsiteProductStreamRow`s, oldest first. */
1210
+ readonly children: ReactNode;
1211
+ }
1212
+
1213
+ export function WebsiteProductStream({ title, live, children }: WebsiteProductStreamProps): ReactNode {
1214
+ return (
1215
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.STREAM })}>
1216
+ <header {...websiteProductHooks({ part: WebsiteProductPart.STREAM_HEAD })}>
1217
+ <span>{title}</span>
1218
+ <span {...websiteProductHooks({ part: WebsiteProductPart.STREAM_LIVE })}>
1219
+ <i />
1220
+ {live}
1221
+ </span>
1222
+ </header>
1223
+ <ol {...websiteProductHooks({ part: WebsiteProductPart.STREAM_ROWS })}>{children}</ol>
1224
+ </div>
1225
+ );
1226
+ }
1227
+ WebsiteProductStream.displayName = 'WebsiteProductStream';
1228
+
1229
+ export interface WebsiteProductStreamRowProps {
1230
+ readonly icon: ReactNode;
1231
+ /** What happened. */
1232
+ readonly event: ReactNode;
1233
+ /** Who did it, or on what. */
1234
+ readonly detail: ReactNode;
1235
+ readonly time: ReactNode;
1236
+ readonly shown?: boolean;
1237
+ }
1238
+
1239
+ export function WebsiteProductStreamRow({ icon, event, detail, time, shown }: WebsiteProductStreamRowProps): ReactNode {
1240
+ return (
1241
+ <li {...websiteProductHooks({ atom: WebsiteProductAtom.STREAM_ROW, states: { [WebsiteProductState.SHOWN]: shown } })}>
1242
+ <span {...websiteProductHooks({ part: WebsiteProductPart.STREAM_ROW_ICON })}>{icon}</span>
1243
+ <span {...websiteProductHooks({ part: WebsiteProductPart.STREAM_ROW_EVENT })}>
1244
+ {event}
1245
+ <small>{detail}</small>
1246
+ </span>
1247
+ <time {...websiteProductHooks({ part: WebsiteProductPart.STREAM_ROW_TIME })}>{time}</time>
1248
+ </li>
1249
+ );
1250
+ }
1251
+ WebsiteProductStreamRow.displayName = 'WebsiteProductStreamRow';
1252
+
1253
+ export interface WebsiteProductTerminalProps {
1254
+ /** The client making the calls. */
1255
+ readonly client: ReactNode;
1256
+ /** The server it calls. */
1257
+ readonly server: ReactNode;
1258
+ /** `WebsiteProductTerminalCall`s, in order. */
1259
+ readonly children: ReactNode;
1260
+ }
1261
+
1262
+ export function WebsiteProductTerminal({ client, server, children }: WebsiteProductTerminalProps): ReactNode {
1263
+ return (
1264
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.TERMINAL })}>
1265
+ <p {...websiteProductHooks({ part: WebsiteProductPart.TERMINAL_BAR })}>
1266
+ <span {...websiteProductHooks({ part: WebsiteProductPart.TERMINAL_DOTS })}>
1267
+ <i />
1268
+ <i />
1269
+ <i />
1270
+ </span>
1271
+ <span>{client}</span>
1272
+ <span {...websiteProductHooks({ part: WebsiteProductPart.TERMINAL_SERVER })}>{server}</span>
1273
+ </p>
1274
+ <ol {...websiteProductHooks({ part: WebsiteProductPart.TERMINAL_CALLS })}>{children}</ol>
1275
+ </div>
1276
+ );
1277
+ }
1278
+ WebsiteProductTerminal.displayName = 'WebsiteProductTerminal';
1279
+
1280
+ /** One call: what was called (`code`), and what it returned. */
1281
+ export function WebsiteProductTerminalCall({ code, result, shown }: { readonly code: ReactNode; readonly result: ReactNode; readonly shown?: boolean }): ReactNode {
1282
+ return (
1283
+ <li {...websiteProductHooks({ atom: WebsiteProductAtom.TERMINAL_CALL, states: { [WebsiteProductState.SHOWN]: shown } })}>
1284
+ <code>{code}</code>
1285
+ <span>{result}</span>
1286
+ </li>
1287
+ );
1288
+ }
1289
+ WebsiteProductTerminalCall.displayName = 'WebsiteProductTerminalCall';
1290
+
1291
+ export interface WebsiteProductCommandPaletteProps {
1292
+ /** The shortcut that opens it. */
1293
+ readonly shortcut: ReactNode;
1294
+ /** The query as typed so far: a scenario's player passes it one character at a time on the `typing` step (`moment.typed(ref)`). */
1295
+ readonly query: ReactNode;
1296
+ readonly typing?: boolean;
1297
+ /** `WebsiteProductCommandItem`s. */
1298
+ readonly children: ReactNode;
1299
+ }
1300
+
1301
+ export function WebsiteProductCommandPalette({ shortcut, query, typing, children }: WebsiteProductCommandPaletteProps): ReactNode {
1302
+ return (
1303
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.COMMAND })}>
1304
+ <p {...websiteProductHooks({ part: WebsiteProductPart.COMMAND_INPUT, states: { [WebsiteProductState.TYPING]: typing } })}>
1305
+ <kbd>{shortcut}</kbd>
1306
+ <WebsiteProductTyped>{query}</WebsiteProductTyped>
1307
+ </p>
1308
+ <ul {...websiteProductHooks({ part: WebsiteProductPart.COMMAND_RESULTS })}>{children}</ul>
1309
+ </div>
1310
+ );
1311
+ }
1312
+ WebsiteProductCommandPalette.displayName = 'WebsiteProductCommandPalette';
1313
+
1314
+ /** One result: its words and a hint, faint until `shown`, highlighted when `active`. */
1315
+ export function WebsiteProductCommandItem({ hint, shown, active, children }: { readonly hint?: ReactNode; readonly shown?: boolean; readonly active?: boolean; readonly children: ReactNode }): ReactNode {
1316
+ return (
1317
+ <li {...websiteProductHooks({ atom: WebsiteProductAtom.COMMAND_ITEM, states: { [WebsiteProductState.SHOWN]: shown, [WebsiteProductState.ACTIVE]: active } })}>
1318
+ {children}
1319
+ {hint !== undefined && <small>{hint}</small>}
1320
+ </li>
1321
+ );
1322
+ }
1323
+ WebsiteProductCommandItem.displayName = 'WebsiteProductCommandItem';
1324
+ ```
1325
+
1326
+ ## The figures: cards, charts, a graph, item lines, a handoff, a connection
1327
+
1328
+ ## Import Origins
1329
+
1330
+ - `@wildo-ai/saas-website`
1331
+
1332
+ ## Source Excerpts
1333
+
1334
+ ### Origin Package: `@wildo-ai/saas-website`
1335
+
1336
+ ```tsx
1337
+ *
1338
+ * The drawn-product kit's figures (#2742): cards, charts, a dependency graph, item lines and the shapes of a handoff
1339
+ * and a connection, under the same rules as the atoms (words passed in, states as props, colours from
1340
+ * `--website-product-*`, transitions on the tempo).
1341
+ *
1342
+ * - `WebsiteProductCard`: a titled card, inside a window (`floating` false) or alone on a frame (`floating`).
1343
+ * - `WebsiteProductDonut` with `WebsiteProductLegend`, `WebsiteProductBars`, `WebsiteProductArea`: charts that draw
1344
+ * themselves on their `drawn` step. Each slice and legend item names its `WebsiteProductSeries`, so the drawing says
1345
+ * which value is emphasised rather than inheriting an order.
1346
+ * - `WebsiteProductGraph`: records linked by dependencies, its edges drawn on `drawn`, its target filled on `done`.
1347
+ * - `WebsiteProductLine`: one item of a small list (a reminder rule, an occurrence, a goal, a sign-in method),
1348
+ * raised or sunken, arriving by fading up from faint or by sliding in.
1349
+ * - `WebsiteProductHandoff` with `WebsiteProductArrow`: one thing becoming another (an email becoming a todo).
1350
+ * - `WebsiteProductConnection`: two parties linked, with what they share travelling along the link.
1351
+ */
1352
+
1353
+ /** A card in a window, or alone on a demo frame. */
1354
+ export function WebsiteProductCard({ title, floating, children }: { readonly title?: ReactNode; readonly floating?: boolean; readonly children: ReactNode }): ReactNode {
1355
+ return (
1356
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.CARD, states: { [WebsiteProductState.FLOATING]: floating } })}>
1357
+ {title !== undefined && <p {...websiteProductHooks({ part: WebsiteProductPart.CARD_TITLE })}>{title}</p>}
1358
+ {children}
1359
+ </div>
1360
+ );
1361
+ }
1362
+ WebsiteProductCard.displayName = 'WebsiteProductCard';
1363
+
1364
+ /**
1365
+ * One slice of a donut: its share and the series it is drawn in. Shares are WEIGHTS, read against their total, so a
1366
+ * drawing may give percents, counts or fractions (a bar's 0 to 1); a negative share counts as none.
1367
+ */
1368
+ export interface WebsiteProductDonutSlice {
1369
+ readonly share: number;
1370
+ readonly series: WebsiteProductSeries;
1371
+ }
1372
+
1373
+ /** The conic gradient a donut's slices draw, each from where the last ended; `none` when nothing has a share. */
1374
+ export function websiteProductDonutGradient(slices: readonly WebsiteProductDonutSlice[]): string {
1375
+ const weights = slices.map(({ share }) => Math.max(share, 0));
1376
+ const total = weights.reduce((sum, weight) => sum + weight, 0);
1377
+ if (total === 0) return 'none';
1378
+ let from = 0;
1379
+ const stops = slices.map(({ series }, index) => {
1380
+ const to = from + weights[index]!;
1381
+ const stop = `${websiteProductCssVar('series', series)} ${(from * 100) / total}% ${(to * 100) / total}%`;
1382
+ from = to;
1383
+ return stop;
1384
+ });
1385
+ return `conic-gradient(${stops.join(', ')})`;
1386
+ }
1387
+
1388
+ export function WebsiteProductDonut({ slices, drawn }: { readonly slices: readonly WebsiteProductDonutSlice[]; readonly drawn?: boolean }): ReactNode {
1389
+ return (
1390
+ <div
1391
+ {...websiteProductHooks({ atom: WebsiteProductAtom.DONUT, states: { [WebsiteProductState.DRAWN]: drawn } })}
1392
+ style={{ '--website-kit-donut': websiteProductDonutGradient(slices) } as CSSProperties}
1393
+ />
1394
+ );
1395
+ }
1396
+ WebsiteProductDonut.displayName = 'WebsiteProductDonut';
1397
+
1398
+ export interface WebsiteProductLegendItem {
1399
+ readonly key: string;
1400
+ readonly series: WebsiteProductSeries;
1401
+ readonly label: ReactNode;
1402
+ }
1403
+
1404
+ export function WebsiteProductLegend({ items }: { readonly items: readonly WebsiteProductLegendItem[] }): ReactNode {
1405
+ return (
1406
+ <ul {...websiteProductHooks({ atom: WebsiteProductAtom.LEGEND })}>
1407
+ {items.map((item) => (
1408
+ <li key={item.key}>
1409
+ <i {...websiteProductHooks({ values: { [WebsiteProductValueAttribute.SERIES]: item.series } })} />
1410
+ {item.label}
1411
+ </li>
1412
+ ))}
1413
+ </ul>
1414
+ );
1415
+ }
1416
+ WebsiteProductLegend.displayName = 'WebsiteProductLegend';
1417
+
1418
+ /** One bar: its height as a share of the chart (0 to 1) and its label. */
1419
+ export interface WebsiteProductBar {
1420
+ readonly key: string;
1421
+ readonly value: number;
1422
+ readonly label: ReactNode;
1423
+ }
1424
+
1425
+ export function WebsiteProductBars({ bars, drawn }: { readonly bars: readonly WebsiteProductBar[]; readonly drawn?: boolean }): ReactNode {
1426
+ return (
1427
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.BARS, states: { [WebsiteProductState.DRAWN]: drawn } })} style={{ '--website-kit-bars': bars.length } as CSSProperties}>
1428
+ {bars.map((bar, index) => (
1429
+ <span key={bar.key} {...websiteProductHooks({ part: WebsiteProductPart.BARS_BAR })} style={{ '--website-kit-bar': `${Math.round(Math.min(Math.max(bar.value, 0), 1) * 1000) / 10}%`, '--website-kit-bar-index': index } as CSSProperties}>
1430
+ <i />
1431
+ <small>{bar.label}</small>
1432
+ </span>
1433
+ ))}
1434
+ </div>
1435
+ );
1436
+ }
1437
+ WebsiteProductBars.displayName = 'WebsiteProductBars';
1438
+
1439
+ /** The area chart's drawing box, in its own units: the line spans it, leaving room above the highest point. */
1440
+ const AREA_WIDTH = 300;
1441
+ const AREA_HEIGHT = 90;
1442
+ const AREA_HEADROOM = 8;
1443
+
1444
+ /**
1445
+ * The line and the filled area through `points`, scaled to the drawing box, highest point at the top. An area draws
1446
+ * amounts: a negative one counts as zero, and zero sits on the bottom edge, the area's baseline. One point is a level
1447
+ * line across the box; no points draw nothing.
1448
+ */
1449
+ export function websiteProductAreaPaths(points: readonly number[]): { readonly line: string; readonly area: string } {
1450
+ if (points.length === 0) return { line: '', area: '' };
1451
+ const amounts = (points.length === 1 ? [points[0]!, points[0]!] : points).map((value) => Math.max(value, 0));
1452
+ const highest = Math.max(...amounts);
1453
+ const coordinates = amounts.map((value, index) => [
1454
+ Math.round((index / (amounts.length - 1)) * AREA_WIDTH),
1455
+ Math.round(AREA_HEIGHT - (highest === 0 ? 0 : (value / highest) * (AREA_HEIGHT - AREA_HEADROOM))),
1456
+ ]);
1457
+ const line = coordinates.map(([x, y], index) => `${index === 0 ? 'M' : 'L'}${x} ${y}`).join(' ');
1458
+ return { line, area: `${line} L${AREA_WIDTH} ${AREA_HEIGHT} L0 ${AREA_HEIGHT} Z` };
1459
+ }
1460
+
1461
+ export function WebsiteProductArea({ points, drawn }: { readonly points: readonly number[]; readonly drawn?: boolean }): ReactNode {
1462
+ const { line, area } = websiteProductAreaPaths(points);
1463
+ return (
1464
+ <svg {...websiteProductHooks({ atom: WebsiteProductAtom.AREA, states: { [WebsiteProductState.DRAWN]: drawn } })} viewBox={`0 0 ${AREA_WIDTH} ${AREA_HEIGHT}`} preserveAspectRatio="none">
1465
+ <path {...websiteProductHooks({ part: WebsiteProductPart.AREA_FILL })} d={area} />
1466
+ <path {...websiteProductHooks({ part: WebsiteProductPart.AREA_LINE })} d={line} pathLength={1} />
1467
+ </svg>
1468
+ );
1469
+ }
1470
+ WebsiteProductArea.displayName = 'WebsiteProductArea';
1471
+
1472
+ /** A record in a graph, placed in the graph's own units. */
1473
+ export interface WebsiteProductGraphNode {
1474
+ readonly key: string;
1475
+ readonly label: ReactNode;
1476
+ readonly x: number;
1477
+ readonly y: number;
1478
+ /** The record the others lead to: filled once the graph is `done`. */
1479
+ readonly target?: boolean;
1480
+ }
1481
+
1482
+ export interface WebsiteProductGraphProps {
1483
+ /** The graph's box, in the units the nodes are placed in; its ratio is the drawing's. */
1484
+ readonly width: number;
1485
+ readonly height: number;
1486
+ readonly nodes: readonly WebsiteProductGraphNode[];
1487
+ /** Each edge as the indexes of the two nodes it joins, drawn as an S-curve from the first to the second. */
1488
+ readonly edges: readonly (readonly [number, number])[];
1489
+ /** A word written on the link, at a point in the graph's units. */
1490
+ readonly edgeLabel?: { readonly text: ReactNode; readonly x: number; readonly y: number };
1491
+ readonly drawn?: boolean;
1492
+ readonly done?: boolean;
1493
+ }
1494
+
1495
+ const percent = (value: number, of: number): string => `${(value / of) * 100}%`;
1496
+
1497
+ export function WebsiteProductGraph({ width, height, nodes, edges, edgeLabel, drawn, done }: WebsiteProductGraphProps): ReactNode {
1498
+ return (
1499
+ <div
1500
+ {...websiteProductHooks({ atom: WebsiteProductAtom.GRAPH, states: { [WebsiteProductState.DRAWN]: drawn, [WebsiteProductState.DONE]: done } })}
1501
+ // The ratio is the graph's geometry, not a style: nodes sit in percents of this box and the edges' viewBox has
1502
+ // the same ratio, so a box of another shape would part the nodes from their edges. Hence inline, not themable.
1503
+ style={{ aspectRatio: `${width} / ${height}` }}
1504
+ >
1505
+ <svg {...websiteProductHooks({ part: WebsiteProductPart.GRAPH_EDGES })} viewBox={`0 0 ${width} ${height}`}>
1506
+ {edges.map(([from, to], index) => {
1507
+ const start = nodes[from];
1508
+ const end = nodes[to];
1509
+ if (start === undefined || end === undefined) return null;
1510
+ const middle = (start.x + end.x) / 2;
1511
+ return <path key={`${index}:${from}-${to}`} d={`M${start.x} ${start.y} C ${middle} ${start.y}, ${middle} ${end.y}, ${end.x} ${end.y}`} pathLength={1} style={{ '--website-kit-edge-index': index } as CSSProperties} />;
1512
+ })}
1513
+ </svg>
1514
+ {nodes.map((node) => (
1515
+ <span
1516
+ key={node.key}
1517
+ {...websiteProductHooks({ part: WebsiteProductPart.GRAPH_NODE, states: { [WebsiteProductState.TARGET]: node.target } })}
1518
+ style={{ left: percent(node.x, width), top: percent(node.y, height) }}
1519
+ >
1520
+ {node.label}
1521
+ </span>
1522
+ ))}
1523
+ {edgeLabel !== undefined && (
1524
+ <span {...websiteProductHooks({ part: WebsiteProductPart.GRAPH_EDGE_LABEL })} style={{ left: percent(edgeLabel.x, width), top: percent(edgeLabel.y, height) }}>
1525
+ {edgeLabel.text}
1526
+ </span>
1527
+ )}
1528
+ </div>
1529
+ );
1530
+ }
1531
+ WebsiteProductGraph.displayName = 'WebsiteProductGraph';
1532
+
1533
+ export interface WebsiteProductLineProps {
1534
+ readonly icon?: ReactNode;
1535
+ /** A last column (a chip, a figure, a button). */
1536
+ readonly trailing?: ReactNode;
1537
+ readonly surface?: WebsiteProductLineSurface;
1538
+ /** The line takes part in the scenario: it `arrival`s on the step it is `shown`. Absent: it is simply there. */
1539
+ readonly arrival?: WebsiteProductArrival;
1540
+ readonly shown?: boolean;
1541
+ /** The line the scenario is acting on: outlined in the product's colour. */
1542
+ readonly focus?: boolean;
1543
+ readonly children: ReactNode;
1544
+ }
1545
+
1546
+ export function WebsiteProductLine({ icon, trailing, surface = WebsiteProductLineSurface.RAISED, arrival, shown, focus, children }: WebsiteProductLineProps): ReactNode {
1547
+ // A list item inside `WebsiteProductLines`, a plain block alone: never an orphan list item.
1548
+ const Element = useContext(LinesContext) ? 'li' : 'div';
1549
+ return (
1550
+ <Element
1551
+ {...websiteProductHooks({
1552
+ atom: WebsiteProductAtom.LINE,
1553
+ // An icon takes a fixed first column, so the text keeps the free width and a trailing item sits at the end.
1554
+ states: { [WebsiteProductState.LEADING]: icon !== undefined, [WebsiteProductState.SHOWN]: shown, [WebsiteProductState.FOCUS]: focus },
1555
+ values: { [WebsiteProductValueAttribute.SURFACE]: surface, [WebsiteProductValueAttribute.ARRIVAL]: arrival },
1556
+ })}
1557
+ >
1558
+ {icon}
1559
+ <span {...websiteProductHooks({ part: WebsiteProductPart.LINE_TEXT })}>{children}</span>
1560
+ {trailing}
1561
+ </Element>
1562
+ );
1563
+ }
1564
+ WebsiteProductLine.displayName = 'WebsiteProductLine';
1565
+
1566
+ const LinesContext = createContext(false);
1567
+
1568
+ /** A list of `WebsiteProductLine`s. */
1569
+ export function WebsiteProductLines({ children }: { readonly children: ReactNode }): ReactNode {
1570
+ return (
1571
+ <ul {...websiteProductHooks({ atom: WebsiteProductAtom.LINES })}>
1572
+ <LinesContext.Provider value>{children}</LinesContext.Provider>
1573
+ </ul>
1574
+ );
1575
+ }
1576
+ WebsiteProductLines.displayName = 'WebsiteProductLines';
1577
+
1578
+ /** The arrow between the two sides of a handoff: faint until `shown`. */
1579
+ export function WebsiteProductArrow({ icon, shown }: { readonly icon: ReactNode; readonly shown?: boolean }): ReactNode {
1580
+ return (
1581
+ <span {...websiteProductHooks({ atom: WebsiteProductAtom.ARROW, states: { [WebsiteProductState.SHOWN]: shown } })}>
1582
+ {icon}
1583
+ </span>
1584
+ );
1585
+ }
1586
+ WebsiteProductArrow.displayName = 'WebsiteProductArrow';
1587
+
1588
+ export interface WebsiteProductHandoffProps {
1589
+ /** What arrives (an email): its icon and its words. */
1590
+ readonly source: ReactNode;
1591
+ readonly sourceIcon?: ReactNode;
1592
+ /** What it becomes (a todo). */
1593
+ readonly target: ReactNode;
1594
+ readonly targetLead?: ReactNode;
1595
+ readonly arrow: ReactNode;
1596
+ /** The source has been sent: the arrow lights up. */
1597
+ readonly sent?: boolean;
1598
+ /** The target has landed: it slides in. */
1599
+ readonly landed?: boolean;
1600
+ }
1601
+
1602
+ export function WebsiteProductHandoff({ source, sourceIcon, target, targetLead, arrow, sent, landed }: WebsiteProductHandoffProps): ReactNode {
1603
+ return (
1604
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.HANDOFF, states: { [WebsiteProductState.LANDED]: landed } })}>
1605
+ <p {...websiteProductHooks({ part: WebsiteProductPart.HANDOFF_SOURCE })}>
1606
+ {sourceIcon}
1607
+ <span>{source}</span>
1608
+ </p>
1609
+ <WebsiteProductArrow icon={arrow} shown={sent} />
1610
+ <p {...websiteProductHooks({ part: WebsiteProductPart.HANDOFF_TARGET })}>
1611
+ {targetLead}
1612
+ <span>{target}</span>
1613
+ </p>
1614
+ </div>
1615
+ );
1616
+ }
1617
+ WebsiteProductHandoff.displayName = 'WebsiteProductHandoff';
1618
+
1619
+ export interface WebsiteProductConnectionProps {
1620
+ /** The two parties, each usually an avatar disc and a name. */
1621
+ readonly from: ReactNode;
1622
+ readonly to: ReactNode;
1623
+ /** What travels along the link once `shared` (a scope, a document). */
1624
+ readonly packet?: ReactNode;
1625
+ /** A line under both parties (the link's status chip). */
1626
+ readonly status?: ReactNode;
1627
+ readonly linked?: boolean;
1628
+ readonly shared?: boolean;
1629
+ }
1630
+
1631
+ export function WebsiteProductConnection({ from, to, packet, status, linked, shared }: WebsiteProductConnectionProps): ReactNode {
1632
+ return (
1633
+ <div {...websiteProductHooks({ atom: WebsiteProductAtom.CONNECTION, states: { [WebsiteProductState.LINKED]: linked, [WebsiteProductState.SHARED]: shared } })}>
1634
+ <span {...websiteProductHooks({ part: WebsiteProductPart.CONNECTION_END })}>{from}</span>
1635
+ <span {...websiteProductHooks({ part: WebsiteProductPart.CONNECTION_LINK })}>
1636
+ <i />
1637
+ {packet !== undefined && <span {...websiteProductHooks({ part: WebsiteProductPart.CONNECTION_PACKET })}>{packet}</span>}
1638
+ </span>
1639
+ <span {...websiteProductHooks({ part: WebsiteProductPart.CONNECTION_END })}>{to}</span>
1640
+ {status !== undefined && <span {...websiteProductHooks({ part: WebsiteProductPart.CONNECTION_STATUS })}>{status}</span>}
1641
+ </div>
1642
+ );
1643
+ }
1644
+ WebsiteProductConnection.displayName = 'WebsiteProductConnection';
1645
+ ```
1646
+
1647
+ ## Playing a scenario: the demo as data
1648
+
1649
+ Write what the demo shows as a scenario (`defineWebsiteDemoScenario`): its items, what each starts as, and steps of
1650
+ closed actions held for beats of the site's tempo. Draw the items with the atoms above and read each one's state from
1651
+ `useWebsiteDemoScenario(scenario, { prefix })`; declare the section's words with `websiteDemoScenarioSlots`. Never
1652
+ compute a step's state by hand: the player derives every moment, and the last step is the still frame.
1653
+
1654
+ A scenario bound to a resource (`resource`) is checked against the application when the task lands
1655
+ (`check:website-demo-facts`, and again at the end of the build): the resource must exist, every value must be one its
1656
+ schema allows, and a step that changes a field must name the operation that writes it (an update when it names none).
1657
+ The check finds the scenarios `defineWebsiteDemoScenario` made, exported or not, in every module the site's root config
1658
+ (`website-root.config.ts`) and its sections barrel (`sections/index.ts`) import; the player only takes those, so define
1659
+ every scenario with it and keep its module on that import graph.
1660
+
1661
+ ## Import Origins
1662
+
1663
+ - `@wildo-ai/saas-website`
1664
+
1665
+ ## Source Excerpts
1666
+
1667
+ ### Origin Package: `@wildo-ai/saas-website`
1668
+
1669
+ ```typescript
1670
+ *
1671
+ * A drawn product demo as DATA (#2742): the items it shows, what each starts as, and the steps that change them. The
1672
+ * site draws the items with the drawn-product kit and reads each one's state from the moment the player computes, so a
1673
+ * demo has no hand-written step arithmetic, the still frame is a computed value, and the words it reads are derived.
1674
+ *
1675
+ * - **Items.** Each item is a ref (`item1`, `capture`, `card`) the drawing names. It starts with the kit states it is
1676
+ * in (`WebsiteProductState`: done, shown, …), the field values it carries, and the words it reads (label slots).
1677
+ * - **Steps.** The scenario is a list of steps. Each holds for a number of BEATS (resolved through the site's tempo)
1678
+ * and applies its actions as it starts. The moment at a step is the items after every action up to it, so step 0 is
1679
+ * the loop's reset and the LAST step is the still frame: what the server renders, and what a visitor who asked for
1680
+ * reduced motion sees. Author the last step as the finished picture.
1681
+ * - **Actions** are a closed set (`WebsiteDemoActionKind`): a state set or cleared from a step on, a state pulsed on
1682
+ * one step only (a press, a typing indicator), the focus moved, a field given a value, or words typed. Typing
1683
+ * lasts as long as the words take to type in the visitor's language, whatever the hold says.
1684
+ *
1685
+ * `defineWebsiteDemoScenario` refuses a scenario that names an item it does not declare, or whose still frame shows a
1686
+ * gesture in progress. `validateWebsiteDemoScenario` refuses one whose values are untrue of the application's
1687
+ * resource: a status that is not a member of its enum, a field that the operation making the change does not write.
1688
+ */
1689
+
1690
+ /**
1691
+ * What a demo shows happening, one of the nine shapes product demos take. Descriptive: the creation lane's website plan
1692
+ * names a section's demo by it (step 5), and a reader of the scenario learns its intent from it.
1693
+ */
1694
+ export enum WebsiteDemoArchetype {
1695
+ /** Items arrive one by one: an activity stream, a log, an inbox. */
1696
+ APPEND = 'append',
1697
+ /** A proposed change waits for a person, who approves it. */
1698
+ APPROVAL = 'approval',
1699
+ /** A question is asked and answered from the product's own records. */
1700
+ QUERY_ANSWER = 'query-answer',
1701
+ /** Something arriving (an email, a file) becomes a record. */
1702
+ TRANSFORM = 'transform',
1703
+ /** Two parties or systems are linked, and something flows between them. */
1704
+ CONNECT = 'connect',
1705
+ /** Items on a list are completed. */
1706
+ COMPLETE_ITEMS = 'complete-items',
1707
+ /** One record moves through its statuses. */
1708
+ STATUS_LIFECYCLE = 'status-lifecycle',
1709
+ /** Figures and charts fill in. */
1710
+ DASHBOARD = 'dashboard',
1711
+ /** A goal is reached and marked. */
1712
+ CELEBRATE = 'celebrate',
1713
+ }
1714
+
1715
+ /**
1716
+ * What an action does to its item. Every gesture a demo shows is one of these on a kit state: a row appended is SET
1717
+ * SHOWN, removed is CLEAR SHOWN, checked is SET DONE, a button pressed is PULSE PRESSED, a typing indicator is PULSE
1718
+ * TYPING, a toast is SET SHOWN on it, a chart drawn is SET DRAWN, a connection is SET LINKED, a status changed is VALUE.
1719
+ */
1720
+ export enum WebsiteDemoActionKind {
1721
+ /** The item takes a state from this step on. */
1722
+ SET = 'set',
1723
+ /** The item drops a state from this step on. */
1724
+ CLEAR = 'clear',
1725
+ /** The item holds a state on this step only: a button pressed, a typing indicator. */
1726
+ PULSE = 'pulse',
1727
+ /** The item becomes the one in focus (`WebsiteProductState.FOCUS`), which leaves every other item; `null` clears it. */
1728
+ FOCUS = 'focus',
1729
+ /** A field of the item takes a value from this step on: a status, a count. The field is the bound resource's. */
1730
+ VALUE = 'value',
1731
+ /** Words are typed into the item on this step (`TYPING`), and stay as its typed words afterwards. */
1732
+ TYPE = 'type',
1733
+ }
1734
+
1735
+ /** A value a record carries: an enum member or a text, a number, a flag. */
1736
+ export type WebsiteDemoValue = string | number | boolean;
1737
+
1738
+ export type WebsiteDemoAction =
1739
+ | { readonly kind: WebsiteDemoActionKind.SET | WebsiteDemoActionKind.CLEAR | WebsiteDemoActionKind.PULSE; readonly target: string; readonly state: WebsiteProductState }
1740
+ | { readonly kind: WebsiteDemoActionKind.FOCUS; readonly target: string | null }
1741
+ | {
1742
+ readonly kind: WebsiteDemoActionKind.VALUE;
1743
+ readonly target: string;
1744
+ readonly field: string;
1745
+ readonly value: WebsiteDemoValue;
1746
+ /** The resource's custom operation that makes this change (a relationship's `accept`); absent: an update. */
1747
+ readonly operation?: string;
1748
+ }
1749
+ | { readonly kind: WebsiteDemoActionKind.TYPE; readonly target: string; readonly words: string };
1750
+
1751
+ /** One step: how long it holds, in beats of the site's tempo, and what changes as it starts. */
1752
+ export interface WebsiteDemoStep {
1753
+ readonly beats: number;
1754
+ readonly actions: readonly WebsiteDemoAction[];
1755
+ }
1756
+
1757
+ /** One item a demo shows, as it is before the first step. */
1758
+ export interface WebsiteDemoItem {
1759
+ /** The kit states it starts in. Never a gesture (pressed, typing): those are pulsed by a step. */
1760
+ readonly states?: readonly WebsiteProductState[];
1761
+ /** The bound resource's field values it carries (a record's status). */
1762
+ readonly values?: Readonly<Record<string, WebsiteDemoValue>>;
1763
+ /** Its words, by part (`title` → `item1.title`): label slots of the section, relative to the demo's prefix. */
1764
+ readonly words?: Readonly<Record<string, string>>;
1765
+ /**
1766
+ * The word a field's value reads as, by field: `status` → `status` reads value `done` as the slot `status.done`. The
1767
+ * section's words include one per value the field takes in the scenario, derived.
1768
+ */
1769
+ readonly valueWords?: Readonly<Record<string, string>>;
1770
+ }
1771
+
1772
+ export interface WebsiteDemoScenario {
1773
+ readonly archetype: WebsiteDemoArchetype;
1774
+ /**
1775
+ * The application resource whose records the drawing shows (`todos`). Every value an item carries or a step sets is
1776
+ * one of this resource's fields, checked by `validateWebsiteDemoScenario`. Absent: the drawing shows no record, and
1777
+ * a scenario that sets a value is refused.
1778
+ */
1779
+ readonly resource?: string;
1780
+ readonly items: Readonly<Record<string, WebsiteDemoItem>>;
1781
+ readonly steps: readonly WebsiteDemoStep[];
1782
+ }
1783
+
1784
+ /**
1785
+ * Marks a scenario `defineWebsiteDemoScenario` checked. Keyed by `Symbol.for`, so it is one symbol in every copy of
1786
+ * this package a process loads (a site may map the engine to its source while a tool imports its `dist`).
1787
+ */
1788
+ export const WEBSITE_DEMO_SCENARIO_DEFINED: unique symbol = Symbol.for('wildo.website.demo-scenario.defined');
1789
+
1790
+ /**
1791
+ * A scenario that went through `defineWebsiteDemoScenario`. The player (`useWebsiteDemoScenario`) takes only these, so
1792
+ * every scenario a site plays was checked, and is seen by `collectDefinedWebsiteDemoScenarios`.
1793
+ */
1794
+ export interface DefinedWebsiteDemoScenario extends WebsiteDemoScenario {
1795
+ readonly [WEBSITE_DEMO_SCENARIO_DEFINED]: true;
1796
+ }
1797
+
1798
+ /** One scenario a site defined, and where: `<file>:<line>` of the `defineWebsiteDemoScenario` call, when known. */
1799
+ export interface DefinedWebsiteDemoScenarioRecord {
1800
+ readonly scenario: WebsiteDemoScenario;
1801
+ readonly definedAt: string | null;
1802
+ }
1803
+
1804
+ /** The open collection, process-wide for the same reason as the marker. Absent unless a check is collecting. */
1805
+ const WEBSITE_DEMO_SCENARIO_COLLECTION: unique symbol = Symbol.for('wildo.website.demo-scenario.collection');
1806
+ type CollectingGlobal = typeof globalThis & { [WEBSITE_DEMO_SCENARIO_COLLECTION]?: DefinedWebsiteDemoScenarioRecord[] };
1807
+
1808
+ /** This module's own frames are skipped when naming where a scenario was defined. */
1809
+ const THIS_MODULE = /website-demo-scenario\.shared\.[cm]?[jt]s/u;
1810
+
1811
+ /**
1812
+ * Where a stack frame points, as `[file, line]`: `at fn (<file>:<line>:<col>)` or `at <file>:<line>:<col>`. The file
1813
+ * may hold spaces and parentheses (a project folder named `My Projects (2026)`), so it is everything up to the LAST
1814
+ * `:<line>:<col>`, never a run of non-space characters. Null for a frame naming no file (`at async Promise.all (index 0)`).
1815
+ */
1816
+ export function websiteDemoStackFrameLocation(frame: string): readonly [string, string] | null {
1817
+ const trimmed = frame.trim();
1818
+ const located = /^at .*?\((.+):(\d+):\d+\)$/u.exec(trimmed) ?? /^at (.+):(\d+):\d+$/u.exec(trimmed);
1819
+ if (located === null) return null;
1820
+ // A loader may tag the module URL with a query (tsx's `?tsx-namespace=…`): the same file is the same place.
1821
+ return [located[1]!.replace(/^file:\/\//u, '').replace(/\?.*$/u, ''), located[2]!];
1822
+ }
1823
+
1824
+ /**
1825
+ * The first stack frame outside this module that names a file of the application, as `<file>:<line>`; null when the
1826
+ * runtime gives no readable stack. Node's own frames (`node:internal/…`) are skipped: a scenario is never defined
1827
+ * there, and naming one would make two scenarios defined in two places read as one.
1828
+ */
1829
+ function definitionSite(): string | null {
1830
+ for (const frame of (new Error().stack ?? '').split('\n').slice(1)) {
1831
+ if (THIS_MODULE.test(frame)) continue;
1832
+ const location = websiteDemoStackFrameLocation(frame);
1833
+ if (location === null || location[0].startsWith('node:')) continue;
1834
+ return `${location[0]}:${location[1]}`;
1835
+ }
1836
+ return null;
1837
+ }
1838
+
1839
+ /**
1840
+ * Records every scenario `defineWebsiteDemoScenario` checks while `load` runs, and returns them with `load`'s result.
1841
+ * How a check finds a site's scenarios without the site exporting them: it collects, then imports the site's section
1842
+ * modules, whose scenarios are defined at module scope. Nothing is recorded outside a collection, so a visitor's
1843
+ * browser keeps nothing. A module the process had already imported before the collection opened defines nothing
1844
+ * again, so a check imports the site FRESH. Collections do not nest: a second one while one is open is refused.
1845
+ */
1846
+ export async function collectDefinedWebsiteDemoScenarios<Loaded>(load: () => Promise<Loaded>): Promise<{ loaded: Loaded; scenarios: DefinedWebsiteDemoScenarioRecord[] }> {
1847
+ const host = globalThis as CollectingGlobal;
1848
+ if (host[WEBSITE_DEMO_SCENARIO_COLLECTION] !== undefined) throw new Error('[website demo scenario] a collection is already open in this process.');
1849
+ const scenarios: DefinedWebsiteDemoScenarioRecord[] = [];
1850
+ host[WEBSITE_DEMO_SCENARIO_COLLECTION] = scenarios;
1851
+ try {
1852
+ return { loaded: await load(), scenarios };
1853
+ } finally {
1854
+ delete host[WEBSITE_DEMO_SCENARIO_COLLECTION];
1855
+ }
1856
+ }
1857
+
1858
+ /** The states that describe a gesture IN PROGRESS: only ever pulsed, and never on the still frame. */
1859
+ const GESTURE_STATES: ReadonlySet<WebsiteProductState> = new Set([WebsiteProductState.PRESSED, WebsiteProductState.TYPING]);
1860
+
1861
+ /**
1862
+ * Checks a scenario's own coherence and returns it. Throws when:
1863
+ * - an action names an item the scenario does not declare, or there is no step;
1864
+ * - a hold is not a positive, finite number of beats;
1865
+ * - a value is carried or set with no bound resource;
1866
+ * - a gesture (pressed, typing) is set, cleared or started in rather than pulsed, or the focus is set, cleared or
1867
+ * pulsed rather than moved (FOCUS keeps it on one item), or more than one item starts in focus;
1868
+ * - the still frame (the moment at the last step) shows a gesture in progress.
1869
+ */
1870
+ export function defineWebsiteDemoScenario<const Scenario extends WebsiteDemoScenario>(scenario: Scenario): Scenario & DefinedWebsiteDemoScenario {
1871
+ const problems: string[] = [];
1872
+ if (scenario.steps.length === 0) problems.push('it has no step');
1873
+ const known = (target: string | null) => target === null || Object.hasOwn(scenario.items, target);
1874
+ scenario.steps.forEach((step, index) => {
1875
+ if (!(Number.isFinite(step.beats) && step.beats > 0)) problems.push(`step ${index} holds ${step.beats} beats; a hold is a positive, finite number of beats`);
1876
+ for (const action of step.actions) {
1877
+ if (!known(action.target)) problems.push(`step ${index} acts on "${action.target}", which is not one of its items`);
1878
+ if (action.kind === WebsiteDemoActionKind.VALUE && scenario.resource === undefined) {
1879
+ problems.push(`step ${index} sets "${action.field}" but the scenario binds no resource`);
1880
+ }
1881
+ if (action.kind === WebsiteDemoActionKind.VALUE && action.operation !== undefined && action.operation.trim() === '') {
1882
+ problems.push(`step ${index} names an empty operation; name the custom operation, or none for an update`);
1883
+ }
1884
+ const stated = action.kind === WebsiteDemoActionKind.SET || action.kind === WebsiteDemoActionKind.CLEAR || action.kind === WebsiteDemoActionKind.PULSE;
1885
+ if (stated && action.kind !== WebsiteDemoActionKind.PULSE && GESTURE_STATES.has(action.state)) {
1886
+ problems.push(`step ${index} ${action.kind}s "${action.state}" on "${action.target}"; a gesture is pulsed, so it lasts its own step`);
1887
+ }
1888
+ if (stated && action.state === WebsiteProductState.FOCUS) {
1889
+ problems.push(`step ${index} ${action.kind}s the focus on "${action.target}"; move it with a FOCUS action, which keeps it on one item`);
1890
+ }
1891
+ }
1892
+ });
1893
+ let startsFocused = 0;
1894
+ for (const [ref, item] of Object.entries(scenario.items)) {
1895
+ if (item.values !== undefined && Object.keys(item.values).length > 0 && scenario.resource === undefined) {
1896
+ problems.push(`item "${ref}" carries values but the scenario binds no resource`);
1897
+ }
1898
+ for (const state of item.states ?? []) {
1899
+ if (GESTURE_STATES.has(state)) problems.push(`item "${ref}" starts "${state}"; a gesture is pulsed by a step`);
1900
+ if (state === WebsiteProductState.FOCUS) startsFocused += 1;
1901
+ }
1902
+ }
1903
+ if (startsFocused > 1) problems.push(`${startsFocused} items start in focus; at most one is`);
1904
+ if (scenario.steps.length > 0 && problems.length === 0) {
1905
+ for (const [ref, item] of reduceWebsiteDemoScenario(scenario, scenario.steps.length - 1)) {
1906
+ for (const state of item.states) {
1907
+ if (GESTURE_STATES.has(state)) {
1908
+ problems.push(`the still frame (the last step) shows "${ref}" ${state}, a gesture in progress; end on the finished picture`);
1909
+ }
1910
+ }
1911
+ }
1912
+ }
1913
+ if (problems.length > 0) throw new Error(`[website demo scenario] ${problems.join('; ')}.`);
1914
+ Object.defineProperty(scenario, WEBSITE_DEMO_SCENARIO_DEFINED, { value: true, enumerable: false });
1915
+ (globalThis as CollectingGlobal)[WEBSITE_DEMO_SCENARIO_COLLECTION]?.push({ scenario, definedAt: definitionSite() });
1916
+ return scenario as Scenario & DefinedWebsiteDemoScenario;
1917
+ }
1918
+
1919
+ /** One item at one step. */
1920
+ export interface WebsiteDemoItemMoment {
1921
+ readonly states: ReadonlySet<WebsiteProductState>;
1922
+ readonly values: Readonly<Record<string, WebsiteDemoValue>>;
1923
+ /** The slot of the words typed into it most recently, if any. */
1924
+ readonly typed: string | undefined;
1925
+ }
1926
+
1927
+ /** Every item at one step, keyed by ref. */
1928
+ export type WebsiteDemoMomentItems = ReadonlyMap<string, WebsiteDemoItemMoment>;
1929
+
1930
+ /**
1931
+ * The items at `step` (clamped to the scenario): the starting items after every action of steps 0 to `step`, with the
1932
+ * pulses of `step` itself. Pure: the player calls it on every step, and a test reads any moment without a timer.
1933
+ */
1934
+ export function reduceWebsiteDemoScenario(scenario: WebsiteDemoScenario, step: number): WebsiteDemoMomentItems {
1935
+ const at = Math.max(0, Math.min(step, scenario.steps.length - 1));
1936
+ const items = new Map<string, { states: Set<WebsiteProductState>; values: Record<string, WebsiteDemoValue>; typed: string | undefined }>();
1937
+ for (const [ref, item] of Object.entries(scenario.items)) {
1938
+ items.set(ref, { states: new Set(item.states ?? []), values: { ...item.values }, typed: undefined });
1939
+ }
1940
+ for (let index = 0; index <= at; index += 1) {
1941
+ for (const action of scenario.steps[index]?.actions ?? []) {
1942
+ if (action.kind === WebsiteDemoActionKind.FOCUS) {
1943
+ for (const item of items.values()) item.states.delete(WebsiteProductState.FOCUS);
1944
+ if (action.target !== null) items.get(action.target)?.states.add(WebsiteProductState.FOCUS);
1945
+ continue;
1946
+ }
1947
+ const item = items.get(action.target);
1948
+ if (item === undefined) continue;
1949
+ if (action.kind === WebsiteDemoActionKind.SET) item.states.add(action.state);
1950
+ else if (action.kind === WebsiteDemoActionKind.CLEAR) item.states.delete(action.state);
1951
+ else if (action.kind === WebsiteDemoActionKind.VALUE) item.values[action.field] = action.value;
1952
+ else if (action.kind === WebsiteDemoActionKind.TYPE) item.typed = action.words;
1953
+ else if (action.kind === WebsiteDemoActionKind.PULSE && index === at) item.states.add(action.state);
1954
+ }
1955
+ }
1956
+ // Typing is a pulse of the step that types.
1957
+ for (const action of scenario.steps[at]?.actions ?? []) {
1958
+ if (action.kind === WebsiteDemoActionKind.TYPE) items.get(action.target)?.states.add(WebsiteProductState.TYPING);
1959
+ }
1960
+ return items;
1961
+ }
1962
+
1963
+ /** The refs of the items a step types into: the player types their words out on that step. */
1964
+ export function websiteDemoTypingTargets(scenario: WebsiteDemoScenario, step: number): ReadonlySet<string> {
1965
+ const targets = new Set<string>();
1966
+ for (const action of scenario.steps[step]?.actions ?? []) if (action.kind === WebsiteDemoActionKind.TYPE) targets.add(action.target);
1967
+ return targets;
1968
+ }
1969
+
1970
+ /**
1971
+ * How long one beat is in each tempo, in milliseconds. A beat is a READING unit, not an animation length: it is long
1972
+ * enough for a visitor to notice what changed, and grows a little with the tempo's own clock so a calm brand also
1973
+ * reads calmly. STILL never plays (its still frame is all a visitor sees). Total over `ThemeMotion`.
1974
+ */
1975
+ export const WEBSITE_DEMO_BEAT_MS: Readonly<Record<ThemeMotion, number>> = {
1976
+ [ThemeMotion.STILL]: 0,
1977
+ [ThemeMotion.CRISP]: 450,
1978
+ [ThemeMotion.BRISK]: 500,
1979
+ [ThemeMotion.FLUID]: 550,
1980
+ [ThemeMotion.SPRINGY]: 550,
1981
+ };
1982
+
1983
+ /** The shortest a step may hold, whatever its beats: below it a change is gone before it is seen. */
1984
+ export const WEBSITE_DEMO_MIN_STEP_MS = 600;
1985
+ /** The shortest the last step (the finished picture) may hold before the loop starts again. */
1986
+ export const WEBSITE_DEMO_MIN_STILL_HOLD_MS = 3600;
1987
+ /** How long one character takes to type: an unhurried typist's pace, the same in every tempo. */
1988
+ export const WEBSITE_DEMO_TYPING_MS_PER_CHARACTER = 55;
1989
+ /** What a step that types holds after the last character, so the finished words are read. */
1990
+ export const WEBSITE_DEMO_TYPING_SETTLE_MS = 500;
1991
+
1992
+ /** The characters of typed words, as a typist presses them: an accent or an emoji is one, not two UTF-16 units. */
1993
+ export function websiteDemoTypedCharacters(text: string): string[] {
1994
+ return [...text];
1995
+ }
1996
+
1997
+ /** How long typing these words takes. */
1998
+ export function websiteDemoTypingDurationMs(text: string): number {
1999
+ return Math.max(1, websiteDemoTypedCharacters(text).length) * WEBSITE_DEMO_TYPING_MS_PER_CHARACTER;
2000
+ }
2001
+
2002
+ /**
2003
+ * Each step's hold in milliseconds: its beats in the tempo, never under the floor, the last step never under the still
2004
+ * hold, and a typing step at least as long as its words take to type and settle. `wordsOf(slot)` gives the words a TYPE
2005
+ * action types, in the visitor's language.
2006
+ */
2007
+ export function websiteDemoStepDurations(scenario: WebsiteDemoScenario, tempo: ThemeMotion, wordsOf: (slot: string) => string): number[] {
2008
+ const beat = WEBSITE_DEMO_BEAT_MS[tempo];
2009
+ return scenario.steps.map((step, index) => {
2010
+ const floor = index === scenario.steps.length - 1 ? WEBSITE_DEMO_MIN_STILL_HOLD_MS : WEBSITE_DEMO_MIN_STEP_MS;
2011
+ let hold = Math.max(step.beats * beat, floor);
2012
+ for (const action of step.actions) {
2013
+ if (action.kind === WebsiteDemoActionKind.TYPE) hold = Math.max(hold, websiteDemoTypingDurationMs(wordsOf(action.words)) + WEBSITE_DEMO_TYPING_SETTLE_MS);
2014
+ }
2015
+ return hold;
2016
+ });
2017
+ }
2018
+
2019
+ /** The slot a field's value reads as, when the item declares a word for that field's values. */
2020
+ export function websiteDemoValueWordSlot(item: WebsiteDemoItem, field: string, value: WebsiteDemoValue): string | undefined {
2021
+ const prefix = item.valueWords !== undefined && Object.hasOwn(item.valueWords, field) ? item.valueWords[field] : undefined;
2022
+ return prefix === undefined ? undefined : `${prefix}.${String(value)}`;
2023
+ }
2024
+
2025
+ /**
2026
+ * Every label slot a scenario reads, sorted: its items' words, the words its steps type, and one word per value a field
2027
+ * with value words takes (where it starts, and every value a step gives it). Prefix them for a section.
2028
+ */
2029
+ export function websiteDemoScenarioSlots(scenario: WebsiteDemoScenario): string[] {
2030
+ const slots = new Set<string>();
2031
+ const addValueWord = (ref: string, field: string, value: WebsiteDemoValue) => {
2032
+ const item = scenario.items[ref];
2033
+ const slot = item === undefined ? undefined : websiteDemoValueWordSlot(item, field, value);
2034
+ if (slot !== undefined) slots.add(slot);
2035
+ };
2036
+ for (const [ref, item] of Object.entries(scenario.items)) {
2037
+ for (const slot of Object.values(item.words ?? {})) slots.add(slot);
2038
+ for (const [field, value] of Object.entries(item.values ?? {})) addValueWord(ref, field, value);
2039
+ }
2040
+ for (const step of scenario.steps) {
2041
+ for (const action of step.actions) {
2042
+ if (action.kind === WebsiteDemoActionKind.TYPE) slots.add(action.words);
2043
+ if (action.kind === WebsiteDemoActionKind.VALUE) addValueWord(action.target, action.field, action.value);
2044
+ }
2045
+ }
2046
+ return [...slots].sort();
2047
+ }
2048
+
2049
+ /** What a field of the bound resource is, for checking the values a scenario gives it. */
2050
+ export enum WebsiteDemoFieldKind {
2051
+ /** A closed vocabulary: a value must be one of `members`. */
2052
+ ENUM = 'enum',
2053
+ NUMBER = 'number',
2054
+ TEXT = 'text',
2055
+ BOOLEAN = 'boolean',
2056
+ /** Anything else (a date, a reference): the scenario may name it, and its value is not checked. */
2057
+ OTHER = 'other',
2058
+ }
2059
+
2060
+ /** What the application says about the resource a scenario binds, as the creation lane derives it from its schema. */
2061
+ export interface WebsiteDemoResourceFacts {
2062
+ readonly resource: string;
2063
+ readonly fields: Readonly<Record<string, { readonly kind: WebsiteDemoFieldKind; readonly members?: readonly string[] }>>;
2064
+ /** The fields an update of the resource writes. */
2065
+ readonly updatable: readonly string[];
2066
+ /** The fields each of its custom operations writes, by operation identifier (a relationship's `accept`). */
2067
+ readonly operations?: Readonly<Record<string, readonly string[]>>;
2068
+ }
2069
+
2070
+ /**
2071
+ * The ways a scenario is untrue of the application, as sentences; empty when it is true. A value must name a field the
2072
+ * resource has, of the right kind (an enum member, a number, a text, a flag). A value a STEP sets is a change the
2073
+ * product makes, so the operation it names (an update when it names none) must write that field. Run where the
2074
+ * application's resources are known (the creation lane); the drawing never needs it.
2075
+ *
2076
+ * A value an item STARTS with is the record as it already is, so only its kind is checked. An item that appears on a
2077
+ * step (SET SHOWN) is drawn as a record arriving, and the scenario does not say whether it was created then or revealed,
2078
+ * so its values are not held to what a create accepts.
2079
+ */
2080
+ export function validateWebsiteDemoScenario(scenario: WebsiteDemoScenario, facts: WebsiteDemoResourceFacts): string[] {
2081
+ const problems: string[] = [];
2082
+ if (scenario.resource === undefined) return problems;
2083
+ if (scenario.resource !== facts.resource) {
2084
+ return [`the scenario shows "${scenario.resource}" but the facts are about "${facts.resource}"`];
2085
+ }
2086
+ /** `operation`: `undefined` for an item's starting value (no change), `null` for an update, else a custom operation. */
2087
+ const check = (where: string, field: string, value: WebsiteDemoValue, operation: string | null | undefined) => {
2088
+ if (!Object.hasOwn(facts.fields, field)) {
2089
+ problems.push(`${where} sets "${field}", which "${facts.resource}" does not have`);
2090
+ return;
2091
+ }
2092
+ const fact = facts.fields[field]!;
2093
+ if (operation !== undefined) {
2094
+ const writes = operation === null ? facts.updatable : Object.hasOwn(facts.operations ?? {}, operation) ? facts.operations![operation]! : undefined;
2095
+ if (writes === undefined) problems.push(`${where} changes "${field}" through "${operation}", which is not an operation of "${facts.resource}"`);
2096
+ else if (!writes.includes(field)) {
2097
+ problems.push(`${where} changes "${field}", which ${operation === null ? `an update of "${facts.resource}"` : `"${operation}"`} does not write`);
2098
+ }
2099
+ }
2100
+ if (fact.kind === WebsiteDemoFieldKind.ENUM && !(fact.members ?? []).includes(String(value))) {
2101
+ problems.push(`${where} sets "${field}" to "${String(value)}", which is not one of its values (${(fact.members ?? []).join(', ')})`);
2102
+ }
2103
+ const expected = { [WebsiteDemoFieldKind.NUMBER]: 'number', [WebsiteDemoFieldKind.TEXT]: 'string', [WebsiteDemoFieldKind.BOOLEAN]: 'boolean' }[
2104
+ fact.kind as WebsiteDemoFieldKind.NUMBER | WebsiteDemoFieldKind.TEXT | WebsiteDemoFieldKind.BOOLEAN
2105
+ ];
2106
+ if (expected !== undefined && typeof value !== expected) problems.push(`${where} sets "${field}" to "${String(value)}", which is not a ${fact.kind}`);
2107
+ };
2108
+ for (const [ref, item] of Object.entries(scenario.items)) {
2109
+ for (const [field, value] of Object.entries(item.values ?? {})) check(`item "${ref}"`, field, value, undefined);
2110
+ }
2111
+ scenario.steps.forEach((step, index) => {
2112
+ for (const action of step.actions) {
2113
+ if (action.kind === WebsiteDemoActionKind.VALUE) check(`step ${index}`, action.field, action.value, action.operation ?? null);
2114
+ }
2115
+ });
2116
+ return problems;
2117
+ }
2118
+ ```
2119
+
2120
+ ## Import Origins
2121
+
2122
+ - `@wildo-ai/saas-website`
2123
+
2124
+ ## Source Excerpts
2125
+
2126
+ ### Origin Package: `@wildo-ai/saas-website`
2127
+
2128
+ ```tsx
2129
+ *
2130
+ * The moment a playing scenario is at, as the drawing reads it. Every accessor names an item by its ref.
2131
+ */
2132
+ export interface WebsiteDemoMoment {
2133
+ /** The step on screen: the still frame (the last step) on the server and under reduced motion. */
2134
+ readonly step: number;
2135
+ /** Whether the item is in a kit state at this step: pass it to the atom's prop of the same name. */
2136
+ is(ref: string, state: WebsiteProductState): boolean;
2137
+ /** A field value the item carries at this step (a status), for the drawing to choose its look by. */
2138
+ value(ref: string, field: string): WebsiteDemoValue | undefined;
2139
+ /** The word for that value (`status.done`), when the item declares `valueWords` for the field. */
2140
+ valueWord(ref: string, field: string): string;
2141
+ /** One of the item's words (`word('item1', 'title')`), in the visitor's language. */
2142
+ word(ref: string, part: string): string;
2143
+ /**
2144
+ * The words typed into the item, as far as they are typed: on the step that types them they appear one character at
2145
+ * a time while the demo plays (and hold where they are when it is paused); after it they are whole. `undefined`
2146
+ * before any.
2147
+ */
2148
+ typed(ref: string): string | undefined;
2149
+ }
2150
+
2151
+ /**
2152
+ * Plays a scenario (`defineWebsiteDemoScenario`) inside a demo: it times the steps in the site's tempo, the typing steps
2153
+ * by the length of their words, types those words out, and returns the current moment. Call it inside a
2154
+ * `WebsiteMotionDemo` or a group, where the timeline obeys the pause control, reduced motion and the still tempo.
2155
+ * `prefix` is the demo's place in its section's words (a tour's `assistant.screen`), the same prefix as
2156
+ * `websiteDemoScenarioSlots` takes.
2157
+ *
2158
+ * @example
2159
+ * ```tsx
2160
+ * const moment = useWebsiteDemoScenario(WEEKLY_PLAN, { prefix });
2161
+ * <WebsiteProductRow done={moment.is('item1', WebsiteProductState.DONE)}>
2162
+ * <WebsiteProductRowTitle>{moment.word('item1', 'title')}</WebsiteProductRowTitle>
2163
+ * </WebsiteProductRow>
2164
+ * const typing = moment.is('field', WebsiteProductState.TYPING);
2165
+ * const typed = moment.typed('field');
2166
+ * <WebsiteProductField typing={typing} filled={typed !== undefined && !typing} text={typed ?? ''} hint={…} />
2167
+ * ```
2168
+ */
2169
+ export function useWebsiteDemoScenario(scenario: DefinedWebsiteDemoScenario, { prefix }: { readonly prefix?: string } = {}): WebsiteDemoMoment {
2170
+ const label = useWebsiteSectionLabels();
2171
+ const words = useMemo(() => (slot: string) => label(prefix === undefined || prefix === '' ? slot : `${prefix}.${slot}`), [label, prefix]);
2172
+ const tempo = resolveWebsiteMotionTokens(useWebsiteDesignTokens().motion).tempo;
2173
+ const durations = useMemo(() => websiteDemoStepDurations(scenario, tempo, words), [scenario, tempo, words]);
2174
+ const { step, advances } = useWebsiteMotionDemoTimelinePosition(durations);
2175
+ const playing = useWebsiteMotionDemoPlaying();
2176
+ const items = useMemo(() => reduceWebsiteDemoScenario(scenario, step), [scenario, step]);
2177
+
2178
+ // The characters typed so far, kept with the VISIT of the step they belong to (the timeline's count of advances), so a
2179
+ // typing step never shows, even for one render, what an earlier step or the same step on the last loop had reached.
2180
+ const typing = useMemo(
2181
+ () => (scenario.steps[step]?.actions ?? []).flatMap((action) => (action.kind === WebsiteDemoActionKind.TYPE ? [action.words] : [])),
2182
+ [scenario, step],
2183
+ );
2184
+ const typingTargets = useMemo(() => websiteDemoTypingTargets(scenario, step), [scenario, step]);
2185
+ const longest = useMemo(() => Math.max(0, ...typing.map((slot) => websiteDemoTypedCharacters(words(slot)).length)), [typing, words]);
2186
+ const [progress, setProgress] = useState({ visit: advances, characters: 0 });
2187
+ const typedSoFar = progress.visit === advances ? progress.characters : 0;
2188
+ useEffect(() => {
2189
+ if (!playing || typedSoFar >= longest) return undefined;
2190
+ const timer = setTimeout(() => setProgress({ visit: advances, characters: typedSoFar + 1 }), WEBSITE_DEMO_TYPING_MS_PER_CHARACTER);
2191
+ return () => clearTimeout(timer);
2192
+ }, [playing, advances, typedSoFar, longest]);
2193
+
2194
+ return useMemo<WebsiteDemoMoment>(
2195
+ () => ({
2196
+ step,
2197
+ is: (ref, state) => items.get(ref)?.states.has(state) ?? false,
2198
+ value: (ref, field) => items.get(ref)?.values[field],
2199
+ valueWord: (ref, field) => {
2200
+ const item = scenario.items[ref];
2201
+ const value = items.get(ref)?.values[field];
2202
+ const slot = item === undefined || value === undefined ? undefined : websiteDemoValueWordSlot(item, field, value);
2203
+ if (slot === undefined) throw new Error(`[website demo scenario] Item "${ref}" has no word for its "${field}" (declare valueWords and a value).`);
2204
+ return words(slot);
2205
+ },
2206
+ word: (ref, part) => {
2207
+ const slot = scenario.items[ref]?.words?.[part];
2208
+ if (slot === undefined) throw new Error(`[website demo scenario] Item "${ref}" declares no word "${part}".`);
2209
+ return words(slot);
2210
+ },
2211
+ typed: (ref) => {
2212
+ const item = items.get(ref);
2213
+ if (item?.typed === undefined) return undefined;
2214
+ const text = words(item.typed);
2215
+ // Typed out only by the step whose TYPE action targets it; a typing indicator pulsed on it shows its words whole.
2216
+ return typingTargets.has(ref) ? websiteDemoTypedCharacters(text).slice(0, typedSoFar).join('') : text;
2217
+ },
2218
+ }),
2219
+ [items, scenario, step, typedSoFar, typingTargets, words],
2220
+ );
2221
+ }
2222
+ ```
2223
+
2224
+ ## The stylesheet and its hooks
2225
+
2226
+ ## Import Origins
2227
+
2228
+ - `@wildo-ai/saas-website`
2229
+
2230
+ ## Source Excerpts
2231
+
2232
+ ### Origin Package: `@wildo-ai/saas-website`
2233
+
2234
+ ```typescript
2235
+ *
2236
+ * The drawn-product kit's stylesheet (#2742): the atoms a demo draws a product with, styled ONLY from the product
2237
+ * tokens (`--website-product-*`, the application's own colours) and the motion tokens (the site's tempo). It sits in
2238
+ * the `wildo-website` cascade layer like the blocks, so a site adjusts an atom with an ordinary rule on its hooks.
2239
+ *
2240
+ * **Character.** Corners multiply by `--website-product-radius` (the personality's `shape`), paddings and gaps by
2241
+ * `--website-product-space` (its `density`), a pill-shaped chip's corner is `--website-product-pill`, a selection draws
2242
+ * in `--website-product-selection-*` (its `selectionEmphasis`), and hairlines are the site's `--website-edges-width`
2243
+ * (its `edgeWeight`). Your Application' point is the calibration: every scale is 1 there.
2244
+ *
2245
+ * **Sizing.** Every length is in `em`. A drawing's root sets its font size from the width of the nearest size
2246
+ * container (`cqi`), so a drawing scales as one picture instead of reflowing: the window's text is 1.6% of its
2247
+ * container, between 9px and 15px. The demo frame is that container. Below a 30rem container the window drops its
2248
+ * rail and a row its trailing details, the width at which a rail stops paying for itself (a window there is a phone's).
2249
+ *
2250
+ * **Motion.** Every transition runs on the tempo's durations and curves, so a still tempo or reduced motion (which
2251
+ * the demo stage turns off) shows each atom in its state with nothing in between. Every animation that plays on its
2252
+ * own (typing, the typing dots, a pulse) is confined to a demo stage and to a visitor without a reduced-motion
2253
+ * preference.
2254
+ *
2255
+ * The hooks, all named in `website-product-hooks.shared.ts` so this sheet and the components cannot drift (the value
2256
+ * attributes below are `WebsiteProductValueAttribute`, each drawn per member of its enum):
2257
+ *
2258
+ * | Hook | On | Values |
2259
+ * |---|---|---|
2260
+ * | `data-website-demo-frame` | a demo figure or a `WebsiteDemoFrame` | `WebsiteDemoFrameVariant`: `stage`, `plain`, `backdrop` |
2261
+ * | `data-website-product` | an atom's root | `WebsiteProductAtom` |
2262
+ * | `data-website-product-part` | a part, named `<atom>.<part>` | `WebsiteProductPart` |
2263
+ * | `data-website-product-<state>` | an atom or a part, present while true | `WebsiteProductState` |
2264
+ * | `data-website-status` | a chip | the application's `IndicatorVariant` (`WebsiteProductStatus`) |
2265
+ * | `data-website-interactive` | a button | the application's `InteractiveVariant` (`WebsiteProductAction`): `primary`, `secondary`, `outline` |
2266
+ * | `data-website-selectable` | a window's rail | the application's `SelectableVariant` (`WebsiteProductSelection`) |
2267
+ * | `data-website-speaker` | a bubble | `WebsiteProductSpeaker`: `person`, `agent` |
2268
+ * | `data-website-avatar`, `data-website-series` | an avatar; a legend's dot | `WebsiteProductAvatar` `1`–`5`; `WebsiteProductSeries` `1`–`4` |
2269
+ * | `data-website-surface`, `data-website-arrival` | an item line | `WebsiteProductLineSurface`; `WebsiteProductArrival` |
2270
+ * | `--website-kit-mark`, `--website-kit-meter`, `--website-kit-donut`, `--website-kit-bars`, `--website-kit-bar`, `--website-kit-bar-index`, `--website-kit-edge-index` | the window's mark, a meter, a donut, a bar chart, a graph's edges | set by the atom from its props |
2271
+ * | `--website-kit-row-gap`, `--website-kit-row-padding` | a list's rows | set by every list (0.9em, 0.7em) and by a `compact` one |
2272
+ * | `--website-kit-frame-background`, `--website-kit-terminal-stripe`, `--website-kit-decided-edge`, `--website-kit-stack-gap` | a frame, a terminal's odd calls, a decided card's border, a stack | a site may set them; derived from the product tokens otherwise; a stack's gap is 1em, set on each stack |
2273
+ *
2274
+ * The kit's own custom properties are `--website-kit-*`, never `--website-product-*`: that prefix is the TOKEN group.
2275
+ */
2276
+
2277
+ /** The width below which a drawn window drops its rail and a row its trailing details. */
2278
+ export const WEBSITE_PRODUCT_NARROW_CONTAINER = '30rem';
2279
+
2280
+ const p = websiteProductCssVar;
2281
+ const atom = websiteProductAtomSelector;
2282
+ const part = websiteProductPartSelector;
2283
+ const state = websiteProductStateSelector;
2284
+ const value = websiteProductValueSelector;
2285
+ const V = WebsiteProductValueAttribute;
2286
+ /** A corner, scaled by the personality's `shape`. */
2287
+ const r = (length: string): string => `calc(${length} * ${p('radius')})`;
2288
+ /** A padding or a gap, scaled by the personality's `density`. */
2289
+ const sp = (length: string): string => `calc(${length} * ${p('space')})`;
2290
+ /** A hairline: the site's edge width, from the personality's `edgeWeight`. */
2291
+ const EDGE = websiteDesignTokenCssVar('edges', 'width');
2292
+ /** Inside a demo stage, where a pause, the off-screen pause and reduced motion govern every animation. */
2293
+ const STAGE = `[${WebsiteMotionDemoAttribute.STAGE}]`;
2294
+ const m = websiteMotionCssVar;
2295
+ const MICRO = m(WebsiteMotionCssToken.DURATION_MICRO);
2296
+ const SHORT = m(WebsiteMotionCssToken.DURATION_SHORT);
2297
+ const MEDIUM = m(WebsiteMotionCssToken.DURATION_MEDIUM);
2298
+ const LONG = m(WebsiteMotionCssToken.DURATION_LONG);
2299
+ const ENTER = m(WebsiteMotionCssToken.EASE_ENTER);
2300
+ const EFFECT = m(WebsiteMotionCssToken.EASE_ENTER_EFFECT);
2301
+
2302
+ /**
2303
+ * Every icon an atom or a part holds directly is 1.25em unless its part says otherwise: a site passes its own icons
2304
+ * in, and they must not be drawn at an SVG's default 300 × 150. Direct children only, so a chart or an illustration
2305
+ * inside a part keeps its own size; written with `:where()` so it has no specificity, and every part's own icon rule
2306
+ * wins.
2307
+ */
2308
+ const ICONS = `
2309
+ :where([${WEBSITE_PRODUCT_ATOM_ATTRIBUTE}], [${WEBSITE_PRODUCT_PART_ATTRIBUTE}]) > svg { width: 1.25em; height: 1.25em; flex: none; }
2310
+ `;
2311
+
2312
+ const FRAME = `[${WebsiteMotionDemoAttribute.FRAME_VARIANT}]`;
2313
+ const frame = (variant: WebsiteDemoFrameVariant): string => `[${WebsiteMotionDemoAttribute.FRAME_VARIANT}='${variant}']`;
2314
+ const TOGGLE = `[${WebsiteMotionDemoAttribute.TOGGLE}]`;
2315
+ const FRAMES = `
2316
+ ${FRAME} {
2317
+ /* A size container takes no width from what it holds, so it must be given one: a frame that only fitted its
2318
+ content would collapse to its padding. */
2319
+ inline-size: 100%;
2320
+ container-type: inline-size;
2321
+ position: relative;
2322
+ margin: 0;
2323
+ }
2324
+ /* A frame sits in a stage, and the stage in a demo, and any of them in a parent that centres its children (a bento
2325
+ tile's media) shrinks to fit; the frame's 100% is then 100% of nothing. So the demo and the stage that hold a frame
2326
+ take the width they are given too. Measured: a backdrop frame in a 400px centring grid drew at 80px. */
2327
+ :is([${WebsiteMotionDemoAttribute.FRAME}], ${STAGE}):has(${FRAME}) { inline-size: 100%; }
2328
+ ${frame(WebsiteDemoFrameVariant.STAGE)} {
2329
+ /* A frame is the website's, not the product's: its corners stay fixed while the drawing inside takes the
2330
+ personality's shape, as a screenshot's mount does not change with the screen it holds. */
2331
+ border-radius: 1.25rem;
2332
+ padding: clamp(0.4rem, 1vw, 0.75rem);
2333
+ background: var(--website-kit-frame-background, linear-gradient(180deg, color-mix(in srgb, ${p('primary')} 14%, ${p('surface')}), color-mix(in srgb, ${p('primary')} 4%, ${p('surface')})));
2334
+ box-shadow: ${websiteDesignTokenCssVar('elevation', 'lift')};
2335
+ }
2336
+ [data-website-tone='inverse'] ${frame(WebsiteDemoFrameVariant.STAGE)} {
2337
+ background: var(--website-kit-frame-background, linear-gradient(180deg, ${p('night', 'surface')}, ${p('night', 'background')}));
2338
+ }
2339
+ ${frame(WebsiteDemoFrameVariant.PLAIN)} ${TOGGLE} { inset-block: 0.45rem auto; inset-inline-end: 0.55rem; width: 1.75rem; height: 1.75rem; }
2340
+ ${frame(WebsiteDemoFrameVariant.PLAIN)} ${part(WebsiteProductPart.STREAM_HEAD)} { padding-inline-end: 2.9rem; }
2341
+ ${frame(WebsiteDemoFrameVariant.BACKDROP)} {
2342
+ display: grid;
2343
+ place-items: center;
2344
+ min-height: 18rem;
2345
+ border-radius: 1.25rem;
2346
+ padding: clamp(1.25rem, 3vw, 2.5rem);
2347
+ background: var(--website-kit-frame-background, radial-gradient(30rem 16rem at 80% 0%, color-mix(in srgb, ${p('primary')} 12%, transparent), transparent 70%), linear-gradient(180deg, ${p('sunken')}, ${p('surface')}));
2348
+ color: ${p('ink')};
2349
+ font-size: clamp(12px, 2.4cqi, 16px);
2350
+ }
2351
+ ${frame(WebsiteDemoFrameVariant.BACKDROP)} > ${STAGE} { display: grid; place-items: center; width: 100%; }
2352
+ [data-website-tone='inverse'] ${frame(WebsiteDemoFrameVariant.BACKDROP)} {
2353
+ background: var(--website-kit-frame-background, radial-gradient(30rem 16rem at 80% 0%, color-mix(in srgb, ${p('primary')} 30%, transparent), transparent 70%), ${p('night', 'background')});
2354
+ }
2355
+ `;
2356
+
2357
+ /**
2358
+ * How a rail draws its active item, per the application's `SelectableVariant`, in the personality's selection colours
2359
+ * (`--website-product-selection-*`: the brand's tint, or a neutral wash). Total over the variants, so a variant added to
2360
+ * the application's vocabulary does not compile here until it has a drawing.
2361
+ */
2362
+ const SELECTION: Readonly<Record<SelectableVariant, string>> = {
2363
+ [SelectableVariant.FILLED]: `background: ${p('selection', 'background')}; color: ${p('selection', 'foreground')};`,
2364
+ [SelectableVariant.UNDERLINE]: `color: ${p('selection', 'foreground')}; box-shadow: inset 0 calc(${EDGE} * -2) 0 ${p('selection', 'foreground')};`,
2365
+ [SelectableVariant.PILL]: `border-radius: ${p('pill')}; background: ${p('selection', 'background')}; color: ${p('selection', 'foreground')};`,
2366
+ [SelectableVariant.INDICATOR]: `color: ${p('selection', 'foreground')}; box-shadow: inset calc(${EDGE} * 3) 0 0 ${p('selection', 'foreground')};`,
2367
+ [SelectableVariant.SEGMENT]: `background: ${p('surface')}; color: ${p('ink')}; box-shadow: 0 0 0 ${EDGE} ${p('line')}, 0 0.2em 0.5em -0.3em ${p('shadow')};`,
2368
+ [SelectableVariant.CHIP]: `background: ${p('selection', 'background')}; color: ${p('selection', 'foreground')}; box-shadow: 0 0 0 ${EDGE} ${p('selection', 'foreground')} inset;`,
2369
+ };
2370
+ const railSelection = (variant: SelectableVariant): string =>
2371
+ `${part(WebsiteProductPart.WINDOW_RAIL)}${value(V.SELECTABLE, variant)} ${part(WebsiteProductPart.WINDOW_RAIL_ITEM)}${state(WebsiteProductState.ACTIVE)} { ${SELECTION[variant]} }`;
2372
+
2373
+ const WINDOW = `
2374
+ ${atom(WebsiteProductAtom.WINDOW)} {
2375
+ display: grid;
2376
+ grid-template-rows: auto 1fr;
2377
+ overflow: hidden;
2378
+ border: ${EDGE} solid ${p('line')};
2379
+ border-radius: ${r('0.9em')};
2380
+ background: ${p('window')};
2381
+ color: ${p('ink')};
2382
+ font-size: clamp(9px, 1.6cqi, 15px);
2383
+ line-height: 1.4;
2384
+ text-align: start;
2385
+ box-shadow: 0 1px 0 ${p('surface')} inset;
2386
+ }
2387
+ ${part(WebsiteProductPart.WINDOW_BAR)} {
2388
+ display: grid;
2389
+ grid-template-columns: 1fr auto 1fr;
2390
+ align-items: center;
2391
+ height: 2.6em;
2392
+ border-bottom: ${EDGE} solid ${p('line')};
2393
+ padding: 0 ${sp('0.9em')};
2394
+ background: ${p('surface')};
2395
+ }
2396
+ ${part(WebsiteProductPart.WINDOW_DOTS)} { display: flex; gap: ${sp('0.4em')}; }
2397
+ ${part(WebsiteProductPart.WINDOW_DOTS)} > i { width: 0.7em; height: 0.7em; border-radius: 50%; background: ${p('line')}; }
2398
+ ${part(WebsiteProductPart.WINDOW_TITLE)} {
2399
+ border-radius: ${r('0.45em')};
2400
+ padding: ${sp('0.25em')} ${sp('1.2em')};
2401
+ background: ${p('sunken')};
2402
+ color: ${p('muted')};
2403
+ font-size: 0.85em;
2404
+ white-space: nowrap;
2405
+ }
2406
+ ${part(WebsiteProductPart.WINDOW_BODY)} { display: grid; grid-template-columns: 3.4em 1fr; min-height: 24em; }
2407
+ ${part(WebsiteProductPart.WINDOW_BODY)}${state(WebsiteProductState.RAILLESS)} { grid-template-columns: 1fr; }
2408
+ ${part(WebsiteProductPart.WINDOW_RAIL)} {
2409
+ display: flex;
2410
+ flex-direction: column;
2411
+ align-items: center;
2412
+ gap: ${sp('0.35em')};
2413
+ border-right: ${EDGE} solid ${p('line')};
2414
+ padding: ${sp('0.8em')} 0;
2415
+ background: linear-gradient(180deg, ${p('sunken')}, ${p('window')});
2416
+ }
2417
+ ${part(WebsiteProductPart.WINDOW_MARK)} {
2418
+ width: 1.9em;
2419
+ height: 1.9em;
2420
+ margin-bottom: 0.5em;
2421
+ border-radius: ${r('0.5em')};
2422
+ background: var(--website-kit-mark, none) center / 80% no-repeat, ${p('surface')};
2423
+ box-shadow: 0 0 0 ${EDGE} ${p('line')};
2424
+ }
2425
+ ${part(WebsiteProductPart.WINDOW_RAIL_ITEM)} {
2426
+ display: grid;
2427
+ place-items: center;
2428
+ width: 2.2em;
2429
+ height: 2.2em;
2430
+ border-radius: ${r('0.55em')};
2431
+ color: ${p('muted')};
2432
+ }
2433
+ ${part(WebsiteProductPart.WINDOW_RAIL_ITEM)} > svg { width: 1.15em; height: 1.15em; }
2434
+ ${Object.values(SelectableVariant).map(railSelection).join('\n')}
2435
+ ${part(WebsiteProductPart.WINDOW_RAIL_SPACER)} { flex: 1; }
2436
+ ${part(WebsiteProductPart.WINDOW_MAIN)} { min-width: 0; padding: ${sp('1.4em')} ${sp('1.6em')}; }
2437
+ @container (max-width: ${WEBSITE_PRODUCT_NARROW_CONTAINER}) {
2438
+ ${part(WebsiteProductPart.WINDOW_BODY)} { grid-template-columns: 1fr; }
2439
+ ${part(WebsiteProductPart.WINDOW_RAIL)} { display: none; }
2440
+ }
2441
+ `;
2442
+
2443
+ const CHECK = `
2444
+ ${atom(WebsiteProductAtom.CHECK)} {
2445
+ display: grid;
2446
+ place-items: center;
2447
+ width: 1.25em;
2448
+ height: 1.25em;
2449
+ flex: none;
2450
+ border: calc(${EDGE} * 1.5) solid color-mix(in oklab, ${p('muted')} 55%, transparent);
2451
+ border-radius: ${r('0.4em')};
2452
+ color: ${p('primaryForeground')};
2453
+ transition:
2454
+ background-color ${SHORT} ${EFFECT},
2455
+ border-color ${SHORT} ${EFFECT};
2456
+ }
2457
+ ${atom(WebsiteProductAtom.CHECK)} > svg {
2458
+ width: 0.85em;
2459
+ height: 0.85em;
2460
+ stroke-width: 3;
2461
+ opacity: 0;
2462
+ scale: 0.4;
2463
+ transition:
2464
+ opacity ${MICRO} ${EFFECT},
2465
+ scale ${SHORT} ${ENTER};
2466
+ }
2467
+ ${atom(WebsiteProductAtom.CHECK)}${state(WebsiteProductState.DONE)} { border-color: ${p('primary')}; background: ${p('primary')}; }
2468
+ ${atom(WebsiteProductAtom.CHECK)}${state(WebsiteProductState.DONE)} > svg { opacity: 1; scale: 1; }
2469
+ `;
2470
+
2471
+ const statusChip = (status: IndicatorVariant): string =>
2472
+ `${atom(WebsiteProductAtom.CHIP)}${value(V.STATUS, status)} { background: ${p('status', status, 'background')}; color: ${p('status', status, 'foreground')}; }`;
2473
+
2474
+ const CHIP = `
2475
+ ${atom(WebsiteProductAtom.CHIP)} {
2476
+ display: inline-flex;
2477
+ align-items: center;
2478
+ gap: ${sp('0.3em')};
2479
+ width: fit-content;
2480
+ border-radius: ${p('pill')};
2481
+ padding: ${sp('0.15em')} ${sp('0.6em')};
2482
+ background: ${p('status', IndicatorVariant.NEUTRAL, 'background')};
2483
+ color: ${p('status', IndicatorVariant.NEUTRAL, 'foreground')};
2484
+ font-size: 0.8em;
2485
+ font-weight: 600;
2486
+ white-space: nowrap;
2487
+ transition:
2488
+ opacity ${SHORT} ${EFFECT},
2489
+ scale ${MEDIUM} ${ENTER};
2490
+ }
2491
+ ${atom(WebsiteProductAtom.CHIP)} > svg { width: 1em; height: 1em; }
2492
+ ${Object.values(IndicatorVariant).map(statusChip).join('\n')}
2493
+ ${atom(WebsiteProductAtom.CHIP)}${state(WebsiteProductState.OUTLINE)} { background: transparent; box-shadow: 0 0 0 ${EDGE} ${p('line')} inset; }
2494
+ `;
2495
+
2496
+ const avatarFill = (slot: WebsiteProductAvatar): string =>
2497
+ `${atom(WebsiteProductAtom.AVATAR)}${value(V.AVATAR, slot)} { background: ${p('avatars', slot)}; }`;
2498
+
2499
+ const AVATAR = `
2500
+ ${atom(WebsiteProductAtom.AVATAR)} {
2501
+ display: grid;
2502
+ place-items: center;
2503
+ width: 1.8em;
2504
+ height: 1.8em;
2505
+ flex: none;
2506
+ border-radius: 50%;
2507
+ color: white;
2508
+ font-size: 0.72em;
2509
+ font-weight: 700;
2510
+ }
2511
+ ${Object.values(WebsiteProductAvatar).map(avatarFill).join('\n')}
2512
+ `;
2513
+
2514
+ const METER = `
2515
+ ${atom(WebsiteProductAtom.METER)} { display: block; height: 0.45em; overflow: hidden; border-radius: ${p('pill')}; background: ${p('line')}; }
2516
+ ${part(WebsiteProductPart.METER_FILL)} {
2517
+ display: block;
2518
+ width: var(--website-kit-meter, 0%);
2519
+ height: 100%;
2520
+ border-radius: inherit;
2521
+ background: ${p('primary')};
2522
+ transition: width ${LONG} ${EFFECT};
2523
+ }
2524
+ `;
2525
+
2526
+ const BUTTON = `
2527
+ ${atom(WebsiteProductAtom.BUTTON)} {
2528
+ display: inline-flex;
2529
+ align-items: center;
2530
+ justify-content: center;
2531
+ gap: ${sp('0.4em')};
2532
+ border-radius: ${r('0.5em')};
2533
+ padding: ${sp('0.4em')} ${sp('0.9em')};
2534
+ background: ${p('surface')};
2535
+ box-shadow: 0 0 0 ${EDGE} ${p('line')} inset;
2536
+ font-size: 0.85em;
2537
+ font-weight: 650;
2538
+ transition:
2539
+ scale ${MICRO} ${ENTER},
2540
+ box-shadow ${MICRO} ${EFFECT};
2541
+ }
2542
+ ${atom(WebsiteProductAtom.BUTTON)}${value(V.INTERACTIVE, InteractiveVariant.PRIMARY)} { background: ${p('primary')}; box-shadow: none; color: ${p('primaryForeground')}; }
2543
+ ${atom(WebsiteProductAtom.BUTTON)}${value(V.INTERACTIVE, InteractiveVariant.OUTLINE)} { background: transparent; box-shadow: 0 0 0 ${EDGE} ${p('line')} inset; color: ${p('muted')}; }
2544
+ ${atom(WebsiteProductAtom.BUTTON)}${state(WebsiteProductState.PRESSED)} { scale: 0.94; box-shadow: 0 0 0 0.35em ${p('primarySoft')}; }
2545
+ `;
2546
+
2547
+ const TYPED = `
2548
+ ${atom(WebsiteProductAtom.TYPED)} { display: inline-block; white-space: nowrap; }
2549
+ `;
2550
+
2551
+ const FIELD = `
2552
+ ${atom(WebsiteProductAtom.FIELD)} {
2553
+ display: flex;
2554
+ align-items: center;
2555
+ gap: ${sp('0.75em')};
2556
+ border: ${EDGE} dashed color-mix(in oklab, ${p('muted')} 40%, transparent);
2557
+ border-radius: ${r('0.7em')};
2558
+ padding: ${sp('0.6em')} ${sp('0.9em')};
2559
+ color: ${p('muted')};
2560
+ transition:
2561
+ border-color ${SHORT} ${EFFECT},
2562
+ background-color ${SHORT} ${EFFECT};
2563
+ }
2564
+ ${part(WebsiteProductPart.FIELD_PLUS)} {
2565
+ display: grid;
2566
+ place-items: center;
2567
+ width: 1.4em;
2568
+ height: 1.4em;
2569
+ border-radius: ${r('0.4em')};
2570
+ background: ${p('sunken')};
2571
+ font-weight: 700;
2572
+ }
2573
+ ${part(WebsiteProductPart.FIELD_INPUT)} { position: relative; display: grid; flex: 1; }
2574
+ ${part(WebsiteProductPart.FIELD_INPUT)} > * { grid-area: 1 / 1; }
2575
+ ${atom(WebsiteProductAtom.FIELD)} ${atom(WebsiteProductAtom.TYPED)} { color: ${p('ink')}; font-weight: 550; opacity: 0; }
2576
+ ${part(WebsiteProductPart.FIELD_HINT)} { font-size: 0.9em; transition: opacity ${MICRO} ${EFFECT}; }
2577
+ ${atom(WebsiteProductAtom.FIELD)}:is(${state(WebsiteProductState.TYPING)}, ${state(WebsiteProductState.FILLED)}) { border-style: solid; border-color: ${p('primary')}; background: ${p('surface')}; }
2578
+ ${atom(WebsiteProductAtom.FIELD)}:is(${state(WebsiteProductState.TYPING)}, ${state(WebsiteProductState.FILLED)}) ${atom(WebsiteProductAtom.TYPED)} { opacity: 1; }
2579
+ ${atom(WebsiteProductAtom.FIELD)}:is(${state(WebsiteProductState.TYPING)}, ${state(WebsiteProductState.FILLED)}) ${part(WebsiteProductPart.FIELD_HINT)} { opacity: 0; }
2580
+ `;
2581
+
2582
+ const LIST = `
2583
+ ${atom(WebsiteProductAtom.LIST)} {
2584
+ --website-kit-row-gap: 0.9em;
2585
+ --website-kit-row-padding: 0.7em;
2586
+ display: grid;
2587
+ margin: 0;
2588
+ overflow: hidden;
2589
+ border: ${EDGE} solid ${p('line')};
2590
+ border-radius: ${r('0.7em')};
2591
+ padding: 0;
2592
+ background: ${p('surface')};
2593
+ list-style: none;
2594
+ }
2595
+ ${atom(WebsiteProductAtom.ROW)} {
2596
+ display: grid;
2597
+ grid-template-columns: 1fr;
2598
+ grid-auto-flow: column;
2599
+ grid-auto-columns: auto;
2600
+ gap: ${sp('var(--website-kit-row-gap)')};
2601
+ align-items: center;
2602
+ border-bottom: ${EDGE} solid ${p('line')};
2603
+ padding: ${sp('var(--website-kit-row-padding)')} ${sp('0.9em')};
2604
+ transition: background-color ${MEDIUM} ${EFFECT};
2605
+ }
2606
+ ${atom(WebsiteProductAtom.ROW)}${state(WebsiteProductState.LEADING)} { grid-template-columns: auto 1fr; }
2607
+ ${atom(WebsiteProductAtom.ROW)}:last-child { border-bottom: 0; }
2608
+ ${atom(WebsiteProductAtom.LIST)}${state(WebsiteProductState.COMPACT)} { --website-kit-row-gap: 0.8em; --website-kit-row-padding: 0.6em; }
2609
+ ${part(WebsiteProductPart.ROW_TITLE)} {
2610
+ overflow: hidden;
2611
+ font-weight: 550;
2612
+ text-overflow: ellipsis;
2613
+ white-space: nowrap;
2614
+ transition:
2615
+ color ${SHORT} ${EFFECT},
2616
+ text-decoration-color ${SHORT} ${EFFECT};
2617
+ text-decoration: line-through transparent;
2618
+ }
2619
+ ${part(WebsiteProductPart.ROW_META)} { color: ${p('muted')}; font-size: 0.85em; }
2620
+ ${part(WebsiteProductPart.ROW_CELL)} { display: inline-flex; gap: ${sp('0.3em')}; align-items: center; }
2621
+ ${part(WebsiteProductPart.ROW_TITLE)}${state(WebsiteProductState.DETAILED)} { display: grid; white-space: normal; }
2622
+ ${part(WebsiteProductPart.ROW_DETAIL)} { color: ${p('muted')}; font-size: 0.82em; font-weight: 400; }
2623
+ ${atom(WebsiteProductAtom.ROW)}${state(WebsiteProductState.DONE)} ${part(WebsiteProductPart.ROW_TITLE)} { color: ${p('muted')}; text-decoration-color: currentColor; }
2624
+ ${atom(WebsiteProductAtom.ROW)}${state(WebsiteProductState.ARRIVING)} {
2625
+ max-height: 0;
2626
+ overflow: hidden;
2627
+ padding-block: 0;
2628
+ border-bottom-width: 0;
2629
+ opacity: 0;
2630
+ transition:
2631
+ max-height ${MEDIUM} ${EFFECT},
2632
+ padding ${MEDIUM} ${EFFECT},
2633
+ opacity ${SHORT} ${EFFECT},
2634
+ background-color ${LONG} ${EFFECT};
2635
+ }
2636
+ ${atom(WebsiteProductAtom.ROW)}${state(WebsiteProductState.ARRIVING)}${state(WebsiteProductState.IN)} {
2637
+ max-height: 4em;
2638
+ padding-block: ${sp('var(--website-kit-row-padding)')};
2639
+ opacity: 1;
2640
+ background: color-mix(in oklab, ${p('status', IndicatorVariant.SUCCESS, 'background')} 60%, ${p('surface')});
2641
+ }
2642
+ @container (max-width: ${WEBSITE_PRODUCT_NARROW_CONTAINER}) {
2643
+ ${atom(WebsiteProductAtom.ROW)} > ${state(WebsiteProductState.TRAILING)} { display: none; }
2644
+ }
2645
+ `;
2646
+
2647
+ const TOAST = `
2648
+ ${atom(WebsiteProductAtom.TOAST)} {
2649
+ justify-self: end;
2650
+ display: flex;
2651
+ gap: ${sp('0.45em')};
2652
+ align-items: center;
2653
+ margin: 0;
2654
+ border-radius: ${r('0.7em')};
2655
+ padding: ${sp('0.55em')} ${sp('0.8em')};
2656
+ background: ${p('ink')};
2657
+ color: ${p('surface')};
2658
+ font-size: 0.85em;
2659
+ box-shadow: ${websiteDesignTokenCssVar('elevation', 'lift')};
2660
+ opacity: 0;
2661
+ translate: 0 0.8em;
2662
+ transition:
2663
+ opacity ${SHORT} ${EFFECT},
2664
+ translate ${MEDIUM} ${ENTER};
2665
+ }
2666
+ ${atom(WebsiteProductAtom.TOAST)}${state(WebsiteProductState.SHOWN)} { opacity: 1; translate: 0 0; }
2667
+ `;
2668
+
2669
+ const CAPTION = `
2670
+ ${atom(WebsiteProductAtom.CAPTION)} { display: flex; gap: ${sp('0.4em')}; align-items: center; margin: 0; color: ${p('muted')}; font-size: 0.85em; }
2671
+ `;
2672
+
2673
+ const CHAT = `
2674
+ ${atom(WebsiteProductAtom.CHAT)} {
2675
+ display: grid;
2676
+ grid-template-rows: auto 1fr auto;
2677
+ gap: ${sp('0.9em')};
2678
+ height: 100%;
2679
+ max-width: 36em;
2680
+ margin-inline: auto;
2681
+ }
2682
+ ${part(WebsiteProductPart.CHAT_HEAD)} { display: flex; gap: ${sp('0.7em')}; align-items: center; border-bottom: ${EDGE} solid ${p('line')}; padding-bottom: ${sp('0.8em')}; }
2683
+ ${part(WebsiteProductPart.CHAT_HEAD)} strong { display: block; }
2684
+ ${part(WebsiteProductPart.CHAT_HEAD)} small { color: ${p('muted')}; font-size: 0.85em; }
2685
+ ${part(WebsiteProductPart.CHAT_MARK)} {
2686
+ display: grid;
2687
+ place-items: center;
2688
+ width: 2.2em;
2689
+ height: 2.2em;
2690
+ border-radius: ${r('0.6em')};
2691
+ background: ${p('primary')};
2692
+ color: ${p('primaryForeground')};
2693
+ }
2694
+ ${part(WebsiteProductPart.CHAT_LOG)} { display: grid; align-content: start; gap: ${sp('0.6em')}; min-height: 19em; }
2695
+ ${part(WebsiteProductPart.CHAT_INPUT)} {
2696
+ margin: 0;
2697
+ border: ${EDGE} solid ${p('line')};
2698
+ border-radius: ${r('0.7em')};
2699
+ padding: ${sp('0.65em')} ${sp('0.9em')};
2700
+ background: ${p('surface')};
2701
+ color: ${p('muted')};
2702
+ }
2703
+ ${atom(WebsiteProductAtom.BUBBLE)} {
2704
+ max-width: 85%;
2705
+ margin: 0;
2706
+ border-radius: ${r('1em')};
2707
+ padding: ${sp('0.65em')} ${sp('0.95em')};
2708
+ opacity: 0;
2709
+ translate: 0 0.6em;
2710
+ transition:
2711
+ opacity ${SHORT} ${EFFECT},
2712
+ translate ${MEDIUM} ${ENTER};
2713
+ }
2714
+ ${atom(WebsiteProductAtom.BUBBLE)}${state(WebsiteProductState.SHOWN)} { opacity: 1; translate: 0 0; }
2715
+ ${atom(WebsiteProductAtom.BUBBLE)}${value(V.SPEAKER, WebsiteProductSpeaker.PERSON)} {
2716
+ justify-self: end;
2717
+ border-bottom-right-radius: ${r('0.3em')};
2718
+ background: ${p('primary')};
2719
+ color: ${p('primaryForeground')};
2720
+ }
2721
+ ${atom(WebsiteProductAtom.BUBBLE)}${value(V.SPEAKER, WebsiteProductSpeaker.AGENT)},
2722
+ ${atom(WebsiteProductAtom.BUBBLE)}${state(WebsiteProductState.TYPING)} {
2723
+ border-bottom-left-radius: ${r('0.3em')};
2724
+ background: ${p('surface')};
2725
+ box-shadow: 0 0 0 ${EDGE} ${p('line')} inset;
2726
+ }
2727
+ ${atom(WebsiteProductAtom.BUBBLE)}${state(WebsiteProductState.TYPING)} { display: none; gap: ${sp('0.25em')}; width: fit-content; border-bottom-left-radius: ${r('1em')}; }
2728
+ ${atom(WebsiteProductAtom.BUBBLE)}${state(WebsiteProductState.TYPING)}${state(WebsiteProductState.SHOWN)} { display: flex; }
2729
+ ${atom(WebsiteProductAtom.BUBBLE)}${state(WebsiteProductState.TYPING)} > i {
2730
+ width: 0.45em;
2731
+ height: 0.45em;
2732
+ border-radius: 50%;
2733
+ background: ${p('muted')};
2734
+ }
2735
+ `;
2736
+
2737
+ const DECISION = `
2738
+ ${atom(WebsiteProductAtom.DECISION)} {
2739
+ display: grid;
2740
+ gap: ${sp('0.55em')};
2741
+ max-width: 92%;
2742
+ border: ${EDGE} solid color-mix(in oklab, ${p('primary')} 35%, ${p('line')});
2743
+ border-radius: ${r('0.9em')};
2744
+ padding: ${sp('0.9em')} ${sp('1em')};
2745
+ background: ${p('surface')};
2746
+ box-shadow: 0 0.6em 1.6em -0.8em color-mix(in oklab, ${p('primary')} 45%, transparent);
2747
+ opacity: 0;
2748
+ translate: 0 0.8em;
2749
+ transition:
2750
+ opacity ${SHORT} ${EFFECT},
2751
+ translate ${MEDIUM} ${ENTER},
2752
+ border-color ${MEDIUM} ${EFFECT};
2753
+ }
2754
+ ${atom(WebsiteProductAtom.DECISION)}${state(WebsiteProductState.COMPACT)} { width: 100%; max-width: min(22em, 100%); }
2755
+ ${atom(WebsiteProductAtom.DECISION)}${state(WebsiteProductState.SHOWN)} { opacity: 1; translate: 0 0; }
2756
+ ${atom(WebsiteProductAtom.DECISION)} p { margin: 0; }
2757
+ ${part(WebsiteProductPart.DECISION_TITLE)} {
2758
+ display: flex;
2759
+ gap: ${sp('0.4em')};
2760
+ align-items: center;
2761
+ color: ${p('primary')};
2762
+ font-size: 0.82em;
2763
+ font-weight: 700;
2764
+ letter-spacing: 0.03em;
2765
+ text-transform: uppercase;
2766
+ }
2767
+ ${part(WebsiteProductPart.DECISION_TITLE)} > svg { width: 1.1em; height: 1.1em; }
2768
+ ${part(WebsiteProductPart.DECISION_SUBJECT)} { font-weight: 650; }
2769
+ ${part(WebsiteProductPart.DECISION_CHANGE)} {
2770
+ display: flex;
2771
+ flex-wrap: wrap;
2772
+ gap: ${sp('0.5em')};
2773
+ align-items: center;
2774
+ border-radius: ${r('0.5em')};
2775
+ padding: ${sp('0.45em')} ${sp('0.6em')};
2776
+ background: ${p('sunken')};
2777
+ font-size: 0.9em;
2778
+ }
2779
+ ${part(WebsiteProductPart.DECISION_CHANGE)} > span { color: ${p('muted')}; }
2780
+ ${part(WebsiteProductPart.DECISION_CHANGE)} > ins { color: ${p('status', IndicatorVariant.SUCCESS, 'foreground')}; font-weight: 650; text-decoration: none; }
2781
+ ${part(WebsiteProductPart.DECISION_ACTIONS)} { display: flex; gap: ${sp('0.5em')}; }
2782
+ ${part(WebsiteProductPart.DECISION_RESULT)} {
2783
+ display: none;
2784
+ gap: ${sp('0.4em')};
2785
+ align-items: center;
2786
+ color: ${p('status', IndicatorVariant.SUCCESS, 'foreground')};
2787
+ font-size: 0.9em;
2788
+ font-weight: 650;
2789
+ }
2790
+ ${atom(WebsiteProductAtom.DECISION)}${state(WebsiteProductState.DECIDED)} {
2791
+ border-color: var(--website-kit-decided-edge, color-mix(in oklab, ${p('status', IndicatorVariant.SUCCESS, 'foreground')} 35%, ${p('status', IndicatorVariant.SUCCESS, 'background')}));
2792
+ }
2793
+ ${atom(WebsiteProductAtom.DECISION)}${state(WebsiteProductState.DECIDED)} ${part(WebsiteProductPart.DECISION_ACTIONS)} { display: none; }
2794
+ ${atom(WebsiteProductAtom.DECISION)}${state(WebsiteProductState.DECIDED)} ${part(WebsiteProductPart.DECISION_RESULT)} { display: flex; }
2795
+ `;
2796
+
2797
+ const KNOWLEDGE = `
2798
+ ${atom(WebsiteProductAtom.SEARCH)} {
2799
+ display: flex;
2800
+ gap: ${sp('0.6em')};
2801
+ align-items: center;
2802
+ border: ${EDGE} solid ${p('line')};
2803
+ border-radius: ${r('0.8em')};
2804
+ padding: ${sp('0.75em')} ${sp('1em')};
2805
+ background: ${p('surface')};
2806
+ font-size: 1.05em;
2807
+ font-weight: 550;
2808
+ box-shadow: 0 0.4em 1.2em -0.8em ${p('shadow')};
2809
+ }
2810
+ ${atom(WebsiteProductAtom.SEARCH)} > svg { color: ${p('muted')}; }
2811
+ ${atom(WebsiteProductAtom.NOTE)} {
2812
+ margin: 0;
2813
+ color: ${p('muted')};
2814
+ font-size: 0.9em;
2815
+ opacity: 0;
2816
+ transition: opacity ${SHORT} ${EFFECT};
2817
+ }
2818
+ ${atom(WebsiteProductAtom.NOTE)}${state(WebsiteProductState.COLLAPSED)} { display: none; }
2819
+ ${atom(WebsiteProductAtom.NOTE)}${state(WebsiteProductState.SHOWN)} { display: block; opacity: 1; }
2820
+ ${atom(WebsiteProductAtom.PASSAGES)} { display: grid; gap: ${sp('0.7em')}; margin: 0; padding: 0; list-style: none; }
2821
+ ${atom(WebsiteProductAtom.PASSAGE)} {
2822
+ display: grid;
2823
+ gap: ${sp('0.45em')};
2824
+ border: ${EDGE} solid ${p('line')};
2825
+ border-radius: ${r('0.8em')};
2826
+ padding: ${sp('0.85em')} ${sp('1em')};
2827
+ background: ${p('surface')};
2828
+ opacity: 0;
2829
+ translate: 0 0.6em;
2830
+ transition:
2831
+ opacity ${SHORT} ${EFFECT},
2832
+ translate ${MEDIUM} ${ENTER};
2833
+ }
2834
+ ${atom(WebsiteProductAtom.PASSAGE)}${state(WebsiteProductState.SHOWN)} { opacity: 1; translate: 0 0; }
2835
+ ${part(WebsiteProductPart.PASSAGE_SOURCE)} { display: flex; gap: ${sp('0.45em')}; align-items: center; margin: 0; font-size: 0.88em; font-weight: 650; }
2836
+ ${part(WebsiteProductPart.PASSAGE_SOURCE)} > ${atom(WebsiteProductAtom.CHIP)} { margin-left: auto; }
2837
+ ${part(WebsiteProductPart.PASSAGE_QUOTE)} {
2838
+ margin: 0;
2839
+ border-left: 3px solid color-mix(in oklab, ${p('primary')} 50%, transparent);
2840
+ padding-left: ${sp('0.75em')};
2841
+ color: ${p('muted')};
2842
+ }
2843
+ `;
2844
+
2845
+ const NIGHT = `
2846
+ ${atom(WebsiteProductAtom.STREAM)} {
2847
+ overflow: hidden;
2848
+ border: ${EDGE} solid ${p('night', 'line')};
2849
+ border-radius: ${r('1em')};
2850
+ background: ${p('night', 'background')};
2851
+ color: ${p('night', 'ink')};
2852
+ font-size: clamp(11px, 1.9cqi, 15px);
2853
+ }
2854
+ ${part(WebsiteProductPart.STREAM_HEAD)} {
2855
+ display: flex;
2856
+ justify-content: space-between;
2857
+ border-bottom: ${EDGE} solid ${p('night', 'line')};
2858
+ padding: ${sp('0.85em')} ${sp('1.1em')};
2859
+ color: ${p('night', 'muted')};
2860
+ font-size: 0.85em;
2861
+ font-weight: 600;
2862
+ }
2863
+ ${part(WebsiteProductPart.STREAM_LIVE)} { display: inline-flex; gap: ${sp('0.45em')}; align-items: center; color: ${p('night', 'positive')}; }
2864
+ ${part(WebsiteProductPart.STREAM_LIVE)} > i {
2865
+ width: 0.5em;
2866
+ height: 0.5em;
2867
+ border-radius: 50%;
2868
+ background: currentColor;
2869
+ }
2870
+ ${part(WebsiteProductPart.STREAM_ROWS)} { display: flex; flex-direction: column; margin: 0; padding: ${sp('0.4em')} 0; list-style: none; }
2871
+ ${atom(WebsiteProductAtom.STREAM_ROW)} {
2872
+ display: grid;
2873
+ grid-template-columns: auto 1fr auto;
2874
+ gap: ${sp('0.8em')};
2875
+ align-items: center;
2876
+ max-height: 0;
2877
+ overflow: hidden;
2878
+ padding: 0 ${sp('1.1em')};
2879
+ opacity: 0;
2880
+ transition:
2881
+ max-height ${MEDIUM} ${EFFECT},
2882
+ padding ${MEDIUM} ${EFFECT},
2883
+ opacity ${SHORT} ${EFFECT};
2884
+ }
2885
+ ${atom(WebsiteProductAtom.STREAM_ROW)}${state(WebsiteProductState.SHOWN)} { max-height: 4em; padding-block: ${sp('0.55em')}; opacity: 1; }
2886
+ ${part(WebsiteProductPart.STREAM_ROW_ICON)} {
2887
+ display: grid;
2888
+ place-items: center;
2889
+ width: 2em;
2890
+ height: 2em;
2891
+ border-radius: ${r('0.55em')};
2892
+ background: ${p('night', 'surface')};
2893
+ color: ${p('night', 'accent')};
2894
+ }
2895
+ ${part(WebsiteProductPart.STREAM_ROW_EVENT)} { display: grid; }
2896
+ ${part(WebsiteProductPart.STREAM_ROW_EVENT)} > small,
2897
+ ${part(WebsiteProductPart.STREAM_ROW_TIME)} { color: ${p('night', 'muted')}; font-size: 0.82em; }
2898
+ ${part(WebsiteProductPart.STREAM_ROW_TIME)} { font-variant-numeric: tabular-nums; }
2899
+ ${atom(WebsiteProductAtom.TERMINAL)} {
2900
+ width: 100%;
2901
+ max-width: 34em;
2902
+ overflow: hidden;
2903
+ border-radius: ${r('0.9em')};
2904
+ background: ${p('night', 'background')};
2905
+ color: ${p('night', 'ink')};
2906
+ box-shadow: ${websiteDesignTokenCssVar('elevation', 'lift')};
2907
+ font-size: 0.92em;
2908
+ }
2909
+ ${part(WebsiteProductPart.TERMINAL_BAR)} {
2910
+ display: grid;
2911
+ grid-template-columns: auto 1fr auto;
2912
+ gap: ${sp('0.8em')};
2913
+ align-items: center;
2914
+ margin: 0;
2915
+ border-bottom: ${EDGE} solid ${p('night', 'line')};
2916
+ padding: ${sp('0.7em')} ${sp('1em')};
2917
+ color: ${p('night', 'muted')};
2918
+ font-size: 0.85em;
2919
+ }
2920
+ ${part(WebsiteProductPart.TERMINAL_DOTS)} { display: flex; gap: ${sp('0.4em')}; }
2921
+ ${part(WebsiteProductPart.TERMINAL_DOTS)} > i { width: 0.7em; height: 0.7em; border-radius: 50%; background: ${p('night', 'line')}; }
2922
+ ${part(WebsiteProductPart.TERMINAL_SERVER)} { border-radius: ${p('pill')}; padding: ${sp('0.1em')} ${sp('0.6em')}; background: ${p('night', 'surface')}; color: ${p('night', 'accent')}; }
2923
+ ${part(WebsiteProductPart.TERMINAL_CALLS)} { display: grid; gap: ${sp('0.15em')}; margin: 0; padding: ${sp('0.8em')} ${sp('1em')} ${sp('1em')}; list-style: none; }
2924
+ ${atom(WebsiteProductAtom.TERMINAL_CALL)} {
2925
+ display: grid;
2926
+ gap: ${sp('0.15em')};
2927
+ border-radius: ${r('0.5em')};
2928
+ padding: ${sp('0.45em')} ${sp('0.6em')};
2929
+ opacity: 0;
2930
+ translate: 0 0.4em;
2931
+ transition:
2932
+ opacity ${SHORT} ${EFFECT},
2933
+ translate ${MEDIUM} ${ENTER};
2934
+ }
2935
+ ${atom(WebsiteProductAtom.TERMINAL_CALL)}${state(WebsiteProductState.SHOWN)} { opacity: 1; translate: 0 0; }
2936
+ ${atom(WebsiteProductAtom.TERMINAL_CALL)}:nth-child(odd) { background: var(--website-kit-terminal-stripe, color-mix(in oklab, ${p('night', 'surface')} 30%, ${p('night', 'background')})); }
2937
+ ${atom(WebsiteProductAtom.TERMINAL_CALL)} > code { color: ${p('night', 'positive')}; font-family: ${websiteDesignTokenCssVar('fonts', 'mono')}; font-size: 0.92em; }
2938
+ ${atom(WebsiteProductAtom.TERMINAL_CALL)} > span { color: ${p('night', 'muted')}; font-size: 0.88em; }
2939
+ `;
2940
+
2941
+ const PALETTE = `
2942
+ ${atom(WebsiteProductAtom.COMMAND)} {
2943
+ width: 100%;
2944
+ max-width: 20em;
2945
+ overflow: hidden;
2946
+ border-radius: ${r('0.8em')};
2947
+ background: ${p('surface')};
2948
+ box-shadow: 0 0 0 ${EDGE} ${p('line')}, ${websiteDesignTokenCssVar('elevation', 'lift')};
2949
+ }
2950
+ ${part(WebsiteProductPart.COMMAND_INPUT)} { display: flex; gap: ${sp('0.6em')}; align-items: center; margin: 0; border-bottom: ${EDGE} solid ${p('line')}; padding: ${sp('0.7em')} ${sp('0.85em')}; font-weight: 550; }
2951
+ ${part(WebsiteProductPart.COMMAND_INPUT)} > kbd {
2952
+ border-radius: ${r('0.35em')};
2953
+ padding: ${sp('0.1em')} ${sp('0.4em')};
2954
+ background: ${p('sunken')};
2955
+ color: ${p('muted')};
2956
+ font-family: inherit;
2957
+ font-size: 0.8em;
2958
+ }
2959
+ ${part(WebsiteProductPart.COMMAND_RESULTS)} { display: grid; margin: 0; padding: ${sp('0.35em')}; list-style: none; }
2960
+ ${atom(WebsiteProductAtom.COMMAND_ITEM)} {
2961
+ display: flex;
2962
+ justify-content: space-between;
2963
+ gap: ${sp('0.5em')};
2964
+ border-radius: ${r('0.5em')};
2965
+ padding: ${sp('0.5em')} ${sp('0.6em')};
2966
+ font-size: 0.9em;
2967
+ opacity: 0.35;
2968
+ transition:
2969
+ opacity ${SHORT} ${EFFECT},
2970
+ background-color ${SHORT} ${EFFECT};
2971
+ }
2972
+ ${atom(WebsiteProductAtom.COMMAND_ITEM)} > small { color: ${p('muted')}; }
2973
+ ${atom(WebsiteProductAtom.COMMAND_ITEM)}${state(WebsiteProductState.SHOWN)} { opacity: 1; }
2974
+ ${atom(WebsiteProductAtom.COMMAND_ITEM)}${state(WebsiteProductState.ACTIVE)} { background: ${p('primarySoft')}; color: ${p('primary')}; }
2975
+ `;
2976
+
2977
+ const STEP = m(WebsiteMotionCssToken.STEP);
2978
+
2979
+ const CARD = `
2980
+ ${atom(WebsiteProductAtom.CARD)} {
2981
+ display: grid;
2982
+ gap: ${sp('0.7em')};
2983
+ align-content: start;
2984
+ border: ${EDGE} solid ${p('line')};
2985
+ border-radius: ${r('0.8em')};
2986
+ padding: ${sp('0.9em')} ${sp('1em')};
2987
+ background: ${p('surface')};
2988
+ }
2989
+ ${atom(WebsiteProductAtom.CARD)} > p { margin: 0; }
2990
+ ${part(WebsiteProductPart.CARD_TITLE)} { font-size: 0.85em; font-weight: 650; }
2991
+ ${atom(WebsiteProductAtom.CARD)}${state(WebsiteProductState.FLOATING)} {
2992
+ gap: ${sp('0.6em')};
2993
+ width: 100%;
2994
+ max-width: 22em;
2995
+ border: 0;
2996
+ border-radius: ${r('1em')};
2997
+ padding: ${sp('1em')} ${sp('1.1em')};
2998
+ box-shadow: 0 0 0 ${EDGE} ${p('line')}, ${websiteDesignTokenCssVar('elevation', 'soft')};
2999
+ }
3000
+ ${atom(WebsiteProductAtom.CARD)}${state(WebsiteProductState.FLOATING)} > ${part(WebsiteProductPart.CARD_TITLE)} { font-size: inherit; }
3001
+ `;
3002
+
3003
+ const seriesFill = (selector: string) => (slot: WebsiteProductSeries): string => `${selector}${value(V.SERIES, slot)} { background: ${p('series', slot)}; }`;
3004
+
3005
+ const CHARTS = `
3006
+ ${atom(WebsiteProductAtom.DONUT)} {
3007
+ position: relative;
3008
+ display: grid;
3009
+ place-items: center;
3010
+ width: 9em;
3011
+ aspect-ratio: 1;
3012
+ margin: 0.4em auto;
3013
+ border-radius: 50%;
3014
+ background: var(--website-kit-donut);
3015
+ mask: radial-gradient(circle, transparent 55%, black 56%);
3016
+ clip-path: circle(0% at 50% 50%);
3017
+ transition: clip-path ${LONG} ${EFFECT};
3018
+ }
3019
+ ${atom(WebsiteProductAtom.DONUT)}${state(WebsiteProductState.DRAWN)} { clip-path: circle(70% at 50% 50%); }
3020
+ ${atom(WebsiteProductAtom.DONUT)} + ${atom(WebsiteProductAtom.LEGEND)} { margin-top: 0.2em; }
3021
+ ${atom(WebsiteProductAtom.LEGEND)} {
3022
+ display: grid;
3023
+ grid-template-columns: 1fr 1fr;
3024
+ gap: ${sp('0.35em')} ${sp('0.8em')};
3025
+ margin: 0;
3026
+ padding: 0;
3027
+ color: ${p('muted')};
3028
+ font-size: 0.8em;
3029
+ list-style: none;
3030
+ }
3031
+ ${atom(WebsiteProductAtom.LEGEND)} > li { display: flex; gap: ${sp('0.4em')}; align-items: center; }
3032
+ ${atom(WebsiteProductAtom.LEGEND)} i { width: 0.65em; height: 0.65em; border-radius: ${r('0.2em')}; }
3033
+ ${Object.values(WebsiteProductSeries).map(seriesFill(`${atom(WebsiteProductAtom.LEGEND)} i`)).join('\n')}
3034
+ ${atom(WebsiteProductAtom.BARS)} {
3035
+ display: grid;
3036
+ grid-template-columns: repeat(var(--website-kit-bars, 4), 1fr);
3037
+ gap: ${sp('0.6em')};
3038
+ align-items: end;
3039
+ height: 7.5em;
3040
+ }
3041
+ ${part(WebsiteProductPart.BARS_BAR)} { display: grid; grid-template-rows: 1fr auto; gap: ${sp('0.3em')}; height: 100%; text-align: center; }
3042
+ ${part(WebsiteProductPart.BARS_BAR)} > i {
3043
+ align-self: end;
3044
+ height: var(--website-kit-bar);
3045
+ border-radius: ${r('0.35em')} ${r('0.35em')} ${r('0.15em')} ${r('0.15em')};
3046
+ background: linear-gradient(180deg, ${p('series', WebsiteProductSeries.SECOND)}, ${p('series', WebsiteProductSeries.FIRST)});
3047
+ transform-origin: bottom;
3048
+ scale: 1 0;
3049
+ transition: scale ${LONG} ${ENTER};
3050
+ transition-delay: calc(var(--website-kit-bar-index, 0) * ${STEP});
3051
+ }
3052
+ ${atom(WebsiteProductAtom.BARS)}${state(WebsiteProductState.DRAWN)} ${part(WebsiteProductPart.BARS_BAR)} > i { scale: 1 1; }
3053
+ ${part(WebsiteProductPart.BARS_BAR)} > small { color: ${p('muted')}; font-size: 0.75em; }
3054
+ ${atom(WebsiteProductAtom.AREA)} { width: 100%; height: 6em; }
3055
+ ${part(WebsiteProductPart.AREA_FILL)} { fill: ${p('primarySoft')}; opacity: 0; transition: opacity ${LONG} ${EFFECT} ${MEDIUM}; }
3056
+ ${part(WebsiteProductPart.AREA_LINE)} {
3057
+ fill: none;
3058
+ stroke: ${p('primary')};
3059
+ stroke-width: 2.5;
3060
+ stroke-dasharray: 1;
3061
+ stroke-dashoffset: 1;
3062
+ transition: stroke-dashoffset calc(${LONG} * 1.5) ${EFFECT};
3063
+ }
3064
+ ${atom(WebsiteProductAtom.AREA)}${state(WebsiteProductState.DRAWN)} ${part(WebsiteProductPart.AREA_FILL)} { opacity: 1; }
3065
+ ${atom(WebsiteProductAtom.AREA)}${state(WebsiteProductState.DRAWN)} ${part(WebsiteProductPart.AREA_LINE)} { stroke-dashoffset: 0; }
3066
+ `;
3067
+
3068
+ const GRAPH = `
3069
+ ${atom(WebsiteProductAtom.GRAPH)} { position: relative; width: 100%; max-width: 26em; }
3070
+ ${part(WebsiteProductPart.GRAPH_EDGES)} { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
3071
+ ${part(WebsiteProductPart.GRAPH_EDGES)} > path {
3072
+ fill: none;
3073
+ stroke: ${p('primary')};
3074
+ stroke-width: 2;
3075
+ stroke-linecap: round;
3076
+ stroke-dasharray: 1;
3077
+ stroke-dashoffset: 1;
3078
+ transition: stroke-dashoffset ${LONG} ${EFFECT};
3079
+ transition-delay: calc(var(--website-kit-edge-index, 0) * ${STEP} * 3);
3080
+ }
3081
+ ${atom(WebsiteProductAtom.GRAPH)}${state(WebsiteProductState.DRAWN)} ${part(WebsiteProductPart.GRAPH_EDGES)} > path { stroke-dashoffset: 0; }
3082
+ ${part(WebsiteProductPart.GRAPH_NODE)} {
3083
+ position: absolute;
3084
+ translate: -50% -50%;
3085
+ border-radius: ${r('0.6em')};
3086
+ padding: ${sp('0.35em')} ${sp('0.6em')};
3087
+ background: ${p('surface')};
3088
+ box-shadow: 0 0 0 ${EDGE} ${p('line')} inset, 0 0.3em 0.8em -0.5em ${p('shadow')};
3089
+ font-size: 0.8em;
3090
+ font-weight: 600;
3091
+ white-space: nowrap;
3092
+ }
3093
+ ${part(WebsiteProductPart.GRAPH_NODE)}${state(WebsiteProductState.TARGET)} {
3094
+ transition:
3095
+ background-color ${MEDIUM} ${EFFECT},
3096
+ color ${MEDIUM} ${EFFECT};
3097
+ }
3098
+ ${atom(WebsiteProductAtom.GRAPH)}${state(WebsiteProductState.DONE)} ${part(WebsiteProductPart.GRAPH_NODE)}${state(WebsiteProductState.TARGET)} { background: ${p('primary')}; color: ${p('primaryForeground')}; }
3099
+ ${part(WebsiteProductPart.GRAPH_EDGE_LABEL)} {
3100
+ position: absolute;
3101
+ translate: -50% -50%;
3102
+ border-radius: ${p('pill')};
3103
+ padding: ${sp('0.15em')} ${sp('0.55em')};
3104
+ background: ${p('surface')};
3105
+ box-shadow: 0 0 0 ${EDGE} ${p('line')} inset;
3106
+ color: ${p('muted')};
3107
+ font-size: 0.66em;
3108
+ font-weight: 650;
3109
+ letter-spacing: 0.04em;
3110
+ text-transform: uppercase;
3111
+ opacity: 0;
3112
+ transition: opacity ${MEDIUM} ${EFFECT} ${MEDIUM};
3113
+ }
3114
+ ${atom(WebsiteProductAtom.GRAPH)}${state(WebsiteProductState.DRAWN)} ${part(WebsiteProductPart.GRAPH_EDGE_LABEL)} { opacity: 1; }
3115
+ `;
3116
+
3117
+ const LINES = `
3118
+ ${atom(WebsiteProductAtom.LINES)} { display: grid; gap: ${sp('0.4em')}; margin: 0; padding: 0; list-style: none; }
3119
+ ${atom(WebsiteProductAtom.LINE)} {
3120
+ display: grid;
3121
+ grid-template-columns: 1fr;
3122
+ grid-auto-flow: column;
3123
+ grid-auto-columns: auto;
3124
+ gap: ${sp('0.5em')};
3125
+ align-items: center;
3126
+ border-radius: ${r('0.6em')};
3127
+ padding: ${sp('0.5em')} ${sp('0.75em')};
3128
+ background: ${p('surface')};
3129
+ box-shadow: 0 0 0 ${EDGE} ${p('line')} inset;
3130
+ font-size: 0.92em;
3131
+ transition:
3132
+ opacity ${SHORT} ${EFFECT},
3133
+ translate ${MEDIUM} ${ENTER},
3134
+ box-shadow ${SHORT} ${EFFECT};
3135
+ }
3136
+ ${atom(WebsiteProductAtom.LINE)}${state(WebsiteProductState.LEADING)} { grid-template-columns: auto 1fr; }
3137
+ ${atom(WebsiteProductAtom.LINE)} > svg { color: ${p('primary')}; }
3138
+ ${part(WebsiteProductPart.LINE_TEXT)} { display: grid; min-width: 0; }
3139
+ ${part(WebsiteProductPart.LINE_TEXT)} small { color: ${p('muted')}; font-size: 0.85em; }
3140
+ ${atom(WebsiteProductAtom.LINE)}${value(V.SURFACE, WebsiteProductLineSurface.SUNKEN)} { background: ${p('sunken')}; box-shadow: none; }
3141
+ ${atom(WebsiteProductAtom.LINE)}${value(V.ARRIVAL, WebsiteProductArrival.FADE)} { opacity: 0.35; }
3142
+ ${atom(WebsiteProductAtom.LINE)}${value(V.ARRIVAL, WebsiteProductArrival.SLIDE)} { opacity: 0; translate: -0.6em 0; }
3143
+ ${atom(WebsiteProductAtom.LINE)}${value(V.ARRIVAL)}${state(WebsiteProductState.SHOWN)} { opacity: 1; translate: 0 0; }
3144
+ ${atom(WebsiteProductAtom.LINE)}${state(WebsiteProductState.FOCUS)} { box-shadow: 0 0 0 calc(${EDGE} * 2) ${p('primary')} inset; }
3145
+ `;
3146
+
3147
+ const HANDOFF = `
3148
+ ${atom(WebsiteProductAtom.ARROW)} { color: ${p('muted')}; opacity: 0.3; transition: opacity ${SHORT} ${EFFECT}; }
3149
+ ${atom(WebsiteProductAtom.ARROW)}${state(WebsiteProductState.SHOWN)} { opacity: 1; }
3150
+ ${atom(WebsiteProductAtom.HANDOFF)} { display: grid; grid-template-columns: 1fr auto 1fr; gap: ${sp('0.6em')}; align-items: center; width: 100%; max-width: 24em; }
3151
+ ${part(WebsiteProductPart.HANDOFF_SOURCE)},
3152
+ ${part(WebsiteProductPart.HANDOFF_TARGET)} {
3153
+ display: flex;
3154
+ gap: ${sp('0.5em')};
3155
+ align-items: center;
3156
+ margin: 0;
3157
+ border-radius: ${r('0.7em')};
3158
+ padding: ${sp('0.6em')} ${sp('0.7em')};
3159
+ background: ${p('surface')};
3160
+ box-shadow: 0 0 0 ${EDGE} ${p('line')} inset;
3161
+ font-size: 0.85em;
3162
+ transition:
3163
+ opacity ${MEDIUM} ${EFFECT},
3164
+ translate ${MEDIUM} ${ENTER};
3165
+ }
3166
+ ${part(WebsiteProductPart.HANDOFF_SOURCE)} > span,
3167
+ ${part(WebsiteProductPart.HANDOFF_TARGET)} > span { display: grid; }
3168
+ ${atom(WebsiteProductAtom.HANDOFF)} small { color: ${p('muted')}; font-size: 0.85em; }
3169
+ ${part(WebsiteProductPart.HANDOFF_SOURCE)} > svg { color: ${p('primary')}; }
3170
+ ${part(WebsiteProductPart.HANDOFF_TARGET)} { opacity: 0; translate: -0.8em 0; }
3171
+ ${atom(WebsiteProductAtom.HANDOFF)}${state(WebsiteProductState.LANDED)} ${part(WebsiteProductPart.HANDOFF_TARGET)} { opacity: 1; translate: 0 0; }
3172
+ `;
3173
+
3174
+ const CONNECTION = `
3175
+ ${atom(WebsiteProductAtom.CONNECTION)} { display: grid; grid-template-columns: auto 1fr auto; gap: ${sp('0.6em')}; align-items: center; width: 100%; max-width: 24em; }
3176
+ ${part(WebsiteProductPart.CONNECTION_END)} { display: grid; justify-items: center; gap: ${sp('0.35em')}; font-size: 0.85em; font-weight: 600; }
3177
+ ${part(WebsiteProductPart.CONNECTION_END)} > ${atom(WebsiteProductAtom.AVATAR)} { width: 3em; height: 3em; font-size: 0.9em; }
3178
+ ${part(WebsiteProductPart.CONNECTION_LINK)} { position: relative; display: grid; place-items: center; height: 2.5em; }
3179
+ ${part(WebsiteProductPart.CONNECTION_LINK)} > i {
3180
+ width: 100%;
3181
+ height: calc(${EDGE} * 2);
3182
+ background: ${p('line')};
3183
+ transform-origin: left;
3184
+ scale: 0 1;
3185
+ transition:
3186
+ scale ${LONG} ${ENTER},
3187
+ background-color ${MEDIUM} ${EFFECT};
3188
+ }
3189
+ ${atom(WebsiteProductAtom.CONNECTION)}${state(WebsiteProductState.LINKED)} ${part(WebsiteProductPart.CONNECTION_LINK)} > i { scale: 1 1; background: ${p('primary')}; }
3190
+ ${part(WebsiteProductPart.CONNECTION_PACKET)} {
3191
+ position: absolute;
3192
+ border-radius: ${p('pill')};
3193
+ padding: ${sp('0.2em')} ${sp('0.6em')};
3194
+ background: ${p('surface')};
3195
+ box-shadow: 0 0 0 ${EDGE} ${p('line')} inset;
3196
+ font-size: 0.75em;
3197
+ font-weight: 600;
3198
+ opacity: 0;
3199
+ translate: -2em 0;
3200
+ transition:
3201
+ opacity ${SHORT} ${EFFECT},
3202
+ translate ${LONG} ${ENTER};
3203
+ }
3204
+ ${atom(WebsiteProductAtom.CONNECTION)}${state(WebsiteProductState.SHARED)} ${part(WebsiteProductPart.CONNECTION_PACKET)} { opacity: 1; translate: 0 0; }
3205
+ /* A flex box, so the status adds no line box of its own around its chip. */
3206
+ ${part(WebsiteProductPart.CONNECTION_STATUS)} { display: flex; grid-column: 1 / -1; justify-self: center; }
3207
+ `;
3208
+
3209
+ const SCREEN = `
3210
+ /* Each stack and list sets its own spacing, so a nested one never inherits its parent's: a site sets
3211
+ --website-kit-stack-gap on the stack it means (unlayered, it wins over this default). */
3212
+ ${atom(WebsiteProductAtom.STACK)} { --website-kit-stack-gap: 1em; display: grid; gap: ${sp('var(--website-kit-stack-gap)')}; }
3213
+ ${atom(WebsiteProductAtom.STACK)}${state(WebsiteProductState.NARROW)} { max-width: 40em; }
3214
+ ${atom(WebsiteProductAtom.HEADING)} { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: ${sp('1em')}; }
3215
+ ${atom(WebsiteProductAtom.HEADING)}:has(${part(WebsiteProductPart.HEADING_META)}) { align-items: flex-end; }
3216
+ ${part(WebsiteProductPart.HEADING_TEXT)} { min-width: 0; }
3217
+ ${part(WebsiteProductPart.HEADING_END)} { display: flex; gap: ${sp('0.5em')}; align-items: center; }
3218
+ ${part(WebsiteProductPart.HEADING_TITLE)} { margin: 0; font-size: 1.35em; font-weight: 700; letter-spacing: -0.02em; }
3219
+ ${atom(WebsiteProductAtom.HEADING)}${state(WebsiteProductState.COMPACT)} ${part(WebsiteProductPart.HEADING_TITLE)} { font-size: 1.25em; letter-spacing: normal; }
3220
+ ${part(WebsiteProductPart.HEADING_META)} { margin: 0.15em 0 0; color: ${p('muted')}; font-size: 0.9em; }
3221
+ `;
3222
+
3223
+ const RECORD = `
3224
+ ${atom(WebsiteProductAtom.RECORD)} {
3225
+ display: grid;
3226
+ grid-template-columns: auto 1fr;
3227
+ grid-auto-flow: column;
3228
+ grid-auto-columns: auto;
3229
+ gap: ${sp('0.8em')};
3230
+ align-items: center;
3231
+ border: ${EDGE} solid ${p('line')};
3232
+ border-radius: ${r('0.7em')};
3233
+ padding: ${sp('0.75em')} ${sp('0.9em')};
3234
+ background: ${p('surface')};
3235
+ transition:
3236
+ border-color ${SHORT} ${EFFECT},
3237
+ box-shadow ${SHORT} ${EFFECT};
3238
+ }
3239
+ ${atom(WebsiteProductAtom.RECORD)}${state(WebsiteProductState.FOCUS)} {
3240
+ border-color: color-mix(in oklab, ${p('primary')} 45%, ${p('line')});
3241
+ box-shadow: 0 0 0 0.3em ${p('primarySoft')};
3242
+ }
3243
+ ${part(WebsiteProductPart.RECORD_ICON)} {
3244
+ display: grid;
3245
+ place-items: center;
3246
+ width: 2em;
3247
+ height: 2em;
3248
+ border-radius: ${r('0.5em')};
3249
+ background: ${p('sunken')};
3250
+ color: ${p('muted')};
3251
+ }
3252
+ ${part(WebsiteProductPart.RECORD_MAIN)} { display: grid; }
3253
+ ${part(WebsiteProductPart.RECORD_MAIN)} > small { color: ${p('muted')}; font-size: 0.82em; }
3254
+ ${part(WebsiteProductPart.RECORD_STATUS)} { display: grid; }
3255
+ ${part(WebsiteProductPart.RECORD_ACTION)} { display: flex; }
3256
+ ${atom(WebsiteProductAtom.SWAP)} { display: grid; }
3257
+ ${atom(WebsiteProductAtom.SWAP)} > * {
3258
+ grid-area: 1 / 1;
3259
+ transition:
3260
+ opacity ${SHORT} ${EFFECT},
3261
+ scale ${MEDIUM} ${ENTER};
3262
+ }
3263
+ ${atom(WebsiteProductAtom.SWAP)} > :last-child { opacity: 0; scale: 0.7; }
3264
+ ${atom(WebsiteProductAtom.SWAP)}${state(WebsiteProductState.SWAPPED)} > :first-child { opacity: 0; }
3265
+ ${atom(WebsiteProductAtom.SWAP)}${state(WebsiteProductState.SWAPPED)} > :last-child { opacity: 1; scale: 1; }
3266
+ @container (max-width: ${WEBSITE_PRODUCT_NARROW_CONTAINER}) {
3267
+ ${atom(WebsiteProductAtom.RECORD)} > ${state(WebsiteProductState.TRAILING)} { display: none; }
3268
+ }
3269
+ `;
3270
+
3271
+ const MOVE = m(WebsiteMotionCssToken.EASE_MOVE);
3272
+ const MOVE_EFFECT = m(WebsiteMotionCssToken.EASE_MOVE_EFFECT);
3273
+
3274
+ /**
3275
+ * Every animation the kit plays on its own (the typing dots, a pulse), and only where it may: inside a demo stage, whose
3276
+ * pause control, off-screen pause and reduced-motion rule hold or remove it, and only for a visitor who has not asked
3277
+ * for reduced motion. Outside a stage a drawing shows its states and nothing moves.
3278
+ *
3279
+ * Typing is not an animation here: the scenario's player (`useWebsiteDemoScenario`) reveals the words one character
3280
+ * at a time, at a pace set by their length in the visitor's language. A stylesheet cannot know that length, and the
3281
+ * engine's motion guard requires every timing it reads to be a tempo token or a literal.
3282
+ */
3283
+ const ANIMATIONS = `
3284
+ @media (prefers-reduced-motion: no-preference) {
3285
+ ${STAGE} ${atom(WebsiteProductAtom.BUBBLE)}${state(WebsiteProductState.TYPING)} > i {
3286
+ animation:
3287
+ website-product-dot-rise calc(${LONG} * 1.25) ${MOVE} infinite,
3288
+ website-product-dot-fade calc(${LONG} * 1.25) ${MOVE_EFFECT} infinite;
3289
+ }
3290
+ ${STAGE} ${atom(WebsiteProductAtom.BUBBLE)}${state(WebsiteProductState.TYPING)} > i:nth-child(2) { animation-delay: ${MICRO}; }
3291
+ ${STAGE} ${atom(WebsiteProductAtom.BUBBLE)}${state(WebsiteProductState.TYPING)} > i:nth-child(3) { animation-delay: calc(${MICRO} * 2); }
3292
+ ${STAGE} ${atom(WebsiteProductAtom.NOTE)}${state(WebsiteProductState.WORKING)}${state(WebsiteProductState.SHOWN)} {
3293
+ animation: website-product-pulse calc(${LONG} * 1.1) ${MOVE_EFFECT} infinite;
3294
+ }
3295
+ ${STAGE} ${part(WebsiteProductPart.STREAM_LIVE)} > i { animation: website-product-pulse calc(${LONG} * 1.7) ${MOVE_EFFECT} infinite; }
3296
+ }
3297
+ @keyframes website-product-dot-rise {
3298
+ 0%, 80%, 100% { translate: 0 0; }
3299
+ 40% { translate: 0 -0.2em; }
3300
+ }
3301
+ @keyframes website-product-dot-fade {
3302
+ 0%, 80%, 100% { opacity: 0.3; }
3303
+ 40% { opacity: 1; }
3304
+ }
3305
+ @keyframes website-product-pulse { 50% { opacity: 0.4; } }
3306
+ `;
3307
+
3308
+ export const WEBSITE_PRODUCT_KIT_CSS: string = `@layer wildo-website {${ICONS}${FRAMES}${WINDOW}${CHECK}${CHIP}${AVATAR}${METER}${BUTTON}${TYPED}${FIELD}${LIST}${TOAST}${SCREEN}${RECORD}${CAPTION}${CHAT}${DECISION}${KNOWLEDGE}${NIGHT}${PALETTE}${CARD}${CHARTS}${GRAPH}${LINES}${HANDOFF}${CONNECTION}${ANIMATIONS}}`;
3309
+ ```