@jean-is/render 0.8.0-rb7dd9e653b35 → 0.8.0-rd445b9884e53
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/brand.js +2 -1
- package/caps/charts/charts.css +5 -2
- package/caps/charts/charts.js +58 -28
- package/caps/charts/option.js +28 -1
- package/caps/files/midi.js +1 -1
- package/caps/files/office.js +1 -1
- package/caps/games/page.js +1 -1
- package/caps/interactive/apps.js +13 -3
- package/caps/interactive/diagram.js +96 -22
- package/caps/interactive/interactive.css +3 -0
- package/caps/interactive/interactive.js +8 -7
- package/caps/interactive/live.js +96 -0
- package/caps/interactive/map.js +22 -2
- package/caps/interactive/mode.js +9 -6
- package/caps/interactive/page-diagram.js +6 -2
- package/caps/interactive/parts.js +20 -12
- package/caps/interactive/view-parts.js +50 -30
- package/caps/layouts/layouts.css +7 -8
- package/caps/layouts/layouts.js +25 -17
- package/caps/layouts/shapes.js +1 -1
- package/caps/made/formats.js +84 -46
- package/caps/made/paper.js +142 -0
- package/caps/math/math.js +2 -2
- package/caps/scores/scores.css +7 -7
- package/caps/scores/scores.js +42 -50
- package/caps/share/view.js +1 -1
- package/caps/skills/directory.js +1 -1
- package/caps/slides/edit.js +2 -2
- package/caps/slides/kit-page.css +8 -2
- package/caps/slides/kit-page.js +47 -38
- package/caps/slides/kit-sample.js +36 -0
- package/caps/slides/kit-slot.js +10 -0
- package/caps/slides/kit.js +3 -0
- package/caps/slides/save.js +24 -58
- package/caps/slides/slides.css +9 -9
- package/caps/slides/slides.js +23 -23
- package/caps/tables/formula.js +133 -0
- package/core/conversations.js +2 -4
- package/core/deferred.js +36 -16
- package/core/files.js +1 -1
- package/core/fs.js +4 -12
- package/core/hooks.js +2 -2
- package/core/i18n.js +1 -1
- package/core/llm.js +34 -45
- package/core/loop.js +15 -17
- package/core/oauth.js +31 -0
- package/core/search.js +1 -1
- package/core/settings.js +10 -11
- package/core/skills.js +1 -1
- package/core/vertex.js +37 -0
- package/locales/am.json +14 -5
- package/locales/approvals/am.json +2 -1
- package/locales/approvals/ar.json +2 -1
- package/locales/approvals/bg.json +2 -1
- package/locales/approvals/bn.json +2 -1
- package/locales/approvals/br.json +2 -1
- package/locales/approvals/co.json +2 -1
- package/locales/approvals/cs.json +2 -1
- package/locales/approvals/da.json +2 -1
- package/locales/approvals/de.json +2 -1
- package/locales/approvals/el.json +2 -1
- package/locales/approvals/en.json +2 -1
- package/locales/approvals/es.json +2 -1
- package/locales/approvals/fa.json +2 -1
- package/locales/approvals/fi.json +2 -1
- package/locales/approvals/fr-CA.json +2 -1
- package/locales/approvals/fr.json +2 -1
- package/locales/approvals/ha.json +2 -1
- package/locales/approvals/he.json +2 -1
- package/locales/approvals/hi.json +2 -1
- package/locales/approvals/hr.json +2 -1
- package/locales/approvals/hu.json +2 -1
- package/locales/approvals/id.json +2 -1
- package/locales/approvals/it.json +2 -1
- package/locales/approvals/ja.json +2 -1
- package/locales/approvals/ko.json +2 -1
- package/locales/approvals/mr.json +2 -1
- package/locales/approvals/ms.json +2 -1
- package/locales/approvals/nl.json +2 -1
- package/locales/approvals/pl.json +2 -1
- package/locales/approvals/pt.json +2 -1
- package/locales/approvals/ro.json +2 -1
- package/locales/approvals/ru.json +2 -1
- package/locales/approvals/sk.json +2 -1
- package/locales/approvals/sv.json +2 -1
- package/locales/approvals/sw.json +2 -1
- package/locales/approvals/ta.json +2 -1
- package/locales/approvals/te.json +2 -1
- package/locales/approvals/th.json +2 -1
- package/locales/approvals/tl.json +2 -1
- package/locales/approvals/tr.json +2 -1
- package/locales/approvals/uk.json +2 -1
- package/locales/approvals/ur.json +2 -1
- package/locales/approvals/vi.json +2 -1
- package/locales/approvals/yo.json +2 -1
- package/locales/approvals/zh-Hans.json +2 -1
- package/locales/approvals/zh-Hant.json +2 -1
- package/locales/ar.json +18 -5
- package/locales/bg.json +14 -5
- package/locales/bn.json +14 -5
- package/locales/br.json +17 -5
- package/locales/brains/am.json +6 -3
- package/locales/brains/ar.json +6 -3
- package/locales/brains/bg.json +6 -3
- package/locales/brains/bn.json +6 -3
- package/locales/brains/br.json +6 -3
- package/locales/brains/co.json +6 -3
- package/locales/brains/cs.json +6 -3
- package/locales/brains/da.json +6 -3
- package/locales/brains/de.json +6 -3
- package/locales/brains/el.json +6 -3
- package/locales/brains/en.json +6 -3
- package/locales/brains/es.json +6 -3
- package/locales/brains/fa.json +6 -3
- package/locales/brains/fi.json +6 -3
- package/locales/brains/fr-CA.json +6 -3
- package/locales/brains/fr.json +6 -3
- package/locales/brains/ha.json +6 -3
- package/locales/brains/he.json +6 -3
- package/locales/brains/hi.json +6 -3
- package/locales/brains/hr.json +6 -3
- package/locales/brains/hu.json +6 -3
- package/locales/brains/id.json +6 -3
- package/locales/brains/it.json +6 -3
- package/locales/brains/ja.json +6 -3
- package/locales/brains/ko.json +6 -3
- package/locales/brains/mr.json +6 -3
- package/locales/brains/ms.json +6 -3
- package/locales/brains/nl.json +6 -3
- package/locales/brains/pl.json +6 -3
- package/locales/brains/pt.json +6 -3
- package/locales/brains/ro.json +6 -3
- package/locales/brains/ru.json +6 -3
- package/locales/brains/sk.json +6 -3
- package/locales/brains/sv.json +6 -3
- package/locales/brains/sw.json +6 -3
- package/locales/brains/ta.json +6 -3
- package/locales/brains/te.json +6 -3
- package/locales/brains/th.json +6 -3
- package/locales/brains/tl.json +6 -3
- package/locales/brains/tr.json +6 -3
- package/locales/brains/uk.json +6 -3
- package/locales/brains/ur.json +6 -3
- package/locales/brains/vi.json +6 -3
- package/locales/brains/yo.json +6 -3
- package/locales/brains/zh-Hans.json +6 -3
- package/locales/brains/zh-Hant.json +6 -3
- package/locales/charts/am.json +2 -0
- package/locales/charts/ar.json +2 -0
- package/locales/charts/bg.json +2 -0
- package/locales/charts/bn.json +2 -0
- package/locales/charts/br.json +2 -0
- package/locales/charts/co.json +2 -0
- package/locales/charts/cs.json +2 -0
- package/locales/charts/da.json +2 -0
- package/locales/charts/de.json +2 -0
- package/locales/charts/el.json +2 -0
- package/locales/charts/en.json +2 -0
- package/locales/charts/es.json +2 -0
- package/locales/charts/fa.json +2 -0
- package/locales/charts/fi.json +2 -0
- package/locales/charts/fr-CA.json +2 -0
- package/locales/charts/fr.json +2 -0
- package/locales/charts/ha.json +2 -0
- package/locales/charts/he.json +2 -0
- package/locales/charts/hi.json +2 -0
- package/locales/charts/hr.json +2 -0
- package/locales/charts/hu.json +2 -0
- package/locales/charts/id.json +2 -0
- package/locales/charts/it.json +2 -0
- package/locales/charts/ja.json +2 -0
- package/locales/charts/ko.json +2 -0
- package/locales/charts/mr.json +2 -0
- package/locales/charts/ms.json +2 -0
- package/locales/charts/nl.json +2 -0
- package/locales/charts/pl.json +2 -0
- package/locales/charts/pt.json +2 -0
- package/locales/charts/ro.json +2 -0
- package/locales/charts/ru.json +2 -0
- package/locales/charts/sk.json +2 -0
- package/locales/charts/sv.json +2 -0
- package/locales/charts/sw.json +2 -0
- package/locales/charts/ta.json +2 -0
- package/locales/charts/te.json +2 -0
- package/locales/charts/th.json +2 -0
- package/locales/charts/tl.json +2 -0
- package/locales/charts/tr.json +2 -0
- package/locales/charts/uk.json +2 -0
- package/locales/charts/ur.json +2 -0
- package/locales/charts/vi.json +2 -0
- package/locales/charts/yo.json +2 -0
- package/locales/charts/zh-Hans.json +2 -0
- package/locales/charts/zh-Hant.json +2 -0
- package/locales/co.json +15 -5
- package/locales/cs.json +16 -5
- package/locales/da.json +14 -5
- package/locales/de.json +14 -5
- package/locales/designs/am.json +0 -13
- package/locales/designs/ar.json +0 -13
- package/locales/designs/bg.json +0 -13
- package/locales/designs/bn.json +0 -13
- package/locales/designs/br.json +0 -13
- package/locales/designs/co.json +0 -13
- package/locales/designs/cs.json +0 -13
- package/locales/designs/da.json +0 -13
- package/locales/designs/de.json +0 -13
- package/locales/designs/el.json +0 -13
- package/locales/designs/en.json +0 -13
- package/locales/designs/es.json +0 -13
- package/locales/designs/fa.json +0 -13
- package/locales/designs/fi.json +0 -13
- package/locales/designs/fr-CA.json +0 -13
- package/locales/designs/fr.json +0 -13
- package/locales/designs/ha.json +0 -13
- package/locales/designs/he.json +0 -13
- package/locales/designs/hi.json +0 -13
- package/locales/designs/hr.json +0 -13
- package/locales/designs/hu.json +0 -13
- package/locales/designs/id.json +0 -13
- package/locales/designs/it.json +0 -13
- package/locales/designs/ja.json +0 -13
- package/locales/designs/ko.json +0 -13
- package/locales/designs/mr.json +0 -13
- package/locales/designs/ms.json +0 -13
- package/locales/designs/nl.json +0 -13
- package/locales/designs/pl.json +0 -13
- package/locales/designs/pt.json +0 -13
- package/locales/designs/ro.json +0 -13
- package/locales/designs/ru.json +0 -13
- package/locales/designs/sk.json +0 -13
- package/locales/designs/sv.json +0 -13
- package/locales/designs/sw.json +0 -13
- package/locales/designs/ta.json +0 -13
- package/locales/designs/te.json +0 -13
- package/locales/designs/th.json +0 -13
- package/locales/designs/tl.json +0 -13
- package/locales/designs/tr.json +0 -13
- package/locales/designs/uk.json +0 -13
- package/locales/designs/ur.json +0 -13
- package/locales/designs/vi.json +0 -13
- package/locales/designs/yo.json +0 -13
- package/locales/designs/zh-Hans.json +0 -13
- package/locales/designs/zh-Hant.json +0 -13
- package/locales/dialogs/am.json +4 -0
- package/locales/dialogs/ar.json +4 -0
- package/locales/dialogs/bg.json +4 -0
- package/locales/dialogs/bn.json +4 -0
- package/locales/dialogs/br.json +4 -0
- package/locales/dialogs/co.json +4 -0
- package/locales/dialogs/cs.json +4 -0
- package/locales/dialogs/da.json +4 -0
- package/locales/dialogs/de.json +4 -0
- package/locales/dialogs/el.json +4 -0
- package/locales/dialogs/en.json +4 -0
- package/locales/dialogs/es.json +4 -0
- package/locales/dialogs/fa.json +4 -0
- package/locales/dialogs/fi.json +4 -0
- package/locales/dialogs/fr-CA.json +4 -0
- package/locales/dialogs/fr.json +4 -0
- package/locales/dialogs/ha.json +4 -0
- package/locales/dialogs/he.json +4 -0
- package/locales/dialogs/hi.json +4 -0
- package/locales/dialogs/hr.json +4 -0
- package/locales/dialogs/hu.json +4 -0
- package/locales/dialogs/id.json +4 -0
- package/locales/dialogs/it.json +4 -0
- package/locales/dialogs/ja.json +4 -0
- package/locales/dialogs/ko.json +4 -0
- package/locales/dialogs/mr.json +4 -0
- package/locales/dialogs/ms.json +4 -0
- package/locales/dialogs/nl.json +4 -0
- package/locales/dialogs/pl.json +4 -0
- package/locales/dialogs/pt.json +4 -0
- package/locales/dialogs/ro.json +4 -0
- package/locales/dialogs/ru.json +4 -0
- package/locales/dialogs/sk.json +4 -0
- package/locales/dialogs/sv.json +4 -0
- package/locales/dialogs/sw.json +4 -0
- package/locales/dialogs/ta.json +4 -0
- package/locales/dialogs/te.json +4 -0
- package/locales/dialogs/th.json +4 -0
- package/locales/dialogs/tl.json +4 -0
- package/locales/dialogs/tr.json +4 -0
- package/locales/dialogs/uk.json +4 -0
- package/locales/dialogs/ur.json +4 -0
- package/locales/dialogs/vi.json +4 -0
- package/locales/dialogs/yo.json +4 -0
- package/locales/dialogs/zh-Hans.json +4 -0
- package/locales/dialogs/zh-Hant.json +4 -0
- package/locales/documents/am.json +4 -0
- package/locales/documents/ar.json +4 -0
- package/locales/documents/bg.json +4 -0
- package/locales/documents/bn.json +4 -0
- package/locales/documents/br.json +4 -0
- package/locales/documents/co.json +4 -0
- package/locales/documents/cs.json +4 -0
- package/locales/documents/da.json +4 -0
- package/locales/documents/de.json +4 -0
- package/locales/documents/el.json +4 -0
- package/locales/documents/en.json +4 -0
- package/locales/documents/es.json +4 -0
- package/locales/documents/fa.json +4 -0
- package/locales/documents/fi.json +4 -0
- package/locales/documents/fr-CA.json +4 -0
- package/locales/documents/fr.json +4 -0
- package/locales/documents/ha.json +4 -0
- package/locales/documents/he.json +4 -0
- package/locales/documents/hi.json +4 -0
- package/locales/documents/hr.json +4 -0
- package/locales/documents/hu.json +4 -0
- package/locales/documents/id.json +4 -0
- package/locales/documents/it.json +4 -0
- package/locales/documents/ja.json +4 -0
- package/locales/documents/ko.json +4 -0
- package/locales/documents/mr.json +4 -0
- package/locales/documents/ms.json +4 -0
- package/locales/documents/nl.json +4 -0
- package/locales/documents/pl.json +4 -0
- package/locales/documents/pt.json +4 -0
- package/locales/documents/ro.json +4 -0
- package/locales/documents/ru.json +4 -0
- package/locales/documents/sk.json +4 -0
- package/locales/documents/sv.json +4 -0
- package/locales/documents/sw.json +4 -0
- package/locales/documents/ta.json +4 -0
- package/locales/documents/te.json +4 -0
- package/locales/documents/th.json +4 -0
- package/locales/documents/tl.json +4 -0
- package/locales/documents/tr.json +4 -0
- package/locales/documents/uk.json +4 -0
- package/locales/documents/ur.json +4 -0
- package/locales/documents/vi.json +4 -0
- package/locales/documents/yo.json +4 -0
- package/locales/documents/zh-Hans.json +4 -0
- package/locales/documents/zh-Hant.json +4 -0
- package/locales/el.json +14 -5
- package/locales/en.json +14 -5
- package/locales/enterprise/am.json +29 -1
- package/locales/enterprise/ar.json +29 -1
- package/locales/enterprise/bg.json +29 -1
- package/locales/enterprise/bn.json +29 -1
- package/locales/enterprise/br.json +29 -1
- package/locales/enterprise/co.json +29 -1
- package/locales/enterprise/cs.json +29 -1
- package/locales/enterprise/da.json +29 -1
- package/locales/enterprise/de.json +29 -1
- package/locales/enterprise/el.json +29 -1
- package/locales/enterprise/en.json +29 -1
- package/locales/enterprise/es.json +29 -1
- package/locales/enterprise/fa.json +29 -1
- package/locales/enterprise/fi.json +29 -1
- package/locales/enterprise/fr-CA.json +29 -1
- package/locales/enterprise/fr.json +29 -1
- package/locales/enterprise/ha.json +29 -1
- package/locales/enterprise/he.json +29 -1
- package/locales/enterprise/hi.json +29 -1
- package/locales/enterprise/hr.json +29 -1
- package/locales/enterprise/hu.json +29 -1
- package/locales/enterprise/id.json +29 -1
- package/locales/enterprise/it.json +29 -1
- package/locales/enterprise/ja.json +29 -1
- package/locales/enterprise/ko.json +29 -1
- package/locales/enterprise/mr.json +29 -1
- package/locales/enterprise/ms.json +29 -1
- package/locales/enterprise/nl.json +29 -1
- package/locales/enterprise/pl.json +29 -1
- package/locales/enterprise/pt.json +29 -1
- package/locales/enterprise/ro.json +29 -1
- package/locales/enterprise/ru.json +29 -1
- package/locales/enterprise/sk.json +29 -1
- package/locales/enterprise/sv.json +29 -1
- package/locales/enterprise/sw.json +29 -1
- package/locales/enterprise/ta.json +29 -1
- package/locales/enterprise/te.json +29 -1
- package/locales/enterprise/th.json +29 -1
- package/locales/enterprise/tl.json +29 -1
- package/locales/enterprise/tr.json +29 -1
- package/locales/enterprise/uk.json +29 -1
- package/locales/enterprise/ur.json +29 -1
- package/locales/enterprise/vi.json +29 -1
- package/locales/enterprise/yo.json +29 -1
- package/locales/enterprise/zh-Hans.json +29 -1
- package/locales/enterprise/zh-Hant.json +29 -1
- package/locales/es.json +15 -5
- package/locales/fa.json +14 -5
- package/locales/fi.json +14 -5
- package/locales/fr-CA.json +15 -5
- package/locales/fr.json +15 -5
- package/locales/ha.json +14 -5
- package/locales/he.json +15 -5
- package/locales/hi.json +14 -5
- package/locales/hr.json +15 -5
- package/locales/hu.json +14 -5
- package/locales/id.json +13 -5
- package/locales/interactive/am.json +8 -1
- package/locales/interactive/ar.json +8 -1
- package/locales/interactive/bg.json +8 -1
- package/locales/interactive/bn.json +8 -1
- package/locales/interactive/br.json +8 -1
- package/locales/interactive/co.json +8 -1
- package/locales/interactive/cs.json +8 -1
- package/locales/interactive/da.json +8 -1
- package/locales/interactive/de.json +8 -1
- package/locales/interactive/el.json +8 -1
- package/locales/interactive/en.json +8 -1
- package/locales/interactive/es.json +8 -1
- package/locales/interactive/fa.json +8 -1
- package/locales/interactive/fi.json +8 -1
- package/locales/interactive/fr-CA.json +8 -1
- package/locales/interactive/fr.json +8 -1
- package/locales/interactive/ha.json +8 -1
- package/locales/interactive/he.json +8 -1
- package/locales/interactive/hi.json +8 -1
- package/locales/interactive/hr.json +8 -1
- package/locales/interactive/hu.json +8 -1
- package/locales/interactive/id.json +8 -1
- package/locales/interactive/it.json +8 -1
- package/locales/interactive/ja.json +8 -1
- package/locales/interactive/ko.json +8 -1
- package/locales/interactive/mr.json +8 -1
- package/locales/interactive/ms.json +8 -1
- package/locales/interactive/nl.json +8 -1
- package/locales/interactive/pl.json +8 -1
- package/locales/interactive/pt.json +8 -1
- package/locales/interactive/ro.json +8 -1
- package/locales/interactive/ru.json +8 -1
- package/locales/interactive/sk.json +8 -1
- package/locales/interactive/sv.json +8 -1
- package/locales/interactive/sw.json +8 -1
- package/locales/interactive/ta.json +8 -1
- package/locales/interactive/te.json +8 -1
- package/locales/interactive/th.json +8 -1
- package/locales/interactive/tl.json +8 -1
- package/locales/interactive/tr.json +8 -1
- package/locales/interactive/uk.json +8 -1
- package/locales/interactive/ur.json +8 -1
- package/locales/interactive/vi.json +8 -1
- package/locales/interactive/yo.json +8 -1
- package/locales/interactive/zh-Hans.json +8 -1
- package/locales/interactive/zh-Hant.json +8 -1
- package/locales/it.json +15 -5
- package/locales/ja.json +13 -5
- package/locales/ko.json +13 -5
- package/locales/lock/am.json +6 -3
- package/locales/lock/ar.json +6 -3
- package/locales/lock/bg.json +6 -3
- package/locales/lock/bn.json +6 -3
- package/locales/lock/br.json +6 -3
- package/locales/lock/co.json +6 -3
- package/locales/lock/cs.json +6 -3
- package/locales/lock/da.json +6 -3
- package/locales/lock/de.json +6 -3
- package/locales/lock/el.json +6 -3
- package/locales/lock/en.json +6 -3
- package/locales/lock/es.json +6 -3
- package/locales/lock/fa.json +6 -3
- package/locales/lock/fi.json +6 -3
- package/locales/lock/fr-CA.json +6 -3
- package/locales/lock/fr.json +6 -3
- package/locales/lock/ha.json +6 -3
- package/locales/lock/he.json +6 -3
- package/locales/lock/hi.json +6 -3
- package/locales/lock/hr.json +6 -3
- package/locales/lock/hu.json +6 -3
- package/locales/lock/id.json +6 -3
- package/locales/lock/it.json +6 -3
- package/locales/lock/ja.json +6 -3
- package/locales/lock/ko.json +6 -3
- package/locales/lock/mr.json +6 -3
- package/locales/lock/ms.json +6 -3
- package/locales/lock/nl.json +6 -3
- package/locales/lock/pl.json +6 -3
- package/locales/lock/pt.json +6 -3
- package/locales/lock/ro.json +6 -3
- package/locales/lock/ru.json +6 -3
- package/locales/lock/sk.json +6 -3
- package/locales/lock/sv.json +6 -3
- package/locales/lock/sw.json +6 -3
- package/locales/lock/ta.json +6 -3
- package/locales/lock/te.json +6 -3
- package/locales/lock/th.json +6 -3
- package/locales/lock/tl.json +6 -3
- package/locales/lock/tr.json +6 -3
- package/locales/lock/uk.json +6 -3
- package/locales/lock/ur.json +6 -3
- package/locales/lock/vi.json +6 -3
- package/locales/lock/yo.json +6 -3
- package/locales/lock/zh-Hans.json +6 -3
- package/locales/lock/zh-Hant.json +6 -3
- package/locales/look/am.json +5 -0
- package/locales/look/ar.json +5 -0
- package/locales/look/bg.json +5 -0
- package/locales/look/bn.json +5 -0
- package/locales/look/br.json +5 -0
- package/locales/look/co.json +5 -0
- package/locales/look/cs.json +5 -0
- package/locales/look/da.json +5 -0
- package/locales/look/de.json +5 -0
- package/locales/look/el.json +5 -0
- package/locales/look/en.json +5 -0
- package/locales/look/es.json +5 -0
- package/locales/look/fa.json +5 -0
- package/locales/look/fi.json +5 -0
- package/locales/look/fr-CA.json +5 -0
- package/locales/look/fr.json +5 -0
- package/locales/look/ha.json +5 -0
- package/locales/look/he.json +5 -0
- package/locales/look/hi.json +5 -0
- package/locales/look/hr.json +5 -0
- package/locales/look/hu.json +5 -0
- package/locales/look/id.json +5 -0
- package/locales/look/it.json +5 -0
- package/locales/look/ja.json +5 -0
- package/locales/look/ko.json +5 -0
- package/locales/look/mr.json +5 -0
- package/locales/look/ms.json +5 -0
- package/locales/look/nl.json +5 -0
- package/locales/look/pl.json +5 -0
- package/locales/look/pt.json +5 -0
- package/locales/look/ro.json +5 -0
- package/locales/look/ru.json +5 -0
- package/locales/look/sk.json +5 -0
- package/locales/look/sv.json +5 -0
- package/locales/look/sw.json +5 -0
- package/locales/look/ta.json +5 -0
- package/locales/look/te.json +5 -0
- package/locales/look/th.json +5 -0
- package/locales/look/tl.json +5 -0
- package/locales/look/tr.json +5 -0
- package/locales/look/uk.json +5 -0
- package/locales/look/ur.json +5 -0
- package/locales/look/vi.json +5 -0
- package/locales/look/yo.json +5 -0
- package/locales/look/zh-Hans.json +5 -0
- package/locales/look/zh-Hant.json +5 -0
- package/locales/made/am.json +5 -1
- package/locales/made/ar.json +5 -1
- package/locales/made/bg.json +5 -1
- package/locales/made/bn.json +5 -1
- package/locales/made/br.json +5 -1
- package/locales/made/co.json +5 -1
- package/locales/made/cs.json +5 -1
- package/locales/made/da.json +5 -1
- package/locales/made/de.json +5 -1
- package/locales/made/el.json +5 -1
- package/locales/made/en.json +5 -1
- package/locales/made/es.json +5 -1
- package/locales/made/fa.json +5 -1
- package/locales/made/fi.json +5 -1
- package/locales/made/fr-CA.json +5 -1
- package/locales/made/fr.json +5 -1
- package/locales/made/ha.json +5 -1
- package/locales/made/he.json +5 -1
- package/locales/made/hi.json +5 -1
- package/locales/made/hr.json +5 -1
- package/locales/made/hu.json +5 -1
- package/locales/made/id.json +5 -1
- package/locales/made/it.json +5 -1
- package/locales/made/ja.json +5 -1
- package/locales/made/ko.json +5 -1
- package/locales/made/mr.json +5 -1
- package/locales/made/ms.json +5 -1
- package/locales/made/nl.json +5 -1
- package/locales/made/pl.json +5 -1
- package/locales/made/pt.json +5 -1
- package/locales/made/ro.json +5 -1
- package/locales/made/ru.json +5 -1
- package/locales/made/sk.json +5 -1
- package/locales/made/sv.json +5 -1
- package/locales/made/sw.json +5 -1
- package/locales/made/ta.json +5 -1
- package/locales/made/te.json +5 -1
- package/locales/made/th.json +5 -1
- package/locales/made/tl.json +5 -1
- package/locales/made/tr.json +5 -1
- package/locales/made/uk.json +5 -1
- package/locales/made/ur.json +5 -1
- package/locales/made/vi.json +5 -1
- package/locales/made/yo.json +5 -1
- package/locales/made/zh-Hans.json +5 -1
- package/locales/made/zh-Hant.json +5 -1
- package/locales/mr.json +14 -5
- package/locales/ms.json +13 -5
- package/locales/nl.json +14 -5
- package/locales/out/am.json +13 -0
- package/locales/out/ar.json +13 -0
- package/locales/out/bg.json +13 -0
- package/locales/out/bn.json +13 -0
- package/locales/out/br.json +13 -0
- package/locales/out/co.json +13 -0
- package/locales/out/cs.json +13 -0
- package/locales/out/da.json +13 -0
- package/locales/out/de.json +13 -0
- package/locales/out/el.json +13 -0
- package/locales/out/en.json +13 -0
- package/locales/out/es.json +13 -0
- package/locales/out/fa.json +13 -0
- package/locales/out/fi.json +13 -0
- package/locales/out/fr-CA.json +13 -0
- package/locales/out/fr.json +13 -0
- package/locales/out/ha.json +13 -0
- package/locales/out/he.json +13 -0
- package/locales/out/hi.json +13 -0
- package/locales/out/hr.json +13 -0
- package/locales/out/hu.json +13 -0
- package/locales/out/id.json +13 -0
- package/locales/out/it.json +13 -0
- package/locales/out/ja.json +13 -0
- package/locales/out/ko.json +13 -0
- package/locales/out/mr.json +13 -0
- package/locales/out/ms.json +13 -0
- package/locales/out/nl.json +13 -0
- package/locales/out/pl.json +13 -0
- package/locales/out/pt.json +13 -0
- package/locales/out/ro.json +13 -0
- package/locales/out/ru.json +13 -0
- package/locales/out/sk.json +13 -0
- package/locales/out/sv.json +13 -0
- package/locales/out/sw.json +13 -0
- package/locales/out/ta.json +13 -0
- package/locales/out/te.json +13 -0
- package/locales/out/th.json +13 -0
- package/locales/out/tl.json +13 -0
- package/locales/out/tr.json +13 -0
- package/locales/out/uk.json +13 -0
- package/locales/out/ur.json +13 -0
- package/locales/out/vi.json +13 -0
- package/locales/out/yo.json +13 -0
- package/locales/out/zh-Hans.json +13 -0
- package/locales/out/zh-Hant.json +13 -0
- package/locales/pl.json +16 -5
- 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 +1 -0
- 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 +1 -0
- package/locales/policy/fa.json +1 -0
- package/locales/policy/fi.json +1 -0
- package/locales/policy/fr-CA.json +1 -0
- package/locales/policy/fr.json +1 -0
- 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 +1 -0
- package/locales/policy/ja.json +1 -0
- 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 +1 -0
- 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 +1 -0
- package/locales/policy/zh-Hant.json +1 -0
- package/locales/profiles/am.json +5 -0
- package/locales/profiles/ar.json +5 -0
- package/locales/profiles/bg.json +5 -0
- package/locales/profiles/bn.json +5 -0
- package/locales/profiles/br.json +5 -0
- package/locales/profiles/co.json +5 -0
- package/locales/profiles/cs.json +5 -0
- package/locales/profiles/da.json +5 -0
- package/locales/profiles/de.json +5 -0
- package/locales/profiles/el.json +5 -0
- package/locales/profiles/en.json +5 -0
- package/locales/profiles/es.json +5 -0
- package/locales/profiles/fa.json +5 -0
- package/locales/profiles/fi.json +5 -0
- package/locales/profiles/fr-CA.json +5 -0
- package/locales/profiles/fr.json +5 -0
- package/locales/profiles/ha.json +5 -0
- package/locales/profiles/he.json +5 -0
- package/locales/profiles/hi.json +5 -0
- package/locales/profiles/hr.json +5 -0
- package/locales/profiles/hu.json +5 -0
- package/locales/profiles/id.json +5 -0
- package/locales/profiles/it.json +5 -0
- package/locales/profiles/ja.json +5 -0
- package/locales/profiles/ko.json +5 -0
- package/locales/profiles/mr.json +5 -0
- package/locales/profiles/ms.json +5 -0
- package/locales/profiles/nl.json +5 -0
- package/locales/profiles/pl.json +5 -0
- package/locales/profiles/pt.json +5 -0
- package/locales/profiles/ro.json +5 -0
- package/locales/profiles/ru.json +5 -0
- package/locales/profiles/sk.json +5 -0
- package/locales/profiles/sv.json +5 -0
- package/locales/profiles/sw.json +5 -0
- package/locales/profiles/ta.json +5 -0
- package/locales/profiles/te.json +5 -0
- package/locales/profiles/th.json +5 -0
- package/locales/profiles/tl.json +5 -0
- package/locales/profiles/tr.json +5 -0
- package/locales/profiles/uk.json +5 -0
- package/locales/profiles/ur.json +5 -0
- package/locales/profiles/vi.json +5 -0
- package/locales/profiles/yo.json +5 -0
- package/locales/profiles/zh-Hans.json +5 -0
- package/locales/profiles/zh-Hant.json +5 -0
- package/locales/pt.json +15 -5
- package/locales/ro.json +15 -5
- package/locales/ru.json +16 -5
- package/locales/scores/am.json +3 -9
- package/locales/scores/ar.json +3 -9
- package/locales/scores/bg.json +3 -9
- package/locales/scores/bn.json +3 -9
- package/locales/scores/br.json +3 -9
- package/locales/scores/co.json +3 -9
- package/locales/scores/cs.json +3 -9
- package/locales/scores/da.json +3 -9
- package/locales/scores/de.json +3 -9
- package/locales/scores/el.json +3 -9
- package/locales/scores/en.json +3 -9
- package/locales/scores/es.json +3 -9
- package/locales/scores/fa.json +3 -9
- package/locales/scores/fi.json +3 -9
- package/locales/scores/fr-CA.json +3 -9
- package/locales/scores/fr.json +3 -9
- package/locales/scores/ha.json +3 -9
- package/locales/scores/he.json +3 -9
- package/locales/scores/hi.json +3 -9
- package/locales/scores/hr.json +3 -9
- package/locales/scores/hu.json +3 -9
- package/locales/scores/id.json +3 -9
- package/locales/scores/it.json +3 -9
- package/locales/scores/ja.json +3 -9
- package/locales/scores/ko.json +3 -9
- package/locales/scores/mr.json +3 -9
- package/locales/scores/ms.json +3 -9
- package/locales/scores/nl.json +3 -9
- package/locales/scores/pl.json +3 -9
- package/locales/scores/pt.json +3 -9
- package/locales/scores/ro.json +3 -9
- package/locales/scores/ru.json +3 -9
- package/locales/scores/sk.json +3 -9
- package/locales/scores/sv.json +3 -9
- package/locales/scores/sw.json +3 -9
- package/locales/scores/ta.json +3 -9
- package/locales/scores/te.json +3 -9
- package/locales/scores/th.json +3 -9
- package/locales/scores/tl.json +3 -9
- package/locales/scores/tr.json +3 -9
- package/locales/scores/uk.json +3 -9
- package/locales/scores/ur.json +3 -9
- package/locales/scores/vi.json +3 -9
- package/locales/scores/yo.json +3 -9
- package/locales/scores/zh-Hans.json +3 -9
- package/locales/scores/zh-Hant.json +3 -9
- package/locales/search/am.json +10 -1
- package/locales/search/ar.json +10 -1
- package/locales/search/bg.json +10 -1
- package/locales/search/bn.json +10 -1
- package/locales/search/br.json +10 -1
- package/locales/search/co.json +10 -1
- package/locales/search/cs.json +10 -1
- package/locales/search/da.json +10 -1
- package/locales/search/de.json +10 -1
- package/locales/search/el.json +10 -1
- package/locales/search/en.json +10 -1
- package/locales/search/es.json +10 -1
- package/locales/search/fa.json +10 -1
- package/locales/search/fi.json +10 -1
- package/locales/search/fr-CA.json +10 -1
- package/locales/search/fr.json +10 -1
- package/locales/search/ha.json +10 -1
- package/locales/search/he.json +10 -1
- package/locales/search/hi.json +10 -1
- package/locales/search/hr.json +10 -1
- package/locales/search/hu.json +10 -1
- package/locales/search/id.json +10 -1
- package/locales/search/it.json +10 -1
- package/locales/search/ja.json +10 -1
- package/locales/search/ko.json +10 -1
- package/locales/search/mr.json +10 -1
- package/locales/search/ms.json +10 -1
- package/locales/search/nl.json +10 -1
- package/locales/search/pl.json +10 -1
- package/locales/search/pt.json +10 -1
- package/locales/search/ro.json +10 -1
- package/locales/search/ru.json +10 -1
- package/locales/search/sk.json +10 -1
- package/locales/search/sv.json +10 -1
- package/locales/search/sw.json +10 -1
- package/locales/search/ta.json +10 -1
- package/locales/search/te.json +10 -1
- package/locales/search/th.json +10 -1
- package/locales/search/tl.json +10 -1
- package/locales/search/tr.json +10 -1
- package/locales/search/uk.json +10 -1
- package/locales/search/ur.json +10 -1
- package/locales/search/vi.json +10 -1
- package/locales/search/yo.json +10 -1
- package/locales/search/zh-Hans.json +10 -1
- package/locales/search/zh-Hant.json +10 -1
- package/locales/signin/am.json +3 -1
- package/locales/signin/ar.json +3 -1
- package/locales/signin/bg.json +3 -1
- package/locales/signin/bn.json +3 -1
- package/locales/signin/br.json +3 -1
- package/locales/signin/co.json +3 -1
- package/locales/signin/cs.json +3 -1
- package/locales/signin/da.json +3 -1
- package/locales/signin/de.json +3 -1
- package/locales/signin/el.json +3 -1
- package/locales/signin/en.json +3 -1
- package/locales/signin/es.json +3 -1
- package/locales/signin/fa.json +3 -1
- package/locales/signin/fi.json +3 -1
- package/locales/signin/fr-CA.json +3 -1
- package/locales/signin/fr.json +3 -1
- package/locales/signin/ha.json +3 -1
- package/locales/signin/he.json +3 -1
- package/locales/signin/hi.json +3 -1
- package/locales/signin/hr.json +3 -1
- package/locales/signin/hu.json +3 -1
- package/locales/signin/id.json +3 -1
- package/locales/signin/it.json +3 -1
- package/locales/signin/ja.json +3 -1
- package/locales/signin/ko.json +3 -1
- package/locales/signin/mr.json +3 -1
- package/locales/signin/ms.json +3 -1
- package/locales/signin/nl.json +3 -1
- package/locales/signin/pl.json +3 -1
- package/locales/signin/pt.json +3 -1
- package/locales/signin/ro.json +3 -1
- package/locales/signin/ru.json +3 -1
- package/locales/signin/sk.json +3 -1
- package/locales/signin/sv.json +3 -1
- package/locales/signin/sw.json +3 -1
- package/locales/signin/ta.json +3 -1
- package/locales/signin/te.json +3 -1
- package/locales/signin/th.json +3 -1
- package/locales/signin/tl.json +3 -1
- package/locales/signin/tr.json +3 -1
- package/locales/signin/uk.json +3 -1
- package/locales/signin/ur.json +3 -1
- package/locales/signin/vi.json +3 -1
- package/locales/signin/yo.json +3 -1
- package/locales/signin/zh-Hans.json +3 -1
- package/locales/signin/zh-Hant.json +3 -1
- package/locales/sk.json +16 -5
- package/locales/slides/am.json +16 -11
- package/locales/slides/ar.json +16 -11
- package/locales/slides/bg.json +16 -11
- package/locales/slides/bn.json +16 -11
- package/locales/slides/br.json +16 -11
- package/locales/slides/co.json +16 -11
- package/locales/slides/cs.json +16 -11
- package/locales/slides/da.json +16 -11
- package/locales/slides/de.json +16 -11
- package/locales/slides/el.json +16 -11
- package/locales/slides/en.json +16 -11
- package/locales/slides/es.json +16 -11
- package/locales/slides/fa.json +16 -11
- package/locales/slides/fi.json +16 -11
- package/locales/slides/fr-CA.json +16 -11
- package/locales/slides/fr.json +16 -11
- package/locales/slides/ha.json +16 -11
- package/locales/slides/he.json +16 -11
- package/locales/slides/hi.json +16 -11
- package/locales/slides/hr.json +16 -11
- package/locales/slides/hu.json +16 -11
- package/locales/slides/id.json +16 -11
- package/locales/slides/it.json +16 -11
- package/locales/slides/ja.json +16 -11
- package/locales/slides/ko.json +16 -11
- package/locales/slides/mr.json +16 -11
- package/locales/slides/ms.json +16 -11
- package/locales/slides/nl.json +16 -11
- package/locales/slides/pl.json +16 -11
- package/locales/slides/pt.json +16 -11
- package/locales/slides/ro.json +16 -11
- package/locales/slides/ru.json +16 -11
- package/locales/slides/sk.json +16 -11
- package/locales/slides/sv.json +16 -11
- package/locales/slides/sw.json +16 -11
- package/locales/slides/ta.json +16 -11
- package/locales/slides/te.json +16 -11
- package/locales/slides/th.json +16 -11
- package/locales/slides/tl.json +16 -11
- package/locales/slides/tr.json +16 -11
- package/locales/slides/uk.json +16 -11
- package/locales/slides/ur.json +16 -11
- package/locales/slides/vi.json +16 -11
- package/locales/slides/yo.json +16 -11
- package/locales/slides/zh-Hans.json +16 -11
- package/locales/slides/zh-Hant.json +16 -11
- package/locales/sv.json +14 -5
- package/locales/sw.json +14 -5
- package/locales/ta.json +14 -5
- package/locales/tables/am.json +20 -0
- package/locales/tables/ar.json +28 -0
- package/locales/tables/bg.json +20 -0
- package/locales/tables/bn.json +20 -0
- package/locales/tables/br.json +26 -0
- package/locales/tables/co.json +22 -0
- package/locales/tables/cs.json +24 -0
- package/locales/tables/da.json +20 -0
- package/locales/tables/de.json +20 -0
- package/locales/tables/el.json +20 -0
- package/locales/tables/en.json +20 -0
- package/locales/tables/es.json +22 -0
- package/locales/tables/fa.json +20 -0
- package/locales/tables/fi.json +20 -0
- package/locales/tables/fr-CA.json +22 -0
- package/locales/tables/fr.json +22 -0
- package/locales/tables/ha.json +20 -0
- package/locales/tables/he.json +22 -0
- package/locales/tables/hi.json +20 -0
- package/locales/tables/hr.json +22 -0
- package/locales/tables/hu.json +20 -0
- package/locales/tables/id.json +18 -0
- package/locales/tables/it.json +22 -0
- package/locales/tables/ja.json +18 -0
- package/locales/tables/ko.json +18 -0
- package/locales/tables/mr.json +20 -0
- package/locales/tables/ms.json +18 -0
- package/locales/tables/nl.json +20 -0
- package/locales/tables/pl.json +24 -0
- package/locales/tables/pt.json +22 -0
- package/locales/tables/ro.json +22 -0
- package/locales/tables/ru.json +24 -0
- package/locales/tables/sk.json +24 -0
- package/locales/tables/sv.json +20 -0
- package/locales/tables/sw.json +20 -0
- package/locales/tables/ta.json +20 -0
- package/locales/tables/te.json +20 -0
- package/locales/tables/th.json +18 -0
- package/locales/tables/tl.json +20 -0
- package/locales/tables/tr.json +20 -0
- package/locales/tables/uk.json +24 -0
- package/locales/tables/ur.json +20 -0
- package/locales/tables/vi.json +18 -0
- package/locales/tables/yo.json +18 -0
- package/locales/tables/zh-Hans.json +18 -0
- package/locales/tables/zh-Hant.json +18 -0
- package/locales/te.json +14 -5
- package/locales/th.json +13 -5
- package/locales/tl.json +14 -5
- package/locales/tr.json +14 -5
- package/locales/uk.json +16 -5
- package/locales/ur.json +14 -5
- package/locales/vi.json +13 -5
- package/locales/yo.json +13 -5
- package/locales/zh-Hans.json +13 -5
- package/locales/zh-Hant.json +13 -5
- package/package.json +1 -1
- package/ui/caps.js +3 -0
- package/ui/export.js +1 -1
- package/ui/icons.js +1 -1
- package/ui/kit.js +42 -11
- package/ui/language.js +172 -0
- package/ui/looks/classic.css +3 -1
- package/ui/looks/human.css +2 -3
- package/ui/looks/mail.css +1 -1
- package/ui/looks.js +3 -6
- package/ui/markdown.js +17 -6
- package/ui/reader-state.js +2 -2
- package/ui/reader.js +1 -1
- package/ui/review.js +1 -1
- package/ui/save.js +16 -0
- package/ui/seal.js +5 -4
- package/ui/sheet.js +21 -2
- package/ui/style.css +48 -32
- package/ui/touches.js +26 -1
- package/ui/view.js +6 -6
- package/vendor/deck/deck.css +2 -2
- package/vendor/deck/deck.mjs +37 -37
- package/vendor/deck/pptx.mjs +1 -1
- package/ui/acts.js +0 -12
- package/ui/looks/mondrian.css +0 -90
- package/ui/looks/paper.css +0 -51
package/caps/scores/scores.js
CHANGED
|
@@ -2,20 +2,19 @@
|
|
|
2
2
|
// played on the instruments it names, MS Basic's, made (./sound.js, D338) the first time it plays, in
|
|
3
3
|
// a worker, or on the page in a saved copy, while it waits showing how much of them has come; without
|
|
4
4
|
// them (offline the first time), on Jean's own small synthesizer. Each note is lit as it sounds, a
|
|
5
|
-
// band gliding behind the place it has come to
|
|
5
|
+
// band gliding behind the place it has come to, with where it is to move, and it is copied as
|
|
6
6
|
// its source and its picture at once. One score plays at a time. Beside the task, Save takes it out
|
|
7
|
-
// four ways
|
|
7
|
+
// four ways: printed alone, its .abc, a MIDI file or sent to an app here. Drawn again, at most every quarter second, while the answer is written. Loaded by the
|
|
8
8
|
// first score an answer holds; until then, or when abcjs finds no music in a block, it shows as code.
|
|
9
|
-
import { html,
|
|
9
|
+
import { html, render, svg } from 'lit-html'
|
|
10
10
|
import { app, notify } from '../../ui/state.js'
|
|
11
|
-
import { copyDrawing, pictureOf, save } from '../../ui/save.js'
|
|
12
|
-
import { act } from '../../ui/acts.js'
|
|
11
|
+
import { copyDrawing, pictureOf, printAlone, save } from '../../ui/save.js'
|
|
13
12
|
import { drawn } from '../../ui/markdown.js'
|
|
14
13
|
import { drawnActions, register } from '../../ui/caps.js'
|
|
15
14
|
import { icon, icons } from '../../ui/menu-icons.js'
|
|
16
15
|
import { styleSheet, still } from '../../ui/sheet.js'
|
|
17
16
|
import { modelWorker } from '../../ui/model.js'
|
|
18
|
-
import { t, useStrings, intlLocales } from '../../core/i18n.js'
|
|
17
|
+
import { t, dir, locale, useStrings, intlLocales } from '../../core/i18n.js'
|
|
19
18
|
import { notesOf, wholeNote } from './notes.js'
|
|
20
19
|
|
|
21
20
|
/** @typedef {import('./notes.js').Note} Note */
|
|
@@ -32,6 +31,7 @@ const WRAP = { minSpacing: 1.8, maxSpacing: 2.7, preferredMeasuresPerLine: 4 }
|
|
|
32
31
|
const PAUSE = icon(svg`<path d="M9 5.5v13M15 5.5v13"/>`)
|
|
33
32
|
|
|
34
33
|
/** The sound, made at the first Play (browsers start it only on a click), and the score playing. */
|
|
34
|
+
let scores = 0
|
|
35
35
|
let context = /** @type {AudioContext | null} */ (null)
|
|
36
36
|
let playing = /** @type {AppScore | null} */ (null)
|
|
37
37
|
/** Where the music is made: a worker of this Jean's own, or none in a saved copy, whose files come from an address that starts none. */
|
|
@@ -56,6 +56,8 @@ function tone(sound, out, note, at, end) {
|
|
|
56
56
|
|
|
57
57
|
class AppScore extends HTMLElement {
|
|
58
58
|
static observedAttributes = ['source']
|
|
59
|
+
/** Its notes' id, which its picture is described by. */
|
|
60
|
+
wordsId = `score-words-${++scores}`
|
|
59
61
|
/** @type {Note[]} */
|
|
60
62
|
notes = []
|
|
61
63
|
/** abcjs's moments, each with the notes that sound then and their place on the drawing. @type {{ milliseconds: number, elements?: Element[][], line: number, left: number, top: number, width: number, height: number }[]} */
|
|
@@ -121,20 +123,21 @@ class AppScore extends HTMLElement {
|
|
|
121
123
|
const music = this.moments.length > 0
|
|
122
124
|
const on = this.started !== null || this.loading !== null
|
|
123
125
|
const source = this.getAttribute('source') ?? ''
|
|
124
|
-
render(html`<div class="score-sheet" dir="ltr" role="img" aria-label=${this.label || t('scores.score')}></div>
|
|
125
|
-
${!music ? html`<p class="drawn-status muted small" role="status"><span class="while">${t('scores.drawing')}</span><span class="failed">${t('scores.failed')}</span></p>
|
|
126
|
+
render(html`<div class="score-sheet" dir="ltr" role="img" aria-describedby=${this.wordsId} aria-label=${this.label || t('scores.score')}></div>
|
|
127
|
+
${!music ? html`<p class="drawn-status muted small" role="status"><span class="while">${t('scores.drawing')}</span><span class="failed" role="alert">${t('scores.failed')}</span></p>
|
|
126
128
|
<pre dir="ltr" tabindex="0"><code>${source}</code></pre>`
|
|
127
|
-
: html`<div class="score-player" dir="ltr" aria-busy=${this.loading !== null}>${this.notes.length ? html`
|
|
129
|
+
: html`<div class="score-player" dir="ltr" lang=${locale.value} aria-busy=${this.loading !== null}>${this.notes.length ? html`
|
|
128
130
|
<button class="icon-button" aria-label=${t(on ? 'scores.pause' : 'scores.play')} @click=${() => (on ? this.pause() : this.play())}>${on ? PAUSE : icons.play}</button>
|
|
129
|
-
<
|
|
131
|
+
<button class="icon-button" aria-label=${t('scores.mute')} aria-pressed=${String(this.quiet)} @click=${() => this.hush()}>${icons.speaker}</button>
|
|
132
|
+
<input type="range" min="0" max=${this.length} step="0.05" .value=${String(this.at)} title=${t('scores.where')} aria-valuetext=${clock(this.at)}
|
|
130
133
|
@input=${(/** @type {Event} */ e) => this.seek(Number(/** @type {HTMLInputElement} */ (e.target).value))}>
|
|
131
|
-
|
|
134
|
+
${this.loading === null ? html`<span class="score-time">${clock(this.at)} / ${clock(this.length)}</span>` : html`<span class="score-time" role="progressbar" aria-label=${this.label || t('scores.score')} aria-valuenow=${Math.round(this.loading * 100)}>${new Intl.NumberFormat(intlLocales(), { style: 'percent' }).format(this.loading)}</span>`}` : ''}
|
|
132
135
|
</div>
|
|
133
|
-
<div class="drawn-foot">
|
|
136
|
+
<div class="drawn-foot" lang=${locale.value}>
|
|
134
137
|
<button class="icon-button subtle" aria-label=${t('action.copy')}
|
|
135
|
-
@click=${() => copyDrawing(source, this.picture()).then(() => notify(t('toast.copied')), () => notify(t('made.copyFailed')))}>${icons.copy}</button>
|
|
138
|
+
@click=${() => copyDrawing(source, this.picture()).then(() => notify(t('toast.copied')), () => notify(t('made.copyFailed'), { alert: true }))}>${icons.copy}</button>
|
|
136
139
|
${drawnActions('abc', source)}
|
|
137
|
-
</div>`}`, this)
|
|
140
|
+
</div><details class="score-notes" id=${this.wordsId}><summary lang=${locale.value} dir=${dir()}>${t('scores.notes')}</summary><pre dir="ltr" tabindex="0">${source}</pre></details>`}`, this)
|
|
138
141
|
}
|
|
139
142
|
|
|
140
143
|
/**
|
|
@@ -196,11 +199,20 @@ class AppScore extends HTMLElement {
|
|
|
196
199
|
})
|
|
197
200
|
}
|
|
198
201
|
|
|
202
|
+
/** Whether its sound is off, the music going on all the same. */
|
|
203
|
+
quiet = false
|
|
204
|
+
|
|
205
|
+
/** How loud it plays. */
|
|
206
|
+
level() { return this.quiet ? 0 : this.parts ? 2.5 : 0.3 }
|
|
207
|
+
|
|
208
|
+
/** Its sound off, or on again. */
|
|
209
|
+
hush() { this.quiet = !this.quiet; if (this.out && context) this.out.gain.setTargetAtTime(this.level(), context.currentTime, 0.015); this.paint() }
|
|
210
|
+
|
|
199
211
|
/** Plays from where it is: its parts as they come, or each note on the synthesizer. @param {AudioContext} sound */
|
|
200
212
|
start(sound) {
|
|
201
213
|
const out = sound.createGain()
|
|
202
214
|
// As loud on either: MS Basic plays at about a third of the synthesizer's level, chords well below clipping.
|
|
203
|
-
out.gain.value = this.
|
|
215
|
+
out.gain.value = this.level()
|
|
204
216
|
out.connect(sound.destination)
|
|
205
217
|
this.out = out
|
|
206
218
|
this.started = sound.currentTime + 0.05 - this.at
|
|
@@ -265,7 +277,7 @@ class AppScore extends HTMLElement {
|
|
|
265
277
|
}
|
|
266
278
|
|
|
267
279
|
/**
|
|
268
|
-
* The band behind the place `seconds` has come to
|
|
280
|
+
* The band behind the place `seconds` has come to, as high as its line of staves, from the
|
|
269
281
|
* notes sounding to the next ones on that line, or a little past them: it glides there from where it
|
|
270
282
|
* was, `step` seconds ago, and goes there at once on a new line, after a seek or with less motion.
|
|
271
283
|
* It stays where the music paused, and goes before it starts. @param {number} seconds @param {number} step
|
|
@@ -296,52 +308,32 @@ function clock(seconds) {
|
|
|
296
308
|
}
|
|
297
309
|
|
|
298
310
|
/**
|
|
299
|
-
* What
|
|
300
|
-
* MIDI
|
|
301
|
-
* picture. Made as the menu opens, so that Send has it within the click the system's sheet needs.
|
|
302
|
-
* @param {Shown} file
|
|
311
|
+
* What leaves of the tune in a pane, from its ABC as the pane has it (ui/preview.js): its title, a MIDI file of abcjs's, and what Send gives, its
|
|
312
|
+
* MIDI and its ABC where the system takes them, else its picture. @param {Shown} file @param {Element} pane
|
|
303
313
|
*/
|
|
304
|
-
async function made(file) {
|
|
314
|
+
async function made(file, pane) {
|
|
305
315
|
const { name, bytes } = await (await import('../../ui/preview.js')).fileBytes(file)
|
|
306
316
|
const source = new TextDecoder().decode(bytes ?? new Uint8Array()), title = name.replace(/\.abc$/i, '')
|
|
307
317
|
const midi = new File([abcjs.synth.getMidiFile(source, { midiOutputType: 'binary' })[0]], `${title}.mid`, { type: 'audio/midi' }), files = [midi, new File([source], name, { type: 'text/vnd.abc' })]
|
|
308
|
-
const picture = navigator.canShare?.({ files }) ? null : await /** @type {AppScore | null} */ (
|
|
318
|
+
const picture = navigator.canShare?.({ files }) ? null : await /** @type {AppScore | null} */ (pane.querySelector('app-score'))?.picture()
|
|
309
319
|
return { title, source, midi, files: picture ? [new File([picture], `${title}.png`, { type: 'image/png' })] : files }
|
|
310
320
|
}
|
|
311
|
-
let ready = /** @type {ReturnType<typeof made> | null} */ (null)
|
|
312
321
|
|
|
313
322
|
/** Printed alone: drawn again for the page out of sight, in black on white, then gone. @param {string} source */
|
|
314
323
|
function print(source) {
|
|
315
|
-
const holder = document.body.appendChild(Object.assign(document.createElement('div'), { className: 'score-print', dir: 'ltr', ariaHidden: 'true' }))
|
|
324
|
+
const holder = document.body.appendChild(Object.assign(document.createElement('div'), { className: 'score-print', dir: 'ltr', ariaHidden: 'true' }))
|
|
316
325
|
renderAbc(holder, source, { add_classes: true, responsive: 'resize', staffwidth: 640, wrap: WRAP })
|
|
317
|
-
|
|
318
|
-
addEventListener('afterprint', () => (root.remove('is-printing-score'), holder.remove()), { once: true })
|
|
319
|
-
window.print()
|
|
326
|
+
return printAlone(holder, 'is-printing-score')
|
|
320
327
|
}
|
|
321
328
|
|
|
322
|
-
/** What
|
|
323
|
-
async
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
} catch (error) { if (!(error instanceof DOMException && error.name === 'AbortError')) (console.warn('Save', error), notify(t('scores.notSaved'))) }
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/** Save and its menu, at the top of the pane while a tune is on show (D626). @param {Shown} file */
|
|
333
|
-
function saveMenu(file) {
|
|
334
|
-
const item = (/** @type {string} */ how, /** @type {unknown} */ glyph, /** @type {string} */ label, /** @type {string} */ about) => html`<button type="button" popovertarget="score-save" popovertargetaction="hide"
|
|
335
|
-
@click=${() => out(how, file)}>${glyph}<span><b>${label}</b><small>${about}</small></span></button>`
|
|
336
|
-
return html`<button type="button" class="button score-save" popovertarget="score-save">${t('scores.save')}${icons.chevron}</button>
|
|
337
|
-
<div id="score-save" class="menu score-out" role="menu" popover @toggle=${(/** @type {ToggleEvent} */ e) => { if (e.newState === 'open') (ready = made(file)).catch(() => {}) }}>
|
|
338
|
-
${item('print', icons.print, t('scores.out.print'), t('scores.out.printAbout'))}
|
|
339
|
-
${item('abc', icons.download, t('scores.out.abc'), t('scores.out.abcAbout'))}
|
|
340
|
-
${item('midi', icons.download, t('scores.out.midi'), t('scores.out.midiAbout'))}
|
|
341
|
-
${typeof navigator.canShare === 'function' ? item('send', icons.share, t('scores.out.send'), t('scores.out.apps')) : nothing}
|
|
342
|
-
</div>`
|
|
343
|
-
}
|
|
329
|
+
/** What a tune can do (ui/out.js). @param {Shown} file @param {Element} pane @returns {import('../../ui/out.js').Ways} */
|
|
330
|
+
const ways = (file, pane) => ({ share: async () => ({ text: `\`\`\`abc\n${(await made(file, pane)).source}\n\`\`\`` }),
|
|
331
|
+
send: { file: 'a.png', type: 'image/png', make: () => made(file, pane).then(({ title, files }) => ({ title, files })) },
|
|
332
|
+
copy: { id: 'copy', run: async () => { await copyDrawing((await made(file, pane)).source, /** @type {AppScore} */ (pane.querySelector('app-score')).picture()); notify(t('toast.copied')) } },
|
|
333
|
+
files: [{ id: 'midi', glyph: icons.download, label: t('scores.out.midi'), run: async () => { const { midi } = await made(file, pane); save(midi, midi.name) } },
|
|
334
|
+
{ id: '', glyph: icons.download, label: t('scores.out.abc'), run: async () => (await import('../../ui/preview.js')).download(file) }],
|
|
335
|
+
print: { id: 'print', run: async () => print((await made(file, pane)).source) } })
|
|
344
336
|
|
|
345
337
|
customElements.define('app-score', AppScore)
|
|
346
|
-
register({ id: 'scores', slots: {
|
|
338
|
+
register({ id: 'scores', slots: { out: { at: 2, draw: () => null, of: (/** @type {Shown} */ { name }) => /\.abc$/i.test(name), load: async () => ({ ways }) } } })
|
|
347
339
|
drawn.value = { ...drawn.peek(), abc: (source) => html`<app-score source=${source}></app-score>` }
|
package/caps/share/view.js
CHANGED
|
@@ -138,7 +138,7 @@ function draw() {
|
|
|
138
138
|
${reporting === 'writing' ? html`<form @submit=${report}>
|
|
139
139
|
<label for="words">${t('share.reportWhat')}</label>
|
|
140
140
|
<textarea id="words" name="words" rows="4" required maxlength="5000" dir="auto"></textarea>
|
|
141
|
-
<label><input type="checkbox" name="link" checked> ${t('share.reportLink')}</label>
|
|
141
|
+
<label for="link"><input id="link" type="checkbox" name="link" checked> ${t('share.reportLink')}</label>
|
|
142
142
|
<button class="primary">${t('share.reportSend')}</button>
|
|
143
143
|
</form>` : reporting === 'sent' ? html`<p class="said" role="status">${t('share.reportSent')}</p>` : nothing}
|
|
144
144
|
${step.at === 'password' ? html`<form @submit=${(/** @type {SubmitEvent} */ event) => { event.preventDefault(); show({ at: 'opening' }); open(String(new FormData(/** @type {HTMLFormElement} */ (event.target)).get('password'))) }}>
|
package/caps/skills/directory.js
CHANGED
|
@@ -8,7 +8,7 @@ import { parseSkill } from '../../core/skills.js'
|
|
|
8
8
|
|
|
9
9
|
/** @typedef {import('./sources.js').Entry & { icon: string, group: string, body: string, blocks?: string[] }} Ready digest '': Jean's own, read from its own files, its steps too */
|
|
10
10
|
|
|
11
|
-
/** The skills, by name, with what they are for, as Settings' Add a skill groups them
|
|
11
|
+
/** The skills, by name, with what they are for, as Settings' Add a skill groups them, and their icon's path (24×24, drawn with a line). */
|
|
12
12
|
/** @type {readonly { name: string, group: string, icon: string, cap?: string, beside?: string[] }[]} */
|
|
13
13
|
export const DIRECTORY = Object.freeze([
|
|
14
14
|
{ name: 'plain-words', group: 'day', icon: 'M4.5 5.5h15v10h-8l-4 3.5v-3.5h-3zM8 9h8M8 12h5' },
|
package/caps/slides/edit.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// What Slides changes in a deck's Markdown (D591), as text, so that the rest of it stays byte for byte: a slide's layout, in
|
|
2
2
|
// its settings; the kit the deck was drawn with, kept in its headmatter as one line, so that the file looks the same wherever it
|
|
3
|
-
// goes; where its pictures are, a picture of the task named by its name kept at its place in the project
|
|
3
|
+
// goes; where its pictures are, a picture of the task named by its name kept at its place in the project; and Jean's
|
|
4
4
|
// version of a deck set against the user's slide by slide, each run of slides it changes, adds or takes away a change to accept
|
|
5
5
|
// or reject (D505). Pure, on deck's own reading of the Markdown (parseDeck).
|
|
6
6
|
import { parseDeck } from '@codename/deck'
|
|
@@ -36,7 +36,7 @@ export const withTitle = (source, title) => withSetting(source, 'title', JSON.st
|
|
|
36
36
|
|
|
37
37
|
/** A picture's place in a deck, as deck reads one: `` or `(<place>)`, or a slide's `image:` or `background:`, quoted or not. */
|
|
38
38
|
const PICTURE = /(!\[[^\]\n]*\]\(<?)([^<>)\n]+?)(>?(?:\s+(?:"[^"\n]*"|'[^'\n]*'))?\))|^([ \t]*(?:image|background|backgroundImage)[ \t]*:[ \t]*)(.+?)([ \t]*)$/gm
|
|
39
|
-
/** The deck with each picture at the place `to` gives it, else where it was
|
|
39
|
+
/** The deck with each picture at the place `to` gives it, else where it was. @param {string} source @param {(place: string) => string | undefined | void} to */
|
|
40
40
|
export const withPictures = (source, to) => source.replace(PICTURE, (all, open, place, close, key, set, rest) => ((there) => (there ? `${open ?? key}${there}${close ?? rest}` : all))(to(place?.trim() ?? set.replace(/^(['"])(.*)\1$/, '$2'))))
|
|
41
41
|
/** The latest of the task's pictures that goes by the name a deck gives it, as the brain writes one: its case, %20 and its extension aside. @template {{ name: string }} T @param {T[]} pictures @param {string} place */
|
|
42
42
|
export const namedIn = (pictures, place) => ((bare) => pictures.findLast((one) => bare(one.name) === bare(place)))((/** @type {string} */ name) => name.trim().toLowerCase().replace(/%20/g, ' ').replace(/\.\w+$/, ''))
|
package/caps/slides/kit-page.css
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
/* Settings › Appearance › Design system (D602): a deck drawn with the kit, then its colours, type, logo, layouts and files. */
|
|
2
|
-
.kit-
|
|
1
|
+
/* Settings › Appearance › Design system (D602, D664): a deck drawn with the kit and a page of paper, then its colours, type, logo, layouts and files. */
|
|
2
|
+
.kit-previews { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 11rem); gap: 1rem; align-items: start; margin-block: 1rem; } .kit-previews figure { margin: 0; }
|
|
3
|
+
@media (max-width: 40rem) { .kit-previews { grid-template-columns: minmax(0, 1fr); } .kit-previews figure { max-inline-size: 11rem; } }
|
|
4
|
+
.kit-sheet { aspect-ratio: 1 / 1.414; padding: 0.9rem; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 0.2rem; background: #fff; color: var(--sheet-ink, #111); font: 0.625rem/1.45 var(--sheet-body, var(--sans)); color-scheme: light; }
|
|
5
|
+
.kit-sheet img { display: block; max-block-size: 1rem; max-inline-size: 4rem; margin-block-end: 0.5rem; } .kit-sheet img[class$="end"] { margin-inline-start: auto; }
|
|
6
|
+
.kit-sheet b { display: block; margin-block-end: 0.35rem; color: var(--sheet-colour, #111); font: 700 0.875rem/1.2 var(--sheet-head, var(--display)); }
|
|
7
|
+
.kit-sheet p { margin: 0 0 0.35rem; } .kit-sheet blockquote { margin: 0 0 0.5rem; padding-inline-start: 0.4rem; border-inline-start: 1px solid var(--sheet-colour, #999); color: var(--sheet-muted, #595959); font-style: italic; }
|
|
8
|
+
.kit-sheet table { inline-size: 100%; border-collapse: collapse; } .kit-sheet th { padding: 0.15rem 0.25rem; border-block-end: 2px solid var(--sheet-colour, #999); background: var(--sheet-soft, #f2f2f2); text-align: start; }
|
|
3
9
|
.kit-colour { display: inline-flex; align-items: center; gap: 0.25rem; }
|
|
4
10
|
.kit-code { inline-size: 12rem; font: 0.85rem var(--mono); }
|
|
5
11
|
.kit-code[aria-invalid="true"] { border-color: var(--danger); }
|
package/caps/slides/kit-page.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// Settings › Appearance › Design system (D602): the kit
|
|
2
|
-
// their files) or a project's (its folder's), as ui/kit.js keeps them, a deck drawn with it beside, over Jean's own look and
|
|
1
|
+
// Settings › Appearance › Design system (D602, D664): the kit documents, collections and decks wear, the person's everywhere (kit.json at the root of
|
|
2
|
+
// their files) or a project's (its folder's), as ui/kit.js keeps them, a deck drawn with it beside and a page of paper, over Jean's own look and
|
|
3
3
|
// under the organisation's: its colours by day and by night, each written (rgb(), rgba() or hex) or picked, its type (a voice, or
|
|
4
4
|
// the user's own fonts), its corners, its logo and the one for dark paper with their corner, and its layouts, deck's own on or
|
|
5
|
-
// off and the user's own as a grid of named slots with how its words sit. A kit, a PowerPoint template or an Office theme is
|
|
5
|
+
// off and the user's own as a grid of named slots with how its words sit, those that only slides show saying so. A kit, a PowerPoint template or an Office theme is
|
|
6
6
|
// brought in, a template's layouts with their art (D606), the kit saved as a file or as design tokens (deck's template module,
|
|
7
|
-
// loaded then). Each change is kept at once.
|
|
7
|
+
// loaded then). Each change is kept at once. Opened by its slot (./kit-slot.js), which
|
|
8
8
|
// Appearance draws under its back button (ui/look-page.js): a saved task's page, which carries Slides, never reaches Settings.
|
|
9
9
|
import { html, nothing } from 'lit-html'
|
|
10
10
|
import { live } from 'lit-html/directives/live.js'
|
|
@@ -12,15 +12,16 @@ import { ref } from 'lit-html/directives/ref.js'
|
|
|
12
12
|
import { signal } from '@preact/signals-core'
|
|
13
13
|
import { createDeck, mergeKits, layoutOf, logoOf, labelOf, tokensFrom, rgbOf, CORNERS, STANDARD } from '@codename/deck'
|
|
14
14
|
import { app, theme } from '../../ui/state.js'
|
|
15
|
-
import { kitFile, keepKit, hexOf } from '../../ui/kit.js'
|
|
15
|
+
import { kitFile, keepKit, hexOf, paperOf } from '../../ui/kit.js'
|
|
16
16
|
import { save } from '../../ui/save.js'
|
|
17
17
|
import { icons } from '../../ui/menu-icons.js'
|
|
18
|
-
import { t, locale, dir } from '../../core/i18n.js'
|
|
19
|
-
import { jeanKit, copyOf, withNames } from './kit.js'
|
|
20
|
-
import {
|
|
18
|
+
import { t, locale, dir, useStrings } from '../../core/i18n.js'
|
|
19
|
+
import { jeanKit, copyOf, withNames, words } from './kit.js'
|
|
20
|
+
import { sampleDeck } from './kit-sample.js'
|
|
21
|
+
import { facesOf } from '../made/paper.js'
|
|
21
22
|
import { styleSheet } from '../../ui/sheet.js'
|
|
22
23
|
|
|
23
|
-
await styleSheet(new URL('kit-page.css', import.meta.url))
|
|
24
|
+
await Promise.all([useStrings('slides'), styleSheet(new URL('../../vendor/deck/deck.css', import.meta.url)), styleSheet(new URL('kit-page.css', import.meta.url))])
|
|
24
25
|
|
|
25
26
|
/** @typedef {{ name?: string, tokens: Record<string, any>, layouts: Record<string, any>, pictures?: Record<string, string> }} Own */
|
|
26
27
|
/** The kit open: its place (null, the person's) and as its file holds it; a layout being made or changed ('+' a new one); what the page says; colours written that deck doesn't read, by field. */
|
|
@@ -114,12 +115,18 @@ async function preview(box, kit) {
|
|
|
114
115
|
const key = JSON.stringify([kit, whose(), theme.peek(), locale.peek()])
|
|
115
116
|
if (!(box instanceof HTMLElement) || shown.key === key) return
|
|
116
117
|
shown.key = key
|
|
117
|
-
const all = await merged(kit)
|
|
118
|
-
const source = names.map((name, i) => `${i ? '\n---\n' : '---\n'}layout: ${name}\n---\n\n# ${labelOf(all.layouts[name], name, locale.peek())}\n\n${t('slides.kit.sample')}\n${
|
|
119
|
-
all.layouts[name].slots.filter((/** @type {string} */ slot) => slot !== 'default').map((/** @type {string} */ slot) => `\n::${slot}::\n\n${t('slides.kit.sample')}\n`).join('')}`).join('')
|
|
118
|
+
const all = await merged(kit)
|
|
120
119
|
shown.view?.destroy()
|
|
121
120
|
box.replaceChildren()
|
|
122
|
-
shown.view = createDeck(box, { source, kit: all, scheme: theme.peek() === 'dark' ? 'dark' : 'light', strings: words(), headings: 'aria', editable: false })
|
|
121
|
+
shown.view = createDeck(box, { source: sampleDeck(all), kit: all, scheme: theme.peek() === 'dark' ? 'dark' : 'light', strings: words(), headings: 'aria', editable: false })
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** A page of paper in the look, as Word and a print wear it, white whatever the kit's paper. @param {Element | undefined} box @param {Own} kit */
|
|
125
|
+
async function sheet(box, kit) {
|
|
126
|
+
if (!(box instanceof HTMLElement)) return
|
|
127
|
+
const mine = whose() === null, look = paperOf({ ...(mine ? kit : await kitFile(null))?.tokens, ...app.policy.kit?.tokens, ...(mine ? null : kit.tokens) }), [head, body] = facesOf(look), logo = box.querySelector('img')
|
|
128
|
+
for (const [name, value] of Object.entries({ colour: look.colour, ink: look.ink, muted: look.muted, soft: look.soft, head, body })) box.style[value ? 'setProperty' : 'removeProperty'](`--sheet-${name}`, value ?? '')
|
|
129
|
+
if (logo) logo.hidden = !look.logo, logo.src = look.logo ?? '', logo.className = look.logoAt ?? 'top-end'
|
|
123
130
|
}
|
|
124
131
|
|
|
125
132
|
/** A row of the page: its name (none where its section's says it), a line under it, what changes it. @param {unknown} label @param {unknown} line @param {unknown} control */
|
|
@@ -138,9 +145,9 @@ function colour(kit, key, night) {
|
|
|
138
145
|
const value = (night ? kit.tokens.dark ?? {} : kit.tokens)[key], own = /** @type {Record<string, any>} */ (jeanKit().tokens), under = night ? own.dark?.[key] ?? (key === 'primary' ? kit.tokens.primary ?? own.primary : undefined) : own[key]
|
|
139
146
|
const field = `${night ? 'dark.' : ''}${key}`, shown = hexOf(value ?? under ?? '#888888')
|
|
140
147
|
return row(t(`slides.kit.${key}`), value ? nothing : t('slides.kit.auto'), html`<span class="kit-colour"><input class="kit-code" dir="ltr" spellcheck="false" autocomplete="off"
|
|
141
|
-
|
|
148
|
+
title=${t('slides.kit.code', { colour: t(`slides.kit.${key}`) })} aria-invalid=${field in typed.value ? 'true' : 'false'} placeholder=${`rgb(${rgbOf(shown)?.join(', ')})`}
|
|
142
149
|
.value=${live(typed.value[field] ?? value ?? '')} @change=${(/** @type {Event} */ e) => written(key, /** @type {HTMLInputElement} */ (e.target).value, night)}>
|
|
143
|
-
<input type="color"
|
|
150
|
+
<input type="color" title=${t(`slides.kit.${key}`)} .value=${live(shown)}
|
|
144
151
|
@change=${(/** @type {Event} */ e) => written(key, /** @type {HTMLInputElement} */ (e.target).value, night)}>
|
|
145
152
|
${value ? html`<button type="button" class="icon-button subtle" aria-label=${t('slides.kit.auto')} @click=${() => written(key, '', night)}>${icons.close}</button>` : nothing}</span>`)
|
|
146
153
|
}
|
|
@@ -165,18 +172,18 @@ function layoutForm(kit, key) {
|
|
|
165
172
|
making.value = ''
|
|
166
173
|
}
|
|
167
174
|
return html`<form class="kit-layout" @submit=${keep}>
|
|
168
|
-
<label class="kit-field">${t('slides.kit.name')}<input name="name" required maxlength="40" dir="auto" .value=${given ? labelOf(/** @type {any} */ (given), key, locale.peek()) : ''}></label>
|
|
169
|
-
<label class="kit-field">${t('slides.kit.grid')}<textarea name="areas" rows="3" dir="ltr" spellcheck="false" required aria-describedby="kit-grid-hint" .value=${given ? given.areas.map((/** @type {string[]} */ line) => line.join(' ')).join('\n') : 'default default\nleft right'}></textarea></label>
|
|
175
|
+
<label class="kit-field" for="layout-name">${t('slides.kit.name')}<input id="layout-name" name="name" required maxlength="40" dir="auto" .value=${given ? labelOf(/** @type {any} */ (given), key, locale.peek()) : ''}></label>
|
|
176
|
+
<label class="kit-field" for="layout-grid">${t('slides.kit.grid')}<textarea id="layout-grid" name="areas" rows="3" dir="ltr" spellcheck="false" required aria-describedby="kit-grid-hint" .value=${given ? given.areas.map((/** @type {string[]} */ line) => line.join(' ')).join('\n') : 'default default\nleft right'}></textarea></label>
|
|
170
177
|
<p class="hint" id="kit-grid-hint">${t('slides.kit.gridHint')}</p>
|
|
171
|
-
<label class="kit-field">${t('slides.kit.columns')}<input name="columns" dir="ltr" placeholder="1fr 1fr" .value=${given ? given.columns.join(' ') : ''}></label>
|
|
172
|
-
<label class="kit-field">${t('slides.kit.rows')}<input name="rows" dir="ltr" placeholder="auto 1fr" .value=${given ? given.rows.join(' ') : ''}></label>
|
|
173
|
-
<label class="kit-field">${t('slides.kit.background')}<select name="paper">
|
|
178
|
+
<label class="kit-field" for="layout-columns">${t('slides.kit.columns')}<input id="layout-columns" name="columns" dir="ltr" placeholder="1fr 1fr" .value=${given ? given.columns.join(' ') : ''}></label>
|
|
179
|
+
<label class="kit-field" for="layout-rows">${t('slides.kit.rows')}<input id="layout-rows" name="rows" dir="ltr" placeholder="auto 1fr" .value=${given ? given.rows.join(' ') : ''}></label>
|
|
180
|
+
<label class="kit-field" for="layout-paper">${t('slides.kit.background')}<select id="layout-paper" name="paper">
|
|
174
181
|
${['paper', 'fill', 'ink', 'soft'].map((one) => html`<option value=${one} ?selected=${one === (given?.paper ?? 'paper')}>${t(`slides.kit.${one === 'fill' ? 'primary' : one}`)}</option>`)}</select></label>
|
|
175
|
-
${[['align', 'slides.kit.across'], ['justify', 'slides.kit.down']].map(([field, label]) => html`<label class="kit-field">${t(label)}<select name=${field}>
|
|
182
|
+
${[['align', 'slides.kit.across'], ['justify', 'slides.kit.down']].map(([field, label]) => html`<label class="kit-field" for=${`layout-${field}`}>${t(label)}<select id=${`layout-${field}`} name=${field}>
|
|
176
183
|
${AT.map((one) => html`<option value=${one} ?selected=${one === (given?.[field] ?? 'start')}>${t(`slides.kit.${one}`)}</option>`)}</select></label>`)}
|
|
177
|
-
<label class="kit-field">${t('slides.kit.heading')}<select name="title">${['normal', 'large', 'huge'].map((one) => html`<option value=${one} ?selected=${one === (given?.title ?? 'normal')}>${t(`slides.kit.${one}`)}</option>`)}</select></label>
|
|
178
|
-
<label class="kit-field">${t('slides.kit.logo')}<select name="logo">${['small', 'big', 'none'].map((one) => html`<option value=${one} ?selected=${one === (given?.logo ?? 'small')}>${t(`slides.kit.${one === 'big' ? 'large' : one}`)}</option>`)}</select></label>
|
|
179
|
-
<label class="kit-check"><input type="checkbox" name="numbered" ?checked=${given?.numbered ?? true}>${t('slides.kit.numbered')}</label>
|
|
184
|
+
<label class="kit-field" for="layout-title">${t('slides.kit.heading')}<select id="layout-title" name="title">${['normal', 'large', 'huge'].map((one) => html`<option value=${one} ?selected=${one === (given?.title ?? 'normal')}>${t(`slides.kit.${one}`)}</option>`)}</select></label>
|
|
185
|
+
<label class="kit-field" for="layout-logo">${t('slides.kit.logo')}<select id="layout-logo" name="logo">${['small', 'big', 'none'].map((one) => html`<option value=${one} ?selected=${one === (given?.logo ?? 'small')}>${t(`slides.kit.${one === 'big' ? 'large' : one}`)}</option>`)}</select></label>
|
|
186
|
+
<label class="kit-check" for="layout-numbered"><input id="layout-numbered" type="checkbox" name="numbered" ?checked=${given?.numbered ?? true}>${t('slides.kit.numbered')}</label>
|
|
180
187
|
<div class="row"><button class="button primary">${t('slides.kit.keep')}</button><button type="button" class="button subtle" @click=${() => { making.value = '' }}>${t('slides.kit.cancel')}</button></div>
|
|
181
188
|
</form>`
|
|
182
189
|
}
|
|
@@ -186,11 +193,11 @@ function layouts(kit) {
|
|
|
186
193
|
// Named as the Slide layout menu names them, in the user's language (Jean's own kit), the user's own by theirs.
|
|
187
194
|
const all = withNames(mergeKits(jeanKit(), kit).kit).layouts, standard = Object.keys(STANDARD.layouts), mine = Object.keys(kit.layouts).filter((key) => !STANDARD.layouts[key] && kit.layouts[key])
|
|
188
195
|
const turn = (/** @type {string} */ key) => change((next) => { if (next.layouts[key] === false) delete next.layouts[key]; else next.layouts[key] = false })
|
|
189
|
-
return html`<section><h3>${t('slides.kit.layouts')}</h3><ul class="list kit-layouts">
|
|
196
|
+
return html`<section><h3>${t('slides.kit.layouts')}</h3><p class="hint">${t('slides.kit.slidesOnly')}</p><ul class="list kit-layouts">
|
|
190
197
|
${[...standard, ...mine].map((key) => row(labelOf(all[key] ?? /** @type {any} */ (jeanKit().layouts[key]), key, locale.peek()), nothing, html`<span class="row">
|
|
191
198
|
${mine.includes(key) ? html`<button type="button" class="button subtle" @click=${() => { making.value = key }}>${t('slides.kit.change')}</button>
|
|
192
199
|
<button type="button" class="button subtle danger" @click=${() => change((next) => { delete next.layouts[key] })}>${t('slides.kit.delete')}</button>`
|
|
193
|
-
: html`<input type="checkbox" class="switch" role="switch"
|
|
200
|
+
: html`<input type="checkbox" class="switch" role="switch" title=${labelOf(/** @type {any} */ (jeanKit().layouts[key]), key, locale.peek())} .checked=${live(kit.layouts[key] !== false)} ?disabled=${key === 'default'} @change=${() => turn(key)}>`}</span>`))}
|
|
194
201
|
</ul>${making.value ? layoutForm(kit, making.value) : html`<button type="button" class="button" @click=${() => { making.value = '+' }}>${icons.plus} ${t('slides.kit.newLayout')}</button>`}</section>`
|
|
195
202
|
}
|
|
196
203
|
|
|
@@ -199,38 +206,40 @@ export function page() {
|
|
|
199
206
|
const kit = read(), project = app.project.value
|
|
200
207
|
if (!kit) return nothing
|
|
201
208
|
const tokens = kit.tokens, night = tokens.dark ?? {}, fonts = tokens.fonts
|
|
202
|
-
const file = (/** @type {string} */ label, /** @type {string} */ accept, /** @type {(event: Event) => void} */ picked) => html`<label class="button kit-file">${label}<input type="file" class="visually-hidden" accept=${accept} @change=${picked}></label>`
|
|
209
|
+
const file = (/** @type {string} */ id, /** @type {string} */ label, /** @type {string} */ accept, /** @type {(event: Event) => void} */ picked) => html`<label class="button kit-file" for=${id}>${label}<input id=${id} type="file" class="visually-hidden" accept=${accept} @change=${picked}></label>`
|
|
203
210
|
return html`<header class="look-head"><h2 tabindex="-1">${t('slides.kit.title')}</h2>${Object.keys(tokens).length || Object.keys(kit.layouts).length
|
|
204
211
|
? html`<button class="button subtle" @click=${() => change((next) => { next.tokens = {}; next.layouts = {}; delete next.name; typed.value = {} })}>${t('slides.kit.startOver')}</button>` : nothing}</header>
|
|
205
212
|
<p class="lede">${t('slides.kit.text')}</p>
|
|
206
213
|
${project.data.default === true ? nothing : html`<span class="segmented" role="radiogroup" aria-label=${t('slides.kit.title')}>
|
|
207
|
-
${[['kit', t('slides.kit.everywhere')], ['kit-project', t('slides.kit.project', { project: String(project.data.name ?? '') })]].map(([page, label]) => html`<label>
|
|
208
|
-
<input type="radio" name="kit-whose" .checked=${live(pageOpen() === page)} @change=${() => pageOpen(page)}><span>${label}</span></label>`)}</span>`}
|
|
209
|
-
<div class="kit-preview" ${ref((box) => void preview(box, kit))}></div>
|
|
214
|
+
${[['kit', t('slides.kit.everywhere')], ['kit-project', t('slides.kit.project', { project: String(project.data.name ?? '') })]].map(([page, label]) => html`<label for=${`whose-${page}`}>
|
|
215
|
+
<input id=${`whose-${page}`} type="radio" name="kit-whose" .checked=${live(pageOpen() === page)} @change=${() => pageOpen(page)}><span>${label}</span></label>`)}</span>`}
|
|
216
|
+
<div class="kit-previews"><div class="kit-preview" ${ref((box) => void preview(box, kit))}></div>
|
|
217
|
+
<figure><div class="kit-sheet" aria-hidden="true" ${ref((box) => void sheet(box, kit))}><img hidden alt=""><b>${t('slides.kit.title')}</b><p>${t('slides.kit.sample')}</p><blockquote>${t('slides.kit.sample')}</blockquote><table><tr><th>${t('slides.kit.name')}</th><th>${t('slides.kit.words')}</th></tr></table></div>
|
|
218
|
+
<figcaption class="hint">${t('slides.kit.onPaper')}</figcaption></figure></div>
|
|
210
219
|
${said.value ? html`<p class="hint" role="status">${said.value}</p>` : nothing}
|
|
211
|
-
<section><h3>${t('slides.kit.colours')}</h3><ul class="list">${COLOURS.map((key) => colour(kit, key, false))}</ul>
|
|
220
|
+
<section><h3>${t('slides.kit.colours')}</h3><ul class="list">${COLOURS.map((key) => colour(kit, key, false))}</ul><p class="hint">${t('slides.kit.paperHint')}</p>
|
|
212
221
|
<h3>${t('slides.kit.night')}</h3><ul class="list">${COLOURS.slice(0, 3).map((key) => colour(kit, key, true))}</ul></section>
|
|
213
222
|
<section><h3>${t('slides.kit.type')}</h3><ul class="list">
|
|
214
|
-
${row(nothing, nothing, html`<span class="segmented" role="radiogroup" aria-label=${t('slides.kit.type')}>${VOICES.map((voice) => html`<label>
|
|
215
|
-
<input type="radio" name="kit-voice" .checked=${live(!fonts && (tokens.voice ?? 'calm') === voice)} @change=${() => change((next) => { next.tokens.voice = voice; delete next.tokens.fonts })}><span>${t(`slides.kit.voice.${voice}`)}</span></label>`)}</span>`)}
|
|
216
|
-
${row(t('slides.kit.fonts'), nothing, html`<span class="row">${['heading', 'body'].map((part) => html`<input class="kit-face" dir="ltr"
|
|
223
|
+
${row(nothing, nothing, html`<span class="segmented" role="radiogroup" aria-label=${t('slides.kit.type')}>${VOICES.map((voice) => html`<label for=${`voice-${voice}`}>
|
|
224
|
+
<input id=${`voice-${voice}`} type="radio" name="kit-voice" .checked=${live(!fonts && (tokens.voice ?? 'calm') === voice)} @change=${() => change((next) => { next.tokens.voice = voice; delete next.tokens.fonts })}><span>${t(`slides.kit.voice.${voice}`)}</span></label>`)}</span>`)}
|
|
225
|
+
${row(t('slides.kit.fonts'), nothing, html`<span class="row">${['heading', 'body'].map((part) => html`<input class="kit-face" dir="ltr" title=${t(part === 'heading' ? 'slides.kit.headings' : 'slides.kit.words')}
|
|
217
226
|
placeholder=${t(part === 'heading' ? 'slides.kit.headings' : 'slides.kit.words')} .value=${live(fonts?.[part]?.join(', ') ?? '')} @change=${(/** @type {Event} */ e) => change((next) => {
|
|
218
227
|
const faces = /** @type {HTMLInputElement} */ (e.target).value.split(',').map((one) => one.trim()).filter(Boolean), own = { heading: fonts?.heading ?? [], body: fonts?.body ?? [], [part]: faces }
|
|
219
228
|
if (own.heading.length || own.body.length) next.tokens.fonts = { heading: own.heading.length ? own.heading : own.body, body: own.body.length ? own.body : own.heading }
|
|
220
229
|
else delete next.tokens.fonts
|
|
221
230
|
})}>`)}</span>`)}
|
|
222
|
-
${row(t('slides.kit.corners'),
|
|
231
|
+
${row(t('slides.kit.corners'), t('slides.kit.slidesOnly'), html`<input type="range" min="0" max="24" step="1" title=${t('slides.kit.corners')} .value=${live(String(tokens.radius ?? 10))}
|
|
223
232
|
@change=${(/** @type {Event} */ e) => token('radius', Number(/** @type {HTMLInputElement} */ (e.target).value))}>`)}
|
|
224
233
|
</ul></section>
|
|
225
234
|
<section><h3>${t('slides.kit.logo')}</h3><ul class="list">
|
|
226
235
|
${[[false, tokens.logo, ''], [true, night.logo, 'slides.kit.logoDark']].map(([dark, url, label]) => row(label ? t(String(label)) : nothing, nothing, html`<span class="row kit-logo ${dark ? 'is-dark' : ''}">
|
|
227
|
-
${url ? html`<img src=${String(url)} alt="">` : nothing}${file(t('slides.kit.logoAdd'), 'image/png,image/jpeg,image/gif,image/webp,image/svg+xml', (e) => void logo(e, Boolean(dark)))}
|
|
236
|
+
${url ? html`<img src=${String(url)} alt="">` : nothing}${file(`kit-logo-${dark}`, t('slides.kit.logoAdd'), 'image/png,image/jpeg,image/gif,image/webp,image/svg+xml', (e) => void logo(e, Boolean(dark)))}
|
|
228
237
|
${url ? html`<button type="button" class="button subtle" @click=${() => token('logo', undefined, Boolean(dark))}>${t('slides.kit.remove')}</button>` : nothing}</span>`))}
|
|
229
|
-
${tokens.logo ? row(t('slides.kit.corner'), nothing, html`<select
|
|
238
|
+
${tokens.logo ? row(t('slides.kit.corner'), nothing, html`<select title=${t('slides.kit.corner')} @change=${(/** @type {Event} */ e) => token('logoAt', /** @type {HTMLSelectElement} */ (e.target).value)}>
|
|
230
239
|
${CORNERS.map((corner) => html`<option value=${corner} ?selected=${corner === (tokens.logoAt ?? CORNERS[0])}>${cornerName(corner)}</option>`)}</select>`) : nothing}
|
|
231
240
|
</ul></section>
|
|
232
241
|
${layouts(kit)}
|
|
233
|
-
<section class="row kit-files">${file(t('slides.kit.bring'), '.json,.potx,.pptx,.thmx,application/json', (e) => void bring(e))}
|
|
242
|
+
<section class="row kit-files">${file('kit-bring', t('slides.kit.bring'), '.json,.potx,.pptx,.thmx,application/json', (e) => void bring(e))}
|
|
234
243
|
<button type="button" class="button subtle" @click=${() => keepAs(false)}>${icons.download} ${t('slides.kit.saveFile')}</button>
|
|
235
244
|
<button type="button" class="button subtle" @click=${() => keepAs(true)}>${icons.download} ${t('slides.kit.saveTokens')}</button></section>`
|
|
236
245
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// What the design system's page shows on each layout (D602): a small project, from its idea to its launch, written as a layout
|
|
2
|
+
// wants it, so that each draws what it is for: a figure from its lists or its parts, a sentence, a quote, a picture, its slots.
|
|
3
|
+
// By what a layout does more than its name, so that a kit's own and a template's show theirs too. Dates and numbers are Intl's.
|
|
4
|
+
import { labelOf, rgbOf } from '@codename/deck'
|
|
5
|
+
import { t, locale, intlLocales } from '../../core/i18n.js'
|
|
6
|
+
|
|
7
|
+
/** The project's stages, and the rows of the contents' slide, kept short: the other layouts stay out of them. */
|
|
8
|
+
const STAGES = ['idea', 'plan', 'trial', 'launch'], LISTED = ['section', 'subsection', 'steps', 'metrics', 'timeline', 'process']
|
|
9
|
+
/** A stage's name, and what it is. @param {string} stage */
|
|
10
|
+
const named = (stage) => t(`slides.kit.sample.${stage}`), told = (/** @type {string} */ stage) => t(`slides.kit.sample.${stage}Text`)
|
|
11
|
+
/** Stages as a figure's items: a lead in bold, its words. @param {(stage: string, i: number) => string} lead @param {(stage: string) => string} words @param {string} [mark] */
|
|
12
|
+
const items = (lead, words, mark = '-', stages = STAGES) => stages.map((stage, i) => `${mark} **${lead(stage, i)}** ${words(stage)}`).join('\n'), plain = () => items(named, told), none = () => ''
|
|
13
|
+
/** A share, and a moment of the sample's year, as the language writes them; stages as `##` parts. @param {number} share */
|
|
14
|
+
const percent = (share) => new Intl.NumberFormat(intlLocales(locale.peek()), { style: 'percent' }).format(share), when = (/** @type {Intl.DateTimeFormatOptions} */ how, month = 0, hour = 12) => new Intl.DateTimeFormat(intlLocales(locale.peek()), how).format(new Date(2026, month, 15, Math.floor(hour), (hour % 1) * 60)), parts = (/** @type {string[]} */ stages) => stages.map((stage) => `## ${named(stage)}\n\n${told(stage)}`).join('\n\n')
|
|
15
|
+
|
|
16
|
+
/** What a slide on each is written with, under its heading (deck's docs/format.md), by the figure it draws, else by its name. Without a prototype: a kit names its own. @type {Record<string, () => string>} */
|
|
17
|
+
const WRITTEN = { __proto__: /** @type {any} */ (null), section: none, subsection: none, summary: none, steps: plain, pyramid: plain, bento: plain, process: () => items(named, told, '1.'), mindmap: () => STAGES.map((stage) => `- ${named(stage)}\n - ${told(stage)}`).join('\n'),
|
|
18
|
+
metrics: () => items((_, i) => percent([0.92, 0.64, 0.38][i]), named, '-', STAGES.slice(0, 3)), timeline: () => items((_, i) => when({ month: 'short' }, i * 3), named), agenda: () => items((_, i) => when({ timeStyle: 'short' }, 0, [9, 10.5, 13, 15.5][i]), told),
|
|
19
|
+
versus: () => parts(['plan', 'trial']), matrix: () => parts(STAGES), statement: () => t('slides.kit.sample.saying'), quote: () => `> ${t('slides.kit.sample.saying')}\n\n${t('slides.kit.sample.who')}`, fact: () => `# ${percent(0.92)}\n\n${t('slides.kit.sample')}` }
|
|
20
|
+
|
|
21
|
+
/** A dusk over hills, its sun in the kit's main colour, in the middle of what half a slide keeps of it, dark enough for the white words deck sets on a picture. Its colour as deck reads it, so that a kit's odd one can't spoil the picture. @param {string} colour */
|
|
22
|
+
const picture = (colour) => `data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 90"><path fill="#27303c" d="M0 0h160v90H0z"/><circle fill="rgb(${rgbOf(colour) ?? [136, 136, 136]})" cx="94" cy="28" r="10"/><path fill="#3a4656" d="M0 90V60l36-24 46 54z"/><path fill="#566274" d="M38 90l50-40 28 22 16-10 28 18v10z"/></svg>`)}`
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A slide's words on a layout, under its name: a line on a slide of few words, else a list; a lead and a line in each of its other
|
|
26
|
+
* slots but one beside a list, which goes on with it. A sentence, a quote and a big number have their name small, as it would take their room.
|
|
27
|
+
* @param {string} name @param {any} layout as deck's mergeKits() reads it @returns {string}
|
|
28
|
+
*/
|
|
29
|
+
function words(name, layout) {
|
|
30
|
+
const key = layout.parts === 'none' ? (layout.lists === 'bullets' ? name : layout.lists) : layout.parts, rest = layout.slots.filter((/** @type {string} */ slot) => slot !== 'default')
|
|
31
|
+
const under = WRITTEN[key]?.() ?? (layout.paper !== 'paper' || layout.title !== 'normal' || name === 'center' || rest.length > 1 ? t('slides.kit.sample') : STAGES.slice(0, 3 - rest.length).map((stage) => `- ${told(stage)}`).join('\n'))
|
|
32
|
+
return `${['statement', 'quote', 'fact'].includes(name) ? '###' : '#'} ${labelOf(layout, name, locale.peek())}\n\n${under}\n${rest.map((/** @type {string} */ slot, /** @type {number} */ i) => `\n::${slot}::\n\n${slot === 'bottom' ? told('launch') : rest.length > 1 ? `### ${named(STAGES[i % 4])}\n\n${told(STAGES[i % 4])}` : `- ${told('trial')}\n- ${told('launch')}`}\n`).join('')}`
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** The deck that shows a kit: a slide for each of its layouts, the cover first. @param {ReturnType<typeof import('@codename/deck').mergeKits>['kit']} kit @returns {string} */
|
|
36
|
+
export const sampleDeck = (kit) => ['cover', ...Object.keys(kit.layouts).filter((name) => name !== 'cover')].filter((name) => kit.layouts[name]).map((name, i) => `${i ? '\n---\n' : '---\n'}layout: ${name}\nhideInToc: ${!LISTED.includes(name)}${name.startsWith('image') ? `\nimage: ${picture(kit.tokens.primary)}` : ''}\n---\n\n${words(name, kit.layouts[name])}`).join('')
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Settings › Appearance › Design system (D602, D664): its row and its page, for each capability that wears a design system to offer,
|
|
2
|
+
// so that it shows once any of them is found (Slides, Documents, Tables), Slides itself staying unfound. Its page loads the first time Appearance shows its row.
|
|
3
|
+
import { nothing } from 'lit-html'
|
|
4
|
+
import { signal } from '@preact/signals-core'
|
|
5
|
+
|
|
6
|
+
/** @type {import('@preact/signals-core').Signal<typeof import('./kit-page.js') | null>} */
|
|
7
|
+
const kitPage = signal(null)
|
|
8
|
+
const kitPart = () => kitPage.value ?? (void import('./kit-page.js').then((module) => { kitPage.value = module }), null)
|
|
9
|
+
/** The `look` slot. */
|
|
10
|
+
export const kitSlot = { at: 0, draw: () => kitPart()?.entry() ?? nothing, page: (/** @type {string} */ name) => (/^kit(-project)?$/.test(name) ? kitPart()?.page() ?? nothing : null) }
|
package/caps/slides/kit.js
CHANGED
|
@@ -12,6 +12,9 @@ import { LOOKS, OWN, lookId } from '../../ui/looks.js'
|
|
|
12
12
|
import { hexOf, projectKit, kitFile } from '../../ui/kit.js'
|
|
13
13
|
import { t, locale } from '../../core/i18n.js'
|
|
14
14
|
|
|
15
|
+
/** deck's words in the user's language: its bar's, its views', a slide's. */
|
|
16
|
+
export const words = () => Object.fromEntries(['deck', 'previous', 'next', 'where', 'present', 'presenter', 'overview', 'edit', 'source', 'notes', 'noNotes', 'upNext', 'last', 'slide', 'carousel'].map((key) => [key, t(`slides.${key}`)]))
|
|
17
|
+
|
|
15
18
|
/** Tilde's ink and paper by day and by night, and the margin's grey for a pale fill (docs/design.md). */
|
|
16
19
|
const TILDE = { paper: '#ffffff', ink: '#18171b', soft: '#f4f3f1', dark: { paper: '#19181b', ink: '#f3f1ed', soft: '#222125' } }
|
|
17
20
|
|