nuvra 0.4.1 → 0.6.0

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 (62) hide show
  1. package/README.md +241 -19
  2. package/dist/compare.vue.d.ts +19 -0
  3. package/dist/components/document-editor.vue.d.ts +59 -3
  4. package/dist/components/editor-canvas.vue.d.ts +9 -7
  5. package/dist/components/editor-changes.vue.d.ts +18 -0
  6. package/dist/components/editor-collaborators.vue.d.ts +17 -0
  7. package/dist/components/editor-comments.vue.d.ts +32 -0
  8. package/dist/components/editor-footnote-form.vue.d.ts +19 -0
  9. package/dist/components/editor-outline.vue.d.ts +36 -0
  10. package/dist/components/editor-slash-menu.vue.d.ts +13 -0
  11. package/dist/components/editor-toolbar.vue.d.ts +24 -1
  12. package/dist/core/collaboration.d.ts +25 -0
  13. package/dist/core/comments.d.ts +26 -0
  14. package/dist/core/dates.d.ts +8 -0
  15. package/dist/core/diff.d.ts +11 -0
  16. package/dist/core/document-templates.d.ts +22 -0
  17. package/dist/core/docx/export.d.ts +19 -0
  18. package/dist/core/docx/import.d.ts +19 -0
  19. package/dist/core/docx/zip.d.ts +23 -0
  20. package/dist/core/engine/dom.d.ts +40 -3
  21. package/dist/core/engine/editing.d.ts +11 -0
  22. package/dist/core/engine/engine.d.ts +161 -3
  23. package/dist/core/engine/input-rules.d.ts +3 -1
  24. package/dist/core/engine/marks.d.ts +50 -1
  25. package/dist/core/engine/schema.d.ts +9 -2
  26. package/dist/core/export.d.ts +13 -5
  27. package/dist/core/footnotes.d.ts +15 -0
  28. package/dist/core/icons.d.ts +1 -1
  29. package/dist/core/labels.d.ts +6 -2
  30. package/dist/core/locales/uz-cyrl.d.ts +3 -0
  31. package/dist/core/locales/uz.d.ts +72 -1
  32. package/dist/core/numbers.d.ts +19 -0
  33. package/dist/core/outline.d.ts +44 -0
  34. package/dist/core/page.d.ts +12 -2
  35. package/dist/core/pagination.d.ts +25 -3
  36. package/dist/core/pdf.d.ts +43 -0
  37. package/dist/core/signature.d.ts +15 -0
  38. package/dist/core/slash-commands.d.ts +19 -0
  39. package/dist/core/templates.d.ts +32 -0
  40. package/dist/core/transliterate.d.ts +13 -0
  41. package/dist/core/types.d.ts +1 -1
  42. package/dist/core/ui-state.d.ts +8 -0
  43. package/dist/editor.vue.d.ts +6 -2
  44. package/dist/export-B06RXLqn.js +96 -0
  45. package/dist/export-B06RXLqn.js.map +1 -0
  46. package/dist/footnotes-DBShImw7.js +11 -0
  47. package/dist/footnotes-DBShImw7.js.map +1 -0
  48. package/dist/form.vue.d.ts +39 -0
  49. package/dist/index.d.ts +28 -1
  50. package/dist/index.js +8391 -4198
  51. package/dist/index.js.map +1 -1
  52. package/dist/{page-DL7Oj2o8.js → page-DY5fdgcT.js} +10 -10
  53. package/dist/page-DY5fdgcT.js.map +1 -0
  54. package/dist/pdf-mIRjnoOP.js +70 -0
  55. package/dist/pdf-mIRjnoOP.js.map +1 -0
  56. package/dist/style.css +1 -1
  57. package/dist/zip-CpbwZtot.js +46 -0
  58. package/dist/zip-CpbwZtot.js.map +1 -0
  59. package/package.json +5 -2
  60. package/dist/export-VeTfgCEp.js +0 -117
  61. package/dist/export-VeTfgCEp.js.map +0 -1
  62. package/dist/page-DL7Oj2o8.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"export-VeTfgCEp.js","names":[],"sources":["../src/styles/document-content.css?inline","../src/core/export.ts"],"sourcesContent":["/*\n * Typography of the document itself. Shared by the editor page, print output and Word/HTML export,\n * so every rule is plain CSS scoped to `.doc-content`. Vertical rhythm uses bottom margins only:\n * no margin collapsing keeps page layout measurements exact.\n */\n\n/* Base text. Typed spaces are content, so they are kept exactly. */\n.doc-content {\n color: #1f2328;\n font-family: \"Times New Roman\", Times, serif;\n font-size: 12pt;\n line-height: 1.5;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n tab-size: 4;\n}\n\n/* Paragraphs without an explicit direction follow their own text (Arabic and Latin in one document). */\n.doc-content :is(p, h1, h2, h3, h4, h5, h6):not([dir]) {\n unicode-bidi: plaintext;\n}\n\n/* Paragraphs and headings. */\n.doc-content p {\n margin: 0 0 6pt;\n}\n\n.doc-content h1,\n.doc-content h2,\n.doc-content h3,\n.doc-content h4,\n.doc-content h5,\n.doc-content h6 {\n margin: 0 0 6pt;\n padding-top: 6pt;\n font-weight: 700;\n line-height: 1.25;\n}\n\n.doc-content h1 {\n font-size: 20pt;\n}\n\n.doc-content h2 {\n font-size: 16pt;\n}\n\n.doc-content h3 {\n font-size: 14pt;\n}\n\n.doc-content h4 {\n font-size: 12pt;\n}\n\n.doc-content h5 {\n font-size: 11pt;\n}\n\n.doc-content h6 {\n font-size: 10pt;\n}\n\n/* Lists, including task lists with a checkbox label and a content column. */\n.doc-content ul,\n.doc-content ol {\n margin: 0 0 6pt;\n padding-left: 24pt;\n}\n\n.doc-content li > p {\n margin-bottom: 2pt;\n}\n\n.doc-content ul[data-type=\"taskList\"] {\n padding-left: 2pt;\n list-style: none;\n}\n\n.doc-content ul[data-type=\"taskList\"] li {\n display: flex;\n align-items: flex-start;\n gap: 6pt;\n}\n\n.doc-content ul[data-type=\"taskList\"] li > label {\n flex: 0 0 auto;\n margin-top: 0.3em;\n user-select: none;\n}\n\n.doc-content ul[data-type=\"taskList\"] li > div {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.doc-content ul[data-type=\"taskList\"] li[data-checked=\"true\"] > div {\n color: #667085;\n text-decoration: line-through;\n}\n\n/* Quotes. */\n.doc-content blockquote {\n margin: 0 0 6pt;\n padding: 2pt 0 2pt 12pt;\n border-left: 3px solid #b3c5f5;\n color: #475467;\n}\n\n/* The last paragraph of a container adds no space below it. */\n.doc-content blockquote > p:last-child,\n.doc-content li > p:last-child,\n.doc-content td > p:last-child,\n.doc-content th > p:last-child {\n margin-bottom: 0;\n}\n\n/* Code blocks and inline code. */\n.doc-content pre {\n margin: 0 0 6pt;\n padding: 8pt 10pt;\n border-radius: 4px;\n background: #f4f6f8;\n font-family: Consolas, \"Courier New\", monospace;\n font-size: 10pt;\n line-height: 1.45;\n white-space: pre-wrap;\n}\n\n.doc-content code {\n padding: 1px 4px;\n border-radius: 3px;\n background: #eef1f4;\n font-family: Consolas, \"Courier New\", monospace;\n font-size: 0.9em;\n}\n\n.doc-content pre code {\n padding: 0;\n background: none;\n font-size: inherit;\n}\n\n/* Horizontal rule. */\n.doc-content hr {\n height: 0;\n margin: 0 0 6pt;\n padding-top: 6pt;\n border: 0;\n border-bottom: 1px solid #c4cad4;\n}\n\n/* Inline marks. */\n.doc-content a {\n color: #1d4ed8;\n text-decoration: underline;\n}\n\n.doc-content mark {\n padding: 0 1px;\n border-radius: 2px;\n color: inherit;\n}\n\n/* Images are blocks aligned through their data-align attribute. */\n.doc-content img {\n max-width: 100%;\n height: auto;\n}\n\n.doc-content img[data-align=\"left\"] {\n display: block;\n margin: 0 auto 6pt 0;\n}\n\n.doc-content img[data-align=\"center\"] {\n display: block;\n margin: 0 auto 6pt;\n}\n\n.doc-content img[data-align=\"right\"] {\n display: block;\n margin: 0 0 6pt auto;\n}\n\n/* Tables. */\n.doc-content table {\n width: 100%;\n margin: 0 0 6pt;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\n.doc-content td,\n.doc-content th {\n box-sizing: border-box;\n min-width: 1em;\n padding: 3pt 5pt;\n border: 1px solid #8f99a8;\n vertical-align: top;\n}\n\n.doc-content th {\n background: #f2f4f7;\n font-weight: 700;\n text-align: left;\n}\n\n/* Manual page break: invisible in print, where it starts a new sheet. */\n.doc-content .doc-page-break {\n height: 0;\n break-after: page;\n page-break-after: always;\n}\n","import contentCss from '../styles/document-content.css?inline';\nimport {\n type HeaderFooterContext,\n PAGE_SIZES,\n type PageHeaderFooter,\n type PageSettings,\n type PageWatermark,\n WATERMARK_ANGLE,\n hasHeaderFooterText,\n hasWatermarkText,\n renderHeaderFooter,\n watermarkFontSize\n} from './page';\n\n/** Everything needed to print or export the document. */\ninterface DocumentSnapshot {\n /** Clean document HTML, used when the document is not laid out in sheets. */\n html: string;\n /**\n * Clean HTML of every sheet, in document order. The page view passes it so printing repeats the header and footer\n * with real page numbers and breaks the pages exactly where the editor shows them.\n */\n pages?: string[];\n /** Document title, used for the print title and file names. */\n title: string;\n /** Page size, orientation, margins and the running texts. */\n page: PageSettings;\n}\n\n/** Makes Word detect UTF-8 instead of the system code page. */\nconst BYTE_ORDER_MARK = String.fromCharCode(0xfe_ff);\n/** Characters escaped when text is placed into HTML. */\nconst HTML_ESCAPES: Record<string, string> = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;', \"'\": '&#39;' };\n/** Page break markup of the editor. */\nconst PAGE_BREAK_PATTERN = /<div[^>]*data-type=\"page-break\"[^>]*><\\/div>/g;\n/** Page break markup Word understands. */\nconst WORD_PAGE_BREAK = '<br clear=\"all\" style=\"page-break-before: always\">';\n/** Characters not allowed in file names on common systems. */\nconst INVALID_FILE_NAME_CHARACTERS = /[\\\\/:*?\"<>|]+/g;\n/** File name used when the title is empty. */\nconst DEFAULT_FILE_NAME = 'document';\n/** Removes the print iframe even when the browser never reports `afterprint`. */\nconst PRINT_CLEANUP_TIMEOUT_MS = 60_000;\n/** Distance a running text keeps from the paper edge when its margin is too small to centre it in, in millimetres. */\nconst MIN_RUNNING_EDGE_MM = 4;\n/** CSS pixels per millimetre at 96 DPI, used to size the watermark for the paper. */\nconst PX_PER_MM = 96 / 25.4;\n/** How faintly the watermark is printed. */\nconst WATERMARK_OPACITY = 0.16;\n/** The three parts of a running text, in the order they are drawn. */\nconst RUNNING_PARTS = ['left', 'center', 'right'] as const;\n/** Splits a running text at the page tokens, so they can become Word fields while the rest stays escaped text. */\nconst PAGE_TOKEN_SPLIT = /(\\{page\\}|\\{pages\\})/g;\n/** Styles that keep the print iframe out of view without `display: none`, which would stop it from printing. */\nconst HIDDEN_FRAME_STYLE: Partial<CSSStyleDeclaration> = {\n position: 'fixed',\n left: '-10000px',\n top: '0',\n width: '1px',\n height: '1px',\n border: '0'\n};\n\n/** Escapes text for use inside HTML. */\nconst escapeHtml = (value: string) => value.replace(/[&<>\"']/g, character => HTML_ESCAPES[character] ?? character);\n\n/** Paper width and height in millimetres, in the chosen orientation. */\nconst paperSize = ({ size, orientation }: PageSettings) => {\n const paper = PAGE_SIZES[size] ?? PAGE_SIZES.a4;\n const portrait = orientation === 'portrait';\n return { width: portrait ? paper.width : paper.height, height: portrait ? paper.height : paper.width };\n};\n\n/** CSS declarations for `@page` with the paper size and margins of the page settings. */\nconst pageRule = (page: PageSettings) => {\n const { width, height } = paperSize(page);\n const { margins } = page;\n return `size: ${width}mm ${height}mm; margin: ${margins.top}mm ${margins.right}mm ${margins.bottom}mm ${margins.left}mm;`;\n};\n\n/** Distance of a running text from the top or bottom edge of the paper, centred in its margin. */\nconst runningEdge = (margin: number) => Math.max(MIN_RUNNING_EDGE_MM, margin / 2 - 2);\n\n/** Shared look of the header and footer, both in print and in the exported page. */\nconst RUNNING_CSS = `\n.doc-running { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; color: #475467; font: 10pt/1.4 'Times New Roman', Times, serif; }\n.doc-running span { min-width: 0; overflow: hidden; white-space: pre-wrap; }\n.doc-running span:nth-child(2) { text-align: center; }\n.doc-running span:nth-child(3) { text-align: right; }`;\n\n/** One running text rendered for a page, or an empty string when it holds no text. */\nconst runningHtml = (\n value: PageHeaderFooter | undefined,\n place: 'header' | 'footer',\n context: HeaderFooterContext\n): string => {\n if (!value || !hasHeaderFooterText(value)) return '';\n const parts = RUNNING_PARTS.map(part => `<span>${escapeHtml(renderHeaderFooter(value[part], context))}</span>`).join(\n ''\n );\n return `<div class=\"doc-running doc-running--${place}\">${parts}</div>`;\n};\n\n/** The watermark of a page, or an empty string when the document has none. */\nconst watermarkHtml = (watermark: PageWatermark | undefined): string =>\n hasWatermarkText(watermark) && watermark\n ? `<div class=\"doc-watermark\">${escapeHtml(watermark.text.trim())}</div>`\n : '';\n\n/** Look of the watermark; it is positioned per sheet when the pages are known, and fixed when the document flows. */\nconst watermarkCss = (page: PageSettings, fixed: boolean): string => {\n const { watermark } = page;\n if (!hasWatermarkText(watermark) || !watermark) return '';\n const { width, height } = paperSize(page);\n const size = watermarkFontSize(width * PX_PER_MM, height * PX_PER_MM, watermark.text, watermark.diagonal);\n const rotation = watermark.diagonal ? ` transform: rotate(${WATERMARK_ANGLE}deg);` : '';\n return `\n.doc-watermark { position: ${fixed ? 'fixed' : 'absolute'}; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; color: ${watermark.color}; font: 700 ${size}px/1 'Times New Roman', Times, serif; letter-spacing: 0.06em; opacity: ${WATERMARK_OPACITY}; text-transform: uppercase; white-space: nowrap; pointer-events: none;${rotation} }`;\n};\n\n/** Sheets with their own header and footer, used when the editor knows where the pages break. */\nconst sheetsHtml = (pages: string[], page: PageSettings, title: string): string =>\n pages\n .map((content, index) => {\n const context: HeaderFooterContext = { page: index + 1, pages: pages.length, title };\n const header = runningHtml(page.header, 'header', context);\n const footer = runningHtml(page.footer, 'footer', context);\n const watermark = watermarkHtml(page.watermark);\n return `<section class=\"doc-sheet\">${watermark}${header}<article class=\"doc-content\">${content}</article>${footer}</section>`;\n })\n .join('');\n\n/** Page geometry of the sheet layout: the paper is the page box and every sheet carries the margins itself. */\nconst sheetCss = (page: PageSettings) => {\n const { width, height } = paperSize(page);\n const { margins } = page;\n return `@page { size: ${width}mm ${height}mm; margin: 0; }\n.doc-sheet { position: relative; box-sizing: border-box; width: ${width}mm; min-height: ${height}mm; padding: ${margins.top}mm ${margins.right}mm ${margins.bottom}mm ${margins.left}mm; overflow: hidden; background: #fff; break-after: page; }\n.doc-sheet:last-child { break-after: auto; }\n.doc-running { position: absolute; right: ${margins.right}mm; left: ${margins.left}mm; }\n.doc-running--header { top: ${runningEdge(margins.top)}mm; }\n.doc-running--footer { bottom: ${runningEdge(margins.bottom)}mm; }${RUNNING_CSS}${watermarkCss(page, false)}`;\n};\n\n/** Page geometry of the flowing layout, where the browser breaks the pages and repeats the fixed running texts. */\nconst flowCss = (page: PageSettings) => {\n const { margins } = page;\n return `@page { ${pageRule(page)} }\n.doc-running { position: fixed; right: 0; left: 0; }\n.doc-running--header { top: -${runningEdge(margins.top)}mm; }\n.doc-running--footer { bottom: -${runningEdge(margins.bottom)}mm; }${RUNNING_CSS}${watermarkCss(page, true)}`;\n};\n\n/** Turns a document title into a safe file name without extension. */\nexport const toFileName = (title: string): string =>\n title.replace(INVALID_FILE_NAME_CHARACTERS, ' ').trim() || DEFAULT_FILE_NAME;\n\n/**\n * Standalone HTML with the page size, margins and running texts encoded in CSS, used for printing and HTML export.\n * With the sheets of the page view every page carries its own header and footer, so the page numbers are exact and\n * the pages break where the editor shows them; without them the document flows and the browser repeats one fixed\n * header and footer on every page.\n */\nexport const buildPrintableHtml = ({ html, pages, title, page }: DocumentSnapshot): string => {\n const paginated = pages !== undefined && pages.length > 0;\n const context: HeaderFooterContext = { page: 1, pages: 1, title };\n const flow = `${watermarkHtml(page.watermark)}${runningHtml(page.header, 'header', context)}${runningHtml(page.footer, 'footer', context)}<article class=\"doc-content\">${html}</article>`;\n return `<!doctype html>\n<html lang=\"uz\">\n<head>\n<meta charset=\"utf-8\">\n<title>${escapeHtml(title)}</title>\n<style>${paginated ? sheetCss(page) : flowCss(page)} html, body { margin: 0; background: #fff; } ${contentCss}</style>\n</head>\n<body>${paginated && pages ? sheetsHtml(pages, page, title) : flow}</body>\n</html>`;\n};\n\n/** Word field that counts pages; Word fills it in itself, so an exported document numbers its pages correctly. */\nconst wordField = (code: 'PAGE' | 'NUMPAGES') => `<span style='mso-field-code:${code}'>1</span>`;\n\n/**\n * Watermark in the form Word writes its own watermarks in: a VML shape inside the header. Browsers skip it, because\n * it sits in a conditional comment only Word reads.\n */\nconst wordWatermark = (watermark: PageWatermark | undefined): string => {\n if (!hasWatermarkText(watermark) || !watermark) return '';\n const rotation = watermark.diagonal ? 315 : 0;\n return `<!--[if gte vml 1]><v:shapetype id=\"_x0000_t136\" coordsize=\"21600,21600\" o:spt=\"136\" adj=\"10800\" path=\"m@7,l@8,m@5,21600l@6,21600e\"/><v:shape id=\"NuvraWatermark\" type=\"#_x0000_t136\" style='position:absolute;margin-left:0;margin-top:0;width:468pt;height:117pt;rotation:${rotation};z-index:-251658752;mso-position-horizontal:center;mso-position-horizontal-relative:margin;mso-position-vertical:center;mso-position-vertical-relative:margin' fillcolor=\"${escapeHtml(watermark.color)}\" stroked=\"f\"><v:fill opacity=\"${WATERMARK_OPACITY}\"/><v:textpath style='font-family:\"Times New Roman\";font-size:1pt' string=\"${escapeHtml(watermark.text.trim())}\"/></v:shape><![endif]-->`;\n};\n\n/** A running text for Word, where the page tokens become the Word fields Word counts itself. */\nconst wordRunning = (\n value: PageHeaderFooter | undefined,\n place: 'header' | 'footer',\n title: string,\n extra = ''\n): string => {\n const hasText = value !== undefined && hasHeaderFooterText(value);\n if (!hasText && !extra) return '';\n const render = (text: string) =>\n text\n .split(PAGE_TOKEN_SPLIT)\n .map(chunk => {\n if (chunk === '{page}') return wordField('PAGE');\n if (chunk === '{pages}') return wordField('NUMPAGES');\n return escapeHtml(renderHeaderFooter(chunk, { page: 1, pages: 1, title }));\n })\n .join('');\n const [left, center, right] = RUNNING_PARTS.map(part => (hasText && value ? render(value[part]) : ''));\n return `<div style='mso-element:${place}' id='${place === 'header' ? 'h1' : 'f1'}'>${extra}\n<table width=\"100%\" style='border-collapse:collapse'><tr>\n<td style='border:none;padding:0'>${left}</td>\n<td style='border:none;padding:0;text-align:center'>${center}</td>\n<td style='border:none;padding:0;text-align:right'>${right}</td>\n</tr></table></div>`;\n};\n\n/** Word opens HTML saved with the Office namespaces as a regular document in print layout. */\nexport const buildWordHtml = ({ html, title, page }: DocumentSnapshot): string => {\n const body = html.replace(PAGE_BREAK_PATTERN, WORD_PAGE_BREAK);\n const header = wordRunning(page.header, 'header', title, wordWatermark(page.watermark));\n const footer = wordRunning(page.footer, 'footer', title);\n const running = `${header ? ' mso-header: h1;' : ''}${footer ? ' mso-footer: f1;' : ''}`;\n return `${BYTE_ORDER_MARK}<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" xmlns=\"http://www.w3.org/TR/REC-html40\">\n<head>\n<meta charset=\"utf-8\">\n<title>${escapeHtml(title)}</title>\n<!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:Zoom>100</w:Zoom></w:WordDocument></xml><![endif]-->\n<style>@page Section1 { ${pageRule(page)}${running} } div.Section1 { page: Section1; } ${contentCss}</style>\n</head>\n<body><div class=\"Section1 doc-content\">${body}</div>${header}${footer}</body>\n</html>`;\n};\n\n/** Offers text content as a file download. */\nexport const downloadFile = (content: string, fileName: string, type: string): void => {\n const url = URL.createObjectURL(new Blob([content], { type }));\n const link = document.createElement('a');\n link.href = url;\n link.download = fileName;\n link.click();\n setTimeout(() => URL.revokeObjectURL(url), 0);\n};\n\n/** Prints through a detached iframe so the application chrome never ends up on paper. Waits for images first. */\nexport const printHtml = (documentHtml: string): void => {\n const frame = document.createElement('iframe');\n frame.setAttribute('aria-hidden', 'true');\n frame.tabIndex = -1;\n Object.assign(frame.style, HIDDEN_FRAME_STYLE);\n\n /** Removes the iframe once printing is done. */\n const cleanup = () => frame.remove();\n frame.onload = () => {\n const printWindow = frame.contentWindow;\n if (!printWindow) return cleanup();\n const pendingImages = Array.from(printWindow.document.images)\n .filter(image => !image.complete)\n .map(\n image =>\n new Promise(resolve => {\n image.addEventListener('load', resolve, { once: true });\n image.addEventListener('error', resolve, { once: true });\n })\n );\n void Promise.allSettled(pendingImages).then(() => {\n printWindow.addEventListener('afterprint', () => setTimeout(cleanup, 0), { once: true });\n printWindow.focus();\n printWindow.print();\n setTimeout(cleanup, PRINT_CLEANUP_TIMEOUT_MS);\n });\n };\n frame.srcdoc = documentHtml;\n document.body.appendChild(frame);\n};\n"],"mappings":";;yiFC8BM,IAAkB,KAElB,IAAuC;CAAE,KAAK;CAAS,KAAK;CAAQ,KAAK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,oBAAoB,WAAW,GAAS,CAAC,GAAG,EAAE,MAAM,GAAK,CAAC,GACvF,EAAY,MAAM,GAClB,EAAY,MAAM,GAClB,WAAW,GAAS,CAAwB;EAC9C,CAAC;CACH,GACA,EAAM,SAAS,GACf,SAAS,KAAK,YAAY,CAAK;AACjC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-DL7Oj2o8.js","names":[],"sources":["../src/core/page.ts"],"sourcesContent":["/** Supported paper formats. */\nexport type PageSizeKey = 'a3' | 'a4' | 'a5' | 'letter' | 'legal';\n/** Paper orientation. */\nexport type PageOrientation = 'portrait' | 'landscape';\n/** `page` shows sheets like a word processor, `web` a continuous surface. */\nexport type DocumentViewMode = 'page' | 'web';\n\n/** Page margins in millimetres. */\nexport interface PageMargins {\n /** Top margin. */\n top: number;\n /** Right margin. */\n right: number;\n /** Bottom margin. */\n bottom: number;\n /** Left margin. */\n left: number;\n}\n\n/** Text repeated in the top or bottom margin of every page, in three aligned parts as in office suites. */\nexport interface PageHeaderFooter {\n /** Left-aligned part. */\n left: string;\n /** Centred part. */\n center: string;\n /** Right-aligned part. */\n right: string;\n}\n\n/** Text drawn behind the content of every page, such as “DRAFT” or “COPY”. */\nexport interface PageWatermark {\n /** Text of the watermark; without it the page has none. */\n text: string;\n /** Colour of the text; it is drawn faintly, so a mid grey suits most documents. */\n color: string;\n /** Whether the text runs diagonally across the page instead of straight across it. */\n diagonal: boolean;\n}\n\n/** Page setup chosen by the user; the host can persist it with `v-model:page`. */\nexport interface PageSettings {\n /** Paper format. */\n size: PageSizeKey;\n /** Paper orientation. */\n orientation: PageOrientation;\n /** Margins in millimetres. */\n margins: PageMargins;\n /** Text repeated in the top margin of every page; omitted while the document has no header. */\n header?: PageHeaderFooter;\n /** Text repeated in the bottom margin of every page; omitted while the document has no footer. */\n footer?: PageHeaderFooter;\n /** Watermark drawn behind the text of every page; omitted while the document has none. */\n watermark?: PageWatermark;\n}\n\n/** Page geometry in CSS pixels, ready for layout. */\nexport interface PageMetrics {\n /** Sheet width. */\n width: number;\n /** Sheet height. */\n height: number;\n /** Grey space between two sheets. */\n gap: number;\n /** Top margin. */\n marginTop: number;\n /** Right margin. */\n marginRight: number;\n /** Bottom margin. */\n marginBottom: number;\n /** Left margin. */\n marginLeft: number;\n}\n\n/** Portrait dimensions of a paper format in millimetres. */\ninterface PaperSize {\n /** Name shown in the page setup. */\n label: string;\n /** Portrait width. */\n width: number;\n /** Portrait height. */\n height: number;\n}\n\n/** Paper sizes in millimetres (portrait). */\nexport const PAGE_SIZES: Record<PageSizeKey, PaperSize> = {\n a3: { label: 'A3', width: 297, height: 420 },\n a4: { label: 'A4', width: 210, height: 297 },\n a5: { label: 'A5', width: 148, height: 210 },\n letter: { label: 'Letter', width: 215.9, height: 279.4 },\n legal: { label: 'Legal', width: 215.9, height: 355.6 }\n};\n\n/** Margin presets offered by the page setup, in millimetres; the key doubles as the label suffix. */\nexport const MARGIN_PRESETS = [\n { key: 'normal', margins: { top: 25.4, right: 25.4, bottom: 25.4, left: 25.4 } },\n { key: 'narrow', margins: { top: 12.7, right: 12.7, bottom: 12.7, left: 12.7 } },\n { key: 'moderate', margins: { top: 25.4, right: 19.1, bottom: 25.4, left: 19.1 } },\n { key: 'wide', margins: { top: 25.4, right: 50.8, bottom: 25.4, left: 50.8 } },\n /** O‘zDSt 1.14 requisites for official documents. */\n { key: 'official', margins: { top: 20, right: 15, bottom: 20, left: 30 } }\n] as const satisfies ReadonlyArray<{ key: string; margins: PageMargins }>;\n\n/** Smallest zoom in percent; low enough for an A4 sheet to fit a phone screen. */\nexport const ZOOM_MIN = 30;\n/** Largest zoom in percent. */\nexport const ZOOM_MAX = 200;\n/** Zoom change per step of the zoom buttons and slider, in percent. */\nexport const ZOOM_STEP = 10;\n\n/** Grey space between two sheets in page view, in CSS pixels. */\nconst PAGE_GAP = 20;\n/** CSS pixels per millimetre at 96 DPI. */\nconst PX_PER_MM = 96 / 25.4;\n/** Margin differences below this many millimetres count as equal (rounding of unit conversions). */\nconst MARGIN_TOLERANCE_MM = 0.05;\n\n/** Converts millimetres to CSS pixels. */\nconst mmToPx = (value: number): number => value * PX_PER_MM;\n\n/** Default page setup: portrait A4 with normal margins. */\nexport const createPageSettings = (): PageSettings => ({\n size: 'a4',\n orientation: 'portrait',\n margins: { ...MARGIN_PRESETS[0].margins }\n});\n\n/** An empty header or footer, used when the user opens the form for the first time. */\nexport const createHeaderFooter = (): PageHeaderFooter => ({ left: '', center: '', right: '' });\n\n/** Whether a header or footer holds any text at all. */\nexport const hasHeaderFooterText = (value: PageHeaderFooter | undefined): boolean =>\n Boolean(value && (value.left || value.center || value.right));\n\n/** Tokens a header or footer text may contain, replaced when the text is drawn on a page. */\nexport const HEADER_FOOTER_TOKENS = ['page', 'pages', 'date', 'title'] as const;\n\n/** One of the tokens a header or footer text may contain. */\nexport type HeaderFooterToken = (typeof HEADER_FOOTER_TOKENS)[number];\n\n/** Values the tokens of a header or footer are replaced with. */\nexport interface HeaderFooterContext {\n /** Number of the page the text is drawn on. */\n page: number;\n /** Number of pages in the document. */\n pages: number;\n /** Document title. */\n title: string;\n}\n\n/** Pattern of the tokens, built from their names so both stay in step. */\nconst TOKEN_PATTERN = new RegExp(`\\\\{(${HEADER_FOOTER_TOKENS.join('|')})\\\\}`, 'g');\n\n/** Today's date as `dd.mm.yyyy`, the format used in Uzbek documents. */\nconst today = (): string => {\n const now = new Date();\n const twoDigits = (value: number) => String(value).padStart(2, '0');\n return `${twoDigits(now.getDate())}.${twoDigits(now.getMonth() + 1)}.${now.getFullYear()}`;\n};\n\n/** Replaces the `{page}`, `{pages}`, `{date}` and `{title}` tokens of a header or footer text. */\nexport const renderHeaderFooter = (text: string, context: HeaderFooterContext): string =>\n text.replace(TOKEN_PATTERN, (_, token: string) => {\n if (token === 'page') return String(context.page);\n if (token === 'pages') return String(context.pages);\n if (token === 'title') return context.title;\n return today();\n });\n\n/** An empty watermark in the default colour, used when the user opens the form for the first time. */\nexport const createWatermark = (): PageWatermark => ({ text: '', color: '#9ca3af', diagonal: true });\n\n/** Whether a watermark has any text to draw. */\nexport const hasWatermarkText = (value: PageWatermark | undefined): boolean => Boolean(value?.text.trim());\n\n/** How much of the paper the watermark text spans. */\nconst WATERMARK_FILL = 0.86;\n/** Average width of a character relative to the font size, used to fit the text onto the paper. */\nconst AVERAGE_CHARACTER_WIDTH = 0.62;\n/** Smallest watermark font size in pixels, so a short text is still large. */\nconst MIN_WATERMARK_SIZE = 24;\n/** Largest watermark font size, as a share of the paper height. */\nconst MAX_WATERMARK_HEIGHT_SHARE = 0.4;\n/** Angle the diagonal watermark is rotated by, in degrees. */\nexport const WATERMARK_ANGLE = -35;\n\n/** Font size in pixels at which a watermark text spans the paper, straight across it or diagonally. */\nexport const watermarkFontSize = (width: number, height: number, text: string, diagonal: boolean): number => {\n const span = diagonal ? Math.sqrt(width * width + height * height) : width;\n const characters = Math.max(4, text.trim().length) * AVERAGE_CHARACTER_WIDTH;\n const size = (span * WATERMARK_FILL) / characters;\n return Math.round(Math.max(MIN_WATERMARK_SIZE, Math.min(size, height * MAX_WATERMARK_HEIGHT_SHARE)));\n};\n\n/** Converts page settings into pixel geometry; an unknown paper size falls back to A4. */\nexport const getPageMetrics = ({ size, orientation, margins }: PageSettings): PageMetrics => {\n const paper = PAGE_SIZES[size] ?? PAGE_SIZES.a4;\n const portrait = orientation === 'portrait';\n return {\n width: mmToPx(portrait ? paper.width : paper.height),\n height: mmToPx(portrait ? paper.height : paper.width),\n gap: PAGE_GAP,\n marginTop: mmToPx(margins.top),\n marginRight: mmToPx(margins.right),\n marginBottom: mmToPx(margins.bottom),\n marginLeft: mmToPx(margins.left)\n };\n};\n\n/** Whether two margin sets are equal, used to highlight the matching preset. */\nexport const isSameMargins = (a: PageMargins, b: PageMargins): boolean =>\n (Object.keys(a) as Array<keyof PageMargins>).every(side => Math.abs(a[side] - b[side]) < MARGIN_TOLERANCE_MM);\n"],"mappings":";AAoFA,IAAa,IAA6C;CACxD,IAAI;EAAE,OAA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