@jean-is/render 0.8.0-rede3e4e8e9a5 → 0.8.0-rfd979a8d1388

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 (733) hide show
  1. package/caps/charts/charts.js +14 -5
  2. package/caps/charts/option.js +17 -0
  3. package/caps/files/office.js +16 -9
  4. package/caps/files/pdf.js +3 -0
  5. package/caps/interactive/apps.js +1 -4
  6. package/caps/interactive/interactive.css +3 -0
  7. package/caps/interactive/interactive.js +45 -8
  8. package/caps/interactive/test.js +76 -0
  9. package/caps/skills/directory.js +2 -0
  10. package/core/fs.js +1 -1
  11. package/core/loop.js +4 -0
  12. package/core/settings.js +4 -5
  13. package/locales/am.json +0 -3
  14. package/locales/approvals/br.json +7 -7
  15. package/locales/approvals/co.json +18 -18
  16. package/locales/approvals/de.json +5 -5
  17. package/locales/approvals/en.json +3 -3
  18. package/locales/approvals/es.json +7 -7
  19. package/locales/approvals/fr-CA.json +5 -5
  20. package/locales/approvals/fr.json +5 -5
  21. package/locales/approvals/it.json +10 -10
  22. package/locales/approvals/ja.json +8 -8
  23. package/locales/approvals/ko.json +21 -21
  24. package/locales/approvals/pt.json +6 -6
  25. package/locales/approvals/zh-Hans.json +5 -5
  26. package/locales/approvals/zh-Hant.json +4 -4
  27. package/locales/ar.json +0 -3
  28. package/locales/backup/de.json +1 -1
  29. package/locales/backup/ko.json +1 -1
  30. package/locales/backup/pt.json +1 -1
  31. package/locales/backup/zh-Hans.json +1 -1
  32. package/locales/bg.json +0 -3
  33. package/locales/bn.json +0 -3
  34. package/locales/br.json +26 -29
  35. package/locales/brain-local/ja.json +1 -1
  36. package/locales/brain-local/pt.json +3 -3
  37. package/locales/brain-local/zh-Hans.json +1 -1
  38. package/locales/brain-local/zh-Hant.json +3 -3
  39. package/locales/brains/br.json +9 -9
  40. package/locales/brains/co.json +11 -11
  41. package/locales/brains/de.json +6 -6
  42. package/locales/brains/en.json +5 -5
  43. package/locales/brains/es.json +14 -14
  44. package/locales/brains/fr-CA.json +8 -8
  45. package/locales/brains/fr.json +7 -7
  46. package/locales/brains/it.json +7 -7
  47. package/locales/brains/ja.json +8 -8
  48. package/locales/brains/ko.json +12 -12
  49. package/locales/brains/pt.json +11 -11
  50. package/locales/brains/zh-Hans.json +6 -6
  51. package/locales/brains/zh-Hant.json +13 -13
  52. package/locales/browser/co.json +2 -2
  53. package/locales/browser/es.json +1 -1
  54. package/locales/browser/it.json +1 -1
  55. package/locales/browser/ja.json +2 -2
  56. package/locales/browser/ko.json +6 -6
  57. package/locales/browser/pt.json +2 -2
  58. package/locales/camera/br.json +1 -1
  59. package/locales/camera/co.json +1 -1
  60. package/locales/camera/de.json +1 -1
  61. package/locales/camera/it.json +1 -1
  62. package/locales/camera/ja.json +2 -2
  63. package/locales/camera/ko.json +2 -2
  64. package/locales/camera/zh-Hant.json +1 -1
  65. package/locales/case/br.json +1 -1
  66. package/locales/case/co.json +5 -5
  67. package/locales/case/de.json +1 -1
  68. package/locales/case/es.json +1 -1
  69. package/locales/case/it.json +2 -2
  70. package/locales/case/ja.json +6 -6
  71. package/locales/case/ko.json +1 -1
  72. package/locales/case/pt.json +6 -6
  73. package/locales/case/zh-Hant.json +1 -1
  74. package/locales/certificates/co.json +7 -7
  75. package/locales/certificates/es.json +2 -2
  76. package/locales/certificates/fr-CA.json +7 -7
  77. package/locales/certificates/fr.json +7 -7
  78. package/locales/certificates/it.json +3 -3
  79. package/locales/certificates/ja.json +2 -2
  80. package/locales/certificates/ko.json +1 -1
  81. package/locales/certificates/pt.json +2 -2
  82. package/locales/certificates/zh-Hans.json +5 -5
  83. package/locales/certificates/zh-Hant.json +6 -6
  84. package/locales/charts/br.json +1 -1
  85. package/locales/charts/co.json +1 -1
  86. package/locales/charts/de.json +1 -1
  87. package/locales/charts/ko.json +1 -1
  88. package/locales/co.json +15 -18
  89. package/locales/compact/es.json +1 -1
  90. package/locales/compact/fr-CA.json +1 -1
  91. package/locales/compact/fr.json +1 -1
  92. package/locales/compact/it.json +1 -1
  93. package/locales/compact/pt.json +2 -2
  94. package/locales/computer/br.json +8 -8
  95. package/locales/computer/co.json +14 -14
  96. package/locales/computer/de.json +4 -4
  97. package/locales/computer/en.json +6 -6
  98. package/locales/computer/es.json +10 -10
  99. package/locales/computer/fr-CA.json +6 -6
  100. package/locales/computer/fr.json +6 -6
  101. package/locales/computer/it.json +9 -9
  102. package/locales/computer/ja.json +8 -8
  103. package/locales/computer/ko.json +14 -14
  104. package/locales/computer/pt.json +10 -10
  105. package/locales/computer/zh-Hans.json +8 -8
  106. package/locales/computer/zh-Hant.json +9 -9
  107. package/locales/connections/am.json +2 -0
  108. package/locales/connections/ar.json +2 -0
  109. package/locales/connections/bg.json +2 -0
  110. package/locales/connections/bn.json +2 -0
  111. package/locales/connections/br.json +5 -3
  112. package/locales/connections/co.json +17 -15
  113. package/locales/connections/cs.json +2 -0
  114. package/locales/connections/da.json +2 -0
  115. package/locales/connections/de.json +3 -1
  116. package/locales/connections/el.json +2 -0
  117. package/locales/connections/en.json +4 -2
  118. package/locales/connections/es.json +6 -4
  119. package/locales/connections/fa.json +2 -0
  120. package/locales/connections/fi.json +2 -0
  121. package/locales/connections/fr-CA.json +4 -2
  122. package/locales/connections/fr.json +4 -2
  123. package/locales/connections/ha.json +2 -0
  124. package/locales/connections/he.json +2 -0
  125. package/locales/connections/hi.json +2 -0
  126. package/locales/connections/hr.json +2 -0
  127. package/locales/connections/hu.json +2 -0
  128. package/locales/connections/id.json +2 -0
  129. package/locales/connections/it.json +12 -10
  130. package/locales/connections/ja.json +28 -26
  131. package/locales/connections/ko.json +5 -3
  132. package/locales/connections/mr.json +2 -0
  133. package/locales/connections/ms.json +2 -0
  134. package/locales/connections/nl.json +2 -0
  135. package/locales/connections/pl.json +2 -0
  136. package/locales/connections/pt.json +9 -7
  137. package/locales/connections/ro.json +2 -0
  138. package/locales/connections/ru.json +2 -0
  139. package/locales/connections/sk.json +2 -0
  140. package/locales/connections/sv.json +2 -0
  141. package/locales/connections/sw.json +2 -0
  142. package/locales/connections/ta.json +2 -0
  143. package/locales/connections/te.json +2 -0
  144. package/locales/connections/th.json +2 -0
  145. package/locales/connections/tl.json +2 -0
  146. package/locales/connections/tr.json +2 -0
  147. package/locales/connections/uk.json +2 -0
  148. package/locales/connections/ur.json +2 -0
  149. package/locales/connections/vi.json +2 -0
  150. package/locales/connections/yo.json +2 -0
  151. package/locales/connections/zh-Hans.json +10 -8
  152. package/locales/connections/zh-Hant.json +22 -20
  153. package/locales/creations/br.json +14 -14
  154. package/locales/creations/co.json +11 -11
  155. package/locales/creations/de.json +1 -1
  156. package/locales/creations/en.json +1 -1
  157. package/locales/creations/es.json +9 -9
  158. package/locales/creations/fr-CA.json +1 -1
  159. package/locales/creations/fr.json +9 -9
  160. package/locales/creations/it.json +8 -8
  161. package/locales/creations/ja.json +1 -1
  162. package/locales/creations/ko.json +1 -1
  163. package/locales/creations/pt.json +8 -8
  164. package/locales/creations/zh-Hans.json +1 -1
  165. package/locales/creations/zh-Hant.json +1 -1
  166. package/locales/cs.json +0 -3
  167. package/locales/da.json +0 -3
  168. package/locales/data/br.json +2 -2
  169. package/locales/data/co.json +3 -3
  170. package/locales/data/es.json +4 -4
  171. package/locales/data/it.json +1 -1
  172. package/locales/data/ja.json +9 -9
  173. package/locales/data/ko.json +2 -2
  174. package/locales/data/pt.json +6 -6
  175. package/locales/data/zh-Hans.json +2 -2
  176. package/locales/data/zh-Hant.json +4 -4
  177. package/locales/de.json +17 -20
  178. package/locales/designs/br.json +9 -9
  179. package/locales/designs/co.json +8 -8
  180. package/locales/designs/de.json +1 -1
  181. package/locales/designs/en.json +3 -3
  182. package/locales/designs/fr-CA.json +4 -4
  183. package/locales/designs/fr.json +5 -5
  184. package/locales/designs/it.json +6 -6
  185. package/locales/designs/ja.json +10 -10
  186. package/locales/designs/ko.json +6 -6
  187. package/locales/designs/pt.json +3 -3
  188. package/locales/designs/zh-Hans.json +1 -1
  189. package/locales/designs/zh-Hant.json +1 -1
  190. package/locales/dialogs/br.json +21 -21
  191. package/locales/dialogs/co.json +17 -17
  192. package/locales/dialogs/de.json +13 -13
  193. package/locales/dialogs/en.json +9 -9
  194. package/locales/dialogs/es.json +25 -25
  195. package/locales/dialogs/fr-CA.json +12 -12
  196. package/locales/dialogs/fr.json +12 -12
  197. package/locales/dialogs/it.json +20 -20
  198. package/locales/dialogs/ja.json +59 -59
  199. package/locales/dialogs/ko.json +26 -26
  200. package/locales/dialogs/pt.json +26 -26
  201. package/locales/dialogs/zh-Hans.json +23 -23
  202. package/locales/dialogs/zh-Hant.json +34 -34
  203. package/locales/documents/br.json +1 -1
  204. package/locales/documents/co.json +3 -3
  205. package/locales/documents/de.json +2 -2
  206. package/locales/documents/en.json +1 -1
  207. package/locales/documents/es.json +1 -1
  208. package/locales/documents/fr-CA.json +1 -1
  209. package/locales/documents/fr.json +1 -1
  210. package/locales/documents/it.json +1 -1
  211. package/locales/documents/ja.json +14 -14
  212. package/locales/documents/ko.json +2 -2
  213. package/locales/documents/pt.json +4 -4
  214. package/locales/documents/zh-Hans.json +2 -2
  215. package/locales/documents/zh-Hant.json +2 -2
  216. package/locales/el.json +0 -3
  217. package/locales/en.json +6 -9
  218. package/locales/enterprise/br.json +13 -13
  219. package/locales/enterprise/co.json +14 -14
  220. package/locales/enterprise/de.json +12 -12
  221. package/locales/enterprise/en.json +4 -4
  222. package/locales/enterprise/es.json +8 -8
  223. package/locales/enterprise/fr-CA.json +7 -7
  224. package/locales/enterprise/fr.json +11 -11
  225. package/locales/enterprise/it.json +9 -9
  226. package/locales/enterprise/ja.json +17 -17
  227. package/locales/enterprise/ko.json +12 -12
  228. package/locales/enterprise/pt.json +11 -11
  229. package/locales/enterprise/zh-Hans.json +22 -22
  230. package/locales/enterprise/zh-Hant.json +25 -25
  231. package/locales/es.json +16 -19
  232. package/locales/extensions/am.json +2 -1
  233. package/locales/extensions/ar.json +2 -1
  234. package/locales/extensions/bg.json +2 -1
  235. package/locales/extensions/bn.json +2 -1
  236. package/locales/extensions/br.json +12 -11
  237. package/locales/extensions/co.json +8 -7
  238. package/locales/extensions/cs.json +2 -1
  239. package/locales/extensions/da.json +2 -1
  240. package/locales/extensions/de.json +3 -2
  241. package/locales/extensions/el.json +2 -1
  242. package/locales/extensions/en.json +3 -2
  243. package/locales/extensions/es.json +4 -3
  244. package/locales/extensions/fa.json +2 -1
  245. package/locales/extensions/fi.json +2 -1
  246. package/locales/extensions/fr-CA.json +7 -6
  247. package/locales/extensions/fr.json +7 -6
  248. package/locales/extensions/ha.json +2 -1
  249. package/locales/extensions/he.json +2 -1
  250. package/locales/extensions/hi.json +2 -1
  251. package/locales/extensions/hr.json +2 -1
  252. package/locales/extensions/hu.json +2 -1
  253. package/locales/extensions/id.json +2 -1
  254. package/locales/extensions/it.json +5 -4
  255. package/locales/extensions/ja.json +7 -6
  256. package/locales/extensions/ko.json +24 -23
  257. package/locales/extensions/mr.json +2 -1
  258. package/locales/extensions/ms.json +2 -1
  259. package/locales/extensions/nl.json +2 -1
  260. package/locales/extensions/pl.json +2 -1
  261. package/locales/extensions/pt.json +5 -4
  262. package/locales/extensions/ro.json +2 -1
  263. package/locales/extensions/ru.json +2 -1
  264. package/locales/extensions/sk.json +2 -1
  265. package/locales/extensions/sv.json +2 -1
  266. package/locales/extensions/sw.json +2 -1
  267. package/locales/extensions/ta.json +2 -1
  268. package/locales/extensions/te.json +2 -1
  269. package/locales/extensions/th.json +2 -1
  270. package/locales/extensions/tl.json +2 -1
  271. package/locales/extensions/tr.json +2 -1
  272. package/locales/extensions/uk.json +2 -1
  273. package/locales/extensions/ur.json +2 -1
  274. package/locales/extensions/vi.json +2 -1
  275. package/locales/extensions/yo.json +2 -1
  276. package/locales/extensions/zh-Hans.json +5 -4
  277. package/locales/extensions/zh-Hant.json +9 -8
  278. package/locales/fa.json +0 -3
  279. package/locales/fi.json +0 -3
  280. package/locales/files/am.json +8 -0
  281. package/locales/files/ar.json +8 -0
  282. package/locales/files/bg.json +8 -0
  283. package/locales/files/bn.json +8 -0
  284. package/locales/files/br.json +8 -0
  285. package/locales/files/co.json +8 -0
  286. package/locales/files/cs.json +8 -0
  287. package/locales/files/da.json +8 -0
  288. package/locales/files/de.json +8 -0
  289. package/locales/files/el.json +8 -0
  290. package/locales/files/en.json +8 -0
  291. package/locales/files/es.json +8 -0
  292. package/locales/files/fa.json +8 -0
  293. package/locales/files/fi.json +8 -0
  294. package/locales/files/fr-CA.json +8 -0
  295. package/locales/files/fr.json +8 -0
  296. package/locales/files/ha.json +8 -0
  297. package/locales/files/he.json +8 -0
  298. package/locales/files/hi.json +8 -0
  299. package/locales/files/hr.json +8 -0
  300. package/locales/files/hu.json +8 -0
  301. package/locales/files/id.json +8 -0
  302. package/locales/files/it.json +8 -0
  303. package/locales/files/ja.json +8 -0
  304. package/locales/files/ko.json +8 -0
  305. package/locales/files/mr.json +8 -0
  306. package/locales/files/ms.json +8 -0
  307. package/locales/files/nl.json +8 -0
  308. package/locales/files/pl.json +8 -0
  309. package/locales/files/pt.json +8 -0
  310. package/locales/files/ro.json +8 -0
  311. package/locales/files/ru.json +8 -0
  312. package/locales/files/sk.json +8 -0
  313. package/locales/files/sv.json +8 -0
  314. package/locales/files/sw.json +8 -0
  315. package/locales/files/ta.json +8 -0
  316. package/locales/files/te.json +8 -0
  317. package/locales/files/th.json +8 -0
  318. package/locales/files/tl.json +8 -0
  319. package/locales/files/tr.json +8 -0
  320. package/locales/files/uk.json +8 -0
  321. package/locales/files/ur.json +8 -0
  322. package/locales/files/vi.json +8 -0
  323. package/locales/files/yo.json +8 -0
  324. package/locales/files/zh-Hans.json +8 -0
  325. package/locales/files/zh-Hant.json +8 -0
  326. package/locales/first/br.json +5 -5
  327. package/locales/first/co.json +1 -1
  328. package/locales/first/es.json +4 -4
  329. package/locales/first/fr-CA.json +1 -1
  330. package/locales/first/fr.json +1 -1
  331. package/locales/first/it.json +1 -1
  332. package/locales/first/ja.json +7 -7
  333. package/locales/first/ko.json +3 -3
  334. package/locales/first/pt.json +3 -3
  335. package/locales/first/zh-Hans.json +2 -2
  336. package/locales/first/zh-Hant.json +3 -3
  337. package/locales/flows/br.json +7 -7
  338. package/locales/flows/co.json +4 -4
  339. package/locales/flows/de.json +2 -2
  340. package/locales/flows/es.json +2 -2
  341. package/locales/flows/fr-CA.json +3 -3
  342. package/locales/flows/fr.json +3 -3
  343. package/locales/flows/it.json +2 -2
  344. package/locales/flows/ja.json +4 -4
  345. package/locales/flows/ko.json +7 -7
  346. package/locales/flows/pt.json +6 -6
  347. package/locales/flows/zh-Hans.json +5 -5
  348. package/locales/flows/zh-Hant.json +8 -8
  349. package/locales/folders/br.json +4 -4
  350. package/locales/folders/de.json +1 -1
  351. package/locales/folders/es.json +2 -2
  352. package/locales/folders/ja.json +2 -2
  353. package/locales/folders/ko.json +3 -3
  354. package/locales/folders/pt.json +2 -2
  355. package/locales/folders/zh-Hans.json +2 -2
  356. package/locales/folders/zh-Hant.json +7 -7
  357. package/locales/fr-CA.json +34 -37
  358. package/locales/fr.json +31 -34
  359. package/locales/games/br.json +2 -2
  360. package/locales/ha.json +0 -3
  361. package/locales/he.json +0 -3
  362. package/locales/hi.json +0 -3
  363. package/locales/hr.json +0 -3
  364. package/locales/hu.json +0 -3
  365. package/locales/id.json +0 -3
  366. package/locales/interactive/br.json +8 -8
  367. package/locales/interactive/co.json +5 -5
  368. package/locales/interactive/es.json +1 -1
  369. package/locales/interactive/it.json +1 -1
  370. package/locales/interactive/ja.json +3 -3
  371. package/locales/interactive/ko.json +3 -3
  372. package/locales/interactive/pt.json +2 -2
  373. package/locales/interactive/zh-Hans.json +1 -1
  374. package/locales/interactive/zh-Hant.json +6 -6
  375. package/locales/it.json +39 -42
  376. package/locales/ja.json +31 -34
  377. package/locales/ko.json +25 -28
  378. package/locales/layouts/ja.json +1 -1
  379. package/locales/layouts/zh-Hans.json +1 -1
  380. package/locales/layouts/zh-Hant.json +1 -1
  381. package/locales/lock/br.json +3 -3
  382. package/locales/lock/co.json +4 -4
  383. package/locales/lock/de.json +4 -4
  384. package/locales/lock/en.json +1 -1
  385. package/locales/lock/es.json +1 -1
  386. package/locales/lock/fr-CA.json +3 -3
  387. package/locales/lock/fr.json +3 -3
  388. package/locales/lock/it.json +5 -5
  389. package/locales/lock/ja.json +6 -6
  390. package/locales/lock/ko.json +2 -2
  391. package/locales/lock/pt.json +1 -1
  392. package/locales/lock/zh-Hans.json +3 -3
  393. package/locales/lock/zh-Hant.json +3 -3
  394. package/locales/look/am.json +5 -1
  395. package/locales/look/ar.json +5 -1
  396. package/locales/look/bg.json +5 -1
  397. package/locales/look/bn.json +5 -1
  398. package/locales/look/br.json +14 -10
  399. package/locales/look/co.json +5 -1
  400. package/locales/look/cs.json +5 -1
  401. package/locales/look/da.json +5 -1
  402. package/locales/look/de.json +5 -1
  403. package/locales/look/el.json +5 -1
  404. package/locales/look/en.json +5 -1
  405. package/locales/look/es.json +7 -3
  406. package/locales/look/fa.json +5 -1
  407. package/locales/look/fi.json +5 -1
  408. package/locales/look/fr-CA.json +5 -1
  409. package/locales/look/fr.json +5 -1
  410. package/locales/look/ha.json +5 -1
  411. package/locales/look/he.json +5 -1
  412. package/locales/look/hi.json +5 -1
  413. package/locales/look/hr.json +5 -1
  414. package/locales/look/hu.json +5 -1
  415. package/locales/look/id.json +5 -1
  416. package/locales/look/it.json +5 -1
  417. package/locales/look/ja.json +11 -7
  418. package/locales/look/ko.json +6 -2
  419. package/locales/look/mr.json +5 -1
  420. package/locales/look/ms.json +5 -1
  421. package/locales/look/nl.json +5 -1
  422. package/locales/look/pl.json +5 -1
  423. package/locales/look/pt.json +7 -3
  424. package/locales/look/ro.json +5 -1
  425. package/locales/look/ru.json +5 -1
  426. package/locales/look/sk.json +5 -1
  427. package/locales/look/sv.json +5 -1
  428. package/locales/look/sw.json +5 -1
  429. package/locales/look/ta.json +5 -1
  430. package/locales/look/te.json +5 -1
  431. package/locales/look/th.json +5 -1
  432. package/locales/look/tl.json +5 -1
  433. package/locales/look/tr.json +5 -1
  434. package/locales/look/uk.json +5 -1
  435. package/locales/look/ur.json +5 -1
  436. package/locales/look/vi.json +5 -1
  437. package/locales/look/yo.json +5 -1
  438. package/locales/look/zh-Hans.json +10 -6
  439. package/locales/look/zh-Hant.json +15 -11
  440. package/locales/machine/br.json +5 -5
  441. package/locales/machine/co.json +4 -4
  442. package/locales/machine/de.json +2 -2
  443. package/locales/machine/en.json +2 -2
  444. package/locales/machine/es.json +8 -8
  445. package/locales/machine/fr-CA.json +4 -4
  446. package/locales/machine/fr.json +4 -4
  447. package/locales/machine/it.json +9 -9
  448. package/locales/machine/ja.json +4 -4
  449. package/locales/machine/ko.json +10 -10
  450. package/locales/machine/pt.json +4 -4
  451. package/locales/machine/zh-Hans.json +7 -7
  452. package/locales/machine/zh-Hant.json +10 -10
  453. package/locales/made/br.json +2 -2
  454. package/locales/made/fr-CA.json +3 -3
  455. package/locales/made/fr.json +3 -3
  456. package/locales/made/ko.json +1 -1
  457. package/locales/made/pt.json +3 -3
  458. package/locales/made/zh-Hans.json +2 -2
  459. package/locales/made/zh-Hant.json +1 -1
  460. package/locales/mr.json +0 -3
  461. package/locales/ms.json +0 -3
  462. package/locales/nl.json +0 -3
  463. package/locales/notifications/br.json +2 -2
  464. package/locales/notifications/es.json +4 -4
  465. package/locales/notifications/it.json +2 -2
  466. package/locales/notifications/pt.json +2 -2
  467. package/locales/notifications/zh-Hans.json +1 -1
  468. package/locales/notifications/zh-Hant.json +2 -2
  469. package/locales/out/co.json +1 -1
  470. package/locales/out/de.json +1 -1
  471. package/locales/out/es.json +1 -1
  472. package/locales/out/fr-CA.json +1 -1
  473. package/locales/out/fr.json +1 -1
  474. package/locales/out/ja.json +1 -1
  475. package/locales/out/pt.json +1 -1
  476. package/locales/out/zh-Hans.json +2 -2
  477. package/locales/pictures/br.json +5 -5
  478. package/locales/pictures/co.json +5 -5
  479. package/locales/pictures/de.json +3 -3
  480. package/locales/pictures/en.json +2 -2
  481. package/locales/pictures/es.json +4 -4
  482. package/locales/pictures/fr-CA.json +6 -6
  483. package/locales/pictures/fr.json +4 -4
  484. package/locales/pictures/it.json +7 -7
  485. package/locales/pictures/ja.json +8 -8
  486. package/locales/pictures/ko.json +8 -8
  487. package/locales/pictures/pt.json +5 -5
  488. package/locales/pictures/zh-Hans.json +5 -5
  489. package/locales/pictures/zh-Hant.json +6 -6
  490. package/locales/pl.json +0 -3
  491. package/locales/plan/fr-CA.json +1 -1
  492. package/locales/plan/fr.json +1 -1
  493. package/locales/plan/it.json +2 -2
  494. package/locales/plan/ja.json +3 -3
  495. package/locales/plan/zh-Hans.json +2 -2
  496. package/locales/plan/zh-Hant.json +1 -1
  497. package/locales/policy/am.json +1 -0
  498. package/locales/policy/ar.json +1 -0
  499. package/locales/policy/bg.json +1 -0
  500. package/locales/policy/bn.json +1 -0
  501. package/locales/policy/br.json +1 -0
  502. package/locales/policy/co.json +3 -2
  503. package/locales/policy/cs.json +1 -0
  504. package/locales/policy/da.json +1 -0
  505. package/locales/policy/de.json +1 -0
  506. package/locales/policy/el.json +1 -0
  507. package/locales/policy/en.json +1 -0
  508. package/locales/policy/es.json +4 -3
  509. package/locales/policy/fa.json +1 -0
  510. package/locales/policy/fi.json +1 -0
  511. package/locales/policy/fr-CA.json +2 -1
  512. package/locales/policy/fr.json +2 -1
  513. package/locales/policy/ha.json +1 -0
  514. package/locales/policy/he.json +1 -0
  515. package/locales/policy/hi.json +1 -0
  516. package/locales/policy/hr.json +1 -0
  517. package/locales/policy/hu.json +1 -0
  518. package/locales/policy/id.json +1 -0
  519. package/locales/policy/it.json +4 -3
  520. package/locales/policy/ja.json +3 -2
  521. package/locales/policy/ko.json +1 -0
  522. package/locales/policy/mr.json +1 -0
  523. package/locales/policy/ms.json +1 -0
  524. package/locales/policy/nl.json +1 -0
  525. package/locales/policy/pl.json +1 -0
  526. package/locales/policy/pt.json +4 -3
  527. package/locales/policy/ro.json +1 -0
  528. package/locales/policy/ru.json +1 -0
  529. package/locales/policy/sk.json +1 -0
  530. package/locales/policy/sv.json +1 -0
  531. package/locales/policy/sw.json +1 -0
  532. package/locales/policy/ta.json +1 -0
  533. package/locales/policy/te.json +1 -0
  534. package/locales/policy/th.json +1 -0
  535. package/locales/policy/tl.json +1 -0
  536. package/locales/policy/tr.json +1 -0
  537. package/locales/policy/uk.json +1 -0
  538. package/locales/policy/ur.json +1 -0
  539. package/locales/policy/vi.json +1 -0
  540. package/locales/policy/yo.json +1 -0
  541. package/locales/policy/zh-Hans.json +9 -8
  542. package/locales/policy/zh-Hant.json +17 -16
  543. package/locales/profiles/br.json +10 -10
  544. package/locales/profiles/co.json +9 -9
  545. package/locales/profiles/de.json +1 -1
  546. package/locales/profiles/en.json +2 -2
  547. package/locales/profiles/es.json +2 -2
  548. package/locales/profiles/fr-CA.json +8 -8
  549. package/locales/profiles/fr.json +8 -8
  550. package/locales/profiles/it.json +6 -6
  551. package/locales/profiles/ja.json +9 -9
  552. package/locales/profiles/ko.json +22 -22
  553. package/locales/profiles/pt.json +5 -5
  554. package/locales/profiles/zh-Hans.json +14 -14
  555. package/locales/profiles/zh-Hant.json +9 -9
  556. package/locales/pt.json +26 -29
  557. package/locales/reader/es.json +1 -1
  558. package/locales/reader/ja.json +4 -4
  559. package/locales/reader/zh-Hans.json +1 -1
  560. package/locales/reader/zh-Hant.json +2 -2
  561. package/locales/receipt/am.json +7 -1
  562. package/locales/receipt/ar.json +7 -1
  563. package/locales/receipt/bg.json +7 -1
  564. package/locales/receipt/bn.json +7 -1
  565. package/locales/receipt/br.json +9 -3
  566. package/locales/receipt/co.json +9 -3
  567. package/locales/receipt/cs.json +7 -1
  568. package/locales/receipt/da.json +7 -1
  569. package/locales/receipt/de.json +9 -3
  570. package/locales/receipt/el.json +7 -1
  571. package/locales/receipt/en.json +9 -3
  572. package/locales/receipt/es.json +12 -6
  573. package/locales/receipt/fa.json +7 -1
  574. package/locales/receipt/fi.json +7 -1
  575. package/locales/receipt/fr-CA.json +9 -3
  576. package/locales/receipt/fr.json +9 -3
  577. package/locales/receipt/ha.json +7 -1
  578. package/locales/receipt/he.json +7 -1
  579. package/locales/receipt/hi.json +7 -1
  580. package/locales/receipt/hr.json +7 -1
  581. package/locales/receipt/hu.json +7 -1
  582. package/locales/receipt/id.json +7 -1
  583. package/locales/receipt/it.json +14 -8
  584. package/locales/receipt/ja.json +12 -6
  585. package/locales/receipt/ko.json +8 -2
  586. package/locales/receipt/mr.json +7 -1
  587. package/locales/receipt/ms.json +7 -1
  588. package/locales/receipt/nl.json +7 -1
  589. package/locales/receipt/pl.json +7 -1
  590. package/locales/receipt/pt.json +11 -5
  591. package/locales/receipt/ro.json +7 -1
  592. package/locales/receipt/ru.json +7 -1
  593. package/locales/receipt/sk.json +7 -1
  594. package/locales/receipt/sv.json +7 -1
  595. package/locales/receipt/sw.json +7 -1
  596. package/locales/receipt/ta.json +7 -1
  597. package/locales/receipt/te.json +7 -1
  598. package/locales/receipt/th.json +7 -1
  599. package/locales/receipt/tl.json +7 -1
  600. package/locales/receipt/tr.json +7 -1
  601. package/locales/receipt/uk.json +7 -1
  602. package/locales/receipt/ur.json +7 -1
  603. package/locales/receipt/vi.json +7 -1
  604. package/locales/receipt/yo.json +7 -1
  605. package/locales/receipt/zh-Hans.json +10 -4
  606. package/locales/receipt/zh-Hant.json +18 -12
  607. package/locales/ro.json +0 -3
  608. package/locales/routines/br.json +10 -10
  609. package/locales/routines/co.json +6 -6
  610. package/locales/routines/es.json +4 -4
  611. package/locales/routines/fr-CA.json +2 -2
  612. package/locales/routines/fr.json +2 -2
  613. package/locales/routines/it.json +1 -1
  614. package/locales/routines/ja.json +12 -12
  615. package/locales/routines/ko.json +1 -1
  616. package/locales/routines/pt.json +5 -5
  617. package/locales/routines/zh-Hans.json +2 -2
  618. package/locales/routines/zh-Hant.json +3 -3
  619. package/locales/ru.json +0 -3
  620. package/locales/scores/de.json +1 -1
  621. package/locales/scores/it.json +1 -1
  622. package/locales/scores/ja.json +2 -2
  623. package/locales/scores/ko.json +1 -1
  624. package/locales/search/br.json +9 -9
  625. package/locales/search/co.json +7 -7
  626. package/locales/search/de.json +2 -2
  627. package/locales/search/es.json +4 -4
  628. package/locales/search/fr-CA.json +1 -1
  629. package/locales/search/fr.json +1 -1
  630. package/locales/search/it.json +1 -1
  631. package/locales/search/ja.json +8 -8
  632. package/locales/search/ko.json +1 -1
  633. package/locales/search/pt.json +3 -3
  634. package/locales/search/zh-Hans.json +3 -3
  635. package/locales/search/zh-Hant.json +19 -19
  636. package/locales/share/br.json +6 -6
  637. package/locales/share/co.json +4 -4
  638. package/locales/share/de.json +2 -2
  639. package/locales/share/es.json +1 -1
  640. package/locales/share/fr-CA.json +5 -5
  641. package/locales/share/fr.json +3 -3
  642. package/locales/share/it.json +4 -4
  643. package/locales/share/ja.json +15 -15
  644. package/locales/share/ko.json +4 -4
  645. package/locales/share/pt.json +2 -2
  646. package/locales/share/zh-Hans.json +8 -8
  647. package/locales/share/zh-Hant.json +14 -14
  648. package/locales/signin/br.json +1 -1
  649. package/locales/signin/co.json +1 -1
  650. package/locales/signin/es.json +1 -1
  651. package/locales/signin/ja.json +1 -1
  652. package/locales/signin/ko.json +2 -2
  653. package/locales/signin/pt.json +1 -1
  654. package/locales/signin/zh-Hans.json +1 -1
  655. package/locales/signin/zh-Hant.json +1 -1
  656. package/locales/sk.json +0 -3
  657. package/locales/skills/br.json +7 -7
  658. package/locales/skills/co.json +7 -7
  659. package/locales/skills/de.json +5 -5
  660. package/locales/skills/es.json +4 -4
  661. package/locales/skills/fr-CA.json +3 -3
  662. package/locales/skills/fr.json +3 -3
  663. package/locales/skills/it.json +1 -1
  664. package/locales/skills/ja.json +16 -16
  665. package/locales/skills/ko.json +1 -1
  666. package/locales/skills/pt.json +5 -5
  667. package/locales/skills/zh-Hans.json +2 -2
  668. package/locales/skills/zh-Hant.json +4 -4
  669. package/locales/slides/br.json +11 -11
  670. package/locales/slides/co.json +28 -28
  671. package/locales/slides/en.json +4 -4
  672. package/locales/slides/es.json +7 -7
  673. package/locales/slides/it.json +6 -6
  674. package/locales/slides/ja.json +5 -5
  675. package/locales/slides/ko.json +14 -14
  676. package/locales/slides/pt.json +9 -9
  677. package/locales/slides/zh-Hans.json +4 -4
  678. package/locales/slides/zh-Hant.json +3 -3
  679. package/locales/sv.json +0 -3
  680. package/locales/sw.json +0 -3
  681. package/locales/sync/br.json +2 -2
  682. package/locales/sync/de.json +2 -2
  683. package/locales/sync/es.json +6 -6
  684. package/locales/sync/it.json +1 -1
  685. package/locales/sync/ja.json +2 -2
  686. package/locales/sync/pt.json +1 -1
  687. package/locales/ta.json +0 -3
  688. package/locales/tables/br.json +8 -8
  689. package/locales/tables/co.json +15 -15
  690. package/locales/tables/de.json +2 -2
  691. package/locales/tables/fr-CA.json +4 -4
  692. package/locales/tables/fr.json +3 -3
  693. package/locales/tables/ja.json +2 -2
  694. package/locales/tables/ko.json +4 -4
  695. package/locales/tables/pt.json +8 -8
  696. package/locales/tables/zh-Hans.json +1 -1
  697. package/locales/tables/zh-Hant.json +1 -1
  698. package/locales/te.json +0 -3
  699. package/locales/th.json +0 -3
  700. package/locales/tl.json +0 -3
  701. package/locales/tr.json +0 -3
  702. package/locales/uk.json +0 -3
  703. package/locales/ur.json +0 -3
  704. package/locales/vi.json +0 -3
  705. package/locales/yo.json +0 -3
  706. package/locales/you/br.json +13 -13
  707. package/locales/you/co.json +2 -2
  708. package/locales/you/de.json +1 -1
  709. package/locales/you/en.json +1 -1
  710. package/locales/you/es.json +2 -2
  711. package/locales/you/fr-CA.json +3 -3
  712. package/locales/you/fr.json +3 -3
  713. package/locales/you/it.json +10 -10
  714. package/locales/you/ja.json +9 -9
  715. package/locales/you/pt.json +11 -11
  716. package/locales/you/zh-Hans.json +3 -3
  717. package/locales/you/zh-Hant.json +3 -3
  718. package/locales/zh-Hans.json +23 -26
  719. package/locales/zh-Hant.json +34 -37
  720. package/package.json +1 -1
  721. package/preview.html +8 -2
  722. package/ui/kit.js +2 -5
  723. package/ui/looks/classic.css +2 -0
  724. package/ui/looks/human.css +3 -2
  725. package/ui/looks.js +2 -5
  726. package/ui/reader-state.js +1 -1
  727. package/ui/reader.js +1 -1
  728. package/ui/style.css +8 -9
  729. package/ui/touches.js +22 -0
  730. package/ui/view.css +20 -1
  731. package/ui/view.js +28 -8
  732. package/ui/looks/mondrian.css +0 -90
  733. package/ui/looks/paper.css +0 -51
