@astl/astrolabe 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/cdn/astrolabe-editor.js +55 -19
  3. package/dist/cdn/astrolabe-editor.js.map +1 -1
  4. package/dist/cdn/astrolabe.standalone.js +138 -59
  5. package/dist/cdn/chunks/{help-form-DaC6KaFG.js → help-form-DhIyMziw.js} +14 -10
  6. package/dist/cdn/chunks/help-form-DhIyMziw.js.map +1 -0
  7. package/dist/cdn/chunks/{insert-menu-LgrifBYT.js → insert-menu-Cn2E54V9.js} +2 -2
  8. package/dist/cdn/chunks/{insert-menu-LgrifBYT.js.map → insert-menu-Cn2E54V9.js.map} +1 -1
  9. package/dist/cdn/chunks/{issue-list-BgnXzXRM.js → issue-list-CQKAW39i.js} +2 -2
  10. package/dist/cdn/chunks/{issue-list-BgnXzXRM.js.map → issue-list-CQKAW39i.js.map} +1 -1
  11. package/dist/cdn/chunks/messages-Qzse5KMX.js +2 -0
  12. package/dist/cdn/chunks/messages-Qzse5KMX.js.map +1 -0
  13. package/dist/cdn/chunks/{source-view-DXKPFCl9.js → source-view-BlJ2mRns.js} +2 -2
  14. package/dist/cdn/chunks/{source-view-DXKPFCl9.js.map → source-view-BlJ2mRns.js.map} +1 -1
  15. package/dist/cdn/chunks/{style-form-D5haJtWM.js → style-form-D1C2sHzg.js} +2 -2
  16. package/dist/cdn/chunks/{style-form-D5haJtWM.js.map → style-form-D1C2sHzg.js.map} +1 -1
  17. package/dist/cdn/chunks/{style-messages-BbZpeD2a.js → style-messages-B136zSom.js} +2 -2
  18. package/dist/cdn/chunks/{style-messages-BbZpeD2a.js.map → style-messages-B136zSom.js.map} +1 -1
  19. package/dist/cdn/chunks/{style-rules-D45PZLCv.js → style-rules-ChqPVgZn.js} +2 -2
  20. package/dist/cdn/chunks/{style-rules-D45PZLCv.js.map → style-rules-ChqPVgZn.js.map} +1 -1
  21. package/dist/cdn/chunks/{styles-DxJJxVNH.js → styles-CXkkL_Qi.js} +2 -2
  22. package/dist/cdn/chunks/{styles-DxJJxVNH.js.map → styles-CXkkL_Qi.js.map} +1 -1
  23. package/dist/cdn/chunks/surface-BhmSAte0.js +1058 -0
  24. package/dist/cdn/chunks/surface-BhmSAte0.js.map +1 -0
  25. package/package.json +9 -9
  26. package/dist/cdn/chunks/help-form-DaC6KaFG.js.map +0 -1
  27. package/dist/cdn/chunks/messages-9xiYDvRT.js +0 -2
  28. package/dist/cdn/chunks/messages-9xiYDvRT.js.map +0 -1
  29. package/dist/cdn/chunks/surface-CgxfAwCR.js +0 -1019
  30. package/dist/cdn/chunks/surface-CgxfAwCR.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{C as e,E as t,T as n,b as r}from"./runtime-DxAbpr3S.js";import{t as i}from"./messages-9xiYDvRT.js";var a={error:n`<circle cx="10" cy="10" r="7.5" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M7 7l6 6m0-6l-6 6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>`,warning:n`<path d="M10 2.8l7.6 13.4H2.4z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/><path d="M10 8v3.6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="10" cy="14" r="1.1" fill="currentColor"/>`};function o(e){return[...e].sort((e,t)=>Number(e.severity!==`error`)-Number(t.severity!==`error`))}function s(e){return e.at.element??e.at.page}var c=t`
1
+ import{C as e,E as t,T as n,b as r}from"./runtime-DxAbpr3S.js";import{t as i}from"./messages-Qzse5KMX.js";var a={error:n`<circle cx="10" cy="10" r="7.5" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M7 7l6 6m0-6l-6 6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>`,warning:n`<path d="M10 2.8l7.6 13.4H2.4z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/><path d="M10 8v3.6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="10" cy="14" r="1.1" fill="currentColor"/>`};function o(e){return[...e].sort((e,t)=>Number(e.severity!==`error`)-Number(t.severity!==`error`))}function s(e){return e.at.element??e.at.page}var c=t`
2
2
  .issue > button,
