@jean-is/render 0.10.0-rbdd0a4d699e2 → 0.11.0-r93a42b20fbc6

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 (349) hide show
  1. package/brand.js +2 -1
  2. package/caps/brain-local/watermark.js +1 -0
  3. package/caps/charts/charts.css +1 -0
  4. package/caps/charts/charts.js +1 -0
  5. package/caps/charts/option.js +1 -0
  6. package/caps/files/extract.js +1 -0
  7. package/caps/files/midi.js +1 -0
  8. package/caps/files/numbers.js +1 -0
  9. package/caps/files/office.js +1 -0
  10. package/caps/files/pdf.js +1 -0
  11. package/caps/games/file.js +1 -0
  12. package/caps/games/frame.css +1 -0
  13. package/caps/games/guard.js +1 -0
  14. package/caps/games/page.js +1 -0
  15. package/caps/games/shell.js +1 -0
  16. package/caps/interactive/apps.js +1 -0
  17. package/caps/interactive/diagram-worker.js +1 -0
  18. package/caps/interactive/diagram.js +1 -0
  19. package/caps/interactive/interactive.css +1 -0
  20. package/caps/interactive/interactive.js +1 -0
  21. package/caps/interactive/live.js +1 -0
  22. package/caps/interactive/map.js +1 -0
  23. package/caps/interactive/mode.js +1 -0
  24. package/caps/interactive/page-diagram.js +1 -0
  25. package/caps/interactive/parts.js +1 -0
  26. package/caps/interactive/starts.js +1 -0
  27. package/caps/interactive/test.js +1 -0
  28. package/caps/interactive/view-parts.js +1 -0
  29. package/caps/layouts/layouts.css +1 -0
  30. package/caps/layouts/layouts.js +1 -0
  31. package/caps/layouts/shapes.js +1 -0
  32. package/caps/layouts/types.d.ts +1 -0
  33. package/caps/made/formats.js +1 -0
  34. package/caps/made/paper.js +1 -0
  35. package/caps/math/latex.js +1 -0
  36. package/caps/math/math.css +1 -0
  37. package/caps/math/math.js +1 -0
  38. package/caps/pictures/mark.js +1 -0
  39. package/caps/receipt/certificate.js +1 -0
  40. package/caps/receipt/der.js +1 -0
  41. package/caps/scores/notes.js +1 -0
  42. package/caps/scores/scores.css +3 -2
  43. package/caps/scores/scores.js +1 -0
  44. package/caps/scores/sound-worker.js +1 -0
  45. package/caps/scores/sound.js +1 -0
  46. package/caps/share/seal.js +1 -0
  47. package/caps/share/view.js +1 -0
  48. package/caps/skills/directory.js +1 -0
  49. package/caps/skills/sources.js +1 -0
  50. package/caps/slides/brand.js +1 -0
  51. package/caps/slides/edit.js +1 -0
  52. package/caps/slides/kit-page.css +1 -0
  53. package/caps/slides/kit-page.js +1 -0
  54. package/caps/slides/kit-sample.js +1 -0
  55. package/caps/slides/kit-slot.js +1 -0
  56. package/caps/slides/kit.js +20 -2
  57. package/caps/slides/save.js +1 -0
  58. package/caps/slides/slides.css +3 -2
  59. package/caps/slides/slides.js +9 -7
  60. package/caps/tables/formula.js +1 -0
  61. package/core/anthropic.js +2 -1
  62. package/core/conversations.js +1 -0
  63. package/core/deferred.js +1 -0
  64. package/core/events.js +1 -0
  65. package/core/files.js +1 -0
  66. package/core/fs.js +1 -0
  67. package/core/hooks.js +1 -0
  68. package/core/i18n.js +1 -0
  69. package/core/llm.js +5 -2
  70. package/core/loop.js +4 -1
  71. package/core/oauth.js +1 -0
  72. package/core/rules.js +1 -0
  73. package/core/search.js +1 -0
  74. package/core/settings.js +6 -4
  75. package/core/skills.js +1 -0
  76. package/core/sse.js +1 -0
  77. package/core/ulid.js +1 -0
  78. package/core/vertex.js +1 -0
  79. package/core/zip.js +1 -0
  80. package/locales/am.json +1 -0
  81. package/locales/ar.json +1 -0
  82. package/locales/bg.json +1 -0
  83. package/locales/bn.json +1 -0
  84. package/locales/br.json +1 -0
  85. package/locales/co.json +1 -0
  86. package/locales/connections/am.json +7 -0
  87. package/locales/connections/ar.json +7 -0
  88. package/locales/connections/bg.json +7 -0
  89. package/locales/connections/bn.json +7 -0
  90. package/locales/connections/br.json +7 -0
  91. package/locales/connections/co.json +7 -0
  92. package/locales/connections/cs.json +7 -0
  93. package/locales/connections/da.json +7 -0
  94. package/locales/connections/de.json +7 -0
  95. package/locales/connections/el.json +7 -0
  96. package/locales/connections/en.json +7 -0
  97. package/locales/connections/es.json +7 -0
  98. package/locales/connections/fa.json +7 -0
  99. package/locales/connections/fi.json +7 -0
  100. package/locales/connections/fr-CA.json +7 -0
  101. package/locales/connections/fr.json +7 -0
  102. package/locales/connections/ha.json +7 -0
  103. package/locales/connections/he.json +7 -0
  104. package/locales/connections/hi.json +7 -0
  105. package/locales/connections/hr.json +7 -0
  106. package/locales/connections/hu.json +7 -0
  107. package/locales/connections/id.json +7 -0
  108. package/locales/connections/it.json +7 -0
  109. package/locales/connections/ja.json +7 -0
  110. package/locales/connections/ko.json +7 -0
  111. package/locales/connections/mr.json +7 -0
  112. package/locales/connections/ms.json +7 -0
  113. package/locales/connections/nl.json +7 -0
  114. package/locales/connections/pl.json +7 -0
  115. package/locales/connections/pt.json +7 -0
  116. package/locales/connections/ro.json +7 -0
  117. package/locales/connections/ru.json +7 -0
  118. package/locales/connections/sk.json +7 -0
  119. package/locales/connections/sv.json +7 -0
  120. package/locales/connections/sw.json +7 -0
  121. package/locales/connections/ta.json +7 -0
  122. package/locales/connections/te.json +7 -0
  123. package/locales/connections/th.json +7 -0
  124. package/locales/connections/tl.json +7 -0
  125. package/locales/connections/tr.json +7 -0
  126. package/locales/connections/uk.json +7 -0
  127. package/locales/connections/ur.json +7 -0
  128. package/locales/connections/vi.json +7 -0
  129. package/locales/connections/yo.json +7 -0
  130. package/locales/connections/zh-Hans.json +7 -0
  131. package/locales/connections/zh-Hant.json +7 -0
  132. package/locales/cs.json +1 -0
  133. package/locales/da.json +1 -0
  134. package/locales/de.json +1 -0
  135. package/locales/documents/am.json +0 -2
  136. package/locales/documents/ar.json +0 -2
  137. package/locales/documents/bg.json +0 -2
  138. package/locales/documents/bn.json +0 -2
  139. package/locales/documents/br.json +0 -2
  140. package/locales/documents/co.json +0 -2
  141. package/locales/documents/cs.json +0 -2
  142. package/locales/documents/da.json +0 -2
  143. package/locales/documents/de.json +0 -2
  144. package/locales/documents/el.json +0 -2
  145. package/locales/documents/en.json +0 -2
  146. package/locales/documents/es.json +0 -2
  147. package/locales/documents/fa.json +0 -2
  148. package/locales/documents/fi.json +0 -2
  149. package/locales/documents/fr-CA.json +0 -2
  150. package/locales/documents/fr.json +0 -2
  151. package/locales/documents/ha.json +0 -2
  152. package/locales/documents/he.json +0 -2
  153. package/locales/documents/hi.json +0 -2
  154. package/locales/documents/hr.json +0 -2
  155. package/locales/documents/hu.json +0 -2
  156. package/locales/documents/id.json +0 -2
  157. package/locales/documents/it.json +0 -2
  158. package/locales/documents/ja.json +0 -2
  159. package/locales/documents/ko.json +0 -2
  160. package/locales/documents/mr.json +0 -2
  161. package/locales/documents/ms.json +0 -2
  162. package/locales/documents/nl.json +0 -2
  163. package/locales/documents/pl.json +0 -2
  164. package/locales/documents/pt.json +0 -2
  165. package/locales/documents/ro.json +0 -2
  166. package/locales/documents/ru.json +0 -2
  167. package/locales/documents/sk.json +0 -2
  168. package/locales/documents/sv.json +0 -2
  169. package/locales/documents/sw.json +0 -2
  170. package/locales/documents/ta.json +0 -2
  171. package/locales/documents/te.json +0 -2
  172. package/locales/documents/th.json +0 -2
  173. package/locales/documents/tl.json +0 -2
  174. package/locales/documents/tr.json +0 -2
  175. package/locales/documents/uk.json +0 -2
  176. package/locales/documents/ur.json +0 -2
  177. package/locales/documents/vi.json +0 -2
  178. package/locales/documents/yo.json +0 -2
  179. package/locales/documents/zh-Hans.json +0 -2
  180. package/locales/documents/zh-Hant.json +0 -2
  181. package/locales/el.json +1 -0
  182. package/locales/en.json +1 -0
  183. package/locales/es.json +1 -0
  184. package/locales/fa.json +1 -0
  185. package/locales/fi.json +1 -0
  186. package/locales/fr-CA.json +1 -0
  187. package/locales/fr.json +1 -0
  188. package/locales/ha.json +1 -0
  189. package/locales/he.json +1 -0
  190. package/locales/hi.json +1 -0
  191. package/locales/hr.json +1 -0
  192. package/locales/hu.json +1 -0
  193. package/locales/id.json +1 -0
  194. package/locales/it.json +1 -0
  195. package/locales/ja.json +1 -0
  196. package/locales/ko.json +1 -0
  197. package/locales/mr.json +1 -0
  198. package/locales/ms.json +1 -0
  199. package/locales/nl.json +1 -0
  200. package/locales/pl.json +1 -0
  201. package/locales/prototypes/am.json +1 -4
  202. package/locales/prototypes/ar.json +1 -4
  203. package/locales/prototypes/bg.json +1 -4
  204. package/locales/prototypes/bn.json +1 -4
  205. package/locales/prototypes/br.json +1 -4
  206. package/locales/prototypes/co.json +1 -4
  207. package/locales/prototypes/cs.json +1 -4
  208. package/locales/prototypes/da.json +1 -4
  209. package/locales/prototypes/de.json +1 -4
  210. package/locales/prototypes/el.json +1 -4
  211. package/locales/prototypes/en.json +1 -4
  212. package/locales/prototypes/es.json +1 -4
  213. package/locales/prototypes/fa.json +1 -4
  214. package/locales/prototypes/fi.json +1 -4
  215. package/locales/prototypes/fr-CA.json +1 -4
  216. package/locales/prototypes/fr.json +1 -4
  217. package/locales/prototypes/ha.json +1 -4
  218. package/locales/prototypes/he.json +1 -4
  219. package/locales/prototypes/hi.json +1 -4
  220. package/locales/prototypes/hr.json +1 -4
  221. package/locales/prototypes/hu.json +1 -4
  222. package/locales/prototypes/id.json +1 -4
  223. package/locales/prototypes/it.json +1 -4
  224. package/locales/prototypes/ja.json +1 -4
  225. package/locales/prototypes/ko.json +1 -4
  226. package/locales/prototypes/mr.json +1 -4
  227. package/locales/prototypes/ms.json +1 -4
  228. package/locales/prototypes/nl.json +1 -4
  229. package/locales/prototypes/pl.json +1 -4
  230. package/locales/prototypes/pt.json +1 -4
  231. package/locales/prototypes/ro.json +1 -4
  232. package/locales/prototypes/ru.json +1 -4
  233. package/locales/prototypes/sk.json +1 -4
  234. package/locales/prototypes/sv.json +1 -4
  235. package/locales/prototypes/sw.json +1 -4
  236. package/locales/prototypes/ta.json +1 -4
  237. package/locales/prototypes/te.json +1 -4
  238. package/locales/prototypes/th.json +1 -4
  239. package/locales/prototypes/tl.json +1 -4
  240. package/locales/prototypes/tr.json +1 -4
  241. package/locales/prototypes/uk.json +1 -4
  242. package/locales/prototypes/ur.json +1 -4
  243. package/locales/prototypes/vi.json +1 -4
  244. package/locales/prototypes/yo.json +1 -4
  245. package/locales/prototypes/zh-Hans.json +1 -4
  246. package/locales/prototypes/zh-Hant.json +1 -4
  247. package/locales/pt.json +1 -0
  248. package/locales/ro.json +1 -0
  249. package/locales/ru.json +1 -0
  250. package/locales/sk.json +1 -0
  251. package/locales/skills/am.json +2 -1
  252. package/locales/skills/ar.json +2 -1
  253. package/locales/skills/bg.json +2 -1
  254. package/locales/skills/bn.json +2 -1
  255. package/locales/skills/br.json +2 -1
  256. package/locales/skills/co.json +2 -1
  257. package/locales/skills/cs.json +2 -1
  258. package/locales/skills/da.json +2 -1
  259. package/locales/skills/de.json +2 -1
  260. package/locales/skills/el.json +2 -1
  261. package/locales/skills/en.json +2 -1
  262. package/locales/skills/es.json +2 -1
  263. package/locales/skills/fa.json +2 -1
  264. package/locales/skills/fi.json +2 -1
  265. package/locales/skills/fr-CA.json +2 -1
  266. package/locales/skills/fr.json +2 -1
  267. package/locales/skills/ha.json +2 -1
  268. package/locales/skills/he.json +2 -1
  269. package/locales/skills/hi.json +2 -1
  270. package/locales/skills/hr.json +2 -1
  271. package/locales/skills/hu.json +2 -1
  272. package/locales/skills/id.json +2 -1
  273. package/locales/skills/it.json +2 -1
  274. package/locales/skills/ja.json +2 -1
  275. package/locales/skills/ko.json +2 -1
  276. package/locales/skills/mr.json +2 -1
  277. package/locales/skills/ms.json +2 -1
  278. package/locales/skills/nl.json +2 -1
  279. package/locales/skills/pl.json +2 -1
  280. package/locales/skills/pt.json +2 -1
  281. package/locales/skills/ro.json +2 -1
  282. package/locales/skills/ru.json +2 -1
  283. package/locales/skills/sk.json +2 -1
  284. package/locales/skills/sv.json +2 -1
  285. package/locales/skills/sw.json +2 -1
  286. package/locales/skills/ta.json +2 -1
  287. package/locales/skills/te.json +2 -1
  288. package/locales/skills/th.json +2 -1
  289. package/locales/skills/tl.json +2 -1
  290. package/locales/skills/tr.json +2 -1
  291. package/locales/skills/uk.json +2 -1
  292. package/locales/skills/ur.json +2 -1
  293. package/locales/skills/vi.json +2 -1
  294. package/locales/skills/yo.json +2 -1
  295. package/locales/skills/zh-Hans.json +2 -1
  296. package/locales/skills/zh-Hant.json +2 -1
  297. package/locales/sv.json +1 -0
  298. package/locales/sw.json +1 -0
  299. package/locales/ta.json +1 -0
  300. package/locales/te.json +1 -0
  301. package/locales/th.json +1 -0
  302. package/locales/tl.json +1 -0
  303. package/locales/tr.json +1 -0
  304. package/locales/uk.json +1 -0
  305. package/locales/ur.json +1 -0
  306. package/locales/vi.json +1 -0
  307. package/locales/yo.json +1 -0
  308. package/locales/zh-Hans.json +1 -0
  309. package/locales/zh-Hant.json +1 -0
  310. package/package.json +1 -1
  311. package/preview.html +1 -0
  312. package/ui/base.js +1 -0
  313. package/ui/caps.js +1 -0
  314. package/ui/colour.js +1 -0
  315. package/ui/csp.js +1 -0
  316. package/ui/export.js +1 -0
  317. package/ui/icons.js +1 -0
  318. package/ui/kit.js +1 -0
  319. package/ui/language.js +1 -0
  320. package/ui/looks/blueprint.css +1 -0
  321. package/ui/looks/classic.css +1 -0
  322. package/ui/looks/fjord.css +1 -0
  323. package/ui/looks/human.css +1 -0
  324. package/ui/looks/mail.css +1 -0
  325. package/ui/looks/minimal.css +1 -0
  326. package/ui/looks/neon.css +1 -0
  327. package/ui/looks/notebook.css +1 -0
  328. package/ui/looks/swiss.css +1 -0
  329. package/ui/looks/terminal.css +1 -0
  330. package/ui/looks/tilde.css +1 -0
  331. package/ui/looks/velvet.css +1 -0
  332. package/ui/looks.js +1 -0
  333. package/ui/markdown.js +1 -0
  334. package/ui/menu-icons.js +1 -0
  335. package/ui/model.js +1 -0
  336. package/ui/pointed.js +1 -0
  337. package/ui/reader-state.js +1 -0
  338. package/ui/reader.js +1 -0
  339. package/ui/review.js +1 -0
  340. package/ui/save.js +1 -0
  341. package/ui/seal.js +1 -0
  342. package/ui/sheet.js +1 -0
  343. package/ui/shown.js +1 -0
  344. package/ui/style.css +1 -0
  345. package/ui/touches.js +1 -0
  346. package/ui/trusted.js +1 -0
  347. package/ui/view.css +13 -11
  348. package/ui/view.js +2 -1
  349. package/ui/weights.js +1 -0