@@ -1,5 +1,5 @@
1
1
  // Charts (D196): a ```echarts block in an answer, drawn by ECharts on a canvas, with the theme's
2
- // light or dark, the room's type and numbers in the user's language; drawn again as its box, the
2
+ // 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
3
  // theme, the look or the language changes; copied as its source and its picture, on light paper,
4
4
  // at once. The block is data (./option.js). While it is written, what is whole of it so far is
5
5
  // drawn, and the chart grows as more comes. Loaded by the first chart an answer holds; until then,
@@ -13,7 +13,7 @@ import { drawnActions } from '../../ui/caps.js'
13
13
  import { icons } from '../../ui/icons.js'
14
14
  import { styleSheet, still } from '../../ui/sheet.js'
15
15
  import { t, dir, locale, intlLocales, useStrings } from '../../core/i18n.js'
16
- import { readOption, localize, titleOf, namesIn, sideOf } from './option.js'
16
+ import { readOption, localize, titleOf, namesIn, paperTheme, paperLabels, sideOf } from './option.js'
17
17
 
18
18
  /** @typedef {import('./option.js').Option} Option */
19
19
 
@@ -90,7 +90,7 @@ class AppChart extends HTMLElement {
90
90
  draw() {
91
91
  const source = this.getAttribute('source') ?? ''
92
92
  const open = this.hasAttribute('open')
93
- const look = [theme.peek(), app.look.peek(), locale.peek()].join('\n')
93
+ const paper = this.paper(), look = [theme.peek(), app.look.peek(), locale.peek(), paper?.textStyle.color].join('\n')
94
94
  const key = [look, open, source].join('\n')
95
95
  if (key === this.drawn) return
96
96
  this.drawn = key
@@ -110,11 +110,11 @@ class AppChart extends HTMLElement {
110
110
  if (!option || !box) return
111
111
  try {
112
112
  // In SVG on a slide (`svg`), which a deck saved as PowerPoint reads as it is drawn (D593).
113
- this.chart ??= echarts.init(box, theme.peek() === 'dark' ? 'dark' : undefined, { renderer: this.hasAttribute('svg') ? 'svg' : 'canvas' })
113
+ this.chart ??= echarts.init(box, paper ?? (theme.peek() === 'dark' ? 'dark' : undefined), { renderer: this.hasAttribute('svg') ? 'svg' : 'canvas' })
114
114
  if (!more) this.fit()
115
115
  this.made = look
116
116
  // Without animation while it grows: each would start again with the next few values.
117
- this.chart.setOption({ ...dressed(option, getComputedStyle(this).fontFamily), ...(open && { animation: false }) })
117
+ this.chart.setOption({ ...dressed(paper ? { ...option, series: paperLabels(option.series, paper.textStyle.color) } : option, getComputedStyle(this).fontFamily), ...(open && { animation: false }) })
118
118
  this.sized.observe(box)
119
119
  } catch (error) {
120
120
  // Half an option may not draw yet; a whole one that doesn't is worth a word.
@@ -125,6 +125,15 @@ class AppChart extends HTMLElement {
125
125
  }
126
126
  }
127
127
 
128
+ /** On a slide (`svg`), ECharts' theme for the paper under the chart, which a tile or a part may have over the slide's. */
129
+ paper() {
130
+ if (!this.hasAttribute('svg')) return null
131
+ /** @type {Element} */
132
+ let under = this
133
+ while (under.parentElement && !getComputedStyle(under).backgroundColor.startsWith('rgb(')) under = under.parentElement
134
+ return paperTheme(getComputedStyle(this).color, getComputedStyle(under).backgroundColor)
135
+ }
136
+
128
137
  /**
129
138
  * The chart to its box. On a slide (`svg`), drawn at a size of its own and scaled up to it, so that its words, lines and margins
130
139
  * grow with the slide's as they all do, at any size of slide: ECharts' 12px as six tenths of the slide's type, or less in a short
@@ -141,6 +141,23 @@ export function localize(option, format) {
141
141
  return option
142
142
  }
143
143
 
144
+ /**
145
+ * ECharts' theme on a slide, whose paper isn't the room's: every word in the slide's colour where that reads on the paper under
146
+ * the chart at AA, else in black or white, whichever does. A theme, so that what the chart names itself stays. Colours as CSS
147
+ * computes them, `rgb(…)`. @param {string} words @param {string} paper
148
+ */
149
+ export function paperTheme(words, paper) {
150
+ const luminance = (/** @type {string} */ colour) => (colour.match(/[\d.]+/g) ?? []).slice(0, 3).map((c) => Number(c) / 255).map((s) => (s <= 0.04045 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4)).reduce((sum, s, i) => sum + s * [0.2126, 0.7152, 0.0722][i], 0)
151
+ const under = luminance(paper), over = luminance(words), dark = under < 0.179
152
+ const color = (Math.max(under, over) + 0.05) / (Math.min(under, over) + 0.05) >= 4.5 ? words : dark ? 'rgb(255, 255, 255)' : 'rgb(0, 0, 0)'
153
+ const axis = { axisLine: { lineStyle: { color } }, axisLabel: { color }, splitLine: { lineStyle: { color: color.replace('rgb(', 'rgba(').replace(')', ', 0.2)') } } }
154
+ return { darkMode: dark, textStyle: { color }, title: { textStyle: { color }, subtextStyle: { color } }, legend: { textStyle: { color }, pageTextStyle: { color } }, visualMap: { textStyle: { color } }, dataZoom: { textStyle: { color } }, timeline: { label: { color } },
155
+ calendar: { dayLabel: { color }, monthLabel: { color }, yearLabel: { color } }, matrix: { x: { label: { color } }, y: { label: { color } } }, gauge: { title: { color }, axisLabel: { color }, detail: { color } }, radar: { ...axis, axisName: { color } }, categoryAxis: axis, valueAxis: axis, timeAxis: axis, logAxis: axis }
156
+ }
157
+
158
+ /** The series with their labels in `color` where they stand on the paper, not on their marks, as a bar's do unless it says. @param {unknown} series @param {string} color */
159
+ export const paperLabels = (series, color) => all(series).map((one) => (/in|center/.test(one.label?.position ?? (/^(bar|pictorialBar|heatmap|treemap|sunburst|graph|map)$/.test(one.type) ? 'in' : '')) ? one : { ...one, label: { color, ...one.label } }))
160
+
144
161
  /** What a chart is called: its first title. @param {Option} option */
145
162
  export const titleOf = (option) => String(all(option.title).find((title) => title.text)?.text ?? '')
146
163
 
@@ -1,14 +1,15 @@
1
1
  // Word, Excel and PowerPoint files as Office draws them (D183), in a file's pane and the browser: by
2
2
  // @silurus/ooxml, its parsers WebAssembly, its viewers drawing on a canvas, so nothing of the file
3
3
  // becomes markup, in a frame of a file pane's kind (an opaque origin with no network), in a page made
4
- // here: modules as data: addresses under an import map, the parser and the file as data too.
4
+ // here: its modules as text the page makes blob: addresses of, under an import map it writes, the
5
+ // parser and the file as data.
5
6
  import { encode } from '../../ui/seal.js'
6
7
  import { t } from '../../core/i18n.js'
7
8
 
8
9
  const BASE = new URL('../../vendor/ooxml/', import.meta.url)
9
10
  const VIEWERS = /** @type {Record<string, string>} */ ({ docx: 'DocxScrollViewer', pptx: 'PptxScrollViewer', xlsx: 'XlsxViewer' })
10
- /** A file of vendor/ooxml as a data: address. @param {string} path @param {string} [type] */
11
- const data = async (path, type = 'text/javascript') => `data:${type};base64,${encode(new Uint8Array(await (await fetch(new URL(path, BASE))).arrayBuffer()))}`
11
+ /** A file of vendor/ooxml. @param {string} path */
12
+ const read = (path) => fetch(new URL(path, BASE))
12
13
  let graph = /** @type {Promise<Record<string, string[]>> | undefined} */ (undefined)
13
14
 
14
15
  /** Where a workbook was being looked at: its sheet, how far it was scrolled, the cell chosen. @typedef {{ sheet: number, x: number, y: number, ref: string }} Place */
@@ -16,7 +17,9 @@ let graph = /** @type {Promise<Record<string, string[]>> | undefined} */ (undefi
16
17
  // A workbook's cells changed where they are (D229): a double click, F2 or typing opens a box over the cell
17
18
  // chosen (Enter is the viewer's, for comments); Enter, Tab or leaving it sends Jean what it is to hold, and
18
19
  // Jean keeps a new version and shows it again where it was; Escape leaves the box, as does Jean's answer
19
- // that the cell can't change. Closed from the keyboard, the box gives the keys back to the sheet.
20
+ // that the cell can't change. Closed from the keyboard, the box gives the keys back to the sheet. A sheet is
21
+ // drawn before the viewer has read it whole, and can't say what a cell holds until then: the box waits for
22
+ // that, 10 s at most, unless another box opened meanwhile.
20
23
  const CELLS = `
21
24
  const box = Object.assign(document.createElement('input'), { dir: 'auto', spellcheck: false, autocomplete: 'off' })
22
25
  box.style.cssText = 'position: fixed; display: none; box-sizing: border-box; margin: 0; padding: 0 4px; border: 2px solid #1a73e8; background: #fff; color: #111; font: 13px system-ui, sans-serif'
@@ -26,11 +29,13 @@ let was = ''
26
29
  let back = null
27
30
  const ref = ({ row, col }) => { let name = ''; for (let n = col; n > 0; n = Math.floor((n - 1) / 26)) name = String.fromCharCode(65 + ((n - 1) % 26)) + name; return name + row }
28
31
  const close = (keys) => { cell = null; box.readOnly = false; box.style.display = 'none'; if (keys) back?.focus() }
29
- const open = (typed) => {
32
+ const open = (typed, tries = 0) => {
30
33
  const active = viewer.selectionState?.activeCell
31
34
  const rect = active && viewer.getCellViewportRect(active)
32
35
  if (!rect) return
33
- const known = viewer.getSelectionContext()?.cells?.find(({ address }) => address.row === active.row && address.col === active.col)
36
+ const context = viewer.getSelectionContext()
37
+ if (!context) return void (tries < 200 && setTimeout(() => cell || open(typed, tries + 1), 50))
38
+ const known = context.cells?.find(({ address }) => address.row === active.row && address.col === active.col)
34
39
  const grid = viewer.canvasElement.getBoundingClientRect()
35
40
  cell = active
36
41
  back = document.activeElement
@@ -73,16 +78,18 @@ addEventListener('message', ({ source, data }) => { if (source === parent && dat
73
78
  */
74
79
  export async function officePage(ext, bytes, name, cells, words) {
75
80
  graph ??= fetch(new URL('graph.json', BASE)).then((response) => response.json())
76
- const imports = Object.fromEntries(await Promise.all((await graph)[ext].map(async (file) => [`ooxml/${file}`, await data(file)])))
81
+ // Its modules as blob: addresses the page makes, never data: ones: Chromium took 2.6 s over the 1.6 MB data: address of a Word
82
+ // document's largest module, on a fast computer, and fourteen on a busy one, and Jean's page, whose thread the frame shares, froze with it.
83
+ const modules = Object.fromEntries(await Promise.all((await graph)[ext].map(async (file) => [`ooxml/${file}`, await (await read(file)).text()])))
77
84
  const failed = JSON.stringify(t('files.failed', { name })).replace(/</g, '\\u003c')
78
85
  const at = JSON.stringify(cells?.at ?? null).replace(/</g, '\\u003c')
79
86
  const find = words && JSON.stringify(words.replace(/^#+ /gm, '').split('\n').map((line) => line.trim()).sort((a, b) => b.length - a.length)[0]).replace(/</g, '\\u003c')
80
87
  return /* html */ `<meta charset="utf-8"><style>html, body { block-size: 100%; margin: 0; background: #ececef; font: 0.9rem system-ui, sans-serif; } main { block-size: 100vh; } p { margin: 2rem; text-align: center; }</style>
81
- <script type="importmap">${JSON.stringify({ imports })}</script><main></main>
88
+ <script>document.head.append(Object.assign(document.createElement('script'), { type: 'importmap', textContent: JSON.stringify({ imports: Object.fromEntries(Object.entries(${JSON.stringify(modules).replace(/</g, '\\u003c')}).map(([name, text]) => [name, URL.createObjectURL(new Blob([text], { type: 'text/javascript' }))])) }) }))</script><main></main>
82
89
  <script type="module">
83
90
  import { ${VIEWERS[ext]} as Viewer } from 'ooxml/${ext}.mjs'
84
91
  const main = document.querySelector('main')
85
- const viewer = new Viewer(main, { wasmUrl: '${await data(`${ext}_parser_bg.wasm`, 'application/wasm')}', enableTextSelection: true, background: '#ececef' })
92
+ const viewer = new Viewer(main, { wasmUrl: 'data:application/wasm;base64,${encode(new Uint8Array(await (await read(`${ext}_parser_bg.wasm`)).arrayBuffer()))}', enableTextSelection: true, background: '#ececef' })
86
93
  viewer.load(Uint8Array.from(atob('${encode(bytes)}'), (char) => char.charCodeAt(0)).buffer)${find ? `
87
94
  .then(() => viewer.findText(${find}).then(() => viewer.findNext()).catch(() => {}))` : ''}${ext === 'xlsx' && cells ? `
88
95
  .then(async () => {
package/caps/files/pdf.js CHANGED
@@ -22,6 +22,9 @@ function pdfjs() {
22
22
  return library
23
23
  }
24
24
 
25
+ /** pdf.js's words of a page, laid over it to select (D690). */
26
+ export const textLayer = async () => (await pdfjs()).TextLayer
27
+
25
28
  /** A PDF, opened: its text is read here, its pages drawn where a file shows (ui/view.js, D126). @param {Uint8Array} bytes */
26
29
  export async function openPdf(bytes) {
27
30
  return (await pdfjs()).getDocument({
@@ -12,14 +12,11 @@ import { icon, icons } from '../../ui/menu-icons.js'
12
12
  import { t } from '../../core/i18n.js'
13
13
  import { ask, page } from '../../ui/creations.js'
14
14
  import { held } from '../../ui/held.js'
15
- import { capability, page as drawn } from './interactive.js'
15
+ import { capability, named, page as drawn } from './interactive.js'
16
16
  import { frozen } from './parts.js'
17
17
 
18
18
  /** Four tiles, the last turned on its corner: what is made to be used. */
19
19
  const GLYPH = icon(svg`<rect x="4" y="4" width="6.5" height="6.5" rx="1.5"/><rect x="4" y="13.5" width="6.5" height="6.5" rx="1.5"/><rect x="13.5" y="13.5" width="6.5" height="6.5" rx="1.5"/><g transform="rotate(45 16.75 7.25)"><rect x="14" y="4.5" width="5.5" height="5.5" rx="1.5"/></g>`, 'flip-rtl')
20
- /** What a page calls itself, as text: its title, else its first heading. @param {string} source */
21
- const named = (source) => ((/<title[^>]*>([^<]*)</i.exec(source) ?? /<h[12][^>]*>([\s\S]*?)<\/h[12]>/i.exec(source))?.[1] ?? '')
22
- .replace(/<[^>]*>/g, '').replaceAll('&amp;', '&').replace(/\s+/g, ' ').trim()
23
20
 
24
21
  const { kept, find, metaOf, pin, rename, hide } = held({ fence: 'html', record: 'app', at: 'app-', latest: true, named, extension: 'html', mimeType: 'text/html' })
25
22
  /** An app's page as the pane's Download gives it, what it shows of the project's collections written in (D633). @param {string} uri */
@@ -39,3 +39,6 @@ app-page:has(> pre) { padding: 0; border: 0; }
39
39
  .mode-chip:hover .icon:last-child { color: var(--ink); }
40
40
  @media (forced-colors: active) { .mode-chip { border-color: Highlight; } }
41
41
  @media (width < 30rem) { .mode-chip span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); } }
42
+ /* An app played before the turn ends (D689): laid out as a page in an answer is, never seen. */
43
+ .page-test { position: fixed; inset-block-start: 0; inset-inline-start: 0; inline-size: 640px; block-size: 480px; clip-path: inset(50%); pointer-events: none; }
44
+ .page-test iframe { inline-size: 100%; block-size: 100%; border: 0; }
@@ -9,7 +9,8 @@
9
9
  // charts take the room's light or dark. It is as tall as what it shows, or, made to fill a screen
10
10
  // (its root or body as tall as its frame, 100% or 100vh), as tall as a page may be; it speaks to Jean on a click
11
11
  // of the user's only: `sendPrompt(text)` sends the text as the user's next message, as a follow-up
12
- // does, and a link opens in a new tab. With Run its code off, it is code. Copy puts its source on the
12
+ // does, a link opens in a new tab, and a link that saves a file the page made saves it (D158). What it keeps in localStorage
13
+ // is kept for it, by its name, in its task's file of apps (D688), so an app is still as it was left. With Run its code off, it is code. Copy puts its source on the
13
14
  // clipboard. Loaded with the first message, for its rule, then at each visit, so that pages written
14
15
  // before show again, or by the first page a conversation holds. Written again under a new policy,
15
16
  // which a page keeps from its start; a new theme, look or language is put on the page as it is
@@ -27,7 +28,7 @@ import { app, effective, theme, notify, send, updateSettings } from '../../ui/st
27
28
  import { register, drawnActions } from '../../ui/caps.js'
28
29
  import { declared, drawn, PAGES, blocks, lex } from '../../ui/markdown.js'
29
30
  import { pageRights, pagePolicy, pageAllow, mapStyles, PAGE_SANDBOX } from '../../ui/csp.js'
30
- import { copyDrawing } from '../../ui/save.js'
31
+ import { copyDrawing, savePage } from '../../ui/save.js'
31
32
  import { icons } from '../../ui/icons.js'
32
33
  import { styleSheet, still } from '../../ui/sheet.js'
33
34
  import { t, locale, dir, useStrings } from '../../core/i18n.js'
@@ -39,11 +40,23 @@ await Promise.all([useStrings('interactive'), styleSheet(new URL('interactive.cs
39
40
  /** What it brings, to which ./apps.js adds the apps in the room. */
40
41
  export const capability = {
41
42
  id: 'interactive',
42
- rules: ["Bills, loans, recipes, timezones, quizzes, science: end with a working ```html tool, not code: offline, var(--color-*), import 'echarts', sendPrompt(text)."],
43
+ rules: ["Bills, loans, recipes, timezones, quizzes, science: end with a working ```html tool, not code: offline, var(--color-*), import 'echarts', sendPrompt(text); localStorage keeps, <a download> saves."],
43
44
  // Visual answers as a mode of the box (./mode.js, D300): a row of +, then pressed at the box's foot while it is on.
44
45
  slots: { add: { at: 6, draw: row }, modes: { at: 0, draw: chip, notes } },
46
+ // A task gone for good takes what its apps kept with it (D688).
47
+ hooks: [{ on: 'record', match: { type: 'removed' }, run: (/** @type {any} */ e, /** @type {any} */ next) => { const at = e.all && keptAt(e.task); if (at) app.fs.remove(at).catch(() => {}); return next(e) } },
48
+ // A task duplicated (D230) keeps what its apps kept, as it keeps their answers (D688).
49
+ { on: 'task.start', run: async (/** @type {any} */ e, /** @type {any} */ next) => { const [was, now] = [keptAt(e.from?.path ?? ''), keptAt(e.task)], kept = was && now && (await app.fs.read(was).catch(() => null)); if (kept && now) await app.fs.write(now, kept); return next(e) } },
50
+ // An answer's pages with a script, played out of sight before the turn ends; what broke goes back to the brain (./test.js, D689).
51
+ { on: 'turn.answer', run: async (/** @type {any} */ e, /** @type {any} */ next) => (rights.peek().allows.scripts && /```html/.test(e.text) && (await (await import('./test.js')).played(e))) || next(e) }],
45
52
  }
46
53
  register(capability)
54
+
55
+ /** What a page calls itself, as text: its title, else its first heading. @param {string} source */
56
+ export const named = (source) => ((/<title[^>]*>([^<]*)</i.exec(source) ?? /<h[12][^>]*>([\s\S]*?)<\/h[12]>/i.exec(source))?.[1] ?? '')
57
+ .replace(/<[^>]*>/g, '').replaceAll('&amp;', '&').replace(/\s+/g, ' ').trim()
58
+ /** Where a task's apps keep what they keep, each by its name: `apps/<its ULID>.json` beside its project's conversations (D688). @param {string} task */
59
+ export const keptAt = (task) => (/\/conversations\/[^/]+\.jsonl$/.test(task) ? task.replace(/conversations\/([^/]+)\.jsonl$/, 'apps/$1.json') : null)
47
60
  // A page, a diagram or a map needs no skill to declare it (D289, D291): they stay among the kinds drawn, however often the room's skills are read again.
48
61
  effect(() => { if (PAGES.some((kind) => !declared.value.has(kind))) declared.value = new Set([...declared.value, ...PAGES]) })
49
62
 
@@ -77,7 +90,7 @@ const ALIASES = Object.entries({
77
90
  * @type {Promise<{ text: string, url: string }> | undefined}
78
91
  */
79
92
  let echarts
80
- const library = () => (echarts ??= fetch(new URL('../../vendor/echarts/echarts.mjs', import.meta.url)).then((response) => response.text()).then((text) => {
93
+ export const library = () => (echarts ??= fetch(new URL('../../vendor/echarts/echarts.mjs', import.meta.url)).then((response) => response.text()).then((text) => {
81
94
  const names = (/export\s*\{([^}]*)\}\s*;?\s*$/.exec(text)?.[1] ?? '').split(',').map((name) => name.trim().split(/\s+as\s+/).pop()).filter((name) => /^\w+$/.test(String(name)) && name !== 'init')
82
95
  const stand = `const text = await new Promise((resolve) => { addEventListener('message', function got({ data, source }) { if (source === parent && typeof data?.echarts === 'string') removeEventListener('message', got), resolve(data.echarts) }); parent.postMessage({ need: 'echarts' }, '*') })
83
96
  const m = await import(URL.createObjectURL(new Blob([text], { type: 'text/javascript' })))
@@ -111,8 +124,8 @@ export default { ...m, init }`
111
124
  /** What a page is lent when it holds one, each read once: Jean's diagrams and maps, and MapLibre for the maps. @type {Map<string, Promise<string>>} */
112
125
  const parts = new Map()
113
126
  /** @param {string} path */
114
- const part = (path) => parts.get(path) ?? /** @type {Promise<string>} */ (parts.set(path, fetch(new URL(path, import.meta.url)).then((response) => response.text())).get(path))
115
- const LENT = /** @type {Record<string, string>} */ ({ diagram: './page-diagram.js', map: './map.js' })
127
+ export const part = (path) => parts.get(path) ?? /** @type {Promise<string>} */ (parts.set(path, fetch(new URL(path, import.meta.url)).then((response) => response.text())).get(path))
128
+ export const LENT = /** @type {Record<string, string>} */ ({ diagram: './page-diagram.js', map: './map.js' })
116
129
 
117
130
  /** The map service's styles, light and dark, and the addresses that may be fetched for a map: theirs. */
118
131
  const styles = () => mapStyles(/** @type {any} */ (effective.peek().settings), app.policy)
@@ -147,7 +160,7 @@ function room(style) {
147
160
  * its <main> and <aside> side by side on a wide screen.
148
161
  * @param {CSSStyleDeclaration} style @param {string} charts the address of ECharts' stand-in
149
162
  */
150
- function head(style, charts) {
163
+ export function head(style, charts) {
151
164
  const { lang, dir, theme, look, motion, css } = room(style)
152
165
  return /* html */ `<html lang="${lang}" dir="${dir}" data-theme="${theme}" data-look="${look}" data-motion="${motion}"><script type="importmap">${JSON.stringify({ imports: { echarts: charts } })}</script>${LOADER}<style>${css}</style>${ROOM}<style>
153
166
  :root { --border-radius-md: calc(var(--border-radius-lg) / 2) !important; accent-color: var(--color-ring-primary); }
@@ -177,6 +190,10 @@ class AppPage extends HTMLElement {
177
190
  whole = false
178
191
  /** @type {(() => void) | undefined} */
179
192
  unwatch
193
+ /** Where what it keeps is kept, and its name there; none in a saved copy, which holds no project. @type {[string, string] | null} */
194
+ kept = null
195
+ /** @type {ReturnType<typeof setTimeout> | undefined} */
196
+ keeping
180
197
 
181
198
  connectedCallback() {
182
199
  addEventListener('message', this.heard)
@@ -241,7 +258,10 @@ class AppPage extends HTMLElement {
241
258
  const { url } = await library()
242
259
  const now = this.text()
243
260
  const open = this.hasAttribute('open')
244
- frame.contentWindow?.postMessage({ page: head(getComputedStyle(this), url) + now, policy, open }, '*')
261
+ const at = RELAY === null && app.projectDir && !this.hasAttribute('map') ? keptAt(this.getAttribute('task')?.replace(/#.*/, '') || app.current.peek()?.path || '') : null
262
+ this.kept = at ? [at, named(now)] : null
263
+ const storage = at ? JSON.parse((await app.fs.read(at).catch(() => null)) ?? '{}').apps?.[named(now)] ?? {} : {}
264
+ frame.contentWindow?.postMessage({ page: head(getComputedStyle(this), url) + now, policy, open, storage }, '*')
245
265
  this.written = now
246
266
  this.whole = !open
247
267
  } }
@@ -290,12 +310,29 @@ class AppPage extends HTMLElement {
290
310
  else if (typeof data?.diagram === 'string') void import('./diagram.js').then(({ picture }) => picture(data.diagram, this, Number(data.width) || this.clientWidth)).then(({ url, words }) => answer({ picture: url, words }), () => answer({}))
291
311
  else if (data?.need === 'maplibre') void this.maps().then(answer)
292
312
  else if (typeof data?.fetch === 'string') void this.fetched(data.fetch).then(({ bytes, error }) => answer({ bytes, error }, bytes ? [bytes.buffer] : []))
313
+ else if (data?.storage && typeof data.storage === 'object') this.keep(data.storage)
314
+ else if (data?.save instanceof Blob) savePage(data, rights.peek().allows.downloads)
293
315
  else if (navigator.userActivation?.isActive === false) return
294
316
  else if (data?.allow === 'maps') void this.allow().then((allowed) => answer({ allowed }))
295
317
  else if (typeof data?.prompt === 'string' && data.prompt.trim() && !app.busy.peek()) send(data.prompt.trim().slice(0, 2000))
296
318
  else if (typeof data?.open === 'string' && /^https:\/\//i.test(data.open)) window.open(data.open, '_blank', 'noopener')
297
319
  }
298
320
 
321
+ /**
322
+ * What it keeps in localStorage, kept a moment after its last change, beside what its task's other apps keep;
323
+ * past 256 KB, nothing more is kept. @param {object} storage
324
+ */
325
+ keep(storage) {
326
+ const kept = this.kept
327
+ clearTimeout(this.keeping)
328
+ if (kept) this.keeping = setTimeout(async () => {
329
+ const own = Object.fromEntries(Object.entries(storage).map(([key, value]) => [String(key), String(value)]))
330
+ if (JSON.stringify(own).length > 262144) return
331
+ const all = JSON.parse((await app.fs.read(kept[0]).catch(() => null)) ?? '{}')
332
+ await app.fs.write(kept[0], JSON.stringify({ format: 1, apps: { ...all.apps, [kept[1]]: own } }))
333
+ }, 300)
334
+ }
335
+
299
336
  /** MapLibre, its worker and its style sheet, the styles for light and dark, and whether maps are allowed; the words its card asks with. */
300
337
  async maps() {
301
338
  const [library, worker, css] = await Promise.all(['maplibre-gl.mjs', 'maplibre-gl-worker.js', 'maplibre-gl.css'].map((file) => part(`../../vendor/maplibre/${file}`)))
@@ -0,0 +1,76 @@
1
+ // 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
+ // 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
+ // then as each of its controls is used once, its buttons pressed and its fields changed; nothing it sends or saves goes anywhere.
4
+ // What broke, in the browser's words, goes back to the brain, which writes it again (turn.answer, core/loop.js).
5
+ import { app } from '../../ui/state.js'
6
+ import { pagePolicy, pageRights, PAGE_SANDBOX } from '../../ui/csp.js'
7
+ import { lex } from '../../ui/markdown.js'
8
+ import { head, library, part, LENT, named, keptAt } from './interactive.js'
9
+ import { parse } from './parts.js'
10
+
11
+ /** How long a page has to start, before its controls are used, and in all. */
12
+ const [START, ALL] = [800, 6000]
13
+ /** The notes each turn may give, so that a page the brain can't mend doesn't take all its steps. @type {WeakMap<AbortSignal, number>} */
14
+ const told = new WeakMap()
15
+
16
+ /**
17
+ * What catches what goes wrong, ahead of the page, and uses its controls when told (its buttons pressed, its fields but a file's
18
+ * changed): errors and failures left unhandled, each said once, in the browser's words. Its listeners' errors are caught as they
19
+ * run, as WebKit tells the page no more than "Script error." of what a written script throws. What its policy blocks isn't a
20
+ * fault: a fetch the page catches works offline, and WebKit's policy refuses every <select>'s style.
21
+ */
22
+ const PROBE = /* html */ `<script>{const faults=[],fault=(words)=>{words=String(words);if(!faults.includes(words))faults.push(words)},add=EventTarget.prototype.addEventListener,remove=EventTarget.prototype.removeEventListener,own=new WeakMap()
23
+ EventTarget.prototype.addEventListener=function(type,run,...rest){if(typeof run==='function'&&!own.has(run))own.set(run,function(...args){try{return run.apply(this,args)}catch(e){fault(e?.message??e)}});return add.call(this,type,own.get(run)??run,...rest)}
24
+ EventTarget.prototype.removeEventListener=function(type,run,...rest){return remove.call(this,type,own.get(run)??run,...rest)}
25
+ add.call(window,'error',(e)=>fault(e.message))
26
+ add.call(window,'unhandledrejection',(e)=>fault('Unhandled: '+(e.reason?.message??e.reason)))
27
+ for(const name of['alert','confirm','prompt'])globalThis[name]=()=>fault(name+'() is never shown')
28
+ add.call(window,'message',({data,source})=>{if(source!==parent||!data?.play)return
29
+ for(const one of document.querySelectorAll('button,input:not([type=file]),select,textarea'))one.matches('button')?one.click():(one.dispatchEvent(new Event('input',{bubbles:true})),one.dispatchEvent(new Event('change',{bubbles:true})))
30
+ setTimeout(()=>parent.postMessage({faults},'*'),400)})}</script>`
31
+
32
+ /**
33
+ * One page played: what went wrong, each once; nothing when it played clean or didn't answer in time.
34
+ * @param {string} source @param {Record<string, string>} storage what it kept @param {AbortSignal} [signal] @returns {Promise<string[]>}
35
+ */
36
+ function play(source, storage, signal) {
37
+ const { allows, sites } = pageRights(/** @type {any} */ (app.settings.peek()), app.policy)
38
+ const box = Object.assign(document.createElement('div'), { className: 'page-test', inert: true }), frame = Object.assign(document.createElement('iframe'), { src: new URL('../../preview.html', import.meta.url).href })
39
+ frame.setAttribute('sandbox', PAGE_SANDBOX)
40
+ box.setAttribute('aria-hidden', 'true')
41
+ return new Promise((resolve) => {
42
+ const done = (/** @type {string[]} */ faults) => { clearTimeout(timer); removeEventListener('message', heard); box.remove(); resolve(faults) }
43
+ const heard = (/** @type {MessageEvent} */ { source: from, data }) => {
44
+ if (from !== frame.contentWindow) return
45
+ const answer = (/** @type {object} */ reply) => frame.contentWindow?.postMessage({ ...reply, id: data.id }, '*')
46
+ if (Array.isArray(data?.faults)) done(data.faults.map(String))
47
+ else if (data?.need === 'echarts') void library().then(({ text }) => frame.contentWindow?.postMessage({ echarts: text }, '*'))
48
+ else if (Object.hasOwn(LENT, data?.need)) void part(LENT[data.need]).then((text) => answer({ text }))
49
+ else if (typeof data?.diagram === 'string') answer({})
50
+ }
51
+ const timer = setTimeout(() => done([]), ALL)
52
+ signal?.addEventListener('abort', () => done([]), { once: true })
53
+ addEventListener('message', heard)
54
+ frame.addEventListener('load', async () => {
55
+ const { url } = await library(), ahead = head(getComputedStyle(document.documentElement), url)
56
+ frame.contentWindow?.postMessage({ page: PROBE + ahead + source, policy: pagePolicy(allows, sites, true), storage }, '*')
57
+ setTimeout(() => frame.contentWindow?.postMessage({ play: true }, '*'), START)
58
+ }, { once: true })
59
+ box.append(frame)
60
+ document.body.append(box)
61
+ })
62
+ }
63
+
64
+ /**
65
+ * What the brain is told of the pages with a script its answer just wrote, played; nothing when they all played clean.
66
+ * @param {{ text: string, task?: string, signal?: AbortSignal }} e @returns {Promise<string>}
67
+ */
68
+ export async function played({ text, task = '', signal }) {
69
+ const pages = lex(text).flatMap((token) => (token.type === 'code' && token.lang === 'html' && /<script\b/i.test(token.text) && !parse(token.text) ? [token.text] : []))
70
+ if (!pages.length || !signal || (told.get(signal) ?? 0) >= 2) return ''
71
+ const at = keptAt(task), kept = at ? JSON.parse((await app.fs.read(at).catch(() => null)) ?? '{}').apps ?? {} : {}
72
+ const broke = (await Promise.all(pages.map(async (source) => ({ name: named(source), faults: await play(source, kept[named(source)] ?? {}, signal) })))).filter(({ faults }) => faults.length)
73
+ if (!broke.length) return ''
74
+ told.set(signal, (told.get(signal) ?? 0) + 1)
75
+ return `Played out of sight, ${broke.length > 1 ? 'pages you wrote' : 'the page you wrote'} broke:\n${broke.map(({ name, faults }) => `${name ? `${name}:\n` : ''}${faults.map((fault) => `- ${fault}`).join('\n')}`).join('\n')}\nWrite it again whole, fixed, after a sentence saying what you fixed.`
76
+ }
@@ -34,6 +34,8 @@ export const DIRECTORY = Object.freeze([
34
34
  // Games (D648): the capability it brings, and its sheets beside its steps.
35
35
  { name: 'game', group: 'drawn', icon: 'M7.5 7h9a4.5 4.5 0 0 1 4.4 5.4l-1 4.4a2.3 2.3 0 0 1-4 1L14 16h-4l-1.9 1.8a2.3 2.3 0 0 1-4-1l-1-4.4A4.5 4.5 0 0 1 7.5 7zM8 10v4M6 12h4M15.5 10.5v.01M17.5 13v.01', cap: 'games', beside: ['phaser.md', 'babylon.md', 'canvas.md', 'feel.md'] },
36
36
  { name: 'pptx', group: 'drawn', icon: 'M6.5 3.5h8l4 4v13h-12zM14.5 3.5v4h4M9 14a3 3 0 1 0 6 0 3 3 0 1 0-6 0M12 11v3h3' },
37
+ // Extensions (D692): the capability whose tool it brings, `extension`, which offers one on its page in Settings.
38
+ { name: 'extension', group: 'work', icon: 'M4 10a2.5 2.5 0 0 1 2.5-2.5h2a2.25 2.25 0 1 1 3.5 0h4.5V12a2.25 2.25 0 1 1 0 3.5v2a2.5 2.5 0 0 1-2.5 2.5h-7.5A2.5 2.5 0 0 1 4 17.5Z', cap: 'extensions' },
37
39
  ])
38
40
 
39
41
  /**
package/core/fs.js CHANGED
@@ -152,7 +152,7 @@ export function rootedFS(fs, dir) {
152
152
  const view = /** @type {any} */ (Object.fromEntries(['read', 'readBytes', 'write', 'writeBytes', 'append', 'remove', 'exists', 'stat']
153
153
  .map((op) => [op, (/** @type {string} */ path, /** @type {any} */ value) => /** @type {any} */ (fs)[op](at(path), value)])))
154
154
  return { ...view, list: (path) => fs.list(join(dir, path)), estimate: fs.estimate,
155
- watch: (cb) => fs.watch?.((path) => { if (path.startsWith(`${dir}/`)) cb(path.slice(dir.length + 1)) }) ?? (() => {}) }
155
+ watch: (cb, options) => fs.watch?.((path) => { if (path.startsWith(`${dir}/`)) cb(path.slice(dir.length + 1)) }, options) ?? (() => {}) }
156
156
  }
157
157
 
158
158
  /** Every file under `dir`, recursively, as paths relative to the root. @param {FS} fs @param {string} [dir] @returns {Promise<string[]>} */
package/core/loop.js CHANGED
@@ -268,6 +268,10 @@ export async function runTurn(options) {
268
268
  history.push(done?.message ?? { role: 'assistant', content: text, toolCalls: calls })
269
269
 
270
270
  if (stopReason === 'pause') continue
271
+ // An answer with nothing left to do: a hook may tell the brain what it found wrong, as the user's words not kept, and the turn
272
+ // goes on (turn.answer, D689), while steps remain.
273
+ const told = stopReason === 'end' && text && step + 1 < limit ? await on('turn.answer', { step, text, signal }, () => '') : ''
274
+ if (told) { history.push({ role: 'user', content: told }); continue }
271
275
  if (stopReason !== 'tool_use' || !calls.length) return { stopReason, usage, text }
272
276
  await runCalls(calls, step)
273
277
  if ((free = !free && calls.every((call) => ctx.byName.get(call.name)?.aside))) limit++
package/core/settings.js CHANGED
@@ -55,8 +55,8 @@ import { ulid } from './ulid.js'
55
55
 
56
56
  /**
57
57
  * A service connected (D21, D87): the further servers its one sign-in reaches (D344), the projects
58
- * it is used in, when not every one, whether it is reached through the gateway (D191), and who signed in.
59
- * @typedef {{ id: string, name: string, url: string, servers?: string[], auth: 'none' | 'key' | 'oauth', projects?: string[], gateway?: boolean, account?: string }} Connection
58
+ * it is kept to, whether it is reached through the gateway (D191), and who signed in.
59
+ * @typedef {{ id: string, name: string, url: string, servers?: string[], auth: 'none' | 'key' | 'oauth' | 'oidc', projects?: string[], gateway?: boolean, account?: string }} Connection
60
60
  */
61
61
 
62
62
  /**
@@ -70,9 +70,8 @@ export const DEFAULT_URLS = Object.freeze({
70
70
  // The Computer's packages (D162): Pyodide's own builds, Python's index, JavaScript's.
71
71
  pyodide: 'https://cdn.jsdelivr.net/pyodide/v{version}/full/', pypi: 'https://pypi.org/pypi/{package_name}/json', npm: 'https://registry.npmjs.org/',
72
72
  // What whoever serves Jean names: the gateway to the services a browser can't reach (D191), none until one is
73
- // named; the privacy policy and terms linked under the box, by their addresses without .html, and where
74
- // files go, linked there and from About this answer, jean.is's until then, none with ''.
75
- gateway: '', privacy: 'privacy', terms: 'terms', files: 'files',
73
+ // named; the privacy policy and terms linked under the box, by their addresses without .html, none with ''.
74
+ gateway: '', privacy: 'privacy', terms: 'terms',
76
75
  // The host shares go to (D361), none until one is named: jean.is's policy names hst.ing.
77
76
  share: '',
78
77
  // A web source's site icon, shown with its domain on its chip (D210): none when ''.
package/locales/am.json CHANGED
@@ -145,9 +145,7 @@
145
145
  "theme.light": "ብሩህ",
146
146
  "theme.dark": "ጨለማ",
147
147
  "look.title": "ገጽታ",
148
- "look.room.name": "ክፍል",
149
148
  "look.mail.name": "ደብዳቤ",
150
- "look.paper.name": "ወረቀት",
151
149
  "look.minimal.name": "ቀላል",
152
150
  "look.swiss.name": "ስዊስ",
153
151
  "look.fjord.name": "ፊዮርድ",
@@ -157,7 +155,6 @@
157
155
  "look.notebook.name": "ደብተር",
158
156
  "look.classic.name": "ክላሲክ",
159
157
  "look.blueprint.name": "ንድፍ",
160
- "look.mondrian.name": "ሞንድሪያን",
161
158
  "look.tilde.name": "{name}",
162
159
  "look.human.name": "ሰብዓዊ",
163
160
  "storage.ephemeral": "የግል መስኮት፦ ከዘጉት በኋላ ምንም ነገር አይቀመጥም።",
@@ -14,7 +14,7 @@
14
14
  "many": "Hoc’h aozadur en deus termenet {count} anezho, pep hini merket gant ur prenn.",
15
15
  "other": "Hoc’h aozadur en deus termenet {count} anezho, pep hini merket gant ur prenn."
16
16
  },
17
- "approvals.parent": "Unan eus da gerent en deus dibabet anezho. Evit cheñch unan, goulenn gant da gerent.",
17
+ "approvals.parent": "Unan eus ho kerent en deus dibabet anezho. Evit cheñch unan, goulennit gant ho kerent.",
18
18
  "approvals.reset": "Distreiñ d’ar boaz",
19
19
  "approvals.allowText": "Hep goulenn ganeoc’h.",
20
20
  "approvals.askText": "{name} a ziskouez deoc’h ar pezh a vo graet, hag a c’hortoz.",
@@ -22,10 +22,10 @@
22
22
  "approvals.isChanged": "cheñchet e-keñver ar boaz",
23
23
  "approvals.reserved": "Gerioù-tremen ha paeamantoù : c’hwi hepken",
24
24
  "approvals.theUsual": "Ar boaz",
25
- "approvals.covers.read": "Digeriñ ar restroù evit o lenn",
26
- "approvals.covers.edit": "Skrivañ ur restr nevez, pe cheñch unan",
25
+ "approvals.covers.read": "Digeriñ ar restroù ho peus roet da {name}, pe ar re en deus graet, evit o lenn",
26
+ "approvals.covers.edit": "Skrivañ ur restr nevez, pe cheñch unan graet gant {name} pe roet dezhañ ganeoc’h",
27
27
  "approvals.covers.search": "Klask un dra bennak, war ar web pe en ho restroù",
28
- "approvals.covers.execute": "Jediñ un dra bennak resis, gant un nebeut linennoù kod",
28
+ "approvals.covers.execute": "Jediñ un dra bennak resis, gant un nebeud linennoù kod",
29
29
  "approvals.covers.fetch": "Digeriñ ur bajenn web, pe tizhout ul lec’hienn",
30
30
  "approvals.covers.move": "Lakaat ur restr e lec’h all, pe reiñ un anv all dezhañ",
31
31
  "approvals.covers.delete": "Dilemel ur restr",
@@ -40,14 +40,14 @@
40
40
  "approvals.carefulNone": "Goulenn da gentañ, pe biken, evit ur seurt ober pe ur servij.",
41
41
  "approvals.carefulAdd": "Bezañ furoc’h evit…",
42
42
  "approvals.carefulTitle": "Bezañ furoc’h",
43
- "approvals.carefulText": "Evit ur seurt ober pe ur servij. Ne aotre biken muioc’h eget ar peurrest.",
43
+ "approvals.carefulText": "Evit ur seurt ober pe ur servij. Strishaat a ra hepken : ne aotre biken muioc’h eget ar boaz.",
44
44
  "approvals.kinds": "Ur seurt ober",
45
45
  "approvals.services": "Ur servij",
46
46
  "approvals.example": "Hag evit ur c’hliant eo ?",
47
47
  "approvals.ifText": "{name} a sav ar goulenn-mañ a-raok pep hini. En arvar, e kont evel ya.",
48
48
  "approvals.films": "Filmoù",
49
49
  "approvals.what.folder": "{name} a cheñch restroù en teuliad-mañ hep goulenn",
50
- "approvals.what.site": "An urzhiataer-mañ a c’hall tizhout anezhañ",
50
+ "approvals.what.site": "An urzhiataer a c’hall tizhout anezhañ",
51
51
  "approvals.what.films": "Graet hep goulenn, daoust ma koustont muioc’h eget skeudennoù",
52
52
  "approvals.what.meeting": "Skoazellerien ar raktresoù-mañ a c’hall en em vodañ hep goulenn",
53
53
  "approvals.what.extension": "A c’hall lezel oberoù da vont hep goulenn ganeoc’h",
@@ -61,5 +61,5 @@
61
61
  "approvals.certificatesText": "Siell an trevnad-mañ, piv a zeiziad an testenioù, hag ar marilh foran",
62
62
  "approvals.what.reads": "{name} a lenn eno hep goulenn",
63
63
  "approvals.what.acts": "{name} a skriv, a gas hag a cheñch eno hep goulenn",
64
- "approvals.elsewhere": "Lennet he deus an dra-mañ un dra bennak eus lec’h all, a c’hall kuzhat kemennoù, setu e vez goulennet en-dro."
64
+ "approvals.elsewhere": "Lennet he deus an drevell-mañ un dra bennak eus lec’h all, a c’hallfe kuzhat urzhioù, setu e vez goulennet ouzhoc’h en-dro."
65
65
  }
@@ -1,30 +1,30 @@
1
1
  {
2
- "approvals.usual": "{name} leghje, cerca è face schedarii senza dumandà vi, è vi dumanda prima d’aduprà internet, di spiazzà, di sguassà o di mandà qualcosa.",
2
+ "approvals.usual": "{name} leghje, cerca è face schedarii senza dumandavvi, è vi dumanda prima d’aduprà internet, di dispiazzà, di squassà o di mandà qualcosa.",
3
3
  "approvals.changed": {
4
- "one": "N’avete cambiatu unu da l’usu, signatu cù un puntu.",
5
- "many": "N’avete cambiatu {count} da l’usu, ognunu signatu cù un puntu.",
6
- "other": "N’avete cambiatu {count} da l’usu, ognunu signatu cù un puntu."
4
+ "one": "N’avete cambiatu unu da u solitu, signatu cù un puntu.",
5
+ "many": "N’avete cambiatu {count} da u solitu, ognunu signatu cù un puntu.",
6
+ "other": "N’avete cambiatu {count} da u solitu, ognunu signatu cù un puntu."
7
7
  },
8
8
  "approvals.org": {
9
9
  "one": "A vostra urganizazione n’hà fissatu unu, signatu cù un lucchettu.",
10
10
  "many": "A vostra urganizazione n’hà fissatu {count}, ognunu signatu cù un lucchettu.",
11
11
  "other": "A vostra urganizazione n’hà fissatu {count}, ognunu signatu cù un lucchettu."
12
12
  },
13
- "approvals.parent": "Un parente l’hà scelti. Per cambià ne unu, dumandali.",
14
- "approvals.reset": "Rimette l’usu",
15
- "approvals.allowText": "Senza dumandà vi.",
13
+ "approvals.parent": "Un genitore l’hà scelti. Per cambianne unu, dumandateli.",
14
+ "approvals.reset": "Rimette u solitu",
15
+ "approvals.allowText": "Senza dumandavvi.",
16
16
  "approvals.askText": "{name} vi mostra ciò chì sarà fattu, è aspetta.",
17
17
  "approvals.neverText": "{name} vi dice chì ùn si pò, è perchè.",
18
- "approvals.isChanged": "cambiatu da l’usu",
19
- "approvals.reserved": "Parolle d’ordine è pagamenti : solu voi",
20
- "approvals.theUsual": "L’usu",
21
- "approvals.covers.read": "Apre i schedarii per leghjeli",
22
- "approvals.covers.edit": "Scrive un schedariu novu, o cambià ne unu",
18
+ "approvals.isChanged": "cambiatu da u solitu",
19
+ "approvals.reserved": "Parolle d’entrata è pagamenti : solu voi",
20
+ "approvals.theUsual": "U solitu",
21
+ "approvals.covers.read": "Apre, per leghjeli, i schedarii ch’è vo avete datu à {name} o ch’ellu hà fattu",
22
+ "approvals.covers.edit": "Scrive un schedariu novu, o cambianne unu chì {name} hà fattu o ch’è vo l’avete datu",
23
23
  "approvals.covers.search": "Circà qualcosa, nant’à u web o in i vostri schedarii",
24
24
  "approvals.covers.execute": "Calculà qualcosa cù esattezza, cù uni pochi di linee di codice",
25
25
  "approvals.covers.fetch": "Apre una pagina web, o ghjunghje un situ",
26
- "approvals.covers.move": "Mette un schedariu altrò, o dà li un altru nome",
27
- "approvals.covers.delete": "Sguassà un schedariu",
26
+ "approvals.covers.move": "Mette un schedariu altrò, o dalli un altru nome",
27
+ "approvals.covers.delete": "Squassà un schedariu",
28
28
  "approvals.covers.other": "Mandà un messaghju, sparte qualcosa, è tuttu ciò chì passa pè i vostri servizii",
29
29
  "approvals.covers.plan": "Andà avanti cù un pianu di parechji passi",
30
30
  "approvals.folders": "In un cartulare chì avete datu à {name}, u cambiamentu vi hè sempre mustratu è dumandatu prima, qualunque sia a scelta quì, fora s’è avete dettu Permette sempre per stu cartulare.",
@@ -36,17 +36,17 @@
36
36
  "approvals.carefulNone": "Dumandà prima, o mai, per un tipu d’azzione o un serviziu.",
37
37
  "approvals.carefulAdd": "Esse più prudente per…",
38
38
  "approvals.carefulTitle": "Esse più prudente",
39
- "approvals.carefulText": "Per un tipu d’azzione o un serviziu. Ùn permette mai più chè u restu.",
39
+ "approvals.carefulText": "Per un tipu d’azzione o un serviziu. Strigne solu : ùn permette mai più chè u solitu.",
40
40
  "approvals.kinds": "Un tipu d’azzione",
41
41
  "approvals.services": "Un serviziu",
42
42
  "approvals.example": "Hè per un cliente ?",
43
43
  "approvals.ifText": "{name} si face sta dumanda prima di ognuna. In u dubbitu, conta cum’è iè.",
44
44
  "approvals.films": "Filmi",
45
45
  "approvals.what.folder": "{name} cambia i schedarii in stu cartulare senza dumandà",
46
- "approvals.what.site": "St’urdinatore u pò ghjunghje",
46
+ "approvals.what.site": "L’urdinatore u pò ghjunghje",
47
47
  "approvals.what.films": "Fatti senza dumandà, ancu s’elli costanu più chè e fiure",
48
48
  "approvals.what.meeting": "L’assistenti di sti prughjetti si ponu riunisce senza dumandà",
49
- "approvals.what.extension": "Pò lascià andà azzioni senza dumandà vi",
49
+ "approvals.what.extension": "Pò lascià andà azzioni senza dumandavvi",
50
50
  "approvals.stop": "Piantà",
51
51
  "approvals.kept": "Fattu. U pudete ripiglià in Accunsenti.",
52
52
  "approvals.pagesIn": "Nunda d’internet",
@@ -57,5 +57,5 @@
57
57
  "approvals.certificatesText": "U sigillu di st’apparechju, quale data i certificati, è u registru publicu",
58
58
  "approvals.what.reads": "{name} ci leghje senza dumandà",
59
59
  "approvals.what.acts": "{name} ci scrive, manda è cambia senza dumandà",
60
- "approvals.elsewhere": "Stu travagliu hà lettu qualcosa d’altrò, chì pò cuntene struzzioni, dunque si dumanda torna."
60
+ "approvals.elsewhere": "Stu compitu hà lettu qualcosa venutu d’altrò, chì pò cuntene struzzioni, dunque vi hè dumandatu torna."
61
61
  }