3
3
  .issue > .static {
4
4
  box-sizing: border-box;
@@ -48,4 +48,4 @@ min-inline-size: 0;
48
48
  </li>`}function u(t,n,i,a){return t.length===0?r:e`<ul class="issues" role="list">
49
49
  ${o(t).map(e=>l(e,n,i,a))}
50
50
  </ul>`}export{o as i,c as n,u as r,a as t};
51
- //# sourceMappingURL=issue-list-BgnXzXRM.js.map
51
+ //# sourceMappingURL=issue-list-CQKAW39i.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"issue-list-BgnXzXRM.js","names":["nothing","b","i","w","A","EDITOR_NAMESPACE","SEVERITY_ICONS","sortIssues","issues","a","issueTarget","issue","issueStyles","renderIssue","target","label","authoring","text","source","content","adapter","renderIssues"],"sources":["../../../../editor/src/elements/issue-list.ts"],"sourcesContent":["import type { EditorAdapter, Issue, Severity } from '@astl/core';\nimport { type CSSResult, css, html, nothing, svg, type TemplateResult } from 'lit';\nimport type { Authoring } from '../authoring.js';\nimport { EDITOR_NAMESPACE } from '../messages.js';\n\n/** The severity icons (shapes with their own stroke), for the issue list and the inspector's banners. */\nexport const SEVERITY_ICONS: Readonly<Record<Severity, TemplateResult>> = {\n error: svg`<circle cx=\"10\" cy=\"10\" r=\"7.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"/><path d=\"M7 7l6 6m0-6l-6 6\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>`,\n warning: svg`<path d=\"M10 2.8l7.6 13.4H2.4z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linejoin=\"round\"/><path d=\"M10 8v3.6\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/><circle cx=\"10\" cy=\"14\" r=\"1.1\" fill=\"currentColor\"/>`,\n};\n\n/** Errors first, then warnings; document order within each. */\nexport function sortIssues(issues: readonly Issue[]): Issue[] {\n return [...issues].sort((a, b) => Number(a.severity !== 'error') - Number(b.severity !== 'error'));\n}\n\n/** Source id an issue can jump to: its component, else its page. */\nexport function issueTarget(issue: Issue): string | null {\n return issue.at.element ?? issue.at.page;\n}\n\nexport const issueStyles: CSSResult = css`\n .issue > button,\n .issue > .static {\n box-sizing: border-box;\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: var(--astl-space-1) var(--astl-space-2);\n inline-size: 100%;\n min-block-size: var(--astl-target-min);\n padding-block: var(--astl-space-2);\n padding-inline: var(--astl-space-3);\n border: var(--astl-outline-width) solid var(--astl-line);\n border-inline-start-width: var(--astl-space-1);\n border-radius: var(--astl-radius-m);\n background: var(--astl-surface);\n color: var(--astl-ink);\n text-align: start;\n }\n .issue[data-severity='error'] > * {\n border-inline-start-color: var(--astl-danger);\n }\n .issue[data-severity='warning'] > * {\n border-inline-start-color: var(--astl-warning);\n }\n .severity {\n display: inline-flex;\n align-items: center;\n gap: var(--astl-space-1);\n font-weight: 700;\n }\n .issue[data-severity='error'] .severity {\n color: var(--astl-danger);\n }\n .issue[data-severity='warning'] .severity {\n color: var(--astl-warning);\n }\n .message {\n flex: 1 1 12rem;\n min-inline-size: 0;\n }\n`;\n\n/**\n * One issue: severity icon + word + message; a button that selects its element when it has one. With the document the\n * issue is about (`source`), the message names components as authors see them, not by id.\n */\nexport function renderIssue(\n issue: Issue,\n authoring: Authoring,\n adapter: EditorAdapter | null,\n source?: string,\n): TemplateResult {\n const target = issueTarget(issue);\n const label = authoring.t(EDITOR_NAMESPACE, `severity.${issue.severity}`);\n const text = authoring.describe(issue, source);\n const content = html`<span class=\"severity\"\n ><svg class=\"icon\" viewBox=\"0 0 20 20\" aria-hidden=\"true\" focusable=\"false\">${SEVERITY_ICONS[issue.severity]}</svg\n >${label}<span class=\"astl-vh\">:</span></span\n >\n <span class=\"message\">${text}</span>`;\n return html`<li class=\"issue\" data-code=${issue.code} data-severity=${issue.severity}>\n ${\n target === null || adapter === null\n ? html`<div class=\"static\">${content}</div>`\n : html`<button type=\"button\" data-target=${target} aria-label=${authoring.t(EDITOR_NAMESPACE, 'label.text', { label, text })} @click=${() => adapter.select(target)}>${content}</button>`\n }\n </li>`;\n}\n\n/** A list of issues, or nothing when empty. */\nexport function renderIssues(\n issues: readonly Issue[],\n authoring: Authoring,\n adapter: EditorAdapter | null,\n source?: string,\n): TemplateResult | typeof nothing {\n if (issues.length === 0) return nothing;\n return html`<ul class=\"issues\" role=\"list\">\n ${sortIssues(issues).map((issue) => renderIssue(issue, authoring, adapter, source))}\n </ul>`;\n}\n"],"mappings":"A,0GAMA,IAAaM,EAA6D,CACxE,MAAO,CAAG,sLACV,QAAS,CAAG,0PACd,EAGA,SAAgBC,EAAW,EAAmC,CAC5D,MAAO,CAAC,GAAGC,CAAM,CAAC,CAAC,MAAM,EAAG,IAAM,OAAOC,EAAE,WAAa,OAAO,EAAI,OAAOR,EAAE,WAAa,OAAO,CAAC,CACnG,CAGA,SAAgBS,EAAY,EAA6B,CACvD,OAAOC,EAAM,GAAG,SAAWA,EAAM,GAAG,IACtC,CAEA,IAAaC,EAAyB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CzC,SAAgBC,EACd,EACA,EACA,EACA,EACgB,CAChB,IAAMC,EAASJ,EAAYC,CAAK,EAC1BI,EAAQC,EAAU,EAAEX,EAAkB,YAAYM,EAAM,UAAU,EAClEM,EAAOD,EAAU,SAASL,EAAOO,CAAM,EACvCC,EAAU,CAAI;oFAC8Db,EAAeK,EAAM,UAAU;SAC1GI,EAAM;;4BAEaE,EAAK,SAC/B,MAAO,EAAI,+BAA+BN,EAAM,KAAK,iBAAiBA,EAAM,SAAS;MAEjFG,IAAW,MAAQM,IAAY,KAC3B,CAAI,uBAAuBD,EAAQ,QACnC,CAAI,qCAAqCL,EAAO,cAAcE,EAAU,EAAEX,EAAkB,aAAc,CAAE,QAAO,MAAK,CAAC,EAAE,cAAgBe,EAAQ,OAAON,CAAM,EAAE,GAAGK,EAAQ,WAClL;QAEL,CAGA,SAAgBE,EACd,EACA,EACA,EACA,EACiC,CAEjC,OADIb,EAAO,SAAW,EAAUR,EACzB,CAAI;MACPO,EAAWC,CAAM,CAAC,CAAC,IAAK,GAAUK,EAAYF,EAAOK,EAAWI,EAASF,CAAM,CAAC,EAAE;QAExF,C"}
1
+ {"version":3,"file":"issue-list-CQKAW39i.js","names":["nothing","b","i","w","A","EDITOR_NAMESPACE","SEVERITY_ICONS","sortIssues","issues","a","issueTarget","issue","issueStyles","renderIssue","target","label","authoring","text","source","content","adapter","renderIssues"],"sources":["../../../../editor/src/elements/issue-list.ts"],"sourcesContent":["import type { EditorAdapter, Issue, Severity } from '@astl/core';\nimport { type CSSResult, css, html, nothing, svg, type TemplateResult } from 'lit';\nimport type { Authoring } from '../authoring.js';\nimport { EDITOR_NAMESPACE } from '../messages.js';\n\n/** The severity icons (shapes with their own stroke), for the issue list and the inspector's banners. */\nexport const SEVERITY_ICONS: Readonly<Record<Severity, TemplateResult>> = {\n error: svg`<circle cx=\"10\" cy=\"10\" r=\"7.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\"/><path d=\"M7 7l6 6m0-6l-6 6\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/>`,\n warning: svg`<path d=\"M10 2.8l7.6 13.4H2.4z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linejoin=\"round\"/><path d=\"M10 8v3.6\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\"/><circle cx=\"10\" cy=\"14\" r=\"1.1\" fill=\"currentColor\"/>`,\n};\n\n/** Errors first, then warnings; document order within each. */\nexport function sortIssues(issues: readonly Issue[]): Issue[] {\n return [...issues].sort((a, b) => Number(a.severity !== 'error') - Number(b.severity !== 'error'));\n}\n\n/** Source id an issue can jump to: its component, else its page. */\nexport function issueTarget(issue: Issue): string | null {\n return issue.at.element ?? issue.at.page;\n}\n\nexport const issueStyles: CSSResult = css`\n .issue > button,\n .issue > .static {\n box-sizing: border-box;\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n gap: var(--astl-space-1) var(--astl-space-2);\n inline-size: 100%;\n min-block-size: var(--astl-target-min);\n padding-block: var(--astl-space-2);\n padding-inline: var(--astl-space-3);\n border: var(--astl-outline-width) solid var(--astl-line);\n border-inline-start-width: var(--astl-space-1);\n border-radius: var(--astl-radius-m);\n background: var(--astl-surface);\n color: var(--astl-ink);\n text-align: start;\n }\n .issue[data-severity='error'] > * {\n border-inline-start-color: var(--astl-danger);\n }\n .issue[data-severity='warning'] > * {\n border-inline-start-color: var(--astl-warning);\n }\n .severity {\n display: inline-flex;\n align-items: center;\n gap: var(--astl-space-1);\n font-weight: 700;\n }\n .issue[data-severity='error'] .severity {\n color: var(--astl-danger);\n }\n .issue[data-severity='warning'] .severity {\n color: var(--astl-warning);\n }\n .message {\n flex: 1 1 12rem;\n min-inline-size: 0;\n }\n`;\n\n/**\n * One issue: severity icon + word + message; a button that selects its element when it has one. With the document the\n * issue is about (`source`), the message names components as authors see them, not by id.\n */\nexport function renderIssue(\n issue: Issue,\n authoring: Authoring,\n adapter: EditorAdapter | null,\n source?: string,\n): TemplateResult {\n const target = issueTarget(issue);\n const label = authoring.t(EDITOR_NAMESPACE, `severity.${issue.severity}`);\n const text = authoring.describe(issue, source);\n const content = html`<span class=\"severity\"\n ><svg class=\"icon\" viewBox=\"0 0 20 20\" aria-hidden=\"true\" focusable=\"false\">${SEVERITY_ICONS[issue.severity]}</svg\n >${label}<span class=\"astl-vh\">:</span></span\n >\n <span class=\"message\">${text}</span>`;\n return html`<li class=\"issue\" data-code=${issue.code} data-severity=${issue.severity}>\n ${\n target === null || adapter === null\n ? html`<div class=\"static\">${content}</div>`\n : html`<button type=\"button\" data-target=${target} aria-label=${authoring.t(EDITOR_NAMESPACE, 'label.text', { label, text })} @click=${() => adapter.select(target)}>${content}</button>`\n }\n </li>`;\n}\n\n/** A list of issues, or nothing when empty. */\nexport function renderIssues(\n issues: readonly Issue[],\n authoring: Authoring,\n adapter: EditorAdapter | null,\n source?: string,\n): TemplateResult | typeof nothing {\n if (issues.length === 0) return nothing;\n return html`<ul class=\"issues\" role=\"list\">\n ${sortIssues(issues).map((issue) => renderIssue(issue, authoring, adapter, source))}\n </ul>`;\n}\n"],"mappings":"A,0GAMA,IAAaM,EAA6D,CACxE,MAAO,CAAG,sLACV,QAAS,CAAG,0PACd,EAGA,SAAgBC,EAAW,EAAmC,CAC5D,MAAO,CAAC,GAAGC,CAAM,CAAC,CAAC,MAAM,EAAG,IAAM,OAAOC,EAAE,WAAa,OAAO,EAAI,OAAOR,EAAE,WAAa,OAAO,CAAC,CACnG,CAGA,SAAgBS,EAAY,EAA6B,CACvD,OAAOC,EAAM,GAAG,SAAWA,EAAM,GAAG,IACtC,CAEA,IAAaC,EAAyB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CzC,SAAgBC,EACd,EACA,EACA,EACA,EACgB,CAChB,IAAMC,EAASJ,EAAYC,CAAK,EAC1BI,EAAQC,EAAU,EAAEX,EAAkB,YAAYM,EAAM,UAAU,EAClEM,EAAOD,EAAU,SAASL,EAAOO,CAAM,EACvCC,EAAU,CAAI;oFAC8Db,EAAeK,EAAM,UAAU;SAC1GI,EAAM;;4BAEaE,EAAK,SAC/B,MAAO,EAAI,+BAA+BN,EAAM,KAAK,iBAAiBA,EAAM,SAAS;MAEjFG,IAAW,MAAQM,IAAY,KAC3B,CAAI,uBAAuBD,EAAQ,QACnC,CAAI,qCAAqCL,EAAO,cAAcE,EAAU,EAAEX,EAAkB,aAAc,CAAE,QAAO,MAAK,CAAC,EAAE,cAAgBe,EAAQ,OAAON,CAAM,EAAE,GAAGK,EAAQ,WAClL;QAEL,CAGA,SAAgBE,EACd,EACA,EACA,EACA,EACiC,CAEjC,OADIb,EAAO,SAAW,EAAUR,EACzB,CAAI;MACPO,EAAWC,CAAM,CAAC,CAAC,IAAK,GAAUK,EAAYF,EAAOK,EAAWI,EAASF,CAAM,CAAC,EAAE;QAExF,C"}
@@ -0,0 +1,2 @@
1
+ var e={"insert.title":`Insert`,"insert.components":`Components`,"insert.exercises":`Exercises`,"insert.content":`Content`,"insert.picture":`Picture`,"insert.picture.description":`A picture with alt text and an optional caption`,"insert.pageBreak":`Page break`,"insert.pageBreak.description":`Split the exercise into steps at the cursor`,"insert.hint":`Hint`,"insert.hint.description":`One students ask for: for the question at the cursor, else for the page`,"insert.explanation":`Explanation`,"insert.explanation.description":`Why the answer is right, shown once it is checked`,"insert.feedback":`Feedback`,"insert.feedback.description":`A text by the verdict, shown once the answer is checked`,"insert.text":`Text`,"insert.text.description":`A paragraph after this block`,"insert.noMatch":`Nothing matches “{query}”.`,"toolbar.label":`Format and insert`,"toolbar.style":`Text style: {style}`,"toolbar.paragraph":`Paragraph`,"toolbar.heading":`Heading`,"toolbar.subheading":`Subheading`,"toolbar.bold":`Bold`,"toolbar.italic":`Italic`,"toolbar.underline":`Underline`,"toolbar.link":`Link`,"toolbar.link.address":`Link address`,"toolbar.link.apply":`Apply`,"toolbar.link.remove":`Remove link`,"toolbar.link.blocked":`This address is not allowed here.`,"toolbar.bulleted":`Bulleted list`,"toolbar.numbered":`Numbered list`,"toolbar.undo":`Undo`,"toolbar.redo":`Redo`,"toolbar.elements":`Elements`,"toolbar.templates":`Templates`,"toolbar.layouts":`Layout`,"toolbar.view":`View`,"toolbar.search":`Search`,"block.text":`Text`,"block.gap":`Gap`,"issue.onPage":`{n} on page {page}`,"picture.title":`Add a picture`,"picture.editTitle":`Edit the picture`,"picture.file":`Upload a picture`,"picture.library":`Choose from the library`,"picture.urlOnly":`This editor adds pictures by their address only: it has no upload.`,"picture.src":`Picture address (URL)`,"picture.alt":`Alt text`,"picture.altHelp":`What the picture shows, for students who cannot see it. Do not give an answer away.`,"picture.decorative":`Decorative: screen readers skip it (alt="")`,"picture.caption":`Caption (optional)`,"picture.cancel":`Cancel`,"picture.insert":`Insert`,"picture.save":`Save`,"picture.uploading":`Uploading…`,"picture.uploaded":`Uploaded.`,"picture.uploadFailed":`The upload failed. Try again, or give the picture's address.`,"picture.uploadBlocked":`The upload gave an address the URL policy does not allow.`,"picture.picked":`Chosen from the library.`,"picture.pickFailed":`The library did not open. Try again, or give the picture's address.`,"picture.pickBlocked":`The library returned an address the URL policy does not allow.`,"picture.srcMissing":`Give the picture's address, or upload it.`,"picture.srcBlocked":`The URL policy does not allow this address.`,"picture.altMissing":`Describe the picture, or mark it as decorative.`,"picture.altRequired":`Describe the picture: students who cannot see it need its alt text for the task.`,"picture.pasteRefused":`This editor has no upload, so a picture file cannot be pasted or dropped. Add it with Insert, Picture, by its address.`,"field.picture.src":`Picture address (URL)`,"field.regions.draw":`Drag on the picture to draw a zone, or add one and type its numbers.`,"field.points.place":`Click the picture to place a pin, or add one and type its position.`,"field.region":`Zone {n}`,"field.region.add":`Add a zone`,"field.region.remove":`Remove zone {n}`,"field.point":`Pin {n}`,"field.point.add":`Add a pin`,"field.point.remove":`Remove pin {n}`,"field.shape":`Shape`,"field.shape.rect":`Rectangle`,"field.shape.circle":`Circle`,"field.shape.polygon":`Polygon`,"field.x":`From the left (%)`,"field.y":`From the top (%)`,"field.width":`Width (%)`,"field.height":`Height (%)`,"field.cx":`Centre from the left (%)`,"field.cy":`Centre from the top (%)`,"field.r":`Radius (% of the width)`,"field.vertex.x":`Point {n} from the left (%)`,"field.vertex.y":`Point {n} from the top (%)`,"field.vertex.add":`Add a point`,"field.vertex.remove":`Remove point {n}`,"field.label":`Label`,"field.label.optional":`Label (optional)`,"field.more":`Only the first {shown} of {count} are listed here: edit the others in the source.`,"inspector.title":`Properties`,"inspector.delete":`Delete`,"inspector.moveUp":`Move up`,"inspector.moveDown":`Move down`,"inspector.empty":`Put the cursor in an exercise element to edit its answers and settings.`,"inspector.unsupported":`Element {tag} cannot be edited here.`,"inspector.unset":`(not set)`,"inspector.item":`{label} {n}`,"inspector.add":`Add`,"inspector.remove":`Remove`,"inspector.removeItem":`Remove: {label} {n}`,"inspector.untitled":`Item {n} (empty)`,"inspector.variant":`Variant`,"inspector.styleTemplate":`Element style`,"inspector.styleTemplate.inherit":`Same as the exercise`,"inspector.styleTemplate.default":`Default look`,"inspector.document":`Exercise`,"inspector.documentStyle":`Look of the whole exercise`,"inspector.upload":`Upload a file`,"inspector.uploadItem":`Upload a file: {label}`,"inspector.uploading":`Uploading…`,"inspector.uploaded":`Uploaded.`,"inspector.uploadFailed":`The upload failed. Try again, or type its address.`,"inspector.uploadBlocked":`The upload gave an address the URL policy does not allow.`,"issues.title":`Problems`,"issues.errors":`{count, plural, one {# error} other {# errors}}`,"issues.warnings":`{count, plural, one {# warning} other {# warnings}}`,"issues.summary":`{errors}, {warnings}`,"issues.none":`No errors or warnings.`,"severity.error":`Error`,"severity.warning":`Warning`,"label.text":`{label}: {text}`,"preview.title":`Student view`,"preview.show":`Preview`,"preview.refresh":`Refresh preview`,"preview.hint":`Press Preview to try the exercise the way a student will see it.`,"preview.loading":`Preparing the preview…`,"preview.stale":`The document changed after this preview. Refresh it to see the changes.`,"preview.invalid":`{count, plural, one {Fix this error to see the preview:} other {Fix these # errors to see the preview:}}`,"preview.failed":`The preview could not be shown.`,"surface.label":`Exercise content`,"surface.pageNumber":`Page {page} of {pages}`,"surface.pageTitle":`Page title`,"surface.pageJoin":`Join with page {previous}`,"surface.pageAdded":`Page {page} added`,"surface.pageJoined":`Page {page} joined with page {previous}`,"surface.pageDelete":`Delete page`,"surface.pageDeleted":`Deleted page {n}`,"surface.pageAddTitle":`Add title`,"surface.pageRemoveTitle":`Remove title`,"surface.pageTitleOf":`Title of page {page}`,"surface.pageTitleRemoved":`Removed the title of page {page}`,"surface.points":`{points, plural, one {# pt} other {# pts}}`,"surface.items":`{n, plural, one {# item} other {# items}}`,"surface.blockMovedUp":`Block moved up, now block {n}`,"surface.blockMovedDown":`Block moved down, now block {n}`,"surface.blockRemoved":`Block {n} deleted`,"surface.addOption":`Add option`,"surface.addPrompt":`Add prompt`,"surface.chip.empty":`No answer`,"surface.chip.more":`+{n}`,"surface.picture.alt":`Picture: {alt}`,"surface.picture.decorative":`Picture, decorative (no alt text)`,"surface.picture.noAlt":`Picture without alt text`,"surface.picture.blocked":`(not shown: the URL policy does not allow its address)`,"surface.picture.edit":`Edit`,"surface.loading":`Loading the editor…`,"surface.failed":`The editor could not be loaded. Reload the page to try again.`,"view.visual":`Visual`,"view.source":`HTML`,"view.visualHint":`Edit the exercise as formatted text`,"view.sourceHint":`Edit the exercise as HTML`,"view.sourceLabel":`The exercise as HTML`,"view.sourceErrors":`{n, plural, one {The HTML has # error. Fix it to go back.} other {The HTML has # errors. Fix them to go back.}}`,"status.elements":`{n, plural, one {# element} other {# elements}}`,"status.errors":`{n, plural, one {# error} other {# errors}}`,"status.warnings":`{n, plural, one {# warning} other {# warnings}}`,"status.ready":`Ready to share`,"insert.layouts":`Layout`,"insert.layout.two":`Two columns`,"insert.layout.two.description":`Two columns of the same width.`,"insert.layout.three":`Three columns`,"insert.layout.three.description":`Three columns of the same width.`,"insert.layout.wide-narrow":`Wide + narrow`,"insert.layout.wide-narrow.description":`A wide column, then a narrow one.`,"insert.layout.narrow-wide":`Narrow + wide`,"insert.layout.narrow-wide.description":`A narrow column, then a wide one.`,"insert.layout.picture-text":`Picture beside text`,"insert.layout.picture-text.description":`A picture you choose, with text next to it.`,"layout.section":`Columns`,"layout.change":`Change layout`,"layout.other":`Another layout`,"layout.unwrap":`Remove layout`,"layout.delete":`Delete with content`,"layout.confirm":`Delete the layout and its content?`,"layout.confirmDelete":`Yes, delete`,"layout.cancel":`Cancel`,"toolbar.font":`Font: {value}`,"toolbar.font.name":`Font`,"toolbar.size":`Size: {value}`,"toolbar.size.name":`Size`,"toolbar.color":`Text colour`,"toolbar.highlight":`Highlight`,"toolbar.align":`Alignment`,"toolbar.align.start":`Left`,"toolbar.align.center":`Centre`,"toolbar.align.end":`Right`,"toolbar.align.justify":`Justified`,"toolbar.spacing":`Spacing`,"toolbar.spacing.line":`Line height`,"toolbar.spacing.after":`Space after`,"toolbar.spacing.none":`None`,"toolbar.spacing.small":`Small`,"toolbar.spacing.medium":`Medium`,"toolbar.spacing.large":`Large`,"toolbar.clear":`Clear formatting`,"toolbar.default":`Default`,"toolbar.myStyles":`My styles`,"toolbar.readyStyles":`Ready styles`,"style.preset.note":`Note`,"style.preset.tip":`Tip`,"style.preset.important":`Important`,"style.preset.definition":`Definition`,"style.preset.example":`Example`,"style.preset.quote":`Quote`,"style.preset.highlight":`Highlight`,"style.preset.small-print":`Small print`,"style.color.theme":`Theme colours`,"style.color.swatch":`Theme colour {n}`,"style.color.custom":`Custom colour`,"style.color.picker":`Pick a colour`,"style.color.invalid":`Write a colour as #rrggbb.`,"style.color.none":`No colour`,"style.close":`Close`,"style.form.none":`Put the cursor in what you want to style.`,"style.target.picture":`Picture style`,"style.target.figure":`Picture and caption style`,"style.target.block":`Block style`,"style.target.component":`Element style`,"style.target.column":`Column style`,"style.target.layout":`Layout style`,"style.position.inline":`In the text`,"style.position.start":`On the left`,"style.position.end":`On the right`,"style.position.center":`Centred`,"style.position.full":`Full width`,"style.rules.open":`Manage styles…`,"style.rules.title":`Styles`,"inspector.style":`Style`,"surface.picture.place":`Position and size: {position}, {width}`,"surface.picture.placeAuto":`Position and size: {position}`,"style.target.more":`{target}…`,"help.cost":`costs {percent}%`,"help.when.correct":`Correct`,"help.when.incorrect":`Wrong`,"help.when.partial":`Partly correct`,"help.when.omitted":`Skipped`,"help.costLabel":`Cost of the hint`,"help.whenLabel":`For the result`,"surface.helpRemove":`{kind, select, hint {Remove the hint} explanation {Remove the explanation} other {Remove the feedback}}`},t={"insert.title":`Wstaw`,"insert.components":`Elementy`,"insert.exercises":`Ćwiczenia`,"insert.content":`Treść`,"insert.picture":`Obrazek`,"insert.picture.description":`Obrazek z tekstem alternatywnym i podpisem do wyboru`,"insert.pageBreak":`Podział strony`,"insert.pageBreak.description":`Podziel ćwiczenie na kroki od miejsca kursora`,"insert.hint":`Podpowiedź`,"insert.hint.description":`Na prośbę ucznia: do pytania przy kursorze, a poza nim do strony`,"insert.explanation":`Wyjaśnienie`,"insert.explanation.description":`Dlaczego odpowiedź jest dobra, widoczne po sprawdzeniu`,"insert.feedback":`Informacja zwrotna`,"insert.feedback.description":`Tekst zależny od wyniku, widoczny po sprawdzeniu`,"insert.text":`Tekst`,"insert.text.description":`Akapit po tym bloku`,"insert.noMatch":`Nic nie pasuje do „{query}”.`,"toolbar.label":`Formatowanie i wstawianie`,"toolbar.style":`Styl tekstu: {style}`,"toolbar.paragraph":`Akapit`,"toolbar.heading":`Nagłówek`,"toolbar.subheading":`Podtytuł`,"toolbar.bold":`Pogrubienie`,"toolbar.italic":`Kursywa`,"toolbar.underline":`Podkreślenie`,"toolbar.link":`Link`,"toolbar.link.address":`Adres linku`,"toolbar.link.apply":`Zastosuj`,"toolbar.link.remove":`Usuń link`,"toolbar.link.blocked":`Tego adresu nie można tu użyć.`,"toolbar.bulleted":`Lista punktowana`,"toolbar.numbered":`Lista numerowana`,"toolbar.undo":`Cofnij`,"toolbar.redo":`Ponów`,"toolbar.elements":`Elementy`,"toolbar.templates":`Szablony`,"toolbar.layouts":`Układ`,"toolbar.view":`Widok`,"toolbar.search":`Szukaj`,"block.text":`Tekst`,"block.gap":`Luka`,"issue.onPage":`{n} na stronie {page}`,"picture.title":`Dodaj obrazek`,"picture.editTitle":`Edytuj obrazek`,"picture.file":`Wgraj obrazek`,"picture.library":`Wybierz z biblioteki`,"picture.urlOnly":`Ten edytor dodaje obrazki tylko po adresie: nie ma wgrywania.`,"picture.src":`Adres obrazka (URL)`,"picture.alt":`Tekst alternatywny`,"picture.altHelp":`Co przedstawia obrazek, dla uczniów, którzy go nie widzą. Nie zdradzaj odpowiedzi.`,"picture.decorative":`Ozdobny: czytniki ekranu go pomijają (alt="")`,"picture.caption":`Podpis (opcjonalny)`,"picture.cancel":`Anuluj`,"picture.insert":`Wstaw`,"picture.save":`Zapisz`,"picture.uploading":`Wgrywam…`,"picture.uploaded":`Wgrano.`,"picture.uploadFailed":`Nie udało się wgrać obrazka. Spróbuj ponownie albo podaj jego adres.`,"picture.uploadBlocked":`Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.`,"picture.picked":`Wybrano z biblioteki.`,"picture.pickFailed":`Nie udało się otworzyć biblioteki. Spróbuj ponownie albo podaj adres obrazka.`,"picture.pickBlocked":`Biblioteka zwróciła adres, na który nie pozwala polityka adresów.`,"picture.srcMissing":`Podaj adres obrazka albo go wgraj.`,"picture.srcBlocked":`Polityka adresów nie pozwala na ten adres.`,"picture.altMissing":`Opisz obrazek albo oznacz go jako ozdobny.`,"picture.altRequired":`Opisz obrazek: uczniowie, którzy go nie widzą, potrzebują tekstu alternatywnego do zadania.`,"picture.pasteRefused":`Ten edytor nie ma wgrywania, więc nie można wkleić ani upuścić pliku obrazka. Dodaj go przez Wstaw, Obrazek, podając adres.`,"field.picture.src":`Adres obrazka (URL)`,"field.regions.draw":`Przeciągnij po obrazku, aby narysować strefę, albo dodaj ją i wpisz jej liczby.`,"field.points.place":`Kliknij obrazek, aby wbić pinezkę, albo dodaj ją i wpisz jej położenie.`,"field.region":`Strefa {n}`,"field.region.add":`Dodaj strefę`,"field.region.remove":`Usuń strefę {n}`,"field.point":`Pinezka {n}`,"field.point.add":`Dodaj pinezkę`,"field.point.remove":`Usuń pinezkę {n}`,"field.shape":`Kształt`,"field.shape.rect":`Prostokąt`,"field.shape.circle":`Koło`,"field.shape.polygon":`Wielokąt`,"field.x":`Od lewej (%)`,"field.y":`Od góry (%)`,"field.width":`Szerokość (%)`,"field.height":`Wysokość (%)`,"field.cx":`Środek od lewej (%)`,"field.cy":`Środek od góry (%)`,"field.r":`Promień (% szerokości)`,"field.vertex.x":`Punkt {n} od lewej (%)`,"field.vertex.y":`Punkt {n} od góry (%)`,"field.vertex.add":`Dodaj punkt`,"field.vertex.remove":`Usuń punkt {n}`,"field.label":`Etykieta`,"field.label.optional":`Etykieta (opcjonalna)`,"field.more":`Tu widać tylko pierwsze {shown} z {count}: pozostałe edytuj w źródle.`,"inspector.title":`Właściwości`,"inspector.delete":`Usuń`,"inspector.moveUp":`Przenieś wyżej`,"inspector.moveDown":`Przenieś niżej`,"inspector.empty":`Umieść kursor w elemencie ćwiczenia, aby edytować jego odpowiedzi i ustawienia.`,"inspector.unsupported":`Elementu {tag} nie można tu edytować.`,"inspector.unset":`(nie ustawiono)`,"inspector.item":`{label} {n}`,"inspector.add":`Dodaj`,"inspector.remove":`Usuń`,"inspector.removeItem":`Usuń: {label} {n}`,"inspector.untitled":`Element {n} (pusty)`,"inspector.variant":`Wariant`,"inspector.styleTemplate":`Styl elementu`,"inspector.styleTemplate.inherit":`Jak całe ćwiczenie`,"inspector.styleTemplate.default":`Domyślny wygląd`,"inspector.document":`Ćwiczenie`,"inspector.documentStyle":`Wygląd całego ćwiczenia`,"inspector.upload":`Wgraj plik`,"inspector.uploadItem":`Wgraj plik: {label}`,"inspector.uploading":`Wgrywam…`,"inspector.uploaded":`Wgrano.`,"inspector.uploadFailed":`Nie udało się wgrać pliku. Spróbuj ponownie albo wpisz jego adres.`,"inspector.uploadBlocked":`Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.`,"issues.title":`Problemy`,"issues.errors":`{count, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}`,"issues.warnings":`{count, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}`,"issues.summary":`{errors}, {warnings}`,"issues.none":`Brak błędów i ostrzeżeń.`,"severity.error":`Błąd`,"severity.warning":`Ostrzeżenie`,"label.text":`{label}: {text}`,"preview.title":`Widok ucznia`,"preview.show":`Podgląd`,"preview.refresh":`Odśwież podgląd`,"preview.hint":`Naciśnij „Podgląd”, aby wypróbować ćwiczenie tak, jak zobaczy je uczeń.`,"preview.loading":`Przygotowuję podgląd…`,"preview.stale":`Dokument zmienił się po tym podglądzie. Odśwież go, aby zobaczyć zmiany.`,"preview.invalid":`{count, plural, one {Popraw ten błąd, aby zobaczyć podgląd:} few {Popraw te # błędy, aby zobaczyć podgląd:} many {Popraw tych # błędów, aby zobaczyć podgląd:} other {Popraw te # błędu, aby zobaczyć podgląd:}}`,"preview.failed":`Nie udało się pokazać podglądu.`,"surface.label":`Treść ćwiczenia`,"surface.pageNumber":`Strona {page} z {pages}`,"surface.pageTitle":`Tytuł strony`,"surface.pageJoin":`Połącz ze stroną {previous}`,"surface.pageAdded":`Dodano stronę {page}`,"surface.pageJoined":`Strona {page} połączona ze stroną {previous}`,"surface.pageDelete":`Usuń stronę`,"surface.pageDeleted":`Usunięto stronę {n}`,"surface.pageAddTitle":`Dodaj tytuł`,"surface.pageRemoveTitle":`Usuń tytuł`,"surface.pageTitleOf":`Tytuł strony {page}`,"surface.pageTitleRemoved":`Usunięto tytuł strony {page}`,"surface.points":`{points, plural, one {# pkt} few {# pkt} many {# pkt} other {# pkt}}`,"surface.items":`{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}`,"surface.blockMovedUp":`Blok przesunięty w górę, teraz to blok {n}`,"surface.blockMovedDown":`Blok przesunięty w dół, teraz to blok {n}`,"surface.blockRemoved":`Usunięto blok {n}`,"surface.addOption":`Dodaj odpowiedź`,"surface.addPrompt":`Dodaj polecenie`,"surface.chip.empty":`Brak odpowiedzi`,"surface.chip.more":`+{n}`,"surface.picture.alt":`Obrazek: {alt}`,"surface.picture.decorative":`Obrazek ozdobny (bez tekstu alternatywnego)`,"surface.picture.noAlt":`Obrazek bez tekstu alternatywnego`,"surface.picture.blocked":`(niepokazany: polityka adresów nie pozwala na jego adres)`,"surface.picture.edit":`Edytuj`,"surface.loading":`Wczytuję edytor…`,"surface.failed":`Nie udało się wczytać edytora. Odśwież stronę, aby spróbować ponownie.`,"view.visual":`Wizualny`,"view.source":`HTML`,"view.visualHint":`Edytuj ćwiczenie jako sformatowany tekst`,"view.sourceHint":`Edytuj ćwiczenie jako HTML`,"view.sourceLabel":`Ćwiczenie jako HTML`,"view.sourceErrors":`{n, plural, one {HTML ma # błąd. Popraw go, aby wrócić.} few {HTML ma # błędy. Popraw je, aby wrócić.} many {HTML ma # błędów. Popraw je, aby wrócić.} other {HTML ma # błędu. Popraw go, aby wrócić.}}`,"status.elements":`{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}`,"status.errors":`{n, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}`,"status.warnings":`{n, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}`,"status.ready":`Gotowe do udostępnienia`,"insert.layouts":`Układ`,"insert.layout.two":`Dwie kolumny`,"insert.layout.two.description":`Dwie kolumny tej samej szerokości.`,"insert.layout.three":`Trzy kolumny`,"insert.layout.three.description":`Trzy kolumny tej samej szerokości.`,"insert.layout.wide-narrow":`Szeroka + wąska`,"insert.layout.wide-narrow.description":`Szeroka kolumna, a po niej wąska.`,"insert.layout.narrow-wide":`Wąska + szeroka`,"insert.layout.narrow-wide.description":`Wąska kolumna, a po niej szeroka.`,"insert.layout.picture-text":`Obrazek obok tekstu`,"insert.layout.picture-text.description":`Wybrany obrazek, a obok niego tekst.`,"layout.section":`Kolumny`,"layout.change":`Zmień układ`,"layout.other":`Inny układ`,"layout.unwrap":`Usuń układ`,"layout.delete":`Usuń z zawartością`,"layout.confirm":`Usunąć układ razem z zawartością?`,"layout.confirmDelete":`Tak, usuń`,"layout.cancel":`Anuluj`,"toolbar.font":`Czcionka: {value}`,"toolbar.font.name":`Czcionka`,"toolbar.size":`Rozmiar: {value}`,"toolbar.size.name":`Rozmiar`,"toolbar.color":`Kolor tekstu`,"toolbar.highlight":`Wyróżnienie`,"toolbar.align":`Wyrównanie`,"toolbar.align.start":`Do lewej`,"toolbar.align.center":`Do środka`,"toolbar.align.end":`Do prawej`,"toolbar.align.justify":`Wyjustowane`,"toolbar.spacing":`Odstępy`,"toolbar.spacing.line":`Interlinia`,"toolbar.spacing.after":`Odstęp po`,"toolbar.spacing.none":`Brak`,"toolbar.spacing.small":`Mały`,"toolbar.spacing.medium":`Średni`,"toolbar.spacing.large":`Duży`,"toolbar.clear":`Wyczyść formatowanie`,"toolbar.default":`Domyślnie`,"toolbar.myStyles":`Moje style`,"toolbar.readyStyles":`Gotowe style`,"style.preset.note":`Uwaga`,"style.preset.tip":`Wskazówka`,"style.preset.important":`Ważne`,"style.preset.definition":`Definicja`,"style.preset.example":`Przykład`,"style.preset.quote":`Cytat`,"style.preset.highlight":`Wyróżnienie`,"style.preset.small-print":`Mały druk`,"style.color.theme":`Kolory motywu`,"style.color.swatch":`Kolor motywu {n}`,"style.color.custom":`Własny kolor`,"style.color.picker":`Wybierz kolor`,"style.color.invalid":`Wpisz kolor jako #rrggbb.`,"style.color.none":`Bez koloru`,"style.close":`Zamknij`,"style.form.none":`Ustaw kursor w tym, co chcesz ostylować.`,"style.target.picture":`Styl obrazka`,"style.target.figure":`Styl obrazka z podpisem`,"style.target.block":`Styl bloku`,"style.target.component":`Styl elementu`,"style.target.column":`Styl kolumny`,"style.target.layout":`Styl układu`,"style.position.inline":`W tekście`,"style.position.start":`Po lewej`,"style.position.end":`Po prawej`,"style.position.center":`Na środku`,"style.position.full":`Cała szerokość`,"style.rules.open":`Zarządzaj stylami…`,"style.rules.title":`Style`,"inspector.style":`Styl`,"surface.picture.place":`Położenie i rozmiar: {position}, {width}`,"surface.picture.placeAuto":`Położenie i rozmiar: {position}`,"style.target.more":`{target}…`,"help.cost":`koszt {percent}%`,"help.when.correct":`Dobrze`,"help.when.incorrect":`Źle`,"help.when.partial":`Częściowo dobrze`,"help.when.omitted":`Pominięte`,"help.costLabel":`Koszt podpowiedzi`,"help.whenLabel":`Dla wyniku`,"surface.helpRemove":`{kind, select, hint {Usuń podpowiedź} explanation {Usuń wyjaśnienie} other {Usuń informację zwrotną}}`},n=`astl.editor`,r=[{namespace:n,locale:`en`,messages:e},{namespace:n,locale:`pl`,messages:t}];export{r as n,n as t};
2
+ //# sourceMappingURL=messages-Qzse5KMX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages-Qzse5KMX.js","names":["en","pl","en_default","pl_default","EDITOR_NAMESPACE","editorMessages"],"sources":["../../../../editor/src/messages/en.json","../../../../editor/src/messages/pl.json","../../../../editor/src/messages.ts"],"sourcesContent":["{\n \"insert.title\": \"Insert\",\n \"insert.components\": \"Components\",\n \"insert.exercises\": \"Exercises\",\n \"insert.content\": \"Content\",\n \"insert.picture\": \"Picture\",\n \"insert.picture.description\": \"A picture with alt text and an optional caption\",\n \"insert.pageBreak\": \"Page break\",\n \"insert.pageBreak.description\": \"Split the exercise into steps at the cursor\",\n \"insert.hint\": \"Hint\",\n \"insert.hint.description\": \"One students ask for: for the question at the cursor, else for the page\",\n \"insert.explanation\": \"Explanation\",\n \"insert.explanation.description\": \"Why the answer is right, shown once it is checked\",\n \"insert.feedback\": \"Feedback\",\n \"insert.feedback.description\": \"A text by the verdict, shown once the answer is checked\",\n \"insert.text\": \"Text\",\n \"insert.text.description\": \"A paragraph after this block\",\n \"insert.noMatch\": \"Nothing matches “{query}”.\",\n \"toolbar.label\": \"Format and insert\",\n \"toolbar.style\": \"Text style: {style}\",\n \"toolbar.paragraph\": \"Paragraph\",\n \"toolbar.heading\": \"Heading\",\n \"toolbar.subheading\": \"Subheading\",\n \"toolbar.bold\": \"Bold\",\n \"toolbar.italic\": \"Italic\",\n \"toolbar.underline\": \"Underline\",\n \"toolbar.link\": \"Link\",\n \"toolbar.link.address\": \"Link address\",\n \"toolbar.link.apply\": \"Apply\",\n \"toolbar.link.remove\": \"Remove link\",\n \"toolbar.link.blocked\": \"This address is not allowed here.\",\n \"toolbar.bulleted\": \"Bulleted list\",\n \"toolbar.numbered\": \"Numbered list\",\n \"toolbar.undo\": \"Undo\",\n \"toolbar.redo\": \"Redo\",\n \"toolbar.elements\": \"Elements\",\n \"toolbar.templates\": \"Templates\",\n \"toolbar.layouts\": \"Layout\",\n \"toolbar.view\": \"View\",\n \"toolbar.search\": \"Search\",\n \"block.text\": \"Text\",\n \"block.gap\": \"Gap\",\n \"issue.onPage\": \"{n} on page {page}\",\n \"picture.title\": \"Add a picture\",\n \"picture.editTitle\": \"Edit the picture\",\n \"picture.file\": \"Upload a picture\",\n \"picture.library\": \"Choose from the library\",\n \"picture.urlOnly\": \"This editor adds pictures by their address only: it has no upload.\",\n \"picture.src\": \"Picture address (URL)\",\n \"picture.alt\": \"Alt text\",\n \"picture.altHelp\": \"What the picture shows, for students who cannot see it. Do not give an answer away.\",\n \"picture.decorative\": \"Decorative: screen readers skip it (alt=\\\"\\\")\",\n \"picture.caption\": \"Caption (optional)\",\n \"picture.cancel\": \"Cancel\",\n \"picture.insert\": \"Insert\",\n \"picture.save\": \"Save\",\n \"picture.uploading\": \"Uploading…\",\n \"picture.uploaded\": \"Uploaded.\",\n \"picture.uploadFailed\": \"The upload failed. Try again, or give the picture's address.\",\n \"picture.uploadBlocked\": \"The upload gave an address the URL policy does not allow.\",\n \"picture.picked\": \"Chosen from the library.\",\n \"picture.pickFailed\": \"The library did not open. Try again, or give the picture's address.\",\n \"picture.pickBlocked\": \"The library returned an address the URL policy does not allow.\",\n \"picture.srcMissing\": \"Give the picture's address, or upload it.\",\n \"picture.srcBlocked\": \"The URL policy does not allow this address.\",\n \"picture.altMissing\": \"Describe the picture, or mark it as decorative.\",\n \"picture.altRequired\": \"Describe the picture: students who cannot see it need its alt text for the task.\",\n \"picture.pasteRefused\": \"This editor has no upload, so a picture file cannot be pasted or dropped. Add it with Insert, Picture, by its address.\",\n \"field.picture.src\": \"Picture address (URL)\",\n \"field.regions.draw\": \"Drag on the picture to draw a zone, or add one and type its numbers.\",\n \"field.points.place\": \"Click the picture to place a pin, or add one and type its position.\",\n \"field.region\": \"Zone {n}\",\n \"field.region.add\": \"Add a zone\",\n \"field.region.remove\": \"Remove zone {n}\",\n \"field.point\": \"Pin {n}\",\n \"field.point.add\": \"Add a pin\",\n \"field.point.remove\": \"Remove pin {n}\",\n \"field.shape\": \"Shape\",\n \"field.shape.rect\": \"Rectangle\",\n \"field.shape.circle\": \"Circle\",\n \"field.shape.polygon\": \"Polygon\",\n \"field.x\": \"From the left (%)\",\n \"field.y\": \"From the top (%)\",\n \"field.width\": \"Width (%)\",\n \"field.height\": \"Height (%)\",\n \"field.cx\": \"Centre from the left (%)\",\n \"field.cy\": \"Centre from the top (%)\",\n \"field.r\": \"Radius (% of the width)\",\n \"field.vertex.x\": \"Point {n} from the left (%)\",\n \"field.vertex.y\": \"Point {n} from the top (%)\",\n \"field.vertex.add\": \"Add a point\",\n \"field.vertex.remove\": \"Remove point {n}\",\n \"field.label\": \"Label\",\n \"field.label.optional\": \"Label (optional)\",\n \"field.more\": \"Only the first {shown} of {count} are listed here: edit the others in the source.\",\n \"inspector.title\": \"Properties\",\n \"inspector.delete\": \"Delete\",\n \"inspector.moveUp\": \"Move up\",\n \"inspector.moveDown\": \"Move down\",\n \"inspector.empty\": \"Put the cursor in an exercise element to edit its answers and settings.\",\n \"inspector.unsupported\": \"Element {tag} cannot be edited here.\",\n \"inspector.unset\": \"(not set)\",\n \"inspector.item\": \"{label} {n}\",\n \"inspector.add\": \"Add\",\n \"inspector.remove\": \"Remove\",\n \"inspector.removeItem\": \"Remove: {label} {n}\",\n \"inspector.untitled\": \"Item {n} (empty)\",\n \"inspector.variant\": \"Variant\",\n \"inspector.styleTemplate\": \"Element style\",\n \"inspector.styleTemplate.inherit\": \"Same as the exercise\",\n \"inspector.styleTemplate.default\": \"Default look\",\n \"inspector.document\": \"Exercise\",\n \"inspector.documentStyle\": \"Look of the whole exercise\",\n \"inspector.upload\": \"Upload a file\",\n \"inspector.uploadItem\": \"Upload a file: {label}\",\n \"inspector.uploading\": \"Uploading…\",\n \"inspector.uploaded\": \"Uploaded.\",\n \"inspector.uploadFailed\": \"The upload failed. Try again, or type its address.\",\n \"inspector.uploadBlocked\": \"The upload gave an address the URL policy does not allow.\",\n \"issues.title\": \"Problems\",\n \"issues.errors\": \"{count, plural, one {# error} other {# errors}}\",\n \"issues.warnings\": \"{count, plural, one {# warning} other {# warnings}}\",\n \"issues.summary\": \"{errors}, {warnings}\",\n \"issues.none\": \"No errors or warnings.\",\n \"severity.error\": \"Error\",\n \"severity.warning\": \"Warning\",\n \"label.text\": \"{label}: {text}\",\n \"preview.title\": \"Student view\",\n \"preview.show\": \"Preview\",\n \"preview.refresh\": \"Refresh preview\",\n \"preview.hint\": \"Press Preview to try the exercise the way a student will see it.\",\n \"preview.loading\": \"Preparing the preview…\",\n \"preview.stale\": \"The document changed after this preview. Refresh it to see the changes.\",\n \"preview.invalid\": \"{count, plural, one {Fix this error to see the preview:} other {Fix these # errors to see the preview:}}\",\n \"preview.failed\": \"The preview could not be shown.\",\n \"surface.label\": \"Exercise content\",\n \"surface.pageNumber\": \"Page {page} of {pages}\",\n \"surface.pageTitle\": \"Page title\",\n \"surface.pageJoin\": \"Join with page {previous}\",\n \"surface.pageAdded\": \"Page {page} added\",\n \"surface.pageJoined\": \"Page {page} joined with page {previous}\",\n \"surface.pageDelete\": \"Delete page\",\n \"surface.pageDeleted\": \"Deleted page {n}\",\n \"surface.pageAddTitle\": \"Add title\",\n \"surface.pageRemoveTitle\": \"Remove title\",\n \"surface.pageTitleOf\": \"Title of page {page}\",\n \"surface.pageTitleRemoved\": \"Removed the title of page {page}\",\n \"surface.points\": \"{points, plural, one {# pt} other {# pts}}\",\n \"surface.items\": \"{n, plural, one {# item} other {# items}}\",\n \"surface.blockMovedUp\": \"Block moved up, now block {n}\",\n \"surface.blockMovedDown\": \"Block moved down, now block {n}\",\n \"surface.blockRemoved\": \"Block {n} deleted\",\n \"surface.addOption\": \"Add option\",\n \"surface.addPrompt\": \"Add prompt\",\n \"surface.chip.empty\": \"No answer\",\n \"surface.chip.more\": \"+{n}\",\n \"surface.picture.alt\": \"Picture: {alt}\",\n \"surface.picture.decorative\": \"Picture, decorative (no alt text)\",\n \"surface.picture.noAlt\": \"Picture without alt text\",\n \"surface.picture.blocked\": \"(not shown: the URL policy does not allow its address)\",\n \"surface.picture.edit\": \"Edit\",\n \"surface.loading\": \"Loading the editor…\",\n \"surface.failed\": \"The editor could not be loaded. Reload the page to try again.\",\n \"view.visual\": \"Visual\",\n \"view.source\": \"HTML\",\n \"view.visualHint\": \"Edit the exercise as formatted text\",\n \"view.sourceHint\": \"Edit the exercise as HTML\",\n \"view.sourceLabel\": \"The exercise as HTML\",\n \"view.sourceErrors\": \"{n, plural, one {The HTML has # error. Fix it to go back.} other {The HTML has # errors. Fix them to go back.}}\",\n \"status.elements\": \"{n, plural, one {# element} other {# elements}}\",\n \"status.errors\": \"{n, plural, one {# error} other {# errors}}\",\n \"status.warnings\": \"{n, plural, one {# warning} other {# warnings}}\",\n \"status.ready\": \"Ready to share\",\n \"insert.layouts\": \"Layout\",\n \"insert.layout.two\": \"Two columns\",\n \"insert.layout.two.description\": \"Two columns of the same width.\",\n \"insert.layout.three\": \"Three columns\",\n \"insert.layout.three.description\": \"Three columns of the same width.\",\n \"insert.layout.wide-narrow\": \"Wide + narrow\",\n \"insert.layout.wide-narrow.description\": \"A wide column, then a narrow one.\",\n \"insert.layout.narrow-wide\": \"Narrow + wide\",\n \"insert.layout.narrow-wide.description\": \"A narrow column, then a wide one.\",\n \"insert.layout.picture-text\": \"Picture beside text\",\n \"insert.layout.picture-text.description\": \"A picture you choose, with text next to it.\",\n \"layout.section\": \"Columns\",\n \"layout.change\": \"Change layout\",\n \"layout.other\": \"Another layout\",\n \"layout.unwrap\": \"Remove layout\",\n \"layout.delete\": \"Delete with content\",\n \"layout.confirm\": \"Delete the layout and its content?\",\n \"layout.confirmDelete\": \"Yes, delete\",\n \"layout.cancel\": \"Cancel\",\n \"toolbar.font\": \"Font: {value}\",\n \"toolbar.font.name\": \"Font\",\n \"toolbar.size\": \"Size: {value}\",\n \"toolbar.size.name\": \"Size\",\n \"toolbar.color\": \"Text colour\",\n \"toolbar.highlight\": \"Highlight\",\n \"toolbar.align\": \"Alignment\",\n \"toolbar.align.start\": \"Left\",\n \"toolbar.align.center\": \"Centre\",\n \"toolbar.align.end\": \"Right\",\n \"toolbar.align.justify\": \"Justified\",\n \"toolbar.spacing\": \"Spacing\",\n \"toolbar.spacing.line\": \"Line height\",\n \"toolbar.spacing.after\": \"Space after\",\n \"toolbar.spacing.none\": \"None\",\n \"toolbar.spacing.small\": \"Small\",\n \"toolbar.spacing.medium\": \"Medium\",\n \"toolbar.spacing.large\": \"Large\",\n \"toolbar.clear\": \"Clear formatting\",\n \"toolbar.default\": \"Default\",\n \"toolbar.myStyles\": \"My styles\",\n \"toolbar.readyStyles\": \"Ready styles\",\n \"style.preset.note\": \"Note\",\n \"style.preset.tip\": \"Tip\",\n \"style.preset.important\": \"Important\",\n \"style.preset.definition\": \"Definition\",\n \"style.preset.example\": \"Example\",\n \"style.preset.quote\": \"Quote\",\n \"style.preset.highlight\": \"Highlight\",\n \"style.preset.small-print\": \"Small print\",\n \"style.color.theme\": \"Theme colours\",\n \"style.color.swatch\": \"Theme colour {n}\",\n \"style.color.custom\": \"Custom colour\",\n \"style.color.picker\": \"Pick a colour\",\n \"style.color.invalid\": \"Write a colour as #rrggbb.\",\n \"style.color.none\": \"No colour\",\n \"style.close\": \"Close\",\n \"style.form.none\": \"Put the cursor in what you want to style.\",\n \"style.target.picture\": \"Picture style\",\n \"style.target.figure\": \"Picture and caption style\",\n \"style.target.block\": \"Block style\",\n \"style.target.component\": \"Element style\",\n \"style.target.column\": \"Column style\",\n \"style.target.layout\": \"Layout style\",\n \"style.position.inline\": \"In the text\",\n \"style.position.start\": \"On the left\",\n \"style.position.end\": \"On the right\",\n \"style.position.center\": \"Centred\",\n \"style.position.full\": \"Full width\",\n \"style.rules.open\": \"Manage styles…\",\n \"style.rules.title\": \"Styles\",\n \"inspector.style\": \"Style\",\n \"surface.picture.place\": \"Position and size: {position}, {width}\",\n \"surface.picture.placeAuto\": \"Position and size: {position}\",\n \"style.target.more\": \"{target}…\",\n \"help.cost\": \"costs {percent}%\",\n \"help.when.correct\": \"Correct\",\n \"help.when.incorrect\": \"Wrong\",\n \"help.when.partial\": \"Partly correct\",\n \"help.when.omitted\": \"Skipped\",\n \"help.costLabel\": \"Cost of the hint\",\n \"help.whenLabel\": \"For the result\",\n \"surface.helpRemove\": \"{kind, select, hint {Remove the hint} explanation {Remove the explanation} other {Remove the feedback}}\"\n}\n","{\n \"insert.title\": \"Wstaw\",\n \"insert.components\": \"Elementy\",\n \"insert.exercises\": \"Ćwiczenia\",\n \"insert.content\": \"Treść\",\n \"insert.picture\": \"Obrazek\",\n \"insert.picture.description\": \"Obrazek z tekstem alternatywnym i podpisem do wyboru\",\n \"insert.pageBreak\": \"Podział strony\",\n \"insert.pageBreak.description\": \"Podziel ćwiczenie na kroki od miejsca kursora\",\n \"insert.hint\": \"Podpowiedź\",\n \"insert.hint.description\": \"Na prośbę ucznia: do pytania przy kursorze, a poza nim do strony\",\n \"insert.explanation\": \"Wyjaśnienie\",\n \"insert.explanation.description\": \"Dlaczego odpowiedź jest dobra, widoczne po sprawdzeniu\",\n \"insert.feedback\": \"Informacja zwrotna\",\n \"insert.feedback.description\": \"Tekst zależny od wyniku, widoczny po sprawdzeniu\",\n \"insert.text\": \"Tekst\",\n \"insert.text.description\": \"Akapit po tym bloku\",\n \"insert.noMatch\": \"Nic nie pasuje do „{query}”.\",\n \"toolbar.label\": \"Formatowanie i wstawianie\",\n \"toolbar.style\": \"Styl tekstu: {style}\",\n \"toolbar.paragraph\": \"Akapit\",\n \"toolbar.heading\": \"Nagłówek\",\n \"toolbar.subheading\": \"Podtytuł\",\n \"toolbar.bold\": \"Pogrubienie\",\n \"toolbar.italic\": \"Kursywa\",\n \"toolbar.underline\": \"Podkreślenie\",\n \"toolbar.link\": \"Link\",\n \"toolbar.link.address\": \"Adres linku\",\n \"toolbar.link.apply\": \"Zastosuj\",\n \"toolbar.link.remove\": \"Usuń link\",\n \"toolbar.link.blocked\": \"Tego adresu nie można tu użyć.\",\n \"toolbar.bulleted\": \"Lista punktowana\",\n \"toolbar.numbered\": \"Lista numerowana\",\n \"toolbar.undo\": \"Cofnij\",\n \"toolbar.redo\": \"Ponów\",\n \"toolbar.elements\": \"Elementy\",\n \"toolbar.templates\": \"Szablony\",\n \"toolbar.layouts\": \"Układ\",\n \"toolbar.view\": \"Widok\",\n \"toolbar.search\": \"Szukaj\",\n \"block.text\": \"Tekst\",\n \"block.gap\": \"Luka\",\n \"issue.onPage\": \"{n} na stronie {page}\",\n \"picture.title\": \"Dodaj obrazek\",\n \"picture.editTitle\": \"Edytuj obrazek\",\n \"picture.file\": \"Wgraj obrazek\",\n \"picture.library\": \"Wybierz z biblioteki\",\n \"picture.urlOnly\": \"Ten edytor dodaje obrazki tylko po adresie: nie ma wgrywania.\",\n \"picture.src\": \"Adres obrazka (URL)\",\n \"picture.alt\": \"Tekst alternatywny\",\n \"picture.altHelp\": \"Co przedstawia obrazek, dla uczniów, którzy go nie widzą. Nie zdradzaj odpowiedzi.\",\n \"picture.decorative\": \"Ozdobny: czytniki ekranu go pomijają (alt=\\\"\\\")\",\n \"picture.caption\": \"Podpis (opcjonalny)\",\n \"picture.cancel\": \"Anuluj\",\n \"picture.insert\": \"Wstaw\",\n \"picture.save\": \"Zapisz\",\n \"picture.uploading\": \"Wgrywam…\",\n \"picture.uploaded\": \"Wgrano.\",\n \"picture.uploadFailed\": \"Nie udało się wgrać obrazka. Spróbuj ponownie albo podaj jego adres.\",\n \"picture.uploadBlocked\": \"Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.\",\n \"picture.picked\": \"Wybrano z biblioteki.\",\n \"picture.pickFailed\": \"Nie udało się otworzyć biblioteki. Spróbuj ponownie albo podaj adres obrazka.\",\n \"picture.pickBlocked\": \"Biblioteka zwróciła adres, na który nie pozwala polityka adresów.\",\n \"picture.srcMissing\": \"Podaj adres obrazka albo go wgraj.\",\n \"picture.srcBlocked\": \"Polityka adresów nie pozwala na ten adres.\",\n \"picture.altMissing\": \"Opisz obrazek albo oznacz go jako ozdobny.\",\n \"picture.altRequired\": \"Opisz obrazek: uczniowie, którzy go nie widzą, potrzebują tekstu alternatywnego do zadania.\",\n \"picture.pasteRefused\": \"Ten edytor nie ma wgrywania, więc nie można wkleić ani upuścić pliku obrazka. Dodaj go przez Wstaw, Obrazek, podając adres.\",\n \"field.picture.src\": \"Adres obrazka (URL)\",\n \"field.regions.draw\": \"Przeciągnij po obrazku, aby narysować strefę, albo dodaj ją i wpisz jej liczby.\",\n \"field.points.place\": \"Kliknij obrazek, aby wbić pinezkę, albo dodaj ją i wpisz jej położenie.\",\n \"field.region\": \"Strefa {n}\",\n \"field.region.add\": \"Dodaj strefę\",\n \"field.region.remove\": \"Usuń strefę {n}\",\n \"field.point\": \"Pinezka {n}\",\n \"field.point.add\": \"Dodaj pinezkę\",\n \"field.point.remove\": \"Usuń pinezkę {n}\",\n \"field.shape\": \"Kształt\",\n \"field.shape.rect\": \"Prostokąt\",\n \"field.shape.circle\": \"Koło\",\n \"field.shape.polygon\": \"Wielokąt\",\n \"field.x\": \"Od lewej (%)\",\n \"field.y\": \"Od góry (%)\",\n \"field.width\": \"Szerokość (%)\",\n \"field.height\": \"Wysokość (%)\",\n \"field.cx\": \"Środek od lewej (%)\",\n \"field.cy\": \"Środek od góry (%)\",\n \"field.r\": \"Promień (% szerokości)\",\n \"field.vertex.x\": \"Punkt {n} od lewej (%)\",\n \"field.vertex.y\": \"Punkt {n} od góry (%)\",\n \"field.vertex.add\": \"Dodaj punkt\",\n \"field.vertex.remove\": \"Usuń punkt {n}\",\n \"field.label\": \"Etykieta\",\n \"field.label.optional\": \"Etykieta (opcjonalna)\",\n \"field.more\": \"Tu widać tylko pierwsze {shown} z {count}: pozostałe edytuj w źródle.\",\n \"inspector.title\": \"Właściwości\",\n \"inspector.delete\": \"Usuń\",\n \"inspector.moveUp\": \"Przenieś wyżej\",\n \"inspector.moveDown\": \"Przenieś niżej\",\n \"inspector.empty\": \"Umieść kursor w elemencie ćwiczenia, aby edytować jego odpowiedzi i ustawienia.\",\n \"inspector.unsupported\": \"Elementu {tag} nie można tu edytować.\",\n \"inspector.unset\": \"(nie ustawiono)\",\n \"inspector.item\": \"{label} {n}\",\n \"inspector.add\": \"Dodaj\",\n \"inspector.remove\": \"Usuń\",\n \"inspector.removeItem\": \"Usuń: {label} {n}\",\n \"inspector.untitled\": \"Element {n} (pusty)\",\n \"inspector.variant\": \"Wariant\",\n \"inspector.styleTemplate\": \"Styl elementu\",\n \"inspector.styleTemplate.inherit\": \"Jak całe ćwiczenie\",\n \"inspector.styleTemplate.default\": \"Domyślny wygląd\",\n \"inspector.document\": \"Ćwiczenie\",\n \"inspector.documentStyle\": \"Wygląd całego ćwiczenia\",\n \"inspector.upload\": \"Wgraj plik\",\n \"inspector.uploadItem\": \"Wgraj plik: {label}\",\n \"inspector.uploading\": \"Wgrywam…\",\n \"inspector.uploaded\": \"Wgrano.\",\n \"inspector.uploadFailed\": \"Nie udało się wgrać pliku. Spróbuj ponownie albo wpisz jego adres.\",\n \"inspector.uploadBlocked\": \"Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.\",\n \"issues.title\": \"Problemy\",\n \"issues.errors\": \"{count, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}\",\n \"issues.warnings\": \"{count, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}\",\n \"issues.summary\": \"{errors}, {warnings}\",\n \"issues.none\": \"Brak błędów i ostrzeżeń.\",\n \"severity.error\": \"Błąd\",\n \"severity.warning\": \"Ostrzeżenie\",\n \"label.text\": \"{label}: {text}\",\n \"preview.title\": \"Widok ucznia\",\n \"preview.show\": \"Podgląd\",\n \"preview.refresh\": \"Odśwież podgląd\",\n \"preview.hint\": \"Naciśnij „Podgląd”, aby wypróbować ćwiczenie tak, jak zobaczy je uczeń.\",\n \"preview.loading\": \"Przygotowuję podgląd…\",\n \"preview.stale\": \"Dokument zmienił się po tym podglądzie. Odśwież go, aby zobaczyć zmiany.\",\n \"preview.invalid\": \"{count, plural, one {Popraw ten błąd, aby zobaczyć podgląd:} few {Popraw te # błędy, aby zobaczyć podgląd:} many {Popraw tych # błędów, aby zobaczyć podgląd:} other {Popraw te # błędu, aby zobaczyć podgląd:}}\",\n \"preview.failed\": \"Nie udało się pokazać podglądu.\",\n \"surface.label\": \"Treść ćwiczenia\",\n \"surface.pageNumber\": \"Strona {page} z {pages}\",\n \"surface.pageTitle\": \"Tytuł strony\",\n \"surface.pageJoin\": \"Połącz ze stroną {previous}\",\n \"surface.pageAdded\": \"Dodano stronę {page}\",\n \"surface.pageJoined\": \"Strona {page} połączona ze stroną {previous}\",\n \"surface.pageDelete\": \"Usuń stronę\",\n \"surface.pageDeleted\": \"Usunięto stronę {n}\",\n \"surface.pageAddTitle\": \"Dodaj tytuł\",\n \"surface.pageRemoveTitle\": \"Usuń tytuł\",\n \"surface.pageTitleOf\": \"Tytuł strony {page}\",\n \"surface.pageTitleRemoved\": \"Usunięto tytuł strony {page}\",\n \"surface.points\": \"{points, plural, one {# pkt} few {# pkt} many {# pkt} other {# pkt}}\",\n \"surface.items\": \"{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}\",\n \"surface.blockMovedUp\": \"Blok przesunięty w górę, teraz to blok {n}\",\n \"surface.blockMovedDown\": \"Blok przesunięty w dół, teraz to blok {n}\",\n \"surface.blockRemoved\": \"Usunięto blok {n}\",\n \"surface.addOption\": \"Dodaj odpowiedź\",\n \"surface.addPrompt\": \"Dodaj polecenie\",\n \"surface.chip.empty\": \"Brak odpowiedzi\",\n \"surface.chip.more\": \"+{n}\",\n \"surface.picture.alt\": \"Obrazek: {alt}\",\n \"surface.picture.decorative\": \"Obrazek ozdobny (bez tekstu alternatywnego)\",\n \"surface.picture.noAlt\": \"Obrazek bez tekstu alternatywnego\",\n \"surface.picture.blocked\": \"(niepokazany: polityka adresów nie pozwala na jego adres)\",\n \"surface.picture.edit\": \"Edytuj\",\n \"surface.loading\": \"Wczytuję edytor…\",\n \"surface.failed\": \"Nie udało się wczytać edytora. Odśwież stronę, aby spróbować ponownie.\",\n \"view.visual\": \"Wizualny\",\n \"view.source\": \"HTML\",\n \"view.visualHint\": \"Edytuj ćwiczenie jako sformatowany tekst\",\n \"view.sourceHint\": \"Edytuj ćwiczenie jako HTML\",\n \"view.sourceLabel\": \"Ćwiczenie jako HTML\",\n \"view.sourceErrors\": \"{n, plural, one {HTML ma # błąd. Popraw go, aby wrócić.} few {HTML ma # błędy. Popraw je, aby wrócić.} many {HTML ma # błędów. Popraw je, aby wrócić.} other {HTML ma # błędu. Popraw go, aby wrócić.}}\",\n \"status.elements\": \"{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}\",\n \"status.errors\": \"{n, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}\",\n \"status.warnings\": \"{n, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}\",\n \"status.ready\": \"Gotowe do udostępnienia\",\n \"insert.layouts\": \"Układ\",\n \"insert.layout.two\": \"Dwie kolumny\",\n \"insert.layout.two.description\": \"Dwie kolumny tej samej szerokości.\",\n \"insert.layout.three\": \"Trzy kolumny\",\n \"insert.layout.three.description\": \"Trzy kolumny tej samej szerokości.\",\n \"insert.layout.wide-narrow\": \"Szeroka + wąska\",\n \"insert.layout.wide-narrow.description\": \"Szeroka kolumna, a po niej wąska.\",\n \"insert.layout.narrow-wide\": \"Wąska + szeroka\",\n \"insert.layout.narrow-wide.description\": \"Wąska kolumna, a po niej szeroka.\",\n \"insert.layout.picture-text\": \"Obrazek obok tekstu\",\n \"insert.layout.picture-text.description\": \"Wybrany obrazek, a obok niego tekst.\",\n \"layout.section\": \"Kolumny\",\n \"layout.change\": \"Zmień układ\",\n \"layout.other\": \"Inny układ\",\n \"layout.unwrap\": \"Usuń układ\",\n \"layout.delete\": \"Usuń z zawartością\",\n \"layout.confirm\": \"Usunąć układ razem z zawartością?\",\n \"layout.confirmDelete\": \"Tak, usuń\",\n \"layout.cancel\": \"Anuluj\",\n \"toolbar.font\": \"Czcionka: {value}\",\n \"toolbar.font.name\": \"Czcionka\",\n \"toolbar.size\": \"Rozmiar: {value}\",\n \"toolbar.size.name\": \"Rozmiar\",\n \"toolbar.color\": \"Kolor tekstu\",\n \"toolbar.highlight\": \"Wyróżnienie\",\n \"toolbar.align\": \"Wyrównanie\",\n \"toolbar.align.start\": \"Do lewej\",\n \"toolbar.align.center\": \"Do środka\",\n \"toolbar.align.end\": \"Do prawej\",\n \"toolbar.align.justify\": \"Wyjustowane\",\n \"toolbar.spacing\": \"Odstępy\",\n \"toolbar.spacing.line\": \"Interlinia\",\n \"toolbar.spacing.after\": \"Odstęp po\",\n \"toolbar.spacing.none\": \"Brak\",\n \"toolbar.spacing.small\": \"Mały\",\n \"toolbar.spacing.medium\": \"Średni\",\n \"toolbar.spacing.large\": \"Duży\",\n \"toolbar.clear\": \"Wyczyść formatowanie\",\n \"toolbar.default\": \"Domyślnie\",\n \"toolbar.myStyles\": \"Moje style\",\n \"toolbar.readyStyles\": \"Gotowe style\",\n \"style.preset.note\": \"Uwaga\",\n \"style.preset.tip\": \"Wskazówka\",\n \"style.preset.important\": \"Ważne\",\n \"style.preset.definition\": \"Definicja\",\n \"style.preset.example\": \"Przykład\",\n \"style.preset.quote\": \"Cytat\",\n \"style.preset.highlight\": \"Wyróżnienie\",\n \"style.preset.small-print\": \"Mały druk\",\n \"style.color.theme\": \"Kolory motywu\",\n \"style.color.swatch\": \"Kolor motywu {n}\",\n \"style.color.custom\": \"Własny kolor\",\n \"style.color.picker\": \"Wybierz kolor\",\n \"style.color.invalid\": \"Wpisz kolor jako #rrggbb.\",\n \"style.color.none\": \"Bez koloru\",\n \"style.close\": \"Zamknij\",\n \"style.form.none\": \"Ustaw kursor w tym, co chcesz ostylować.\",\n \"style.target.picture\": \"Styl obrazka\",\n \"style.target.figure\": \"Styl obrazka z podpisem\",\n \"style.target.block\": \"Styl bloku\",\n \"style.target.component\": \"Styl elementu\",\n \"style.target.column\": \"Styl kolumny\",\n \"style.target.layout\": \"Styl układu\",\n \"style.position.inline\": \"W tekście\",\n \"style.position.start\": \"Po lewej\",\n \"style.position.end\": \"Po prawej\",\n \"style.position.center\": \"Na środku\",\n \"style.position.full\": \"Cała szerokość\",\n \"style.rules.open\": \"Zarządzaj stylami…\",\n \"style.rules.title\": \"Style\",\n \"inspector.style\": \"Styl\",\n \"surface.picture.place\": \"Położenie i rozmiar: {position}, {width}\",\n \"surface.picture.placeAuto\": \"Położenie i rozmiar: {position}\",\n \"style.target.more\": \"{target}…\",\n \"help.cost\": \"koszt {percent}%\",\n \"help.when.correct\": \"Dobrze\",\n \"help.when.incorrect\": \"Źle\",\n \"help.when.partial\": \"Częściowo dobrze\",\n \"help.when.omitted\": \"Pominięte\",\n \"help.costLabel\": \"Koszt podpowiedzi\",\n \"help.whenLabel\": \"Dla wyniku\",\n \"surface.helpRemove\": \"{kind, select, hint {Usuń podpowiedź} explanation {Usuń wyjaśnienie} other {Usuń informację zwrotną}}\"\n}\n","import type { MessageCatalog } from '@astl/core';\nimport en from './messages/en.json' with { type: 'json' };\nimport pl from './messages/pl.json' with { type: 'json' };\n\n/** i18n namespace of the authoring kit's own UI (insert menu, inspector, issues, preview). */\nexport const EDITOR_NAMESPACE = 'astl.editor';\n\nexport const editorMessages: readonly MessageCatalog[] = [\n { namespace: EDITOR_NAMESPACE, locale: 'en', messages: en },\n { namespace: EDITOR_NAMESPACE, locale: 'pl', messages: pl },\n];\n"],"mappings":"A,8wsBEKaI,EAAmB,cAEnBC,EAA4C,CACvD,CAAE,UAAWD,EAAkB,OAAQ,KAAM,SAAUJ,CAAG,EAC1D,CAAE,UAAWI,EAAkB,OAAQ,KAAM,SAAUH,CAAG,CAC5D,E"}
@@ -1,4 +1,4 @@
1
- import{H as e,U as t}from"./definitions-CNX90WtL.js";import{Bt as n,C as r,E as i,Pt as a,Tt as o,Vt as s,dn as c,fn as l,jt as u}from"./runtime-DxAbpr3S.js";import{n as d,r as f}from"./issue-list-BgnXzXRM.js";var p=new Set([o,u,n,s,`ul`,`ol`,`blockquote`]),m=` `,h=/^[\t\n\f\r ]*$/;function g(n){let r;try{r=e(n)}catch{return n}return r.some(_)?t(r):v(r,0)??t(r)}var _=e=>l(e)&&(e.tag===`plaintext`||e.children.some(_));function v(e,t){return e.some(e=>e.type===`text`&&!h.test(e.value))?null:e.filter(e=>l(e)).map(e=>m.repeat(t)+y(e,t)).join(`
1
+ import{H as e,U as t}from"./definitions-CNX90WtL.js";import{Bt as n,C as r,E as i,Pt as a,Tt as o,Vt as s,dn as c,fn as l,jt as u}from"./runtime-DxAbpr3S.js";import{n as d,r as f}from"./issue-list-CQKAW39i.js";var p=new Set([o,u,n,s,`ul`,`ol`,`blockquote`]),m=` `,h=/^[\t\n\f\r ]*$/;function g(n){let r;try{r=e(n)}catch{return n}return r.some(_)?t(r):v(r,0)??t(r)}var _=e=>l(e)&&(e.tag===`plaintext`||e.children.some(_));function v(e,t){return e.some(e=>e.type===`text`&&!h.test(e.value))?null:e.filter(e=>l(e)).map(e=>m.repeat(t)+y(e,t)).join(`
2
2
  `)}function y(e,n){let r=p.has(e.tag)&&e.children.some(e=>l(e))?v(e.children,n+1):null;if(r===null)return t([e]);let i=t([c(e.tag,e.attrs)]),a=`</${e.tag}>`;return`${i.slice(0,-a.length)}\n${r}\n${m.repeat(n)}${a}`}var b=i`
3
3
  .source {
4
4
  display: grid;
@@ -26,4 +26,4 @@ outline-offset: var(--astl-focus-offset);
26
26
  @input=${e=>o(e.target.value)}></textarea>
27
27
  ${f(i,t,null,n)}
28
28
  </div>`}export{g as formatHtml,S as renderSource};
29
- //# sourceMappingURL=source-view-DXKPFCl9.js.map
29
+ //# sourceMappingURL=source-view-BlJ2mRns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"source-view-DXKPFCl9.js","names":["parseHtml","serializeHtml","COLUMNS_TAG","b","directionOf","DOC_TAG","COLUMN_TAG","element","isElement","PAGE_TAG","issueStyles","renderIssues","LAID_OUT","INDENT","WHITE_SPACE","formatHtml","nodes","source","endsInput","laidOut","node","depth","formatElement","inner","child","empty","end","sourceStyles","adopt","root","sheets","missing","sheet","renderSource","lang","authoring","text","errors","onInput","event"],"sources":["../../../../editor-tiptap/src/source-view.ts"],"sourcesContent":["/**\n * The source view of `<astl-editor>` (`part=\"source\"`): the document's HTML (content format 1) laid out for reading\n * (`formatHtml`) in a monospace text area, and under it the errors that keep the editor in this view. A module of its\n * own, imported when the view first opens, so the editor's first load goes without it.\n */\nimport {\n COLUMN_TAG,\n COLUMNS_TAG,\n DOC_TAG,\n directionOf,\n type ElementNode,\n element,\n type Node as HtmlNode,\n type Issue,\n isElement,\n PAGE_TAG,\n} from '@astl/core';\nimport { type Authoring, issueStyles, renderIssues } from '@astl/editor';\nimport { parseHtml, serializeHtml } from '@astl/engine';\nimport { css, html, type TemplateResult } from 'lit';\n\n/** Where formatHtml puts each child element on a line of its own: elements that hold blocks, not text. */\nconst LAID_OUT: ReadonlySet<string> = new Set([\n DOC_TAG,\n PAGE_TAG,\n COLUMNS_TAG,\n COLUMN_TAG,\n 'ul',\n 'ol',\n 'blockquote',\n]);\n\nconst INDENT = ' ';\n\n/** HTML inter-element white space (ASCII only, as in the HTML standard). */\nconst WHITE_SPACE = /^[\\t\\n\\f\\r ]*$/;\n\n/**\n * A source laid out for reading. In the document, a page, a layout, a column, a list and a quote (and at the top)\n * that hold elements and only inter-element white space, each child element goes on a line of its own, indented two\n * spaces per level, and the end tag on its own line: white space there means nothing to Astrolabe, to the editor or\n * to a browser. Everything else (paragraphs, headings, list items, figures, rules, components) is written as\n * `serializeHtml` writes it, on one line, so no white space is added where it would count: a component keeps its\n * children as data, text included.\n *\n * Dropping the added white space gives the same tree back, and formatting twice gives the same text. A source the\n * parser refuses comes back as it is.\n */\nexport function formatHtml(source: string): string {\n let nodes: HtmlNode[];\n try {\n nodes = parseHtml(source);\n } catch {\n return source;\n }\n // `<plaintext>` takes the rest of the input as its text: no line may follow it.\n return nodes.some(endsInput) ? serializeHtml(nodes) : (laidOut(nodes, 0) ?? serializeHtml(nodes));\n}\n\nconst endsInput = (node: HtmlNode): boolean =>\n isElement(node) && (node.tag === 'plaintext' || node.children.some(endsInput));\n\n/** Each element of `nodes` on a line of its own, `depth` levels in; null when they hold text. */\nfunction laidOut(nodes: readonly HtmlNode[], depth: number): string | null {\n if (nodes.some((node) => node.type === 'text' && !WHITE_SPACE.test(node.value))) return null;\n return nodes\n .filter((node): node is ElementNode => isElement(node))\n .map((node) => INDENT.repeat(depth) + formatElement(node, depth))\n .join('\\n');\n}\n\nfunction formatElement(node: ElementNode, depth: number): string {\n const inner =\n LAID_OUT.has(node.tag) && node.children.some((child) => isElement(child))\n ? laidOut(node.children, depth + 1)\n : null;\n if (inner === null) return serializeHtml([node]);\n // The start tag as serializeHtml writes it: the element emptied, without its end tag.\n const empty = serializeHtml([element(node.tag, node.attrs)]);\n const end = `</${node.tag}>`;\n return `${empty.slice(0, -end.length)}\\n${inner}\\n${INDENT.repeat(depth)}${end}`;\n}\n\n// The text area grows with the laid-out source where the browser sizes fields by their content (`field-sizing`),\n// so the page scrolls rather than a box in it; elsewhere it keeps its height and scrolls.\nconst sourceStyles = css`\n .source {\n display: grid;\n gap: var(--astl-space-2);\n }\n .source textarea {\n box-sizing: border-box;\n inline-size: 100%;\n min-block-size: 24rem;\n field-sizing: content;\n padding: var(--astl-space-3);\n border: var(--astl-outline-width) solid var(--astl-outline);\n border-radius: var(--astl-radius-l);\n background: var(--astl-surface);\n color: var(--astl-ink);\n font: var(--astl-size-small) / 1.5 var(--astl-font-mono);\n }\n .source textarea:focus-visible {\n outline: var(--astl-focus-width) solid var(--astl-focus);\n outline-offset: var(--astl-focus-offset);\n }\n`;\n\n/** Adopts the view's stylesheets into the shadow root holding `node`, once. */\nfunction adopt(node: Node): void {\n const root = node.getRootNode() as Partial<DocumentOrShadowRoot>;\n const sheets = [issueStyles.styleSheet, sourceStyles.styleSheet];\n if (root.adoptedStyleSheets === undefined || sheets.includes(undefined)) return;\n const missing = sheets.filter((sheet) => sheet !== undefined && !root.adoptedStyleSheets?.includes(sheet));\n if (missing.length > 0)\n root.adoptedStyleSheets = [...root.adoptedStyleSheets, ...(missing as CSSStyleSheet[])];\n}\n\n/**\n * The view for `text` (what the author is editing) with `errors` listed under it (sentences of `describe`, nothing\n * focusable); `onInput` gets each edit.\n */\nexport function renderSource(\n root: Node,\n authoring: Authoring,\n text: string,\n errors: readonly Issue[],\n onInput: (text: string) => void,\n): TemplateResult {\n adopt(root);\n const lang = authoring.locale;\n return html`<div class=\"source\" part=\"source\" lang=${lang} dir=${directionOf(lang)}>\n <label for=\"source\">${authoring.t('astl.editor', 'view.sourceLabel')}</label>\n <textarea id=\"source\" dir=\"ltr\" spellcheck=\"false\" .value=${text} aria-invalid=${errors.length > 0}\n @input=${(event: Event) => onInput((event.target as HTMLTextAreaElement).value)}></textarea>\n ${renderIssues(errors, authoring, null, text)}\n </div>`;\n}\n"],"mappings":"A,kNAsBA,IAAMY,EAAgC,IAAI,IAAI,CAC5CP,EACAI,EACAP,EACAI,EACA,KACA,KACA,YACF,CAAC,EAEKO,EAAS,KAGTC,EAAc,iBAapB,SAAgBC,EAAW,EAAwB,CACjD,IAAIC,EACJ,GAAI,CACF,EAAQhB,EAAUiB,CAAM,CAC1B,MAAQ,CACN,OAAOA,CACT,CAEA,OAAOD,EAAM,KAAKE,CAAS,EAAIjB,EAAce,CAAK,EAAKG,EAAQH,EAAO,CAAC,GAAKf,EAAce,CAAK,CACjG,CAEA,IAAME,EAAa,GACjBV,EAAUY,CAAI,IAAMA,EAAK,MAAQ,aAAeA,EAAK,SAAS,KAAKF,CAAS,GAG9E,SAASC,EAAQ,EAA4B,EAA8B,CAEzE,OADIH,EAAM,KAAM,GAASI,EAAK,OAAS,QAAU,CAACN,EAAY,KAAKM,EAAK,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E,cAAe,kBAAkB,EAAE;gEACTC,EAAK,gBAAgBC,EAAO,OAAS,EAAE;eACvF,GAAiBC,EAASC,EAAM,OAA+B,KAAK,EAAE;MAChF5B,EAAa0B,EAAQF,EAAW,KAAMC,CAAI,EAAE;SAElD,C"}
1
+ {"version":3,"file":"source-view-BlJ2mRns.js","names":["parseHtml","serializeHtml","COLUMNS_TAG","b","directionOf","DOC_TAG","COLUMN_TAG","element","isElement","PAGE_TAG","issueStyles","renderIssues","LAID_OUT","INDENT","WHITE_SPACE","formatHtml","nodes","source","endsInput","laidOut","node","depth","formatElement","inner","child","empty","end","sourceStyles","adopt","root","sheets","missing","sheet","renderSource","lang","authoring","text","errors","onInput","event"],"sources":["../../../../editor-tiptap/src/source-view.ts"],"sourcesContent":["/**\n * The source view of `<astl-editor>` (`part=\"source\"`): the document's HTML (content format 1) laid out for reading\n * (`formatHtml`) in a monospace text area, and under it the errors that keep the editor in this view. A module of its\n * own, imported when the view first opens, so the editor's first load goes without it.\n */\nimport {\n COLUMN_TAG,\n COLUMNS_TAG,\n DOC_TAG,\n directionOf,\n type ElementNode,\n element,\n type Node as HtmlNode,\n type Issue,\n isElement,\n PAGE_TAG,\n} from '@astl/core';\nimport { type Authoring, issueStyles, renderIssues } from '@astl/editor';\nimport { parseHtml, serializeHtml } from '@astl/engine';\nimport { css, html, type TemplateResult } from 'lit';\n\n/** Where formatHtml puts each child element on a line of its own: elements that hold blocks, not text. */\nconst LAID_OUT: ReadonlySet<string> = new Set([\n DOC_TAG,\n PAGE_TAG,\n COLUMNS_TAG,\n COLUMN_TAG,\n 'ul',\n 'ol',\n 'blockquote',\n]);\n\nconst INDENT = ' ';\n\n/** HTML inter-element white space (ASCII only, as in the HTML standard). */\nconst WHITE_SPACE = /^[\\t\\n\\f\\r ]*$/;\n\n/**\n * A source laid out for reading. In the document, a page, a layout, a column, a list and a quote (and at the top)\n * that hold elements and only inter-element white space, each child element goes on a line of its own, indented two\n * spaces per level, and the end tag on its own line: white space there means nothing to Astrolabe, to the editor or\n * to a browser. Everything else (paragraphs, headings, list items, figures, rules, components) is written as\n * `serializeHtml` writes it, on one line, so no white space is added where it would count: a component keeps its\n * children as data, text included.\n *\n * Dropping the added white space gives the same tree back, and formatting twice gives the same text. A source the\n * parser refuses comes back as it is.\n */\nexport function formatHtml(source: string): string {\n let nodes: HtmlNode[];\n try {\n nodes = parseHtml(source);\n } catch {\n return source;\n }\n // `<plaintext>` takes the rest of the input as its text: no line may follow it.\n return nodes.some(endsInput) ? serializeHtml(nodes) : (laidOut(nodes, 0) ?? serializeHtml(nodes));\n}\n\nconst endsInput = (node: HtmlNode): boolean =>\n isElement(node) && (node.tag === 'plaintext' || node.children.some(endsInput));\n\n/** Each element of `nodes` on a line of its own, `depth` levels in; null when they hold text. */\nfunction laidOut(nodes: readonly HtmlNode[], depth: number): string | null {\n if (nodes.some((node) => node.type === 'text' && !WHITE_SPACE.test(node.value))) return null;\n return nodes\n .filter((node): node is ElementNode => isElement(node))\n .map((node) => INDENT.repeat(depth) + formatElement(node, depth))\n .join('\\n');\n}\n\nfunction formatElement(node: ElementNode, depth: number): string {\n const inner =\n LAID_OUT.has(node.tag) && node.children.some((child) => isElement(child))\n ? laidOut(node.children, depth + 1)\n : null;\n if (inner === null) return serializeHtml([node]);\n // The start tag as serializeHtml writes it: the element emptied, without its end tag.\n const empty = serializeHtml([element(node.tag, node.attrs)]);\n const end = `</${node.tag}>`;\n return `${empty.slice(0, -end.length)}\\n${inner}\\n${INDENT.repeat(depth)}${end}`;\n}\n\n// The text area grows with the laid-out source where the browser sizes fields by their content (`field-sizing`),\n// so the page scrolls rather than a box in it; elsewhere it keeps its height and scrolls.\nconst sourceStyles = css`\n .source {\n display: grid;\n gap: var(--astl-space-2);\n }\n .source textarea {\n box-sizing: border-box;\n inline-size: 100%;\n min-block-size: 24rem;\n field-sizing: content;\n padding: var(--astl-space-3);\n border: var(--astl-outline-width) solid var(--astl-outline);\n border-radius: var(--astl-radius-l);\n background: var(--astl-surface);\n color: var(--astl-ink);\n font: var(--astl-size-small) / 1.5 var(--astl-font-mono);\n }\n .source textarea:focus-visible {\n outline: var(--astl-focus-width) solid var(--astl-focus);\n outline-offset: var(--astl-focus-offset);\n }\n`;\n\n/** Adopts the view's stylesheets into the shadow root holding `node`, once. */\nfunction adopt(node: Node): void {\n const root = node.getRootNode() as Partial<DocumentOrShadowRoot>;\n const sheets = [issueStyles.styleSheet, sourceStyles.styleSheet];\n if (root.adoptedStyleSheets === undefined || sheets.includes(undefined)) return;\n const missing = sheets.filter((sheet) => sheet !== undefined && !root.adoptedStyleSheets?.includes(sheet));\n if (missing.length > 0)\n root.adoptedStyleSheets = [...root.adoptedStyleSheets, ...(missing as CSSStyleSheet[])];\n}\n\n/**\n * The view for `text` (what the author is editing) with `errors` listed under it (sentences of `describe`, nothing\n * focusable); `onInput` gets each edit.\n */\nexport function renderSource(\n root: Node,\n authoring: Authoring,\n text: string,\n errors: readonly Issue[],\n onInput: (text: string) => void,\n): TemplateResult {\n adopt(root);\n const lang = authoring.locale;\n return html`<div class=\"source\" part=\"source\" lang=${lang} dir=${directionOf(lang)}>\n <label for=\"source\">${authoring.t('astl.editor', 'view.sourceLabel')}</label>\n <textarea id=\"source\" dir=\"ltr\" spellcheck=\"false\" .value=${text} aria-invalid=${errors.length > 0}\n @input=${(event: Event) => onInput((event.target as HTMLTextAreaElement).value)}></textarea>\n ${renderIssues(errors, authoring, null, text)}\n </div>`;\n}\n"],"mappings":"A,kNAsBA,IAAMY,EAAgC,IAAI,IAAI,CAC5CP,EACAI,EACAP,EACAI,EACA,KACA,KACA,YACF,CAAC,EAEKO,EAAS,KAGTC,EAAc,iBAapB,SAAgBC,EAAW,EAAwB,CACjD,IAAIC,EACJ,GAAI,CACF,EAAQhB,EAAUiB,CAAM,CAC1B,MAAQ,CACN,OAAOA,CACT,CAEA,OAAOD,EAAM,KAAKE,CAAS,EAAIjB,EAAce,CAAK,EAAKG,EAAQH,EAAO,CAAC,GAAKf,EAAce,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AGF,EAAK,mBAAoB,GAAIE,CAA2B,EAC1F,CAMA,SAAgBE,EACd,EACA,EACA,EACA,EACA,EACgB,CAChBL,EAAMC,CAAI,EACV,IAAMK,EAAOC,EAAU,OACvB,MAAO,EAAI,0CAA0CD,EAAK,OAAO9B,EAAY8B,CAAI,EAAE;0BAC3DC,EAAU,EAAE,cAAe,kBAAkB,EAAE;gEACTC,EAAK,gBAAgBC,EAAO,OAAS,EAAE;eACvF,GAAiBC,EAASC,EAAM,OAA+B,KAAK,EAAE;MAChF5B,EAAa0B,EAAQF,EAAW,KAAMC,CAAI,EAAE;SAElD,C"}
@@ -1,4 +1,4 @@
1
- import{C as e,E as t,b as n}from"./runtime-DxAbpr3S.js";import{c as r,i,n as a,o,p as s}from"./declarations-BhqOz1ap.js";import{a as c}from"./style-model-ZXNe_c8R.js";import{n as l,r as u}from"./styles-DxJJxVNH.js";import{t as d}from"./live-jdiyYln2.js";import{n as f,o as p,r as m,t as h}from"./style-placing-DPw1zyrz.js";import{t as g}from"./style-messages-BbZpeD2a.js";import{n as _,t as v}from"./color-control-Cl5cuMSO.js";var y={kind:`font`,property:`font-family`},b={kind:`number`,property:`width`,unit:`%`,min:1,max:100},x={kind:`position`,property:`position`},S=[y,{kind:`number`,property:`font-size`,unit:`px`,min:10,max:96},{kind:`select`,property:`font-weight`,options:[`normal`,`bold`]},{kind:`select`,property:`font-style`,options:[`normal`,`italic`]},{kind:`color`,property:`color`},{kind:`select`,property:`text-align`,options:[`start`,`center`,`end`,`justify`]},{kind:`number`,property:`line-height`,unit:``,min:.8,max:4,step:.05}],C=[{kind:`color`,property:`background-color`},{kind:`number`,property:`border-width`,unit:`px`,min:0,max:16},{kind:`select`,property:`border-style`,options:[`none`,`solid`,`dashed`,`dotted`,`double`]},{kind:`color`,property:`border-color`},{kind:`number`,property:`border-radius`,unit:`px`,min:0,max:128}],w=[{kind:`number`,property:`padding`,unit:`px`,min:0,max:64},{kind:`number`,property:`margin-block-start`,unit:`px`,min:0,max:128},{kind:`number`,property:`margin-block-end`,unit:`px`,min:0,max:128}],T=(e,t)=>{let n=[`text`,S],r=[`box`,C],i=[`spacing`,w],a=[`size`,[x,b]];switch(e){case`picture`:return t?[r]:[a,r];case`figure`:return[a,r,i,n];case`layout`:return[[`size`,[{kind:`number`,property:`gap`,unit:`px`,min:0,max:64},{kind:`select`,property:`align-items`,options:[`stretch`,`start`,`center`,`end`]}]],r,i,n];case`column`:return[[`size`,[{kind:`number`,property:`flex-grow`,unit:``,min:0,max:12}]],r,i,n];case`component`:return[n,r,i,a];case`named`:case`block`:return[n,r,i,[`size`,[b]]];default:return[n,r,i]}};function E(e,t){return e.length>2e3?[{name:`style`,reason:`length`}]:t.map(e=>({name:e,reason:i.includes(e)?`value`:/^-{0,2}[a-z][a-z-]*$/.test(e)?`property`:`text`}))}var D=(e,t)=>{let n=/^(\d*\.?\d+)([a-z%]*)$/.exec(e??``);if(n===null)return null;let[,r,i]=n;return i===t||r===`0`||t===``&&i===``?r:null},O=class extends u{static properties={...u.properties,target:{},rule:{attribute:!1}};static styles=[l,_,t`
1
+ import{C as e,E as t,b as n}from"./runtime-DxAbpr3S.js";import{c as r,i,n as a,o,p as s}from"./declarations-BhqOz1ap.js";import{a as c}from"./style-model-ZXNe_c8R.js";import{n as l,r as u}from"./styles-CXkkL_Qi.js";import{t as d}from"./live-jdiyYln2.js";import{n as f,o as p,r as m,t as h}from"./style-placing-DPw1zyrz.js";import{t as g}from"./style-messages-B136zSom.js";import{n as _,t as v}from"./color-control-Cl5cuMSO.js";var y={kind:`font`,property:`font-family`},b={kind:`number`,property:`width`,unit:`%`,min:1,max:100},x={kind:`position`,property:`position`},S=[y,{kind:`number`,property:`font-size`,unit:`px`,min:10,max:96},{kind:`select`,property:`font-weight`,options:[`normal`,`bold`]},{kind:`select`,property:`font-style`,options:[`normal`,`italic`]},{kind:`color`,property:`color`},{kind:`select`,property:`text-align`,options:[`start`,`center`,`end`,`justify`]},{kind:`number`,property:`line-height`,unit:``,min:.8,max:4,step:.05}],C=[{kind:`color`,property:`background-color`},{kind:`number`,property:`border-width`,unit:`px`,min:0,max:16},{kind:`select`,property:`border-style`,options:[`none`,`solid`,`dashed`,`dotted`,`double`]},{kind:`color`,property:`border-color`},{kind:`number`,property:`border-radius`,unit:`px`,min:0,max:128}],w=[{kind:`number`,property:`padding`,unit:`px`,min:0,max:64},{kind:`number`,property:`margin-block-start`,unit:`px`,min:0,max:128},{kind:`number`,property:`margin-block-end`,unit:`px`,min:0,max:128}],T=(e,t)=>{let n=[`text`,S],r=[`box`,C],i=[`spacing`,w],a=[`size`,[x,b]];switch(e){case`picture`:return t?[r]:[a,r];case`figure`:return[a,r,i,n];case`layout`:return[[`size`,[{kind:`number`,property:`gap`,unit:`px`,min:0,max:64},{kind:`select`,property:`align-items`,options:[`stretch`,`start`,`center`,`end`]}]],r,i,n];case`column`:return[[`size`,[{kind:`number`,property:`flex-grow`,unit:``,min:0,max:12}]],r,i,n];case`component`:return[n,r,i,a];case`named`:case`block`:return[n,r,i,[`size`,[b]]];default:return[n,r,i]}};function E(e,t){return e.length>2e3?[{name:`style`,reason:`length`}]:t.map(e=>({name:e,reason:i.includes(e)?`value`:/^-{0,2}[a-z][a-z-]*$/.test(e)?`property`:`text`}))}var D=(e,t)=>{let n=/^(\d*\.?\d+)([a-z%]*)$/.exec(e??``);if(n===null)return null;let[,r,i]=n;return i===t||r===`0`||t===``&&i===``?r:null},O=class extends u{static properties={...u.properties,target:{},rule:{attribute:!1}};static styles=[l,_,t`
2
2
  .form {
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -237,4 +237,4 @@ flex-basis: 100%;
237
237
  </div>
238
238
  </details>
239
239
  </div>`}};export{O as AstlStyleForm};
240
- //# sourceMappingURL=style-form-D5haJtWM.js.map
240
+ //# sourceMappingURL=style-form-D1C2sHzg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style-form-D5haJtWM.js","names":["live","nothing","b","i","A","mergeStyles","MAX_STYLE_LENGTH","styleText","LAYOUT_SHAPES","kitStyles","AuthoringElement","l","positionChanges","widthChanges","positionOf","PLACEMENTS","styleMessages","colorStyles","colorControl","FONT","WIDTH","POSITION","TEXT_FIELDS","BOX_FIELDS","SPACING_FIELDS","sectionsOf","text","box","spacing","place","kind","inFigure","refusals","style","removed","STYLE_PROPERTIES","name","numberIn","match","value","number","written","unit","AstlStyleForm","changed","key","#element","#shown","#askDelete","#refused","#draft","#badColors","#revealRefused","note","targets","#styles","one","rule","styles","#currentRule","gone","changes","adding","cleanStyle","element","property","#write","clean","field","id","at","label","#fieldLabel","declared","shown","event","#commit","next","option","fonts","other","font","position","params","reason","named","own","ready","preset","#saveLabel","#save","edit","state","ask","#editLayout","shape","lang","dir","sections","layout","#layout","section","fields","#field","#named","#applyOwn","#refusedList"],"sources":["../../../../editor/src/elements/style-form.ts"],"sourcesContent":["import type {\n EditorLayoutEdit,\n EditorLayoutShape,\n EditorStyleChanges,\n EditorStyleRule,\n EditorStyleTarget,\n EditorStyleTargetKind,\n} from '@astl/core';\nimport {\n cleanStyle,\n MAX_STYLE_LENGTH,\n mergeStyles,\n STYLE_PROPERTIES,\n styleText,\n} from '@astl/core/declarations';\nimport {\n type CSSResultGroup,\n css,\n html,\n nothing,\n type PropertyDeclarations,\n type PropertyValues,\n type TemplateResult,\n} from 'lit';\nimport { live } from 'lit/directives/live.js';\nimport { styleMessages } from '../style-messages.js';\nimport { LAYOUT_SHAPES } from '../style-model.js';\nimport { PLACEMENTS, type Placement, positionChanges, positionOf, widthChanges } from '../style-placing.js';\nimport { AuthoringElement } from './base.js';\nimport { colorControl, colorStyles } from './color-control.js';\nimport { kitStyles } from './styles.js';\n\n/** A field of the form, table-driven: one property, with the control its values ask for. */\ntype Field =\n | {\n readonly kind: 'number';\n readonly property: string;\n readonly unit: 'px' | '%' | '';\n readonly min: number;\n readonly max: number;\n readonly step?: number;\n }\n | { readonly kind: 'select'; readonly property: string; readonly options: readonly string[] }\n | { readonly kind: 'font'; readonly property: 'font-family' }\n | { readonly kind: 'color'; readonly property: string }\n | { readonly kind: 'position'; readonly property: 'position' };\n\ntype Section = 'text' | 'box' | 'spacing' | 'size';\n\nconst FONT: Field = { kind: 'font', property: 'font-family' };\nconst WIDTH: Field = { kind: 'number', property: 'width', unit: '%', min: 1, max: 100 };\nconst POSITION: Field = { kind: 'position', property: 'position' };\n\nconst TEXT_FIELDS: readonly Field[] = [\n FONT,\n { kind: 'number', property: 'font-size', unit: 'px', min: 10, max: 96 },\n { kind: 'select', property: 'font-weight', options: ['normal', 'bold'] },\n { kind: 'select', property: 'font-style', options: ['normal', 'italic'] },\n { kind: 'color', property: 'color' },\n { kind: 'select', property: 'text-align', options: ['start', 'center', 'end', 'justify'] },\n { kind: 'number', property: 'line-height', unit: '', min: 0.8, max: 4, step: 0.05 },\n];\nconst BOX_FIELDS: readonly Field[] = [\n { kind: 'color', property: 'background-color' },\n { kind: 'number', property: 'border-width', unit: 'px', min: 0, max: 16 },\n { kind: 'select', property: 'border-style', options: ['none', 'solid', 'dashed', 'dotted', 'double'] },\n { kind: 'color', property: 'border-color' },\n { kind: 'number', property: 'border-radius', unit: 'px', min: 0, max: 128 },\n];\nconst SPACING_FIELDS: readonly Field[] = [\n { kind: 'number', property: 'padding', unit: 'px', min: 0, max: 64 },\n { kind: 'number', property: 'margin-block-start', unit: 'px', min: 0, max: 128 },\n { kind: 'number', property: 'margin-block-end', unit: 'px', min: 0, max: 128 },\n];\n\n/** What each kind of element can sensibly change, in the order it comes to mind; the first section starts open. */\nconst sectionsOf = (\n kind: EditorStyleTargetKind | 'tag' | 'named',\n inFigure: boolean,\n): readonly (readonly [Section, readonly Field[]])[] => {\n const text: [Section, readonly Field[]] = ['text', TEXT_FIELDS];\n const box: [Section, readonly Field[]] = ['box', BOX_FIELDS];\n const spacing: [Section, readonly Field[]] = ['spacing', SPACING_FIELDS];\n const place: [Section, readonly Field[]] = ['size', [POSITION, WIDTH]];\n switch (kind) {\n case 'picture':\n // A figure's picture fills the figure, which is what sits on the page.\n return inFigure ? [box] : [place, box];\n case 'figure':\n return [place, box, spacing, text];\n case 'layout':\n return [\n [\n 'size',\n [\n { kind: 'number', property: 'gap', unit: 'px', min: 0, max: 64 },\n {\n kind: 'select',\n property: 'align-items',\n options: ['stretch', 'start', 'center', 'end'],\n },\n ],\n ],\n box,\n spacing,\n text,\n ];\n case 'column':\n return [\n ['size', [{ kind: 'number', property: 'flex-grow', unit: '', min: 0, max: 12 }]],\n box,\n spacing,\n text,\n ];\n case 'component':\n // Placed as a picture is: an exercise can float with text beside it.\n return [text, box, spacing, place];\n case 'named':\n case 'block':\n return [text, box, spacing, ['size', [WIDTH]]];\n default:\n return [text, box, spacing];\n }\n};\n\n/** A refused declaration, with the reason a message says. */\ninterface Refusal {\n readonly name: string;\n readonly reason: 'property' | 'value' | 'text' | 'length';\n}\n\n/** Why the allow-list refused a declaration, from the name `cleanStyle` reports. */\nfunction refusals(style: string, removed: readonly string[]): readonly Refusal[] {\n if (style.length > MAX_STYLE_LENGTH) return [{ name: 'style', reason: 'length' }];\n return removed.map((name) => ({\n name,\n reason: STYLE_PROPERTIES.includes(name)\n ? 'value'\n : /^-{0,2}[a-z][a-z-]*$/.test(name)\n ? 'property'\n : 'text',\n }));\n}\n\n/** A number in the field's unit, or null for what the field cannot show (it says it as a placeholder). */\nconst numberIn = (value: string | undefined, unit: string): string | null => {\n const match = /^(\\d*\\.?\\d+)([a-z%]*)$/.exec(value ?? '');\n if (match === null) return null;\n const [, number, written] = match;\n return written === unit || number === '0' || (unit === '' && written === '') ? (number as string) : null;\n};\n\n/**\n * `<astl-style-form>`: the style of an element at the cursor (`target`, or what the cursor is innermost in), or of a\n * rule of the document (`rule`): text, background and border, spacing, size and position, the named style, and \"Own\n * CSS\", which says what the allow-list refused and why. \"Save as a style\" makes the element's own style a named one.\n * Each commit of a field (a `change`) is one undo step, and the focus stays in the form. The adapter's `style`\n * (`EditorStyles`) does the work; without it the form says so. Comes with `loadStyleElements`, on first use.\n */\nexport class AstlStyleForm extends AuthoringElement {\n static override properties: PropertyDeclarations = {\n ...AuthoringElement.properties,\n target: {},\n rule: { attribute: false },\n };\n\n static override styles: CSSResultGroup = [\n kitStyles,\n colorStyles,\n // A summary stays a list item, which keeps the marker that says it opens; its padding makes the line a target. The\n // layout's commands go in a row from the start, wrapping when narrow; its question has a line of its own.\n css`\n .form {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-2);\n }\n details {\n border: var(--astl-outline-width) solid var(--astl-line);\n border-radius: var(--astl-radius-m);\n }\n summary {\n box-sizing: border-box;\n min-block-size: var(--astl-target-min);\n padding-block: calc((var(--astl-target-min) - 1lh) / 2);\n padding-inline: var(--astl-space-3);\n font-weight: 600;\n cursor: pointer;\n }\n .fields {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));\n gap: var(--astl-space-3);\n padding: var(--astl-space-3);\n padding-block-start: var(--astl-space-1);\n }\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-1);\n min-inline-size: 0;\n }\n .field.wide,\n .fields > fieldset {\n grid-column: 1 / -1;\n }\n fieldset {\n margin: 0;\n padding: 0;\n border: 0;\n min-inline-size: 0;\n }\n legend,\n label {\n padding: 0;\n font-weight: 600;\n }\n legend {\n margin-block-end: var(--astl-space-1);\n }\n .unit {\n display: flex;\n align-items: center;\n gap: var(--astl-space-1);\n }\n .unit span {\n flex: none;\n color: var(--astl-ink-muted);\n }\n textarea {\n font-family: var(--astl-font-mono, monospace);\n font-size: var(--astl-size-small);\n }\n .refused {\n margin: 0;\n padding: var(--astl-space-2);\n border-inline-start: var(--astl-space-1) solid var(--astl-danger);\n background: var(--astl-danger-soft);\n }\n .refused ul {\n gap: var(--astl-space-1);\n }\n .save {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: var(--astl-space-2);\n align-items: end;\n }\n .save label {\n grid-column: 1 / -1;\n }\n .layout {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--astl-space-2);\n }\n .layout [role='alert'] {\n flex-basis: 100%;\n }\n `,\n ];\n\n /** What the form styles, of what the cursor is in; null: the innermost. */\n declare target: EditorStyleTargetKind | null;\n /** A rule to edit in place of an element: by its `name`, or `for` a tag. */\n declare rule: Pick<EditorStyleRule, 'name' | 'for'> | null;\n\n /** The refused declarations of the last edit: shown until the next one. */\n #refused: readonly Refusal[] = [];\n /** New refusals to bring into view: in a host's card or sheet the form is taller than its box. */\n #revealRefused = false;\n /** Colour fields whose typed colour was refused. */\n #badColors = new Set<string>();\n /** The field's text when it was refused, kept so the author can correct it. */\n #draft: string | null = null;\n #saveLabel = '';\n /** What the form was last showing: moving to another element forgets the last refusals. */\n #shown = '';\n /** \"Delete with content\" was pressed on a layout that holds some: the form asks first. */\n #askDelete = false;\n\n constructor() {\n super();\n this.target = null;\n this.rule = null;\n }\n\n protected override cursorChanged(): void {\n this.requestUpdate();\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n super.willUpdate(changed);\n if (changed.has('authoring')) this.authoring?.addMessages(styleMessages);\n const key =\n this.rule === null ? (this.#element()?.kind ?? '') : `rule ${this.rule.name ?? this.rule.for}`;\n if (key !== this.#shown) {\n this.#askDelete = false;\n this.#refused = [];\n this.#draft = null;\n this.#badColors.clear();\n }\n this.#shown = key;\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n if (!this.#revealRefused) return;\n this.#revealRefused = false;\n const note = this.renderRoot.querySelector('#own-refused');\n note?.closest('details')?.setAttribute('open', '');\n note?.scrollIntoView({ block: 'nearest' });\n }\n\n #styles() {\n return this.adapter?.style ?? null;\n }\n\n #element(): EditorStyleTarget | null {\n const targets = this.#styles()?.state().targets ?? [];\n return (this.target === null ? targets[0] : targets.find((one) => one.kind === this.target)) ?? null;\n }\n\n #currentRule(): EditorStyleRule | null {\n const rule = this.rule;\n if (rule === null) return null;\n return (\n this.#styles()\n ?.rules()\n .find((one) => (rule.name !== undefined ? one.name === rule.name : one.for === rule.for)) ?? {\n ...(rule.name === undefined ? {} : { name: rule.name }),\n ...(rule.for === undefined ? {} : { for: rule.for }),\n style: '',\n }\n );\n }\n\n #write(changes: EditorStyleChanges): void {\n const styles = this.#styles();\n if (styles === null) return;\n const rule = this.#currentRule();\n if (rule !== null) {\n const gone = new Set(Object.keys(changes));\n const adding = cleanStyle(\n Object.entries(changes)\n .flatMap(([name, value]) => (value === null ? [] : [`${name}: ${value}`]))\n .join('; '),\n ).declarations;\n const style = styleText(\n mergeStyles(\n cleanStyle(rule.style).declarations.filter(([name]) => !gone.has(name)),\n adding,\n ),\n );\n styles.setRule({ ...rule, style });\n } else {\n const element = this.#element();\n if (element !== null) styles.setTarget(element.kind, changes);\n }\n this.#refused = [];\n this.#draft = null;\n this.requestUpdate();\n }\n\n /** One field's value: what the allow-list refuses is said, not written. */\n #commit(property: string, value: string | null): void {\n if (value !== null) {\n const { removed } = cleanStyle(`${property}: ${value}`);\n if (removed.length > 0) {\n this.#refused = refusals('', removed);\n this.#revealRefused = true;\n this.requestUpdate();\n return;\n }\n }\n this.#write({ [property]: value });\n }\n\n /** The \"Own CSS\" field: what the allow-list keeps is the new style, what it refuses is said and never written. */\n #applyOwn(text: string): void {\n const styles = this.#styles();\n if (styles === null) return;\n const clean = cleanStyle(text);\n const rule = this.#currentRule();\n if (rule !== null) styles.setRule({ ...rule, style: clean.style });\n else {\n const element = this.#element();\n if (element !== null) styles.replaceTarget(element.kind, clean.style);\n }\n this.#refused = refusals(text, clean.removed);\n this.#revealRefused = this.#refused.length > 0;\n // The field then shows what stays; the refusals say what went.\n this.#draft = null;\n this.requestUpdate();\n }\n\n #fieldLabel(field: Field): string {\n return this.t(`style.field.${field.property}`);\n }\n\n #field(field: Field, declared: ReadonlyMap<string, string>, style: string, at: string): TemplateResult {\n const id = `${at}-${field.property}`;\n const label = this.#fieldLabel(field);\n const value = declared.get(field.property);\n switch (field.kind) {\n case 'number': {\n const shown = numberIn(value, field.unit);\n return html`<div class=\"field\" part=\"field\">\n <label for=${id} part=\"label\">${label}</label>\n <div class=\"unit\">\n <input\n id=${id}\n type=\"number\"\n inputmode=\"decimal\"\n data-property=${field.property}\n min=${field.min}\n max=${field.max}\n step=${field.step ?? 1}\n placeholder=${shown === null ? (value ?? '') : ''}\n .value=${live(shown ?? '')}\n @change=${(event: Event) => {\n const text = (event.target as HTMLInputElement).value.trim();\n // The field writes what the corner handle writes.\n if (\n field.property === 'width' &&\n text !== '' &&\n cleanStyle(`width: ${text}%`).removed.length === 0\n )\n this.#write(widthChanges(style, Number(text)));\n else this.#commit(field.property, text === '' ? null : `${text}${field.unit}`);\n }}\n />\n ${field.unit === '' ? nothing : html`<span aria-hidden=\"true\">${field.unit}</span>`}\n </div>\n </div>`;\n }\n case 'select':\n return html`<div class=\"field\" part=\"field\">\n <label for=${id} part=\"label\">${label}</label>\n <select\n id=${id}\n data-property=${field.property}\n .value=${live(value ?? '')}\n @change=${(event: Event) => {\n const next = (event.target as HTMLSelectElement).value;\n this.#commit(field.property, next === '' ? null : next);\n }}\n >\n <option value=\"\">${this.t('toolbar.default')}</option>\n ${field.options.map(\n (option) =>\n html`<option value=${option} ?selected=${option === value}>${this.t(`style.value.${option}`)}</option>`,\n )}\n </select>\n </div>`;\n case 'font': {\n const fonts = this.authoring?.fonts ?? [];\n const other = value !== undefined && !fonts.some((font) => font.stack === value);\n return html`<div class=\"field wide\" part=\"field\">\n <label for=${id} part=\"label\">${label}</label>\n <select\n id=${id}\n data-property=${field.property}\n .value=${live(value ?? '')}\n @change=${(event: Event) => {\n const next = (event.target as HTMLSelectElement).value;\n this.#commit(field.property, next === '' ? null : next);\n }}\n >\n <option value=\"\">${this.t('toolbar.default')}</option>\n ${fonts.map(\n (font) =>\n html`<option value=${font.stack} ?selected=${font.stack === value}>${font.name}</option>`,\n )}\n ${other ? html`<option value=${value} selected>${value}</option>` : nothing}\n </select>\n </div>`;\n }\n case 'position': {\n const position = positionOf(style);\n return html`<div class=\"field wide\" part=\"field\">\n <label for=${id} part=\"label\">${label}</label>\n <select\n id=${id}\n data-property=\"position\"\n .value=${live(position)}\n @change=${(event: Event) => {\n const next = (event.target as HTMLSelectElement).value as Placement;\n this.#write(positionChanges(next, style, this.#element()?.kind === 'figure'));\n }}\n >\n ${PLACEMENTS.map(\n (one) =>\n html`<option value=${one} ?selected=${one === position}>${this.t(`style.position.${one}`)}</option>`,\n )}\n </select>\n </div>`;\n }\n case 'color':\n return html`<fieldset part=\"field\" data-property=${field.property}>\n <legend part=\"label\">${label}</legend>\n ${colorControl({\n id,\n value: value ?? null,\n t: (key, params) => this.t(key, params),\n invalid: this.#badColors.has(field.property),\n ground: field.property === 'background-color',\n pick: (next) => {\n this.#badColors.delete(field.property);\n this.#commit(field.property, next);\n },\n refuse: () => {\n this.#badColors.add(field.property);\n this.requestUpdate();\n },\n })}\n </fieldset>`;\n }\n }\n\n #refusedList(): TemplateResult | typeof nothing {\n if (this.#refused.length === 0) return nothing;\n return html`<div class=\"refused\" id=\"own-refused\">\n <ul>\n ${this.#refused.map(\n ({ name, reason }) =>\n html`<li data-refused=${name}>${this.t(`style.refused.${reason}`, { name, max: MAX_STYLE_LENGTH })}</li>`,\n )}\n </ul>\n </div>`;\n }\n\n /** The named style of the element, the ready styles the document does not have yet, and saving its own style as one. */\n #named(element: EditorStyleTarget): TemplateResult {\n const named = (this.#styles()?.rules() ?? []).filter((rule) => rule.name !== undefined);\n const own = new Set(named.map((rule) => rule.name));\n const ready = (this.authoring?.styles ?? []).filter((preset) => !own.has(preset.name));\n return html`<details part=\"section\" data-section=\"named\">\n <summary>${this.t('style.section.named')}</summary>\n <div class=\"fields\">\n <div class=\"field wide\" part=\"field\">\n <label for=\"named\" part=\"label\">${this.t('style.field.named')}</label>\n <select\n id=\"named\"\n .value=${live(element.className ?? '')}\n @change=${(event: Event) => {\n const next = (event.target as HTMLSelectElement).value;\n const preset = ready.find((one) => one.name === next);\n // A ready style brings its rule, labelled as the author reads it now, in the same undo step.\n if (preset !== undefined)\n this.#styles()?.setClass(element.kind, next, {\n name: next,\n label: preset.label,\n style: preset.style,\n });\n else this.#styles()?.setClass(element.kind, next === '' ? null : next);\n this.requestUpdate();\n }}\n >\n <option value=\"\">${this.t('style.named.none')}</option>\n ${named.map(\n (rule) =>\n html`<option value=${rule.name ?? ''} ?selected=${rule.name === element.className}>${rule.label ?? rule.name}</option>`,\n )}\n ${\n ready.length === 0\n ? nothing\n : html`<optgroup label=${this.t('toolbar.readyStyles')}>\n ${ready.map(\n (preset) =>\n html`<option value=${preset.name} ?selected=${preset.name === element.className}>${preset.label}</option>`,\n )}\n </optgroup>`\n }\n </select>\n </div>\n <div class=\"save field wide\">\n <label for=\"save-label\" part=\"label\">${this.t('style.save.label')}</label>\n <input\n id=\"save-label\"\n type=\"text\"\n autocomplete=\"off\"\n .value=${this.#saveLabel}\n @input=${(event: Event) => {\n this.#saveLabel = (event.target as HTMLInputElement).value;\n }}\n @keydown=${(event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n this.#save(element);\n }\n }}\n />\n <button type=\"button\" data-save @click=${() => this.#save(element)}>${this.t('style.save')}</button>\n </div>\n </div>\n </details>`;\n }\n\n #save(element: EditorStyleTarget): void {\n const label = this.#saveLabel.trim();\n if (label === '') {\n this.renderRoot.querySelector<HTMLInputElement>('#save-label')?.focus();\n return;\n }\n if (this.#styles()?.saveRule(element.kind, label) !== null) this.#saveLabel = '';\n this.requestUpdate();\n }\n\n #editLayout(edit: EditorLayoutEdit): void {\n this.#askDelete = false;\n this.#styles()?.editLayout?.(edit);\n this.requestUpdate();\n }\n\n /**\n * The layout's own commands, first in its form and open: another shape, its columns removed with their content kept,\n * or deleted with it, which asks first when there is content to lose. Its style sections follow, closed.\n */\n #layout(): TemplateResult | typeof nothing {\n const styles = this.#styles();\n const state = styles?.layout?.() ?? null;\n if (styles?.editLayout === undefined || state === null) return nothing;\n const ask = this.#askDelete;\n return html`<details open part=\"section\" data-section=\"layout\">\n <summary>${this.t('layout.section')}</summary>\n <div class=\"fields\">\n <div class=\"field wide\" part=\"field\">\n <label for=\"layout-shape\" part=\"label\">${this.t('layout.change')}</label>\n <select\n id=\"layout-shape\"\n @change=${(event: Event) => {\n const value = (event.target as HTMLSelectElement).value;\n if (value !== '') this.#editLayout(value as EditorLayoutShape);\n }}\n >\n ${state.shape === null ? html`<option value=\"\" selected>${this.t('layout.other')}</option>` : nothing}\n ${LAYOUT_SHAPES.map(\n (shape) =>\n html`<option value=${shape} ?selected=${shape === state.shape}>\n ${this.t(`insert.layout.${shape}`)}\n </option>`,\n )}\n </select>\n </div>\n <div class=\"layout wide field\" role=\"group\" aria-label=${this.t('layout.section')}>\n ${\n ask\n ? html`<span role=\"alert\">${this.t('layout.confirm')}</span>\n <button type=\"button\" @click=${() => this.#editLayout('delete')}>\n ${this.t('layout.confirmDelete')}\n </button>\n <button\n type=\"button\"\n data-cancel\n @click=${() => {\n this.#askDelete = false;\n this.requestUpdate();\n }}\n >\n ${this.t('layout.cancel')}\n </button>`\n : html`<button type=\"button\" @click=${() => this.#editLayout('unwrap')}>\n ${this.t('layout.unwrap')}\n </button>\n <button\n type=\"button\"\n @click=${() => {\n if (state.empty) this.#editLayout('delete');\n else {\n this.#askDelete = true;\n this.requestUpdate();\n void this.updateComplete.then(() =>\n this.renderRoot.querySelector<HTMLElement>('[data-cancel]')?.focus(),\n );\n }\n }}\n >\n ${this.t('layout.delete')}\n </button>`\n }\n </div>\n </div>\n </details>`;\n }\n\n protected override render(): TemplateResult | typeof nothing {\n const styles = this.#styles();\n if (this.authoring === null) return nothing;\n const { lang, dir } = this.ui;\n const rule = this.#currentRule();\n const element = rule === null ? this.#element() : null;\n if (styles === null || (rule === null && element === null)) {\n return html`<p class=\"note\" lang=${lang} dir=${dir}>${this.t('style.form.none')}</p>`;\n }\n const style = rule?.style ?? element?.style ?? '';\n const declared = new Map(cleanStyle(style).declarations);\n const inFigure =\n element?.kind === 'picture' && styles.state().targets.some((one) => one.kind === 'figure');\n const kind =\n rule === null\n ? (element?.kind as EditorStyleTargetKind)\n : rule.name !== undefined\n ? 'named'\n : rule.for === 'img'\n ? 'picture'\n : 'tag';\n const sections = sectionsOf(kind, inFigure);\n const own = this.#draft ?? style;\n // A layout's form starts with its commands; then its style, closed.\n const layout = element?.kind === 'layout';\n return html`<div class=\"form\" part=\"root\" lang=${lang} dir=${dir} data-kind=${kind}>\n ${layout ? this.#layout() : nothing}\n ${sections.map(\n (\n [section, fields],\n at,\n ) => html`<details ?open=${at === 0 && !layout} part=\"section\" data-section=${section}>\n <summary>${this.t(`style.section.${section}`)}</summary>\n <div class=\"fields\">${fields.map((field) => this.#field(field, declared, style, section))}</div>\n </details>`,\n )}\n ${element === null ? nothing : this.#named(element)}\n <details ?open=${!layout} part=\"section\" data-section=\"own\">\n <summary>${this.t('style.section.own')}</summary>\n <div class=\"fields\">\n <div class=\"field wide\" part=\"field\">\n <label for=\"own\" part=\"label\">${this.t('style.field.own')}</label>\n <textarea\n id=\"own\"\n rows=\"3\"\n spellcheck=\"false\"\n placeholder=\"background-color: #fff3cd; padding: 12px\"\n aria-describedby=${this.#refused.length > 0 ? 'own-refused' : nothing}\n .value=${live(own)}\n @change=${(event: Event) => this.#applyOwn((event.target as HTMLTextAreaElement).value)}\n ></textarea>\n <div role=\"alert\">${this.#refusedList()}</div>\n </div>\n </div>\n </details>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'astl-style-form': AstlStyleForm;\n }\n}\n"],"mappings":"A,2aAiDA,IAAMmB,EAAc,CAAE,KAAM,OAAQ,SAAU,aAAc,EACtDC,EAAe,CAAE,KAAM,SAAU,SAAU,QAAS,KAAM,IAAK,IAAK,EAAG,IAAK,GAAI,EAChFC,EAAkB,CAAE,KAAM,WAAY,SAAU,UAAW,EAE3DC,EAAgC,CACpCH,EACA,CAAE,KAAM,SAAU,SAAU,YAAa,KAAM,KAAM,IAAK,GAAI,IAAK,EAAG,EACtE,CAAE,KAAM,SAAU,SAAU,cAAe,QAAS,CAA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G,EAAS,KAEP,CAACG,EAASC,GACV,IACG,CAAI,kBAAkBhC,IAAO,GAAK,CAAC6B,EAAO,+BAA+BE,EAAQ;qBACzE,KAAK,EAAE,iBAAiBA,GAAS,EAAE;gCACxBC,EAAO,IAAK,GAAU,KAAKC,GAAOnC,EAAOK,EAAUxC,EAAOoE,CAAO,CAAC,EAAE;mBAE9F,EAAE;QACArC,IAAY,KAAO/D,EAAU,KAAKuG,GAAOxC,CAAO,EAAE;uBACnC,CAACmC,EAAO;mBACZ,KAAK,EAAE,mBAAmB,EAAE;;;4CAGH,KAAK,EAAE,iBAAiB,EAAE;;;;;;iCAMrC,KAAKlD,GAAS,OAAS,EAAI,cAAgBhD,EAAQ;uBAC7DD,EAAKsF,CAAG,EAAE;wBACR,GAAiB,KAAKmB,GAAW9B,EAAM,OAA+B,KAAK,EAAE;;gCAEtE,KAAK+B,GAAa,EAAE;;;;WAKlD,CACF,E"}
1
+ {"version":3,"file":"style-form-D1C2sHzg.js","names":["live","nothing","b","i","A","mergeStyles","MAX_STYLE_LENGTH","styleText","LAYOUT_SHAPES","kitStyles","AuthoringElement","l","positionChanges","widthChanges","positionOf","PLACEMENTS","styleMessages","colorStyles","colorControl","FONT","WIDTH","POSITION","TEXT_FIELDS","BOX_FIELDS","SPACING_FIELDS","sectionsOf","text","box","spacing","place","kind","inFigure","refusals","style","removed","STYLE_PROPERTIES","name","numberIn","match","value","number","written","unit","AstlStyleForm","changed","key","#element","#shown","#askDelete","#refused","#draft","#badColors","#revealRefused","note","targets","#styles","one","rule","styles","#currentRule","gone","changes","adding","cleanStyle","element","property","#write","clean","field","id","at","label","#fieldLabel","declared","shown","event","#commit","next","option","fonts","other","font","position","params","reason","named","own","ready","preset","#saveLabel","#save","edit","state","ask","#editLayout","shape","lang","dir","sections","layout","#layout","section","fields","#field","#named","#applyOwn","#refusedList"],"sources":["../../../../editor/src/elements/style-form.ts"],"sourcesContent":["import type {\n EditorLayoutEdit,\n EditorLayoutShape,\n EditorStyleChanges,\n EditorStyleRule,\n EditorStyleTarget,\n EditorStyleTargetKind,\n} from '@astl/core';\nimport {\n cleanStyle,\n MAX_STYLE_LENGTH,\n mergeStyles,\n STYLE_PROPERTIES,\n styleText,\n} from '@astl/core/declarations';\nimport {\n type CSSResultGroup,\n css,\n html,\n nothing,\n type PropertyDeclarations,\n type PropertyValues,\n type TemplateResult,\n} from 'lit';\nimport { live } from 'lit/directives/live.js';\nimport { styleMessages } from '../style-messages.js';\nimport { LAYOUT_SHAPES } from '../style-model.js';\nimport { PLACEMENTS, type Placement, positionChanges, positionOf, widthChanges } from '../style-placing.js';\nimport { AuthoringElement } from './base.js';\nimport { colorControl, colorStyles } from './color-control.js';\nimport { kitStyles } from './styles.js';\n\n/** A field of the form, table-driven: one property, with the control its values ask for. */\ntype Field =\n | {\n readonly kind: 'number';\n readonly property: string;\n readonly unit: 'px' | '%' | '';\n readonly min: number;\n readonly max: number;\n readonly step?: number;\n }\n | { readonly kind: 'select'; readonly property: string; readonly options: readonly string[] }\n | { readonly kind: 'font'; readonly property: 'font-family' }\n | { readonly kind: 'color'; readonly property: string }\n | { readonly kind: 'position'; readonly property: 'position' };\n\ntype Section = 'text' | 'box' | 'spacing' | 'size';\n\nconst FONT: Field = { kind: 'font', property: 'font-family' };\nconst WIDTH: Field = { kind: 'number', property: 'width', unit: '%', min: 1, max: 100 };\nconst POSITION: Field = { kind: 'position', property: 'position' };\n\nconst TEXT_FIELDS: readonly Field[] = [\n FONT,\n { kind: 'number', property: 'font-size', unit: 'px', min: 10, max: 96 },\n { kind: 'select', property: 'font-weight', options: ['normal', 'bold'] },\n { kind: 'select', property: 'font-style', options: ['normal', 'italic'] },\n { kind: 'color', property: 'color' },\n { kind: 'select', property: 'text-align', options: ['start', 'center', 'end', 'justify'] },\n { kind: 'number', property: 'line-height', unit: '', min: 0.8, max: 4, step: 0.05 },\n];\nconst BOX_FIELDS: readonly Field[] = [\n { kind: 'color', property: 'background-color' },\n { kind: 'number', property: 'border-width', unit: 'px', min: 0, max: 16 },\n { kind: 'select', property: 'border-style', options: ['none', 'solid', 'dashed', 'dotted', 'double'] },\n { kind: 'color', property: 'border-color' },\n { kind: 'number', property: 'border-radius', unit: 'px', min: 0, max: 128 },\n];\nconst SPACING_FIELDS: readonly Field[] = [\n { kind: 'number', property: 'padding', unit: 'px', min: 0, max: 64 },\n { kind: 'number', property: 'margin-block-start', unit: 'px', min: 0, max: 128 },\n { kind: 'number', property: 'margin-block-end', unit: 'px', min: 0, max: 128 },\n];\n\n/** What each kind of element can sensibly change, in the order it comes to mind; the first section starts open. */\nconst sectionsOf = (\n kind: EditorStyleTargetKind | 'tag' | 'named',\n inFigure: boolean,\n): readonly (readonly [Section, readonly Field[]])[] => {\n const text: [Section, readonly Field[]] = ['text', TEXT_FIELDS];\n const box: [Section, readonly Field[]] = ['box', BOX_FIELDS];\n const spacing: [Section, readonly Field[]] = ['spacing', SPACING_FIELDS];\n const place: [Section, readonly Field[]] = ['size', [POSITION, WIDTH]];\n switch (kind) {\n case 'picture':\n // A figure's picture fills the figure, which is what sits on the page.\n return inFigure ? [box] : [place, box];\n case 'figure':\n return [place, box, spacing, text];\n case 'layout':\n return [\n [\n 'size',\n [\n { kind: 'number', property: 'gap', unit: 'px', min: 0, max: 64 },\n {\n kind: 'select',\n property: 'align-items',\n options: ['stretch', 'start', 'center', 'end'],\n },\n ],\n ],\n box,\n spacing,\n text,\n ];\n case 'column':\n return [\n ['size', [{ kind: 'number', property: 'flex-grow', unit: '', min: 0, max: 12 }]],\n box,\n spacing,\n text,\n ];\n case 'component':\n // Placed as a picture is: an exercise can float with text beside it.\n return [text, box, spacing, place];\n case 'named':\n case 'block':\n return [text, box, spacing, ['size', [WIDTH]]];\n default:\n return [text, box, spacing];\n }\n};\n\n/** A refused declaration, with the reason a message says. */\ninterface Refusal {\n readonly name: string;\n readonly reason: 'property' | 'value' | 'text' | 'length';\n}\n\n/** Why the allow-list refused a declaration, from the name `cleanStyle` reports. */\nfunction refusals(style: string, removed: readonly string[]): readonly Refusal[] {\n if (style.length > MAX_STYLE_LENGTH) return [{ name: 'style', reason: 'length' }];\n return removed.map((name) => ({\n name,\n reason: STYLE_PROPERTIES.includes(name)\n ? 'value'\n : /^-{0,2}[a-z][a-z-]*$/.test(name)\n ? 'property'\n : 'text',\n }));\n}\n\n/** A number in the field's unit, or null for what the field cannot show (it says it as a placeholder). */\nconst numberIn = (value: string | undefined, unit: string): string | null => {\n const match = /^(\\d*\\.?\\d+)([a-z%]*)$/.exec(value ?? '');\n if (match === null) return null;\n const [, number, written] = match;\n return written === unit || number === '0' || (unit === '' && written === '') ? (number as string) : null;\n};\n\n/**\n * `<astl-style-form>`: the style of an element at the cursor (`target`, or what the cursor is innermost in), or of a\n * rule of the document (`rule`): text, background and border, spacing, size and position, the named style, and \"Own\n * CSS\", which says what the allow-list refused and why. \"Save as a style\" makes the element's own style a named one.\n * Each commit of a field (a `change`) is one undo step, and the focus stays in the form. The adapter's `style`\n * (`EditorStyles`) does the work; without it the form says so. Comes with `loadStyleElements`, on first use.\n */\nexport class AstlStyleForm extends AuthoringElement {\n static override properties: PropertyDeclarations = {\n ...AuthoringElement.properties,\n target: {},\n rule: { attribute: false },\n };\n\n static override styles: CSSResultGroup = [\n kitStyles,\n colorStyles,\n // A summary stays a list item, which keeps the marker that says it opens; its padding makes the line a target. The\n // layout's commands go in a row from the start, wrapping when narrow; its question has a line of its own.\n css`\n .form {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-2);\n }\n details {\n border: var(--astl-outline-width) solid var(--astl-line);\n border-radius: var(--astl-radius-m);\n }\n summary {\n box-sizing: border-box;\n min-block-size: var(--astl-target-min);\n padding-block: calc((var(--astl-target-min) - 1lh) / 2);\n padding-inline: var(--astl-space-3);\n font-weight: 600;\n cursor: pointer;\n }\n .fields {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));\n gap: var(--astl-space-3);\n padding: var(--astl-space-3);\n padding-block-start: var(--astl-space-1);\n }\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-1);\n min-inline-size: 0;\n }\n .field.wide,\n .fields > fieldset {\n grid-column: 1 / -1;\n }\n fieldset {\n margin: 0;\n padding: 0;\n border: 0;\n min-inline-size: 0;\n }\n legend,\n label {\n padding: 0;\n font-weight: 600;\n }\n legend {\n margin-block-end: var(--astl-space-1);\n }\n .unit {\n display: flex;\n align-items: center;\n gap: var(--astl-space-1);\n }\n .unit span {\n flex: none;\n color: var(--astl-ink-muted);\n }\n textarea {\n font-family: var(--astl-font-mono, monospace);\n font-size: var(--astl-size-small);\n }\n .refused {\n margin: 0;\n padding: var(--astl-space-2);\n border-inline-start: var(--astl-space-1) solid var(--astl-danger);\n background: var(--astl-danger-soft);\n }\n .refused ul {\n gap: var(--astl-space-1);\n }\n .save {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: var(--astl-space-2);\n align-items: end;\n }\n .save label {\n grid-column: 1 / -1;\n }\n .layout {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--astl-space-2);\n }\n .layout [role='alert'] {\n flex-basis: 100%;\n }\n `,\n ];\n\n /** What the form styles, of what the cursor is in; null: the innermost. */\n declare target: EditorStyleTargetKind | null;\n /** A rule to edit in place of an element: by its `name`, or `for` a tag. */\n declare rule: Pick<EditorStyleRule, 'name' | 'for'> | null;\n\n /** The refused declarations of the last edit: shown until the next one. */\n #refused: readonly Refusal[] = [];\n /** New refusals to bring into view: in a host's card or sheet the form is taller than its box. */\n #revealRefused = false;\n /** Colour fields whose typed colour was refused. */\n #badColors = new Set<string>();\n /** The field's text when it was refused, kept so the author can correct it. */\n #draft: string | null = null;\n #saveLabel = '';\n /** What the form was last showing: moving to another element forgets the last refusals. */\n #shown = '';\n /** \"Delete with content\" was pressed on a layout that holds some: the form asks first. */\n #askDelete = false;\n\n constructor() {\n super();\n this.target = null;\n this.rule = null;\n }\n\n protected override cursorChanged(): void {\n this.requestUpdate();\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n super.willUpdate(changed);\n if (changed.has('authoring')) this.authoring?.addMessages(styleMessages);\n const key =\n this.rule === null ? (this.#element()?.kind ?? '') : `rule ${this.rule.name ?? this.rule.for}`;\n if (key !== this.#shown) {\n this.#askDelete = false;\n this.#refused = [];\n this.#draft = null;\n this.#badColors.clear();\n }\n this.#shown = key;\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n if (!this.#revealRefused) return;\n this.#revealRefused = false;\n const note = this.renderRoot.querySelector('#own-refused');\n note?.closest('details')?.setAttribute('open', '');\n note?.scrollIntoView({ block: 'nearest' });\n }\n\n #styles() {\n return this.adapter?.style ?? null;\n }\n\n #element(): EditorStyleTarget | null {\n const targets = this.#styles()?.state().targets ?? [];\n return (this.target === null ? targets[0] : targets.find((one) => one.kind === this.target)) ?? null;\n }\n\n #currentRule(): EditorStyleRule | null {\n const rule = this.rule;\n if (rule === null) return null;\n return (\n this.#styles()\n ?.rules()\n .find((one) => (rule.name !== undefined ? one.name === rule.name : one.for === rule.for)) ?? {\n ...(rule.name === undefined ? {} : { name: rule.name }),\n ...(rule.for === undefined ? {} : { for: rule.for }),\n style: '',\n }\n );\n }\n\n #write(changes: EditorStyleChanges): void {\n const styles = this.#styles();\n if (styles === null) return;\n const rule = this.#currentRule();\n if (rule !== null) {\n const gone = new Set(Object.keys(changes));\n const adding = cleanStyle(\n Object.entries(changes)\n .flatMap(([name, value]) => (value === null ? [] : [`${name}: ${value}`]))\n .join('; '),\n ).declarations;\n const style = styleText(\n mergeStyles(\n cleanStyle(rule.style).declarations.filter(([name]) => !gone.has(name)),\n adding,\n ),\n );\n styles.setRule({ ...rule, style });\n } else {\n const element = this.#element();\n if (element !== null) styles.setTarget(element.kind, changes);\n }\n this.#refused = [];\n this.#draft = null;\n this.requestUpdate();\n }\n\n /** One field's value: what the allow-list refuses is said, not written. */\n #commit(property: string, value: string | null): void {\n if (value !== null) {\n const { removed } = cleanStyle(`${property}: ${value}`);\n if (removed.length > 0) {\n this.#refused = refusals('', removed);\n this.#revealRefused = true;\n this.requestUpdate();\n return;\n }\n }\n this.#write({ [property]: value });\n }\n\n /** The \"Own CSS\" field: what the allow-list keeps is the new style, what it refuses is said and never written. */\n #applyOwn(text: string): void {\n const styles = this.#styles();\n if (styles === null) return;\n const clean = cleanStyle(text);\n const rule = this.#currentRule();\n if (rule !== null) styles.setRule({ ...rule, style: clean.style });\n else {\n const element = this.#element();\n if (element !== null) styles.replaceTarget(element.kind, clean.style);\n }\n this.#refused = refusals(text, clean.removed);\n this.#revealRefused = this.#refused.length > 0;\n // The field then shows what stays; the refusals say what went.\n this.#draft = null;\n this.requestUpdate();\n }\n\n #fieldLabel(field: Field): string {\n return this.t(`style.field.${field.property}`);\n }\n\n #field(field: Field, declared: ReadonlyMap<string, string>, style: string, at: string): TemplateResult {\n const id = `${at}-${field.property}`;\n const label = this.#fieldLabel(field);\n const value = declared.get(field.property);\n switch (field.kind) {\n case 'number': {\n const shown = numberIn(value, field.unit);\n return html`<div class=\"field\" part=\"field\">\n <label for=${id} part=\"label\">${label}</label>\n <div class=\"unit\">\n <input\n id=${id}\n type=\"number\"\n inputmode=\"decimal\"\n data-property=${field.property}\n min=${field.min}\n max=${field.max}\n step=${field.step ?? 1}\n placeholder=${shown === null ? (value ?? '') : ''}\n .value=${live(shown ?? '')}\n @change=${(event: Event) => {\n const text = (event.target as HTMLInputElement).value.trim();\n // The field writes what the corner handle writes.\n if (\n field.property === 'width' &&\n text !== '' &&\n cleanStyle(`width: ${text}%`).removed.length === 0\n )\n this.#write(widthChanges(style, Number(text)));\n else this.#commit(field.property, text === '' ? null : `${text}${field.unit}`);\n }}\n />\n ${field.unit === '' ? nothing : html`<span aria-hidden=\"true\">${field.unit}</span>`}\n </div>\n </div>`;\n }\n case 'select':\n return html`<div class=\"field\" part=\"field\">\n <label for=${id} part=\"label\">${label}</label>\n <select\n id=${id}\n data-property=${field.property}\n .value=${live(value ?? '')}\n @change=${(event: Event) => {\n const next = (event.target as HTMLSelectElement).value;\n this.#commit(field.property, next === '' ? null : next);\n }}\n >\n <option value=\"\">${this.t('toolbar.default')}</option>\n ${field.options.map(\n (option) =>\n html`<option value=${option} ?selected=${option === value}>${this.t(`style.value.${option}`)}</option>`,\n )}\n </select>\n </div>`;\n case 'font': {\n const fonts = this.authoring?.fonts ?? [];\n const other = value !== undefined && !fonts.some((font) => font.stack === value);\n return html`<div class=\"field wide\" part=\"field\">\n <label for=${id} part=\"label\">${label}</label>\n <select\n id=${id}\n data-property=${field.property}\n .value=${live(value ?? '')}\n @change=${(event: Event) => {\n const next = (event.target as HTMLSelectElement).value;\n this.#commit(field.property, next === '' ? null : next);\n }}\n >\n <option value=\"\">${this.t('toolbar.default')}</option>\n ${fonts.map(\n (font) =>\n html`<option value=${font.stack} ?selected=${font.stack === value}>${font.name}</option>`,\n )}\n ${other ? html`<option value=${value} selected>${value}</option>` : nothing}\n </select>\n </div>`;\n }\n case 'position': {\n const position = positionOf(style);\n return html`<div class=\"field wide\" part=\"field\">\n <label for=${id} part=\"label\">${label}</label>\n <select\n id=${id}\n data-property=\"position\"\n .value=${live(position)}\n @change=${(event: Event) => {\n const next = (event.target as HTMLSelectElement).value as Placement;\n this.#write(positionChanges(next, style, this.#element()?.kind === 'figure'));\n }}\n >\n ${PLACEMENTS.map(\n (one) =>\n html`<option value=${one} ?selected=${one === position}>${this.t(`style.position.${one}`)}</option>`,\n )}\n </select>\n </div>`;\n }\n case 'color':\n return html`<fieldset part=\"field\" data-property=${field.property}>\n <legend part=\"label\">${label}</legend>\n ${colorControl({\n id,\n value: value ?? null,\n t: (key, params) => this.t(key, params),\n invalid: this.#badColors.has(field.property),\n ground: field.property === 'background-color',\n pick: (next) => {\n this.#badColors.delete(field.property);\n this.#commit(field.property, next);\n },\n refuse: () => {\n this.#badColors.add(field.property);\n this.requestUpdate();\n },\n })}\n </fieldset>`;\n }\n }\n\n #refusedList(): TemplateResult | typeof nothing {\n if (this.#refused.length === 0) return nothing;\n return html`<div class=\"refused\" id=\"own-refused\">\n <ul>\n ${this.#refused.map(\n ({ name, reason }) =>\n html`<li data-refused=${name}>${this.t(`style.refused.${reason}`, { name, max: MAX_STYLE_LENGTH })}</li>`,\n )}\n </ul>\n </div>`;\n }\n\n /** The named style of the element, the ready styles the document does not have yet, and saving its own style as one. */\n #named(element: EditorStyleTarget): TemplateResult {\n const named = (this.#styles()?.rules() ?? []).filter((rule) => rule.name !== undefined);\n const own = new Set(named.map((rule) => rule.name));\n const ready = (this.authoring?.styles ?? []).filter((preset) => !own.has(preset.name));\n return html`<details part=\"section\" data-section=\"named\">\n <summary>${this.t('style.section.named')}</summary>\n <div class=\"fields\">\n <div class=\"field wide\" part=\"field\">\n <label for=\"named\" part=\"label\">${this.t('style.field.named')}</label>\n <select\n id=\"named\"\n .value=${live(element.className ?? '')}\n @change=${(event: Event) => {\n const next = (event.target as HTMLSelectElement).value;\n const preset = ready.find((one) => one.name === next);\n // A ready style brings its rule, labelled as the author reads it now, in the same undo step.\n if (preset !== undefined)\n this.#styles()?.setClass(element.kind, next, {\n name: next,\n label: preset.label,\n style: preset.style,\n });\n else this.#styles()?.setClass(element.kind, next === '' ? null : next);\n this.requestUpdate();\n }}\n >\n <option value=\"\">${this.t('style.named.none')}</option>\n ${named.map(\n (rule) =>\n html`<option value=${rule.name ?? ''} ?selected=${rule.name === element.className}>${rule.label ?? rule.name}</option>`,\n )}\n ${\n ready.length === 0\n ? nothing\n : html`<optgroup label=${this.t('toolbar.readyStyles')}>\n ${ready.map(\n (preset) =>\n html`<option value=${preset.name} ?selected=${preset.name === element.className}>${preset.label}</option>`,\n )}\n </optgroup>`\n }\n </select>\n </div>\n <div class=\"save field wide\">\n <label for=\"save-label\" part=\"label\">${this.t('style.save.label')}</label>\n <input\n id=\"save-label\"\n type=\"text\"\n autocomplete=\"off\"\n .value=${this.#saveLabel}\n @input=${(event: Event) => {\n this.#saveLabel = (event.target as HTMLInputElement).value;\n }}\n @keydown=${(event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n this.#save(element);\n }\n }}\n />\n <button type=\"button\" data-save @click=${() => this.#save(element)}>${this.t('style.save')}</button>\n </div>\n </div>\n </details>`;\n }\n\n #save(element: EditorStyleTarget): void {\n const label = this.#saveLabel.trim();\n if (label === '') {\n this.renderRoot.querySelector<HTMLInputElement>('#save-label')?.focus();\n return;\n }\n if (this.#styles()?.saveRule(element.kind, label) !== null) this.#saveLabel = '';\n this.requestUpdate();\n }\n\n #editLayout(edit: EditorLayoutEdit): void {\n this.#askDelete = false;\n this.#styles()?.editLayout?.(edit);\n this.requestUpdate();\n }\n\n /**\n * The layout's own commands, first in its form and open: another shape, its columns removed with their content kept,\n * or deleted with it, which asks first when there is content to lose. Its style sections follow, closed.\n */\n #layout(): TemplateResult | typeof nothing {\n const styles = this.#styles();\n const state = styles?.layout?.() ?? null;\n if (styles?.editLayout === undefined || state === null) return nothing;\n const ask = this.#askDelete;\n return html`<details open part=\"section\" data-section=\"layout\">\n <summary>${this.t('layout.section')}</summary>\n <div class=\"fields\">\n <div class=\"field wide\" part=\"field\">\n <label for=\"layout-shape\" part=\"label\">${this.t('layout.change')}</label>\n <select\n id=\"layout-shape\"\n @change=${(event: Event) => {\n const value = (event.target as HTMLSelectElement).value;\n if (value !== '') this.#editLayout(value as EditorLayoutShape);\n }}\n >\n ${state.shape === null ? html`<option value=\"\" selected>${this.t('layout.other')}</option>` : nothing}\n ${LAYOUT_SHAPES.map(\n (shape) =>\n html`<option value=${shape} ?selected=${shape === state.shape}>\n ${this.t(`insert.layout.${shape}`)}\n </option>`,\n )}\n </select>\n </div>\n <div class=\"layout wide field\" role=\"group\" aria-label=${this.t('layout.section')}>\n ${\n ask\n ? html`<span role=\"alert\">${this.t('layout.confirm')}</span>\n <button type=\"button\" @click=${() => this.#editLayout('delete')}>\n ${this.t('layout.confirmDelete')}\n </button>\n <button\n type=\"button\"\n data-cancel\n @click=${() => {\n this.#askDelete = false;\n this.requestUpdate();\n }}\n >\n ${this.t('layout.cancel')}\n </button>`\n : html`<button type=\"button\" @click=${() => this.#editLayout('unwrap')}>\n ${this.t('layout.unwrap')}\n </button>\n <button\n type=\"button\"\n @click=${() => {\n if (state.empty) this.#editLayout('delete');\n else {\n this.#askDelete = true;\n this.requestUpdate();\n void this.updateComplete.then(() =>\n this.renderRoot.querySelector<HTMLElement>('[data-cancel]')?.focus(),\n );\n }\n }}\n >\n ${this.t('layout.delete')}\n </button>`\n }\n </div>\n </div>\n </details>`;\n }\n\n protected override render(): TemplateResult | typeof nothing {\n const styles = this.#styles();\n if (this.authoring === null) return nothing;\n const { lang, dir } = this.ui;\n const rule = this.#currentRule();\n const element = rule === null ? this.#element() : null;\n if (styles === null || (rule === null && element === null)) {\n return html`<p class=\"note\" lang=${lang} dir=${dir}>${this.t('style.form.none')}</p>`;\n }\n const style = rule?.style ?? element?.style ?? '';\n const declared = new Map(cleanStyle(style).declarations);\n const inFigure =\n element?.kind === 'picture' && styles.state().targets.some((one) => one.kind === 'figure');\n const kind =\n rule === null\n ? (element?.kind as EditorStyleTargetKind)\n : rule.name !== undefined\n ? 'named'\n : rule.for === 'img'\n ? 'picture'\n : 'tag';\n const sections = sectionsOf(kind, inFigure);\n const own = this.#draft ?? style;\n // A layout's form starts with its commands; then its style, closed.\n const layout = element?.kind === 'layout';\n return html`<div class=\"form\" part=\"root\" lang=${lang} dir=${dir} data-kind=${kind}>\n ${layout ? this.#layout() : nothing}\n ${sections.map(\n (\n [section, fields],\n at,\n ) => html`<details ?open=${at === 0 && !layout} part=\"section\" data-section=${section}>\n <summary>${this.t(`style.section.${section}`)}</summary>\n <div class=\"fields\">${fields.map((field) => this.#field(field, declared, style, section))}</div>\n </details>`,\n )}\n ${element === null ? nothing : this.#named(element)}\n <details ?open=${!layout} part=\"section\" data-section=\"own\">\n <summary>${this.t('style.section.own')}</summary>\n <div class=\"fields\">\n <div class=\"field wide\" part=\"field\">\n <label for=\"own\" part=\"label\">${this.t('style.field.own')}</label>\n <textarea\n id=\"own\"\n rows=\"3\"\n spellcheck=\"false\"\n placeholder=\"background-color: #fff3cd; padding: 12px\"\n aria-describedby=${this.#refused.length > 0 ? 'own-refused' : nothing}\n .value=${live(own)}\n @change=${(event: Event) => this.#applyOwn((event.target as HTMLTextAreaElement).value)}\n ></textarea>\n <div role=\"alert\">${this.#refusedList()}</div>\n </div>\n </div>\n </details>\n </div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'astl-style-form': AstlStyleForm;\n }\n}\n"],"mappings":"A,2aAiDA,IAAMmB,EAAc,CAAE,KAAM,OAAQ,SAAU,aAAc,EACtDC,EAAe,CAAE,KAAM,SAAU,SAAU,QAAS,KAAM,IAAK,IAAK,EAAG,IAAK,GAAI,EAChFC,EAAkB,CAAE,KAAM,WAAY,SAAU,UAAW,EAE3DC,EAAgC,CACpCH,EACA,CAAE,KAAM,SAAU,SAAU,YAAa,KAAM,KAAM,IAAK,GAAI,IAAK,EAAG,EACtE,CAAE,KAAM,SAAU,SAAU,cAAe,QAAS,CAAC,SAAU,MAAM,CAAE,EACvE,CAAE,KAAM,SAAU,SAAU,aAAc,QAAS,CAAC,SAAU,QAAQ,CAAE,EACxE,CAAE,KAAM,QAAS,SAAU,OAAQ,EACnC,CAAE,KAAM,SAAU,SAAU,aAAc,QAAS,CAAC,QAAS,SAAU,MAAO,SAAS,CAAE,EACzF,CAAE,KAAM,SAAU,SAAU,cAAe,KAAM,GAAI,IAAK,GAAK,IAAK,EAAG,KAAM,GAAK,CACpF,EACMI,EAA+B,CACnC,CAAE,KAAM,QAAS,SAAU,kBAAmB,EAC9C,CAAE,KAAM,SAAU,SAAU,eAAgB,KAAM,KAAM,IAAK,EAAG,IAAK,EAAG,EACxE,CAAE,KAAM,SAAU,SAAU,eAAgB,QAAS,CAAC,OAAQ,QAAS,SAAU,SAAU,QAAQ,CAAE,EACrG,CAAE,KAAM,QAAS,SAAU,cAAe,EAC1C,CAAE,KAAM,SAAU,SAAU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
@@ -1,2 +1,2 @@
1
- import{t as e}from"./messages-9xiYDvRT.js";var t=[{namespace:e,locale:`en`,messages:{"style.section.text":`Text`,"style.section.box":`Background and border`,"style.section.spacing":`Spacing`,"style.section.size":`Size and position`,"style.section.named":`Named style`,"style.section.own":`Own CSS`,"style.field.font-family":`Font`,"style.field.font-size":`Font size`,"style.field.font-weight":`Weight`,"style.field.font-style":`Slant`,"style.field.color":`Text colour`,"style.field.text-align":`Alignment`,"style.field.line-height":`Line height`,"style.field.background-color":`Background`,"style.field.border-width":`Border width`,"style.field.border-style":`Border style`,"style.field.border-color":`Border colour`,"style.field.border-radius":`Corners`,"style.field.padding":`Padding`,"style.field.margin-block-start":`Space before`,"style.field.margin-block-end":`Space after`,"style.field.width":`Width`,"style.field.position":`Position`,"style.field.gap":`Space between columns`,"style.field.align-items":`Align columns`,"style.field.flex-grow":`Share of the width`,"style.field.named":`Style`,"style.field.own":`CSS declarations`,"style.value.normal":`Normal`,"style.value.bold":`Bold`,"style.value.italic":`Italic`,"style.value.start":`Left`,"style.value.center":`Centre`,"style.value.end":`Right`,"style.value.justify":`Justified`,"style.value.none":`None`,"style.value.solid":`Solid`,"style.value.dashed":`Dashed`,"style.value.dotted":`Dotted`,"style.value.double":`Double`,"style.value.stretch":`Same height`,"style.named.none":`No style`,"style.save.label":`Name of the new style`,"style.save":`Save as a style`,"style.refused.property":`"{name}" is not allowed: an exercise's style cannot move it out of its place, cover other content or load anything.`,"style.refused.value":`This value of "{name}" is not allowed: check its unit and its limits.`,"style.refused.text":`"{name}" is not a declaration: write it as property: value.`,"style.refused.length":`This style is too long: at most {max} characters.`,"style.rules.tags":`Text styles`,"style.rules.empty":`No styles of your own yet. Add one here, or save an element's style.`,"style.rules.edit":`Edit style: {label}`,"style.rules.rename":`Rename style: {label}`,"style.rules.renameShort":`Rename`,"style.rules.renameField":`New name of style: {label}`,"style.rules.delete":`Delete style: {label}`,"style.rules.deleteShort":`Delete`,"style.rules.newLabel":`Name of a new style`,"style.rules.add":`Add style`,"style.tag.paragraph":`Paragraph`,"style.tag.heading":`Heading`,"style.tag.subheading":`Subheading`,"style.tag.quote":`Quote`,"style.tag.list":`List`,"style.tag.caption":`Caption`,"style.tag.picture":`Picture`}},{namespace:e,locale:`pl`,messages:{"style.section.text":`Tekst`,"style.section.box":`Tło i obramowanie`,"style.section.spacing":`Odstępy`,"style.section.size":`Rozmiar i położenie`,"style.section.named":`Styl nazwany`,"style.section.own":`Własny CSS`,"style.field.font-family":`Czcionka`,"style.field.font-size":`Rozmiar czcionki`,"style.field.font-weight":`Grubość`,"style.field.font-style":`Pochylenie`,"style.field.color":`Kolor tekstu`,"style.field.text-align":`Wyrównanie`,"style.field.line-height":`Interlinia`,"style.field.background-color":`Tło`,"style.field.border-width":`Grubość obramowania`,"style.field.border-style":`Rodzaj obramowania`,"style.field.border-color":`Kolor obramowania`,"style.field.border-radius":`Narożniki`,"style.field.padding":`Wypełnienie`,"style.field.margin-block-start":`Odstęp przed`,"style.field.margin-block-end":`Odstęp po`,"style.field.width":`Szerokość`,"style.field.position":`Położenie`,"style.field.gap":`Odstęp między kolumnami`,"style.field.align-items":`Wyrównanie kolumn`,"style.field.flex-grow":`Udział w szerokości`,"style.field.named":`Styl`,"style.field.own":`Deklaracje CSS`,"style.value.normal":`Normalna`,"style.value.bold":`Pogrubiona`,"style.value.italic":`Pochylona`,"style.value.start":`Do lewej`,"style.value.center":`Do środka`,"style.value.end":`Do prawej`,"style.value.justify":`Wyjustowane`,"style.value.none":`Brak`,"style.value.solid":`Ciągłe`,"style.value.dashed":`Kreskowane`,"style.value.dotted":`Kropkowane`,"style.value.double":`Podwójne`,"style.value.stretch":`Równa wysokość`,"style.named.none":`Bez stylu`,"style.save.label":`Nazwa nowego stylu`,"style.save":`Zapisz jako styl`,"style.refused.property":`„{name}” jest niedozwolone: styl ćwiczenia nie może przenosić go poza jego miejsce, zasłaniać innych treści ani niczego wczytywać.`,"style.refused.value":`Ta wartość „{name}” jest niedozwolona: sprawdź jednostkę i dopuszczalny zakres.`,"style.refused.text":`„{name}” to nie jest deklaracja: wpisz ją jako właściwość: wartość.`,"style.refused.length":`Ten styl jest za długi: najwyżej {max} znaków.`,"style.rules.tags":`Style tekstu`,"style.rules.empty":`Nie masz jeszcze własnych stylów. Dodaj styl tutaj albo zapisz styl elementu.`,"style.rules.edit":`Edytuj styl: {label}`,"style.rules.rename":`Zmień nazwę stylu: {label}`,"style.rules.renameShort":`Zmień nazwę`,"style.rules.renameField":`Nowa nazwa stylu: {label}`,"style.rules.delete":`Usuń styl: {label}`,"style.rules.deleteShort":`Usuń`,"style.rules.newLabel":`Nazwa nowego stylu`,"style.rules.add":`Dodaj styl`,"style.tag.paragraph":`Akapit`,"style.tag.heading":`Nagłówek`,"style.tag.subheading":`Podtytuł`,"style.tag.quote":`Cytat`,"style.tag.list":`Lista`,"style.tag.caption":`Podpis`,"style.tag.picture":`Obrazek`}}];export{t};
2
- //# sourceMappingURL=style-messages-BbZpeD2a.js.map
1
+ import{t as e}from"./messages-Qzse5KMX.js";var t=[{namespace:e,locale:`en`,messages:{"style.section.text":`Text`,"style.section.box":`Background and border`,"style.section.spacing":`Spacing`,"style.section.size":`Size and position`,"style.section.named":`Named style`,"style.section.own":`Own CSS`,"style.field.font-family":`Font`,"style.field.font-size":`Font size`,"style.field.font-weight":`Weight`,"style.field.font-style":`Slant`,"style.field.color":`Text colour`,"style.field.text-align":`Alignment`,"style.field.line-height":`Line height`,"style.field.background-color":`Background`,"style.field.border-width":`Border width`,"style.field.border-style":`Border style`,"style.field.border-color":`Border colour`,"style.field.border-radius":`Corners`,"style.field.padding":`Padding`,"style.field.margin-block-start":`Space before`,"style.field.margin-block-end":`Space after`,"style.field.width":`Width`,"style.field.position":`Position`,"style.field.gap":`Space between columns`,"style.field.align-items":`Align columns`,"style.field.flex-grow":`Share of the width`,"style.field.named":`Style`,"style.field.own":`CSS declarations`,"style.value.normal":`Normal`,"style.value.bold":`Bold`,"style.value.italic":`Italic`,"style.value.start":`Left`,"style.value.center":`Centre`,"style.value.end":`Right`,"style.value.justify":`Justified`,"style.value.none":`None`,"style.value.solid":`Solid`,"style.value.dashed":`Dashed`,"style.value.dotted":`Dotted`,"style.value.double":`Double`,"style.value.stretch":`Same height`,"style.named.none":`No style`,"style.save.label":`Name of the new style`,"style.save":`Save as a style`,"style.refused.property":`"{name}" is not allowed: an exercise's style cannot move it out of its place, cover other content or load anything.`,"style.refused.value":`This value of "{name}" is not allowed: check its unit and its limits.`,"style.refused.text":`"{name}" is not a declaration: write it as property: value.`,"style.refused.length":`This style is too long: at most {max} characters.`,"style.rules.tags":`Text styles`,"style.rules.empty":`No styles of your own yet. Add one here, or save an element's style.`,"style.rules.edit":`Edit style: {label}`,"style.rules.rename":`Rename style: {label}`,"style.rules.renameShort":`Rename`,"style.rules.renameField":`New name of style: {label}`,"style.rules.delete":`Delete style: {label}`,"style.rules.deleteShort":`Delete`,"style.rules.newLabel":`Name of a new style`,"style.rules.add":`Add style`,"style.tag.paragraph":`Paragraph`,"style.tag.heading":`Heading`,"style.tag.subheading":`Subheading`,"style.tag.quote":`Quote`,"style.tag.list":`List`,"style.tag.caption":`Caption`,"style.tag.picture":`Picture`}},{namespace:e,locale:`pl`,messages:{"style.section.text":`Tekst`,"style.section.box":`Tło i obramowanie`,"style.section.spacing":`Odstępy`,"style.section.size":`Rozmiar i położenie`,"style.section.named":`Styl nazwany`,"style.section.own":`Własny CSS`,"style.field.font-family":`Czcionka`,"style.field.font-size":`Rozmiar czcionki`,"style.field.font-weight":`Grubość`,"style.field.font-style":`Pochylenie`,"style.field.color":`Kolor tekstu`,"style.field.text-align":`Wyrównanie`,"style.field.line-height":`Interlinia`,"style.field.background-color":`Tło`,"style.field.border-width":`Grubość obramowania`,"style.field.border-style":`Rodzaj obramowania`,"style.field.border-color":`Kolor obramowania`,"style.field.border-radius":`Narożniki`,"style.field.padding":`Wypełnienie`,"style.field.margin-block-start":`Odstęp przed`,"style.field.margin-block-end":`Odstęp po`,"style.field.width":`Szerokość`,"style.field.position":`Położenie`,"style.field.gap":`Odstęp między kolumnami`,"style.field.align-items":`Wyrównanie kolumn`,"style.field.flex-grow":`Udział w szerokości`,"style.field.named":`Styl`,"style.field.own":`Deklaracje CSS`,"style.value.normal":`Normalna`,"style.value.bold":`Pogrubiona`,"style.value.italic":`Pochylona`,"style.value.start":`Do lewej`,"style.value.center":`Do środka`,"style.value.end":`Do prawej`,"style.value.justify":`Wyjustowane`,"style.value.none":`Brak`,"style.value.solid":`Ciągłe`,"style.value.dashed":`Kreskowane`,"style.value.dotted":`Kropkowane`,"style.value.double":`Podwójne`,"style.value.stretch":`Równa wysokość`,"style.named.none":`Bez stylu`,"style.save.label":`Nazwa nowego stylu`,"style.save":`Zapisz jako styl`,"style.refused.property":`„{name}” jest niedozwolone: styl ćwiczenia nie może przenosić go poza jego miejsce, zasłaniać innych treści ani niczego wczytywać.`,"style.refused.value":`Ta wartość „{name}” jest niedozwolona: sprawdź jednostkę i dopuszczalny zakres.`,"style.refused.text":`„{name}” to nie jest deklaracja: wpisz ją jako właściwość: wartość.`,"style.refused.length":`Ten styl jest za długi: najwyżej {max} znaków.`,"style.rules.tags":`Style tekstu`,"style.rules.empty":`Nie masz jeszcze własnych stylów. Dodaj styl tutaj albo zapisz styl elementu.`,"style.rules.edit":`Edytuj styl: {label}`,"style.rules.rename":`Zmień nazwę stylu: {label}`,"style.rules.renameShort":`Zmień nazwę`,"style.rules.renameField":`Nowa nazwa stylu: {label}`,"style.rules.delete":`Usuń styl: {label}`,"style.rules.deleteShort":`Usuń`,"style.rules.newLabel":`Nazwa nowego stylu`,"style.rules.add":`Dodaj styl`,"style.tag.paragraph":`Akapit`,"style.tag.heading":`Nagłówek`,"style.tag.subheading":`Podtytuł`,"style.tag.quote":`Cytat`,"style.tag.list":`Lista`,"style.tag.caption":`Podpis`,"style.tag.picture":`Obrazek`}}];export{t};
2
+ //# sourceMappingURL=style-messages-B136zSom.js.map