package/brand.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // The only place the name lives. Display only: never use it in storage keys,
2
3
  // file paths, cache names, CSS classes or element names (see AGENTS.md).
3
4
  export const BRAND = Object.seal({
@@ -7,7 +8,7 @@ export const BRAND = Object.seal({
7
8
 
8
9
  // The brand's site's pages the app links to, by language (site/), held to site/'s by test/home.test.js.
9
10
  export const PAGES = Object.freeze({
10
- home: { en: '', ar: 'ar', fr: 'fr', ja: 'ja', ko: 'ko' },
11
+ home: { en: '', ...Object.fromEntries('ar br co da de es fi fr fr-CA ha hu id it ja ko ms nl pl pt ro tl zh-Hans zh-Hant'.split(' ').map((lang) => [lang, lang])) },
11
12
  help: { en: 'help', fr: 'fr/aide' },
12
13
  'site-map': { en: 'site-map', fr: 'fr/plan-du-site' },
13
14
  'help/key-refused': { en: 'help/key-refused', fr: 'fr/aide/cle-refusee' },
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // The watermark in what the brain on this device writes (D402), the AI Act's mark for text, which
2
3
  // can carry no metadata. Gemma's makers sample its words (a temperature of 1, the 64 likeliest, the
3
4
  // fewest whose chances reach 95%); here each is the winner of the exponential race of Aaronson's
@@ -1,3 +1,4 @@
1
+ /* SPDX-License-Identifier: MIT */
1
2
  /* Charts (D196): the chart in its frame, Copy at its top corner, shown on hover. */
2
3
  app-chart { position: relative; }
3
4
  /* `dir="ltr"` on the box keeps ECharts' anchors in place. In SVG (on a slide), each word then reads from its first letter, or a mixed one would flip; on a canvas, by `sideOf()`. */
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Charts (D196): a ```echarts block in an answer, drawn by ECharts on a canvas, with the theme's
2
3
  // light or dark (on a slide, its paper's), the room's type and numbers in the user's language; drawn again as its box, the
3
4
  // theme, the look or the language changes; copied as its source and its picture, on light paper,
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A chart an answer holds (D196): an ECharts option written as JSON in a ```echarts block. It is
2
3
  // data, never code: read with JSON.parse, or as the JavaScript ECharts' own examples are written in,
3
4
  // its functions left out (D418), then kept to what draws inside the chart. The toolbox goes (its
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Text out of the files people share: Word, PowerPoint and Excel (zips of XML), Numbers (numbers.js),
2
3
  // and plain text. Returns pages, so the brain can read a long file a part at a time.
3
4
  // A small tag scanner instead of DOMParser keeps this runnable in workers and Node.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // MIDI files: no browser plays one, so Jean does. Its notes are read here, then played by a
2
3
  // small synthesizer of Jean's own through the Web Audio API, faster than they last, into a WAV that
3
4
  // the page's own player plays, with its seeking and its volume. No instruments fetched from another
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Apple Numbers' spreadsheets, as Numbers has saved them since 2013: a zip of .iwa parts, each a run of
2
3
  // Snappy-compressed chunks holding protobuf messages that point at each other by id. No schema ships:
3
4
  // the few fields read here are named where they are read, after Apple's own messages (TN, TST, TSWP).
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Word, Excel and PowerPoint files as Office draws them (D183), in a file's pane and the browser: by
2
3
  // @silurus/ooxml, its parsers WebAssembly, its viewers drawing on a canvas, so nothing of the file
3
4
  // becomes markup, in a frame of a file pane's kind (an opaque origin with no network), in a page made
package/caps/files/pdf.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // PDF text, page by page, with pdf.js (loaded on demand; its legacy build covers Safari 16.4).
2
3
  // No font faces: glyphs are drawn as shapes, so pdf.js never needs eval. Character maps let it
3
4
  // read Chinese, Japanese and Korean text; standard font metrics keep words apart. A scan's pictures
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A game's file (D648): `games/<ulid>-<slug>.game.html`, named once and never renamed, a page whose head holds Jean's facts (its
2
3
  // format, engine, the actions it uses, author, when it was made and changed, whether it is pinned, the task it came from), its
3
4
  // title its name, its body a picture of it being played and the design card, and the game itself as one module in an inert script,
@@ -1,3 +1,4 @@
1
+ /* SPDX-License-Identifier: MIT */
1
2
  /* A game's frame (D648): written into its page with ./shell.js, never into Jean's. The game fills it; the cover, the bar and the
2
3
  touch buttons sit over it, light on dark whatever the game draws. */
3
4
  html, body { margin: 0; block-size: 100%; overflow: hidden; background: #0e0e14; color: #fff; font: 1rem/1.4 system-ui, sans-serif; }
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A check in the condition of every `while`, `do … while` and classic `for` loop of a game's code (D648), so that a loop that never
2
3
  // ends throws at its own line instead of freezing Jean, whose page shares its thread with a game's frame in WebKit. Strings,
3
4
  // templates, comments and regular expressions are read past, `for … of` and `for … in` left alone, and nothing goes on a line of its
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A game's page (D648): its facts, the shell (./shell.js) and its styles, and the game, guarded (./guard.js). In a frame of Jean's
2
3
  // (./frame.js) its engine is lent; as a page of its own, which Save gives and a task saved as a page or shared by link shows
3
4
  // (ui/view.js), its engine is inside it: offline, its card where scripts don't run, and what it saves kept in the browser's storage
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A game's frame, around the game (D648): Jean's own script, written ahead of the game in its page (./frame.js), which runs in the
2
3
  // frame alone, never in Jean's page. It owns the frame's clock (requestAnimationFrame, performance.now, Date and timers), so that a
3
4
  // pause stops the game wherever it is, whatever its engine, and a play-test steps frames as fast as they come, through a
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Apps among the creations (D553): the pages a project's answers hold (```html, D289), each a small app Jean made, the newest
2
3
  // of each name in a task alone, as a brain writes one whole again for each change; named by its <title>, else its first heading,
3
4
  // else its task's title. On its card, the app itself at half size, still; picked, it opens beside the task and works there as in
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A diagram (D592): Mermaid's language drawn by Pele (Obsidian's, MIT) with no DOM, its words measured on an OffscreenCanvas,
2
3
  // each kind of diagram loaded as one first shows. The SVG and its size go back to the page, which shows it as a picture.
3
4
  import { renderAsync } from '../../vendor/pele/lazy.js'
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Diagrams (D291, D592): a ```mermaid block, of any kind Mermaid draws, drawn by Pele in its worker (./diagram-worker.js), or
2
3
  // beside the page where no worker of Jean's starts (a share's viewer, its files from another site). A flowchart Pele refuses is
3
4
  // tried again with its boxes written as Mermaid reads them: brains close a box's brackets swapped (A([Start)]), or put brackets
@@ -1,3 +1,4 @@
1
+ /* SPDX-License-Identifier: MIT */
1
2
  /* Pages in answers (D289): framed as the other widgets are, so a page reads as one of its own, Copy at its top corner, shown on hover. The page's body adds a little to the padding, room for its focus rings. */
2
3
  app-page { position: relative; display: block; padding: 0.75rem 0.85rem; border: 1px solid var(--line); border-radius: 0.9rem; margin-block: 0 0.85rem; }
3
4
  app-page iframe { display: block; box-sizing: content-box; inline-size: 100%; block-size: 6rem; border: 0; background: transparent; }
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Pages in answers (D196, D289): a ```html block is a page that runs where it is, in every room, in a
2
3
  // frame of a file pane's kind (preview.html, D126): an opaque origin, scripts and forms, under the
3
4
  // policy Settings give web pages (D143), so by default nothing comes from the internet or goes to
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // What a page of parts shares (D670), so that what the user changes reaches all it touches at once, with nothing sent to a brain:
2
3
  // its form's fields, by their labels; the values worked out from them (<app-values>, a line each, `Name = formula`), in Tables' formulas,
3
4
  // which Jean reads itself, never with eval; `{formula}` in figures, a table's lines, a chart's, a card's heading and words, `{formula:2}`
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Maps (D291): <app-map> in a page, its GeoJSON as its text, which the page may change to move it (a
2
3
  // form beside it, say); a place, a route or an area clicked tells the page (`pick`, with what it
3
4
  // says of itself). Lent to a page that holds one, as a ```geojson block in an answer is a page made of
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Visual answers as a mode of the box (D300): a row of + turns it on, and it shows at the foot of the box,
2
3
  // pressed, until pressed again. While it is on, each message comes with a note that asks the brain to
3
4
  // follow the steps of Jean's own ready-made skill Visual answers (caps/skills/directory/visual),
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A diagram in a page (D291, D592), lent to it as it appears: <app-diagram> holds Mermaid as its text, which the page's own code
2
3
  // may set, and asks Jean for its picture, drawn by Pele in the room's colours, again when its text, the room's light or dark or
3
4
  // its look changes. Its text shows nowhere; one Pele can't read keeps what it showed.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Pages of parts (D631): a ```html block holding only the parts the visual skill names is data, as Markdown is, read here and
2
3
  // drawn in the answer itself (./view-parts.js) rather than in a frame: key figures, cards, a table, a chart and a form, nested as
3
4
  // the skill shows them, and an <aside> with a map or a diagram. Each part's lines become what it draws. Anything else (a script,
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // What visual answers draw (D291, D631), each as a start drawn at once that a document's "/" offers (D485): a page, the charts a page
2
3
  // draws, diagrams, a map, a timeline and key figures. Each has its name's key among a document's strings, a glyph, a few English words
3
4
  // to find it by as well as its name, and its Markdown, as an answer writes it. Pure, so a document reads it without the rest of this capability.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Apps played before the turn ends (D689): each page with a script that a step of an answer wrote is played out of sight, as
2
3
  // Games plays a game (D648), in a frame of its kind (preview.html), given what it kept: what goes wrong is caught as it starts,
3
4
  // then as each of its controls is used once, its buttons pressed and its fields changed; nothing it sends or saves goes anywhere.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A page of parts (D631), drawn in the answer itself from what ./parts.js reads in it: key figures as the answers' own (D215),
2
3
  // cards side by side, a table whose heads sort it, a chart drawn by Charts (D196), unlocked on sight, a form that adds a row to a
3
4
  // table of the page for this visit or sends its fields as the user's next message, a map or a diagram as the answers' own, and
@@ -1,3 +1,4 @@
1
+ /* SPDX-License-Identifier: MIT */
1
2
  /* Layouts (D215): an answer's comparisons, steps and notes, as ui/markdown.js tells them apart. */
2
3
 
3
4
  /* Room to spread: in the conversation, a table of three columns or more takes the room it needs beside
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Layouts (D215, D291): what an answer's Markdown shows it to be, laid out as that, from its structure
2
3
  // alone (./shapes.js): a comparison as its options side by side, steps one after the other, notes set
3
4
  // apart, a column of amounts at the end, a timeline, key figures, a checklist to tick, and the pictures
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Which shape a table, a numbered list or a quote has (D215), told from its Markdown alone, never its
2
3
  // words, so that it holds in every language. The tokens are marked's.
3
4
  import { Marked, Tokenizer } from 'marked'
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Layouts' shapes, for the type check only: marked's tokens as answers read them, with what Jean adds to them.
2
3
  import type { Tokens } from 'marked'
3
4
 
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Files Jean makes (D119): a Word document from Markdown, a spreadsheet from CSV or Markdown
2
3
  // tables, or any other text file as it is. Office files are zips of XML, written with
3
4
  // core/zip.js and the lexer Jean already loads: no file-format library. Those that can say so
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A look on paper and on screen (D601, D663, D664): what Word files and prints wear of the design system, the organisation's kit and
2
3
  // the project's (ui/kit.js), an answer's as a document's: words in its ink and faces, headings and links in its colour, and its logo in its
3
4
  // corner, in place of Jean's mark on a print. On white paper always, its colours deepened to read there: a page's own colour stays in Word's
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A LaTeX document as Markdown (D185), for what brains write in a ```latex block: sections, lists,
2
3
  // emphasis and formulas, which Markdown's reading then lays out, and TikZ pictures, a ```tikz block
3
4
  // each, which the math capability draws when they are pgf-pie charts; the rest of a preamble goes. A
@@ -1,3 +1,4 @@
1
+ /* SPDX-License-Identifier: MIT */
1
2
  /* Formulas (D185): set apart, one scrolls only sideways; Chromium lays it out a pixel taller than its box, which the padding holds. */
2
3
  app-math[block] { overflow-y: hidden; padding-block: 0.15em; }
3
4
  app-math mtext.is-bold { font-weight: bold; }
package/caps/math/math.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Formulas (D185): drawn by the browser as MathML, which Temml writes from the LaTeX brains use, and
2
3
  // LaTeX documents laid out with them, their pgf-pie charts drawn too, copied as a widget is (D196), as
3
4
  // their source and their picture at once. Unlocked by the first formula or document a message holds, never offered; until
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A picture made on this device or by a server on this computer says it was made by a trained model
2
3
  // (D279), as the AI Act's Article 50(2) asks of what such a system makes: IPTC's Digital Source Type in
3
4
  // its XMP, which C2PA, the AI Act's code of practice and the large platforms read, with the maker's name
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // What an answer's certificate says (D252), from the conversation's records alone: how long the
2
3
  // answer took, each brain asked and whether it ran on this device, who made its pictures and films
3
4
  // and where (D263), and what the page reached while the answer was written, as the browser recorded it.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // DER (X.690) as certificates need it: the seal's own X.509 certificate, made once for its key and
2
3
  // carried in each certificate's x5c (D274), read back by check(). Web Crypto only, so it runs where
3
4
  // the core does and is tested with node --test.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A score's notes as sounds (D196, D338): abcjs gives each note's pitch, volume, instrument, start
2
3
  // and length in whole notes; here they become seconds, for MS Basic's instruments (sound-worker.js)
3
4
  // or, without them, Jean's own small synthesizer, which takes frequencies. Pure, so Node's tests run it.
@@ -1,3 +1,4 @@
1
+ /* SPDX-License-Identifier: MIT */
1
2
  /* Scores (D196): the score in the ink's colour, the notes sounding in the flame's, then the player; Copy at its top corner, shown on hover. */
2
3
  app-score { position: relative; } .score-notes { margin-block-start: 0.35rem; font-size: 0.875rem; } .score-notes summary { color: var(--ink-soft); cursor: pointer; } .score-notes pre { white-space: pre-wrap; overflow-wrap: anywhere; }
3
4
  app-score .score-sheet { --sounding: var(--flame); color: var(--ink); }
@@ -16,8 +17,8 @@ app-score .score-time { color: var(--ink-soft); font-size: 0.85rem; font-variant
16
17
  /* While its instruments come (D338), Pause breathes, and the time says how much of them has. */
17
18
  app-score .score-player[aria-busy='true'] .icon-button { animation: glow 0.8s ease-in-out infinite alternate var(--loops, running); }
18
19
  @media print { app-score .score-player { display: none; } }
19
- /* Beside the task: the score down to the pane's foot, over the view's padding (1.25rem), its player under it, staying at that foot as the score scrolls, and no Copy over it (the pane saves it). */
20
- app-score.beside { display: flex; flex: 1 0 auto; flex-direction: column; margin-block-end: -1.25rem; background: var(--room); } app-score.beside .score-player { position: sticky; z-index: 1; bottom: -1.25rem; padding-block: 0.6rem 1.65rem; background: var(--room); } app-score.beside .drawn-foot { display: none; }
20
+ /* Beside the task: the score down to the pane's foot, its player under it, staying at that foot as the score scrolls, and no Copy over it (the pane saves it). */
21
+ app-score.beside { display: flex; flex: 1 0 auto; flex-direction: column; background: var(--room); } app-score.beside .score-player { position: sticky; z-index: 1; bottom: 0; padding-block: 0.6rem; background: var(--room); } app-score.beside .drawn-foot { display: none; }
21
22
  app-score .drawn-foot { position: absolute; z-index: 1; inset-block-start: 0.4rem; inset-inline-end: 0.4rem; transition: opacity 0.2s; }
22
23
  app-score .drawn-foot .icon-button { background: var(--glass); }
23
24
  @media (hover: hover) { app-score:not(:hover, :focus-within) .drawn-foot { opacity: 0; } }
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Scores (D196): a ```abc block in an answer, music in ABC notation, drawn as a score by abcjs and
2
3
  // played on the instruments it names, MS Basic's, made (./sound.js, D338) the first time it plays, in
3
4
  // a worker, or on the page in a saved copy, while it waits showing how much of them has come; without
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A score's sound (D338), made in a worker so the page stays smooth while it is (./sound.js). A new
2
3
  // request stops the one before.
3
4
  import { render } from './sound.js'
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A score's sound (D338): the instruments its notes ask for, MS Basic's files from where Settings or policy
2
3
  // name them (jsDelivr's copy of the sounds package unless they name another), or where a saved copy names
3
4
  // them, each downloaded once, checked against its SHA-256 in Jean's own list of them and kept apart
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A shared copy's seal (D361): sealed in the sharer's browser with AES-256-GCM, under a key drawn
2
3
  // from the link's secret, and from a password when there is one, so the host keeps what it can't
3
4
  // read. The link's `#` carries the secret, which browsers never send. A password's share also has a
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A share, opened (D361, docs/sharing.md): the host's viewer, which the render package carries. It
2
3
  // reads the share's id from the address and its secret from after the `#`, which never left the
3
4
  // browser, asks for the password when there is one, opens the sealed copy, and draws it as a task
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Jean's own directory of ready-made skills (D196), for what people ask of it: each a SKILL.md
2
3
  // beside this module, shipped and kept offline with the skills capability, read when the directory
3
4
  // is shown or a request is compared with it, and added as a skill from elsewhere is, once the
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Skills from elsewhere (D116, D121, D207): Agent Skills discovery indexes, the format's own way to
2
3
  // publish skills (https://github.com/cloudflare/agent-skills-discovery-rfc, schema 0.2.0), and
3
4
  // repositories on GitHub. Jean reads them whole and compares their descriptions with the user's
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A design system proposed from the person's own material (D740): a logo, a screenshot of their site, a brand guide as a PDF or
2
3
  // a Word file. Its colours are read from the codes a guide writes, else from pixels; its faces from the names a guide gives, else
3
4
  // from the faces it is set in; its logo is the picture it holds. No brain reads any of it, so a device brain proposes what any
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // What Slides changes in a deck's Markdown (D591), as text, so that the rest of it stays byte for byte: a slide's layout, in
2
3
  // its settings; the kit the deck was drawn with, kept in its headmatter as one line, so that the file looks the same wherever it
3
4
  // goes; where its pictures are, a picture of the task named by its name kept at its place in the project; whether a deck an
@@ -1,3 +1,4 @@
1
+ /* SPDX-License-Identifier: MIT */
1
2
  /* Settings › Appearance › Design system (D602, D664): a deck drawn with the kit and a page of paper, a kit proposed over them (D740), then its colours, type, logo, layouts and files. */
2
3
  .kit-previews { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 11rem); gap: 1rem; align-items: start; margin-block: 1rem; } .kit-previews figure { margin: 0; }
3
4
  @media (max-width: 40rem) { .kit-previews { grid-template-columns: minmax(0, 1fr); } .kit-previews figure { max-inline-size: 11rem; } }
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Settings › Appearance › Design system (D602, D664): the kit documents, collections and decks wear, the person's everywhere (kit.json at the root of
2
3
  // their files) or a project's (its folder's), as ui/kit.js keeps them, a deck drawn with it beside and a page of paper, over Jean's own look and
3
4
  // under the organisation's: its colours by day and by night, each written (rgb(), rgba() or hex) or picked, its type (a voice, or
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // What the design system's page shows on each layout (D602): a small project, from its idea to its launch, written as a layout
2
3
  // wants it, so that each draws what it is for: a figure from its lists or its parts, a sentence, a quote, a picture, its slots.
3
4
  // By what a layout does more than its name, so that a kit's own and a template's show theirs too. Dates and numbers are Intl's.
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Settings › Appearance › Design system (D602, D664): its row and its page, for each capability that wears a design system to offer,
2
3
  // so that it shows once any of them is found (Slides, Documents, Tables), Slides itself staying unfound. Its page loads the first time Appearance shows its row.
3
4
  import { nothing } from 'lit-html'
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A deck's look, its kit (D594, D602): Jean's own, under the person's design system (kit.json at the root of their files), under
2
3
  // the organisation's in policy (`kit`), under the project's, each over deck's own layouts, and the file's own over them all, which
3
4
  // a deck kept keeps (./edit.js). Jean's own follows the look chosen in
@@ -5,13 +6,15 @@
5
6
  // paper is never cream and sunflower never a fill behind words, so the slides deck sets on the primary (a cover, an
6
7
  // introduction, the end) are on ink there, as a section is. Its layouts are named in the user's language, as the Slide layout menu
7
8
  // and PowerPoint's read them. The project's is its `kit.json`, else one made from its colour (ui/kit.js), which a deck kept
8
- // is offered again when it changes (D601).
9
- import { STANDARD, mergeKits } from '@codename/deck'
9
+ // is offered again when it changes (D601). The brain is told the layouts it adds, changes or turns off (layoutsTold()).
10
+ import { STANDARD, mergeKits, labelOf } from '@codename/deck'
10
11
  import { app, effective } from '../../ui/state.js'
11
12
  import { LOOKS, OWN, lookId } from '../../ui/looks.js'
12
13
  import { hexOf, projectKit, kitFile } from '../../ui/kit.js'
13
14
  import { t, locale } from '../../core/i18n.js'
14
15
 
16
+ /** @typedef {ReturnType<typeof mergeKits>['kit']} Kit */
17
+
15
18
  /** deck's words in the user's language: its bar's, its views', a slide's. */
16
19
  export const words = () => Object.fromEntries(['deck', 'previous', 'next', 'where', 'present', 'presenter', 'overview', 'edit', 'source', 'notes', 'noNotes', 'upNext', 'last', 'slide', 'carousel'].map((key) => [key, t(`slides.${key}`)]))
17
20
 
@@ -46,6 +49,21 @@ export const lookPrint = async (dir) => [...JSON.stringify([await kitFile(null),
46
49
  /** The kit a deck of this project is drawn with, before its own: Jean's, the person's, the organisation's, the project's. @param {string} [dir] */
47
50
  export const kitHere = async (dir) => mergeKits(jeanKit(), await kitFile(null), app.policy.kit, await projectKit(dir)).kit
48
51
 
52
+ /**
53
+ * A kit's layouts as the brain is told them, after the steps of a skill that writes decks and with the deck on show (D594): its own,
54
+ * and those of deck's, which the steps name, where it changes what a slide on them is written with (its slots, the figure its lists
55
+ * or parts make, the deck's contents, what it is for), never their look; each by its name, its label in the person's language, what
56
+ * it is for and when, its slots after the default one and its figure; then deck's own it turns off. Empty for none, as Jean's own.
57
+ * @param {Kit} kit @param {string} [lang]
58
+ */
59
+ export function layoutsTold({ layouts }, lang = locale.peek()) {
60
+ const written = (/** @type {Kit['layouts'][string]} */ { slots, lists, parts, contents, intent, use_when, avoid_when }) => JSON.stringify([slots, lists, parts, contents, intent, use_when, avoid_when]), off = Object.keys(STANDARD.layouts).filter((name) => !layouts[name])
61
+ const said = (/** @type {Kit['layouts'][string]} */ { intent, use_when, avoid_when, slots, lists, parts, contents }) => [intent, use_when && `use when: ${use_when}`, avoid_when && `avoid when: ${avoid_when}`,
62
+ slots.length > 1 && `slots ${slots.filter((slot) => slot !== 'default').map((slot) => `\`::${slot}::\``).join(', ')}`, lists !== 'bullets' && `lists drawn as \`${lists}\``, parts !== 'none' && `\`##\` parts as \`${parts}\``, contents && 'the deck’s contents under its words'].flatMap((words) => (words ? [words.replace(/[.\s]+$/, '')] : []))
63
+ const told = Object.entries(layouts).filter(([name, layout]) => !STANDARD.layouts[name] || written(layout) !== written(STANDARD.layouts[name])).map(([name, layout]) => ((named, words) => `- \`${name}\`${named === name ? '' : ` (${named})`}${words.length ? `: ${words.join('; ')}.` : ''}`)(labelOf(layout, name, lang), said(layout)))
64
+ return [...(told.length ? ['Layouts the design system adds or changes, each slot’s words after a line naming it, as `::right::`:', ...told] : []), ...(off.length ? [`The design system turns off ${off.map((name) => `\`${name}\``).join(', ')}.`] : [])].join('\n')
65
+ }
66
+
49
67
  /**
50
68
  * What a deck kept holds of its kit: its tokens and the layouts unlike deck's own, their names left to each reader, deck's own
51
69
  * turned off as false (D602), and the pictures their art draws (D606). @param {ReturnType<typeof import('@codename/deck').mergeKits>['kit']} kit
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // How a deck leaves (D591, D593, D683), through the pane's one button (ui/out.js), as it is on show: as a link to a copy (Share, D361);
2
3
  // as PowerPoint, made in the browser from the deck as drawn (deck's toPptx and PptxGenJS, loaded only then), its words, lists, tables and
3
4
  // charts PowerPoint's own, a layout of PowerPoint's for each of the deck's; as its file, a page any browser presents, its pictures inside it
@@ -1,3 +1,4 @@
1
+ /* SPDX-License-Identifier: MIT */
1
2
  /* Slides (D591): deck's style sheet (vendor/deck/deck.css) under the room's: its bar in the room's buttons and pen, its scheme
2
3
  the room's, Jean's version of a slide ringed in the flame, the words pointed at outlined; beside the conversation, the
3
4
  deck's Markdown under its slides, as the pane is narrow; on a card, its first slide alone. */
@@ -23,8 +24,8 @@ app-slides .is-pointed { outline: 0.12em dashed var(--flame); outline-offset: 0.
23
24
  #slides-layouts { position-anchor: auto; position-area: block-start span-inline-start; position-try: most-block-size flip-block; margin: 0.25rem 0; max-block-size: min(100% - 0.5rem, 28rem); overflow-y: auto; }
24
25
  /* A menu in deck's bar: its items Jean's menu's, not the bar's buttons (deck's grid and Slides' grey). */
25
26
  #slides-layouts button { display: flex; color: inherit; } #slides-layouts [aria-checked='false'] > .icon { visibility: hidden; }
26
- /* Beside the conversation: the slides, then their Markdown; Jean's version under its bar, and what it does to the slide on show. */
27
- app-slides.beside { padding: 0.75rem; }
27
+ /* Beside the conversation: the slides, from edge to edge of the pane, then their Markdown; Jean's version under its bar, and what it does to the slide on show. */
28
+ app-slides.beside :is(.slides-change, .deck-bar, .deck-source) { padding-inline: 0.75rem; } app-slides.beside .deck-slide { border-radius: 0; }
28
29
  app-slides.beside .deck.is-editing { display: grid; grid-template: 'stage' auto 'bar' auto 'source' auto / 1fr; }
29
30
  app-slides.beside .deck.is-editing .deck-source { grid-area: source; block-size: 22rem; }
30
31
  app-slides.beside .review { margin-block-end: 0.6rem; }
@@ -1,9 +1,10 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Slides (D591): decks drawn by deck (@codename/deck, Jean's own library), Slidev's Markdown read liberally. In an answer, a
2
3
  // ```deck block, drawn slide by slide as it is written, the slide being written on show, then the first unless the user paged;
3
4
  // paged with its bar or a clicker's keys, presented full screen, with the presenter's view and all slides at once. Beside the
4
5
  // conversation, a deck kept as a file of the project's (caps/skills/decks.js), changed three ways: by typing on a slide (a double
5
6
  // click on its words), as its Markdown beside the slides (Source), or by asking Jean, whose version waits for the user to accept
6
- // or reject it slide by slide (D505), the brain told of the deck on show, its slide and the part pointed at; its Slide layout menu
7
+ // or reject it slide by slide (D505), the brain told of the deck on show, its slide, the part pointed at and its kit's own layouts; its Slide layout menu
7
8
  // lays a slide out again from the deck's kit (./kit.js), and the pane's one button takes it out (./save.js, ui/out.js). A chart is Charts' own, drawn in SVG
8
9
  // for PowerPoint's writer to read; a diagram Pele's, as an answer's is (../interactive/diagram.js, D592), shown as a picture in
9
10
  // the deck's colours; a picture, one of the project's files, which the brain names by the name it made it under, read for it.
@@ -24,7 +25,7 @@ import { noteRecord } from '../../core/events.js'
24
25
  import { taskFiles, fileNamed } from '../../core/files.js'
25
26
  import { t, useStrings, locale, intlLocales } from '../../core/i18n.js'
26
27
  import { languageOf } from '../../ui/language.js'
27
- import { kitHere, withNames, words } from './kit.js'
28
+ import { kitHere, withNames, words, layoutsTold } from './kit.js'
28
29
  import { kitSlot } from './kit-slot.js'
29
30
  import { cjk } from '../layouts/shapes.js'
30
31
  import { drawing, coloured, told, wordsBelow } from '../interactive/diagram.js'
@@ -35,8 +36,8 @@ await Promise.all([useStrings('slides'), useStrings('interactive'), styleSheet(n
35
36
  /** A deck kept, as its pane opens it (caps/skills/decks.js): its place, name and Markdown, Jean's version waiting, and how either is written. @typedef {{ path: string, name: string, source: string, theirs: string | null, keep: (mine: string, theirs: string | null) => Promise<unknown> }} Kept */
36
37
  /** @typedef {ReturnType<typeof import('@codename/deck').createDeck>} DeckView */
37
38
 
38
- /** The deck on show beside the conversation, which the brain hears of, its slide and the words pointed at. */
39
- export const shown = signal(/** @type {{ path: string, name: string, source: string, at: number, count: number, part: string } | null} */ (null))
39
+ /** The deck on show beside the conversation, which the brain hears of, its slide, the words pointed at and the layouts its kit adds, changes or turns off. */
40
+ export const shown = signal(/** @type {{ path: string, name: string, source: string, at: number, count: number, part: string, layouts: string } | null} */ (null))
40
41
 
41
42
  /** A slide's Markdown read as an answer's is, emphasis beside the punctuation of Chinese, Japanese and Korean too. */
42
43
  const reader = new Marked({ gfm: true }, cjk)
@@ -269,7 +270,7 @@ class AppSlides extends HTMLElement {
269
270
  moved(part) {
270
271
  const { view, file } = this
271
272
  if (!view || !file) return
272
- shown.value = { path: file.path, name: file.name, source: withoutKit(file.source), at: view.at, count: view.deck.slides.length, part: part ?? (shown.peek()?.path === file.path ? shown.peek()?.part ?? '' : '') }
273
+ shown.value = { path: file.path, name: file.name, source: withoutKit(file.source), at: view.at, count: view.deck.slides.length, part: part ?? (shown.peek()?.path === file.path ? shown.peek()?.part ?? '' : ''), layouts: layoutsTold(view.kit) }
273
274
  this.paint()
274
275
  }
275
276
 
@@ -301,12 +302,13 @@ drawn.value = { ...drawn.peek(), deck, markdown: fenced, md: fenced, slidev: fen
301
302
 
302
303
  /**
303
304
  * The note a message comes with while a deck is on show and the brain hasn't heard of it as it is: its place, the slide on show,
304
- * the words pointed at, and its Markdown, to write again whole with what is asked changed. @param {import('../../core/types.js').Envelope[]} records
305
+ * the words pointed at, its Markdown, to write again whole with what is asked changed, and the layouts its kit adds, changes or
306
+ * turns off. @param {import('../../core/types.js').Envelope[]} records
305
307
  */
306
308
  function notes(records) {
307
309
  const one = shown.peek()
308
310
  if (!one) return []
309
- const text = `The deck ${one.name} (${one.path}) is open beside the conversation, on slide ${one.at + 1} of ${one.count}.${one.part ? ` The user points at its words "${one.part}".` : ''} As it is now:\n\n\`\`\`\`deck\n${one.source.trim()}\n\`\`\`\`\n\nTo change it, write it again whole in a \`\`\`\`deck block with only what is asked changed: the user accepts or rejects each slide you change. A deck about something else is a new one, with a title of its own.`
311
+ const text = `The deck ${one.name} (${one.path}) is open beside the conversation, on slide ${one.at + 1} of ${one.count}.${one.part ? ` The user points at its words "${one.part}".` : ''} As it is now:\n\n\`\`\`\`deck\n${one.source.trim()}\n\`\`\`\`\n\n${one.layouts ? `${one.layouts}\n\n` : ''}To change it, write it again whole in a \`\`\`\`deck block with only what is asked changed: the user accepts or rejects each slide you change. A deck about something else is a new one, with a title of its own.`
310
312
  const last = records.findLast(({ update }) => update?.sessionUpdate === '_system_note' && update.data?.kind === 'deck')
311
313
  return last?.update?.sessionUpdate === '_system_note' && last.update.text === text ? [] : [noteRecord(text, { kind: 'deck', uri: one.path })]
312
314
  }
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // A Formula column's cells: one formula for the column, worked out for each row from its other cells as the collection is read
2
3
  // (`worked()`), so that sorting, filters, the foot, the workbook and the brain see them as any other. Jean reads it itself, never with eval:
3
4
  // numbers, "text", the row's columns by their names as written (the longest name first, as it is cased before in any case), + - * / % and ** or ^, = != < <= > >=, brackets,
package/core/anthropic.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Anthropic Messages, imported by llm.js the first time an Anthropic brain is used.
2
3
  import { LLMError, headersFor, post, endpoint, sseEvents, parseData, parseArgs, doneEvent, streamError, noteBlock, documentBlock } from './llm.js'
3
4
 
@@ -207,7 +208,7 @@ function startBlock(block = {}) {
207
208
  function applyDelta(block, delta) {
208
209
  if (!block || !delta) return null
209
210
  if (delta.type === 'signature_delta') block.signature += delta.signature
210
- if (delta.type === 'input_json_delta') block.json += delta.partial_json
211
+ if (delta.type === 'input_json_delta') return (block.json += delta.partial_json), block.type === 'tool_use' ? { type: 'tool_writing', name: block.name, args: block.json } : null
211
212
  if (delta.type === 'citations_delta') (block.citations ??= []).push(delta.citation)
212
213
  // text_delta carries `text` and thinking_delta carries `thinking`, like the blocks they extend.
213
214
  const kind = delta.type === 'text_delta' ? 'text' : delta.type === 'thinking_delta' ? 'thinking' : null
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Conversations are append-only JSONL files: `${projectDir}/conversations/${id}.jsonl`, except
2
3
  // when the user goes back to a request (D188). Line 1 is a ConversationHeader, every following line one Envelope.
3
4
  // A crash mid-append leaves a half-written last line, which is ignored on read.
package/core/deferred.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Deferred tools (D47): the conversation declares only the tools it started with; the
2
3
  // rest are found with find_tools. With codemode declared, they are called from a script;
3
4
  // otherwise the tools found are declared from the next request on (one cache miss).
package/core/events.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // ACP records: building them and folding them for display. The brain reads the same log, as
2
3
  // core/prompt.js's toChatMessages() derives it. One log, two readers.
3
4
  /** @import { Envelope, AcpUpdate, ToolCall, ToolCallInfo, PlanEntry, ResourceLink, SystemNoteData, CompactionUpdate } from './types.js' */
package/core/files.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // The project's file library: files/sha256-<hash>.<ext> (the original), .md (its text,
2
3
  // with a [[page N]] line before each page) and .meta.json. Named by content, so the
3
4
  // same file dropped twice is stored once. Conversations link to files, never copy them.
package/core/fs.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Paths, an in-memory FS (tests, fallback), and JSON helpers.
2
3
  // The browser FS lives in ui/opfs.js; both implement the FS type in types.d.ts.
3
4
 
package/core/hooks.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Hooks: what Jean does passes through named events that code can watch, change or answer in Jean's
2
3
  // place, as Claude Code's hooks and mods do. The hooks on an event make a chain, the outermost tier
3
4
  // first: each calls next(e), with the event or a changed copy of it (never the event changed), and the
package/core/i18n.js CHANGED
@@ -1,3 +1,4 @@
1
+ // SPDX-License-Identifier: MIT
1
2
  // Messages, plurals and direction. Host-agnostic: the UI injects a loader.
2
3
  // Catalogs are flat { key: string | { one, other, … } } objects; English is the fallback.
3
4
  import { signal } from '@preact/signals-core'