@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.
- package/caps/charts/charts.js +14 -5
- package/caps/charts/option.js +17 -0
- package/caps/files/office.js +16 -9
- package/caps/files/pdf.js +3 -0
- package/caps/interactive/apps.js +1 -4
- package/caps/interactive/interactive.css +3 -0
- package/caps/interactive/interactive.js +45 -8
- package/caps/interactive/test.js +76 -0
- package/caps/skills/directory.js +2 -0
- package/core/fs.js +1 -1
- package/core/loop.js +4 -0
- package/core/settings.js +4 -5
- package/locales/am.json +0 -3
- package/locales/approvals/br.json +7 -7
- package/locales/approvals/co.json +18 -18
- package/locales/approvals/de.json +5 -5
- package/locales/approvals/en.json +3 -3
- package/locales/approvals/es.json +7 -7
- package/locales/approvals/fr-CA.json +5 -5
- package/locales/approvals/fr.json +5 -5
- package/locales/approvals/it.json +10 -10
- package/locales/approvals/ja.json +8 -8
- package/locales/approvals/ko.json +21 -21
- package/locales/approvals/pt.json +6 -6
- package/locales/approvals/zh-Hans.json +5 -5
- package/locales/approvals/zh-Hant.json +4 -4
- package/locales/ar.json +0 -3
- package/locales/backup/de.json +1 -1
- package/locales/backup/ko.json +1 -1
- package/locales/backup/pt.json +1 -1
- package/locales/backup/zh-Hans.json +1 -1
- package/locales/bg.json +0 -3
- package/locales/bn.json +0 -3
- package/locales/br.json +26 -29
- package/locales/brain-local/ja.json +1 -1
- package/locales/brain-local/pt.json +3 -3
- package/locales/brain-local/zh-Hans.json +1 -1
- package/locales/brain-local/zh-Hant.json +3 -3
- package/locales/brains/br.json +9 -9
- package/locales/brains/co.json +11 -11
- package/locales/brains/de.json +6 -6
- package/locales/brains/en.json +5 -5
- package/locales/brains/es.json +14 -14
- package/locales/brains/fr-CA.json +8 -8
- package/locales/brains/fr.json +7 -7
- package/locales/brains/it.json +7 -7
- package/locales/brains/ja.json +8 -8
- package/locales/brains/ko.json +12 -12
- package/locales/brains/pt.json +11 -11
- package/locales/brains/zh-Hans.json +6 -6
- package/locales/brains/zh-Hant.json +13 -13
- package/locales/browser/co.json +2 -2
- package/locales/browser/es.json +1 -1
- package/locales/browser/it.json +1 -1
- package/locales/browser/ja.json +2 -2
- package/locales/browser/ko.json +6 -6
- package/locales/browser/pt.json +2 -2
- package/locales/camera/br.json +1 -1
- package/locales/camera/co.json +1 -1
- package/locales/camera/de.json +1 -1
- package/locales/camera/it.json +1 -1
- package/locales/camera/ja.json +2 -2
- package/locales/camera/ko.json +2 -2
- package/locales/camera/zh-Hant.json +1 -1
- package/locales/case/br.json +1 -1
- package/locales/case/co.json +5 -5
- package/locales/case/de.json +1 -1
- package/locales/case/es.json +1 -1
- package/locales/case/it.json +2 -2
- package/locales/case/ja.json +6 -6
- package/locales/case/ko.json +1 -1
- package/locales/case/pt.json +6 -6
- package/locales/case/zh-Hant.json +1 -1
- package/locales/certificates/co.json +7 -7
- package/locales/certificates/es.json +2 -2
- package/locales/certificates/fr-CA.json +7 -7
- package/locales/certificates/fr.json +7 -7
- package/locales/certificates/it.json +3 -3
- package/locales/certificates/ja.json +2 -2
- package/locales/certificates/ko.json +1 -1
- package/locales/certificates/pt.json +2 -2
- package/locales/certificates/zh-Hans.json +5 -5
- package/locales/certificates/zh-Hant.json +6 -6
- package/locales/charts/br.json +1 -1
- package/locales/charts/co.json +1 -1
- package/locales/charts/de.json +1 -1
- package/locales/charts/ko.json +1 -1
- package/locales/co.json +15 -18
- package/locales/compact/es.json +1 -1
- package/locales/compact/fr-CA.json +1 -1
- package/locales/compact/fr.json +1 -1
- package/locales/compact/it.json +1 -1
- package/locales/compact/pt.json +2 -2
- package/locales/computer/br.json +8 -8
- package/locales/computer/co.json +14 -14
- package/locales/computer/de.json +4 -4
- package/locales/computer/en.json +6 -6
- package/locales/computer/es.json +10 -10
- package/locales/computer/fr-CA.json +6 -6
- package/locales/computer/fr.json +6 -6
- package/locales/computer/it.json +9 -9
- package/locales/computer/ja.json +8 -8
- package/locales/computer/ko.json +14 -14
- package/locales/computer/pt.json +10 -10
- package/locales/computer/zh-Hans.json +8 -8
- package/locales/computer/zh-Hant.json +9 -9
- package/locales/connections/am.json +2 -0
- package/locales/connections/ar.json +2 -0
- package/locales/connections/bg.json +2 -0
- package/locales/connections/bn.json +2 -0
- package/locales/connections/br.json +5 -3
- package/locales/connections/co.json +17 -15
- package/locales/connections/cs.json +2 -0
- package/locales/connections/da.json +2 -0
- package/locales/connections/de.json +3 -1
- package/locales/connections/el.json +2 -0
- package/locales/connections/en.json +4 -2
- package/locales/connections/es.json +6 -4
- package/locales/connections/fa.json +2 -0
- package/locales/connections/fi.json +2 -0
- package/locales/connections/fr-CA.json +4 -2
- package/locales/connections/fr.json +4 -2
- package/locales/connections/ha.json +2 -0
- package/locales/connections/he.json +2 -0
- package/locales/connections/hi.json +2 -0
- package/locales/connections/hr.json +2 -0
- package/locales/connections/hu.json +2 -0
- package/locales/connections/id.json +2 -0
- package/locales/connections/it.json +12 -10
- package/locales/connections/ja.json +28 -26
- package/locales/connections/ko.json +5 -3
- package/locales/connections/mr.json +2 -0
- package/locales/connections/ms.json +2 -0
- package/locales/connections/nl.json +2 -0
- package/locales/connections/pl.json +2 -0
- package/locales/connections/pt.json +9 -7
- package/locales/connections/ro.json +2 -0
- package/locales/connections/ru.json +2 -0
- package/locales/connections/sk.json +2 -0
- package/locales/connections/sv.json +2 -0
- package/locales/connections/sw.json +2 -0
- package/locales/connections/ta.json +2 -0
- package/locales/connections/te.json +2 -0
- package/locales/connections/th.json +2 -0
- package/locales/connections/tl.json +2 -0
- package/locales/connections/tr.json +2 -0
- package/locales/connections/uk.json +2 -0
- package/locales/connections/ur.json +2 -0
- package/locales/connections/vi.json +2 -0
- package/locales/connections/yo.json +2 -0
- package/locales/connections/zh-Hans.json +10 -8
- package/locales/connections/zh-Hant.json +22 -20
- package/locales/creations/br.json +14 -14
- package/locales/creations/co.json +11 -11
- package/locales/creations/de.json +1 -1
- package/locales/creations/en.json +1 -1
- package/locales/creations/es.json +9 -9
- package/locales/creations/fr-CA.json +1 -1
- package/locales/creations/fr.json +9 -9
- package/locales/creations/it.json +8 -8
- package/locales/creations/ja.json +1 -1
- package/locales/creations/ko.json +1 -1
- package/locales/creations/pt.json +8 -8
- package/locales/creations/zh-Hans.json +1 -1
- package/locales/creations/zh-Hant.json +1 -1
- package/locales/cs.json +0 -3
- package/locales/da.json +0 -3
- package/locales/data/br.json +2 -2
- package/locales/data/co.json +3 -3
- package/locales/data/es.json +4 -4
- package/locales/data/it.json +1 -1
- package/locales/data/ja.json +9 -9
- package/locales/data/ko.json +2 -2
- package/locales/data/pt.json +6 -6
- package/locales/data/zh-Hans.json +2 -2
- package/locales/data/zh-Hant.json +4 -4
- package/locales/de.json +17 -20
- package/locales/designs/br.json +9 -9
- package/locales/designs/co.json +8 -8
- package/locales/designs/de.json +1 -1
- package/locales/designs/en.json +3 -3
- package/locales/designs/fr-CA.json +4 -4
- package/locales/designs/fr.json +5 -5
- package/locales/designs/it.json +6 -6
- package/locales/designs/ja.json +10 -10
- package/locales/designs/ko.json +6 -6
- package/locales/designs/pt.json +3 -3
- package/locales/designs/zh-Hans.json +1 -1
- package/locales/designs/zh-Hant.json +1 -1
- package/locales/dialogs/br.json +21 -21
- package/locales/dialogs/co.json +17 -17
- package/locales/dialogs/de.json +13 -13
- package/locales/dialogs/en.json +9 -9
- package/locales/dialogs/es.json +25 -25
- package/locales/dialogs/fr-CA.json +12 -12
- package/locales/dialogs/fr.json +12 -12
- package/locales/dialogs/it.json +20 -20
- package/locales/dialogs/ja.json +59 -59
- package/locales/dialogs/ko.json +26 -26
- package/locales/dialogs/pt.json +26 -26
- package/locales/dialogs/zh-Hans.json +23 -23
- package/locales/dialogs/zh-Hant.json +34 -34
- package/locales/documents/br.json +1 -1
- package/locales/documents/co.json +3 -3
- package/locales/documents/de.json +2 -2
- package/locales/documents/en.json +1 -1
- package/locales/documents/es.json +1 -1
- package/locales/documents/fr-CA.json +1 -1
- package/locales/documents/fr.json +1 -1
- package/locales/documents/it.json +1 -1
- package/locales/documents/ja.json +14 -14
- package/locales/documents/ko.json +2 -2
- package/locales/documents/pt.json +4 -4
- package/locales/documents/zh-Hans.json +2 -2
- package/locales/documents/zh-Hant.json +2 -2
- package/locales/el.json +0 -3
- package/locales/en.json +6 -9
- package/locales/enterprise/br.json +13 -13
- package/locales/enterprise/co.json +14 -14
- package/locales/enterprise/de.json +12 -12
- package/locales/enterprise/en.json +4 -4
- package/locales/enterprise/es.json +8 -8
- package/locales/enterprise/fr-CA.json +7 -7
- package/locales/enterprise/fr.json +11 -11
- package/locales/enterprise/it.json +9 -9
- package/locales/enterprise/ja.json +17 -17
- package/locales/enterprise/ko.json +12 -12
- package/locales/enterprise/pt.json +11 -11
- package/locales/enterprise/zh-Hans.json +22 -22
- package/locales/enterprise/zh-Hant.json +25 -25
- package/locales/es.json +16 -19
- package/locales/extensions/am.json +2 -1
- package/locales/extensions/ar.json +2 -1
- package/locales/extensions/bg.json +2 -1
- package/locales/extensions/bn.json +2 -1
- package/locales/extensions/br.json +12 -11
- package/locales/extensions/co.json +8 -7
- package/locales/extensions/cs.json +2 -1
- package/locales/extensions/da.json +2 -1
- package/locales/extensions/de.json +3 -2
- package/locales/extensions/el.json +2 -1
- package/locales/extensions/en.json +3 -2
- package/locales/extensions/es.json +4 -3
- package/locales/extensions/fa.json +2 -1
- package/locales/extensions/fi.json +2 -1
- package/locales/extensions/fr-CA.json +7 -6
- package/locales/extensions/fr.json +7 -6
- package/locales/extensions/ha.json +2 -1
- package/locales/extensions/he.json +2 -1
- package/locales/extensions/hi.json +2 -1
- package/locales/extensions/hr.json +2 -1
- package/locales/extensions/hu.json +2 -1
- package/locales/extensions/id.json +2 -1
- package/locales/extensions/it.json +5 -4
- package/locales/extensions/ja.json +7 -6
- package/locales/extensions/ko.json +24 -23
- package/locales/extensions/mr.json +2 -1
- package/locales/extensions/ms.json +2 -1
- package/locales/extensions/nl.json +2 -1
- package/locales/extensions/pl.json +2 -1
- package/locales/extensions/pt.json +5 -4
- package/locales/extensions/ro.json +2 -1
- package/locales/extensions/ru.json +2 -1
- package/locales/extensions/sk.json +2 -1
- package/locales/extensions/sv.json +2 -1
- package/locales/extensions/sw.json +2 -1
- package/locales/extensions/ta.json +2 -1
- package/locales/extensions/te.json +2 -1
- package/locales/extensions/th.json +2 -1
- package/locales/extensions/tl.json +2 -1
- package/locales/extensions/tr.json +2 -1
- package/locales/extensions/uk.json +2 -1
- package/locales/extensions/ur.json +2 -1
- package/locales/extensions/vi.json +2 -1
- package/locales/extensions/yo.json +2 -1
- package/locales/extensions/zh-Hans.json +5 -4
- package/locales/extensions/zh-Hant.json +9 -8
- package/locales/fa.json +0 -3
- package/locales/fi.json +0 -3
- package/locales/files/am.json +8 -0
- package/locales/files/ar.json +8 -0
- package/locales/files/bg.json +8 -0
- package/locales/files/bn.json +8 -0
- package/locales/files/br.json +8 -0
- package/locales/files/co.json +8 -0
- package/locales/files/cs.json +8 -0
- package/locales/files/da.json +8 -0
- package/locales/files/de.json +8 -0
- package/locales/files/el.json +8 -0
- package/locales/files/en.json +8 -0
- package/locales/files/es.json +8 -0
- package/locales/files/fa.json +8 -0
- package/locales/files/fi.json +8 -0
- package/locales/files/fr-CA.json +8 -0
- package/locales/files/fr.json +8 -0
- package/locales/files/ha.json +8 -0
- package/locales/files/he.json +8 -0
- package/locales/files/hi.json +8 -0
- package/locales/files/hr.json +8 -0
- package/locales/files/hu.json +8 -0
- package/locales/files/id.json +8 -0
- package/locales/files/it.json +8 -0
- package/locales/files/ja.json +8 -0
- package/locales/files/ko.json +8 -0
- package/locales/files/mr.json +8 -0
- package/locales/files/ms.json +8 -0
- package/locales/files/nl.json +8 -0
- package/locales/files/pl.json +8 -0
- package/locales/files/pt.json +8 -0
- package/locales/files/ro.json +8 -0
- package/locales/files/ru.json +8 -0
- package/locales/files/sk.json +8 -0
- package/locales/files/sv.json +8 -0
- package/locales/files/sw.json +8 -0
- package/locales/files/ta.json +8 -0
- package/locales/files/te.json +8 -0
- package/locales/files/th.json +8 -0
- package/locales/files/tl.json +8 -0
- package/locales/files/tr.json +8 -0
- package/locales/files/uk.json +8 -0
- package/locales/files/ur.json +8 -0
- package/locales/files/vi.json +8 -0
- package/locales/files/yo.json +8 -0
- package/locales/files/zh-Hans.json +8 -0
- package/locales/files/zh-Hant.json +8 -0
- package/locales/first/br.json +5 -5
- package/locales/first/co.json +1 -1
- package/locales/first/es.json +4 -4
- package/locales/first/fr-CA.json +1 -1
- package/locales/first/fr.json +1 -1
- package/locales/first/it.json +1 -1
- package/locales/first/ja.json +7 -7
- package/locales/first/ko.json +3 -3
- package/locales/first/pt.json +3 -3
- package/locales/first/zh-Hans.json +2 -2
- package/locales/first/zh-Hant.json +3 -3
- package/locales/flows/br.json +7 -7
- package/locales/flows/co.json +4 -4
- package/locales/flows/de.json +2 -2
- package/locales/flows/es.json +2 -2
- package/locales/flows/fr-CA.json +3 -3
- package/locales/flows/fr.json +3 -3
- package/locales/flows/it.json +2 -2
- package/locales/flows/ja.json +4 -4
- package/locales/flows/ko.json +7 -7
- package/locales/flows/pt.json +6 -6
- package/locales/flows/zh-Hans.json +5 -5
- package/locales/flows/zh-Hant.json +8 -8
- package/locales/folders/br.json +4 -4
- package/locales/folders/de.json +1 -1
- package/locales/folders/es.json +2 -2
- package/locales/folders/ja.json +2 -2
- package/locales/folders/ko.json +3 -3
- package/locales/folders/pt.json +2 -2
- package/locales/folders/zh-Hans.json +2 -2
- package/locales/folders/zh-Hant.json +7 -7
- package/locales/fr-CA.json +34 -37
- package/locales/fr.json +31 -34
- package/locales/games/br.json +2 -2
- package/locales/ha.json +0 -3
- package/locales/he.json +0 -3
- package/locales/hi.json +0 -3
- package/locales/hr.json +0 -3
- package/locales/hu.json +0 -3
- package/locales/id.json +0 -3
- package/locales/interactive/br.json +8 -8
- package/locales/interactive/co.json +5 -5
- package/locales/interactive/es.json +1 -1
- package/locales/interactive/it.json +1 -1
- package/locales/interactive/ja.json +3 -3
- package/locales/interactive/ko.json +3 -3
- package/locales/interactive/pt.json +2 -2
- package/locales/interactive/zh-Hans.json +1 -1
- package/locales/interactive/zh-Hant.json +6 -6
- package/locales/it.json +39 -42
- package/locales/ja.json +31 -34
- package/locales/ko.json +25 -28
- package/locales/layouts/ja.json +1 -1
- package/locales/layouts/zh-Hans.json +1 -1
- package/locales/layouts/zh-Hant.json +1 -1
- package/locales/lock/br.json +3 -3
- package/locales/lock/co.json +4 -4
- package/locales/lock/de.json +4 -4
- package/locales/lock/en.json +1 -1
- package/locales/lock/es.json +1 -1
- package/locales/lock/fr-CA.json +3 -3
- package/locales/lock/fr.json +3 -3
- package/locales/lock/it.json +5 -5
- package/locales/lock/ja.json +6 -6
- package/locales/lock/ko.json +2 -2
- package/locales/lock/pt.json +1 -1
- package/locales/lock/zh-Hans.json +3 -3
- package/locales/lock/zh-Hant.json +3 -3
- package/locales/look/am.json +5 -1
- package/locales/look/ar.json +5 -1
- package/locales/look/bg.json +5 -1
- package/locales/look/bn.json +5 -1
- package/locales/look/br.json +14 -10
- package/locales/look/co.json +5 -1
- package/locales/look/cs.json +5 -1
- package/locales/look/da.json +5 -1
- package/locales/look/de.json +5 -1
- package/locales/look/el.json +5 -1
- package/locales/look/en.json +5 -1
- package/locales/look/es.json +7 -3
- package/locales/look/fa.json +5 -1
- package/locales/look/fi.json +5 -1
- package/locales/look/fr-CA.json +5 -1
- package/locales/look/fr.json +5 -1
- package/locales/look/ha.json +5 -1
- package/locales/look/he.json +5 -1
- package/locales/look/hi.json +5 -1
- package/locales/look/hr.json +5 -1
- package/locales/look/hu.json +5 -1
- package/locales/look/id.json +5 -1
- package/locales/look/it.json +5 -1
- package/locales/look/ja.json +11 -7
- package/locales/look/ko.json +6 -2
- package/locales/look/mr.json +5 -1
- package/locales/look/ms.json +5 -1
- package/locales/look/nl.json +5 -1
- package/locales/look/pl.json +5 -1
- package/locales/look/pt.json +7 -3
- package/locales/look/ro.json +5 -1
- package/locales/look/ru.json +5 -1
- package/locales/look/sk.json +5 -1
- package/locales/look/sv.json +5 -1
- package/locales/look/sw.json +5 -1
- package/locales/look/ta.json +5 -1
- package/locales/look/te.json +5 -1
- package/locales/look/th.json +5 -1
- package/locales/look/tl.json +5 -1
- package/locales/look/tr.json +5 -1
- package/locales/look/uk.json +5 -1
- package/locales/look/ur.json +5 -1
- package/locales/look/vi.json +5 -1
- package/locales/look/yo.json +5 -1
- package/locales/look/zh-Hans.json +10 -6
- package/locales/look/zh-Hant.json +15 -11
- package/locales/machine/br.json +5 -5
- package/locales/machine/co.json +4 -4
- package/locales/machine/de.json +2 -2
- package/locales/machine/en.json +2 -2
- package/locales/machine/es.json +8 -8
- package/locales/machine/fr-CA.json +4 -4
- package/locales/machine/fr.json +4 -4
- package/locales/machine/it.json +9 -9
- package/locales/machine/ja.json +4 -4
- package/locales/machine/ko.json +10 -10
- package/locales/machine/pt.json +4 -4
- package/locales/machine/zh-Hans.json +7 -7
- package/locales/machine/zh-Hant.json +10 -10
- package/locales/made/br.json +2 -2
- package/locales/made/fr-CA.json +3 -3
- package/locales/made/fr.json +3 -3
- package/locales/made/ko.json +1 -1
- package/locales/made/pt.json +3 -3
- package/locales/made/zh-Hans.json +2 -2
- package/locales/made/zh-Hant.json +1 -1
- package/locales/mr.json +0 -3
- package/locales/ms.json +0 -3
- package/locales/nl.json +0 -3
- package/locales/notifications/br.json +2 -2
- package/locales/notifications/es.json +4 -4
- package/locales/notifications/it.json +2 -2
- package/locales/notifications/pt.json +2 -2
- package/locales/notifications/zh-Hans.json +1 -1
- package/locales/notifications/zh-Hant.json +2 -2
- package/locales/out/co.json +1 -1
- package/locales/out/de.json +1 -1
- package/locales/out/es.json +1 -1
- package/locales/out/fr-CA.json +1 -1
- package/locales/out/fr.json +1 -1
- package/locales/out/ja.json +1 -1
- package/locales/out/pt.json +1 -1
- package/locales/out/zh-Hans.json +2 -2
- package/locales/pictures/br.json +5 -5
- package/locales/pictures/co.json +5 -5
- package/locales/pictures/de.json +3 -3
- package/locales/pictures/en.json +2 -2
- package/locales/pictures/es.json +4 -4
- package/locales/pictures/fr-CA.json +6 -6
- package/locales/pictures/fr.json +4 -4
- package/locales/pictures/it.json +7 -7
- package/locales/pictures/ja.json +8 -8
- package/locales/pictures/ko.json +8 -8
- package/locales/pictures/pt.json +5 -5
- package/locales/pictures/zh-Hans.json +5 -5
- package/locales/pictures/zh-Hant.json +6 -6
- package/locales/pl.json +0 -3
- package/locales/plan/fr-CA.json +1 -1
- package/locales/plan/fr.json +1 -1
- package/locales/plan/it.json +2 -2
- package/locales/plan/ja.json +3 -3
- package/locales/plan/zh-Hans.json +2 -2
- package/locales/plan/zh-Hant.json +1 -1
- package/locales/policy/am.json +1 -0
- package/locales/policy/ar.json +1 -0
- package/locales/policy/bg.json +1 -0
- package/locales/policy/bn.json +1 -0
- package/locales/policy/br.json +1 -0
- package/locales/policy/co.json +3 -2
- package/locales/policy/cs.json +1 -0
- package/locales/policy/da.json +1 -0
- package/locales/policy/de.json +1 -0
- package/locales/policy/el.json +1 -0
- package/locales/policy/en.json +1 -0
- package/locales/policy/es.json +4 -3
- package/locales/policy/fa.json +1 -0
- package/locales/policy/fi.json +1 -0
- package/locales/policy/fr-CA.json +2 -1
- package/locales/policy/fr.json +2 -1
- package/locales/policy/ha.json +1 -0
- package/locales/policy/he.json +1 -0
- package/locales/policy/hi.json +1 -0
- package/locales/policy/hr.json +1 -0
- package/locales/policy/hu.json +1 -0
- package/locales/policy/id.json +1 -0
- package/locales/policy/it.json +4 -3
- package/locales/policy/ja.json +3 -2
- package/locales/policy/ko.json +1 -0
- package/locales/policy/mr.json +1 -0
- package/locales/policy/ms.json +1 -0
- package/locales/policy/nl.json +1 -0
- package/locales/policy/pl.json +1 -0
- package/locales/policy/pt.json +4 -3
- package/locales/policy/ro.json +1 -0
- package/locales/policy/ru.json +1 -0
- package/locales/policy/sk.json +1 -0
- package/locales/policy/sv.json +1 -0
- package/locales/policy/sw.json +1 -0
- package/locales/policy/ta.json +1 -0
- package/locales/policy/te.json +1 -0
- package/locales/policy/th.json +1 -0
- package/locales/policy/tl.json +1 -0
- package/locales/policy/tr.json +1 -0
- package/locales/policy/uk.json +1 -0
- package/locales/policy/ur.json +1 -0
- package/locales/policy/vi.json +1 -0
- package/locales/policy/yo.json +1 -0
- package/locales/policy/zh-Hans.json +9 -8
- package/locales/policy/zh-Hant.json +17 -16
- package/locales/profiles/br.json +10 -10
- package/locales/profiles/co.json +9 -9
- package/locales/profiles/de.json +1 -1
- package/locales/profiles/en.json +2 -2
- package/locales/profiles/es.json +2 -2
- package/locales/profiles/fr-CA.json +8 -8
- package/locales/profiles/fr.json +8 -8
- package/locales/profiles/it.json +6 -6
- package/locales/profiles/ja.json +9 -9
- package/locales/profiles/ko.json +22 -22
- package/locales/profiles/pt.json +5 -5
- package/locales/profiles/zh-Hans.json +14 -14
- package/locales/profiles/zh-Hant.json +9 -9
- package/locales/pt.json +26 -29
- package/locales/reader/es.json +1 -1
- package/locales/reader/ja.json +4 -4
- package/locales/reader/zh-Hans.json +1 -1
- package/locales/reader/zh-Hant.json +2 -2
- package/locales/receipt/am.json +7 -1
- package/locales/receipt/ar.json +7 -1
- package/locales/receipt/bg.json +7 -1
- package/locales/receipt/bn.json +7 -1
- package/locales/receipt/br.json +9 -3
- package/locales/receipt/co.json +9 -3
- package/locales/receipt/cs.json +7 -1
- package/locales/receipt/da.json +7 -1
- package/locales/receipt/de.json +9 -3
- package/locales/receipt/el.json +7 -1
- package/locales/receipt/en.json +9 -3
- package/locales/receipt/es.json +12 -6
- package/locales/receipt/fa.json +7 -1
- package/locales/receipt/fi.json +7 -1
- package/locales/receipt/fr-CA.json +9 -3
- package/locales/receipt/fr.json +9 -3
- package/locales/receipt/ha.json +7 -1
- package/locales/receipt/he.json +7 -1
- package/locales/receipt/hi.json +7 -1
- package/locales/receipt/hr.json +7 -1
- package/locales/receipt/hu.json +7 -1
- package/locales/receipt/id.json +7 -1
- package/locales/receipt/it.json +14 -8
- package/locales/receipt/ja.json +12 -6
- package/locales/receipt/ko.json +8 -2
- package/locales/receipt/mr.json +7 -1
- package/locales/receipt/ms.json +7 -1
- package/locales/receipt/nl.json +7 -1
- package/locales/receipt/pl.json +7 -1
- package/locales/receipt/pt.json +11 -5
- package/locales/receipt/ro.json +7 -1
- package/locales/receipt/ru.json +7 -1
- package/locales/receipt/sk.json +7 -1
- package/locales/receipt/sv.json +7 -1
- package/locales/receipt/sw.json +7 -1
- package/locales/receipt/ta.json +7 -1
- package/locales/receipt/te.json +7 -1
- package/locales/receipt/th.json +7 -1
- package/locales/receipt/tl.json +7 -1
- package/locales/receipt/tr.json +7 -1
- package/locales/receipt/uk.json +7 -1
- package/locales/receipt/ur.json +7 -1
- package/locales/receipt/vi.json +7 -1
- package/locales/receipt/yo.json +7 -1
- package/locales/receipt/zh-Hans.json +10 -4
- package/locales/receipt/zh-Hant.json +18 -12
- package/locales/ro.json +0 -3
- package/locales/routines/br.json +10 -10
- package/locales/routines/co.json +6 -6
- package/locales/routines/es.json +4 -4
- package/locales/routines/fr-CA.json +2 -2
- package/locales/routines/fr.json +2 -2
- package/locales/routines/it.json +1 -1
- package/locales/routines/ja.json +12 -12
- package/locales/routines/ko.json +1 -1
- package/locales/routines/pt.json +5 -5
- package/locales/routines/zh-Hans.json +2 -2
- package/locales/routines/zh-Hant.json +3 -3
- package/locales/ru.json +0 -3
- package/locales/scores/de.json +1 -1
- package/locales/scores/it.json +1 -1
- package/locales/scores/ja.json +2 -2
- package/locales/scores/ko.json +1 -1
- package/locales/search/br.json +9 -9
- package/locales/search/co.json +7 -7
- package/locales/search/de.json +2 -2
- package/locales/search/es.json +4 -4
- package/locales/search/fr-CA.json +1 -1
- package/locales/search/fr.json +1 -1
- package/locales/search/it.json +1 -1
- package/locales/search/ja.json +8 -8
- package/locales/search/ko.json +1 -1
- package/locales/search/pt.json +3 -3
- package/locales/search/zh-Hans.json +3 -3
- package/locales/search/zh-Hant.json +19 -19
- package/locales/share/br.json +6 -6
- package/locales/share/co.json +4 -4
- package/locales/share/de.json +2 -2
- package/locales/share/es.json +1 -1
- package/locales/share/fr-CA.json +5 -5
- package/locales/share/fr.json +3 -3
- package/locales/share/it.json +4 -4
- package/locales/share/ja.json +15 -15
- package/locales/share/ko.json +4 -4
- package/locales/share/pt.json +2 -2
- package/locales/share/zh-Hans.json +8 -8
- package/locales/share/zh-Hant.json +14 -14
- package/locales/signin/br.json +1 -1
- package/locales/signin/co.json +1 -1
- package/locales/signin/es.json +1 -1
- package/locales/signin/ja.json +1 -1
- package/locales/signin/ko.json +2 -2
- package/locales/signin/pt.json +1 -1
- package/locales/signin/zh-Hans.json +1 -1
- package/locales/signin/zh-Hant.json +1 -1
- package/locales/sk.json +0 -3
- package/locales/skills/br.json +7 -7
- package/locales/skills/co.json +7 -7
- package/locales/skills/de.json +5 -5
- package/locales/skills/es.json +4 -4
- package/locales/skills/fr-CA.json +3 -3
- package/locales/skills/fr.json +3 -3
- package/locales/skills/it.json +1 -1
- package/locales/skills/ja.json +16 -16
- package/locales/skills/ko.json +1 -1
- package/locales/skills/pt.json +5 -5
- package/locales/skills/zh-Hans.json +2 -2
- package/locales/skills/zh-Hant.json +4 -4
- package/locales/slides/br.json +11 -11
- package/locales/slides/co.json +28 -28
- package/locales/slides/en.json +4 -4
- package/locales/slides/es.json +7 -7
- package/locales/slides/it.json +6 -6
- package/locales/slides/ja.json +5 -5
- package/locales/slides/ko.json +14 -14
- package/locales/slides/pt.json +9 -9
- package/locales/slides/zh-Hans.json +4 -4
- package/locales/slides/zh-Hant.json +3 -3
- package/locales/sv.json +0 -3
- package/locales/sw.json +0 -3
- package/locales/sync/br.json +2 -2
- package/locales/sync/de.json +2 -2
- package/locales/sync/es.json +6 -6
- package/locales/sync/it.json +1 -1
- package/locales/sync/ja.json +2 -2
- package/locales/sync/pt.json +1 -1
- package/locales/ta.json +0 -3
- package/locales/tables/br.json +8 -8
- package/locales/tables/co.json +15 -15
- package/locales/tables/de.json +2 -2
- package/locales/tables/fr-CA.json +4 -4
- package/locales/tables/fr.json +3 -3
- package/locales/tables/ja.json +2 -2
- package/locales/tables/ko.json +4 -4
- package/locales/tables/pt.json +8 -8
- package/locales/tables/zh-Hans.json +1 -1
- package/locales/tables/zh-Hant.json +1 -1
- package/locales/te.json +0 -3
- package/locales/th.json +0 -3
- package/locales/tl.json +0 -3
- package/locales/tr.json +0 -3
- package/locales/uk.json +0 -3
- package/locales/ur.json +0 -3
- package/locales/vi.json +0 -3
- package/locales/yo.json +0 -3
- package/locales/you/br.json +13 -13
- package/locales/you/co.json +2 -2
- package/locales/you/de.json +1 -1
- package/locales/you/en.json +1 -1
- package/locales/you/es.json +2 -2
- package/locales/you/fr-CA.json +3 -3
- package/locales/you/fr.json +3 -3
- package/locales/you/it.json +10 -10
- package/locales/you/ja.json +9 -9
- package/locales/you/pt.json +11 -11
- package/locales/you/zh-Hans.json +3 -3
- package/locales/you/zh-Hant.json +3 -3
- package/locales/zh-Hans.json +23 -26
- package/locales/zh-Hant.json +34 -37
- package/package.json +1 -1
- package/preview.html +8 -2
- package/ui/kit.js +2 -5
- package/ui/looks/classic.css +2 -0
- package/ui/looks/human.css +3 -2
- package/ui/looks.js +2 -5
- package/ui/reader-state.js +1 -1
- package/ui/reader.js +1 -1
- package/ui/style.css +8 -9
- package/ui/touches.js +22 -0
- package/ui/view.css +20 -1
- package/ui/view.js +28 -8
- package/ui/looks/mondrian.css +0 -90
- package/ui/looks/paper.css +0 -51
package/caps/charts/charts.js
CHANGED
|
@@ -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
|
package/caps/charts/option.js
CHANGED
|
@@ -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
|
|
package/caps/files/office.js
CHANGED
|
@@ -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
|
|
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
|
|
11
|
-
const
|
|
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
|
|
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
|
-
|
|
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
|
|
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: '
|
|
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({
|
package/caps/interactive/apps.js
CHANGED
|
@@ -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('&', '&').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,
|
|
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('&', '&').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
|
-
|
|
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
|
+
}
|
package/caps/skills/directory.js
CHANGED
|
@@ -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
|
|
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,
|
|
74
|
-
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
5
|
-
"many": "N’avete cambiatu {count} da
|
|
6
|
-
"other": "N’avete cambiatu {count} da
|
|
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
|
|
14
|
-
"approvals.reset": "Rimette
|
|
15
|
-
"approvals.allowText": "Senza
|
|
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
|
|
19
|
-
"approvals.reserved": "Parolle d’
|
|
20
|
-
"approvals.theUsual": "
|
|
21
|
-
"approvals.covers.read": "Apre i schedarii
|
|
22
|
-
"approvals.covers.edit": "Scrive un schedariu novu, o
|
|
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
|
|
27
|
-
"approvals.covers.delete": "
|
|
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.
|
|
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": "
|
|
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
|
|
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
|
|
60
|
+
"approvals.elsewhere": "Stu compitu hà lettu qualcosa venutu d’altrò, chì pò cuntene struzzioni, dunque vi hè dumandatu torna."
|
|
61
61
|
}
|