oasis-editor 0.0.152 → 0.0.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{OasisEditorApp-DjlntWNK.js → OasisEditorApp-BfdBu3ui.js} +501 -12
- package/dist/assets/importDocxWorker-DpJa1l2G.js +12 -0
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/design.d.ts +11 -0
- package/dist/core/commands/publicCommandTypes.d.ts +11 -1
- package/dist/core/model/index.d.ts +1 -1
- package/dist/core/model/types/document.d.ts +43 -0
- package/dist/core/model/types/layout.d.ts +2 -0
- package/dist/core/pluginUiTypes.d.ts +1 -1
- package/dist/export/docx/docxDocumentXml.d.ts +1 -1
- package/dist/export/docx/docxPackageXml.d.ts +2 -2
- package/dist/export/docx/themeXml.d.ts +3 -0
- package/dist/export/pdf/OasisPdfWriter.d.ts +1 -0
- package/dist/export/pdf/draw/drawPageBackground.d.ts +2 -1
- package/dist/export/pdf/writer/PdfContentStream.d.ts +1 -0
- package/dist/export/pdf/writer/pdfTypes.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts +26 -0
- package/dist/i18n/locales/pt-BR.d.ts +26 -0
- package/dist/import/docx/sectionProperties.d.ts +2 -1
- package/dist/import/docx/theme.d.ts +2 -0
- package/dist/{index-D_-RY5pS.js → index-DQLjp1z0.js} +1199 -410
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/plugins/internal/createEssentialsPlugin.d.ts +1 -1
- package/dist/plugins/internal/essentialsCapabilities.d.ts +16 -1
- package/dist/plugins/internal/essentialsCommandGroups/design.d.ts +8 -0
- package/dist/ui/app/essentials/design.d.ts +4 -0
- package/dist/ui/app/essentials/types.d.ts +2 -0
- package/dist/ui/components/Toolbar/DesignGallery.d.ts +16 -0
- package/package.json +1 -1
- package/dist/assets/importDocxWorker-Ddoy1WwF.js +0 -12
|
@@ -1843,6 +1843,7 @@ const en = {
|
|
|
1843
1843
|
"ribbon.tab.file": "File",
|
|
1844
1844
|
"ribbon.tab.home": "Home",
|
|
1845
1845
|
"ribbon.tab.insert": "Insert",
|
|
1846
|
+
"ribbon.tab.design": "Design",
|
|
1846
1847
|
"ribbon.tab.draw": "Draw",
|
|
1847
1848
|
"ribbon.tab.layout": "Layout",
|
|
1848
1849
|
"ribbon.tab.references": "References",
|
|
@@ -1878,6 +1879,31 @@ const en = {
|
|
|
1878
1879
|
"ribbon.group.alignment": "Alignment",
|
|
1879
1880
|
"ribbon.group.size": "Size",
|
|
1880
1881
|
"ribbon.group.imageStyles": "Picture Styles",
|
|
1882
|
+
"ribbon.group.documentFormatting": "Document Formatting",
|
|
1883
|
+
"ribbon.group.pageBackground": "Page Background",
|
|
1884
|
+
"design.themes": "Themes",
|
|
1885
|
+
"design.colors": "Colors",
|
|
1886
|
+
"design.fonts": "Fonts",
|
|
1887
|
+
"design.spacing": "Paragraph Spacing",
|
|
1888
|
+
"design.effects": "Effects",
|
|
1889
|
+
"design.setDefault": "Set as Default",
|
|
1890
|
+
"design.watermark": "Watermark",
|
|
1891
|
+
"design.pageColor": "Page Color",
|
|
1892
|
+
"design.pageBorders": "Page Borders",
|
|
1893
|
+
"design.text": "Text",
|
|
1894
|
+
"design.applyText": "Apply text",
|
|
1895
|
+
"design.useImage": "Use image",
|
|
1896
|
+
"design.remove": "Remove",
|
|
1897
|
+
"design.apply": "Apply",
|
|
1898
|
+
"design.color": "Color",
|
|
1899
|
+
"design.opacity": "Opacity",
|
|
1900
|
+
"design.scale": "Scale",
|
|
1901
|
+
"design.rotation": "Rotation",
|
|
1902
|
+
"design.fontFamily": "Font",
|
|
1903
|
+
"design.fontSize": "Size",
|
|
1904
|
+
"design.borderStyle": "Style",
|
|
1905
|
+
"design.borderWidth": "Width",
|
|
1906
|
+
"design.distance": "Distance",
|
|
1881
1907
|
// Image format (contextual tab)
|
|
1882
1908
|
"image.crop": "Crop",
|
|
1883
1909
|
"image.cropToShape": "Crop to Shape",
|
|
@@ -2465,6 +2491,7 @@ const ptBR = {
|
|
|
2465
2491
|
"ribbon.tab.file": "Arquivo",
|
|
2466
2492
|
"ribbon.tab.home": "Início",
|
|
2467
2493
|
"ribbon.tab.insert": "Inserir",
|
|
2494
|
+
"ribbon.tab.design": "Design",
|
|
2468
2495
|
"ribbon.tab.draw": "Desenhar",
|
|
2469
2496
|
"ribbon.tab.layout": "Layout",
|
|
2470
2497
|
"ribbon.tab.references": "Referências",
|
|
@@ -2500,6 +2527,31 @@ const ptBR = {
|
|
|
2500
2527
|
"ribbon.group.alignment": "Alinhamento",
|
|
2501
2528
|
"ribbon.group.size": "Tamanho",
|
|
2502
2529
|
"ribbon.group.imageStyles": "Estilos de Imagem",
|
|
2530
|
+
"ribbon.group.documentFormatting": "Formatação do Documento",
|
|
2531
|
+
"ribbon.group.pageBackground": "Plano de Fundo da Página",
|
|
2532
|
+
"design.themes": "Temas",
|
|
2533
|
+
"design.colors": "Cores",
|
|
2534
|
+
"design.fonts": "Fontes",
|
|
2535
|
+
"design.spacing": "Espaçamento entre Parágrafos",
|
|
2536
|
+
"design.effects": "Efeitos",
|
|
2537
|
+
"design.setDefault": "Definir como Padrão",
|
|
2538
|
+
"design.watermark": "Marca-d’água",
|
|
2539
|
+
"design.pageColor": "Cor da Página",
|
|
2540
|
+
"design.pageBorders": "Bordas da Página",
|
|
2541
|
+
"design.text": "Texto",
|
|
2542
|
+
"design.applyText": "Aplicar texto",
|
|
2543
|
+
"design.useImage": "Usar imagem",
|
|
2544
|
+
"design.remove": "Remover",
|
|
2545
|
+
"design.apply": "Aplicar",
|
|
2546
|
+
"design.color": "Cor",
|
|
2547
|
+
"design.opacity": "Opacidade",
|
|
2548
|
+
"design.scale": "Escala",
|
|
2549
|
+
"design.rotation": "Rotação",
|
|
2550
|
+
"design.fontFamily": "Fonte",
|
|
2551
|
+
"design.fontSize": "Tamanho",
|
|
2552
|
+
"design.borderStyle": "Estilo",
|
|
2553
|
+
"design.borderWidth": "Espessura",
|
|
2554
|
+
"design.distance": "Distância",
|
|
2503
2555
|
// Image format (contextual tab)
|
|
2504
2556
|
"image.crop": "Cortar",
|
|
2505
2557
|
"image.cropToShape": "Cortar para Demarcar Forma",
|
|
@@ -2712,14 +2764,14 @@ function I18nProvider(props) {
|
|
|
2712
2764
|
});
|
|
2713
2765
|
}
|
|
2714
2766
|
const oasisMarkBase64 = "UklGRmQXAABXRUJQVlA4IFgXAACwWwCdASrAAAABPjEWiUMiISESyL50IAMEswHYDxjW/947Oi5/a/7H+1P90/ar5n65/UvwH+Q/QZm27Sf5n9r/I/5m/2n/p+wv9E/9j3AP07/0X92/HLuKeYL+mf4r/zf3f3tf9x+rnvH/z/qAfzf/J/9/sM/QX/bv02P28+Fb9s/2s+B39h//51gH//6yfrV/QO1z/CdMx6vl0OAGqD8Z+4X6H+9/up8b/6vvP+IeoL+Lfyr/CflxwuoAPz7+0/7T1iPk/9p6R/zXqAflpxyVAX8y+hD/5/6f0W/UX7UfAl/Ov75/zOxr6SR2HAT+kJLsdULBbdVn3b+sl8uZdjuThjIe3NwBwjfGz5SniiBN2m7i7b0hA/wxE1PuC+4EcbOyjUkU3CDDghPY1Va4tpUped9TFa05Qb1z7O+Ye73ccvEl10Sgdj6Hhy71hb/XpA23GjXBN/obAlaswz9gKwvW9d9npbC69rQeTm6DEr/cjrNngjQaHgFGjh4uVY1bY9Q+/iG037f80w0bLlYIe7smzz4tG1kC8r/KyWvzd3IXXrR2bKmhoB3Md69ltbERYFBI/2f+w7Jcsw+aUOGSwP6v6jv3tvwprg/7n5tto40/iRIKwEHQ5H/G5c0tpJ2pwREanIK3qHinjvovnkmuTw0mV2bumYqdc7he7hG0hpvBna8vIRpKYe6K1v3F8trOEtYUwr7w8e6j3nviknKtsFMtPtxZzn0YnhgtOn9inBlwqyEGR+wk7X1KHxOekXCA1UVbmLwGx1NqbI6r2WBOwQdpmpTg85DMOjwzW/JHUmfxKTDfhoXLi9gBMP/+Et6inspdrW1CHkZVLkDll2JyiPvClnvGv9m00oYce3evtpMlDhY3kVYGwfkoCHHyEv9iiN45NFE7+dQ9TacuQ00bHMa8LEFkEgXlbIOOqb/luSgpqPeYJ0te0XOAoIimL6iiPpVwptKTVTYOwRlXsxXOf6TT46ZEkHgAAP7+0P2gKmTluueuNY+U4/vkDd2VmNHsmMNJl1HfoY2poF8/1uoa8CZHpva1s8naGtGSLZnoeinjMs+G3jkzDzxHqqcgkZTAfFgipQReV3vRrkjzfzIdcMA7B4tu1cAg89SYeju2MC8Y/CWafba+MGbhAEzmu3dW8//l1pJrMLCd2MlJ8YLX6EM772du7VOeyFBLhim1VpOzXrWZWlYFTm3pF38p3oH1j5l0JRFlx08AdxScjS2p+L43pSzH9irNn8ow+YlvoXypCXVyQ9DllXxuTiMV7Tw7WkiyBb4a0io2XARXIzAbjnigXygR4j0M4GnhxdRzombgaZd6jiUTORiHX8BIV0fE+8nOv/uleXINQ2JNHrP4IfqDiefxTYTJHXey6xszVKKbcgzzA9VjuS59jQjkZVktrpdXls0pskU+x3iAoGSQxoL3YUs8B9JbG69Vh5VQfRWkjpvjgA+VeqeUoRD1h/PctddTT2eA31zbvwS+0HxGGL7afgwAeSZIDnSqmHLVUc7cH9uA0qf6foiwypxLOe6BLv7FNIwMYXLlkOnCSsiYZmhjpZmUZykMqPtNOPR2teBpziedYDQV2aBZFMP+Guq5u2WRWvvGZ+KNDuQaa4vKl+YbRCwZAaLr6bcL+XjTayKSzz561sUKrzDSPUjEf0cVkTci8SXA+guLEDFEtHATgLEEQD/xiDXvconSzB8CqX0Pys7GniN2V5lI76qUO1knbcPftDFB9DRHcuv4NM/c+9zeyj3iLi2uJhkGEW8MtSZUygLogIc+c43IPKXQXAs9YgZ8Uumypd4xdsgzr5POVy0w0rzP8LhLPiqzL8Nc50JyRi8bvEZraXy3DSHQmuVX39HaRgREI7uqi1sUiL+b0qe/fR53FfE+uCPvVxaWqgr0UicQoWPAXArLgJ6RjGyIgbrq+cv0gBkp65ZH05itLicbTkIWprWJ1pLomPqQZkAYruygNlcmmGct1IJ0OzNjAJQFkVGbwLkeHB/TDbV0Tq/U7ge2Ciaj3HYIMmREQzhx1gk+i2Kwb3DmEaetvzetIiB0nhbRWIMtfOKNM25GU22XNDiHpZiFfMCR04TIoM/jq5qRJ8zukISn5EQJGUSLd1nraQHhAJTkrpt/x6kq5R9er3yXQiOw25imi3mzDte/kbW6ENgYqf3RC1zKdnGEieTDnu+Mfr1L5ORPGTyS4LO2eDcgcd7uKCXNyWLRHYNtj0swtWjA0ia7ezJCwTRrpoU7kY+lL02zDFu+teWU4dda1jD7f0khwFd6lu1ESotG4fSQX/+N6f2n3mwu/NRGflR35gBlCarCAqTnEvPSSAoGg5H65qwNYU4i/xtQET6QIf0wJ9SWoybdwZkdByMBLVM+zWXM09/ZywvcFSeDiQH1mB/LN9o/9kigWXMDCmJ40GdbJriO6LyFd3ZPHE9Mu3cpzAHodpgbNY2L5de3n7cWaFs31Ua4V7IZwif5EJ6RgL52zgWt5THlnmij4W/+o5sga3qHqbIr2R4+KthbXaFSBHLt/MP3sfxs7UyonNA/yO9VDpaR/87nlPJ+486zuaZ6QF6hVZMPFdPUSXrhJYcQn8MarTFxjYFzcGKE5JIdnqU8wrv95YUP2/Vq42hW+eYj3Olg9EpjiSMkrFiYBsyWSOqbJQbpV64E7yVXFNVHUnkvRhUHFSP+YLr+DAyGpc6IIx+dS13PDFTHLAPtK0K8U5nwtn07jExCX4zca4HtBYAPSyMs/rGL+kEh29/08ahsm/8lEASeDKao1fY2pqUMr/GXUf+wwieLDHhs4/785VR9Jg6ZYzV6W8gxpyHNPw/s6/V2XW/PRn+l8MCGPTSDU0H7S/engMTa3XFjmfN+HkF3VBNtsTRv5m/dvtiEW4KJnN3UT1BiuO19GYLvxC553JAMaKnwwtW3q4UUnQwjrRum4luWqFQbWSfFaM0C+nAHkShu+7jB74XTnWfZUljWJrxnV/xRqtBnlio9SHJn93hzCH3c7Z4NGiHUfRlNZeY0GTth7SIjPPNF8uq0Dlon7EpI0JQWPHjAajWRH6+z6HGdnkF6b6ZW5nwveXsbtGl77y181pnrXB8eKRZVF6mnjlOWfzt2DgyrR8KXcfQxdtJ14hmYNbWmVt6oo0syImVWF2VaCy4iac47Xle5VTGAzTK+y4ineIkhp2WUDrKBHpaXNu05EunDhMbGU4OSsDum31/gAk0cpuqbGJmD+AEf+PEyj7okPwWnzbx/Dc+TOUJIq0qPYVLHQs3x5763EiV05ZPV0giHExJHA4tpsZdLBBimjc4jbBcDloQWRyHMa5ZCOsLcAxxe/JUT31Gmy8EeIIJH8oybFtgVsxUB9bTxUCjQ5BTUwGzCI3zFYNmqhwcQx7IRJEaBHnQH0Reiqh7QJu3rZ+1xNRDeUPgc9c3VKwkZhaSS+wB/AQUgUVHzL0w86fefFqaqXbei8E6aCU4PPwLtpC/kphJCHMSQ1y6Z1kN1ztzIcN6EYF0diUBtS0ycH+8OT5Pu7SBn9paZxcr0abOrM0WedcPsmgRTng89PAD7unuoL+34FYNzXeVc2oxzRQ4ukk+O/zYyxVW2bfacfF176N/actMCjkMiZsIzUpK8q9a7xKWWoNNPFKd/zbyQaWPY9NhfWS2yDjBtmYh6SZRBJJRhZFY1ZCKIs4q8Z+hznOqVSPsm9sddQNfg5cn1gdtuZP/HZJqu6YN6Scn2f4RdBhb2iZGyNt/oDFIqQwJHMNiQUeemjv8t+p4Ijz0tCKNPLGmDeuhrplcBQ8LZgSPE3yyXmuIgd31d23LHj43kzNoMc0niaEAXRfvuA7sxLpbzV5x0bNTFYZ7XGX8CpL1m0/X2c9nFxxk1kALcLsOT9VadXCJ5jG+ANfI+RJ24AFfCTjK7mQuWDirqt9FD8ksAvzPM8677h/YcmEfwyrUBm8ZPOjhnMH7I85GVoQjN7zHFN3VXmaMRZMq5uBc5Z3Fhr6JbsBSl8W/hAQAriIBINIylKxSh7iRa2S2MlXJb/uIosUdKoreXYKD3A4xcf5DGnjxfCVm9L9WabGP5Wj/yoRo/h1hEaaHZVjrot+YELnMYMn/gLTHm1w/m5KMKXbqNdB1DZhPOx+vA7WCozWCfqDlJDczg6SQybB1KsP7lk/9gqHS58eVInTlny7MxP6jbCKE5KI1A9uu+rFuO+6iYHCP4xcdPNT6RsYjpSLhjyKHBcCldrMjQzo8IpwYkSyaPxonVxhSjxfBySfPIljfNy/1nL3KyMcXzzR2QnDRABDumnTqfDqAL0PMuLeZ3iBgVlN4j8tdBD+uPIvDjHpXAwFAY1R03QMWGtS84kEElzP0qPlpg1b0zw3KK1daqJC2rmaGE0r0y3Js8W0CVI+e6HMozZ2tAh17caaGjcnbK8WK+l9swvUSc6GaI1mrlnhAHU80EFIql72S66mllwDtIJhkpDfu1xVON+kiZAU8ao6sj+9oN38QZ0orGVOCnj7R9/Qg/VozV+Odtx1nres4cVUpgBpj8Fc+n52K+kkDCl80yVaPS7ZsvtS33mn3xeTn74mvTWcVftb8+e+vFLo6GS5kPRskekS0ViI/hAhQeCFZV7MBwI/jS+B68+YiWv/+9tG7qPNKLsjTR97ead+3YrvlBM3MyRlIpIMcYYgLiiZZ42RJGG2Ip3kPxsx8s3N+SkvM8qLTw3dWhActwY3Xz0O9Crxtfr93PHhfQI71MIUEmX2dnbKTxnqYbLB1kCdS4H9sz6wW02aXo9fzaQo090DuxABjsamN0leUN7a1L24Eev/B75RhLXYXy9SvKxvd0H+KlepkD4doBKROwuwFu7PMog7jmqvAGBHtSF7dE3jwhE60Rjtt95WkgqQDoRO7W57G3tJgdlPverdlAi0zSDFEkBxXTDZ3xheftVoAhRj365OpFIzFBNN+iYfp2eJwBwI7oc5KylPx5/H3NNMcBvx+EOdEu4pkFlpPnmglJKvsNeCyUWhTIvPi308dnqSoifrrilNHk3UeUXSoaVKxQPIBpbiVLPedkJBQjvuOnOriN/V80+Rk9AE7iRMl/Rvc33Lge1jnRC7AFnJbw9ufG8JgbB4RBnyB1xuIUiCfkvBPoNNfbfuc3mrI7pJYLknAXGSG1Nfuo5DtXqw1JfHGlIDRVbootSqBVrEHXnCvvXOPqpNXe5W4fPhMVYwyJoE1qWZVIYo549dcG50Bz6qQo/YwChUIKCG+vkwiJ+kZd1to35s+aGK1HBP60TOjMYwioPiB0J3/M3JbQ7KSXz1mVcAd73cGnyHgB9vEfSEVf3IjVdd3IYtAZ0/87Pzbeu0m9oZpOhzngr2neJbn+1l5AiNG6RK0dNNmmTQI1DnDmM3hW8Yw0TiGX3oNDtv0X6NXbNna7b0YLh3bAB72PiqadyVxVYPRoHY2vCjRrBQzTNTdRIQuw5d0XhFJ4uazuvp5RMF0d9LLckV+iqel5ldUdQ2m5ZxGNPxoABOhV5MznFqE9GLr4EYDl064VOcFjJBkFaei+XN+H1oaqG8qkntUti9NdXEphwxgKW16MEeWuQ/7T8DCeC8+5nyPVF3kG8ZDYZP0AJtv5/WFPn9DWTo7gQTAt0U3JZVcudQ7i7PfvqWa52Qrpy6zQFVTesAyrq995z6UGiHzqiHGDjelUG8bnN+m5+3MMELQAU+rvc4UFgNJ/Qa1DnWJdkMZSUMq+HBoj5ggFBwlL6yDEiRk34idtLXmIy8cMNrjXG0Lu7Reg/CY07ZYRp4eTLUIrFnr8aknQBWq0xHLQwYmjqO/TT6sz+lPCJRE4+FXSaZVynttWJv1H9gEFDgs5dOMCTkwh1ax9dpwLEsm8QPU2G2v6l5zxrcvc1FWtDlcIfQDWNecuvM7bX+STamlHfN4HA0tSPrgMy10RwE79X37FlpC3eESfEmUU5Sn2Lgz9uBA4NH7R9EMNz8KGVeA5rJ7RFnPlwx9M2vGnChVaxeoKI4N9YVr0sWj8Y/GiCB7I+8JW6gxzc0+15MDOLlvzNhS2ZMRENKhrvs2OGvvIyx6PWlYFTgAfxWyDonD1mngwHu6h40bGM3xDeOv7Fy818u6uTUWm/qnaGrSKdrU1BiGP2+T/qtxeK7EQpceSmVbFgnCFJX4knNvrYC+qhU6emMJiCuIjFxiK/W+tgtp++f9TRhfaX2Nn3oisrMYTXHKcxa6Im1QTRMZLyba1njRXKhNQzygEEkCTaQ8NrCaYQ+6QrvlnuYPzQn9OzFNrFgJg+Kuz73CQU6z3r/jsgZ+AkeDDESoMXDRetY1NclRIMGRy8NB9dur+YrXdNDM3vHq9YjXkOx8QgJCFTV06fUmxBrqgoIb5ZaoiWv8mhOuta+5AztMbzxtggvULoILvLB3E95cabrHIgIIxZOGf5bAP9ltq3Yg6Vo4PnZkOd9Ln2vP3vpB0P0ELJDRwUpey+k7bpQF7VfEqg4k28587tqFvrX2ZbQADLJGKhERGVFehFRuqfS8SaXmWVLB4HriwYl4r8k7NMZwbp/xZM7xBrCXt8bEC2wku5PDUb9PyPcQBnoKnstlLSSwJXS2RBFI87PYgEYHNzmYt8y6z1nNB6PBFxJo3NKrprYK77FMfyPAelQnBc4VstXvPnsZRp8NY97NvtRq6GTKOlwuAtFLIMxZ3pu1wxBNRxH9OfiymV6ahDsAF+F4EmS/fmuLxqRCborsgMUTSlcbZCycyfeLgL9FsLfIadOCee++KvLi4ST9ZHhj7tCBhgayemDhSzcFgeFnsyDkGS9qLs7rnySZzxzAwfjlpsYyjkYpuxXbbWuTIqD39mD6NQpuJDKt2Q9x/OKymV3BMjQ/0F4boL/NdfYS24AFVtW/OIFU+AGkN2d5wNbdGC5NrLUrp3q+mjXtg54TBgW2gp8fUOCTxdPzlDp2baT4Q6uAqCfDg3D4V/4VdxkVSlLbiWEpOTl4VtDlNMNSSXmFf/1tPGphwWKj0Agbbd5QjFulttla8pgAAA/Wf+9Td+Oo61eaZLa3tUfTeOXGCKwWJFXCMqaNfIyBue31jEIGX1TddpAj4QyCopCfwrKjKoRX5n4UwcfwADHiInAdeqVgyLiABR8P6u+q5XYOLFlS5rZ1Kpe7uqoHg6rIvAN/gVp/JR0jDVURc9CTdVvWQNne/upBb3VgGGhdLlbcfVEjHw5HwHeOjIx3HP/lXoWaUdTbiLB7DDLQD+VOaVqCh9An7btAcCd6RzgEW165Hqx2ZXLlq8OLCczkDlN8rCAtz8O+4AzSyPK8grVM8ObUU+qc6ZGcCgxaVvvbiTPP2kb765qIU5/Dj+q60L9YPOU6t+1FP6od8x4iXUpAtBsclYfJhOrwv66P13ocoB3LV1x09Eb5wq33vepBq3qYQJQyOHbj/jl4eLRUxXLQgLorpnB4HNs4v40tGGosw2Ka6eDt5K6P8DQK5ozy56BizczJenDjZ5DYx1Xu3YLmI/quRSR8ORIJqwhWFwM+Q8/gNfUL/YgQHlHmfhYi5vjU0TzsgnLyhP/kOFSnR9zjJkIMcYAFB/Ft1tfks1aQiBMtgP4sabdMsauWXINaIyR9ClOZLdIZQVGHUgLjxKW6YiFUs72zTJmKtf/RovsidqZlmEXrWGZ3UuGplChFUtjEkvwi2XxICgc0grD+9/tRt47usAAADGbVjPUInsKZHILQ8Tdvbj09q/9k2Mg7uynD2e+HudOmr+jOK+SyWmKsSZ4pH89FUSffyxPKUMVNp8o1m1apG/WDvwhmHllHVfELy0BgfyAIevaAuIOzl4NX3ayQnv+tsCnIGxjvF1IwPLyoflKFrL2OBFh3pJ57ChDdzSC9IDKqpaycKVMm2mWUPGBLK2cpD+b4VPleMoNCtKZz4AileaHHtk77gduJB8sihmMPR1lV1Vba4pOywdJgGueqt4IcTd2RJFxeSRNjuzHcR4tYGdli66ijJZC20ODhr8miT+cauMIflgiAAAAA=";
|
|
2715
|
-
var _tmpl$$
|
|
2767
|
+
var _tmpl$$1d = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
|
|
2716
2768
|
const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
|
|
2717
2769
|
const MARK_ASPECT = 3 / 4;
|
|
2718
2770
|
function OasisBrandMark(props) {
|
|
2719
2771
|
const height = () => props.height ?? 64;
|
|
2720
2772
|
const width = () => Math.round(height() * MARK_ASPECT);
|
|
2721
2773
|
return (() => {
|
|
2722
|
-
var _el$ = _tmpl$$
|
|
2774
|
+
var _el$ = _tmpl$$1d();
|
|
2723
2775
|
setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
|
|
2724
2776
|
setAttribute(_el$, "draggable", false);
|
|
2725
2777
|
createRenderEffect((_p$) => {
|
|
@@ -2736,7 +2788,7 @@ function OasisBrandMark(props) {
|
|
|
2736
2788
|
return _el$;
|
|
2737
2789
|
})();
|
|
2738
2790
|
}
|
|
2739
|
-
var _tmpl$$
|
|
2791
|
+
var _tmpl$$1c = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$M = /* @__PURE__ */ template(`<div role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-progress-track><div>`), _tmpl$3$A = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
|
|
2740
2792
|
function OasisEditorLoading(props) {
|
|
2741
2793
|
const t = useI18n();
|
|
2742
2794
|
const variant = () => props.variant ?? "overlay";
|
|
@@ -2746,7 +2798,7 @@ function OasisEditorLoading(props) {
|
|
|
2746
2798
|
};
|
|
2747
2799
|
const isDone = () => (pct() ?? 0) >= 100;
|
|
2748
2800
|
return (() => {
|
|
2749
|
-
var _el$ = _tmpl$2$
|
|
2801
|
+
var _el$ = _tmpl$2$M(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild;
|
|
2750
2802
|
insert(_el$2, createComponent(OasisBrandMark, {
|
|
2751
2803
|
height: 40,
|
|
2752
2804
|
"class": "oasis-editor-loading-mark"
|
|
@@ -2757,10 +2809,10 @@ function OasisEditorLoading(props) {
|
|
|
2757
2809
|
return pct() != null;
|
|
2758
2810
|
},
|
|
2759
2811
|
get children() {
|
|
2760
|
-
var _el$6 = _tmpl$$
|
|
2812
|
+
var _el$6 = _tmpl$$1c();
|
|
2761
2813
|
insert(_el$6, (() => {
|
|
2762
2814
|
var _c$ = memo(() => !!isDone());
|
|
2763
|
-
return () => _c$() ? _tmpl$3$
|
|
2815
|
+
return () => _c$() ? _tmpl$3$A() : `${pct()}%`;
|
|
2764
2816
|
})());
|
|
2765
2817
|
return _el$6;
|
|
2766
2818
|
}
|
|
@@ -2811,7 +2863,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2811
2863
|
onCleanup(() => {
|
|
2812
2864
|
cancelled = true;
|
|
2813
2865
|
});
|
|
2814
|
-
import("./OasisEditorApp-
|
|
2866
|
+
import("./OasisEditorApp-BfdBu3ui.js").then((m) => {
|
|
2815
2867
|
cancelled = true;
|
|
2816
2868
|
setProgress(1);
|
|
2817
2869
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -6187,6 +6239,15 @@ const OASIS_BUILTIN_COMMANDS = [
|
|
|
6187
6239
|
"sectionBreakNextPage",
|
|
6188
6240
|
"sectionBreakContinuous",
|
|
6189
6241
|
"setPageMargins",
|
|
6242
|
+
"applyDocumentTheme",
|
|
6243
|
+
"setDocumentColorScheme",
|
|
6244
|
+
"setDocumentFontScheme",
|
|
6245
|
+
"setDocumentParagraphSpacing",
|
|
6246
|
+
"setDocumentEffects",
|
|
6247
|
+
"setDocumentPageColor",
|
|
6248
|
+
"setDocumentWatermark",
|
|
6249
|
+
"setDocumentPageBorder",
|
|
6250
|
+
"setDocumentDesignDefault",
|
|
6190
6251
|
"tableContext",
|
|
6191
6252
|
"tableMerge",
|
|
6192
6253
|
"tableSplit",
|
|
@@ -6241,10 +6302,10 @@ function mount(target, props = {}) {
|
|
|
6241
6302
|
unmount: () => client.dispose()
|
|
6242
6303
|
});
|
|
6243
6304
|
}
|
|
6244
|
-
var _tmpl$$
|
|
6305
|
+
var _tmpl$$1b = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg aria-hidden=true>`), _tmpl$2$L = /* @__PURE__ */ template(`<svg><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</svg>`, false, true, false), _tmpl$3$z = /* @__PURE__ */ template(`<svg><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1</svg>`, false, true, false), _tmpl$4$n = /* @__PURE__ */ template(`<svg><g><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25></svg>`, false, true, false), _tmpl$5$f = /* @__PURE__ */ template(`<svg><polyline points="4 7 7 4 10 7"></svg>`, false, true, false), _tmpl$6$b = /* @__PURE__ */ template(`<svg><line x1=7 y1=4 x2=7 y2=20></svg>`, false, true, false), _tmpl$7$6 = /* @__PURE__ */ template(`<svg><polyline points="4 17 7 20 10 17"></svg>`, false, true, false), _tmpl$8$4 = /* @__PURE__ */ template(`<svg><line x1=13 y1=6 x2=21 y2=6></svg>`, false, true, false), _tmpl$9$2 = /* @__PURE__ */ template(`<svg><line x1=13 y1=12 x2=21 y2=12></svg>`, false, true, false), _tmpl$0$2 = /* @__PURE__ */ template(`<svg><line x1=13 y1=18 x2=21 y2=18></svg>`, false, true, false), _tmpl$1$1 = /* @__PURE__ */ template(`<svg><rect x=5.25 y=5.25 width=13.5 height=13.5 rx=0.7></svg>`, false, true, false), _tmpl$10 = /* @__PURE__ */ template(`<svg><path d="M9.75 5.25v13.5M14.25 5.25v13.5M5.25 9.75h13.5M5.25 14.25h13.5"></svg>`, false, true, false), _tmpl$11 = /* @__PURE__ */ template(`<svg><path d="M12 1.75v3M10.5 3.25 12 1.75l1.5 1.5"></svg>`, false, true, false), _tmpl$12 = /* @__PURE__ */ template(`<svg><path d="M5.25 8h13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$13 = /* @__PURE__ */ template(`<svg><path d="M12 22.25v-3M10.5 20.75 12 22.25l1.5-1.5"></svg>`, false, true, false), _tmpl$14 = /* @__PURE__ */ template(`<svg><path d="M5.25 16h13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$15 = /* @__PURE__ */ template(`<svg><path d="M4.5 12h15"stroke=#d14343 stroke-width=2.6></svg>`, false, true, false), _tmpl$16 = /* @__PURE__ */ template(`<svg><path d="M1.75 12h3M3.25 10.5 1.75 12l1.5 1.5"></svg>`, false, true, false), _tmpl$17 = /* @__PURE__ */ template(`<svg><path d="M8 5.25v13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$18 = /* @__PURE__ */ template(`<svg><path d="M22.25 12h-3M20.75 10.5l1.5 1.5-1.5 1.5"></svg>`, false, true, false), _tmpl$19 = /* @__PURE__ */ template(`<svg><path d="M16 5.25v13.5"stroke-width=2.5></svg>`, false, true, false), _tmpl$20 = /* @__PURE__ */ template(`<svg><path d="M12 4.5v15"stroke=#d14343 stroke-width=2.6></svg>`, false, true, false), _tmpl$21 = /* @__PURE__ */ template(`<svg><path d="M7.25 12h9.5M9.25 10l-2 2 2 2M14.75 10l2 2-2 2"stroke-width=2></svg>`, false, true, false), _tmpl$22 = /* @__PURE__ */ template(`<svg><path d="M12 8v8M10 10l2-2 2 2M10 14l2 2 2-2"stroke-width=2></svg>`, false, true, false), _tmpl$23 = /* @__PURE__ */ template(`<svg><path d="M3 21h18M4.5 19.5 3 21l1.5 1.5M19.5 19.5 21 21l-1.5 1.5"></svg>`, false, true, false), _tmpl$24 = /* @__PURE__ */ template(`<svg><path d="M2.5 6h19M2.5 18h19M12 1.75v2.5M10.5 3.25 12 1.75l1.5 1.5M12 22.25v-2.5M10.5 20.75 12 22.25l1.5-1.5"></svg>`, false, true, false), _tmpl$25 = /* @__PURE__ */ template(`<svg><path d="M6 2.5v19M18 2.5v19M1.75 12h2.5M3.25 10.5 1.75 12l1.5 1.5M22.25 12h-2.5M20.75 10.5l1.5 1.5-1.5 1.5"></svg>`, false, true, false), _tmpl$26 = /* @__PURE__ */ template(`<svg><path d="M2 21h20M5 19 2 21l3 2M19 19l3 2-3 2M8 12h8M10 10l-2 2 2 2M14 10l2 2-2 2"></svg>`, false, true, false), _tmpl$27 = /* @__PURE__ */ template(`<svg><rect x=4 y=4 width=16 height=16 rx=0.8></svg>`, false, true, false), _tmpl$28 = /* @__PURE__ */ template(`<svg><path></svg>`, false, true, false), _tmpl$29 = /* @__PURE__ */ template(`<svg><path d="M3 3l18 18"stroke-width=2></svg>`, false, true, false), _tmpl$30 = /* @__PURE__ */ template(`<svg><rect x=5 y=5 width=14 height=14 rx=0.8 stroke-dasharray="2.5 2"></svg>`, false, true, false), _tmpl$31 = /* @__PURE__ */ template(`<svg><path d="M3 3l18 18"stroke=#d14343 stroke-width=2.1></svg>`, false, true, false), _tmpl$32 = /* @__PURE__ */ template(`<svg><polyline points="20 6 9 17 4 12"></svg>`, false, true, false), _tmpl$33 = /* @__PURE__ */ template(`<i>`);
|
|
6245
6306
|
function SvgIcon(props) {
|
|
6246
6307
|
return (() => {
|
|
6247
|
-
var _el$ = _tmpl$$
|
|
6308
|
+
var _el$ = _tmpl$$1b();
|
|
6248
6309
|
insert(_el$, () => props.children);
|
|
6249
6310
|
createRenderEffect((_p$) => {
|
|
6250
6311
|
var _v$ = props.width ?? 24, _v$2 = props.height ?? 24, _v$3 = props.viewBox ?? "0 0 24 24", _v$4 = props.fill ?? "none", _v$5 = props.stroke, _v$6 = props["stroke-width"], _v$7 = props["stroke-linecap"], _v$8 = props["stroke-linejoin"], _v$9 = props.class;
|
|
@@ -6275,13 +6336,13 @@ function SvgIcon(props) {
|
|
|
6275
6336
|
const FootnoteIcon = () => createComponent(SvgIcon, {
|
|
6276
6337
|
fill: "none",
|
|
6277
6338
|
get children() {
|
|
6278
|
-
return [_tmpl$2$
|
|
6339
|
+
return [_tmpl$2$L(), _tmpl$3$z()];
|
|
6279
6340
|
}
|
|
6280
6341
|
});
|
|
6281
6342
|
const SpecialIndentFirstLineIcon = () => createComponent(SvgIcon, {
|
|
6282
6343
|
fill: "currentColor",
|
|
6283
6344
|
get children() {
|
|
6284
|
-
return _tmpl$4$
|
|
6345
|
+
return _tmpl$4$n();
|
|
6285
6346
|
}
|
|
6286
6347
|
});
|
|
6287
6348
|
const LineSpacingIcon = () => createComponent(SvgIcon, {
|
|
@@ -6292,7 +6353,7 @@ const LineSpacingIcon = () => createComponent(SvgIcon, {
|
|
|
6292
6353
|
"stroke-linecap": "round",
|
|
6293
6354
|
"stroke-linejoin": "round",
|
|
6294
6355
|
get children() {
|
|
6295
|
-
return [_tmpl$5$
|
|
6356
|
+
return [_tmpl$5$f(), _tmpl$6$b(), _tmpl$7$6(), _tmpl$8$4(), _tmpl$9$2(), _tmpl$0$2()];
|
|
6296
6357
|
}
|
|
6297
6358
|
});
|
|
6298
6359
|
const TableIcon = (props) => createComponent(SvgIcon, {
|
|
@@ -6452,11 +6513,11 @@ function ToolIcon(props) {
|
|
|
6452
6513
|
children: (render2) => render2()()
|
|
6453
6514
|
});
|
|
6454
6515
|
}
|
|
6455
|
-
var _tmpl$$
|
|
6516
|
+
var _tmpl$$1a = /* @__PURE__ */ template(`<button>`);
|
|
6456
6517
|
function SurfaceButton(props) {
|
|
6457
6518
|
const [local, others] = splitProps(props, ["type", "icon", "label", "variant", "size", "active", "class", "classList", "children"]);
|
|
6458
6519
|
return (() => {
|
|
6459
|
-
var _el$ = _tmpl$$
|
|
6520
|
+
var _el$ = _tmpl$$1a();
|
|
6460
6521
|
spread(_el$, mergeProps({
|
|
6461
6522
|
get type() {
|
|
6462
6523
|
return local.type ?? "button";
|
|
@@ -6517,7 +6578,7 @@ function Text$1(props) {
|
|
|
6517
6578
|
}
|
|
6518
6579
|
}));
|
|
6519
6580
|
}
|
|
6520
|
-
var _tmpl$$
|
|
6581
|
+
var _tmpl$$19 = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$K = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$y = /* @__PURE__ */ template(`<div class=oasis-menubar-menu>`), _tmpl$4$m = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$e = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$6$a = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`);
|
|
6521
6582
|
function Menubar(props) {
|
|
6522
6583
|
const t = useI18n();
|
|
6523
6584
|
const [activeMenu, setActiveMenu] = createSignal(null);
|
|
@@ -6585,13 +6646,13 @@ function Menubar(props) {
|
|
|
6585
6646
|
});
|
|
6586
6647
|
const topLevelItems = () => pruneTree(menuTree());
|
|
6587
6648
|
return (() => {
|
|
6588
|
-
var _el$ = _tmpl$$
|
|
6649
|
+
var _el$ = _tmpl$$19();
|
|
6589
6650
|
insert(_el$, createComponent(For, {
|
|
6590
6651
|
get each() {
|
|
6591
6652
|
return topLevelItems();
|
|
6592
6653
|
},
|
|
6593
6654
|
children: (topLevel) => (() => {
|
|
6594
|
-
var _el$2 = _tmpl$3$
|
|
6655
|
+
var _el$2 = _tmpl$3$y();
|
|
6595
6656
|
_el$2.addEventListener("mouseenter", () => {
|
|
6596
6657
|
if (activeMenu() && activeMenu() !== topLevel.id) {
|
|
6597
6658
|
setActiveMenu(topLevel.id);
|
|
@@ -6626,7 +6687,7 @@ function Menubar(props) {
|
|
|
6626
6687
|
return activeMenu() === topLevel.id;
|
|
6627
6688
|
},
|
|
6628
6689
|
get children() {
|
|
6629
|
-
var _el$3 = _tmpl$2$
|
|
6690
|
+
var _el$3 = _tmpl$2$K();
|
|
6630
6691
|
insert(_el$3, createComponent(For, {
|
|
6631
6692
|
get each() {
|
|
6632
6693
|
return topLevel.children;
|
|
@@ -6657,7 +6718,7 @@ function MenuNode(props) {
|
|
|
6657
6718
|
} = props;
|
|
6658
6719
|
const isSeparator = (_a2 = node.item) == null ? void 0 : _a2.separator;
|
|
6659
6720
|
if (isSeparator) {
|
|
6660
|
-
return _tmpl$4$
|
|
6721
|
+
return _tmpl$4$m();
|
|
6661
6722
|
}
|
|
6662
6723
|
const hasChildren = node.children.length > 0;
|
|
6663
6724
|
const [showSub, setShowSub] = createSignal(false);
|
|
@@ -6733,14 +6794,14 @@ function MenuNode(props) {
|
|
|
6733
6794
|
}), createComponent(Show, {
|
|
6734
6795
|
when: hasChildren,
|
|
6735
6796
|
get children() {
|
|
6736
|
-
return _tmpl$5$
|
|
6797
|
+
return _tmpl$5$e();
|
|
6737
6798
|
}
|
|
6738
6799
|
}), createComponent(Show, {
|
|
6739
6800
|
get when() {
|
|
6740
6801
|
return showSub() && hasChildren;
|
|
6741
6802
|
},
|
|
6742
6803
|
get children() {
|
|
6743
|
-
var _el$6 = _tmpl$6$
|
|
6804
|
+
var _el$6 = _tmpl$6$a();
|
|
6744
6805
|
insert(_el$6, createComponent(For, {
|
|
6745
6806
|
get each() {
|
|
6746
6807
|
return node.children;
|
|
@@ -6759,10 +6820,10 @@ function MenuNode(props) {
|
|
|
6759
6820
|
}
|
|
6760
6821
|
});
|
|
6761
6822
|
}
|
|
6762
|
-
var _tmpl$$
|
|
6823
|
+
var _tmpl$$18 = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
|
|
6763
6824
|
function TitleBar(props) {
|
|
6764
6825
|
return (() => {
|
|
6765
|
-
var _el$ = _tmpl$$
|
|
6826
|
+
var _el$ = _tmpl$$18(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
6766
6827
|
insert(_el$3, () => props.children);
|
|
6767
6828
|
return _el$;
|
|
6768
6829
|
})();
|
|
@@ -6857,7 +6918,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
|
|
|
6857
6918
|
);
|
|
6858
6919
|
return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
|
|
6859
6920
|
}
|
|
6860
|
-
var _tmpl$$
|
|
6921
|
+
var _tmpl$$17 = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$J = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$x = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$l = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$d = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
|
|
6861
6922
|
function OutlinePanel(props) {
|
|
6862
6923
|
const t = useI18n();
|
|
6863
6924
|
const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
|
|
@@ -6928,13 +6989,13 @@ function OutlinePanel(props) {
|
|
|
6928
6989
|
}
|
|
6929
6990
|
});
|
|
6930
6991
|
return (() => {
|
|
6931
|
-
var _el$ = _tmpl$3$
|
|
6992
|
+
var _el$ = _tmpl$3$x(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
|
|
6932
6993
|
insert(_el$2, createComponent(Show, {
|
|
6933
6994
|
get when() {
|
|
6934
6995
|
return !collapsed();
|
|
6935
6996
|
},
|
|
6936
6997
|
get children() {
|
|
6937
|
-
var _el$3 = _tmpl$$
|
|
6998
|
+
var _el$3 = _tmpl$$17();
|
|
6938
6999
|
insert(_el$3, () => t("menu.view.outline") || "Outline");
|
|
6939
7000
|
return _el$3;
|
|
6940
7001
|
}
|
|
@@ -6945,14 +7006,14 @@ function OutlinePanel(props) {
|
|
|
6945
7006
|
return !collapsed();
|
|
6946
7007
|
},
|
|
6947
7008
|
get children() {
|
|
6948
|
-
var _el$6 = _tmpl$2$
|
|
7009
|
+
var _el$6 = _tmpl$2$J();
|
|
6949
7010
|
insert(_el$6, createComponent(Show, {
|
|
6950
7011
|
get when() {
|
|
6951
7012
|
return items().length > 0;
|
|
6952
7013
|
},
|
|
6953
7014
|
get fallback() {
|
|
6954
7015
|
return (() => {
|
|
6955
|
-
var _el$7 = _tmpl$4$
|
|
7016
|
+
var _el$7 = _tmpl$4$l();
|
|
6956
7017
|
insert(_el$7, () => t("outline.empty"));
|
|
6957
7018
|
return _el$7;
|
|
6958
7019
|
})();
|
|
@@ -6963,7 +7024,7 @@ function OutlinePanel(props) {
|
|
|
6963
7024
|
return items();
|
|
6964
7025
|
},
|
|
6965
7026
|
children: (item) => (() => {
|
|
6966
|
-
var _el$8 = _tmpl$5$
|
|
7027
|
+
var _el$8 = _tmpl$5$d();
|
|
6967
7028
|
_el$8.$$click = () => props.onNavigate(item.anchor);
|
|
6968
7029
|
insert(_el$8, () => item.text);
|
|
6969
7030
|
createRenderEffect((_p$) => {
|
|
@@ -7002,7 +7063,7 @@ function OutlinePanel(props) {
|
|
|
7002
7063
|
})();
|
|
7003
7064
|
}
|
|
7004
7065
|
delegateEvents(["click"]);
|
|
7005
|
-
var _tmpl$$
|
|
7066
|
+
var _tmpl$$16 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-overflow-manager style="display:flex;align-items:center;flex:1 1 0%;min-width:0;position:relative;margin-right:8px"><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown oasis-editor-toolbar-more-measure"aria-hidden=true tabindex=-1 style=position:absolute;visibility:hidden;pointer-events:none;right:0><i data-lucide=ellipsis></i></button><div style="display:flex;align-items:center;gap:8px;flex:1 1 0;min-width:0;overflow:hidden"></div><div style=flex-shrink:0;padding-left:8px;padding-right:16px;align-items:center><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"data-testid=editor-toolbar-overflow-dropdown><i data-lucide=ellipsis></i></button></div><div class="oasis-editor-toolbar-overflow-dropdown-menu oasis-editor-toolbar-overflow-menu"style="flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px;padding:8px;background:var(--oasis-paper);border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);max-width:calc(100vw - 16px);overflow-x:hidden;overflow-y:auto">`), _tmpl$2$I = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
|
|
7006
7067
|
function ToolbarOverflowManager(props) {
|
|
7007
7068
|
const t = useI18n();
|
|
7008
7069
|
const [overflowCount, setOverflowCount] = createSignal(0);
|
|
@@ -7146,7 +7207,7 @@ function ToolbarOverflowManager(props) {
|
|
|
7146
7207
|
};
|
|
7147
7208
|
};
|
|
7148
7209
|
return (() => {
|
|
7149
|
-
var _el$ = _tmpl$$
|
|
7210
|
+
var _el$ = _tmpl$$16(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
|
|
7150
7211
|
var _ref$ = containerRef;
|
|
7151
7212
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
7152
7213
|
var _ref$2 = moreMeasureRef;
|
|
@@ -7158,7 +7219,7 @@ function ToolbarOverflowManager(props) {
|
|
|
7158
7219
|
return items();
|
|
7159
7220
|
},
|
|
7160
7221
|
children: (item) => (() => {
|
|
7161
|
-
var _el$7 = _tmpl$2$
|
|
7222
|
+
var _el$7 = _tmpl$2$I();
|
|
7162
7223
|
insert(_el$7, item);
|
|
7163
7224
|
return _el$7;
|
|
7164
7225
|
})()
|
|
@@ -7234,12 +7295,12 @@ function resolveLabel(item, api) {
|
|
|
7234
7295
|
if (item.labelKey) return api.t(item.labelKey);
|
|
7235
7296
|
return void 0;
|
|
7236
7297
|
}
|
|
7237
|
-
var _tmpl$$
|
|
7298
|
+
var _tmpl$$15 = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$2$H = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-trailing-icon aria-hidden=true>`), _tmpl$3$w = /* @__PURE__ */ template(`<button type=button>`);
|
|
7238
7299
|
function Button$1(props) {
|
|
7239
7300
|
const [local, others] = splitProps(props, ["icon", "trailingIcon", "label", "active", "tooltip", "wide", "ribbonSize", "aria-label", "class", "classList"]);
|
|
7240
7301
|
const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
|
|
7241
7302
|
return (() => {
|
|
7242
|
-
var _el$ = _tmpl$3$
|
|
7303
|
+
var _el$ = _tmpl$3$w();
|
|
7243
7304
|
spread(_el$, mergeProps({
|
|
7244
7305
|
get ["class"]() {
|
|
7245
7306
|
return `oasis-editor-tool-button ${local.class || ""}`;
|
|
@@ -7276,7 +7337,7 @@ function Button$1(props) {
|
|
|
7276
7337
|
return local.label;
|
|
7277
7338
|
},
|
|
7278
7339
|
get children() {
|
|
7279
|
-
var _el$2 = _tmpl$$
|
|
7340
|
+
var _el$2 = _tmpl$$15();
|
|
7280
7341
|
insert(_el$2, () => local.label);
|
|
7281
7342
|
return _el$2;
|
|
7282
7343
|
}
|
|
@@ -7294,7 +7355,7 @@ function Button$1(props) {
|
|
|
7294
7355
|
return local.trailingIcon;
|
|
7295
7356
|
},
|
|
7296
7357
|
get children() {
|
|
7297
|
-
var _el$3 = _tmpl$2$
|
|
7358
|
+
var _el$3 = _tmpl$2$H();
|
|
7298
7359
|
insert(_el$3, createComponent(ToolIcon, {
|
|
7299
7360
|
get name() {
|
|
7300
7361
|
return local.trailingIcon;
|
|
@@ -7372,7 +7433,7 @@ function useDismiss(options) {
|
|
|
7372
7433
|
});
|
|
7373
7434
|
});
|
|
7374
7435
|
}
|
|
7375
|
-
var _tmpl$$
|
|
7436
|
+
var _tmpl$$14 = /* @__PURE__ */ template(`<div>`);
|
|
7376
7437
|
function Popover(props) {
|
|
7377
7438
|
let anchorRef;
|
|
7378
7439
|
let panelRef;
|
|
@@ -7389,7 +7450,7 @@ function Popover(props) {
|
|
|
7389
7450
|
closeOnEscape: props.closeOnEscape
|
|
7390
7451
|
});
|
|
7391
7452
|
const panel = (portalled) => (() => {
|
|
7392
|
-
var _el$ = _tmpl$$
|
|
7453
|
+
var _el$ = _tmpl$$14();
|
|
7393
7454
|
addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
|
|
7394
7455
|
var _ref$ = panelRef;
|
|
7395
7456
|
typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
|
|
@@ -7441,15 +7502,15 @@ function Popover(props) {
|
|
|
7441
7502
|
}
|
|
7442
7503
|
})];
|
|
7443
7504
|
}
|
|
7444
|
-
var _tmpl$$
|
|
7505
|
+
var _tmpl$$13 = /* @__PURE__ */ template(`<i data-lucide=chevron-down>`);
|
|
7445
7506
|
function DropdownChevron(props) {
|
|
7446
7507
|
return (() => {
|
|
7447
|
-
var _el$ = _tmpl$$
|
|
7508
|
+
var _el$ = _tmpl$$13();
|
|
7448
7509
|
createRenderEffect(() => className(_el$, `oasis-editor-dropdown-chevron${props.class ? ` ${props.class}` : ""}`));
|
|
7449
7510
|
return _el$;
|
|
7450
7511
|
})();
|
|
7451
7512
|
}
|
|
7452
|
-
var _tmpl$$
|
|
7513
|
+
var _tmpl$$12 = /* @__PURE__ */ template(`<div>`), _tmpl$2$G = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$v = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$4$k = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
|
|
7453
7514
|
function Menu(props) {
|
|
7454
7515
|
const [open, setOpen] = createSignal(false);
|
|
7455
7516
|
const updateOpen = (nextOpen) => {
|
|
@@ -7459,7 +7520,7 @@ function Menu(props) {
|
|
|
7459
7520
|
};
|
|
7460
7521
|
const ariaLabel = () => props.tooltip || props.label || "";
|
|
7461
7522
|
return (() => {
|
|
7462
|
-
var _el$ = _tmpl$2$
|
|
7523
|
+
var _el$ = _tmpl$2$G();
|
|
7463
7524
|
insert(_el$, createComponent(Popover, {
|
|
7464
7525
|
get open() {
|
|
7465
7526
|
return open();
|
|
@@ -7474,7 +7535,7 @@ function Menu(props) {
|
|
|
7474
7535
|
},
|
|
7475
7536
|
onPanelMouseLeave: void 0,
|
|
7476
7537
|
trigger: (api) => (() => {
|
|
7477
|
-
var _el$3 = _tmpl$4$
|
|
7538
|
+
var _el$3 = _tmpl$4$k();
|
|
7478
7539
|
_el$3.$$click = () => api.toggle();
|
|
7479
7540
|
use((el) => api.ref(el), _el$3);
|
|
7480
7541
|
insert(_el$3, createComponent(Show, {
|
|
@@ -7494,7 +7555,7 @@ function Menu(props) {
|
|
|
7494
7555
|
return props.label;
|
|
7495
7556
|
},
|
|
7496
7557
|
get children() {
|
|
7497
|
-
var _el$4 = _tmpl$3$
|
|
7558
|
+
var _el$4 = _tmpl$3$v();
|
|
7498
7559
|
insert(_el$4, () => props.label);
|
|
7499
7560
|
return _el$4;
|
|
7500
7561
|
}
|
|
@@ -7529,7 +7590,7 @@ function Menu(props) {
|
|
|
7529
7590
|
return _el$3;
|
|
7530
7591
|
})(),
|
|
7531
7592
|
get children() {
|
|
7532
|
-
var _el$2 = _tmpl$$
|
|
7593
|
+
var _el$2 = _tmpl$$12();
|
|
7533
7594
|
_el$2.$$click = (event) => {
|
|
7534
7595
|
const el = event.target;
|
|
7535
7596
|
const button = el.closest("button");
|
|
@@ -7545,7 +7606,7 @@ function Menu(props) {
|
|
|
7545
7606
|
})();
|
|
7546
7607
|
}
|
|
7547
7608
|
delegateEvents(["click"]);
|
|
7548
|
-
var _tmpl$$
|
|
7609
|
+
var _tmpl$$11 = /* @__PURE__ */ template(`<select>`), _tmpl$2$F = /* @__PURE__ */ template(`<span class=oasis-editor-tool-select-ribbon-large-label>`), _tmpl$3$u = /* @__PURE__ */ template(`<div class=oasis-editor-tool-select-ribbon-large-wrap>`);
|
|
7549
7610
|
function Select(props) {
|
|
7550
7611
|
let selectRef;
|
|
7551
7612
|
const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value", "label", "ribbonSize"]);
|
|
@@ -7561,7 +7622,7 @@ function Select(props) {
|
|
|
7561
7622
|
}
|
|
7562
7623
|
});
|
|
7563
7624
|
const select = () => (() => {
|
|
7564
|
-
var _el$ = _tmpl$$
|
|
7625
|
+
var _el$ = _tmpl$$11();
|
|
7565
7626
|
var _ref$ = selectRef;
|
|
7566
7627
|
typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
|
|
7567
7628
|
spread(_el$, mergeProps({
|
|
@@ -7596,13 +7657,13 @@ function Select(props) {
|
|
|
7596
7657
|
return select();
|
|
7597
7658
|
},
|
|
7598
7659
|
get children() {
|
|
7599
|
-
var _el$2 = _tmpl$3$
|
|
7660
|
+
var _el$2 = _tmpl$3$u();
|
|
7600
7661
|
insert(_el$2, createComponent(Show, {
|
|
7601
7662
|
get when() {
|
|
7602
7663
|
return local.label;
|
|
7603
7664
|
},
|
|
7604
7665
|
get children() {
|
|
7605
|
-
var _el$3 = _tmpl$2$
|
|
7666
|
+
var _el$3 = _tmpl$2$F();
|
|
7606
7667
|
insert(_el$3, () => local.label);
|
|
7607
7668
|
return _el$3;
|
|
7608
7669
|
}
|
|
@@ -7612,15 +7673,15 @@ function Select(props) {
|
|
|
7612
7673
|
}
|
|
7613
7674
|
});
|
|
7614
7675
|
}
|
|
7615
|
-
var _tmpl
|
|
7676
|
+
var _tmpl$$10 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
|
|
7616
7677
|
function Separator(props) {
|
|
7617
7678
|
return (() => {
|
|
7618
|
-
var _el$ = _tmpl
|
|
7679
|
+
var _el$ = _tmpl$$10();
|
|
7619
7680
|
createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
|
|
7620
7681
|
return _el$;
|
|
7621
7682
|
})();
|
|
7622
7683
|
}
|
|
7623
|
-
var _tmpl
|
|
7684
|
+
var _tmpl$$$ = /* @__PURE__ */ template(`<div><button type=button class=oasis-editor-color-split-main></button><button type=button class=oasis-editor-color-split-menu-button aria-haspopup=menu>`);
|
|
7624
7685
|
function SplitButton(props) {
|
|
7625
7686
|
return createComponent(Popover, {
|
|
7626
7687
|
get open() {
|
|
@@ -7639,7 +7700,7 @@ function SplitButton(props) {
|
|
|
7639
7700
|
return props.onPanelMouseLeave;
|
|
7640
7701
|
},
|
|
7641
7702
|
trigger: (api) => (() => {
|
|
7642
|
-
var _el$ = _tmpl
|
|
7703
|
+
var _el$ = _tmpl$$$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7643
7704
|
use((el) => api.ref(el), _el$);
|
|
7644
7705
|
_el$2.$$click = () => props.onMain();
|
|
7645
7706
|
insert(_el$2, () => props.mainContent);
|
|
@@ -7680,24 +7741,24 @@ function SplitButton(props) {
|
|
|
7680
7741
|
});
|
|
7681
7742
|
}
|
|
7682
7743
|
delegateEvents(["click"]);
|
|
7683
|
-
var _tmpl$$
|
|
7744
|
+
var _tmpl$$_ = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-theme-grid>`), _tmpl$2$E = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-standard-grid>`), _tmpl$3$t = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$4$j = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
|
|
7684
7745
|
const normalize = (value2) => value2.trim().toLowerCase();
|
|
7685
7746
|
function ColorGrids(props) {
|
|
7686
7747
|
return [(() => {
|
|
7687
|
-
var _el$ = _tmpl$$
|
|
7748
|
+
var _el$ = _tmpl$$_(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
7688
7749
|
insert(_el$2, () => props.themeColorsLabel);
|
|
7689
7750
|
insert(_el$3, createComponent(For, {
|
|
7690
7751
|
get each() {
|
|
7691
7752
|
return props.palette.themeColors;
|
|
7692
7753
|
},
|
|
7693
7754
|
children: (theme) => (() => {
|
|
7694
|
-
var _el$7 = _tmpl$3$
|
|
7755
|
+
var _el$7 = _tmpl$3$t();
|
|
7695
7756
|
insert(_el$7, createComponent(For, {
|
|
7696
7757
|
get each() {
|
|
7697
7758
|
return theme.values;
|
|
7698
7759
|
},
|
|
7699
7760
|
children: (color) => (() => {
|
|
7700
|
-
var _el$8 = _tmpl$4$
|
|
7761
|
+
var _el$8 = _tmpl$4$j();
|
|
7701
7762
|
_el$8.$$click = () => props.onPick(color);
|
|
7702
7763
|
_el$8.addEventListener("blur", () => props.onPreview(null));
|
|
7703
7764
|
_el$8.addEventListener("focus", () => props.onPreview(color));
|
|
@@ -7724,14 +7785,14 @@ function ColorGrids(props) {
|
|
|
7724
7785
|
}));
|
|
7725
7786
|
return _el$;
|
|
7726
7787
|
})(), (() => {
|
|
7727
|
-
var _el$4 = _tmpl$2$
|
|
7788
|
+
var _el$4 = _tmpl$2$E(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling;
|
|
7728
7789
|
insert(_el$5, () => props.standardColorsLabel);
|
|
7729
7790
|
insert(_el$6, createComponent(For, {
|
|
7730
7791
|
get each() {
|
|
7731
7792
|
return props.palette.standardColors;
|
|
7732
7793
|
},
|
|
7733
7794
|
children: (swatch) => (() => {
|
|
7734
|
-
var _el$9 = _tmpl$4$
|
|
7795
|
+
var _el$9 = _tmpl$4$j();
|
|
7735
7796
|
_el$9.$$click = () => props.onPick(swatch.value);
|
|
7736
7797
|
_el$9.addEventListener("blur", () => props.onPreview(null));
|
|
7737
7798
|
_el$9.addEventListener("focus", () => props.onPreview(swatch.value));
|
|
@@ -7758,7 +7819,7 @@ function ColorGrids(props) {
|
|
|
7758
7819
|
})()];
|
|
7759
7820
|
}
|
|
7760
7821
|
delegateEvents(["click"]);
|
|
7761
|
-
var _tmpl$$
|
|
7822
|
+
var _tmpl$$Z = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$D = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class=oasis-editor-color-menu-action-swatch></span><span>`), _tmpl$3$s = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class="oasis-editor-color-menu-action-swatch oasis-editor-color-menu-more-swatch"></span><span>`), _tmpl$4$i = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$5$c = /* @__PURE__ */ template(`<span class=oasis-editor-color-split-icon><i></i><span class=oasis-editor-color-split-indicator>`), _tmpl$6$9 = /* @__PURE__ */ template(`<span>`), _tmpl$7$5 = /* @__PURE__ */ template(`<i data-lucide=slash>`);
|
|
7762
7823
|
const normalizeColor = (value2) => (value2 == null ? void 0 : value2.trim().toLowerCase()) ?? "";
|
|
7763
7824
|
function ColorPicker(props) {
|
|
7764
7825
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -7805,7 +7866,7 @@ function ColorPicker(props) {
|
|
|
7805
7866
|
},
|
|
7806
7867
|
get mainContent() {
|
|
7807
7868
|
return [(() => {
|
|
7808
|
-
var _el$9 = _tmpl$5$
|
|
7869
|
+
var _el$9 = _tmpl$5$c(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
|
|
7809
7870
|
createRenderEffect((_p$) => {
|
|
7810
7871
|
var _v$3 = props.icon, _v$4 = !displayColor(), _v$5 = displayColor() ?? void 0;
|
|
7811
7872
|
_v$3 !== _p$.e && setAttribute(_el$0, "data-lucide", _p$.e = _v$3);
|
|
@@ -7823,7 +7884,7 @@ function ColorPicker(props) {
|
|
|
7823
7884
|
return props.label;
|
|
7824
7885
|
},
|
|
7825
7886
|
get children() {
|
|
7826
|
-
var _el$10 = _tmpl$6$
|
|
7887
|
+
var _el$10 = _tmpl$6$9();
|
|
7827
7888
|
insert(_el$10, () => props.label);
|
|
7828
7889
|
return _el$10;
|
|
7829
7890
|
}
|
|
@@ -7835,17 +7896,17 @@ function ColorPicker(props) {
|
|
|
7835
7896
|
return clearLabel();
|
|
7836
7897
|
},
|
|
7837
7898
|
get children() {
|
|
7838
|
-
var _el$ = _tmpl$2$
|
|
7899
|
+
var _el$ = _tmpl$2$D(), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling;
|
|
7839
7900
|
_el$.$$click = () => applyColor(null);
|
|
7840
7901
|
insert(_el$2, createComponent(Show, {
|
|
7841
7902
|
get when() {
|
|
7842
7903
|
return props.kind === "color";
|
|
7843
7904
|
},
|
|
7844
7905
|
get fallback() {
|
|
7845
|
-
return _tmpl$7$
|
|
7906
|
+
return _tmpl$7$5();
|
|
7846
7907
|
},
|
|
7847
7908
|
get children() {
|
|
7848
|
-
return _tmpl$$
|
|
7909
|
+
return _tmpl$$Z();
|
|
7849
7910
|
}
|
|
7850
7911
|
}));
|
|
7851
7912
|
insert(_el$4, clearLabel);
|
|
@@ -7876,13 +7937,13 @@ function ColorPicker(props) {
|
|
|
7876
7937
|
},
|
|
7877
7938
|
get children() {
|
|
7878
7939
|
return [(() => {
|
|
7879
|
-
var _el$5 = _tmpl$3$
|
|
7940
|
+
var _el$5 = _tmpl$3$s(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
7880
7941
|
_el$5.$$click = () => customColorInputRef == null ? void 0 : customColorInputRef.click();
|
|
7881
7942
|
insert(_el$7, () => props.moreColorsLabel);
|
|
7882
7943
|
createRenderEffect(() => setAttribute(_el$5, "data-testid", `${props.testId}-more-colors`));
|
|
7883
7944
|
return _el$5;
|
|
7884
7945
|
})(), (() => {
|
|
7885
|
-
var _el$8 = _tmpl$4$
|
|
7946
|
+
var _el$8 = _tmpl$4$i();
|
|
7886
7947
|
_el$8.$$input = (event) => applyColor(event.currentTarget.value);
|
|
7887
7948
|
var _ref$ = customColorInputRef;
|
|
7888
7949
|
typeof _ref$ === "function" ? use(_ref$, _el$8) : customColorInputRef = _el$8;
|
|
@@ -7904,7 +7965,7 @@ function ColorPicker(props) {
|
|
|
7904
7965
|
});
|
|
7905
7966
|
}
|
|
7906
7967
|
delegateEvents(["click", "input"]);
|
|
7907
|
-
var _tmpl$$
|
|
7968
|
+
var _tmpl$$Y = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$C = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$r = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$h = /* @__PURE__ */ template(`<span>`), _tmpl$5$b = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button>`), _tmpl$6$8 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
|
|
7908
7969
|
function GridPicker(props) {
|
|
7909
7970
|
const t = useI18n();
|
|
7910
7971
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -7979,7 +8040,7 @@ function GridPicker(props) {
|
|
|
7979
8040
|
return h.row === 0 || h.col === 0 ? t("toolbar.table") : `${h.row} × ${h.col}`;
|
|
7980
8041
|
};
|
|
7981
8042
|
return (() => {
|
|
7982
|
-
var _el$ = _tmpl$3$
|
|
8043
|
+
var _el$ = _tmpl$3$r();
|
|
7983
8044
|
insert(_el$, createComponent(Popover, {
|
|
7984
8045
|
get open() {
|
|
7985
8046
|
return isOpen();
|
|
@@ -7991,7 +8052,7 @@ function GridPicker(props) {
|
|
|
7991
8052
|
col: 0
|
|
7992
8053
|
}),
|
|
7993
8054
|
trigger: (api) => (() => {
|
|
7994
|
-
var _el$4 = _tmpl$5$
|
|
8055
|
+
var _el$4 = _tmpl$5$b();
|
|
7995
8056
|
_el$4.$$click = () => api.toggle();
|
|
7996
8057
|
use((el) => api.ref(el), _el$4);
|
|
7997
8058
|
insert(_el$4, createComponent(ToolIcon, {
|
|
@@ -8004,7 +8065,7 @@ function GridPicker(props) {
|
|
|
8004
8065
|
return props.label;
|
|
8005
8066
|
},
|
|
8006
8067
|
get children() {
|
|
8007
|
-
var _el$5 = _tmpl$4$
|
|
8068
|
+
var _el$5 = _tmpl$4$h();
|
|
8008
8069
|
insert(_el$5, () => props.label);
|
|
8009
8070
|
return _el$5;
|
|
8010
8071
|
}
|
|
@@ -8028,11 +8089,11 @@ function GridPicker(props) {
|
|
|
8028
8089
|
})(),
|
|
8029
8090
|
get children() {
|
|
8030
8091
|
return [(() => {
|
|
8031
|
-
var _el$2 = _tmpl$$
|
|
8092
|
+
var _el$2 = _tmpl$$Y();
|
|
8032
8093
|
insert(_el$2, statusLabel);
|
|
8033
8094
|
return _el$2;
|
|
8034
8095
|
})(), (() => {
|
|
8035
|
-
var _el$3 = _tmpl$2$
|
|
8096
|
+
var _el$3 = _tmpl$2$C();
|
|
8036
8097
|
insert(_el$3, createComponent(For, {
|
|
8037
8098
|
get each() {
|
|
8038
8099
|
return rows();
|
|
@@ -8042,7 +8103,7 @@ function GridPicker(props) {
|
|
|
8042
8103
|
return cols();
|
|
8043
8104
|
},
|
|
8044
8105
|
children: (c) => (() => {
|
|
8045
|
-
var _el$6 = _tmpl$6$
|
|
8106
|
+
var _el$6 = _tmpl$6$8();
|
|
8046
8107
|
_el$6.$$click = () => selectGridSize(r, c);
|
|
8047
8108
|
_el$6.$$mousedown = (event) => event.preventDefault();
|
|
8048
8109
|
_el$6.addEventListener("mouseenter", () => setHover({
|
|
@@ -8132,7 +8193,7 @@ const DEFAULT_PALETTE = {
|
|
|
8132
8193
|
standardColors: STANDARD_COLORS,
|
|
8133
8194
|
allowCustom: true
|
|
8134
8195
|
};
|
|
8135
|
-
var _tmpl$$
|
|
8196
|
+
var _tmpl$$X = /* @__PURE__ */ template(`<button type=button class=oasis-editor-style-gallery-card role=option><span>`), _tmpl$2$B = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery-grid>`), _tmpl$3$q = /* @__PURE__ */ template(`<div class=oasis-editor-style-gallery><div class=oasis-editor-style-gallery-ribbon><div class=oasis-editor-style-gallery-strip role=listbox></div><button type=button class=oasis-editor-style-gallery-expand aria-haspopup=listbox>`), _tmpl$4$g = /* @__PURE__ */ template(`<option>`);
|
|
8136
8197
|
function getQuickStyles(styles) {
|
|
8137
8198
|
const applicable = styles.filter((style2) => style2.type !== "table" && (!style2.semiHidden || style2.unhideWhenUsed && style2.isUsed));
|
|
8138
8199
|
const hasQuickStyles = applicable.some((style2) => style2.qFormat === true);
|
|
@@ -8212,7 +8273,7 @@ function StyleGallery(props) {
|
|
|
8212
8273
|
return styles();
|
|
8213
8274
|
},
|
|
8214
8275
|
children: (style$1) => (() => {
|
|
8215
|
-
var _el$ = _tmpl$$
|
|
8276
|
+
var _el$ = _tmpl$$X(), _el$2 = _el$.firstChild;
|
|
8216
8277
|
_el$.$$click = () => apply(style$1);
|
|
8217
8278
|
insert(_el$2, () => style$1.name);
|
|
8218
8279
|
createRenderEffect((_p$) => {
|
|
@@ -8243,7 +8304,7 @@ function StyleGallery(props) {
|
|
|
8243
8304
|
panelRole: "listbox",
|
|
8244
8305
|
panelTestId,
|
|
8245
8306
|
trigger: (popover) => (() => {
|
|
8246
|
-
var _el$4 = _tmpl$3$
|
|
8307
|
+
var _el$4 = _tmpl$3$q(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
8247
8308
|
var _ref$ = popover.ref;
|
|
8248
8309
|
typeof _ref$ === "function" ? use(_ref$, _el$4) : popover.ref = _el$4;
|
|
8249
8310
|
insert(_el$4, createComponent(Select, {
|
|
@@ -8267,7 +8328,7 @@ function StyleGallery(props) {
|
|
|
8267
8328
|
return styles();
|
|
8268
8329
|
},
|
|
8269
8330
|
children: (style2) => (() => {
|
|
8270
|
-
var _el$8 = _tmpl$4$
|
|
8331
|
+
var _el$8 = _tmpl$4$g();
|
|
8271
8332
|
insert(_el$8, () => style2.name);
|
|
8272
8333
|
createRenderEffect(() => _el$8.value = style2.id);
|
|
8273
8334
|
return _el$8;
|
|
@@ -8293,7 +8354,7 @@ function StyleGallery(props) {
|
|
|
8293
8354
|
return _el$4;
|
|
8294
8355
|
})(),
|
|
8295
8356
|
get children() {
|
|
8296
|
-
var _el$3 = _tmpl$2$
|
|
8357
|
+
var _el$3 = _tmpl$2$B();
|
|
8297
8358
|
_el$3.$$keydown = onPanelKeyDown;
|
|
8298
8359
|
insert(_el$3, cards);
|
|
8299
8360
|
return _el$3;
|
|
@@ -8301,7 +8362,7 @@ function StyleGallery(props) {
|
|
|
8301
8362
|
});
|
|
8302
8363
|
}
|
|
8303
8364
|
delegateEvents(["click", "keydown"]);
|
|
8304
|
-
var _tmpl$$
|
|
8365
|
+
var _tmpl$$W = /* @__PURE__ */ template(`<span class=oasis-editor-wide-menu-button-indicator>`), _tmpl$2$A = /* @__PURE__ */ template(`<span class=oasis-editor-wide-menu-button-icon>`), _tmpl$3$p = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-wide-menu-button"aria-haspopup=menu><span class=oasis-editor-wide-menu-button-label>`);
|
|
8305
8366
|
function WideMenuButton(props) {
|
|
8306
8367
|
return createComponent(Popover, {
|
|
8307
8368
|
get open() {
|
|
@@ -8315,7 +8376,7 @@ function WideMenuButton(props) {
|
|
|
8315
8376
|
return `oasis-editor-color-menu ${props.panelClass ?? ""}`;
|
|
8316
8377
|
},
|
|
8317
8378
|
trigger: (api) => (() => {
|
|
8318
|
-
var _el$ = _tmpl$3$
|
|
8379
|
+
var _el$ = _tmpl$3$p(), _el$4 = _el$.firstChild;
|
|
8319
8380
|
_el$.$$click = () => api.toggle();
|
|
8320
8381
|
use((el) => api.ref(el), _el$);
|
|
8321
8382
|
insert(_el$, createComponent(Show, {
|
|
@@ -8323,7 +8384,7 @@ function WideMenuButton(props) {
|
|
|
8323
8384
|
return props.icon;
|
|
8324
8385
|
},
|
|
8325
8386
|
get children() {
|
|
8326
|
-
var _el$2 = _tmpl$2$
|
|
8387
|
+
var _el$2 = _tmpl$2$A();
|
|
8327
8388
|
insert(_el$2, createComponent(ToolIcon, {
|
|
8328
8389
|
get name() {
|
|
8329
8390
|
return props.icon;
|
|
@@ -8334,7 +8395,7 @@ function WideMenuButton(props) {
|
|
|
8334
8395
|
return props.indicatorColor !== void 0;
|
|
8335
8396
|
},
|
|
8336
8397
|
get children() {
|
|
8337
|
-
var _el$3 = _tmpl$$
|
|
8398
|
+
var _el$3 = _tmpl$$W();
|
|
8338
8399
|
createRenderEffect((_p$) => {
|
|
8339
8400
|
var _v$ = !props.indicatorColor, _v$2 = props.indicatorColor ?? "";
|
|
8340
8401
|
_v$ !== _p$.e && _el$3.classList.toggle("oasis-editor-wide-menu-button-indicator-empty", _p$.e = _v$);
|
|
@@ -8432,7 +8493,7 @@ function dashPreviewArray(dash) {
|
|
|
8432
8493
|
const pattern = lineDashPatternPt(dash);
|
|
8433
8494
|
return pattern.length > 0 ? pattern.join(" ") : void 0;
|
|
8434
8495
|
}
|
|
8435
|
-
var _tmpl$$
|
|
8496
|
+
var _tmpl$$V = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>`), _tmpl$2$z = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class="oasis-editor-color-menu-action-swatch oasis-editor-color-menu-more-swatch"></span><span>`), _tmpl$3$o = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$4$f = /* @__PURE__ */ template(`<div class=oasis-editor-picture-border-flyout role=menu>`), _tmpl$5$a = /* @__PURE__ */ template(`<div class=oasis-editor-picture-border-submenu-row><button type=button class="oasis-editor-color-menu-action oasis-editor-picture-border-submenu-trigger"role=menuitem aria-haspopup=menu><span class=oasis-editor-color-menu-action-swatch><i data-lucide=minus></i></span><span></span><i data-lucide=chevron-right class=oasis-editor-dropdown-chevron>`), _tmpl$6$7 = /* @__PURE__ */ template(`<div class=oasis-editor-picture-border-submenu-row><button type=button class="oasis-editor-color-menu-action oasis-editor-picture-border-submenu-trigger"role=menuitem aria-haspopup=menu><span class=oasis-editor-color-menu-action-swatch><i data-lucide=align-justify></i></span><span></span><i data-lucide=chevron-right class=oasis-editor-dropdown-chevron>`), _tmpl$7$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-picture-border-option role=menuitemradio><span class=oasis-editor-picture-border-preview></span><span class=oasis-editor-picture-border-option-label>`), _tmpl$8$3 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-picture-border-option role=menuitemradio><svg class=oasis-editor-picture-border-preview-svg viewBox="0 0 48 4"aria-hidden=true><line x1=0 y1=2 x2=48 y2=2 stroke=currentColor stroke-width=1.5></line></svg><span class=oasis-editor-picture-border-option-label>`);
|
|
8436
8497
|
function PictureBorderPicker(props) {
|
|
8437
8498
|
const [open, setOpen] = createSignal(false);
|
|
8438
8499
|
const [submenu, setSubmenu] = createSignal(null);
|
|
@@ -8500,7 +8561,7 @@ function PictureBorderPicker(props) {
|
|
|
8500
8561
|
color
|
|
8501
8562
|
})
|
|
8502
8563
|
}), (() => {
|
|
8503
|
-
var _el$ = _tmpl$$
|
|
8564
|
+
var _el$ = _tmpl$$V(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
8504
8565
|
_el$.$$click = () => apply({
|
|
8505
8566
|
color: null
|
|
8506
8567
|
});
|
|
@@ -8508,13 +8569,13 @@ function PictureBorderPicker(props) {
|
|
|
8508
8569
|
createRenderEffect(() => setAttribute(_el$, "data-testid", `${props.testId}-none`));
|
|
8509
8570
|
return _el$;
|
|
8510
8571
|
})(), (() => {
|
|
8511
|
-
var _el$4 = _tmpl$2$
|
|
8572
|
+
var _el$4 = _tmpl$2$z(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling;
|
|
8512
8573
|
_el$4.$$click = () => customColorInputRef == null ? void 0 : customColorInputRef.click();
|
|
8513
8574
|
insert(_el$6, () => props.moreColorsLabel);
|
|
8514
8575
|
createRenderEffect(() => setAttribute(_el$4, "data-testid", `${props.testId}-more-colors`));
|
|
8515
8576
|
return _el$4;
|
|
8516
8577
|
})(), (() => {
|
|
8517
|
-
var _el$7 = _tmpl$3$
|
|
8578
|
+
var _el$7 = _tmpl$3$o();
|
|
8518
8579
|
_el$7.$$input = (event) => apply({
|
|
8519
8580
|
color: event.currentTarget.value
|
|
8520
8581
|
});
|
|
@@ -8535,7 +8596,7 @@ function PictureBorderPicker(props) {
|
|
|
8535
8596
|
});
|
|
8536
8597
|
return _el$7;
|
|
8537
8598
|
})(), (() => {
|
|
8538
|
-
var _el$8 = _tmpl$5$
|
|
8599
|
+
var _el$8 = _tmpl$5$a(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling;
|
|
8539
8600
|
_el$9.$$click = () => toggleSubmenu("weight");
|
|
8540
8601
|
insert(_el$1, () => props.weightLabel);
|
|
8541
8602
|
insert(_el$8, createComponent(Show, {
|
|
@@ -8543,7 +8604,7 @@ function PictureBorderPicker(props) {
|
|
|
8543
8604
|
return submenu() === "weight";
|
|
8544
8605
|
},
|
|
8545
8606
|
get children() {
|
|
8546
|
-
var _el$10 = _tmpl$4$
|
|
8607
|
+
var _el$10 = _tmpl$4$f();
|
|
8547
8608
|
insert(_el$10, createComponent(For, {
|
|
8548
8609
|
each: PICTURE_BORDER_WEIGHTS_PT,
|
|
8549
8610
|
children: (widthPt) => {
|
|
@@ -8552,7 +8613,7 @@ function PictureBorderPicker(props) {
|
|
|
8552
8613
|
return ((_a2 = props.border) == null ? void 0 : _a2.widthPt) === widthPt;
|
|
8553
8614
|
};
|
|
8554
8615
|
return (() => {
|
|
8555
|
-
var _el$16 = _tmpl$7$
|
|
8616
|
+
var _el$16 = _tmpl$7$4(), _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling;
|
|
8556
8617
|
_el$16.$$click = () => apply({
|
|
8557
8618
|
widthPt
|
|
8558
8619
|
});
|
|
@@ -8589,7 +8650,7 @@ function PictureBorderPicker(props) {
|
|
|
8589
8650
|
});
|
|
8590
8651
|
return _el$8;
|
|
8591
8652
|
})(), (() => {
|
|
8592
|
-
var _el$11 = _tmpl$6$
|
|
8653
|
+
var _el$11 = _tmpl$6$7(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
|
|
8593
8654
|
_el$12.$$click = () => toggleSubmenu("dashes");
|
|
8594
8655
|
insert(_el$14, () => props.dashesLabel);
|
|
8595
8656
|
insert(_el$11, createComponent(Show, {
|
|
@@ -8597,7 +8658,7 @@ function PictureBorderPicker(props) {
|
|
|
8597
8658
|
return submenu() === "dashes";
|
|
8598
8659
|
},
|
|
8599
8660
|
get children() {
|
|
8600
|
-
var _el$15 = _tmpl$4$
|
|
8661
|
+
var _el$15 = _tmpl$4$f();
|
|
8601
8662
|
insert(_el$15, createComponent(For, {
|
|
8602
8663
|
get each() {
|
|
8603
8664
|
return props.dashOptions;
|
|
@@ -8605,7 +8666,7 @@ function PictureBorderPicker(props) {
|
|
|
8605
8666
|
children: (option) => {
|
|
8606
8667
|
const isActive = () => props.border !== null && (props.border.dash ?? "solid") === option.value;
|
|
8607
8668
|
return (() => {
|
|
8608
|
-
var _el$19 = _tmpl$8$
|
|
8669
|
+
var _el$19 = _tmpl$8$3(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$20.nextSibling;
|
|
8609
8670
|
_el$19.$$click = () => apply({
|
|
8610
8671
|
dash: option.value
|
|
8611
8672
|
});
|
|
@@ -8649,7 +8710,7 @@ function PictureBorderPicker(props) {
|
|
|
8649
8710
|
});
|
|
8650
8711
|
}
|
|
8651
8712
|
delegateEvents(["click", "input"]);
|
|
8652
|
-
var _tmpl$$
|
|
8713
|
+
var _tmpl$$U = /* @__PURE__ */ template(`<option value>`), _tmpl$2$y = /* @__PURE__ */ template(`<option>`), _tmpl$3$n = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
|
|
8653
8714
|
function renderMenuContent(content2, api) {
|
|
8654
8715
|
if (content2.kind === "custom") {
|
|
8655
8716
|
return content2.render(api);
|
|
@@ -8807,7 +8868,7 @@ function RenderSelect(props) {
|
|
|
8807
8868
|
return props.item.placeholder !== void 0;
|
|
8808
8869
|
},
|
|
8809
8870
|
get children() {
|
|
8810
|
-
var _el$ = _tmpl$$
|
|
8871
|
+
var _el$ = _tmpl$$U();
|
|
8811
8872
|
insert(_el$, () => props.item.placeholder);
|
|
8812
8873
|
return _el$;
|
|
8813
8874
|
}
|
|
@@ -8816,7 +8877,7 @@ function RenderSelect(props) {
|
|
|
8816
8877
|
return props.item.options(props.api);
|
|
8817
8878
|
},
|
|
8818
8879
|
children: (option) => (() => {
|
|
8819
|
-
var _el$2 = _tmpl$2$
|
|
8880
|
+
var _el$2 = _tmpl$2$y();
|
|
8820
8881
|
insert(_el$2, () => option.label);
|
|
8821
8882
|
createRenderEffect(() => _el$2.value = option.value);
|
|
8822
8883
|
return _el$2;
|
|
@@ -9014,7 +9075,7 @@ function ToolbarItemRenderer(props) {
|
|
|
9014
9075
|
const binding = bindItem(props.item, props.api);
|
|
9015
9076
|
const component = () => resolveRenderer(props.item.type);
|
|
9016
9077
|
return (() => {
|
|
9017
|
-
var _el$3 = _tmpl$3$
|
|
9078
|
+
var _el$3 = _tmpl$3$n();
|
|
9018
9079
|
insert(_el$3, createComponent(Show, {
|
|
9019
9080
|
get when() {
|
|
9020
9081
|
return component();
|
|
@@ -9054,6 +9115,7 @@ const RIBBON_TABS = [
|
|
|
9054
9115
|
"file",
|
|
9055
9116
|
"home",
|
|
9056
9117
|
"insert",
|
|
9118
|
+
"design",
|
|
9057
9119
|
"draw",
|
|
9058
9120
|
"layout",
|
|
9059
9121
|
"references",
|
|
@@ -9075,6 +9137,7 @@ const TAB_LABEL_KEYS = {
|
|
|
9075
9137
|
file: "ribbon.tab.file",
|
|
9076
9138
|
home: "ribbon.tab.home",
|
|
9077
9139
|
insert: "ribbon.tab.insert",
|
|
9140
|
+
design: "ribbon.tab.design",
|
|
9078
9141
|
draw: "ribbon.tab.draw",
|
|
9079
9142
|
layout: "ribbon.tab.layout",
|
|
9080
9143
|
references: "ribbon.tab.references",
|
|
@@ -9098,6 +9161,8 @@ const GROUP_LABEL_KEYS = {
|
|
|
9098
9161
|
links: "ribbon.group.links",
|
|
9099
9162
|
footnotes: "ribbon.group.footnotes",
|
|
9100
9163
|
accessibility: "ribbon.group.accessibility",
|
|
9164
|
+
documentFormatting: "ribbon.group.documentFormatting",
|
|
9165
|
+
pageBackground: "ribbon.group.pageBackground",
|
|
9101
9166
|
document: "ribbon.group.document",
|
|
9102
9167
|
table: "ribbon.group.table",
|
|
9103
9168
|
section: "ribbon.group.section",
|
|
@@ -9148,6 +9213,10 @@ const RIBBON_GROUP_ORDER = {
|
|
|
9148
9213
|
footnotes: 40,
|
|
9149
9214
|
accessibility: 50
|
|
9150
9215
|
},
|
|
9216
|
+
design: {
|
|
9217
|
+
documentFormatting: 10,
|
|
9218
|
+
pageBackground: 20
|
|
9219
|
+
},
|
|
9151
9220
|
layout: {
|
|
9152
9221
|
paragraph: 10,
|
|
9153
9222
|
table: 20,
|
|
@@ -9225,6 +9294,10 @@ const RIBBON_GROUP_RESIZE_DEFAULTS = {
|
|
|
9225
9294
|
accessibility: { priority: 20, collapsedIcon: "file-text" },
|
|
9226
9295
|
footnotes: { priority: 15, collapsedIcon: "footnote" }
|
|
9227
9296
|
},
|
|
9297
|
+
design: {
|
|
9298
|
+
documentFormatting: { priority: 10, collapsedIcon: "palette" },
|
|
9299
|
+
pageBackground: { priority: 20, collapsedIcon: "paint-bucket" }
|
|
9300
|
+
},
|
|
9228
9301
|
layout: {
|
|
9229
9302
|
paragraph: { priority: 30, compactMinWidth: 112, collapsedIcon: "ruler" },
|
|
9230
9303
|
table: { priority: 20, collapsedIcon: "table" },
|
|
@@ -9523,7 +9596,7 @@ function resolveResponsiveRibbonGroups(groups, availableWidth, measurements = {}
|
|
|
9523
9596
|
allocatedWidth: allocatedWidths.get(group.id)
|
|
9524
9597
|
}));
|
|
9525
9598
|
}
|
|
9526
|
-
var _tmpl$$
|
|
9599
|
+
var _tmpl$$T = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-tabs role=tablist>`), _tmpl$2$x = /* @__PURE__ */ template(`<button type=button class=oasis-editor-ribbon-tab role=tab>`);
|
|
9527
9600
|
function RibbonTabs(props) {
|
|
9528
9601
|
const tabs = createMemo(() => buildRibbonTabDefinitions(props.api.t, props.api, props.items()));
|
|
9529
9602
|
createEffect(() => {
|
|
@@ -9539,13 +9612,13 @@ function RibbonTabs(props) {
|
|
|
9539
9612
|
if (next) props.setActiveTab(next.id);
|
|
9540
9613
|
};
|
|
9541
9614
|
return (() => {
|
|
9542
|
-
var _el$ = _tmpl$$
|
|
9615
|
+
var _el$ = _tmpl$$T();
|
|
9543
9616
|
insert(_el$, createComponent(For, {
|
|
9544
9617
|
get each() {
|
|
9545
9618
|
return tabs();
|
|
9546
9619
|
},
|
|
9547
9620
|
children: (tab) => (() => {
|
|
9548
|
-
var _el$2 = _tmpl$2$
|
|
9621
|
+
var _el$2 = _tmpl$2$x();
|
|
9549
9622
|
_el$2.$$keydown = (event) => {
|
|
9550
9623
|
if (event.key === "ArrowRight") {
|
|
9551
9624
|
event.preventDefault();
|
|
@@ -9590,10 +9663,10 @@ function RibbonTabs(props) {
|
|
|
9590
9663
|
})();
|
|
9591
9664
|
}
|
|
9592
9665
|
delegateEvents(["click", "keydown"]);
|
|
9593
|
-
var _tmpl$$
|
|
9666
|
+
var _tmpl$$S = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-row>`);
|
|
9594
9667
|
function RibbonRow(props) {
|
|
9595
9668
|
return (() => {
|
|
9596
|
-
var _el$ = _tmpl$$
|
|
9669
|
+
var _el$ = _tmpl$$S();
|
|
9597
9670
|
insert(_el$, createComponent(For, {
|
|
9598
9671
|
get each() {
|
|
9599
9672
|
return props.items;
|
|
@@ -9608,7 +9681,7 @@ function RibbonRow(props) {
|
|
|
9608
9681
|
return _el$;
|
|
9609
9682
|
})();
|
|
9610
9683
|
}
|
|
9611
|
-
var _tmpl$$
|
|
9684
|
+
var _tmpl$$R = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-large-items>`), _tmpl$2$w = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows><div class=oasis-editor-ribbon-normal-rows>`), _tmpl$3$m = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-label>`), _tmpl$4$e = /* @__PURE__ */ template(`<section class=oasis-editor-ribbon-group>`), _tmpl$5$9 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-collapsed-items>`), _tmpl$6$6 = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-group-rows>`);
|
|
9612
9685
|
function groupItems(group) {
|
|
9613
9686
|
return [...group.largeItems, ...group.rows[1], ...group.rows[2]];
|
|
9614
9687
|
}
|
|
@@ -9619,14 +9692,14 @@ function groupStyle(group) {
|
|
|
9619
9692
|
}
|
|
9620
9693
|
function RibbonGroup(props) {
|
|
9621
9694
|
return (() => {
|
|
9622
|
-
var _el$ = _tmpl$4$
|
|
9695
|
+
var _el$ = _tmpl$4$e();
|
|
9623
9696
|
insert(_el$, createComponent(Show, {
|
|
9624
9697
|
get when() {
|
|
9625
9698
|
return props.group.resizeState !== "collapsed";
|
|
9626
9699
|
},
|
|
9627
9700
|
get fallback() {
|
|
9628
9701
|
return [(() => {
|
|
9629
|
-
var _el$6 = _tmpl$6$
|
|
9702
|
+
var _el$6 = _tmpl$6$6();
|
|
9630
9703
|
insert(_el$6, createComponent(Menu, {
|
|
9631
9704
|
get icon() {
|
|
9632
9705
|
return props.group.resizePolicy.collapsedIcon;
|
|
@@ -9640,7 +9713,7 @@ function RibbonGroup(props) {
|
|
|
9640
9713
|
ribbonSize: "large",
|
|
9641
9714
|
panelClass: "oasis-editor-ribbon-collapsed-menu",
|
|
9642
9715
|
get children() {
|
|
9643
|
-
var _el$7 = _tmpl$5$
|
|
9716
|
+
var _el$7 = _tmpl$5$9();
|
|
9644
9717
|
insert(_el$7, createComponent(For, {
|
|
9645
9718
|
get each() {
|
|
9646
9719
|
return groupItems(props.group);
|
|
@@ -9657,20 +9730,20 @@ function RibbonGroup(props) {
|
|
|
9657
9730
|
}));
|
|
9658
9731
|
return _el$6;
|
|
9659
9732
|
})(), (() => {
|
|
9660
|
-
var _el$8 = _tmpl$3$
|
|
9733
|
+
var _el$8 = _tmpl$3$m();
|
|
9661
9734
|
insert(_el$8, () => props.group.label);
|
|
9662
9735
|
return _el$8;
|
|
9663
9736
|
})()];
|
|
9664
9737
|
},
|
|
9665
9738
|
get children() {
|
|
9666
9739
|
return [(() => {
|
|
9667
|
-
var _el$2 = _tmpl$2$
|
|
9740
|
+
var _el$2 = _tmpl$2$w(), _el$4 = _el$2.firstChild;
|
|
9668
9741
|
insert(_el$2, createComponent(Show, {
|
|
9669
9742
|
get when() {
|
|
9670
9743
|
return props.group.largeItems.length > 0;
|
|
9671
9744
|
},
|
|
9672
9745
|
get children() {
|
|
9673
|
-
var _el$3 = _tmpl$$
|
|
9746
|
+
var _el$3 = _tmpl$$R();
|
|
9674
9747
|
insert(_el$3, createComponent(For, {
|
|
9675
9748
|
get each() {
|
|
9676
9749
|
return props.group.largeItems;
|
|
@@ -9703,7 +9776,7 @@ function RibbonGroup(props) {
|
|
|
9703
9776
|
}), null);
|
|
9704
9777
|
return _el$2;
|
|
9705
9778
|
})(), (() => {
|
|
9706
|
-
var _el$5 = _tmpl$3$
|
|
9779
|
+
var _el$5 = _tmpl$3$m();
|
|
9707
9780
|
insert(_el$5, () => props.group.label);
|
|
9708
9781
|
return _el$5;
|
|
9709
9782
|
})()];
|
|
@@ -9731,7 +9804,7 @@ function RibbonGroup(props) {
|
|
|
9731
9804
|
return _el$;
|
|
9732
9805
|
})();
|
|
9733
9806
|
}
|
|
9734
|
-
var _tmpl$$
|
|
9807
|
+
var _tmpl$$Q = /* @__PURE__ */ template(`<div class=oasis-editor-ribbon-panel role=tabpanel data-testid=editor-ribbon-panel>`);
|
|
9735
9808
|
function RibbonPanel(props) {
|
|
9736
9809
|
const [availableWidth, setAvailableWidth] = createSignal(null);
|
|
9737
9810
|
const [measurements, setMeasurements] = createSignal({});
|
|
@@ -9776,7 +9849,7 @@ function RibbonPanel(props) {
|
|
|
9776
9849
|
requestAnimationFrame(measureGroups);
|
|
9777
9850
|
});
|
|
9778
9851
|
return (() => {
|
|
9779
|
-
var _el$ = _tmpl$$
|
|
9852
|
+
var _el$ = _tmpl$$Q();
|
|
9780
9853
|
var _ref$ = panelRef;
|
|
9781
9854
|
typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
|
|
9782
9855
|
insert(_el$, createComponent(For, {
|
|
@@ -9802,7 +9875,7 @@ function RibbonPanel(props) {
|
|
|
9802
9875
|
return _el$;
|
|
9803
9876
|
})();
|
|
9804
9877
|
}
|
|
9805
|
-
var _tmpl$$
|
|
9878
|
+
var _tmpl$$P = /* @__PURE__ */ template(`<section class=oasis-editor-toolbar>`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-wrap-strip>`);
|
|
9806
9879
|
const shouldAllowNativeMouseDown = (target) => target instanceof Element && target.closest("select, input, textarea, label") !== null;
|
|
9807
9880
|
function Toolbar(props) {
|
|
9808
9881
|
const api = createToolbarApi(props.host, useI18n());
|
|
@@ -9852,7 +9925,7 @@ function Toolbar(props) {
|
|
|
9852
9925
|
})
|
|
9853
9926
|
});
|
|
9854
9927
|
return (() => {
|
|
9855
|
-
var _el$ = _tmpl$$
|
|
9928
|
+
var _el$ = _tmpl$$P();
|
|
9856
9929
|
_el$.$$mousedown = (event) => {
|
|
9857
9930
|
if (shouldAllowNativeMouseDown(event.target)) {
|
|
9858
9931
|
return;
|
|
@@ -9875,7 +9948,7 @@ function Toolbar(props) {
|
|
|
9875
9948
|
return renderItems();
|
|
9876
9949
|
}
|
|
9877
9950
|
}) : (() => {
|
|
9878
|
-
var _el$2 = _tmpl$2$
|
|
9951
|
+
var _el$2 = _tmpl$2$v();
|
|
9879
9952
|
insert(_el$2, renderItems);
|
|
9880
9953
|
return _el$2;
|
|
9881
9954
|
})();
|
|
@@ -21821,11 +21894,11 @@ function buildCanvasTableLayout(options) {
|
|
|
21821
21894
|
unsupported: Array.from(new Set(unsupported))
|
|
21822
21895
|
};
|
|
21823
21896
|
}
|
|
21824
|
-
var _tmpl$$
|
|
21897
|
+
var _tmpl$$O = /* @__PURE__ */ template(`<div class=oasis-editor-page-break style="display:flex;align-items:center;justify-content:center;margin:16px 0;position:relative;user-select:none"><div style="position:absolute;left:0;right:0;top:50%;border-top:1px dashed var(--oasis-toolbar-border, #e0e3e7)"></div><div style="background:var(--oasis-bg, #f6f8fb);padding:0 12px;color:var(--oasis-text-muted, #5f6368);font-size:12px;font-family:var(--oasis-font-ui, sans-serif);z-index:1">`);
|
|
21825
21898
|
function PageBreak(_props) {
|
|
21826
21899
|
const t = useI18n();
|
|
21827
21900
|
return (() => {
|
|
21828
|
-
var _el$ = _tmpl$$
|
|
21901
|
+
var _el$ = _tmpl$$O(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
21829
21902
|
insert(_el$3, () => t("metric.pageBreak") || "Page Break");
|
|
21830
21903
|
return _el$;
|
|
21831
21904
|
})();
|
|
@@ -25238,6 +25311,7 @@ function resolveCanvasFooterZoneTop(page) {
|
|
|
25238
25311
|
function createCanvasPageRenderer(options) {
|
|
25239
25312
|
let lastPaintedPage;
|
|
25240
25313
|
let lastStyles;
|
|
25314
|
+
let lastDesign;
|
|
25241
25315
|
let lastShowMargins;
|
|
25242
25316
|
let lastShowParagraphMarks;
|
|
25243
25317
|
let lastActiveZone;
|
|
@@ -25245,6 +25319,8 @@ function createCanvasPageRenderer(options) {
|
|
|
25245
25319
|
let lastWidth = 0;
|
|
25246
25320
|
let lastHeight = 0;
|
|
25247
25321
|
let lastDpr = 0;
|
|
25322
|
+
let watermarkImage;
|
|
25323
|
+
let watermarkImageSrc;
|
|
25248
25324
|
let rafHandle = null;
|
|
25249
25325
|
const schedulePaint = () => {
|
|
25250
25326
|
if (rafHandle !== null) return;
|
|
@@ -25262,6 +25338,7 @@ function createCanvasPageRenderer(options) {
|
|
|
25262
25338
|
lastActiveFootnoteId = void 0;
|
|
25263
25339
|
};
|
|
25264
25340
|
const paint = () => {
|
|
25341
|
+
var _a2;
|
|
25265
25342
|
rafHandle = null;
|
|
25266
25343
|
const canvas = options.getCanvas();
|
|
25267
25344
|
if (!canvas) return;
|
|
@@ -25270,15 +25347,17 @@ function createCanvasPageRenderer(options) {
|
|
|
25270
25347
|
const page = options.getPage();
|
|
25271
25348
|
const state = options.getState();
|
|
25272
25349
|
const styles = state.document.styles;
|
|
25350
|
+
const design = state.document.design;
|
|
25273
25351
|
const showMargins = state.showMargins;
|
|
25274
25352
|
const showParagraphMarks = state.showParagraphMarks;
|
|
25275
25353
|
const activeZone = state.activeZone ?? "main";
|
|
25276
25354
|
const activeFootnoteId = state.activeFootnoteId;
|
|
25277
|
-
if (page === lastPaintedPage && styles === lastStyles && showMargins === lastShowMargins && showParagraphMarks === lastShowParagraphMarks && activeZone === lastActiveZone && activeFootnoteId === lastActiveFootnoteId) {
|
|
25355
|
+
if (page === lastPaintedPage && styles === lastStyles && design === lastDesign && showMargins === lastShowMargins && showParagraphMarks === lastShowParagraphMarks && activeZone === lastActiveZone && activeFootnoteId === lastActiveFootnoteId) {
|
|
25278
25356
|
return;
|
|
25279
25357
|
}
|
|
25280
25358
|
lastPaintedPage = page;
|
|
25281
25359
|
lastStyles = styles;
|
|
25360
|
+
lastDesign = design;
|
|
25282
25361
|
lastShowMargins = showMargins;
|
|
25283
25362
|
lastShowParagraphMarks = showParagraphMarks;
|
|
25284
25363
|
lastActiveZone = activeZone;
|
|
@@ -25296,8 +25375,63 @@ function createCanvasPageRenderer(options) {
|
|
|
25296
25375
|
lastDpr = dpr;
|
|
25297
25376
|
}
|
|
25298
25377
|
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
25299
|
-
ctx.fillStyle = "#ffffff";
|
|
25378
|
+
ctx.fillStyle = (design == null ? void 0 : design.pageColor) || "#ffffff";
|
|
25300
25379
|
ctx.fillRect(0, 0, width, height);
|
|
25380
|
+
const watermark = design == null ? void 0 : design.watermark;
|
|
25381
|
+
if (watermark) {
|
|
25382
|
+
ctx.save();
|
|
25383
|
+
ctx.translate(width / 2, height / 2);
|
|
25384
|
+
ctx.rotate((watermark.rotation ?? -45) * Math.PI / 180);
|
|
25385
|
+
ctx.globalAlpha = Math.max(0, Math.min(1, watermark.opacity ?? 0.25));
|
|
25386
|
+
ctx.fillStyle = watermark.color ?? "#94a3b8";
|
|
25387
|
+
ctx.textAlign = "center";
|
|
25388
|
+
ctx.textBaseline = "middle";
|
|
25389
|
+
if (watermark.kind === "image" && watermark.src && typeof Image !== "undefined") {
|
|
25390
|
+
if (watermarkImageSrc !== watermark.src) {
|
|
25391
|
+
watermarkImageSrc = watermark.src;
|
|
25392
|
+
watermarkImage = new Image();
|
|
25393
|
+
watermarkImage.onload = () => {
|
|
25394
|
+
invalidatePage();
|
|
25395
|
+
schedulePaint();
|
|
25396
|
+
};
|
|
25397
|
+
watermarkImage.src = watermark.src;
|
|
25398
|
+
}
|
|
25399
|
+
if ((watermarkImage == null ? void 0 : watermarkImage.complete) && watermarkImage.naturalWidth > 0) {
|
|
25400
|
+
const scale = watermark.scale ?? 1;
|
|
25401
|
+
ctx.drawImage(
|
|
25402
|
+
watermarkImage,
|
|
25403
|
+
-watermarkImage.naturalWidth * scale / 2,
|
|
25404
|
+
-watermarkImage.naturalHeight * scale / 2,
|
|
25405
|
+
watermarkImage.naturalWidth * scale,
|
|
25406
|
+
watermarkImage.naturalHeight * scale
|
|
25407
|
+
);
|
|
25408
|
+
}
|
|
25409
|
+
} else {
|
|
25410
|
+
ctx.font = `${watermark.fontSize ?? 48}px ${watermark.fontFamily ?? "Arial"}`;
|
|
25411
|
+
ctx.fillText(watermark.text ?? "", 0, 0);
|
|
25412
|
+
}
|
|
25413
|
+
ctx.restore();
|
|
25414
|
+
}
|
|
25415
|
+
const section = (_a2 = state.document.sections) == null ? void 0 : _a2[page.sectionIndex ?? state.activeSectionIndex ?? 0];
|
|
25416
|
+
if (section == null ? void 0 : section.pageBorder) {
|
|
25417
|
+
const border = section.pageBorder;
|
|
25418
|
+
ctx.save();
|
|
25419
|
+
ctx.strokeStyle = border.color;
|
|
25420
|
+
ctx.lineWidth = Math.max(1, border.width);
|
|
25421
|
+
if (border.style === "dashed") ctx.setLineDash([8, 5]);
|
|
25422
|
+
if (border.style === "dotted") ctx.setLineDash([2, 4]);
|
|
25423
|
+
ctx.strokeRect(
|
|
25424
|
+
border.distance ?? 12,
|
|
25425
|
+
border.distance ?? 12,
|
|
25426
|
+
width - 2 * (border.distance ?? 12),
|
|
25427
|
+
height - 2 * (border.distance ?? 12)
|
|
25428
|
+
);
|
|
25429
|
+
if (border.style === "double") {
|
|
25430
|
+
const d = (border.distance ?? 12) + border.width * 2;
|
|
25431
|
+
ctx.strokeRect(d, d, width - 2 * d, height - 2 * d);
|
|
25432
|
+
}
|
|
25433
|
+
ctx.restore();
|
|
25434
|
+
}
|
|
25301
25435
|
const marginX = page.pageSettings.margins.left + page.pageSettings.margins.gutter;
|
|
25302
25436
|
const bodyTop = page.bodyTop ?? getPageBodyTop(page.pageSettings);
|
|
25303
25437
|
const headerTop = page.headerTop ?? getPageHeaderZoneTop(page.pageSettings);
|
|
@@ -25791,7 +25925,7 @@ function prepareDocumentFonts(document2, options = {}) {
|
|
|
25791
25925
|
preparationLoads.set(key, load);
|
|
25792
25926
|
return load;
|
|
25793
25927
|
}
|
|
25794
|
-
var _tmpl$$
|
|
25928
|
+
var _tmpl$$N = /* @__PURE__ */ template(`<div class="oasis-editor-paper-stack oasis-editor-canvas-stack"style=position:relative>`), _tmpl$2$u = /* @__PURE__ */ template(`<div class=oasis-editor-canvas-page-slot style=position:relative>`), _tmpl$3$l = /* @__PURE__ */ template(`<div class=oasis-editor-paper data-renderer=canvas data-testid=editor-page style=position:relative;z-index:1><canvas>`), _tmpl$4$d = /* @__PURE__ */ template(`<div class=oasis-editor-table-revision-hit style=position:absolute;pointer-events:auto;background:transparent>`);
|
|
25795
25929
|
const surfaceLogger = createEditorLogger("canvas-surface");
|
|
25796
25930
|
function CanvasEditorSurface(props) {
|
|
25797
25931
|
const documentFontFamilies = createMemo(() => Array.from(collectPdfFontFamilies(props.state().document)));
|
|
@@ -25814,7 +25948,7 @@ function CanvasEditorSurface(props) {
|
|
|
25814
25948
|
return layout;
|
|
25815
25949
|
});
|
|
25816
25950
|
return (() => {
|
|
25817
|
-
var _el$ = _tmpl$$
|
|
25951
|
+
var _el$ = _tmpl$$N();
|
|
25818
25952
|
insert(_el$, createComponent(Index, {
|
|
25819
25953
|
get each() {
|
|
25820
25954
|
return documentLayout().pages;
|
|
@@ -25826,7 +25960,7 @@ function CanvasEditorSurface(props) {
|
|
|
25826
25960
|
// inserting an image that triggers re-pagination in a narrow viewport),
|
|
25827
25961
|
// causing "Failed to execute 'insertBefore'" errors.
|
|
25828
25962
|
(() => {
|
|
25829
|
-
var _el$2 = _tmpl$2$
|
|
25963
|
+
var _el$2 = _tmpl$2$u();
|
|
25830
25964
|
insert(_el$2, createComponent(Show, {
|
|
25831
25965
|
when: index > 0,
|
|
25832
25966
|
get children() {
|
|
@@ -25956,7 +26090,7 @@ function CanvasPage(props) {
|
|
|
25956
26090
|
});
|
|
25957
26091
|
onCleanup(() => renderer.dispose());
|
|
25958
26092
|
return (() => {
|
|
25959
|
-
var _el$3 = _tmpl$3$
|
|
26093
|
+
var _el$3 = _tmpl$3$l(), _el$4 = _el$3.firstChild;
|
|
25960
26094
|
addEventListener(_el$3, "dblclick", props.onSurfaceDblClick, true);
|
|
25961
26095
|
addEventListener(_el$3, "mousemove", props.onSurfaceMouseMove, true);
|
|
25962
26096
|
addEventListener(_el$3, "click", props.onSurfaceClick, true);
|
|
@@ -25968,7 +26102,7 @@ function CanvasPage(props) {
|
|
|
25968
26102
|
return revisionCells();
|
|
25969
26103
|
},
|
|
25970
26104
|
children: (revision) => (() => {
|
|
25971
|
-
var _el$5 = _tmpl$4$
|
|
26105
|
+
var _el$5 = _tmpl$4$d();
|
|
25972
26106
|
addEventListener(_el$5, "mousedown", props.onSurfaceMouseDown, true);
|
|
25973
26107
|
_el$5.addEventListener("mouseleave", (event) => {
|
|
25974
26108
|
var _a2;
|
|
@@ -26348,7 +26482,7 @@ function computeRulerTicks(pageWidth, contentLeft, unit) {
|
|
|
26348
26482
|
pushSide(-1);
|
|
26349
26483
|
return ticks;
|
|
26350
26484
|
}
|
|
26351
|
-
var _tmpl$$
|
|
26485
|
+
var _tmpl$$M = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler data-testid=editor-horizontal-ruler role=presentation><div class=oasis-editor-horizontal-ruler-track><div class=oasis-editor-horizontal-ruler-page><div class=oasis-editor-horizontal-ruler-margin style=left:0px></div><div class=oasis-editor-horizontal-ruler-margin></div><div class=oasis-editor-horizontal-ruler-content></div><button type=button class=oasis-editor-horizontal-ruler-margin-handle></button><button type=button class=oasis-editor-horizontal-ruler-margin-handle></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-first-line"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-hanging"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-left-box"></button><button type=button class="oasis-editor-ruler-marker oasis-editor-ruler-marker-right-indent">`), _tmpl$2$t = /* @__PURE__ */ template(`<div>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-editor-horizontal-ruler-label>`);
|
|
26352
26486
|
function getActivePageSettings(state) {
|
|
26353
26487
|
var _a2;
|
|
26354
26488
|
const idx = getActiveSectionIndex(state);
|
|
@@ -26554,7 +26688,7 @@ function HorizontalRuler(props) {
|
|
|
26554
26688
|
}
|
|
26555
26689
|
};
|
|
26556
26690
|
return (() => {
|
|
26557
|
-
var _el$ = _tmpl$$
|
|
26691
|
+
var _el$ = _tmpl$$M(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling;
|
|
26558
26692
|
var _ref$ = pageRef;
|
|
26559
26693
|
typeof _ref$ === "function" ? use(_ref$, _el$3) : pageRef = _el$3;
|
|
26560
26694
|
insert(_el$3, createComponent(For, {
|
|
@@ -26562,7 +26696,7 @@ function HorizontalRuler(props) {
|
|
|
26562
26696
|
return ticks();
|
|
26563
26697
|
},
|
|
26564
26698
|
children: (tick) => [(() => {
|
|
26565
|
-
var _el$11 = _tmpl$2$
|
|
26699
|
+
var _el$11 = _tmpl$2$t();
|
|
26566
26700
|
createRenderEffect((_p$) => {
|
|
26567
26701
|
var _v$27 = `oasis-editor-horizontal-ruler-tick oasis-editor-horizontal-ruler-tick-${tick.kind}`, _v$28 = `${sx(tick.x)}px`;
|
|
26568
26702
|
_v$27 !== _p$.e && className(_el$11, _p$.e = _v$27);
|
|
@@ -26574,7 +26708,7 @@ function HorizontalRuler(props) {
|
|
|
26574
26708
|
});
|
|
26575
26709
|
return _el$11;
|
|
26576
26710
|
})(), memo(() => memo(() => !!tick.label)() && (() => {
|
|
26577
|
-
var _el$12 = _tmpl$3$
|
|
26711
|
+
var _el$12 = _tmpl$3$k();
|
|
26578
26712
|
insert(_el$12, () => tick.label);
|
|
26579
26713
|
createRenderEffect((_$p) => setStyleProperty(_el$12, "left", `${sx(tick.x)}px`));
|
|
26580
26714
|
return _el$12;
|
|
@@ -26651,10 +26785,10 @@ function HorizontalRuler(props) {
|
|
|
26651
26785
|
})();
|
|
26652
26786
|
}
|
|
26653
26787
|
delegateEvents(["pointerdown"]);
|
|
26654
|
-
var _tmpl$$
|
|
26788
|
+
var _tmpl$$L = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-caret>`);
|
|
26655
26789
|
function CaretOverlay(props) {
|
|
26656
26790
|
return (() => {
|
|
26657
|
-
var _el$ = _tmpl$$
|
|
26791
|
+
var _el$ = _tmpl$$L();
|
|
26658
26792
|
createRenderEffect((_p$) => {
|
|
26659
26793
|
var _v$ = !!props.active, _v$2 = {
|
|
26660
26794
|
left: `${props.left}px`,
|
|
@@ -26675,16 +26809,16 @@ function CaretOverlay(props) {
|
|
|
26675
26809
|
return _el$;
|
|
26676
26810
|
})();
|
|
26677
26811
|
}
|
|
26678
|
-
var _tmpl$$
|
|
26812
|
+
var _tmpl$$K = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-selection-overlay-root>`), _tmpl$2$s = /* @__PURE__ */ template(`<span aria-hidden=true class=oasis-editor-selection-box data-testid=editor-selection-box>`);
|
|
26679
26813
|
function SelectionOverlay(props) {
|
|
26680
26814
|
return (() => {
|
|
26681
|
-
var _el$ = _tmpl$$
|
|
26815
|
+
var _el$ = _tmpl$$K();
|
|
26682
26816
|
insert(_el$, createComponent(Index, {
|
|
26683
26817
|
get each() {
|
|
26684
26818
|
return props.boxes;
|
|
26685
26819
|
},
|
|
26686
26820
|
children: (box) => (() => {
|
|
26687
|
-
var _el$2 = _tmpl$2$
|
|
26821
|
+
var _el$2 = _tmpl$2$s();
|
|
26688
26822
|
createRenderEffect((_p$) => {
|
|
26689
26823
|
var _v$ = `${box().left}px`, _v$2 = `${box().top}px`, _v$3 = `${box().width}px`, _v$4 = `${box().height}px`;
|
|
26690
26824
|
_v$ !== _p$.e && setStyleProperty(_el$2, "left", _p$.e = _v$);
|
|
@@ -26704,7 +26838,7 @@ function SelectionOverlay(props) {
|
|
|
26704
26838
|
return _el$;
|
|
26705
26839
|
})();
|
|
26706
26840
|
}
|
|
26707
|
-
var _tmpl$$
|
|
26841
|
+
var _tmpl$$J = /* @__PURE__ */ template(`<div class=oasis-editor-revision-overlay data-testid=editor-revision-overlay><div class=oasis-editor-revision-overlay-content><span class=oasis-editor-revision-overlay-author><strong>:</strong> </span><span class=oasis-editor-revision-overlay-date></span></div><div class=oasis-editor-revision-overlay-arrow>`);
|
|
26708
26842
|
function RevisionOverlay(props) {
|
|
26709
26843
|
const formattedDate = () => {
|
|
26710
26844
|
try {
|
|
@@ -26719,7 +26853,7 @@ function RevisionOverlay(props) {
|
|
|
26719
26853
|
return "Alterado por";
|
|
26720
26854
|
};
|
|
26721
26855
|
return (() => {
|
|
26722
|
-
var _el$ = _tmpl$$
|
|
26856
|
+
var _el$ = _tmpl$$J(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
26723
26857
|
_el$4.nextSibling;
|
|
26724
26858
|
var _el$7 = _el$3.nextSibling;
|
|
26725
26859
|
insert(_el$4, label, _el$5);
|
|
@@ -26737,7 +26871,7 @@ function RevisionOverlay(props) {
|
|
|
26737
26871
|
return _el$;
|
|
26738
26872
|
})();
|
|
26739
26873
|
}
|
|
26740
|
-
var _tmpl$$
|
|
26874
|
+
var _tmpl$$I = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-comment-overlay-root>`), _tmpl$2$r = /* @__PURE__ */ template(`<span class=oasis-editor-comment-highlight data-testid=editor-comment-highlight>`), _tmpl$3$j = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-date>`), _tmpl$4$c = /* @__PURE__ */ template(`<span class=oasis-editor-comment-popup-resolved>✓`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=oasis-editor-comment-popup data-testid=editor-comment-popup><div class=oasis-editor-comment-popup-header><span class=oasis-editor-comment-popup-author></span></div><div class=oasis-editor-comment-popup-body>`);
|
|
26741
26875
|
function CommentHighlightOverlay(props) {
|
|
26742
26876
|
const [activeCommentId, setActiveCommentId] = createSignal(null);
|
|
26743
26877
|
const activeComment = createMemo(() => {
|
|
@@ -26764,13 +26898,13 @@ function CommentHighlightOverlay(props) {
|
|
|
26764
26898
|
}
|
|
26765
26899
|
};
|
|
26766
26900
|
return (() => {
|
|
26767
|
-
var _el$ = _tmpl$$
|
|
26901
|
+
var _el$ = _tmpl$$I();
|
|
26768
26902
|
insert(_el$, createComponent(For, {
|
|
26769
26903
|
get each() {
|
|
26770
26904
|
return props.boxes();
|
|
26771
26905
|
},
|
|
26772
26906
|
children: (box) => (() => {
|
|
26773
|
-
var _el$2 = _tmpl$2$
|
|
26907
|
+
var _el$2 = _tmpl$2$r();
|
|
26774
26908
|
_el$2.$$click = () => setActiveCommentId(box.commentId);
|
|
26775
26909
|
_el$2.addEventListener("mouseenter", () => setActiveCommentId(box.commentId));
|
|
26776
26910
|
createRenderEffect((_p$) => {
|
|
@@ -26802,7 +26936,7 @@ function CommentHighlightOverlay(props) {
|
|
|
26802
26936
|
const comment = activeComment();
|
|
26803
26937
|
const anchor = popupAnchor();
|
|
26804
26938
|
return (() => {
|
|
26805
|
-
var _el$3 = _tmpl$5$
|
|
26939
|
+
var _el$3 = _tmpl$5$8(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$8 = _el$4.nextSibling;
|
|
26806
26940
|
_el$3.addEventListener("mouseleave", () => setActiveCommentId(null));
|
|
26807
26941
|
insert(_el$5, () => comment.author || "—");
|
|
26808
26942
|
insert(_el$4, createComponent(Show, {
|
|
@@ -26810,7 +26944,7 @@ function CommentHighlightOverlay(props) {
|
|
|
26810
26944
|
return comment.date !== void 0;
|
|
26811
26945
|
},
|
|
26812
26946
|
get children() {
|
|
26813
|
-
var _el$6 = _tmpl$3$
|
|
26947
|
+
var _el$6 = _tmpl$3$j();
|
|
26814
26948
|
insert(_el$6, () => formattedDate(comment.date));
|
|
26815
26949
|
return _el$6;
|
|
26816
26950
|
}
|
|
@@ -26820,7 +26954,7 @@ function CommentHighlightOverlay(props) {
|
|
|
26820
26954
|
return comment.resolved;
|
|
26821
26955
|
},
|
|
26822
26956
|
get children() {
|
|
26823
|
-
return _tmpl$4$
|
|
26957
|
+
return _tmpl$4$c();
|
|
26824
26958
|
}
|
|
26825
26959
|
}), null);
|
|
26826
26960
|
insert(_el$8, () => comment.text);
|
|
@@ -26870,7 +27004,7 @@ function useSurfaceRect(surfaceRef) {
|
|
|
26870
27004
|
});
|
|
26871
27005
|
return { rect, tick, refresh };
|
|
26872
27006
|
}
|
|
26873
|
-
var _tmpl$$
|
|
27007
|
+
var _tmpl$$H = /* @__PURE__ */ template(`<svg><rect height=2 rx=1 fill=#9aa0a6></svg>`, false, true, false), _tmpl$2$q = /* @__PURE__ */ template(`<svg><rect rx=1.5></svg>`, false, true, false), _tmpl$3$i = /* @__PURE__ */ template(`<svg><polygon points="29,4 37,12 29,20 21,12"fill=#1a73e8></svg>`, false, true, false), _tmpl$4$b = /* @__PURE__ */ template(`<svg><polygon points="20,8 26,14 20,20 14,14"fill=#1a73e8></svg>`, false, true, false), _tmpl$5$7 = /* @__PURE__ */ template(`<svg viewBox="0 0 40 32"fill=none aria-hidden=true>`), _tmpl$6$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-anchor data-testid=editor-layout-options-anchor><svg viewBox="0 0 24 24"fill=none aria-hidden=true><rect x=3 y=4 width=10 height=10 rx=1.5 fill=#1a73e8></rect><rect x=3 y=17 width=18 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=5 width=6 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=9 width=6 height=2 rx=1 fill=#9aa0a6>`), _tmpl$7$3 = /* @__PURE__ */ template(`<div class=oasis-editor-layout-options-popup data-testid=editor-layout-options-popup><div class=oasis-editor-layout-options-popup-header><span class=oasis-editor-layout-options-title></span><button type=button class=oasis-editor-layout-options-close>×</button></div><div class=oasis-editor-layout-options-group-label></div><div class=oasis-editor-layout-options-grid><button type=button class=oasis-editor-layout-options-cell data-testid=editor-layout-options-inline><svg viewBox="0 0 40 32"fill=none aria-hidden=true><rect x=4 y=7 width=9 height=2 rx=1 fill=#9aa0a6></rect><rect x=15 y=4 width=11 height=11 rx=1.5 fill=#1a73e8></rect><rect x=28 y=7 width=8 height=2 rx=1 fill=#9aa0a6></rect><rect x=4 y=20 width=32 height=2 rx=1 fill=#9aa0a6></rect><rect x=4 y=26 width=32 height=2 rx=1 fill=#9aa0a6></rect></svg></button></div><div class=oasis-editor-layout-options-group-label></div><div class=oasis-editor-layout-options-grid></div><div class=oasis-editor-layout-options-radios><label class=oasis-editor-layout-options-radio><input type=radio name=oasis-layout-position></label><label class=oasis-editor-layout-options-radio><input type=radio name=oasis-layout-position>`), _tmpl$8$2 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-layout-options-cell>`);
|
|
26874
27008
|
const WRAP_OPTIONS = [{
|
|
26875
27009
|
preset: "square",
|
|
26876
27010
|
labelKey: "layoutOptions.square"
|
|
@@ -26892,14 +27026,14 @@ const WRAP_OPTIONS = [{
|
|
|
26892
27026
|
}];
|
|
26893
27027
|
function WrapIcon(props) {
|
|
26894
27028
|
const line = (x, y, w) => (() => {
|
|
26895
|
-
var _el$ = _tmpl$$
|
|
27029
|
+
var _el$ = _tmpl$$H();
|
|
26896
27030
|
setAttribute(_el$, "x", x);
|
|
26897
27031
|
setAttribute(_el$, "y", y);
|
|
26898
27032
|
setAttribute(_el$, "width", w);
|
|
26899
27033
|
return _el$;
|
|
26900
27034
|
})();
|
|
26901
27035
|
const box = (x, y, w, h, fill = "#1a73e8") => (() => {
|
|
26902
|
-
var _el$2 = _tmpl$2$
|
|
27036
|
+
var _el$2 = _tmpl$2$q();
|
|
26903
27037
|
setAttribute(_el$2, "x", x);
|
|
26904
27038
|
setAttribute(_el$2, "y", y);
|
|
26905
27039
|
setAttribute(_el$2, "width", w);
|
|
@@ -26908,7 +27042,7 @@ function WrapIcon(props) {
|
|
|
26908
27042
|
return _el$2;
|
|
26909
27043
|
})();
|
|
26910
27044
|
return (() => {
|
|
26911
|
-
var _el$3 = _tmpl$5$
|
|
27045
|
+
var _el$3 = _tmpl$5$7();
|
|
26912
27046
|
insert(_el$3, createComponent(Show, {
|
|
26913
27047
|
get when() {
|
|
26914
27048
|
return props.preset === "square";
|
|
@@ -26922,7 +27056,7 @@ function WrapIcon(props) {
|
|
|
26922
27056
|
return props.preset === "tight";
|
|
26923
27057
|
},
|
|
26924
27058
|
get children() {
|
|
26925
|
-
return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$
|
|
27059
|
+
return [memo(() => line(4, 6, 12)), memo(() => line(4, 12, 10)), memo(() => line(4, 18, 12)), memo(() => line(4, 24, 32)), _tmpl$3$i()];
|
|
26926
27060
|
}
|
|
26927
27061
|
}), null);
|
|
26928
27062
|
insert(_el$3, createComponent(Show, {
|
|
@@ -26930,7 +27064,7 @@ function WrapIcon(props) {
|
|
|
26930
27064
|
return props.preset === "through";
|
|
26931
27065
|
},
|
|
26932
27066
|
get children() {
|
|
26933
|
-
return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$
|
|
27067
|
+
return [memo(() => line(4, 6, 32)), memo(() => line(4, 12, 9)), memo(() => line(27, 12, 9)), memo(() => line(4, 18, 32)), _tmpl$4$b()];
|
|
26934
27068
|
}
|
|
26935
27069
|
}), null);
|
|
26936
27070
|
insert(_el$3, createComponent(Show, {
|
|
@@ -27000,7 +27134,7 @@ function FloatingLayoutOptions(props) {
|
|
|
27000
27134
|
},
|
|
27001
27135
|
get children() {
|
|
27002
27136
|
return [(() => {
|
|
27003
|
-
var _el$6 = _tmpl$6$
|
|
27137
|
+
var _el$6 = _tmpl$6$5();
|
|
27004
27138
|
_el$6.$$click = () => setOpen((value2) => !value2);
|
|
27005
27139
|
_el$6.$$mousedown = (event) => event.preventDefault();
|
|
27006
27140
|
createRenderEffect((_p$) => {
|
|
@@ -27022,7 +27156,7 @@ function FloatingLayoutOptions(props) {
|
|
|
27022
27156
|
return open();
|
|
27023
27157
|
},
|
|
27024
27158
|
get children() {
|
|
27025
|
-
var _el$7 = _tmpl$7$
|
|
27159
|
+
var _el$7 = _tmpl$7$3(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$10.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling, _el$18 = _el$17.firstChild;
|
|
27026
27160
|
_el$7.$$mousedown = (event) => event.preventDefault();
|
|
27027
27161
|
insert(_el$9, () => t("layoutOptions.title"));
|
|
27028
27162
|
_el$0.$$click = () => setOpen(false);
|
|
@@ -27032,7 +27166,7 @@ function FloatingLayoutOptions(props) {
|
|
|
27032
27166
|
insert(_el$13, createComponent(For, {
|
|
27033
27167
|
each: WRAP_OPTIONS,
|
|
27034
27168
|
children: (option) => (() => {
|
|
27035
|
-
var _el$19 = _tmpl$8$
|
|
27169
|
+
var _el$19 = _tmpl$8$2();
|
|
27036
27170
|
_el$19.$$click = () => select(option.preset);
|
|
27037
27171
|
insert(_el$19, createComponent(WrapIcon, {
|
|
27038
27172
|
get preset() {
|
|
@@ -35940,6 +36074,98 @@ function registerImageAsset(registry2, zipPath, url) {
|
|
|
35940
36074
|
registry2.byPath.set(zipPath, id);
|
|
35941
36075
|
return `${EDITOR_ASSET_REF_PREFIX}${id}`;
|
|
35942
36076
|
}
|
|
36077
|
+
const EXTENSION_TO_MIME = {
|
|
36078
|
+
png: "image/png",
|
|
36079
|
+
jpg: "image/jpeg",
|
|
36080
|
+
jpeg: "image/jpeg",
|
|
36081
|
+
gif: "image/gif",
|
|
36082
|
+
bmp: "image/bmp",
|
|
36083
|
+
tif: "image/tiff",
|
|
36084
|
+
tiff: "image/tiff",
|
|
36085
|
+
svg: "image/svg+xml",
|
|
36086
|
+
emf: "image/x-emf",
|
|
36087
|
+
wmf: "image/x-wmf"
|
|
36088
|
+
};
|
|
36089
|
+
const MIME_TO_EXTENSION = {
|
|
36090
|
+
"image/png": "png",
|
|
36091
|
+
"image/jpeg": "jpg",
|
|
36092
|
+
"image/gif": "gif",
|
|
36093
|
+
"image/bmp": "bmp",
|
|
36094
|
+
"image/tiff": "tif",
|
|
36095
|
+
"image/svg+xml": "svg",
|
|
36096
|
+
"image/x-emf": "emf",
|
|
36097
|
+
"image/x-wmf": "wmf"
|
|
36098
|
+
};
|
|
36099
|
+
function imageMimeFromPath(path) {
|
|
36100
|
+
var _a2;
|
|
36101
|
+
const ext = (_a2 = path.split(".").pop()) == null ? void 0 : _a2.toLowerCase();
|
|
36102
|
+
if (!ext) {
|
|
36103
|
+
return null;
|
|
36104
|
+
}
|
|
36105
|
+
return EXTENSION_TO_MIME[ext] ?? null;
|
|
36106
|
+
}
|
|
36107
|
+
function imageExtensionFromMime(mime) {
|
|
36108
|
+
return MIME_TO_EXTENSION[mime.toLowerCase()] ?? null;
|
|
36109
|
+
}
|
|
36110
|
+
function imageContentTypeDefaults(extensions) {
|
|
36111
|
+
const seen = /* @__PURE__ */ new Set();
|
|
36112
|
+
let xml = "";
|
|
36113
|
+
for (const ext of extensions) {
|
|
36114
|
+
const lower = ext.toLowerCase();
|
|
36115
|
+
if (seen.has(lower)) {
|
|
36116
|
+
continue;
|
|
36117
|
+
}
|
|
36118
|
+
const mime = EXTENSION_TO_MIME[lower];
|
|
36119
|
+
if (!mime) {
|
|
36120
|
+
continue;
|
|
36121
|
+
}
|
|
36122
|
+
seen.add(lower);
|
|
36123
|
+
xml += `<Default Extension="${lower}" ContentType="${mime}"/>`;
|
|
36124
|
+
}
|
|
36125
|
+
return xml;
|
|
36126
|
+
}
|
|
36127
|
+
function isAbsoluteUri(target) {
|
|
36128
|
+
return /^[a-z][a-z0-9+.-]*:\/\//i.test(target) || target.startsWith("//");
|
|
36129
|
+
}
|
|
36130
|
+
function parseRelationshipId(element) {
|
|
36131
|
+
for (let i = 0; i < element.attributes.length; i += 1) {
|
|
36132
|
+
const attr2 = element.attributes[i];
|
|
36133
|
+
if (!attr2) {
|
|
36134
|
+
continue;
|
|
36135
|
+
}
|
|
36136
|
+
if (attr2.localName === "id" || attr2.name === "r:id") {
|
|
36137
|
+
return attr2.value;
|
|
36138
|
+
}
|
|
36139
|
+
}
|
|
36140
|
+
return void 0;
|
|
36141
|
+
}
|
|
36142
|
+
function parseBlipRels(blip) {
|
|
36143
|
+
const result = {};
|
|
36144
|
+
for (let i = 0; i < blip.attributes.length; i += 1) {
|
|
36145
|
+
const attr2 = blip.attributes[i];
|
|
36146
|
+
if (!attr2) {
|
|
36147
|
+
continue;
|
|
36148
|
+
}
|
|
36149
|
+
if (attr2.localName === "embed" || attr2.name === "r:embed") {
|
|
36150
|
+
result.embed = attr2.value;
|
|
36151
|
+
} else if (attr2.localName === "link" || attr2.name === "r:link") {
|
|
36152
|
+
result.link = attr2.value;
|
|
36153
|
+
}
|
|
36154
|
+
}
|
|
36155
|
+
return result;
|
|
36156
|
+
}
|
|
36157
|
+
async function loadEmbeddedImage(zip, assets, target) {
|
|
36158
|
+
let zipPath = target;
|
|
36159
|
+
if (zipPath.startsWith("/")) zipPath = zipPath.slice(1);
|
|
36160
|
+
if (!zipPath.startsWith("word/")) zipPath = "word/" + target;
|
|
36161
|
+
const file = zip.file(zipPath);
|
|
36162
|
+
const mime = imageMimeFromPath(target) ?? "image/png";
|
|
36163
|
+
const base64 = await (file == null ? void 0 : file.async("base64"));
|
|
36164
|
+
if (!base64) {
|
|
36165
|
+
return void 0;
|
|
36166
|
+
}
|
|
36167
|
+
return registerImageAsset(assets, zipPath, `data:${mime};base64,${base64}`);
|
|
36168
|
+
}
|
|
35943
36169
|
function parseRelationshipsXml(xml) {
|
|
35944
36170
|
var _a2;
|
|
35945
36171
|
const relsMap = /* @__PURE__ */ new Map();
|
|
@@ -36187,9 +36413,26 @@ function parseDocxTheme(themeXml) {
|
|
|
36187
36413
|
const document2 = new DOMParser$1().parseFromString(themeXml, "application/xml");
|
|
36188
36414
|
const root = document2.documentElement;
|
|
36189
36415
|
const themeElements = root ? getChildrenByTagNameNS(root, DRAWINGML_NS, "themeElements")[0] ?? null : null;
|
|
36416
|
+
const fonts = extractThemeFonts(themeElements);
|
|
36417
|
+
const colors = extractThemeColors(themeElements);
|
|
36418
|
+
const fmtScheme = themeElements ? getChildrenByTagNameNS(themeElements, DRAWINGML_NS, "fmtScheme")[0] : void 0;
|
|
36190
36419
|
return {
|
|
36191
|
-
fonts
|
|
36192
|
-
colors
|
|
36420
|
+
fonts,
|
|
36421
|
+
colors,
|
|
36422
|
+
data: {
|
|
36423
|
+
name: (root == null ? void 0 : root.getAttribute("name")) || void 0,
|
|
36424
|
+
colors: { ...colors },
|
|
36425
|
+
fonts: {
|
|
36426
|
+
major: Object.fromEntries(
|
|
36427
|
+
Object.entries(fonts).filter(([key]) => key.startsWith("major"))
|
|
36428
|
+
),
|
|
36429
|
+
minor: Object.fromEntries(
|
|
36430
|
+
Object.entries(fonts).filter(([key]) => key.startsWith("minor"))
|
|
36431
|
+
)
|
|
36432
|
+
},
|
|
36433
|
+
effectsXml: fmtScheme ? Array.from(fmtScheme.childNodes).map((child2) => new XMLSerializer().serializeToString(child2)).join("") : void 0,
|
|
36434
|
+
sourceXml: themeXml
|
|
36435
|
+
}
|
|
36193
36436
|
};
|
|
36194
36437
|
}
|
|
36195
36438
|
const NOTE_NUMBER_FORMATS$1 = {
|
|
@@ -38299,6 +38542,20 @@ function parseSectionProperties(sectPr) {
|
|
|
38299
38542
|
const pageSize = getFirstChildByTagNameNS(sectPr, WORD_NS$3, "pgSz");
|
|
38300
38543
|
const pageMargins = getFirstChildByTagNameNS(sectPr, WORD_NS$3, "pgMar");
|
|
38301
38544
|
const columns = parseColumns(sectPr);
|
|
38545
|
+
const pageBorders = getFirstChildByTagNameNS(sectPr, WORD_NS$3, "pgBorders");
|
|
38546
|
+
const borderNode = getFirstChildByTagNameNS(pageBorders, WORD_NS$3, "top");
|
|
38547
|
+
const borderStyle = getAttributeValue(borderNode, "val");
|
|
38548
|
+
const borderColor = getAttributeValue(borderNode, "color");
|
|
38549
|
+
const borderSize = Number.parseInt(
|
|
38550
|
+
getAttributeValue(borderNode, "sz") ?? "0",
|
|
38551
|
+
10
|
|
38552
|
+
);
|
|
38553
|
+
const pageBorder = borderStyle && borderColor && borderStyle !== "nil" ? {
|
|
38554
|
+
style: borderStyle === "double" || borderStyle === "dashed" || borderStyle === "dotted" ? borderStyle : "single",
|
|
38555
|
+
color: `#${borderColor.replace(/^#/, "")}`,
|
|
38556
|
+
width: Number.isFinite(borderSize) && borderSize > 0 ? borderSize / 8 : 1,
|
|
38557
|
+
distance: Number(getAttributeValue(borderNode, "space") ?? 0)
|
|
38558
|
+
} : void 0;
|
|
38302
38559
|
let pageSettings;
|
|
38303
38560
|
if (pageSize || pageMargins || columns) {
|
|
38304
38561
|
const width = twipsToPx(getAttributeValue(pageSize, "w"), 816);
|
|
@@ -38368,6 +38625,7 @@ function parseSectionProperties(sectPr) {
|
|
|
38368
38625
|
const bidi = parseOnOffProperty(sectPr, "bidi");
|
|
38369
38626
|
return {
|
|
38370
38627
|
pageSettings,
|
|
38628
|
+
...pageBorder ? { pageBorder } : {},
|
|
38371
38629
|
headerRIds,
|
|
38372
38630
|
footerRIds,
|
|
38373
38631
|
docGridLinePitchPx: Number.isFinite(docGridLinePitchPx) && docGridLinePitchPx > 0 ? docGridLinePitchPx : void 0,
|
|
@@ -38671,98 +38929,6 @@ function normalizeHexColor(value2) {
|
|
|
38671
38929
|
const body = normalizeHex6(value2);
|
|
38672
38930
|
return body ? `#${body}` : void 0;
|
|
38673
38931
|
}
|
|
38674
|
-
const EXTENSION_TO_MIME = {
|
|
38675
|
-
png: "image/png",
|
|
38676
|
-
jpg: "image/jpeg",
|
|
38677
|
-
jpeg: "image/jpeg",
|
|
38678
|
-
gif: "image/gif",
|
|
38679
|
-
bmp: "image/bmp",
|
|
38680
|
-
tif: "image/tiff",
|
|
38681
|
-
tiff: "image/tiff",
|
|
38682
|
-
svg: "image/svg+xml",
|
|
38683
|
-
emf: "image/x-emf",
|
|
38684
|
-
wmf: "image/x-wmf"
|
|
38685
|
-
};
|
|
38686
|
-
const MIME_TO_EXTENSION = {
|
|
38687
|
-
"image/png": "png",
|
|
38688
|
-
"image/jpeg": "jpg",
|
|
38689
|
-
"image/gif": "gif",
|
|
38690
|
-
"image/bmp": "bmp",
|
|
38691
|
-
"image/tiff": "tif",
|
|
38692
|
-
"image/svg+xml": "svg",
|
|
38693
|
-
"image/x-emf": "emf",
|
|
38694
|
-
"image/x-wmf": "wmf"
|
|
38695
|
-
};
|
|
38696
|
-
function imageMimeFromPath(path) {
|
|
38697
|
-
var _a2;
|
|
38698
|
-
const ext = (_a2 = path.split(".").pop()) == null ? void 0 : _a2.toLowerCase();
|
|
38699
|
-
if (!ext) {
|
|
38700
|
-
return null;
|
|
38701
|
-
}
|
|
38702
|
-
return EXTENSION_TO_MIME[ext] ?? null;
|
|
38703
|
-
}
|
|
38704
|
-
function imageExtensionFromMime(mime) {
|
|
38705
|
-
return MIME_TO_EXTENSION[mime.toLowerCase()] ?? null;
|
|
38706
|
-
}
|
|
38707
|
-
function imageContentTypeDefaults(extensions) {
|
|
38708
|
-
const seen = /* @__PURE__ */ new Set();
|
|
38709
|
-
let xml = "";
|
|
38710
|
-
for (const ext of extensions) {
|
|
38711
|
-
const lower = ext.toLowerCase();
|
|
38712
|
-
if (seen.has(lower)) {
|
|
38713
|
-
continue;
|
|
38714
|
-
}
|
|
38715
|
-
const mime = EXTENSION_TO_MIME[lower];
|
|
38716
|
-
if (!mime) {
|
|
38717
|
-
continue;
|
|
38718
|
-
}
|
|
38719
|
-
seen.add(lower);
|
|
38720
|
-
xml += `<Default Extension="${lower}" ContentType="${mime}"/>`;
|
|
38721
|
-
}
|
|
38722
|
-
return xml;
|
|
38723
|
-
}
|
|
38724
|
-
function isAbsoluteUri(target) {
|
|
38725
|
-
return /^[a-z][a-z0-9+.-]*:\/\//i.test(target) || target.startsWith("//");
|
|
38726
|
-
}
|
|
38727
|
-
function parseRelationshipId(element) {
|
|
38728
|
-
for (let i = 0; i < element.attributes.length; i += 1) {
|
|
38729
|
-
const attr2 = element.attributes[i];
|
|
38730
|
-
if (!attr2) {
|
|
38731
|
-
continue;
|
|
38732
|
-
}
|
|
38733
|
-
if (attr2.localName === "id" || attr2.name === "r:id") {
|
|
38734
|
-
return attr2.value;
|
|
38735
|
-
}
|
|
38736
|
-
}
|
|
38737
|
-
return void 0;
|
|
38738
|
-
}
|
|
38739
|
-
function parseBlipRels(blip) {
|
|
38740
|
-
const result = {};
|
|
38741
|
-
for (let i = 0; i < blip.attributes.length; i += 1) {
|
|
38742
|
-
const attr2 = blip.attributes[i];
|
|
38743
|
-
if (!attr2) {
|
|
38744
|
-
continue;
|
|
38745
|
-
}
|
|
38746
|
-
if (attr2.localName === "embed" || attr2.name === "r:embed") {
|
|
38747
|
-
result.embed = attr2.value;
|
|
38748
|
-
} else if (attr2.localName === "link" || attr2.name === "r:link") {
|
|
38749
|
-
result.link = attr2.value;
|
|
38750
|
-
}
|
|
38751
|
-
}
|
|
38752
|
-
return result;
|
|
38753
|
-
}
|
|
38754
|
-
async function loadEmbeddedImage(zip, assets, target) {
|
|
38755
|
-
let zipPath = target;
|
|
38756
|
-
if (zipPath.startsWith("/")) zipPath = zipPath.slice(1);
|
|
38757
|
-
if (!zipPath.startsWith("word/")) zipPath = "word/" + target;
|
|
38758
|
-
const file = zip.file(zipPath);
|
|
38759
|
-
const mime = imageMimeFromPath(target) ?? "image/png";
|
|
38760
|
-
const base64 = await (file == null ? void 0 : file.async("base64"));
|
|
38761
|
-
if (!base64) {
|
|
38762
|
-
return void 0;
|
|
38763
|
-
}
|
|
38764
|
-
return registerImageAsset(assets, zipPath, `data:${mime};base64,${base64}`);
|
|
38765
|
-
}
|
|
38766
38932
|
function findDrawingContainer(drawing) {
|
|
38767
38933
|
for (let index = 0; index < drawing.childNodes.length; index += 1) {
|
|
38768
38934
|
const node = drawing.childNodes[index];
|
|
@@ -41329,6 +41495,7 @@ async function importDocxToEditorDocument(buffer, options = {}) {
|
|
|
41329
41495
|
await ((_g = zip.file("word/fontTable.xml")) == null ? void 0 : _g.async("string")) ?? null
|
|
41330
41496
|
);
|
|
41331
41497
|
const themeXml = await ((_h = zip.file("word/theme/theme1.xml")) == null ? void 0 : _h.async("string")) ?? null;
|
|
41498
|
+
const importedThemePresent = themeXml !== null;
|
|
41332
41499
|
const theme = parseDocxTheme(themeXml);
|
|
41333
41500
|
const importedStyles = parseImportedStyles(stylesXml, theme);
|
|
41334
41501
|
(_i = options.onProgress) == null ? void 0 : _i.call(options, "parsing-document");
|
|
@@ -41336,6 +41503,12 @@ async function importDocxToEditorDocument(buffer, options = {}) {
|
|
|
41336
41503
|
documentXml,
|
|
41337
41504
|
"application/xml"
|
|
41338
41505
|
);
|
|
41506
|
+
const background = document2.documentElement ? getFirstChildByTagNameNS(
|
|
41507
|
+
document2.documentElement,
|
|
41508
|
+
WORD_NS$3,
|
|
41509
|
+
"background"
|
|
41510
|
+
) : null;
|
|
41511
|
+
const importedPageColor = (background == null ? void 0 : background.getAttribute("w:color")) ?? (background == null ? void 0 : background.getAttributeNS(WORD_NS$3, "color")) ?? null;
|
|
41339
41512
|
const body = document2.getElementsByTagNameNS(WORD_NS$3, "body")[0];
|
|
41340
41513
|
if (!body) {
|
|
41341
41514
|
return createEditorDocument([
|
|
@@ -41343,6 +41516,7 @@ async function importDocxToEditorDocument(buffer, options = {}) {
|
|
|
41343
41516
|
]);
|
|
41344
41517
|
}
|
|
41345
41518
|
const assets = createAssetRegistry();
|
|
41519
|
+
let importedWatermark = null;
|
|
41346
41520
|
const sectionProps = [];
|
|
41347
41521
|
const sectionBlocks = [[]];
|
|
41348
41522
|
let pendingPageBreakBefore = false;
|
|
@@ -41503,7 +41677,7 @@ async function importDocxToEditorDocument(buffer, options = {}) {
|
|
|
41503
41677
|
docSettings
|
|
41504
41678
|
);
|
|
41505
41679
|
const loadHeaderFooterBlocks = async (rId) => {
|
|
41506
|
-
var _a3;
|
|
41680
|
+
var _a3, _b3;
|
|
41507
41681
|
if (!rId) {
|
|
41508
41682
|
return [];
|
|
41509
41683
|
}
|
|
@@ -41515,6 +41689,47 @@ async function importDocxToEditorDocument(buffer, options = {}) {
|
|
|
41515
41689
|
if (!zipPath.startsWith("word/")) zipPath = `word/${target}`;
|
|
41516
41690
|
const xml = await ((_a3 = zip.file(zipPath)) == null ? void 0 : _a3.async("string"));
|
|
41517
41691
|
const partRelsMap = await loadPartRelationships(zip, zipPath);
|
|
41692
|
+
if (!importedWatermark && xml) {
|
|
41693
|
+
const textMatch = xml.match(/<v:textpath[^>]*string="([^"]+)"/i);
|
|
41694
|
+
const shapeMatch = xml.match(/<v:shape\b([^>]*)>/i);
|
|
41695
|
+
const shapeAttrs = (shapeMatch == null ? void 0 : shapeMatch[1]) ?? "";
|
|
41696
|
+
const readAttr = (name) => {
|
|
41697
|
+
var _a4;
|
|
41698
|
+
return (_a4 = shapeAttrs.match(new RegExp(`${name}="([^"]+)"`, "i"))) == null ? void 0 : _a4[1];
|
|
41699
|
+
};
|
|
41700
|
+
const decodeXmlText = (value2) => value2.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
41701
|
+
if (textMatch == null ? void 0 : textMatch[1]) {
|
|
41702
|
+
importedWatermark = {
|
|
41703
|
+
kind: "text",
|
|
41704
|
+
text: decodeXmlText(textMatch[1]),
|
|
41705
|
+
color: readAttr("fillcolor"),
|
|
41706
|
+
opacity: Number(readAttr("fillopacity")) || void 0,
|
|
41707
|
+
rotation: Number(readAttr("rotation")) || void 0
|
|
41708
|
+
};
|
|
41709
|
+
} else {
|
|
41710
|
+
const imageRel = (_b3 = xml.match(
|
|
41711
|
+
/<v:imagedata[^>]*(?:r:id|id)="([^"]+)"/i
|
|
41712
|
+
)) == null ? void 0 : _b3[1];
|
|
41713
|
+
const imageTarget = imageRel ? partRelsMap.get(imageRel) : void 0;
|
|
41714
|
+
if (imageTarget) {
|
|
41715
|
+
const resolvedImageTarget = imageTarget.startsWith("../") ? `word/${imageTarget.slice(3)}` : imageTarget;
|
|
41716
|
+
const src = await loadEmbeddedImage(
|
|
41717
|
+
zip,
|
|
41718
|
+
assets,
|
|
41719
|
+
resolvedImageTarget
|
|
41720
|
+
);
|
|
41721
|
+
if (src) {
|
|
41722
|
+
importedWatermark = {
|
|
41723
|
+
kind: "image",
|
|
41724
|
+
src,
|
|
41725
|
+
color: readAttr("fillcolor"),
|
|
41726
|
+
opacity: Number(readAttr("fillopacity")) || void 0,
|
|
41727
|
+
rotation: Number(readAttr("rotation")) || void 0
|
|
41728
|
+
};
|
|
41729
|
+
}
|
|
41730
|
+
}
|
|
41731
|
+
}
|
|
41732
|
+
}
|
|
41518
41733
|
const partBlocks = await parseHeaderFooterXml(
|
|
41519
41734
|
xml ?? null,
|
|
41520
41735
|
numberingMaps,
|
|
@@ -41569,6 +41784,7 @@ async function importDocxToEditorDocument(buffer, options = {}) {
|
|
|
41569
41784
|
id: `section:${i + 1}`,
|
|
41570
41785
|
blocks: blocks.length > 0 ? blocks : [createEditorParagraphFromRuns([{ text: "" }])],
|
|
41571
41786
|
pageSettings,
|
|
41787
|
+
...props.pageBorder ? { pageBorder: props.pageBorder } : {},
|
|
41572
41788
|
header: header.length > 0 ? header : void 0,
|
|
41573
41789
|
firstPageHeader: firstPageHeader.length > 0 ? firstPageHeader : void 0,
|
|
41574
41790
|
evenPageHeader: evenPageHeader.length > 0 ? evenPageHeader : void 0,
|
|
@@ -41620,11 +41836,30 @@ async function importDocxToEditorDocument(buffer, options = {}) {
|
|
|
41620
41836
|
const shouldPreserveSections = sections.length > 1 || sections.some(
|
|
41621
41837
|
(section) => {
|
|
41622
41838
|
var _a3, _b3, _c2, _d2, _e2, _f2;
|
|
41623
|
-
return (((_a3 = section.header) == null ? void 0 : _a3.length) ?? 0) > 0 || (((_b3 = section.firstPageHeader) == null ? void 0 : _b3.length) ?? 0) > 0 || (((_c2 = section.evenPageHeader) == null ? void 0 : _c2.length) ?? 0) > 0 || (((_d2 = section.footer) == null ? void 0 : _d2.length) ?? 0) > 0 || (((_e2 = section.firstPageFooter) == null ? void 0 : _e2.length) ?? 0) > 0 || (((_f2 = section.evenPageFooter) == null ? void 0 : _f2.length) ?? 0) > 0 || section.breakType !== void 0 || section.pageNumbering !== void 0 || section.verticalAlignment !== void 0 || section.bidi !== void 0;
|
|
41839
|
+
return (((_a3 = section.header) == null ? void 0 : _a3.length) ?? 0) > 0 || (((_b3 = section.firstPageHeader) == null ? void 0 : _b3.length) ?? 0) > 0 || (((_c2 = section.evenPageHeader) == null ? void 0 : _c2.length) ?? 0) > 0 || (((_d2 = section.footer) == null ? void 0 : _d2.length) ?? 0) > 0 || (((_e2 = section.firstPageFooter) == null ? void 0 : _e2.length) ?? 0) > 0 || (((_f2 = section.evenPageFooter) == null ? void 0 : _f2.length) ?? 0) > 0 || section.breakType !== void 0 || section.pageNumbering !== void 0 || section.verticalAlignment !== void 0 || section.bidi !== void 0 || section.pageBorder !== void 0;
|
|
41624
41840
|
}
|
|
41625
41841
|
);
|
|
41626
41842
|
const hasAssets = Object.keys(assets.assets).length > 0;
|
|
41627
41843
|
const finalize = (doc2) => {
|
|
41844
|
+
var _a3, _b3;
|
|
41845
|
+
if (importedThemePresent) {
|
|
41846
|
+
const themeName = ((_b3 = (_a3 = theme.data) == null ? void 0 : _a3.name) == null ? void 0 : _b3.toLowerCase()) ?? "";
|
|
41847
|
+
const knownTheme = ["oasis", "office", "facet", "integral", "ion", "retrospect"].find((id) => themeName.includes(id));
|
|
41848
|
+
doc2.design = {
|
|
41849
|
+
...doc2.design ?? {},
|
|
41850
|
+
...knownTheme ? { themeId: knownTheme } : {},
|
|
41851
|
+
...theme.data ? { themeData: theme.data } : {}
|
|
41852
|
+
};
|
|
41853
|
+
}
|
|
41854
|
+
if (importedPageColor) {
|
|
41855
|
+
doc2.design = {
|
|
41856
|
+
...doc2.design ?? {},
|
|
41857
|
+
pageColor: `#${importedPageColor.replace(/^#/, "")}`
|
|
41858
|
+
};
|
|
41859
|
+
}
|
|
41860
|
+
if (importedWatermark) {
|
|
41861
|
+
doc2.design = { ...doc2.design ?? {}, watermark: importedWatermark };
|
|
41862
|
+
}
|
|
41628
41863
|
const settingsPatch = {};
|
|
41629
41864
|
if (docSettings.defaultTabStop !== void 0)
|
|
41630
41865
|
settingsPatch.defaultTabStop = docSettings.defaultTabStop;
|
|
@@ -45612,19 +45847,19 @@ function buildStylesXml(styles) {
|
|
|
45612
45847
|
const styleElements = Object.values(styles).map(serializeNamedStyle).join("");
|
|
45613
45848
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="${WORD_NS}" xmlns:w14="${WORD14_NS}">${styleElements}</w:styles>`;
|
|
45614
45849
|
}
|
|
45615
|
-
function buildContentTypesXml(hasNumbering, imageExtensions, hasSettings, parts, hasFootnotes, hasEndnotes, hasStyles, hasComments, hasFontTable) {
|
|
45850
|
+
function buildContentTypesXml(hasNumbering, imageExtensions, hasSettings, parts, hasFootnotes, hasEndnotes, hasStyles, hasComments, hasFontTable, hasTheme = false) {
|
|
45616
45851
|
const overrides = parts.map((part) => {
|
|
45617
45852
|
const contentType = part.kind === "header" ? "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml" : "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml";
|
|
45618
45853
|
return `<Override PartName="/word/${part.path}" ContentType="${contentType}"/>`;
|
|
45619
45854
|
}).join("");
|
|
45620
45855
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>${imageContentTypeDefaults(
|
|
45621
45856
|
imageExtensions
|
|
45622
|
-
)}<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>${hasStyles ? '<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>' : ""}${hasNumbering ? '<Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>' : ""}${hasSettings ? '<Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>' : ""}${hasFootnotes ? '<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>' : ""}${hasEndnotes ? '<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>' : ""}${hasComments ? '<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/><Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml"/>' : ""}${hasFontTable ? '<Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/>' : ""}${overrides}</Types>`;
|
|
45857
|
+
)}<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>${hasStyles ? '<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>' : ""}${hasNumbering ? '<Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>' : ""}${hasSettings ? '<Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>' : ""}${hasFootnotes ? '<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>' : ""}${hasEndnotes ? '<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>' : ""}${hasComments ? '<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/><Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml"/>' : ""}${hasFontTable ? '<Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/>' : ""}${hasTheme ? '<Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/>' : ""}${overrides}</Types>`;
|
|
45623
45858
|
}
|
|
45624
45859
|
function buildRootRelationshipsXml() {
|
|
45625
45860
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${PACKAGE_REL_NS}"><Relationship Id="rId1" Type="${OFFICE_REL_NS}/officeDocument" Target="word/document.xml"/></Relationships>`;
|
|
45626
45861
|
}
|
|
45627
|
-
function buildDocumentRelationshipsXml(hasNumbering, hasSettings, images, hyperlinks, parts, hasFootnotes, hasEndnotes, hasStyles, hasComments, hasFontTable) {
|
|
45862
|
+
function buildDocumentRelationshipsXml(hasNumbering, hasSettings, images, hyperlinks, parts, hasFootnotes, hasEndnotes, hasStyles, hasComments, hasFontTable, hasTheme = false) {
|
|
45628
45863
|
let rels = "";
|
|
45629
45864
|
if (hasStyles)
|
|
45630
45865
|
rels += `<Relationship Id="rIdStyles" Type="${OFFICE_REL_NS}/styles" Target="styles.xml"/>`;
|
|
@@ -45656,6 +45891,9 @@ function buildDocumentRelationshipsXml(hasNumbering, hasSettings, images, hyperl
|
|
|
45656
45891
|
if (hasFontTable) {
|
|
45657
45892
|
rels += `<Relationship Id="rIdFontTable" Type="${OFFICE_REL_NS}/fontTable" Target="fontTable.xml"/>`;
|
|
45658
45893
|
}
|
|
45894
|
+
if (hasTheme) {
|
|
45895
|
+
rels += `<Relationship Id="rIdTheme" Type="${OFFICE_REL_NS}/theme" Target="theme/theme1.xml"/>`;
|
|
45896
|
+
}
|
|
45659
45897
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${PACKAGE_REL_NS}">${rels}</Relationships>`;
|
|
45660
45898
|
}
|
|
45661
45899
|
function buildFontTableXml(fonts) {
|
|
@@ -46023,12 +46261,16 @@ function serializeSectionPropertiesWithReferences(pageSettings, references, sect
|
|
|
46023
46261
|
}
|
|
46024
46262
|
const vAlignXml = section.verticalAlignment && section.verticalAlignment !== "top" ? `<w:vAlign w:val="${section.verticalAlignment}"/>` : "";
|
|
46025
46263
|
const bidiXml = section.bidi ? "<w:bidi/>" : "";
|
|
46026
|
-
|
|
46264
|
+
const border = section.pageBorder;
|
|
46265
|
+
const borderColor = border == null ? void 0 : border.color.replace("#", "").toUpperCase();
|
|
46266
|
+
const borderXml = border ? `<w:pgBorders w:offsetFrom="page"><w:top w:val="${border.style}" w:sz="${Math.max(1, Math.round(border.width * 8))}" w:space="${Math.max(0, Math.round(border.distance ?? 0))}" w:color="${borderColor}"/><w:left w:val="${border.style}" w:sz="${Math.max(1, Math.round(border.width * 8))}" w:space="${Math.max(0, Math.round(border.distance ?? 0))}" w:color="${borderColor}"/><w:bottom w:val="${border.style}" w:sz="${Math.max(1, Math.round(border.width * 8))}" w:space="${Math.max(0, Math.round(border.distance ?? 0))}" w:color="${borderColor}"/><w:right w:val="${border.style}" w:sz="${Math.max(1, Math.round(border.width * 8))}" w:space="${Math.max(0, Math.round(border.distance ?? 0))}" w:color="${borderColor}"/></w:pgBorders>` : "";
|
|
46267
|
+
return `<w:sectPr>${referencesXml}${titlePageXml}${typeXml}<w:pgSz w:w="${width}" w:h="${height}"${orientationAttr}/><w:pgMar w:top="${pxToTwips(margins.top, 1440)}" w:right="${pxToTwips(margins.right, 1440)}" w:bottom="${pxToTwips(margins.bottom, 1440)}" w:left="${pxToTwips(margins.left, 1440)}" w:header="${pxToTwips(margins.header, 720)}" w:footer="${pxToTwips(margins.footer, 720)}" w:gutter="${pxToTwips(margins.gutter, 0)}"/>${pgNumTypeXml}${columnsXml}${vAlignXml}${bidiXml}${borderXml}</w:sectPr>`;
|
|
46027
46268
|
}
|
|
46028
46269
|
function buildDocumentXml(document2, context2, sectionReferences) {
|
|
46270
|
+
var _a2, _b2;
|
|
46029
46271
|
const sections = getDocumentSections(document2);
|
|
46030
46272
|
const sectionsXml = sections.map((section, sectionIndex) => {
|
|
46031
|
-
var
|
|
46273
|
+
var _a3;
|
|
46032
46274
|
const blocksXml = serializeBlocksXml(
|
|
46033
46275
|
section.blocks,
|
|
46034
46276
|
context2,
|
|
@@ -46038,15 +46280,18 @@ function buildDocumentXml(document2, context2, sectionReferences) {
|
|
|
46038
46280
|
section.pageSettings,
|
|
46039
46281
|
sectionReferences[sectionIndex],
|
|
46040
46282
|
section,
|
|
46041
|
-
(
|
|
46283
|
+
(_a3 = sections[sectionIndex + 1]) == null ? void 0 : _a3.breakType
|
|
46042
46284
|
);
|
|
46043
46285
|
return blocksXml + sectionPr;
|
|
46044
46286
|
}).join("");
|
|
46045
|
-
|
|
46287
|
+
const pageColor = (_b2 = (_a2 = document2.design) == null ? void 0 : _a2.pageColor) == null ? void 0 : _b2.replace("#", "").toUpperCase();
|
|
46288
|
+
const backgroundXml = pageColor ? `<w:background w:color="${pageColor}"/>` : "";
|
|
46289
|
+
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document ${DOCUMENT_XMLNS}>${backgroundXml}<w:body>${sectionsXml}</w:body></w:document>`;
|
|
46046
46290
|
}
|
|
46047
|
-
function buildHeaderFooterXml(kind, blocks, context2, styles) {
|
|
46291
|
+
function buildHeaderFooterXml(kind, blocks, context2, styles, watermark) {
|
|
46048
46292
|
const tag = kind === "header" ? "hdr" : "ftr";
|
|
46049
|
-
|
|
46293
|
+
const mark = kind === "header" && (watermark == null ? void 0 : watermark.kind) === "text" && watermark.text ? `<w:pict xmlns:v="urn:schemas-microsoft-com:vml"><v:shape type="#_x0000_t136" style="position:absolute;margin-left:0;margin-top:0;width:468pt;height:216pt;z-index:-251654144;rotation:${watermark.rotation ?? -45}" fillcolor="${watermark.color ?? "#94a3b8"}" fillopacity="${watermark.opacity ?? 0.25}"><v:textpath on="true" string="${escapeXml(watermark.text)}" style="font-family:${escapeXml(watermark.fontFamily ?? "Arial")};font-size:${watermark.fontSize ?? 48}pt"/></v:shape></w:pict>` : kind === "header" && (watermark == null ? void 0 : watermark.kind) === "image" && context2.images.some((image) => image.runId === "__watermark") ? `<w:pict xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><v:shape type="#_x0000_t75" style="position:absolute;margin-left:0;margin-top:0;width:468pt;height:216pt;z-index:-251654144;rotation:${watermark.rotation ?? -45}" fillcolor="${watermark.color ?? "#ffffff"}" fillopacity="${watermark.opacity ?? 0.25}" stroked="f"><v:imagedata r:id="rIdWatermark" o:title="Watermark"/></v:shape></w:pict>` : "";
|
|
46294
|
+
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${tag} ${DOCUMENT_XMLNS}>${mark}${serializeBlocksXml(blocks, context2, styles)}</w:${tag}>`;
|
|
46050
46295
|
}
|
|
46051
46296
|
function cloneStyle(style2) {
|
|
46052
46297
|
return style2 ? { ...style2 } : void 0;
|
|
@@ -46392,6 +46637,50 @@ function renumberImageCaptionsInDocument(document2) {
|
|
|
46392
46637
|
function getCaptionSelectionOffset(paragraph) {
|
|
46393
46638
|
return getParagraphLength(paragraph);
|
|
46394
46639
|
}
|
|
46640
|
+
const themes = {
|
|
46641
|
+
oasis: { accent: "0F766E", heading: "115E59", body: "1F2937" },
|
|
46642
|
+
office: { accent: "4472C4", heading: "2F5597", body: "1F2937" },
|
|
46643
|
+
facet: { accent: "8064A2", heading: "604A7B", body: "262626" },
|
|
46644
|
+
integral: { accent: "70AD47", heading: "548235", body: "1F2937" },
|
|
46645
|
+
ion: { accent: "ED7D31", heading: "C55A11", body: "262626" },
|
|
46646
|
+
retrospect: { accent: "5B9BD5", heading: "2F75B5", body: "1F2937" }
|
|
46647
|
+
};
|
|
46648
|
+
function buildThemeXml(design) {
|
|
46649
|
+
var _a2;
|
|
46650
|
+
const source = (_a2 = design == null ? void 0 : design.themeData) == null ? void 0 : _a2.sourceXml;
|
|
46651
|
+
if (source) return source;
|
|
46652
|
+
const preset = themes[(design == null ? void 0 : design.themeId) ?? "oasis"] ?? themes.oasis;
|
|
46653
|
+
const data = design == null ? void 0 : design.themeData;
|
|
46654
|
+
const color = (slot, fallback) => {
|
|
46655
|
+
var _a3;
|
|
46656
|
+
return (((_a3 = data == null ? void 0 : data.colors) == null ? void 0 : _a3[slot]) ?? fallback).replace(/^#/, "").toUpperCase();
|
|
46657
|
+
};
|
|
46658
|
+
const colors = {
|
|
46659
|
+
dk1: color("dk1", "000000"),
|
|
46660
|
+
lt1: color("lt1", "FFFFFF"),
|
|
46661
|
+
dk2: color("dk2", preset.body),
|
|
46662
|
+
lt2: color("lt2", "FFFFFF"),
|
|
46663
|
+
accent1: color("accent1", preset.accent),
|
|
46664
|
+
accent2: color("accent2", preset.heading),
|
|
46665
|
+
accent3: color("accent3", "5B9BD5"),
|
|
46666
|
+
accent4: color("accent4", "70AD47"),
|
|
46667
|
+
accent5: color("accent5", "ED7D31"),
|
|
46668
|
+
accent6: color("accent6", "A5A5A5"),
|
|
46669
|
+
hlink: color("hlink", "0563C1"),
|
|
46670
|
+
folHlink: color("folHlink", "954F72")
|
|
46671
|
+
};
|
|
46672
|
+
const colorXml = Object.entries(colors).map(
|
|
46673
|
+
([slot, value2]) => `<a:${slot}><a:srgbClr val="${value2}"/></a:${slot}>`
|
|
46674
|
+
).join("");
|
|
46675
|
+
const font = (group, key, fallback) => {
|
|
46676
|
+
var _a3, _b2;
|
|
46677
|
+
return escapeXml(((_b2 = (_a3 = data == null ? void 0 : data.fonts) == null ? void 0 : _a3[group]) == null ? void 0 : _b2[key]) ?? fallback);
|
|
46678
|
+
};
|
|
46679
|
+
const themeName = (data == null ? void 0 : data.name) ?? `${((design == null ? void 0 : design.themeId) ?? "oasis")[0].toUpperCase()}${((design == null ? void 0 : design.themeId) ?? "oasis").slice(1)}`;
|
|
46680
|
+
const name = escapeXml(themeName);
|
|
46681
|
+
const effects = (data == null ? void 0 : data.effectsXml) ?? "<a:fillStyleLst/><a:lnStyleLst/><a:effectStyleLst/><a:bgFillStyleLst/>";
|
|
46682
|
+
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="${name}"><a:themeElements><a:clrScheme name="${name}">${colorXml}</a:clrScheme><a:fontScheme name="${name}"><a:majorFont><a:latin typeface="${font("major", "majorHAnsi", "Aptos Display")}"/><a:ea typeface="${font("major", "majorEastAsia", "Aptos Display")}"/><a:cs typeface="${font("major", "majorBidi", "Aptos Display")}"/></a:majorFont><a:minorFont><a:latin typeface="${font("minor", "minorHAnsi", "Aptos")}"/><a:ea typeface="${font("minor", "minorEastAsia", "Aptos")}"/><a:cs typeface="${font("minor", "minorBidi", "Aptos")}"/></a:minorFont></a:fontScheme><a:fmtScheme name="${name}">${effects}</a:fmtScheme></a:themeElements></a:theme>`;
|
|
46683
|
+
}
|
|
46395
46684
|
function buildPartContext(blocks, numberingContext, state, document2) {
|
|
46396
46685
|
const images = [];
|
|
46397
46686
|
const imageMap = /* @__PURE__ */ new Map();
|
|
@@ -46474,6 +46763,25 @@ function buildPartContext(blocks, numberingContext, state, document2) {
|
|
|
46474
46763
|
hyperlinkMap
|
|
46475
46764
|
};
|
|
46476
46765
|
}
|
|
46766
|
+
function watermarkImageEntry(document2) {
|
|
46767
|
+
var _a2;
|
|
46768
|
+
const watermark = (_a2 = document2.design) == null ? void 0 : _a2.watermark;
|
|
46769
|
+
if ((watermark == null ? void 0 : watermark.kind) !== "image" || !watermark.src) return void 0;
|
|
46770
|
+
const resolved = resolveImageSrc(document2, watermark.src);
|
|
46771
|
+
const match = resolved.match(/^data:([^;,]+);base64,(.*)$/);
|
|
46772
|
+
if (!match) return void 0;
|
|
46773
|
+
const ext = imageExtensionFromMime(match[1]);
|
|
46774
|
+
if (!ext) return void 0;
|
|
46775
|
+
return {
|
|
46776
|
+
rId: "rIdWatermark",
|
|
46777
|
+
runId: "__watermark",
|
|
46778
|
+
kind: "embedded",
|
|
46779
|
+
target: `media/watermark.${ext}`,
|
|
46780
|
+
base64: match[2],
|
|
46781
|
+
cx: 1,
|
|
46782
|
+
cy: 1
|
|
46783
|
+
};
|
|
46784
|
+
}
|
|
46477
46785
|
function writeNotePart(zip, partName, part) {
|
|
46478
46786
|
if (!part) return;
|
|
46479
46787
|
zip.file(`word/${partName}.xml`, part.xml);
|
|
@@ -46488,7 +46796,7 @@ function writeNotePart(zip, partName, part) {
|
|
|
46488
46796
|
}
|
|
46489
46797
|
}
|
|
46490
46798
|
async function exportEditorDocumentToDocx(document2) {
|
|
46491
|
-
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
46799
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
46492
46800
|
document2 = renumberImageCaptionsInDocument(document2);
|
|
46493
46801
|
const zip = new JSZip();
|
|
46494
46802
|
const numberingContext = buildNumberingContext(document2);
|
|
@@ -46498,6 +46806,7 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
46498
46806
|
nextTextBoxDocPrId: 1000001
|
|
46499
46807
|
};
|
|
46500
46808
|
const sections = getDocumentSections(document2);
|
|
46809
|
+
const watermarkImage = watermarkImageEntry(document2);
|
|
46501
46810
|
const referencedFootnotes = collectReferencedFootnotesForExport(document2);
|
|
46502
46811
|
const footnoteIdMap = buildFootnoteIdMap(referencedFootnotes);
|
|
46503
46812
|
const hasFootnotes = referencedFootnotes.length > 0;
|
|
@@ -46530,27 +46839,31 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
46530
46839
|
let nextFooterIndex = 1;
|
|
46531
46840
|
sections.forEach((section, sectionIndex) => {
|
|
46532
46841
|
const addPart = (kind, type, blocks) => {
|
|
46533
|
-
var _a3;
|
|
46534
|
-
if (!blocks || blocks.length === 0) {
|
|
46842
|
+
var _a3, _b3, _c2;
|
|
46843
|
+
if ((!blocks || blocks.length === 0) && !(kind === "header" && ((_b3 = (_a3 = document2.design) == null ? void 0 : _a3.watermark) == null ? void 0 : _b3.kind) === "text") && !(kind === "header" && watermarkImage !== void 0)) {
|
|
46535
46844
|
return;
|
|
46536
46845
|
}
|
|
46846
|
+
const partBlocks = blocks ?? [];
|
|
46537
46847
|
const partIndex = kind === "header" ? nextHeaderIndex : nextFooterIndex;
|
|
46538
46848
|
const relPrefix = kind === "header" ? "Header" : "Footer";
|
|
46539
46849
|
const path = `${kind}${partIndex}.xml`;
|
|
46540
46850
|
const relId = `rId${relPrefix}${partIndex}`;
|
|
46541
46851
|
const context2 = annotateContext(
|
|
46542
|
-
buildPartContext(
|
|
46852
|
+
buildPartContext(partBlocks, numberingContext, buildState, document2)
|
|
46543
46853
|
);
|
|
46854
|
+
if (kind === "header" && watermarkImage) {
|
|
46855
|
+
context2.images.push({ ...watermarkImage });
|
|
46856
|
+
}
|
|
46544
46857
|
parts.push({
|
|
46545
46858
|
kind,
|
|
46546
46859
|
type,
|
|
46547
46860
|
path,
|
|
46548
46861
|
relId,
|
|
46549
|
-
blocks,
|
|
46862
|
+
blocks: partBlocks,
|
|
46550
46863
|
context: context2
|
|
46551
46864
|
});
|
|
46552
46865
|
const referenceKey = kind === "header" ? "header" : "footer";
|
|
46553
|
-
((
|
|
46866
|
+
((_c2 = sectionReferences[sectionIndex])[referenceKey] ?? (_c2[referenceKey] = {}))[type] = { relId };
|
|
46554
46867
|
if (kind === "header") {
|
|
46555
46868
|
nextHeaderIndex += 1;
|
|
46556
46869
|
} else {
|
|
@@ -46608,6 +46921,7 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
46608
46921
|
).filter((ext) => Boolean(ext));
|
|
46609
46922
|
const hasStyles = document2.styles != null && Object.keys(document2.styles).length > 0;
|
|
46610
46923
|
const hasFontTable = (((_i = document2.fontTable) == null ? void 0 : _i.length) ?? 0) > 0;
|
|
46924
|
+
const hasTheme = document2.design !== void 0;
|
|
46611
46925
|
zip.file(
|
|
46612
46926
|
"[Content_Types].xml",
|
|
46613
46927
|
buildContentTypesXml(
|
|
@@ -46619,7 +46933,8 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
46619
46933
|
hasEndnotes,
|
|
46620
46934
|
hasStyles,
|
|
46621
46935
|
hasComments,
|
|
46622
|
-
hasFontTable
|
|
46936
|
+
hasFontTable,
|
|
46937
|
+
hasTheme
|
|
46623
46938
|
)
|
|
46624
46939
|
);
|
|
46625
46940
|
zip.file("_rels/.rels", buildRootRelationshipsXml());
|
|
@@ -46636,7 +46951,7 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
46636
46951
|
buildNumberingXml(numberingContext.definitions)
|
|
46637
46952
|
);
|
|
46638
46953
|
}
|
|
46639
|
-
if (hasStyles || hasNumbering || hasDocumentSettings || bodyContext.images.length > 0 || bodyContext.hyperlinks.length > 0 || parts.length > 0 || hasFootnotes || hasEndnotes || hasComments || hasFontTable) {
|
|
46954
|
+
if (hasStyles || hasNumbering || hasDocumentSettings || bodyContext.images.length > 0 || bodyContext.hyperlinks.length > 0 || parts.length > 0 || hasFootnotes || hasEndnotes || hasComments || hasFontTable || hasTheme) {
|
|
46640
46955
|
zip.file(
|
|
46641
46956
|
"word/_rels/document.xml.rels",
|
|
46642
46957
|
buildDocumentRelationshipsXml(
|
|
@@ -46649,13 +46964,17 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
46649
46964
|
hasEndnotes,
|
|
46650
46965
|
hasStyles,
|
|
46651
46966
|
hasComments,
|
|
46652
|
-
hasFontTable
|
|
46967
|
+
hasFontTable,
|
|
46968
|
+
hasTheme
|
|
46653
46969
|
)
|
|
46654
46970
|
);
|
|
46655
46971
|
}
|
|
46656
46972
|
if (hasFontTable) {
|
|
46657
46973
|
zip.file("word/fontTable.xml", buildFontTableXml(document2.fontTable));
|
|
46658
46974
|
}
|
|
46975
|
+
if (hasTheme) {
|
|
46976
|
+
zip.file("word/theme/theme1.xml", buildThemeXml(document2.design));
|
|
46977
|
+
}
|
|
46659
46978
|
if (hasDocumentSettings) {
|
|
46660
46979
|
zip.file(
|
|
46661
46980
|
"word/settings.xml",
|
|
@@ -46681,7 +47000,8 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
46681
47000
|
part.kind,
|
|
46682
47001
|
part.blocks,
|
|
46683
47002
|
part.context,
|
|
46684
|
-
document2.styles
|
|
47003
|
+
document2.styles,
|
|
47004
|
+
(_r = document2.design) == null ? void 0 : _r.watermark
|
|
46685
47005
|
)
|
|
46686
47006
|
);
|
|
46687
47007
|
if (part.context.images.length > 0 || part.context.hyperlinks.length > 0) {
|
|
@@ -47017,7 +47337,7 @@ async function importDocxInWorker(buffer, options = {}) {
|
|
|
47017
47337
|
const worker = new Worker(
|
|
47018
47338
|
new URL(
|
|
47019
47339
|
/* @vite-ignore */
|
|
47020
|
-
"" + new URL("assets/importDocxWorker-
|
|
47340
|
+
"" + new URL("assets/importDocxWorker-DpJa1l2G.js", import.meta.url).href,
|
|
47021
47341
|
import.meta.url
|
|
47022
47342
|
),
|
|
47023
47343
|
{
|
|
@@ -47657,10 +47977,10 @@ function resolveResizedDimensions(geometry, deltaX, deltaY, preserveAspectRatio,
|
|
|
47657
47977
|
nextHeight = clamp(nextWidth / aspectRatio, MIN_RESIZE_SIZE_PX);
|
|
47658
47978
|
return { width: nextWidth, height: nextHeight };
|
|
47659
47979
|
}
|
|
47660
|
-
var _tmpl$$
|
|
47980
|
+
var _tmpl$$G = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-rotate-handle tabindex=-1 type=button>`), _tmpl$2$p = /* @__PURE__ */ template(`<div aria-hidden=true style=transform-origin:center>`), _tmpl$3$h = /* @__PURE__ */ template(`<button aria-hidden=true class=oasis-editor-resize-handle tabindex=-1 type=button>`);
|
|
47661
47981
|
function ResizeHandlesOverlay(props) {
|
|
47662
47982
|
return (() => {
|
|
47663
|
-
var _el$ = _tmpl$2$
|
|
47983
|
+
var _el$ = _tmpl$2$p();
|
|
47664
47984
|
_el$.$$mousedown = (event) => {
|
|
47665
47985
|
if (props.readOnly || !props.box() || !props.onBodyMouseDown) {
|
|
47666
47986
|
return;
|
|
@@ -47676,7 +47996,7 @@ function ResizeHandlesOverlay(props) {
|
|
|
47676
47996
|
return [createComponent(For, {
|
|
47677
47997
|
each: RESIZE_HANDLE_DIRECTIONS,
|
|
47678
47998
|
children: (direction) => (() => {
|
|
47679
|
-
var _el$3 = _tmpl$3$
|
|
47999
|
+
var _el$3 = _tmpl$3$h();
|
|
47680
48000
|
_el$3.$$mousedown = (event) => {
|
|
47681
48001
|
if (!props.box()) {
|
|
47682
48002
|
return;
|
|
@@ -47691,7 +48011,7 @@ function ResizeHandlesOverlay(props) {
|
|
|
47691
48011
|
return props.onRotateStart;
|
|
47692
48012
|
},
|
|
47693
48013
|
get children() {
|
|
47694
|
-
var _el$2 = _tmpl$$
|
|
48014
|
+
var _el$2 = _tmpl$$G();
|
|
47695
48015
|
_el$2.$$mousedown = (event) => {
|
|
47696
48016
|
var _a2;
|
|
47697
48017
|
if (!props.box()) {
|
|
@@ -47732,7 +48052,7 @@ function ResizeHandlesOverlay(props) {
|
|
|
47732
48052
|
})();
|
|
47733
48053
|
}
|
|
47734
48054
|
delegateEvents(["mousedown"]);
|
|
47735
|
-
var _tmpl$$
|
|
48055
|
+
var _tmpl$$F = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-image-crop-preview><img alt>`);
|
|
47736
48056
|
function fraction(value2) {
|
|
47737
48057
|
return Number.isFinite(value2) ? Math.max(0, Math.min(0.99, value2 ?? 0)) : 0;
|
|
47738
48058
|
}
|
|
@@ -47772,7 +48092,7 @@ function ImageCropPreviewOverlay(props) {
|
|
|
47772
48092
|
};
|
|
47773
48093
|
};
|
|
47774
48094
|
return (() => {
|
|
47775
|
-
var _el$ = _tmpl$$
|
|
48095
|
+
var _el$ = _tmpl$$F(), _el$2 = _el$.firstChild;
|
|
47776
48096
|
setAttribute(_el$2, "draggable", false);
|
|
47777
48097
|
createRenderEffect((_p$) => {
|
|
47778
48098
|
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
@@ -47805,14 +48125,14 @@ function ImageCropPreviewOverlay(props) {
|
|
|
47805
48125
|
return _el$;
|
|
47806
48126
|
})();
|
|
47807
48127
|
}
|
|
47808
|
-
var _tmpl$$
|
|
48128
|
+
var _tmpl$$E = /* @__PURE__ */ template(`<div aria-hidden=true class=oasis-editor-table-handles-overlay><button aria-hidden=true class=oasis-editor-table-move-handle tabindex=-1 type=button></button><button aria-hidden=true class=oasis-editor-table-resize-corner tabindex=-1 type=button>`);
|
|
47809
48129
|
function TableHandlesOverlay(props) {
|
|
47810
48130
|
return createComponent(Show, {
|
|
47811
48131
|
get when() {
|
|
47812
48132
|
return memo(() => !!!props.readOnly)() && props.box();
|
|
47813
48133
|
},
|
|
47814
48134
|
children: (box) => (() => {
|
|
47815
|
-
var _el$ = _tmpl$$
|
|
48135
|
+
var _el$ = _tmpl$$E(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
47816
48136
|
_el$2.$$mousedown = (event) => {
|
|
47817
48137
|
props.onMoveStart(event);
|
|
47818
48138
|
};
|
|
@@ -47852,7 +48172,7 @@ function createEditorZoom(initial = ZOOM_DEFAULT) {
|
|
|
47852
48172
|
const zoomFactor = createMemo(() => zoomPercent() / 100);
|
|
47853
48173
|
return { zoomPercent, setZoomPercent, adjustZoom, zoomFactor };
|
|
47854
48174
|
}
|
|
47855
|
-
var _tmpl$$
|
|
48175
|
+
var _tmpl$$D = /* @__PURE__ */ template(`<div class=oasis-editor-import-overlay data-testid=editor-import-overlay role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-phase data-testid=editor-import-phase></div><div class=oasis-editor-import-progress-track><div class=oasis-editor-import-progress-bar data-testid=editor-import-progress-bar></div></div><div class=oasis-editor-import-progress-label>`), _tmpl$2$o = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>`), _tmpl$3$g = /* @__PURE__ */ template(`<span class=oasis-editor-import-error-icon>`);
|
|
47856
48176
|
function EditorImportProgressOverlay(props) {
|
|
47857
48177
|
const t = useI18n();
|
|
47858
48178
|
return createComponent(Show, {
|
|
@@ -47864,7 +48184,7 @@ function EditorImportProgressOverlay(props) {
|
|
|
47864
48184
|
const isDone = progress().phase === "done";
|
|
47865
48185
|
const isError = progress().phase === "error";
|
|
47866
48186
|
return (() => {
|
|
47867
|
-
var _el$ = _tmpl$$
|
|
48187
|
+
var _el$ = _tmpl$$D(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling;
|
|
47868
48188
|
_el$.classList.toggle("oasis-editor-import-overlay-done", !!isDone);
|
|
47869
48189
|
_el$.classList.toggle("oasis-editor-import-overlay-error", !!isError);
|
|
47870
48190
|
setAttribute(_el$, "aria-busy", !isDone && !isError);
|
|
@@ -47877,11 +48197,11 @@ function EditorImportProgressOverlay(props) {
|
|
|
47877
48197
|
_el$6.classList.toggle("oasis-editor-import-progress-bar-done", !!isDone);
|
|
47878
48198
|
_el$6.classList.toggle("oasis-editor-import-progress-bar-error", !!isError);
|
|
47879
48199
|
insert(_el$7, isDone ? (() => {
|
|
47880
|
-
var _el$8 = _tmpl$2$
|
|
48200
|
+
var _el$8 = _tmpl$2$o();
|
|
47881
48201
|
insert(_el$8, () => t("import.phase.done"));
|
|
47882
48202
|
return _el$8;
|
|
47883
48203
|
})() : isError ? (() => {
|
|
47884
|
-
var _el$9 = _tmpl$3$
|
|
48204
|
+
var _el$9 = _tmpl$3$g();
|
|
47885
48205
|
insert(_el$9, () => t("import.phase.error"));
|
|
47886
48206
|
return _el$9;
|
|
47887
48207
|
})() : [memo(() => Math.round(progress().progress)), "%"]);
|
|
@@ -47899,11 +48219,11 @@ function EditorImportProgressOverlay(props) {
|
|
|
47899
48219
|
}
|
|
47900
48220
|
});
|
|
47901
48221
|
}
|
|
47902
|
-
var _tmpl$$
|
|
48222
|
+
var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-statusbar data-testid=editor-statusbar><div class="oasis-editor-statusbar-group oasis-editor-statusbar-start"><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-word-count></span><span class=oasis-editor-statusbar-item data-testid=editor-statusbar-character-count></span><span class=oasis-editor-statusbar-item></span></div><div class="oasis-editor-statusbar-group oasis-editor-statusbar-end"><div class=oasis-editor-statusbar-zoom data-testid=editor-statusbar-zoom-control><button type=button class=oasis-editor-zoom-button>−</button><input class=oasis-editor-zoom-slider type=range><button type=button class=oasis-editor-zoom-button>+</button><span class="oasis-editor-statusbar-item oasis-editor-zoom-value"data-testid=editor-statusbar-zoom>%`), _tmpl$2$n = /* @__PURE__ */ template(`<span>`);
|
|
47903
48223
|
function EditorStatusBar(props) {
|
|
47904
48224
|
const t = useI18n();
|
|
47905
48225
|
return (() => {
|
|
47906
|
-
var _el$ = _tmpl$$
|
|
48226
|
+
var _el$ = _tmpl$$C(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
|
|
47907
48227
|
insert(_el$3, () => t("status.words", [props.wordCount()]));
|
|
47908
48228
|
insert(_el$4, () => t("status.characters", [props.characterCount()]));
|
|
47909
48229
|
insert(_el$5, () => t("status.page", [props.currentPage(), props.totalPages()]));
|
|
@@ -47926,7 +48246,7 @@ function EditorStatusBar(props) {
|
|
|
47926
48246
|
return createComponent(Show, {
|
|
47927
48247
|
when: key,
|
|
47928
48248
|
get children() {
|
|
47929
|
-
var _el$11 = _tmpl$2$
|
|
48249
|
+
var _el$11 = _tmpl$2$n();
|
|
47930
48250
|
insert(_el$11, () => t(key));
|
|
47931
48251
|
createRenderEffect(() => className(_el$11, `oasis-editor-statusbar-item oasis-editor-persistence-status oasis-editor-status-${status.replace("...", "ing").replace(".", "")}`));
|
|
47932
48252
|
return _el$11;
|
|
@@ -47959,7 +48279,7 @@ function EditorStatusBar(props) {
|
|
|
47959
48279
|
})();
|
|
47960
48280
|
}
|
|
47961
48281
|
delegateEvents(["click", "input"]);
|
|
47962
|
-
var _tmpl$$
|
|
48282
|
+
var _tmpl$$B = /* @__PURE__ */ template(`<div data-testid=editor-editor-shell><div class=oasis-editor-editor data-testid=editor-editor><div class=oasis-editor-editor-zoom-sizer><div class=oasis-editor-editor-scroll-content data-testid=editor-editor-scroll-content style="position:absolute;top:0px;transform-origin:top left"><textarea aria-label="Editor input"autocomplete=off autocapitalize=off class=oasis-editor-input data-testid=editor-input value style=pointer-events:none></textarea><input data-testid=editor-import-docx-input type=file style=display:none><input accept="image/png, image/jpeg, image/gif"data-testid=editor-insert-image-input type=file style=display:none>`);
|
|
47963
48283
|
function OasisEditorEditor(props) {
|
|
47964
48284
|
const layout = () => props.layout;
|
|
47965
48285
|
const overlays = () => props.overlays;
|
|
@@ -48108,7 +48428,7 @@ function OasisEditorEditor(props) {
|
|
|
48108
48428
|
queueMicrotask(recomputeViewportPageIndex);
|
|
48109
48429
|
});
|
|
48110
48430
|
return (() => {
|
|
48111
|
-
var _el$ = _tmpl$$
|
|
48431
|
+
var _el$ = _tmpl$$B(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling;
|
|
48112
48432
|
insert(_el$, createComponent(Show, {
|
|
48113
48433
|
get when() {
|
|
48114
48434
|
return memo(() => !!layout().showHorizontalRuler)() && overlays().toolbarHost;
|
|
@@ -49226,11 +49546,11 @@ function createCanvasLayoutSnapshotProvider() {
|
|
|
49226
49546
|
}
|
|
49227
49547
|
};
|
|
49228
49548
|
}
|
|
49229
|
-
var _tmpl$$
|
|
49549
|
+
var _tmpl$$A = /* @__PURE__ */ template(`<button>`);
|
|
49230
49550
|
function FloatingActionButton(props) {
|
|
49231
49551
|
const [local, others] = splitProps(props, ["type", "icon", "label", "active", "class", "classList"]);
|
|
49232
49552
|
return (() => {
|
|
49233
|
-
var _el$ = _tmpl$$
|
|
49553
|
+
var _el$ = _tmpl$$A();
|
|
49234
49554
|
spread(_el$, mergeProps({
|
|
49235
49555
|
get type() {
|
|
49236
49556
|
return local.type ?? "button";
|
|
@@ -49259,7 +49579,7 @@ function FloatingActionButton(props) {
|
|
|
49259
49579
|
return _el$;
|
|
49260
49580
|
})();
|
|
49261
49581
|
}
|
|
49262
|
-
var _tmpl$$
|
|
49582
|
+
var _tmpl$$z = /* @__PURE__ */ template(`<aside>`), _tmpl$2$m = /* @__PURE__ */ template(`<div>`);
|
|
49263
49583
|
function SidePanel(props) {
|
|
49264
49584
|
const [local, others] = splitProps(props, ["mode", "width", "class", "classList", "children", "style"]);
|
|
49265
49585
|
const width = () => {
|
|
@@ -49269,7 +49589,7 @@ function SidePanel(props) {
|
|
|
49269
49589
|
return local.width ?? "360px";
|
|
49270
49590
|
};
|
|
49271
49591
|
return (() => {
|
|
49272
|
-
var _el$ = _tmpl$$
|
|
49592
|
+
var _el$ = _tmpl$$z();
|
|
49273
49593
|
spread(_el$, mergeProps({
|
|
49274
49594
|
get ["class"]() {
|
|
49275
49595
|
return `oasis-editor-plugin-side-panel ${local.class ?? ""}`;
|
|
@@ -49294,7 +49614,7 @@ function SidePanel(props) {
|
|
|
49294
49614
|
function SidePanelHeader(props) {
|
|
49295
49615
|
const [local, others] = splitProps(props, ["class", "children"]);
|
|
49296
49616
|
return (() => {
|
|
49297
|
-
var _el$2 = _tmpl$2$
|
|
49617
|
+
var _el$2 = _tmpl$2$m();
|
|
49298
49618
|
spread(_el$2, mergeProps({
|
|
49299
49619
|
get ["class"]() {
|
|
49300
49620
|
return `oasis-editor-plugin-side-panel-header ${local.class ?? ""}`;
|
|
@@ -49307,7 +49627,7 @@ function SidePanelHeader(props) {
|
|
|
49307
49627
|
function SidePanelBody(props) {
|
|
49308
49628
|
const [local, others] = splitProps(props, ["class", "children"]);
|
|
49309
49629
|
return (() => {
|
|
49310
|
-
var _el$3 = _tmpl$2$
|
|
49630
|
+
var _el$3 = _tmpl$2$m();
|
|
49311
49631
|
spread(_el$3, mergeProps({
|
|
49312
49632
|
get ["class"]() {
|
|
49313
49633
|
return `oasis-editor-plugin-side-panel-body ${local.class ?? ""}`;
|
|
@@ -49320,7 +49640,7 @@ function SidePanelBody(props) {
|
|
|
49320
49640
|
function SidePanelFooter(props) {
|
|
49321
49641
|
const [local, others] = splitProps(props, ["class", "children"]);
|
|
49322
49642
|
return (() => {
|
|
49323
|
-
var _el$4 = _tmpl$2$
|
|
49643
|
+
var _el$4 = _tmpl$2$m();
|
|
49324
49644
|
spread(_el$4, mergeProps({
|
|
49325
49645
|
get ["class"]() {
|
|
49326
49646
|
return `oasis-editor-plugin-side-panel-footer ${local.class ?? ""}`;
|
|
@@ -49330,11 +49650,11 @@ function SidePanelFooter(props) {
|
|
|
49330
49650
|
return _el$4;
|
|
49331
49651
|
})();
|
|
49332
49652
|
}
|
|
49333
|
-
var _tmpl$$
|
|
49653
|
+
var _tmpl$$y = /* @__PURE__ */ template(`<button>`);
|
|
49334
49654
|
function IconButton(props) {
|
|
49335
49655
|
const [local, others] = splitProps(props, ["type", "icon", "label", "active", "variant", "size", "class", "classList"]);
|
|
49336
49656
|
return (() => {
|
|
49337
|
-
var _el$ = _tmpl$$
|
|
49657
|
+
var _el$ = _tmpl$$y();
|
|
49338
49658
|
spread(_el$, mergeProps({
|
|
49339
49659
|
get type() {
|
|
49340
49660
|
return local.type ?? "button";
|
|
@@ -49365,7 +49685,7 @@ function IconButton(props) {
|
|
|
49365
49685
|
return _el$;
|
|
49366
49686
|
})();
|
|
49367
49687
|
}
|
|
49368
|
-
var _tmpl$$
|
|
49688
|
+
var _tmpl$$x = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-floating-actions>`), _tmpl$2$l = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-ui-host><div class=oasis-editor-plugin-ui-main>`), _tmpl$3$f = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-overlay>`), _tmpl$4$a = /* @__PURE__ */ template(`<div class=oasis-editor-plugin-side-panel-title>`);
|
|
49369
49689
|
const EMPTY_SNAPSHOT = {
|
|
49370
49690
|
floatingActions: [],
|
|
49371
49691
|
sidePanels: [],
|
|
@@ -49397,7 +49717,7 @@ function PluginUiHost(props) {
|
|
|
49397
49717
|
return groupActionsByPlacement(actions());
|
|
49398
49718
|
},
|
|
49399
49719
|
children: (group) => (() => {
|
|
49400
|
-
var _el$ = _tmpl$$
|
|
49720
|
+
var _el$ = _tmpl$$x();
|
|
49401
49721
|
insert(_el$, createComponent(For, {
|
|
49402
49722
|
get each() {
|
|
49403
49723
|
return group.actions;
|
|
@@ -49426,7 +49746,7 @@ function PluginUiHost(props) {
|
|
|
49426
49746
|
})()
|
|
49427
49747
|
});
|
|
49428
49748
|
return (() => {
|
|
49429
|
-
var _el$2 = _tmpl$2$
|
|
49749
|
+
var _el$2 = _tmpl$2$l(), _el$3 = _el$2.firstChild;
|
|
49430
49750
|
insert(_el$3, resolvedChildren);
|
|
49431
49751
|
insert(_el$2, createComponent(Show, {
|
|
49432
49752
|
get when() {
|
|
@@ -49439,7 +49759,7 @@ function PluginUiHost(props) {
|
|
|
49439
49759
|
return overlayPanel();
|
|
49440
49760
|
},
|
|
49441
49761
|
children: (panel) => (() => {
|
|
49442
|
-
var _el$4 = _tmpl$3$
|
|
49762
|
+
var _el$4 = _tmpl$3$f();
|
|
49443
49763
|
insert(_el$4, () => renderPanel(props.editor, panel(), t));
|
|
49444
49764
|
return _el$4;
|
|
49445
49765
|
})()
|
|
@@ -49490,7 +49810,7 @@ function renderPanel(editor, panel, t) {
|
|
|
49490
49810
|
return [createComponent(SidePanelHeader, {
|
|
49491
49811
|
get children() {
|
|
49492
49812
|
return [(() => {
|
|
49493
|
-
var _el$5 = _tmpl$4$
|
|
49813
|
+
var _el$5 = _tmpl$4$a();
|
|
49494
49814
|
insert(_el$5, createComponent(Show, {
|
|
49495
49815
|
get when() {
|
|
49496
49816
|
return panel.icon;
|
|
@@ -49549,7 +49869,7 @@ function groupActionsByPlacement(actions) {
|
|
|
49549
49869
|
actions: groupActions
|
|
49550
49870
|
}));
|
|
49551
49871
|
}
|
|
49552
|
-
var _tmpl$$
|
|
49872
|
+
var _tmpl$$w = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage>`);
|
|
49553
49873
|
function DocumentShell(props) {
|
|
49554
49874
|
let surfaceEl;
|
|
49555
49875
|
let viewportEl;
|
|
@@ -49676,7 +49996,7 @@ function DocumentShell(props) {
|
|
|
49676
49996
|
return props.runtimeEditor;
|
|
49677
49997
|
},
|
|
49678
49998
|
get children() {
|
|
49679
|
-
var _el$ = _tmpl$$
|
|
49999
|
+
var _el$ = _tmpl$$w(), _el$2 = _el$.firstChild;
|
|
49680
50000
|
insert(_el$, createComponent(Show, {
|
|
49681
50001
|
get when() {
|
|
49682
50002
|
return memo(() => !!props.showChrome)() && props.showOutline;
|
|
@@ -49740,10 +50060,10 @@ function DocumentShell(props) {
|
|
|
49740
50060
|
}
|
|
49741
50061
|
})];
|
|
49742
50062
|
}
|
|
49743
|
-
var _tmpl$$
|
|
50063
|
+
var _tmpl$$v = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$k = /* @__PURE__ */ template(`<div class=oasis-inline-shell style="border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);overflow:hidden;display:flex;flex-direction:column">`);
|
|
49744
50064
|
function InlineShell(props) {
|
|
49745
50065
|
return (() => {
|
|
49746
|
-
var _el$ = _tmpl$2$
|
|
50066
|
+
var _el$ = _tmpl$2$k();
|
|
49747
50067
|
insert(_el$, createComponent(Show, {
|
|
49748
50068
|
get when() {
|
|
49749
50069
|
return memo(() => !!props.showChrome)() && props.showToolbar;
|
|
@@ -49770,7 +50090,7 @@ function InlineShell(props) {
|
|
|
49770
50090
|
return props.runtimeEditor;
|
|
49771
50091
|
},
|
|
49772
50092
|
get children() {
|
|
49773
|
-
var _el$2 = _tmpl$$
|
|
50093
|
+
var _el$2 = _tmpl$$v(), _el$3 = _el$2.firstChild;
|
|
49774
50094
|
insert(_el$3, createComponent(OasisEditorEditor, {
|
|
49775
50095
|
state: () => props.state,
|
|
49776
50096
|
get layout() {
|
|
@@ -49809,16 +50129,16 @@ function InlineShell(props) {
|
|
|
49809
50129
|
return _el$;
|
|
49810
50130
|
})();
|
|
49811
50131
|
}
|
|
49812
|
-
var _tmpl$$
|
|
50132
|
+
var _tmpl$$u = /* @__PURE__ */ template(`<div class=oasis-editor-main-container><section class=oasis-editor-stage style=padding:0>`), _tmpl$2$j = /* @__PURE__ */ template(`<div class=oasis-balloon-shell>`);
|
|
49813
50133
|
function BalloonShell(props) {
|
|
49814
50134
|
return (() => {
|
|
49815
|
-
var _el$ = _tmpl$2$
|
|
50135
|
+
var _el$ = _tmpl$2$j();
|
|
49816
50136
|
insert(_el$, createComponent(PluginUiHost, {
|
|
49817
50137
|
get editor() {
|
|
49818
50138
|
return props.runtimeEditor;
|
|
49819
50139
|
},
|
|
49820
50140
|
get children() {
|
|
49821
|
-
var _el$2 = _tmpl$$
|
|
50141
|
+
var _el$2 = _tmpl$$u(), _el$3 = _el$2.firstChild;
|
|
49822
50142
|
insert(_el$3, createComponent(OasisEditorEditor, {
|
|
49823
50143
|
state: () => props.state,
|
|
49824
50144
|
get layout() {
|
|
@@ -49857,7 +50177,7 @@ function BalloonShell(props) {
|
|
|
49857
50177
|
return _el$;
|
|
49858
50178
|
})();
|
|
49859
50179
|
}
|
|
49860
|
-
var _tmpl$$
|
|
50180
|
+
var _tmpl$$t = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-footer data-testid=editor-dialog-footer>`), _tmpl$2$i = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-overlay><div role=dialog aria-modal=true data-testid=editor-dialog><div class=oasis-editor-dialog-header><h3 class=oasis-editor-dialog-title></h3><button class=oasis-editor-dialog-close data-testid=editor-dialog-close><i data-lucide=x></i></button></div><div data-testid=editor-dialog-body>`);
|
|
49861
50181
|
function Dialog(props) {
|
|
49862
50182
|
const t = useI18n();
|
|
49863
50183
|
let dialogRef;
|
|
@@ -49882,7 +50202,7 @@ function Dialog(props) {
|
|
|
49882
50202
|
return props.isOpen;
|
|
49883
50203
|
},
|
|
49884
50204
|
get children() {
|
|
49885
|
-
var _el$ = _tmpl$2$
|
|
50205
|
+
var _el$ = _tmpl$2$i(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling;
|
|
49886
50206
|
_el$.$$click = () => {
|
|
49887
50207
|
if (props.closeOnOverlayClick ?? true) {
|
|
49888
50208
|
props.onClose();
|
|
@@ -49899,7 +50219,7 @@ function Dialog(props) {
|
|
|
49899
50219
|
return props.footer;
|
|
49900
50220
|
},
|
|
49901
50221
|
get children() {
|
|
49902
|
-
var _el$7 = _tmpl$$
|
|
50222
|
+
var _el$7 = _tmpl$$t();
|
|
49903
50223
|
insert(_el$7, () => props.footer);
|
|
49904
50224
|
return _el$7;
|
|
49905
50225
|
}
|
|
@@ -49928,7 +50248,7 @@ function Dialog(props) {
|
|
|
49928
50248
|
});
|
|
49929
50249
|
}
|
|
49930
50250
|
delegateEvents(["click"]);
|
|
49931
|
-
var _tmpl$$
|
|
50251
|
+
var _tmpl$$s = /* @__PURE__ */ template(`<div><div class=oasis-editor-tabs-list role=tablist>`), _tmpl$2$h = /* @__PURE__ */ template(`<button type=button role=tab class=oasis-editor-tabs-tab>`), _tmpl$3$e = /* @__PURE__ */ template(`<div role=tabpanel class=oasis-editor-tabs-panel>`);
|
|
49932
50252
|
function findEnabledItem(items, startIndex, direction) {
|
|
49933
50253
|
if (!items.length) return void 0;
|
|
49934
50254
|
for (let step = 0; step < items.length; step += 1) {
|
|
@@ -49979,7 +50299,7 @@ function Tabs(props) {
|
|
|
49979
50299
|
selectItem(findEnabledItem(items(), currentIndex + direction, direction), true);
|
|
49980
50300
|
};
|
|
49981
50301
|
return (() => {
|
|
49982
|
-
var _el$ = _tmpl$$
|
|
50302
|
+
var _el$ = _tmpl$$s(), _el$2 = _el$.firstChild;
|
|
49983
50303
|
_el$2.$$keydown = handleKeyDown;
|
|
49984
50304
|
insert(_el$2, createComponent(For, {
|
|
49985
50305
|
get each() {
|
|
@@ -49989,7 +50309,7 @@ function Tabs(props) {
|
|
|
49989
50309
|
const tabId = `${baseId}-${item.id}-tab`;
|
|
49990
50310
|
const panelId = `${baseId}-${item.id}-panel`;
|
|
49991
50311
|
return (() => {
|
|
49992
|
-
var _el$3 = _tmpl$2$
|
|
50312
|
+
var _el$3 = _tmpl$2$h();
|
|
49993
50313
|
_el$3.$$click = () => selectItem(item);
|
|
49994
50314
|
use((element) => {
|
|
49995
50315
|
tabRefs[index()] = element;
|
|
@@ -50024,7 +50344,7 @@ function Tabs(props) {
|
|
|
50024
50344
|
return items();
|
|
50025
50345
|
},
|
|
50026
50346
|
children: (item) => (() => {
|
|
50027
|
-
var _el$4 = _tmpl$3$
|
|
50347
|
+
var _el$4 = _tmpl$3$e();
|
|
50028
50348
|
insert(_el$4, () => item.panel);
|
|
50029
50349
|
createRenderEffect((_p$) => {
|
|
50030
50350
|
var _a2, _b2;
|
|
@@ -50056,12 +50376,12 @@ function Tabs(props) {
|
|
|
50056
50376
|
})();
|
|
50057
50377
|
}
|
|
50058
50378
|
delegateEvents(["keydown", "click"]);
|
|
50059
|
-
var _tmpl$$
|
|
50379
|
+
var _tmpl$$r = /* @__PURE__ */ template(`<button><span class=oasis-editor-ui-button-label>`);
|
|
50060
50380
|
function Button(props) {
|
|
50061
50381
|
const [local, others] = splitProps(props, ["type", "variant", "size", "icon", "iconPosition", "fullWidth", "class", "classList", "children"]);
|
|
50062
50382
|
const iconPosition = () => local.iconPosition ?? "start";
|
|
50063
50383
|
return (() => {
|
|
50064
|
-
var _el$ = _tmpl$$
|
|
50384
|
+
var _el$ = _tmpl$$r(), _el$2 = _el$.firstChild;
|
|
50065
50385
|
spread(_el$, mergeProps({
|
|
50066
50386
|
get type() {
|
|
50067
50387
|
return local.type ?? "button";
|
|
@@ -50141,11 +50461,11 @@ function StatusText(props) {
|
|
|
50141
50461
|
}
|
|
50142
50462
|
}, others));
|
|
50143
50463
|
}
|
|
50144
|
-
var _tmpl$$
|
|
50464
|
+
var _tmpl$$q = /* @__PURE__ */ template(`<div>`);
|
|
50145
50465
|
function ActionRow(props) {
|
|
50146
50466
|
const [local, others] = splitProps(props, ["align", "wrap", "class", "classList", "children"]);
|
|
50147
50467
|
return (() => {
|
|
50148
|
-
var _el$ = _tmpl$$
|
|
50468
|
+
var _el$ = _tmpl$$q();
|
|
50149
50469
|
spread(_el$, mergeProps({
|
|
50150
50470
|
get ["class"]() {
|
|
50151
50471
|
return `oasis-editor-ui-action-row ${local.class ?? ""}`;
|
|
@@ -50201,7 +50521,7 @@ function mergeStyles(...styles) {
|
|
|
50201
50521
|
}
|
|
50202
50522
|
return Object.assign({}, ...objectStyles);
|
|
50203
50523
|
}
|
|
50204
|
-
var _tmpl$$
|
|
50524
|
+
var _tmpl$$p = /* @__PURE__ */ template(`<span class=oasis-editor-ui-stack-divider-item aria-hidden=true>`);
|
|
50205
50525
|
function childArray(value2) {
|
|
50206
50526
|
if (Array.isArray(value2)) return value2;
|
|
50207
50527
|
if (value2 === null || value2 === void 0 || value2 === false) return [];
|
|
@@ -50241,7 +50561,7 @@ function Stack(props) {
|
|
|
50241
50561
|
return memo(() => index() > 0)() && local.divider;
|
|
50242
50562
|
},
|
|
50243
50563
|
get children() {
|
|
50244
|
-
var _el$ = _tmpl$$
|
|
50564
|
+
var _el$ = _tmpl$$p();
|
|
50245
50565
|
insert(_el$, () => renderDivider(index()));
|
|
50246
50566
|
return _el$;
|
|
50247
50567
|
}
|
|
@@ -50320,14 +50640,14 @@ function Grid(props) {
|
|
|
50320
50640
|
}
|
|
50321
50641
|
}));
|
|
50322
50642
|
}
|
|
50323
|
-
var _tmpl$$
|
|
50643
|
+
var _tmpl$$o = /* @__PURE__ */ template(`<label>`), _tmpl$2$g = /* @__PURE__ */ template(`<div>`);
|
|
50324
50644
|
function FormField(props) {
|
|
50325
50645
|
const fallbackId = createUniqueId();
|
|
50326
50646
|
const [local, others] = splitProps(props, ["label", "for", "description", "error", "labelClass", "class", "classList", "children"]);
|
|
50327
50647
|
const descriptionId = () => local.for ?? `${fallbackId}-description`;
|
|
50328
50648
|
const errorId = () => local.for ?? `${fallbackId}-error`;
|
|
50329
50649
|
return (() => {
|
|
50330
|
-
var _el$ = _tmpl$2$
|
|
50650
|
+
var _el$ = _tmpl$2$g();
|
|
50331
50651
|
spread(_el$, mergeProps({
|
|
50332
50652
|
get ["class"]() {
|
|
50333
50653
|
return `oasis-editor-ui-field ${local.class ?? ""}`;
|
|
@@ -50341,7 +50661,7 @@ function FormField(props) {
|
|
|
50341
50661
|
return local.label;
|
|
50342
50662
|
},
|
|
50343
50663
|
get children() {
|
|
50344
|
-
var _el$2 = _tmpl$$
|
|
50664
|
+
var _el$2 = _tmpl$$o();
|
|
50345
50665
|
insert(_el$2, () => local.label);
|
|
50346
50666
|
createRenderEffect((_p$) => {
|
|
50347
50667
|
var _v$ = `oasis-editor-ui-field-label ${local.labelClass ?? ""}`, _v$2 = local.for;
|
|
@@ -50392,7 +50712,7 @@ function FormField(props) {
|
|
|
50392
50712
|
return _el$;
|
|
50393
50713
|
})();
|
|
50394
50714
|
}
|
|
50395
|
-
var _tmpl$$
|
|
50715
|
+
var _tmpl$$n = /* @__PURE__ */ template(`<span>`), _tmpl$2$f = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$d = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$9 = /* @__PURE__ */ template(`<label><input>`);
|
|
50396
50716
|
function TextField(props) {
|
|
50397
50717
|
const fallbackId = createUniqueId();
|
|
50398
50718
|
const [local, others] = splitProps(props, ["label", "description", "error", "labelClass", "controlClass", "onChange", "class", "classList", "id"]);
|
|
@@ -50400,13 +50720,13 @@ function TextField(props) {
|
|
|
50400
50720
|
const descriptionId = () => `${id()}-description`;
|
|
50401
50721
|
const errorId = () => `${id()}-error`;
|
|
50402
50722
|
return (() => {
|
|
50403
|
-
var _el$ = _tmpl$4$
|
|
50723
|
+
var _el$ = _tmpl$4$9(), _el$3 = _el$.firstChild;
|
|
50404
50724
|
insert(_el$, createComponent(Show, {
|
|
50405
50725
|
get when() {
|
|
50406
50726
|
return local.label;
|
|
50407
50727
|
},
|
|
50408
50728
|
get children() {
|
|
50409
|
-
var _el$2 = _tmpl$$
|
|
50729
|
+
var _el$2 = _tmpl$$n();
|
|
50410
50730
|
insert(_el$2, () => local.label);
|
|
50411
50731
|
createRenderEffect(() => className(_el$2, `oasis-editor-ui-field-label ${local.labelClass ?? ""}`));
|
|
50412
50732
|
return _el$2;
|
|
@@ -50435,7 +50755,7 @@ function TextField(props) {
|
|
|
50435
50755
|
return local.description;
|
|
50436
50756
|
},
|
|
50437
50757
|
get children() {
|
|
50438
|
-
var _el$4 = _tmpl$2$
|
|
50758
|
+
var _el$4 = _tmpl$2$f();
|
|
50439
50759
|
insert(_el$4, () => local.description);
|
|
50440
50760
|
createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
|
|
50441
50761
|
return _el$4;
|
|
@@ -50446,7 +50766,7 @@ function TextField(props) {
|
|
|
50446
50766
|
return local.error;
|
|
50447
50767
|
},
|
|
50448
50768
|
get children() {
|
|
50449
|
-
var _el$5 = _tmpl$3$
|
|
50769
|
+
var _el$5 = _tmpl$3$d();
|
|
50450
50770
|
insert(_el$5, () => local.error);
|
|
50451
50771
|
createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
|
|
50452
50772
|
return _el$5;
|
|
@@ -50467,7 +50787,7 @@ function TextField(props) {
|
|
|
50467
50787
|
})();
|
|
50468
50788
|
}
|
|
50469
50789
|
delegateEvents(["input"]);
|
|
50470
|
-
var _tmpl$$
|
|
50790
|
+
var _tmpl$$m = /* @__PURE__ */ template(`<textarea>`);
|
|
50471
50791
|
function TextAreaField(props) {
|
|
50472
50792
|
const fallbackId = createUniqueId();
|
|
50473
50793
|
const [local, others] = splitProps(props, ["label", "description", "error", "labelClass", "controlClass", "onChange", "class", "id"]);
|
|
@@ -50493,7 +50813,7 @@ function TextAreaField(props) {
|
|
|
50493
50813
|
return local.error;
|
|
50494
50814
|
},
|
|
50495
50815
|
get children() {
|
|
50496
|
-
var _el$ = _tmpl$$
|
|
50816
|
+
var _el$ = _tmpl$$m();
|
|
50497
50817
|
_el$.$$input = (event) => {
|
|
50498
50818
|
var _a2;
|
|
50499
50819
|
return (_a2 = local.onChange) == null ? void 0 : _a2.call(local, event.currentTarget.value);
|
|
@@ -50529,7 +50849,7 @@ function ColorField(props) {
|
|
|
50529
50849
|
}
|
|
50530
50850
|
}, others));
|
|
50531
50851
|
}
|
|
50532
|
-
var _tmpl$$
|
|
50852
|
+
var _tmpl$$l = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$e = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$3$c = /* @__PURE__ */ template(`<label><input type=checkbox class=oasis-editor-ui-checkbox-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`);
|
|
50533
50853
|
function Checkbox(props) {
|
|
50534
50854
|
const fallbackId = createUniqueId();
|
|
50535
50855
|
const [local, others] = splitProps(props, ["label", "description", "error", "onChange", "class", "id"]);
|
|
@@ -50537,7 +50857,7 @@ function Checkbox(props) {
|
|
|
50537
50857
|
const descriptionId = () => `${id()}-description`;
|
|
50538
50858
|
const errorId = () => `${id()}-error`;
|
|
50539
50859
|
return (() => {
|
|
50540
|
-
var _el$ = _tmpl$3$
|
|
50860
|
+
var _el$ = _tmpl$3$c(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
50541
50861
|
_el$2.addEventListener("change", (event) => {
|
|
50542
50862
|
var _a2;
|
|
50543
50863
|
return (_a2 = local.onChange) == null ? void 0 : _a2.call(local, event.currentTarget.checked);
|
|
@@ -50559,7 +50879,7 @@ function Checkbox(props) {
|
|
|
50559
50879
|
return local.description;
|
|
50560
50880
|
},
|
|
50561
50881
|
get children() {
|
|
50562
|
-
var _el$5 = _tmpl$$
|
|
50882
|
+
var _el$5 = _tmpl$$l();
|
|
50563
50883
|
insert(_el$5, () => local.description);
|
|
50564
50884
|
createRenderEffect(() => setAttribute(_el$5, "id", descriptionId()));
|
|
50565
50885
|
return _el$5;
|
|
@@ -50570,7 +50890,7 @@ function Checkbox(props) {
|
|
|
50570
50890
|
return local.error;
|
|
50571
50891
|
},
|
|
50572
50892
|
get children() {
|
|
50573
|
-
var _el$6 = _tmpl$2$
|
|
50893
|
+
var _el$6 = _tmpl$2$e();
|
|
50574
50894
|
insert(_el$6, () => local.error);
|
|
50575
50895
|
createRenderEffect(() => setAttribute(_el$6, "id", errorId()));
|
|
50576
50896
|
return _el$6;
|
|
@@ -50588,7 +50908,7 @@ function Checkbox(props) {
|
|
|
50588
50908
|
return _el$;
|
|
50589
50909
|
})();
|
|
50590
50910
|
}
|
|
50591
|
-
var _tmpl$$
|
|
50911
|
+
var _tmpl$$k = /* @__PURE__ */ template(`<span>`), _tmpl$2$d = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$3$b = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-error>`), _tmpl$4$8 = /* @__PURE__ */ template(`<label><select>`), _tmpl$5$6 = /* @__PURE__ */ template(`<option>`);
|
|
50592
50912
|
function SelectField(props) {
|
|
50593
50913
|
const fallbackId = createUniqueId();
|
|
50594
50914
|
const [local, others] = splitProps(props, ["label", "description", "error", "labelClass", "controlClass", "options", "onChange", "class", "classList", "id", "value"]);
|
|
@@ -50597,13 +50917,13 @@ function SelectField(props) {
|
|
|
50597
50917
|
const descriptionId = () => `${id()}-description`;
|
|
50598
50918
|
const errorId = () => `${id()}-error`;
|
|
50599
50919
|
return (() => {
|
|
50600
|
-
var _el$ = _tmpl$4$
|
|
50920
|
+
var _el$ = _tmpl$4$8(), _el$3 = _el$.firstChild;
|
|
50601
50921
|
insert(_el$, createComponent(Show, {
|
|
50602
50922
|
get when() {
|
|
50603
50923
|
return local.label;
|
|
50604
50924
|
},
|
|
50605
50925
|
get children() {
|
|
50606
|
-
var _el$2 = _tmpl$$
|
|
50926
|
+
var _el$2 = _tmpl$$k();
|
|
50607
50927
|
insert(_el$2, () => local.label);
|
|
50608
50928
|
createRenderEffect(() => className(_el$2, `oasis-editor-ui-field-label ${local.labelClass ?? ""}`));
|
|
50609
50929
|
return _el$2;
|
|
@@ -50636,7 +50956,7 @@ function SelectField(props) {
|
|
|
50636
50956
|
return local.options;
|
|
50637
50957
|
},
|
|
50638
50958
|
children: (option) => (() => {
|
|
50639
|
-
var _el$6 = _tmpl$5$
|
|
50959
|
+
var _el$6 = _tmpl$5$6();
|
|
50640
50960
|
insert(_el$6, () => option.label);
|
|
50641
50961
|
createRenderEffect((_p$) => {
|
|
50642
50962
|
var _v$4 = option.disabled, _v$5 = option.value === currentValue();
|
|
@@ -50656,7 +50976,7 @@ function SelectField(props) {
|
|
|
50656
50976
|
return local.description;
|
|
50657
50977
|
},
|
|
50658
50978
|
get children() {
|
|
50659
|
-
var _el$4 = _tmpl$2$
|
|
50979
|
+
var _el$4 = _tmpl$2$d();
|
|
50660
50980
|
insert(_el$4, () => local.description);
|
|
50661
50981
|
createRenderEffect(() => setAttribute(_el$4, "id", descriptionId()));
|
|
50662
50982
|
return _el$4;
|
|
@@ -50667,7 +50987,7 @@ function SelectField(props) {
|
|
|
50667
50987
|
return local.error;
|
|
50668
50988
|
},
|
|
50669
50989
|
get children() {
|
|
50670
|
-
var _el$5 = _tmpl$3$
|
|
50990
|
+
var _el$5 = _tmpl$3$b();
|
|
50671
50991
|
insert(_el$5, () => local.error);
|
|
50672
50992
|
createRenderEffect(() => setAttribute(_el$5, "id", errorId()));
|
|
50673
50993
|
return _el$5;
|
|
@@ -50702,7 +51022,7 @@ function NumberField(props) {
|
|
|
50702
51022
|
}
|
|
50703
51023
|
}, others));
|
|
50704
51024
|
}
|
|
50705
|
-
var _tmpl$$
|
|
51025
|
+
var _tmpl$$j = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-description>`), _tmpl$2$c = /* @__PURE__ */ template(`<label><input type=radio class=oasis-editor-ui-radio-input><span class=oasis-editor-ui-checkbox-copy><span class=oasis-editor-ui-field-label>`), _tmpl$3$a = /* @__PURE__ */ template(`<span class=oasis-editor-ui-field-label>`), _tmpl$4$7 = /* @__PURE__ */ template(`<div role=radiogroup>`);
|
|
50706
51026
|
const RadioGroupCtx = createContext();
|
|
50707
51027
|
function Radio(props) {
|
|
50708
51028
|
const fallbackId = createUniqueId();
|
|
@@ -50713,7 +51033,7 @@ function Radio(props) {
|
|
|
50713
51033
|
const checked = () => group ? group.value() === local.value : Boolean(local.checked);
|
|
50714
51034
|
const disabled = () => Boolean(local.disabled) || (group ? group.disabled() : false);
|
|
50715
51035
|
return (() => {
|
|
50716
|
-
var _el$ = _tmpl$2$
|
|
51036
|
+
var _el$ = _tmpl$2$c(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
50717
51037
|
_el$2.addEventListener("change", (event) => {
|
|
50718
51038
|
var _a2;
|
|
50719
51039
|
if (group) group.onSelect(local.value);
|
|
@@ -50745,7 +51065,7 @@ function Radio(props) {
|
|
|
50745
51065
|
return local.description;
|
|
50746
51066
|
},
|
|
50747
51067
|
get children() {
|
|
50748
|
-
var _el$5 = _tmpl$$
|
|
51068
|
+
var _el$5 = _tmpl$$j();
|
|
50749
51069
|
insert(_el$5, () => local.description);
|
|
50750
51070
|
createRenderEffect(() => setAttribute(_el$5, "id", descriptionId()));
|
|
50751
51071
|
return _el$5;
|
|
@@ -50777,13 +51097,13 @@ function RadioGroup(props) {
|
|
|
50777
51097
|
return createComponent(RadioGroupCtx.Provider, {
|
|
50778
51098
|
value: ctx,
|
|
50779
51099
|
get children() {
|
|
50780
|
-
var _el$6 = _tmpl$4$
|
|
51100
|
+
var _el$6 = _tmpl$4$7();
|
|
50781
51101
|
insert(_el$6, createComponent(Show, {
|
|
50782
51102
|
get when() {
|
|
50783
51103
|
return props.label;
|
|
50784
51104
|
},
|
|
50785
51105
|
get children() {
|
|
50786
|
-
var _el$7 = _tmpl$3$
|
|
51106
|
+
var _el$7 = _tmpl$3$a();
|
|
50787
51107
|
insert(_el$7, () => props.label);
|
|
50788
51108
|
return _el$7;
|
|
50789
51109
|
}
|
|
@@ -50830,7 +51150,7 @@ function RadioGroup(props) {
|
|
|
50830
51150
|
}
|
|
50831
51151
|
});
|
|
50832
51152
|
}
|
|
50833
|
-
var _tmpl$$
|
|
51153
|
+
var _tmpl$$i = /* @__PURE__ */ template(`<div>`);
|
|
50834
51154
|
const ALIGN_MAP = {
|
|
50835
51155
|
start: "flex-start",
|
|
50836
51156
|
center: "center",
|
|
@@ -50840,7 +51160,7 @@ const ALIGN_MAP = {
|
|
|
50840
51160
|
function FieldRow(props) {
|
|
50841
51161
|
const [local, others] = splitProps(props, ["align", "class", "style", "children"]);
|
|
50842
51162
|
return (() => {
|
|
50843
|
-
var _el$ = _tmpl$$
|
|
51163
|
+
var _el$ = _tmpl$$i();
|
|
50844
51164
|
spread(_el$, mergeProps({
|
|
50845
51165
|
get ["class"]() {
|
|
50846
51166
|
return `oasis-editor-ui-field-row ${local.class ?? ""}`;
|
|
@@ -50856,11 +51176,11 @@ function FieldRow(props) {
|
|
|
50856
51176
|
return _el$;
|
|
50857
51177
|
})();
|
|
50858
51178
|
}
|
|
50859
|
-
var _tmpl$$
|
|
51179
|
+
var _tmpl$$h = /* @__PURE__ */ template(`<legend>`), _tmpl$2$b = /* @__PURE__ */ template(`<fieldset>`);
|
|
50860
51180
|
function FieldGroup(props) {
|
|
50861
51181
|
const [local, others] = splitProps(props, ["legend", "legendClass", "class", "children"]);
|
|
50862
51182
|
return (() => {
|
|
50863
|
-
var _el$ = _tmpl$2$
|
|
51183
|
+
var _el$ = _tmpl$2$b();
|
|
50864
51184
|
spread(_el$, mergeProps({
|
|
50865
51185
|
get ["class"]() {
|
|
50866
51186
|
return `oasis-editor-ui-field-group ${local.class ?? ""}`;
|
|
@@ -50871,7 +51191,7 @@ function FieldGroup(props) {
|
|
|
50871
51191
|
return local.legend;
|
|
50872
51192
|
},
|
|
50873
51193
|
get children() {
|
|
50874
|
-
var _el$2 = _tmpl$$
|
|
51194
|
+
var _el$2 = _tmpl$$h();
|
|
50875
51195
|
insert(_el$2, () => local.legend);
|
|
50876
51196
|
createRenderEffect(() => className(_el$2, `oasis-editor-ui-field-group-legend ${local.legendClass ?? ""}`));
|
|
50877
51197
|
return _el$2;
|
|
@@ -50881,11 +51201,11 @@ function FieldGroup(props) {
|
|
|
50881
51201
|
return _el$;
|
|
50882
51202
|
})();
|
|
50883
51203
|
}
|
|
50884
|
-
var _tmpl$$
|
|
51204
|
+
var _tmpl$$g = /* @__PURE__ */ template(`<label><input type=checkbox class=oasis-editor-ui-toggle-chip-input><span class=oasis-editor-ui-toggle-chip-label>`);
|
|
50885
51205
|
function ToggleChip(props) {
|
|
50886
51206
|
const [local, others] = splitProps(props, ["label", "labelStyle", "onChange", "class", "checked"]);
|
|
50887
51207
|
return (() => {
|
|
50888
|
-
var _el$ = _tmpl$$
|
|
51208
|
+
var _el$ = _tmpl$$g(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
50889
51209
|
_el$2.addEventListener("change", (event) => {
|
|
50890
51210
|
var _a2;
|
|
50891
51211
|
return (_a2 = local.onChange) == null ? void 0 : _a2.call(local, event.currentTarget.checked);
|
|
@@ -50910,11 +51230,11 @@ function ToggleChip(props) {
|
|
|
50910
51230
|
return _el$;
|
|
50911
51231
|
})();
|
|
50912
51232
|
}
|
|
50913
|
-
var _tmpl$$
|
|
51233
|
+
var _tmpl$$f = /* @__PURE__ */ template(`<div>`);
|
|
50914
51234
|
function DialogFooter(props) {
|
|
50915
51235
|
const [local, others] = splitProps(props, ["align", "class", "classList", "children"]);
|
|
50916
51236
|
return (() => {
|
|
50917
|
-
var _el$ = _tmpl$$
|
|
51237
|
+
var _el$ = _tmpl$$f();
|
|
50918
51238
|
spread(_el$, mergeProps({
|
|
50919
51239
|
get ["class"]() {
|
|
50920
51240
|
return `oasis-editor-ui-dialog-footer ${local.class ?? ""}`;
|
|
@@ -51179,7 +51499,7 @@ const UNDERLINE_STYLE_OPTIONS = [
|
|
|
51179
51499
|
}
|
|
51180
51500
|
}
|
|
51181
51501
|
];
|
|
51182
|
-
var _tmpl$$
|
|
51502
|
+
var _tmpl$$e = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action data-testid=editor-toolbar-underline-remove role=menuitem><span class=oasis-editor-color-menu-action-swatch><i data-lucide=slash></i></span><span>`), _tmpl$2$a = /* @__PURE__ */ template(`<div class=oasis-editor-underline-menu-list>`), _tmpl$3$9 = /* @__PURE__ */ template(`<span class="oasis-editor-color-split-icon oasis-editor-underline-split-icon"><span class=oasis-editor-underline-split-glyph aria-hidden=true>U</span><span class=oasis-editor-underline-split-indicator>`), _tmpl$4$6 = /* @__PURE__ */ template(`<span class="oasis-editor-underline-menu-stroke oasis-editor-underline-menu-stroke-svg">`), _tmpl$5$5 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-underline-menu-item role=menuitemradio><span class=oasis-editor-underline-menu-preview></span><span class=oasis-editor-underline-menu-label>`), _tmpl$6$4 = /* @__PURE__ */ template(`<span class=oasis-editor-underline-menu-stroke>`);
|
|
51183
51503
|
const mod$1 = /Mac/i.test(navigator.userAgent) ? "⌘" : "Ctrl";
|
|
51184
51504
|
const TEST_ID = "editor-toolbar-underline";
|
|
51185
51505
|
function UnderlineControl(props) {
|
|
@@ -51230,14 +51550,14 @@ function UnderlineControl(props) {
|
|
|
51230
51550
|
panelRole: "menu",
|
|
51231
51551
|
get mainContent() {
|
|
51232
51552
|
return (() => {
|
|
51233
|
-
var _el$5 = _tmpl$3$
|
|
51553
|
+
var _el$5 = _tmpl$3$9(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
51234
51554
|
createRenderEffect(() => setAttribute(_el$7, "data-style", indicatorStyle()));
|
|
51235
51555
|
return _el$5;
|
|
51236
51556
|
})();
|
|
51237
51557
|
},
|
|
51238
51558
|
get children() {
|
|
51239
51559
|
return [(() => {
|
|
51240
|
-
var _el$ = _tmpl$$
|
|
51560
|
+
var _el$ = _tmpl$$e(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
51241
51561
|
_el$.$$click = () => {
|
|
51242
51562
|
removeUnderline();
|
|
51243
51563
|
setOpen(false);
|
|
@@ -51245,13 +51565,13 @@ function UnderlineControl(props) {
|
|
|
51245
51565
|
insert(_el$3, () => t("toolbar.underlineRemove"));
|
|
51246
51566
|
return _el$;
|
|
51247
51567
|
})(), (() => {
|
|
51248
|
-
var _el$4 = _tmpl$2$
|
|
51568
|
+
var _el$4 = _tmpl$2$a();
|
|
51249
51569
|
insert(_el$4, createComponent(For, {
|
|
51250
51570
|
each: UNDERLINE_STYLE_OPTIONS,
|
|
51251
51571
|
children: (option) => {
|
|
51252
51572
|
const isActive = () => active() && activeStyleValue() === option.value.toLowerCase();
|
|
51253
51573
|
return (() => {
|
|
51254
|
-
var _el$8 = _tmpl$5$
|
|
51574
|
+
var _el$8 = _tmpl$5$5(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling;
|
|
51255
51575
|
_el$8.$$click = () => {
|
|
51256
51576
|
applyUnderlineStyle(option.value);
|
|
51257
51577
|
setOpen(false);
|
|
@@ -51262,7 +51582,7 @@ function UnderlineControl(props) {
|
|
|
51262
51582
|
},
|
|
51263
51583
|
get fallback() {
|
|
51264
51584
|
return (() => {
|
|
51265
|
-
var _el$10 = _tmpl$6$
|
|
51585
|
+
var _el$10 = _tmpl$6$4();
|
|
51266
51586
|
createRenderEffect((_$p) => style(_el$10, option.preview.borderStyle === "wavy" ? void 0 : {
|
|
51267
51587
|
"border-bottom-style": option.preview.borderStyle,
|
|
51268
51588
|
"border-bottom-width": option.preview.borderBottomWidth ?? "1px"
|
|
@@ -51271,7 +51591,7 @@ function UnderlineControl(props) {
|
|
|
51271
51591
|
})();
|
|
51272
51592
|
},
|
|
51273
51593
|
get children() {
|
|
51274
|
-
var _el$0 = _tmpl$4$
|
|
51594
|
+
var _el$0 = _tmpl$4$6();
|
|
51275
51595
|
createRenderEffect(() => _el$0.innerHTML = option.preview.svg);
|
|
51276
51596
|
return _el$0;
|
|
51277
51597
|
}
|
|
@@ -51300,7 +51620,7 @@ function UnderlineControl(props) {
|
|
|
51300
51620
|
});
|
|
51301
51621
|
}
|
|
51302
51622
|
delegateEvents(["click"]);
|
|
51303
|
-
var _tmpl$$
|
|
51623
|
+
var _tmpl$$d = /* @__PURE__ */ template(`<option value=decimal>`), _tmpl$2$9 = /* @__PURE__ */ template(`<option value=lowerLetter>`), _tmpl$3$8 = /* @__PURE__ */ template(`<option value=upperLetter>`), _tmpl$4$5 = /* @__PURE__ */ template(`<option value=lowerRoman>`), _tmpl$5$4 = /* @__PURE__ */ template(`<option value=upperRoman>`), _tmpl$6$3 = /* @__PURE__ */ template(`<option value=bullet>`), _tmpl$7$2 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><label class=oasis-editor-toolbar-field><span></span></label><label class=oasis-editor-toolbar-field><span></span><input type=number class=oasis-editor-tool-number data-testid=editor-toolbar-list-start-at min=1 step=1 placeholder=1>`);
|
|
51304
51624
|
function ListOptionsControl(props) {
|
|
51305
51625
|
const t = useI18n();
|
|
51306
51626
|
const api = props.api;
|
|
@@ -51312,7 +51632,7 @@ function ListOptionsControl(props) {
|
|
|
51312
51632
|
testId: "editor-toolbar-list-options-dropdown",
|
|
51313
51633
|
hideChevron: true,
|
|
51314
51634
|
get children() {
|
|
51315
|
-
var _el$ = _tmpl$7$
|
|
51635
|
+
var _el$ = _tmpl$7$2(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$0 = _el$2.nextSibling, _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling;
|
|
51316
51636
|
insert(_el$3, () => t("toolbar.listFormat"));
|
|
51317
51637
|
insert(_el$2, createComponent(Select, {
|
|
51318
51638
|
"data-testid": "editor-toolbar-list-format",
|
|
@@ -51322,27 +51642,27 @@ function ListOptionsControl(props) {
|
|
|
51322
51642
|
},
|
|
51323
51643
|
get children() {
|
|
51324
51644
|
return [(() => {
|
|
51325
|
-
var _el$4 = _tmpl$$
|
|
51645
|
+
var _el$4 = _tmpl$$d();
|
|
51326
51646
|
insert(_el$4, () => t("toolbar.formatDecimal"));
|
|
51327
51647
|
return _el$4;
|
|
51328
51648
|
})(), (() => {
|
|
51329
|
-
var _el$5 = _tmpl$2$
|
|
51649
|
+
var _el$5 = _tmpl$2$9();
|
|
51330
51650
|
insert(_el$5, () => t("toolbar.formatLowerLetter"));
|
|
51331
51651
|
return _el$5;
|
|
51332
51652
|
})(), (() => {
|
|
51333
|
-
var _el$6 = _tmpl$3$
|
|
51653
|
+
var _el$6 = _tmpl$3$8();
|
|
51334
51654
|
insert(_el$6, () => t("toolbar.formatUpperLetter"));
|
|
51335
51655
|
return _el$6;
|
|
51336
51656
|
})(), (() => {
|
|
51337
|
-
var _el$7 = _tmpl$4$
|
|
51657
|
+
var _el$7 = _tmpl$4$5();
|
|
51338
51658
|
insert(_el$7, () => t("toolbar.formatLowerRoman"));
|
|
51339
51659
|
return _el$7;
|
|
51340
51660
|
})(), (() => {
|
|
51341
|
-
var _el$8 = _tmpl$5$
|
|
51661
|
+
var _el$8 = _tmpl$5$4();
|
|
51342
51662
|
insert(_el$8, () => t("toolbar.formatUpperRoman"));
|
|
51343
51663
|
return _el$8;
|
|
51344
51664
|
})(), (() => {
|
|
51345
|
-
var _el$9 = _tmpl$6$
|
|
51665
|
+
var _el$9 = _tmpl$6$3();
|
|
51346
51666
|
insert(_el$9, () => t("toolbar.formatBullet"));
|
|
51347
51667
|
return _el$9;
|
|
51348
51668
|
})()];
|
|
@@ -51360,7 +51680,7 @@ function parseNumber(value2) {
|
|
|
51360
51680
|
const parsed = Number(value2);
|
|
51361
51681
|
return Number.isFinite(parsed) ? parsed : null;
|
|
51362
51682
|
}
|
|
51363
|
-
var _tmpl$$
|
|
51683
|
+
var _tmpl$$c = /* @__PURE__ */ template(`<div class=oasis-editor-dialog-preview data-testid=editor-line-spacing-dialog-preview><br>`);
|
|
51364
51684
|
function LineSpacingDialog(props) {
|
|
51365
51685
|
const t = useI18n();
|
|
51366
51686
|
const [lineHeight, setLineHeight] = createSignal(null);
|
|
@@ -51491,7 +51811,7 @@ function LineSpacingDialog(props) {
|
|
|
51491
51811
|
return t("lineSpacing.preview");
|
|
51492
51812
|
},
|
|
51493
51813
|
get children() {
|
|
51494
|
-
var _el$ = _tmpl$$
|
|
51814
|
+
var _el$ = _tmpl$$c(), _el$2 = _el$.firstChild;
|
|
51495
51815
|
insert(_el$, () => t("lineSpacing.previewText"), _el$2);
|
|
51496
51816
|
insert(_el$, () => t("lineSpacing.previewText"), null);
|
|
51497
51817
|
createRenderEffect((_$p) => style(_el$, previewStyle2(), _$p));
|
|
@@ -51501,7 +51821,7 @@ function LineSpacingDialog(props) {
|
|
|
51501
51821
|
}
|
|
51502
51822
|
});
|
|
51503
51823
|
}
|
|
51504
|
-
var _tmpl$$
|
|
51824
|
+
var _tmpl$$b = /* @__PURE__ */ template(`<div class=oasis-editor-line-spacing-menu-separator role=separator>`), _tmpl$2$8 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-line-spacing-item oasis-editor-line-spacing-item-more"role=menuitem data-testid=editor-toolbar-line-spacing-options><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`), _tmpl$3$7 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-line-spacing-item role=menuitemradio><span class=oasis-editor-line-spacing-item-check aria-hidden=true></span><span class=oasis-editor-line-spacing-item-label>`);
|
|
51505
51825
|
const PRESET_VALUES = [1, 1.15, 1.5, 2, 2.5, 3];
|
|
51506
51826
|
function formatPreset(value2) {
|
|
51507
51827
|
return value2.toFixed(value2 === Math.floor(value2) ? 1 : 2);
|
|
@@ -51571,7 +51891,7 @@ function LineSpacingButton(props) {
|
|
|
51571
51891
|
return lh !== null && approxEqual(lh, value2);
|
|
51572
51892
|
};
|
|
51573
51893
|
return (() => {
|
|
51574
|
-
var _el$5 = _tmpl$3$
|
|
51894
|
+
var _el$5 = _tmpl$3$7(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
51575
51895
|
_el$5.$$click = () => applyPreset(value2);
|
|
51576
51896
|
insert(_el$6, createComponent(Show, {
|
|
51577
51897
|
get when() {
|
|
@@ -51600,8 +51920,8 @@ function LineSpacingButton(props) {
|
|
|
51600
51920
|
return _el$5;
|
|
51601
51921
|
})();
|
|
51602
51922
|
}
|
|
51603
|
-
}), _tmpl$$
|
|
51604
|
-
var _el$2 = _tmpl$2$
|
|
51923
|
+
}), _tmpl$$b(), (() => {
|
|
51924
|
+
var _el$2 = _tmpl$2$8(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
|
|
51605
51925
|
_el$2.$$click = openDialog;
|
|
51606
51926
|
insert(_el$4, () => t("metric.lineSpacingOptions"));
|
|
51607
51927
|
return _el$2;
|
|
@@ -51630,7 +51950,7 @@ function LineSpacingButton(props) {
|
|
|
51630
51950
|
})];
|
|
51631
51951
|
}
|
|
51632
51952
|
delegateEvents(["click"]);
|
|
51633
|
-
var _tmpl$$
|
|
51953
|
+
var _tmpl$$a = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-toolbar-panel-actions">`), _tmpl$2$7 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-panel-grid>`);
|
|
51634
51954
|
const numValue = (api, command) => {
|
|
51635
51955
|
const value2 = api.commands.state(command).value;
|
|
51636
51956
|
return value2 == null ? "" : String(value2);
|
|
@@ -51649,7 +51969,7 @@ function MetricGroup(props) {
|
|
|
51649
51969
|
keepMounted: true,
|
|
51650
51970
|
get children() {
|
|
51651
51971
|
return [(() => {
|
|
51652
|
-
var _el$ = _tmpl$$
|
|
51972
|
+
var _el$ = _tmpl$$a();
|
|
51653
51973
|
insert(_el$, createComponent(Button$1, {
|
|
51654
51974
|
icon: "file-up",
|
|
51655
51975
|
get active() {
|
|
@@ -51674,7 +51994,7 @@ function MetricGroup(props) {
|
|
|
51674
51994
|
}), null);
|
|
51675
51995
|
return _el$;
|
|
51676
51996
|
})(), (() => {
|
|
51677
|
-
var _el$2 = _tmpl$2$
|
|
51997
|
+
var _el$2 = _tmpl$2$7();
|
|
51678
51998
|
insert(_el$2, createComponent(NumberField, {
|
|
51679
51999
|
"class": "oasis-editor-tool-metric",
|
|
51680
52000
|
labelClass: "oasis-editor-tool-metric-label",
|
|
@@ -51776,7 +52096,7 @@ function MetricGroup(props) {
|
|
|
51776
52096
|
}
|
|
51777
52097
|
});
|
|
51778
52098
|
}
|
|
51779
|
-
var _tmpl$$
|
|
52099
|
+
var _tmpl$$9 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel-section oasis-editor-section-panel-section">`);
|
|
51780
52100
|
function SectionGroup(props) {
|
|
51781
52101
|
const t = useI18n();
|
|
51782
52102
|
const api = props.api;
|
|
@@ -51793,7 +52113,7 @@ function SectionGroup(props) {
|
|
|
51793
52113
|
keepMounted: true,
|
|
51794
52114
|
get children() {
|
|
51795
52115
|
return [(() => {
|
|
51796
|
-
var _el$ = _tmpl$$
|
|
52116
|
+
var _el$ = _tmpl$$9();
|
|
51797
52117
|
insert(_el$, createComponent(Button$1, {
|
|
51798
52118
|
icon: "rectangle-vertical",
|
|
51799
52119
|
get label() {
|
|
@@ -51832,7 +52152,7 @@ function SectionGroup(props) {
|
|
|
51832
52152
|
}), null);
|
|
51833
52153
|
return _el$;
|
|
51834
52154
|
})(), (() => {
|
|
51835
|
-
var _el$2 = _tmpl$$
|
|
52155
|
+
var _el$2 = _tmpl$$9();
|
|
51836
52156
|
insert(_el$2, createComponent(Button$1, {
|
|
51837
52157
|
icon: "scissors",
|
|
51838
52158
|
get label() {
|
|
@@ -51922,7 +52242,7 @@ function marginsMatchPreset(margins, preset) {
|
|
|
51922
52242
|
const target = presetMarginsPx(preset);
|
|
51923
52243
|
return Math.abs(margins.top - target.top) <= 1 && Math.abs(margins.bottom - target.bottom) <= 1 && Math.abs(margins.left - target.left) <= 1 && Math.abs(margins.right - target.right) <= 1;
|
|
51924
52244
|
}
|
|
51925
|
-
var _tmpl$$
|
|
52245
|
+
var _tmpl$$8 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-list>`), _tmpl$2$6 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-form>`), _tmpl$3$6 = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-list-options><button type=button class=oasis-editor-margins-custom-toggle data-testid=editor-toolbar-margins-custom><i data-lucide=sliders-horizontal></i><span>`), _tmpl$4$4 = /* @__PURE__ */ template(`<div class=oasis-editor-margins-custom-actions><button type=button class=oasis-editor-margins-custom-apply data-testid=editor-toolbar-margins-custom-apply>`), _tmpl$5$3 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-margins-item><span class=oasis-editor-margins-item-name></span><span class=oasis-editor-margins-item-values><br>`), _tmpl$6$2 = /* @__PURE__ */ template(`<label class=oasis-editor-margins-custom-field><span></span><input type=number min=0 step=0.1>`);
|
|
51926
52246
|
const FIELDS = [{
|
|
51927
52247
|
key: "top",
|
|
51928
52248
|
labelKey: "section.marginField.top"
|
|
@@ -51992,11 +52312,11 @@ function MarginsGroup(props) {
|
|
|
51992
52312
|
keepMounted: true,
|
|
51993
52313
|
get children() {
|
|
51994
52314
|
return [(() => {
|
|
51995
|
-
var _el$ = _tmpl$$
|
|
52315
|
+
var _el$ = _tmpl$$8();
|
|
51996
52316
|
insert(_el$, createComponent(For, {
|
|
51997
52317
|
each: MARGIN_PRESETS,
|
|
51998
52318
|
children: (preset) => (() => {
|
|
51999
|
-
var _el$9 = _tmpl$5$
|
|
52319
|
+
var _el$9 = _tmpl$5$3(), _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild;
|
|
52000
52320
|
_el$9.$$click = () => applyPreset(preset);
|
|
52001
52321
|
insert(_el$0, () => t(preset.labelKey));
|
|
52002
52322
|
insert(_el$1, () => `${t("section.marginField.top")} ${formatCm(preset.top)} ${t("section.marginField.bottom")} ${formatCm(preset.bottom)}`, _el$10);
|
|
@@ -52017,7 +52337,7 @@ function MarginsGroup(props) {
|
|
|
52017
52337
|
}));
|
|
52018
52338
|
return _el$;
|
|
52019
52339
|
})(), (() => {
|
|
52020
|
-
var _el$2 = _tmpl$3$
|
|
52340
|
+
var _el$2 = _tmpl$3$6(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
|
|
52021
52341
|
_el$3.$$click = openCustom;
|
|
52022
52342
|
insert(_el$5, () => t("section.marginPreset.custom"));
|
|
52023
52343
|
insert(_el$2, createComponent(Show, {
|
|
@@ -52025,11 +52345,11 @@ function MarginsGroup(props) {
|
|
|
52025
52345
|
return showCustom();
|
|
52026
52346
|
},
|
|
52027
52347
|
get children() {
|
|
52028
|
-
var _el$6 = _tmpl$2$
|
|
52348
|
+
var _el$6 = _tmpl$2$6();
|
|
52029
52349
|
insert(_el$6, createComponent(For, {
|
|
52030
52350
|
each: FIELDS,
|
|
52031
52351
|
children: (field) => (() => {
|
|
52032
|
-
var _el$11 = _tmpl$6$
|
|
52352
|
+
var _el$11 = _tmpl$6$2(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
|
|
52033
52353
|
insert(_el$12, () => t(field.labelKey));
|
|
52034
52354
|
_el$13.$$input = (e) => setDraft((d) => ({
|
|
52035
52355
|
...d,
|
|
@@ -52048,7 +52368,7 @@ function MarginsGroup(props) {
|
|
|
52048
52368
|
return showCustom();
|
|
52049
52369
|
},
|
|
52050
52370
|
get children() {
|
|
52051
|
-
var _el$7 = _tmpl$4$
|
|
52371
|
+
var _el$7 = _tmpl$4$4(), _el$8 = _el$7.firstChild;
|
|
52052
52372
|
_el$8.$$click = applyCustom;
|
|
52053
52373
|
insert(_el$8, () => t("section.marginApply"));
|
|
52054
52374
|
return _el$7;
|
|
@@ -52554,7 +52874,7 @@ function shapeLabel(preset, locale) {
|
|
|
52554
52874
|
var _a2;
|
|
52555
52875
|
return ((_a2 = SHAPE_LABELS[preset]) == null ? void 0 : _a2[locale]) ?? preset;
|
|
52556
52876
|
}
|
|
52557
|
-
var _tmpl$$
|
|
52877
|
+
var _tmpl$$7 = /* @__PURE__ */ template(`<svg class=oasis-editor-shape-thumb viewBox="0 0 22 22"width=22 height=22 aria-hidden=true><path stroke=currentColor stroke-width=1 stroke-linejoin=round stroke-linecap=round vector-effect=non-scaling-stroke>`);
|
|
52558
52878
|
const PREVIEW_W = 22;
|
|
52559
52879
|
const PREVIEW_H = 22;
|
|
52560
52880
|
const PREVIEW_PAD = 2;
|
|
@@ -52585,7 +52905,7 @@ function ShapeThumbnail(props) {
|
|
|
52585
52905
|
const d = () => presetToSvgPath(props.preset, PREVIEW_PAD, PREVIEW_PAD, PREVIEW_W - PREVIEW_PAD * 2, PREVIEW_H - PREVIEW_PAD * 2);
|
|
52586
52906
|
const strokeOnly = () => STROKE_ONLY_PRESETS.has(props.preset);
|
|
52587
52907
|
return (() => {
|
|
52588
|
-
var _el$ = _tmpl$$
|
|
52908
|
+
var _el$ = _tmpl$$7(), _el$2 = _el$.firstChild;
|
|
52589
52909
|
createRenderEffect((_p$) => {
|
|
52590
52910
|
var _v$ = d(), _v$2 = strokeOnly() ? "none" : "currentColor", _v$3 = strokeOnly() ? void 0 : "0.18";
|
|
52591
52911
|
_v$ !== _p$.e && setAttribute(_el$2, "d", _p$.e = _v$);
|
|
@@ -52626,7 +52946,7 @@ function pushRecentShape(preset) {
|
|
|
52626
52946
|
}
|
|
52627
52947
|
return next;
|
|
52628
52948
|
}
|
|
52629
|
-
var _tmpl$$
|
|
52949
|
+
var _tmpl$$6 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-shape-gallery-tile>`), _tmpl$2$5 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-section-header>`), _tmpl$3$5 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery-grid>`), _tmpl$4$3 = /* @__PURE__ */ template(`<div class=oasis-editor-shape-gallery>`);
|
|
52630
52950
|
function ShapeGallery(props) {
|
|
52631
52951
|
const t = useI18n();
|
|
52632
52952
|
const locale = () => t("locale.id") === "en" ? "en" : "pt-BR";
|
|
@@ -52637,7 +52957,7 @@ function ShapeGallery(props) {
|
|
|
52637
52957
|
props.api.focusEditor();
|
|
52638
52958
|
};
|
|
52639
52959
|
const Tile = (tileProps) => (() => {
|
|
52640
|
-
var _el$ = _tmpl$$
|
|
52960
|
+
var _el$ = _tmpl$$6();
|
|
52641
52961
|
_el$.$$click = () => insert$1(tileProps.preset);
|
|
52642
52962
|
insert(_el$, createComponent(ShapeThumbnail, {
|
|
52643
52963
|
get preset() {
|
|
@@ -52658,18 +52978,18 @@ function ShapeGallery(props) {
|
|
|
52658
52978
|
return _el$;
|
|
52659
52979
|
})();
|
|
52660
52980
|
return (() => {
|
|
52661
|
-
var _el$2 = _tmpl$4$
|
|
52981
|
+
var _el$2 = _tmpl$4$3();
|
|
52662
52982
|
insert(_el$2, createComponent(Show, {
|
|
52663
52983
|
get when() {
|
|
52664
52984
|
return recent().length > 0;
|
|
52665
52985
|
},
|
|
52666
52986
|
get children() {
|
|
52667
52987
|
return [(() => {
|
|
52668
|
-
var _el$3 = _tmpl$2$
|
|
52988
|
+
var _el$3 = _tmpl$2$5();
|
|
52669
52989
|
insert(_el$3, () => t("toolbar.shapes.recentlyUsed"));
|
|
52670
52990
|
return _el$3;
|
|
52671
52991
|
})(), (() => {
|
|
52672
|
-
var _el$4 = _tmpl$3$
|
|
52992
|
+
var _el$4 = _tmpl$3$5();
|
|
52673
52993
|
insert(_el$4, createComponent(For, {
|
|
52674
52994
|
get each() {
|
|
52675
52995
|
return recent();
|
|
@@ -52685,11 +53005,11 @@ function ShapeGallery(props) {
|
|
|
52685
53005
|
insert(_el$2, createComponent(For, {
|
|
52686
53006
|
each: SHAPE_CATEGORIES,
|
|
52687
53007
|
children: (category) => [(() => {
|
|
52688
|
-
var _el$5 = _tmpl$2$
|
|
53008
|
+
var _el$5 = _tmpl$2$5();
|
|
52689
53009
|
insert(_el$5, () => t(category.headerKey));
|
|
52690
53010
|
return _el$5;
|
|
52691
53011
|
})(), (() => {
|
|
52692
|
-
var _el$6 = _tmpl$3$
|
|
53012
|
+
var _el$6 = _tmpl$3$5();
|
|
52693
53013
|
insert(_el$6, createComponent(For, {
|
|
52694
53014
|
get each() {
|
|
52695
53015
|
return category.presets;
|
|
@@ -52778,7 +53098,7 @@ function rememberSymbol(character) {
|
|
|
52778
53098
|
)
|
|
52779
53099
|
].slice(0, MAX_RECENT_SYMBOLS);
|
|
52780
53100
|
}
|
|
52781
|
-
var _tmpl$$
|
|
53101
|
+
var _tmpl$$5 = /* @__PURE__ */ template(`<div class=oasis-editor-symbol-menu-actions><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-equation><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-symbol><span></span></button><button type=button class=oasis-editor-symbol-menu-action data-testid=editor-toolbar-number><span>`), _tmpl$2$4 = /* @__PURE__ */ template(`<div class=oasis-editor-symbol-picker><div class=oasis-editor-symbol-picker-header><button type=button class=oasis-editor-symbol-back></button><span></span></div><div class=oasis-editor-symbol-grid></div><button type=button class=oasis-editor-symbol-more data-testid=editor-toolbar-more-symbols><span>`), _tmpl$3$4 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-symbol-tile>`);
|
|
52782
53102
|
function SymbolMenu(props) {
|
|
52783
53103
|
const t = useI18n();
|
|
52784
53104
|
const [view, setView] = createSignal("root");
|
|
@@ -52839,7 +53159,7 @@ function SymbolMenu(props) {
|
|
|
52839
53159
|
},
|
|
52840
53160
|
get fallback() {
|
|
52841
53161
|
return (() => {
|
|
52842
|
-
var _el$8 = _tmpl$2$
|
|
53162
|
+
var _el$8 = _tmpl$2$4(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild;
|
|
52843
53163
|
_el$0.$$click = (event) => {
|
|
52844
53164
|
event.stopPropagation();
|
|
52845
53165
|
setView("root");
|
|
@@ -52853,7 +53173,7 @@ function SymbolMenu(props) {
|
|
|
52853
53173
|
return entriesForView();
|
|
52854
53174
|
},
|
|
52855
53175
|
children: (entry) => (() => {
|
|
52856
|
-
var _el$13 = _tmpl$3$
|
|
53176
|
+
var _el$13 = _tmpl$3$4();
|
|
52857
53177
|
_el$13.$$click = () => insert$1(entry);
|
|
52858
53178
|
insert(_el$13, () => entry.character);
|
|
52859
53179
|
createRenderEffect((_p$) => {
|
|
@@ -52892,7 +53212,7 @@ function SymbolMenu(props) {
|
|
|
52892
53212
|
})();
|
|
52893
53213
|
},
|
|
52894
53214
|
get children() {
|
|
52895
|
-
var _el$ = _tmpl$$
|
|
53215
|
+
var _el$ = _tmpl$$5(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling, _el$7 = _el$6.firstChild;
|
|
52896
53216
|
_el$2.$$click = (event) => {
|
|
52897
53217
|
event.stopPropagation();
|
|
52898
53218
|
if (props.api.commands.canExecute("openEquationDialog")) {
|
|
@@ -52935,7 +53255,7 @@ function SymbolMenu(props) {
|
|
|
52935
53255
|
});
|
|
52936
53256
|
}
|
|
52937
53257
|
delegateEvents(["click"]);
|
|
52938
|
-
var _tmpl$$
|
|
53258
|
+
var _tmpl$$4 = /* @__PURE__ */ template(`<i>`), _tmpl$2$3 = /* @__PURE__ */ template(`<div class=oasis-editor-table-style-grid>`), _tmpl$3$3 = /* @__PURE__ */ template(`<div class=oasis-editor-table-style-gallery><div class=oasis-editor-table-style-strip role=listbox>`);
|
|
52939
53259
|
const tableStyles = (styles) => styles.filter((style2) => style2.type === "table").map((style2, index) => ({
|
|
52940
53260
|
style: style2,
|
|
52941
53261
|
index
|
|
@@ -53029,7 +53349,7 @@ function TableStyleGallery(props) {
|
|
|
53029
53349
|
};
|
|
53030
53350
|
},
|
|
53031
53351
|
get children() {
|
|
53032
|
-
return [_tmpl$$
|
|
53352
|
+
return [_tmpl$$4(), _tmpl$$4(), _tmpl$$4(), _tmpl$$4(), _tmpl$$4(), _tmpl$$4(), _tmpl$$4(), _tmpl$$4(), _tmpl$$4()];
|
|
53033
53353
|
}
|
|
53034
53354
|
});
|
|
53035
53355
|
}
|
|
@@ -53061,7 +53381,7 @@ function TableStyleGallery(props) {
|
|
|
53061
53381
|
return panelTestId();
|
|
53062
53382
|
},
|
|
53063
53383
|
trigger: (popover) => (() => {
|
|
53064
|
-
var _el$1 = _tmpl$3$
|
|
53384
|
+
var _el$1 = _tmpl$3$3(), _el$10 = _el$1.firstChild;
|
|
53065
53385
|
var _ref$ = popover.ref;
|
|
53066
53386
|
typeof _ref$ === "function" ? use(_ref$, _el$1) : popover.ref = _el$1;
|
|
53067
53387
|
insert(_el$10, cards);
|
|
@@ -53085,7 +53405,7 @@ function TableStyleGallery(props) {
|
|
|
53085
53405
|
return _el$1;
|
|
53086
53406
|
})(),
|
|
53087
53407
|
get children() {
|
|
53088
|
-
var _el$0 = _tmpl$2$
|
|
53408
|
+
var _el$0 = _tmpl$2$3();
|
|
53089
53409
|
_el$0.$$keydown = onPanelKeyDown;
|
|
53090
53410
|
insert(_el$0, cards);
|
|
53091
53411
|
return _el$0;
|
|
@@ -53095,7 +53415,7 @@ function TableStyleGallery(props) {
|
|
|
53095
53415
|
});
|
|
53096
53416
|
}
|
|
53097
53417
|
delegateEvents(["keydown"]);
|
|
53098
|
-
var _tmpl$$
|
|
53418
|
+
var _tmpl$$3 = /* @__PURE__ */ template(`<div class=oasis-editor-table-style-options role=group>`);
|
|
53099
53419
|
const OPTIONS = [{
|
|
53100
53420
|
command: "tableToggleHeaderRow",
|
|
53101
53421
|
label: "table.headerRow"
|
|
@@ -53117,7 +53437,7 @@ const OPTIONS = [{
|
|
|
53117
53437
|
}];
|
|
53118
53438
|
function TableStyleOptions(props) {
|
|
53119
53439
|
return (() => {
|
|
53120
|
-
var _el$ = _tmpl$$
|
|
53440
|
+
var _el$ = _tmpl$$3();
|
|
53121
53441
|
insert(_el$, createComponent(For, {
|
|
53122
53442
|
each: OPTIONS,
|
|
53123
53443
|
children: (option) => {
|
|
@@ -53142,7 +53462,7 @@ function TableStyleOptions(props) {
|
|
|
53142
53462
|
return _el$;
|
|
53143
53463
|
})();
|
|
53144
53464
|
}
|
|
53145
|
-
var _tmpl$$
|
|
53465
|
+
var _tmpl$$2 = /* @__PURE__ */ template(`<svg class=oasis-editor-table-border-preset-icon viewBox="0 0 20 20"aria-hidden=true><rect x=2 y=2 width=16 height=16 fill=none stroke=currentColor stroke-opacity=.45 stroke-dasharray="1.5 1.5">`), _tmpl$2$2 = /* @__PURE__ */ template(`<svg><path d="M2 2h16"></svg>`, false, true, false), _tmpl$3$2 = /* @__PURE__ */ template(`<svg><path d="M2 18h16"></svg>`, false, true, false), _tmpl$4$2 = /* @__PURE__ */ template(`<svg><path d="M2 2v16"></svg>`, false, true, false), _tmpl$5$2 = /* @__PURE__ */ template(`<svg><path d="M18 2v16"></svg>`, false, true, false), _tmpl$6$1 = /* @__PURE__ */ template(`<svg><path d="M2 10h16"></svg>`, false, true, false), _tmpl$7$1 = /* @__PURE__ */ template(`<svg><path d="M10 2v16"></svg>`, false, true, false), _tmpl$8$1 = /* @__PURE__ */ template(`<svg><path d="M2 2l16 16"></svg>`, false, true, false), _tmpl$9$1 = /* @__PURE__ */ template(`<svg><path d="M2 18 18 2"></svg>`, false, true, false), _tmpl$0$1 = /* @__PURE__ */ template(`<div class=oasis-editor-table-borders-divider>`), _tmpl$1 = /* @__PURE__ */ template(`<div class=oasis-editor-table-borders-section>`);
|
|
53146
53466
|
const GROUPS = [[{
|
|
53147
53467
|
preset: "bottom",
|
|
53148
53468
|
label: "Borda Inferior"
|
|
@@ -53183,9 +53503,9 @@ const GROUPS = [[{
|
|
|
53183
53503
|
function Preview(props) {
|
|
53184
53504
|
const p = props.preset;
|
|
53185
53505
|
return (() => {
|
|
53186
|
-
var _el$ = _tmpl$$
|
|
53506
|
+
var _el$ = _tmpl$$2();
|
|
53187
53507
|
_el$.firstChild;
|
|
53188
|
-
insert(_el$, p !== "none" && [memo(() => memo(() => !!["all", "outside", "top"].includes(p))() && _tmpl$2$
|
|
53508
|
+
insert(_el$, p !== "none" && [memo(() => memo(() => !!["all", "outside", "top"].includes(p))() && _tmpl$2$2()), memo(() => memo(() => !!["all", "outside", "bottom"].includes(p))() && _tmpl$3$2()), memo(() => memo(() => !!["all", "outside", "left"].includes(p))() && _tmpl$4$2()), memo(() => memo(() => !!["all", "outside", "right"].includes(p))() && _tmpl$5$2()), memo(() => memo(() => !!["all", "inside", "insideHorizontal"].includes(p))() && _tmpl$6$1()), memo(() => memo(() => !!["all", "inside", "insideVertical"].includes(p))() && _tmpl$7$1()), p === "diagonalDown" && _tmpl$8$1(), p === "diagonalUp" && _tmpl$9$1()], null);
|
|
53189
53509
|
return _el$;
|
|
53190
53510
|
})();
|
|
53191
53511
|
}
|
|
@@ -53255,11 +53575,11 @@ function TableBordersMenu(props) {
|
|
|
53255
53575
|
}), null);
|
|
53256
53576
|
insert(_el$10, (() => {
|
|
53257
53577
|
var _c$ = memo(() => index() < GROUPS.length - 1);
|
|
53258
|
-
return () => _c$() && _tmpl$0();
|
|
53578
|
+
return () => _c$() && _tmpl$0$1();
|
|
53259
53579
|
})(), null);
|
|
53260
53580
|
return _el$10;
|
|
53261
53581
|
})()
|
|
53262
|
-
}), _tmpl$0(), createComponent(SurfaceButton, {
|
|
53582
|
+
}), _tmpl$0$1(), createComponent(SurfaceButton, {
|
|
53263
53583
|
"class": "oasis-editor-table-borders-action",
|
|
53264
53584
|
role: "menuitem",
|
|
53265
53585
|
label: "Linha Horizontal",
|
|
@@ -53320,6 +53640,406 @@ function TableBordersMenu(props) {
|
|
|
53320
53640
|
}
|
|
53321
53641
|
});
|
|
53322
53642
|
}
|
|
53643
|
+
var _tmpl$$1 = /* @__PURE__ */ template(`<div class=oasis-editor-design-gallery role=dialog><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-theme-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-option-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-option-grid role=listbox></div></section><div class=oasis-editor-design-gallery-columns><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-compact-grid role=listbox></div></section><section class=oasis-editor-design-gallery-section><h3></h3><div class=oasis-editor-design-compact-grid role=listbox>`), _tmpl$2$1 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-design-theme-card role=option><span class=oasis-editor-design-theme-preview><strong>Aa</strong><span>Lorem ipsum</span><i></i><i></i></span><span>`), _tmpl$3$1 = /* @__PURE__ */ template(`<p class=oasis-editor-design-preview-note> · `), _tmpl$4$1 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-design-option-card role=option><span class=oasis-editor-design-swatch-row></span><span>`), _tmpl$5$1 = /* @__PURE__ */ template(`<i>`), _tmpl$6 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-design-option-card oasis-editor-design-font-card"role=option><strong>Título</strong><span>Texto normal`), _tmpl$7 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-design-list-card><strong></strong><small>`), _tmpl$8 = /* @__PURE__ */ template(`<div class=oasis-editor-design-background-panel><h3></h3><div class=oasis-editor-design-presets></div><label><input></label><div class=oasis-editor-design-fields><label><input type=color></label><label><input type=number min=0 max=1 step=0.05></label><label><input type=number min=0.1 max=5 step=0.1></label><label><input type=number min=-180 max=180></label><label><input></label><label><input type=number min=8 max=240></label></div><div class=oasis-editor-design-actions><button type=button></button><label class=oasis-editor-design-file><input type=file accept=image/png,image/jpeg,image/gif,image/svg+xml></label><button type=button>`), _tmpl$9 = /* @__PURE__ */ template(`<button type=button>`), _tmpl$0 = /* @__PURE__ */ template(`<div class=oasis-editor-design-background-panel><h3></h3><div class=oasis-editor-design-border-preview>Página</div><div class=oasis-editor-design-fields><label><select><option value=single>Simples</option><option value=double>Dupla</option><option value=dashed>Tracejada</option><option value=dotted>Pontilhada</option></select></label><label><input type=color></label><label><input type=number min=1 max=12></label><label><input type=number min=0 max=144></label></div><div class=oasis-editor-design-actions><button type=button></button><button type=button>`);
|
|
53644
|
+
const THEMES = [{
|
|
53645
|
+
id: "oasis",
|
|
53646
|
+
label: "Oasis",
|
|
53647
|
+
colors: ["#0f766e", "#14b8a6", "#f0fdfa", "#1f2937"],
|
|
53648
|
+
heading: "Aptos Display",
|
|
53649
|
+
body: "Aptos"
|
|
53650
|
+
}, {
|
|
53651
|
+
id: "office",
|
|
53652
|
+
label: "Office",
|
|
53653
|
+
colors: ["#4472c4", "#5b9bd5", "#deebf7", "#1f2937"],
|
|
53654
|
+
heading: "Calibri Light",
|
|
53655
|
+
body: "Calibri"
|
|
53656
|
+
}, {
|
|
53657
|
+
id: "facet",
|
|
53658
|
+
label: "Facet",
|
|
53659
|
+
colors: ["#8064a2", "#c4a7e7", "#eee8f5", "#262626"],
|
|
53660
|
+
heading: "Georgia",
|
|
53661
|
+
body: "Georgia"
|
|
53662
|
+
}, {
|
|
53663
|
+
id: "integral",
|
|
53664
|
+
label: "Integral",
|
|
53665
|
+
colors: ["#70ad47", "#a9d18e", "#e2f0d9", "#1f2937"],
|
|
53666
|
+
heading: "Calibri Light",
|
|
53667
|
+
body: "Calibri"
|
|
53668
|
+
}, {
|
|
53669
|
+
id: "ion",
|
|
53670
|
+
label: "Ion",
|
|
53671
|
+
colors: ["#ed7d31", "#f4b183", "#fce4d6", "#262626"],
|
|
53672
|
+
heading: "Garamond",
|
|
53673
|
+
body: "Garamond"
|
|
53674
|
+
}, {
|
|
53675
|
+
id: "retrospect",
|
|
53676
|
+
label: "Retrospect",
|
|
53677
|
+
colors: ["#5b9bd5", "#9dc3e6", "#deebf7", "#1f2937"],
|
|
53678
|
+
heading: "Georgia",
|
|
53679
|
+
body: "Aptos"
|
|
53680
|
+
}];
|
|
53681
|
+
const COLOR_SCHEMES = [{
|
|
53682
|
+
id: "oasis",
|
|
53683
|
+
label: "Oasis",
|
|
53684
|
+
colors: ["#0f766e", "#14b8a6", "#f0fdfa", "#1f2937"]
|
|
53685
|
+
}, {
|
|
53686
|
+
id: "office",
|
|
53687
|
+
label: "Office",
|
|
53688
|
+
colors: ["#4472c4", "#ed7d31", "#a5a5a5", "#ffc000"]
|
|
53689
|
+
}, {
|
|
53690
|
+
id: "monochrome",
|
|
53691
|
+
label: "Monocromático",
|
|
53692
|
+
colors: ["#111827", "#4b5563", "#9ca3af", "#e5e7eb"]
|
|
53693
|
+
}, {
|
|
53694
|
+
id: "warm",
|
|
53695
|
+
label: "Quente",
|
|
53696
|
+
colors: ["#9a3412", "#ea580c", "#f59e0b", "#fef3c7"]
|
|
53697
|
+
}];
|
|
53698
|
+
const FONT_SCHEMES = [{
|
|
53699
|
+
id: "aptos",
|
|
53700
|
+
heading: "Aptos Display",
|
|
53701
|
+
body: "Aptos"
|
|
53702
|
+
}, {
|
|
53703
|
+
id: "calibri",
|
|
53704
|
+
heading: "Calibri Light",
|
|
53705
|
+
body: "Calibri"
|
|
53706
|
+
}, {
|
|
53707
|
+
id: "georgia",
|
|
53708
|
+
heading: "Georgia",
|
|
53709
|
+
body: "Georgia"
|
|
53710
|
+
}, {
|
|
53711
|
+
id: "garamond",
|
|
53712
|
+
heading: "Garamond",
|
|
53713
|
+
body: "Garamond"
|
|
53714
|
+
}];
|
|
53715
|
+
const SPACING = [{
|
|
53716
|
+
id: "compact",
|
|
53717
|
+
label: "Compacto",
|
|
53718
|
+
sample: "Antes 0 · Depois 4"
|
|
53719
|
+
}, {
|
|
53720
|
+
id: "tight",
|
|
53721
|
+
label: "Estreito",
|
|
53722
|
+
sample: "Antes 0 · Depois 6"
|
|
53723
|
+
}, {
|
|
53724
|
+
id: "open",
|
|
53725
|
+
label: "Aberto",
|
|
53726
|
+
sample: "Antes 0 · Depois 10"
|
|
53727
|
+
}, {
|
|
53728
|
+
id: "relaxed",
|
|
53729
|
+
label: "Relaxado",
|
|
53730
|
+
sample: "Antes 4 · Depois 12"
|
|
53731
|
+
}];
|
|
53732
|
+
const EFFECTS = [{
|
|
53733
|
+
id: "subtle",
|
|
53734
|
+
label: "Sutil",
|
|
53735
|
+
description: "Sombras leves"
|
|
53736
|
+
}, {
|
|
53737
|
+
id: "moderate",
|
|
53738
|
+
label: "Moderado",
|
|
53739
|
+
description: "Contraste equilibrado"
|
|
53740
|
+
}, {
|
|
53741
|
+
id: "intense",
|
|
53742
|
+
label: "Intenso",
|
|
53743
|
+
description: "Sombras marcantes"
|
|
53744
|
+
}, {
|
|
53745
|
+
id: "flat",
|
|
53746
|
+
label: "Plano",
|
|
53747
|
+
description: "Sem efeitos"
|
|
53748
|
+
}];
|
|
53749
|
+
function moveFocus(event, selector, columns) {
|
|
53750
|
+
var _a2;
|
|
53751
|
+
const current = event.currentTarget;
|
|
53752
|
+
const buttons = Array.from(current.querySelectorAll(selector));
|
|
53753
|
+
const index = buttons.indexOf(document.activeElement);
|
|
53754
|
+
if (index < 0) return;
|
|
53755
|
+
const moves = {
|
|
53756
|
+
ArrowLeft: index - 1,
|
|
53757
|
+
ArrowRight: index + 1,
|
|
53758
|
+
ArrowUp: index - columns,
|
|
53759
|
+
ArrowDown: index + columns,
|
|
53760
|
+
Home: 0,
|
|
53761
|
+
End: buttons.length - 1
|
|
53762
|
+
};
|
|
53763
|
+
const next = moves[event.key];
|
|
53764
|
+
if (next === void 0) return;
|
|
53765
|
+
event.preventDefault();
|
|
53766
|
+
(_a2 = buttons[Math.max(0, Math.min(buttons.length - 1, next))]) == null ? void 0 : _a2.focus();
|
|
53767
|
+
}
|
|
53768
|
+
function DesignGallery(props) {
|
|
53769
|
+
const [previewTheme, setPreviewTheme] = createSignal(null);
|
|
53770
|
+
const apply = (command, payload) => {
|
|
53771
|
+
props.api.commands.execute(command, payload);
|
|
53772
|
+
props.api.focusEditor();
|
|
53773
|
+
};
|
|
53774
|
+
const selectedTheme = createMemo(() => String(props.api.commands.state("applyDocumentTheme").value ?? ""));
|
|
53775
|
+
const selectedColors = createMemo(() => String(props.api.commands.state("setDocumentColorScheme").value ?? ""));
|
|
53776
|
+
const selectedFonts = createMemo(() => String(props.api.commands.state("setDocumentFontScheme").value ?? ""));
|
|
53777
|
+
const selectedSpacing = createMemo(() => String(props.api.commands.state("setDocumentParagraphSpacing").value ?? ""));
|
|
53778
|
+
const selectedEffects = createMemo(() => String(props.api.commands.state("setDocumentEffects").value ?? ""));
|
|
53779
|
+
return (() => {
|
|
53780
|
+
var _el$ = _tmpl$$1(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$10.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling;
|
|
53781
|
+
insert(_el$3, () => props.api.t("design.themes"));
|
|
53782
|
+
_el$4.$$keydown = (event) => moveFocus(event, ".oasis-editor-design-theme-card", 3);
|
|
53783
|
+
insert(_el$4, createComponent(For, {
|
|
53784
|
+
each: THEMES,
|
|
53785
|
+
children: (theme) => (() => {
|
|
53786
|
+
var _el$16 = _tmpl$2$1(), _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling, _el$20 = _el$19.nextSibling, _el$21 = _el$20.nextSibling, _el$22 = _el$17.nextSibling;
|
|
53787
|
+
_el$16.$$click = () => apply("applyDocumentTheme", theme.id);
|
|
53788
|
+
_el$16.addEventListener("blur", () => setPreviewTheme(null));
|
|
53789
|
+
_el$16.addEventListener("focus", () => setPreviewTheme(theme.id));
|
|
53790
|
+
_el$16.addEventListener("mouseleave", () => setPreviewTheme(null));
|
|
53791
|
+
_el$16.addEventListener("mouseenter", () => setPreviewTheme(theme.id));
|
|
53792
|
+
insert(_el$22, () => theme.label);
|
|
53793
|
+
createRenderEffect((_p$) => {
|
|
53794
|
+
var _v$ = !!(selectedTheme() === theme.id), _v$2 = selectedTheme() === theme.id, _v$3 = `editor-toolbar-design-theme-${theme.id}`, _v$4 = theme.colors[2], _v$5 = theme.colors[1], _v$6 = theme.heading, _v$7 = theme.colors[3], _v$8 = theme.body, _v$9 = theme.colors[0], _v$0 = theme.colors[1];
|
|
53795
|
+
_v$ !== _p$.e && _el$16.classList.toggle("oasis-editor-design-card-active", _p$.e = _v$);
|
|
53796
|
+
_v$2 !== _p$.t && setAttribute(_el$16, "aria-selected", _p$.t = _v$2);
|
|
53797
|
+
_v$3 !== _p$.a && setAttribute(_el$16, "data-testid", _p$.a = _v$3);
|
|
53798
|
+
_v$4 !== _p$.o && setStyleProperty(_el$17, "background-color", _p$.o = _v$4);
|
|
53799
|
+
_v$5 !== _p$.i && setStyleProperty(_el$18, "color", _p$.i = _v$5);
|
|
53800
|
+
_v$6 !== _p$.n && setStyleProperty(_el$18, "font-family", _p$.n = _v$6);
|
|
53801
|
+
_v$7 !== _p$.s && setStyleProperty(_el$19, "color", _p$.s = _v$7);
|
|
53802
|
+
_v$8 !== _p$.h && setStyleProperty(_el$19, "font-family", _p$.h = _v$8);
|
|
53803
|
+
_v$9 !== _p$.r && setStyleProperty(_el$20, "background-color", _p$.r = _v$9);
|
|
53804
|
+
_v$0 !== _p$.d && setStyleProperty(_el$21, "background-color", _p$.d = _v$0);
|
|
53805
|
+
return _p$;
|
|
53806
|
+
}, {
|
|
53807
|
+
e: void 0,
|
|
53808
|
+
t: void 0,
|
|
53809
|
+
a: void 0,
|
|
53810
|
+
o: void 0,
|
|
53811
|
+
i: void 0,
|
|
53812
|
+
n: void 0,
|
|
53813
|
+
s: void 0,
|
|
53814
|
+
h: void 0,
|
|
53815
|
+
r: void 0,
|
|
53816
|
+
d: void 0
|
|
53817
|
+
});
|
|
53818
|
+
return _el$16;
|
|
53819
|
+
})()
|
|
53820
|
+
}));
|
|
53821
|
+
insert(_el$2, createComponent(Show, {
|
|
53822
|
+
get when() {
|
|
53823
|
+
return previewTheme();
|
|
53824
|
+
},
|
|
53825
|
+
children: (id) => {
|
|
53826
|
+
const theme = THEMES.find((item) => item.id === id());
|
|
53827
|
+
return (() => {
|
|
53828
|
+
var _el$23 = _tmpl$3$1(), _el$24 = _el$23.firstChild;
|
|
53829
|
+
insert(_el$23, () => theme == null ? void 0 : theme.heading, _el$24);
|
|
53830
|
+
insert(_el$23, () => theme == null ? void 0 : theme.body, null);
|
|
53831
|
+
return _el$23;
|
|
53832
|
+
})();
|
|
53833
|
+
}
|
|
53834
|
+
}), null);
|
|
53835
|
+
insert(_el$6, () => props.api.t("design.colors"));
|
|
53836
|
+
_el$7.$$keydown = (event) => moveFocus(event, ".oasis-editor-design-option-card", 4);
|
|
53837
|
+
insert(_el$7, createComponent(For, {
|
|
53838
|
+
each: COLOR_SCHEMES,
|
|
53839
|
+
children: (scheme) => (() => {
|
|
53840
|
+
var _el$25 = _tmpl$4$1(), _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling;
|
|
53841
|
+
_el$25.$$click = () => apply("setDocumentColorScheme", scheme.id);
|
|
53842
|
+
insert(_el$26, createComponent(For, {
|
|
53843
|
+
get each() {
|
|
53844
|
+
return scheme.colors;
|
|
53845
|
+
},
|
|
53846
|
+
children: (color) => (() => {
|
|
53847
|
+
var _el$28 = _tmpl$5$1();
|
|
53848
|
+
setStyleProperty(_el$28, "background-color", color);
|
|
53849
|
+
return _el$28;
|
|
53850
|
+
})()
|
|
53851
|
+
}));
|
|
53852
|
+
insert(_el$27, () => scheme.label);
|
|
53853
|
+
createRenderEffect((_p$) => {
|
|
53854
|
+
var _v$1 = !!(selectedColors() === scheme.id), _v$10 = selectedColors() === scheme.id, _v$11 = `editor-toolbar-design-color-${scheme.id}`;
|
|
53855
|
+
_v$1 !== _p$.e && _el$25.classList.toggle("oasis-editor-design-card-active", _p$.e = _v$1);
|
|
53856
|
+
_v$10 !== _p$.t && setAttribute(_el$25, "aria-selected", _p$.t = _v$10);
|
|
53857
|
+
_v$11 !== _p$.a && setAttribute(_el$25, "data-testid", _p$.a = _v$11);
|
|
53858
|
+
return _p$;
|
|
53859
|
+
}, {
|
|
53860
|
+
e: void 0,
|
|
53861
|
+
t: void 0,
|
|
53862
|
+
a: void 0
|
|
53863
|
+
});
|
|
53864
|
+
return _el$25;
|
|
53865
|
+
})()
|
|
53866
|
+
}));
|
|
53867
|
+
insert(_el$9, () => props.api.t("design.fonts"));
|
|
53868
|
+
_el$0.$$keydown = (event) => moveFocus(event, ".oasis-editor-design-font-card", 2);
|
|
53869
|
+
insert(_el$0, createComponent(For, {
|
|
53870
|
+
each: FONT_SCHEMES,
|
|
53871
|
+
children: (scheme) => (() => {
|
|
53872
|
+
var _el$29 = _tmpl$6(), _el$30 = _el$29.firstChild, _el$31 = _el$30.nextSibling;
|
|
53873
|
+
_el$29.$$click = () => apply("setDocumentFontScheme", scheme.id);
|
|
53874
|
+
createRenderEffect((_p$) => {
|
|
53875
|
+
var _v$12 = !!(selectedFonts() === scheme.id), _v$13 = selectedFonts() === scheme.id, _v$14 = `editor-toolbar-design-font-${scheme.id}`, _v$15 = scheme.heading, _v$16 = scheme.body;
|
|
53876
|
+
_v$12 !== _p$.e && _el$29.classList.toggle("oasis-editor-design-card-active", _p$.e = _v$12);
|
|
53877
|
+
_v$13 !== _p$.t && setAttribute(_el$29, "aria-selected", _p$.t = _v$13);
|
|
53878
|
+
_v$14 !== _p$.a && setAttribute(_el$29, "data-testid", _p$.a = _v$14);
|
|
53879
|
+
_v$15 !== _p$.o && setStyleProperty(_el$30, "font-family", _p$.o = _v$15);
|
|
53880
|
+
_v$16 !== _p$.i && setStyleProperty(_el$31, "font-family", _p$.i = _v$16);
|
|
53881
|
+
return _p$;
|
|
53882
|
+
}, {
|
|
53883
|
+
e: void 0,
|
|
53884
|
+
t: void 0,
|
|
53885
|
+
a: void 0,
|
|
53886
|
+
o: void 0,
|
|
53887
|
+
i: void 0
|
|
53888
|
+
});
|
|
53889
|
+
return _el$29;
|
|
53890
|
+
})()
|
|
53891
|
+
}));
|
|
53892
|
+
insert(_el$11, () => props.api.t("design.spacing"));
|
|
53893
|
+
insert(_el$12, createComponent(For, {
|
|
53894
|
+
each: SPACING,
|
|
53895
|
+
children: (option) => (() => {
|
|
53896
|
+
var _el$32 = _tmpl$7(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
|
|
53897
|
+
_el$32.$$click = () => apply("setDocumentParagraphSpacing", option.id);
|
|
53898
|
+
insert(_el$33, () => option.label);
|
|
53899
|
+
insert(_el$34, () => option.sample);
|
|
53900
|
+
createRenderEffect(() => _el$32.classList.toggle("oasis-editor-design-card-active", !!(selectedSpacing() === option.id)));
|
|
53901
|
+
return _el$32;
|
|
53902
|
+
})()
|
|
53903
|
+
}));
|
|
53904
|
+
insert(_el$14, () => props.api.t("design.effects"));
|
|
53905
|
+
insert(_el$15, createComponent(For, {
|
|
53906
|
+
each: EFFECTS,
|
|
53907
|
+
children: (option) => (() => {
|
|
53908
|
+
var _el$35 = _tmpl$7(), _el$36 = _el$35.firstChild, _el$37 = _el$36.nextSibling;
|
|
53909
|
+
_el$35.$$click = () => apply("setDocumentEffects", option.id);
|
|
53910
|
+
insert(_el$36, () => option.label);
|
|
53911
|
+
insert(_el$37, () => option.description);
|
|
53912
|
+
createRenderEffect(() => _el$35.classList.toggle("oasis-editor-design-card-active", !!(selectedEffects() === option.id)));
|
|
53913
|
+
return _el$35;
|
|
53914
|
+
})()
|
|
53915
|
+
}));
|
|
53916
|
+
createRenderEffect(() => setAttribute(_el$, "aria-label", props.api.t("design.themes")));
|
|
53917
|
+
return _el$;
|
|
53918
|
+
})();
|
|
53919
|
+
}
|
|
53920
|
+
function DesignWatermarkPanel(props) {
|
|
53921
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
53922
|
+
const current = () => props.api.commands.state("setDocumentWatermark").value ?? null;
|
|
53923
|
+
const [text2, setText] = createSignal(((_a2 = current()) == null ? void 0 : _a2.text) ?? "CONFIDENCIAL");
|
|
53924
|
+
const [color, setColor] = createSignal(((_b2 = current()) == null ? void 0 : _b2.color) ?? "#94a3b8");
|
|
53925
|
+
const [opacity, setOpacity] = createSignal(((_c = current()) == null ? void 0 : _c.opacity) ?? 0.25);
|
|
53926
|
+
const [scale, setScale] = createSignal(((_d = current()) == null ? void 0 : _d.scale) ?? 1);
|
|
53927
|
+
const [rotation, setRotation] = createSignal(((_e = current()) == null ? void 0 : _e.rotation) ?? -45);
|
|
53928
|
+
const [fontFamily, setFontFamily] = createSignal(((_f = current()) == null ? void 0 : _f.fontFamily) ?? "Arial");
|
|
53929
|
+
const [fontSize, setFontSize] = createSignal(((_g = current()) == null ? void 0 : _g.fontSize) ?? 48);
|
|
53930
|
+
const applyText = () => {
|
|
53931
|
+
props.api.commands.execute("setDocumentWatermark", {
|
|
53932
|
+
kind: "text",
|
|
53933
|
+
text: text2(),
|
|
53934
|
+
color: color(),
|
|
53935
|
+
opacity: opacity(),
|
|
53936
|
+
scale: scale(),
|
|
53937
|
+
rotation: rotation(),
|
|
53938
|
+
fontFamily: fontFamily(),
|
|
53939
|
+
fontSize: fontSize()
|
|
53940
|
+
});
|
|
53941
|
+
};
|
|
53942
|
+
const onImage = (event) => {
|
|
53943
|
+
var _a3;
|
|
53944
|
+
const file = (_a3 = event.currentTarget.files) == null ? void 0 : _a3[0];
|
|
53945
|
+
if (!file || !file.type.startsWith("image/")) return;
|
|
53946
|
+
const reader = new FileReader();
|
|
53947
|
+
reader.onload = () => {
|
|
53948
|
+
props.api.commands.execute("setDocumentWatermark", {
|
|
53949
|
+
kind: "image",
|
|
53950
|
+
src: String(reader.result),
|
|
53951
|
+
color: color(),
|
|
53952
|
+
opacity: opacity(),
|
|
53953
|
+
scale: scale(),
|
|
53954
|
+
rotation: rotation()
|
|
53955
|
+
});
|
|
53956
|
+
};
|
|
53957
|
+
reader.readAsDataURL(file);
|
|
53958
|
+
};
|
|
53959
|
+
return (() => {
|
|
53960
|
+
var _el$38 = _tmpl$8(), _el$39 = _el$38.firstChild, _el$40 = _el$39.nextSibling, _el$41 = _el$40.nextSibling, _el$42 = _el$41.firstChild, _el$43 = _el$41.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.firstChild, _el$46 = _el$44.nextSibling, _el$47 = _el$46.firstChild, _el$48 = _el$46.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$48.nextSibling, _el$51 = _el$50.firstChild, _el$52 = _el$50.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$52.nextSibling, _el$55 = _el$54.firstChild, _el$56 = _el$43.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling, _el$59 = _el$58.firstChild, _el$60 = _el$58.nextSibling;
|
|
53961
|
+
insert(_el$39, () => props.api.t("design.watermark"));
|
|
53962
|
+
insert(_el$40, createComponent(For, {
|
|
53963
|
+
each: ["CONFIDENCIAL", "RASCUNHO", "NÃO COPIAR"],
|
|
53964
|
+
children: (preset) => (() => {
|
|
53965
|
+
var _el$61 = _tmpl$9();
|
|
53966
|
+
_el$61.$$click = () => {
|
|
53967
|
+
setText(preset);
|
|
53968
|
+
applyText();
|
|
53969
|
+
};
|
|
53970
|
+
insert(_el$61, preset);
|
|
53971
|
+
return _el$61;
|
|
53972
|
+
})()
|
|
53973
|
+
}));
|
|
53974
|
+
insert(_el$41, () => props.api.t("design.text"), _el$42);
|
|
53975
|
+
_el$42.$$input = (event) => setText(event.currentTarget.value);
|
|
53976
|
+
insert(_el$44, () => props.api.t("design.color"), _el$45);
|
|
53977
|
+
_el$45.$$input = (event) => setColor(event.currentTarget.value);
|
|
53978
|
+
insert(_el$46, () => props.api.t("design.opacity"), _el$47);
|
|
53979
|
+
_el$47.$$input = (event) => setOpacity(Number(event.currentTarget.value));
|
|
53980
|
+
insert(_el$48, () => props.api.t("design.scale"), _el$49);
|
|
53981
|
+
_el$49.$$input = (event) => setScale(Number(event.currentTarget.value));
|
|
53982
|
+
insert(_el$50, () => props.api.t("design.rotation"), _el$51);
|
|
53983
|
+
_el$51.$$input = (event) => setRotation(Number(event.currentTarget.value));
|
|
53984
|
+
insert(_el$52, () => props.api.t("design.fontFamily"), _el$53);
|
|
53985
|
+
_el$53.$$input = (event) => setFontFamily(event.currentTarget.value);
|
|
53986
|
+
insert(_el$54, () => props.api.t("design.fontSize"), _el$55);
|
|
53987
|
+
_el$55.$$input = (event) => setFontSize(Number(event.currentTarget.value));
|
|
53988
|
+
_el$57.$$click = applyText;
|
|
53989
|
+
insert(_el$57, () => props.api.t("design.applyText"));
|
|
53990
|
+
insert(_el$58, () => props.api.t("design.useImage"), _el$59);
|
|
53991
|
+
_el$59.addEventListener("change", onImage);
|
|
53992
|
+
_el$60.$$click = () => props.api.commands.execute("setDocumentWatermark", null);
|
|
53993
|
+
insert(_el$60, () => props.api.t("design.remove"));
|
|
53994
|
+
createRenderEffect(() => _el$42.value = text2());
|
|
53995
|
+
createRenderEffect(() => _el$45.value = color());
|
|
53996
|
+
createRenderEffect(() => _el$47.value = opacity());
|
|
53997
|
+
createRenderEffect(() => _el$49.value = scale());
|
|
53998
|
+
createRenderEffect(() => _el$51.value = rotation());
|
|
53999
|
+
createRenderEffect(() => _el$53.value = fontFamily());
|
|
54000
|
+
createRenderEffect(() => _el$55.value = fontSize());
|
|
54001
|
+
return _el$38;
|
|
54002
|
+
})();
|
|
54003
|
+
}
|
|
54004
|
+
function DesignPageBorderPanel(props) {
|
|
54005
|
+
var _a2, _b2, _c, _d;
|
|
54006
|
+
const current = () => props.api.commands.state("setDocumentPageBorder").value ?? null;
|
|
54007
|
+
const [style2, setStyle] = createSignal(((_a2 = current()) == null ? void 0 : _a2.style) ?? "single");
|
|
54008
|
+
const [color, setColor] = createSignal(((_b2 = current()) == null ? void 0 : _b2.color) ?? "#64748b");
|
|
54009
|
+
const [width, setWidth] = createSignal(((_c = current()) == null ? void 0 : _c.width) ?? 1);
|
|
54010
|
+
const [distance, setDistance] = createSignal(((_d = current()) == null ? void 0 : _d.distance) ?? 24);
|
|
54011
|
+
const apply = () => {
|
|
54012
|
+
props.api.commands.execute("setDocumentPageBorder", {
|
|
54013
|
+
style: style2(),
|
|
54014
|
+
color: color(),
|
|
54015
|
+
width: width(),
|
|
54016
|
+
distance: distance()
|
|
54017
|
+
});
|
|
54018
|
+
};
|
|
54019
|
+
return (() => {
|
|
54020
|
+
var _el$62 = _tmpl$0(), _el$63 = _el$62.firstChild, _el$64 = _el$63.nextSibling, _el$65 = _el$64.nextSibling, _el$66 = _el$65.firstChild, _el$67 = _el$66.firstChild, _el$68 = _el$66.nextSibling, _el$69 = _el$68.firstChild, _el$70 = _el$68.nextSibling, _el$71 = _el$70.firstChild, _el$72 = _el$70.nextSibling, _el$73 = _el$72.firstChild, _el$74 = _el$65.nextSibling, _el$75 = _el$74.firstChild, _el$76 = _el$75.nextSibling;
|
|
54021
|
+
insert(_el$63, () => props.api.t("design.pageBorders"));
|
|
54022
|
+
insert(_el$66, () => props.api.t("design.borderStyle"), _el$67);
|
|
54023
|
+
_el$67.addEventListener("change", (event) => setStyle(event.currentTarget.value));
|
|
54024
|
+
insert(_el$68, () => props.api.t("design.color"), _el$69);
|
|
54025
|
+
_el$69.$$input = (event) => setColor(event.currentTarget.value);
|
|
54026
|
+
insert(_el$70, () => props.api.t("design.borderWidth"), _el$71);
|
|
54027
|
+
_el$71.$$input = (event) => setWidth(Number(event.currentTarget.value));
|
|
54028
|
+
insert(_el$72, () => props.api.t("design.distance"), _el$73);
|
|
54029
|
+
_el$73.$$input = (event) => setDistance(Number(event.currentTarget.value));
|
|
54030
|
+
_el$75.$$click = apply;
|
|
54031
|
+
insert(_el$75, () => props.api.t("design.apply"));
|
|
54032
|
+
_el$76.$$click = () => props.api.commands.execute("setDocumentPageBorder", null);
|
|
54033
|
+
insert(_el$76, () => props.api.t("design.remove"));
|
|
54034
|
+
createRenderEffect((_$p) => setStyleProperty(_el$64, "border", `${width()}px ${style2()} ${color()}`));
|
|
54035
|
+
createRenderEffect(() => _el$67.value = style2());
|
|
54036
|
+
createRenderEffect(() => _el$69.value = color());
|
|
54037
|
+
createRenderEffect(() => _el$71.value = width());
|
|
54038
|
+
createRenderEffect(() => _el$73.value = distance());
|
|
54039
|
+
return _el$62;
|
|
54040
|
+
})();
|
|
54041
|
+
}
|
|
54042
|
+
delegateEvents(["keydown", "click", "input"]);
|
|
53323
54043
|
var _tmpl$ = /* @__PURE__ */ template(`<div class=oasis-editor-image-size-field><div class=oasis-editor-image-size-icon aria-hidden=true>`), _tmpl$2 = /* @__PURE__ */ template(`<div class=oasis-editor-image-crop-flyout role=menu>`), _tmpl$3 = /* @__PURE__ */ template(`<div class="oasis-editor-image-crop-flyout oasis-editor-image-crop-ratio-flyout"role=menu>`), _tmpl$4 = /* @__PURE__ */ template(`<div class="oasis-editor-toolbar-panel oasis-editor-image-crop-menu"role=menu><div class=oasis-editor-toolbar-panel-separator role=separator></div><div class=oasis-editor-image-crop-menu-submenu-row></div><div class=oasis-editor-image-crop-menu-submenu-row>`), _tmpl$5 = /* @__PURE__ */ template(`<div class=oasis-editor-image-crop-ratio-group><div class=oasis-editor-image-crop-ratio-heading>`);
|
|
53324
54044
|
function cmValue(api, command) {
|
|
53325
54045
|
const value2 = api.commands.state(command).value;
|
|
@@ -54011,6 +54731,75 @@ const fontSizeOptions = (api) => {
|
|
|
54011
54731
|
};
|
|
54012
54732
|
function createDefaultToolbarPreset(t) {
|
|
54013
54733
|
const items = [];
|
|
54734
|
+
items.push({
|
|
54735
|
+
type: "menu",
|
|
54736
|
+
id: "editor-toolbar-design-themes",
|
|
54737
|
+
testId: "editor-toolbar-design-themes",
|
|
54738
|
+
tab: "design",
|
|
54739
|
+
group: "documentFormatting",
|
|
54740
|
+
row: 1,
|
|
54741
|
+
ribbonSize: "large",
|
|
54742
|
+
iconName: "palette",
|
|
54743
|
+
label: t("design.themes"),
|
|
54744
|
+
tooltip: t("design.themes"),
|
|
54745
|
+
panelClass: "oasis-editor-design-gallery-panel",
|
|
54746
|
+
content: { kind: "custom", render: (api) => DesignGallery({ api }) }
|
|
54747
|
+
});
|
|
54748
|
+
items.push({
|
|
54749
|
+
type: "button",
|
|
54750
|
+
id: "editor-toolbar-design-default",
|
|
54751
|
+
testId: "editor-toolbar-design-default",
|
|
54752
|
+
tab: "design",
|
|
54753
|
+
group: "documentFormatting",
|
|
54754
|
+
row: 2,
|
|
54755
|
+
iconName: "check",
|
|
54756
|
+
label: t("design.setDefault"),
|
|
54757
|
+
tooltip: t("design.setDefault"),
|
|
54758
|
+
command: "setDocumentDesignDefault"
|
|
54759
|
+
});
|
|
54760
|
+
items.push({
|
|
54761
|
+
type: "menu",
|
|
54762
|
+
id: "editor-toolbar-design-watermark",
|
|
54763
|
+
testId: "editor-toolbar-design-watermark",
|
|
54764
|
+
tab: "design",
|
|
54765
|
+
group: "pageBackground",
|
|
54766
|
+
row: 1,
|
|
54767
|
+
iconName: "droplets",
|
|
54768
|
+
label: t("design.watermark"),
|
|
54769
|
+
tooltip: t("design.watermark"),
|
|
54770
|
+
panelClass: "oasis-editor-design-background-panel-wrap",
|
|
54771
|
+
content: { kind: "custom", render: (api) => DesignWatermarkPanel({ api }) }
|
|
54772
|
+
});
|
|
54773
|
+
items.push({
|
|
54774
|
+
type: "colorPicker",
|
|
54775
|
+
id: "editor-toolbar-design-page-color",
|
|
54776
|
+
testId: "editor-toolbar-design-page-color",
|
|
54777
|
+
tab: "design",
|
|
54778
|
+
group: "pageBackground",
|
|
54779
|
+
row: 1,
|
|
54780
|
+
kind: "shading",
|
|
54781
|
+
command: "setDocumentPageColor",
|
|
54782
|
+
defaultValue: "#ffffff",
|
|
54783
|
+
label: t("design.pageColor"),
|
|
54784
|
+
tooltip: t("design.pageColor"),
|
|
54785
|
+
ribbonSize: "large"
|
|
54786
|
+
});
|
|
54787
|
+
items.push({
|
|
54788
|
+
type: "menu",
|
|
54789
|
+
id: "editor-toolbar-design-page-borders",
|
|
54790
|
+
testId: "editor-toolbar-design-page-borders",
|
|
54791
|
+
tab: "design",
|
|
54792
|
+
group: "pageBackground",
|
|
54793
|
+
row: 2,
|
|
54794
|
+
iconName: "frame",
|
|
54795
|
+
label: t("design.pageBorders"),
|
|
54796
|
+
tooltip: t("design.pageBorders"),
|
|
54797
|
+
panelClass: "oasis-editor-design-background-panel-wrap",
|
|
54798
|
+
content: {
|
|
54799
|
+
kind: "custom",
|
|
54800
|
+
render: (api) => DesignPageBorderPanel({ api })
|
|
54801
|
+
}
|
|
54802
|
+
});
|
|
54014
54803
|
items.push({
|
|
54015
54804
|
type: "button",
|
|
54016
54805
|
id: "editor-toolbar-new-document",
|