@simple-reporting/base 0.0.1
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/.github/workflows/npm-publish.yml +25 -0
- package/.nvmrc +1 -0
- package/.prettierrc +6 -0
- package/README.md +23 -0
- package/cli.js +114 -0
- package/dev/.ddev/config.yaml +279 -0
- package/dev/.ddev/nginx_full/custom.conf +12 -0
- package/dev/.env +1 -0
- package/dev/.env.development +1 -0
- package/dev/.eslintrc.cjs +15 -0
- package/dev/.nvmrc +1 -0
- package/dev/.prettierrc.json +8 -0
- package/dev/.vscode/extensions.json +3 -0
- package/dev/.vscode/settings.json +4 -0
- package/dev/README.md +45 -0
- package/dev/env.d.ts +1 -0
- package/dev/index.html +17 -0
- package/dev/ldd.html +7 -0
- package/dev/livingdocs/Media/image/app.scss +25 -0
- package/dev/livingdocs/Media/image/general.scss +11 -0
- package/dev/livingdocs/Media/image/image.html +46 -0
- package/dev/livingdocs/Media/image/ldd.scss +1 -0
- package/dev/livingdocs/Media/image/pdf.scss +1 -0
- package/dev/livingdocs/Media/image/print.scss +7 -0
- package/dev/livingdocs/Media/image/properties.json +41 -0
- package/dev/livingdocs/Media/image/web.scss +0 -0
- package/dev/livingdocs/Media/image/word.scss +1 -0
- package/dev/livingdocs/Properties/grid/app.scss +1 -0
- package/dev/livingdocs/Properties/grid/general.scss +95 -0
- package/dev/livingdocs/Properties/grid/ldd.scss +1 -0
- package/dev/livingdocs/Properties/grid/pdf.scss +1 -0
- package/dev/livingdocs/Properties/grid/print.scss +94 -0
- package/dev/livingdocs/Properties/grid/properties.json +68 -0
- package/dev/livingdocs/Properties/grid/web.scss +98 -0
- package/dev/livingdocs/Properties/grid/word.scss +1 -0
- package/dev/livingdocs/Text/paragraph/general.scss +9 -0
- package/dev/livingdocs/Text/paragraph/paragraph.html +22 -0
- package/dev/livingdocs/Titles/title-h1/general.scss +10 -0
- package/dev/livingdocs/Titles/title-h1/title-h1.html +16 -0
- package/dev/livingdocs/Titles/title-h2/app.scss +1 -0
- package/dev/livingdocs/Titles/title-h2/general.scss +13 -0
- package/dev/livingdocs/Titles/title-h2/ldd.scss +1 -0
- package/dev/livingdocs/Titles/title-h2/pdf.scss +1 -0
- package/dev/livingdocs/Titles/title-h2/print.scss +36 -0
- package/dev/livingdocs/Titles/title-h2/title-h2.html +24 -0
- package/dev/livingdocs/Titles/title-h2/web.scss +27 -0
- package/dev/livingdocs/Titles/title-h2/word.scss +1 -0
- package/dev/livingdocs/Titles/title-h3/app.scss +1 -0
- package/dev/livingdocs/Titles/title-h3/general.scss +13 -0
- package/dev/livingdocs/Titles/title-h3/ldd.scss +1 -0
- package/dev/livingdocs/Titles/title-h3/pdf.scss +1 -0
- package/dev/livingdocs/Titles/title-h3/print.scss +34 -0
- package/dev/livingdocs/Titles/title-h3/title-h3.html +24 -0
- package/dev/livingdocs/Titles/title-h3/web.scss +27 -0
- package/dev/livingdocs/Titles/title-h3/word.scss +1 -0
- package/dev/livingdocs/Titles/title-h4/app.scss +1 -0
- package/dev/livingdocs/Titles/title-h4/general.scss +13 -0
- package/dev/livingdocs/Titles/title-h4/ldd.scss +1 -0
- package/dev/livingdocs/Titles/title-h4/pdf.scss +1 -0
- package/dev/livingdocs/Titles/title-h4/print.scss +34 -0
- package/dev/livingdocs/Titles/title-h4/title-h4.html +24 -0
- package/dev/livingdocs/Titles/title-h4/web.scss +27 -0
- package/dev/livingdocs/Titles/title-h4/word.scss +1 -0
- package/dev/livingdocs/Titles/title-h5/general.scss +10 -0
- package/dev/livingdocs/Titles/title-h5/title-h5.html +16 -0
- package/dev/livingdocs/Titles/title-h6/general.scss +10 -0
- package/dev/livingdocs/Titles/title-h6/title-h6.html +16 -0
- package/dev/livingdocs.config.json +376 -0
- package/dev/nswow/ArticleAutoloader.ts +100 -0
- package/dev/nswow/ArticleLoader.ts +91 -0
- package/dev/nswow/colors.scss +3 -0
- package/dev/nswow/config.scss +13 -0
- package/dev/nswow/core-styles.scss +2 -0
- package/dev/nswow/fonts.scss +2 -0
- package/dev/nswow/grid.scss +2 -0
- package/dev/nswow/helpers.scss +2 -0
- package/dev/nswow/index.scss +9 -0
- package/dev/nswow/meta.scss +2 -0
- package/dev/nswow/spacer.scss +2 -0
- package/dev/nswow/system.scss +2 -0
- package/dev/nswow/typography.scss +3 -0
- package/dev/nswow.config.json +293 -0
- package/dev/package.json +61 -0
- package/dev/pdf/pdf-configuration-debug.xml +6 -0
- package/dev/pdf/pdf-configuration.xml +3 -0
- package/dev/pdf.ts +1 -0
- package/dev/public/.keep +0 -0
- package/dev/src/App.vue +44 -0
- package/dev/src/Autoload.ts +6 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-300.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-700.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-italic.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-regular.woff2 +0 -0
- package/dev/src/assets/images/mms-logo-black.svg +91 -0
- package/dev/src/assets/images/mms-logo-white.svg +105 -0
- package/dev/src/assets/scss/app.scss +39 -0
- package/dev/src/assets/scss/general.scss +17 -0
- package/dev/src/assets/scss/ldd.scss +27 -0
- package/dev/src/assets/scss/pdf.scss +2 -0
- package/dev/src/assets/scss/print.scss +1 -0
- package/dev/src/assets/scss/web.scss +1 -0
- package/dev/src/assets/scss/word.scss +2 -0
- package/dev/src/components/LanguageSwitch.vue +100 -0
- package/dev/src/components/MainNavigation.vue +209 -0
- package/dev/src/components/MenuItem/MenuArticle.vue +15 -0
- package/dev/src/components/MenuItem/MenuEntry.vue +26 -0
- package/dev/src/components/MenuItem/MenuExternal.vue +28 -0
- package/dev/src/components/MenuItem/index.ts +5 -0
- package/dev/src/components/PageFooter.vue +86 -0
- package/dev/src/components/PageHeader.vue +149 -0
- package/dev/src/components/PageModal.vue +95 -0
- package/dev/src/components/PrevNext.vue +144 -0
- package/dev/src/components/ScrollToTop.vue +63 -0
- package/dev/src/components/SrlPage/KFCApplication/KFCApplication.vue +715 -0
- package/dev/src/components/SrlPage/KFCApplication/KFCDropdownCharts.vue +112 -0
- package/dev/src/components/SrlPage/KFCApplication/KFCDropdownPeriod.vue +85 -0
- package/dev/src/components/SrlPage/KFCApplication/KFCTable.vue +63 -0
- package/dev/src/components/SrlPage/KFCApplication/hooks/kfcData.ts +9 -0
- package/dev/src/components/SrlPage/KFCApplication/models/KFCApplication.ts +183 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-basic.scss +1136 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-custom.scss +71 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-general.scss +113 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_iz-keyfigure-comparison-dropdown.scss +189 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_iz-keyfigure-comparison.scss +151 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_kfc-loading.scss +40 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_kfc-print.scss +20 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_srl-button-kfc.scss +21 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_variables.scss +10 -0
- package/dev/src/components/SrlPage/KFCApplication/services/xlsxParser.ts +194 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgColumnView.vue +28 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgDownloadChart.vue +26 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgDropdown.vue +18 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgIndexedValues.vue +18 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgLegendSwap.vue +18 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgLineView.vue +28 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgPDFChart.vue +26 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgPrintChart.vue +33 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgTableView.vue +67 -0
- package/dev/src/components/SrlPage/KFCApplication/utils/XDownloader.js +455 -0
- package/dev/src/components/SrlPage/KFCApplication/utils/XDownloaderStyle.js +44 -0
- package/dev/src/components/SrlPage/KFCApplication/utils/XTableNamer.js +68 -0
- package/dev/src/composables/config.ts +48 -0
- package/dev/src/i18n/index.ts +51 -0
- package/dev/src/i18n/translation.ts +85 -0
- package/dev/src/locales/de.json +15 -0
- package/dev/src/locales/en.json +15 -0
- package/dev/src/main.ts +16 -0
- package/dev/src/router/index.ts +47 -0
- package/dev/src/types/nswow.d.ts +73 -0
- package/dev/src/utils/variables.ts +13 -0
- package/dev/src/views/ArticleView.vue +77 -0
- package/dev/src/views/DownloadsView.vue +88 -0
- package/dev/src/views/HomeView.vue +35 -0
- package/dev/src/views/PageNotFound.vue +73 -0
- package/dev/src/views/SearchView.vue +126 -0
- package/dev/tsconfig.app.json +16 -0
- package/dev/tsconfig.json +14 -0
- package/dev/tsconfig.node.json +19 -0
- package/dev/tsconfig.vitest.json +11 -0
- package/dev/vite.config.ts +27 -0
- package/dev/vitest.config.ts +14 -0
- package/dev/word.ts +1 -0
- package/livingdocs/Buttons/button/app.scss +1 -0
- package/livingdocs/Buttons/button/button.html +18 -0
- package/livingdocs/Buttons/button/general.scss +33 -0
- package/livingdocs/Buttons/button/ldd.scss +1 -0
- package/livingdocs/Buttons/button/pdf.scss +1 -0
- package/livingdocs/Buttons/button/word.scss +1 -0
- package/livingdocs/Buttons/button-container/app.scss +1 -0
- package/livingdocs/Buttons/button-container/button-container.html +31 -0
- package/livingdocs/Buttons/button-container/general.scss +12 -0
- package/livingdocs/Buttons/button-container/ldd.scss +1 -0
- package/livingdocs/Buttons/button-container/pdf.scss +3 -0
- package/livingdocs/Buttons/button-container/properties.json +19 -0
- package/livingdocs/Buttons/button-container/word.scss +3 -0
- package/livingdocs/CV/cv-timeline/app.scss +1 -0
- package/livingdocs/CV/cv-timeline/cv-timeline.html +19 -0
- package/livingdocs/CV/cv-timeline/general.scss +1 -0
- package/livingdocs/CV/cv-timeline/ldd.scss +1 -0
- package/livingdocs/CV/cv-timeline/pdf.scss +1 -0
- package/livingdocs/CV/cv-timeline/print.scss +35 -0
- package/livingdocs/CV/cv-timeline/web.scss +27 -0
- package/livingdocs/CV/cv-timeline/word.scss +1 -0
- package/livingdocs/Container/column-container/column-container.html +44 -0
- package/livingdocs/Container/column-container/general.scss +105 -0
- package/livingdocs/Container/column-container/properties.json +83 -0
- package/livingdocs/Lists/alphanumeric-list-group/alphanumeric-list-group.html +25 -0
- package/livingdocs/Lists/alphanumeric-list-group/app.scss +1 -0
- package/livingdocs/Lists/alphanumeric-list-group/general.scss +5 -0
- package/livingdocs/Lists/alphanumeric-list-group/ldd.scss +1 -0
- package/livingdocs/Lists/alphanumeric-list-group/pdf.scss +1 -0
- package/livingdocs/Lists/alphanumeric-list-group/print.scss +0 -0
- package/livingdocs/Lists/alphanumeric-list-group/web.scss +0 -0
- package/livingdocs/Lists/alphanumeric-list-group/word.scss +1 -0
- package/livingdocs/Lists/list-item/app.scss +1 -0
- package/livingdocs/Lists/list-item/general.scss +4 -0
- package/livingdocs/Lists/list-item/ldd.scss +1 -0
- package/livingdocs/Lists/list-item/list-item.html +17 -0
- package/livingdocs/Lists/list-item/pdf.scss +1 -0
- package/livingdocs/Lists/list-item/print.scss +0 -0
- package/livingdocs/Lists/list-item/web.scss +0 -0
- package/livingdocs/Lists/list-item/word.scss +1 -0
- package/livingdocs/Lists/ordered-list-group/app.scss +1 -0
- package/livingdocs/Lists/ordered-list-group/general.scss +5 -0
- package/livingdocs/Lists/ordered-list-group/ldd.scss +1 -0
- package/livingdocs/Lists/ordered-list-group/ordered-list-group.html +25 -0
- package/livingdocs/Lists/ordered-list-group/pdf.scss +1 -0
- package/livingdocs/Lists/ordered-list-group/print.scss +0 -0
- package/livingdocs/Lists/ordered-list-group/web.scss +0 -0
- package/livingdocs/Lists/ordered-list-group/word.scss +1 -0
- package/livingdocs/Lists/unordered-list-group/app.scss +1 -0
- package/livingdocs/Lists/unordered-list-group/general.scss +5 -0
- package/livingdocs/Lists/unordered-list-group/ldd.scss +1 -0
- package/livingdocs/Lists/unordered-list-group/pdf.scss +1 -0
- package/livingdocs/Lists/unordered-list-group/print.scss +0 -0
- package/livingdocs/Lists/unordered-list-group/unordered-list-group.html +25 -0
- package/livingdocs/Lists/unordered-list-group/web.scss +0 -0
- package/livingdocs/Lists/unordered-list-group/word.scss +1 -0
- package/livingdocs/Media/chart/app.scss +19 -0
- package/livingdocs/Media/chart/chart.html +29 -0
- package/livingdocs/Media/chart/general.scss +11 -0
- package/livingdocs/Media/chart/ldd.scss +1 -0
- package/livingdocs/Media/chart/pdf.scss +9 -0
- package/livingdocs/Media/chart/print.scss +0 -0
- package/livingdocs/Media/chart/properties.json +41 -0
- package/livingdocs/Media/chart/web.scss +0 -0
- package/livingdocs/Media/chart/word.scss +1 -0
- package/livingdocs/Media/graphic/app.scss +1 -0
- package/livingdocs/Media/graphic/general.scss +18 -0
- package/livingdocs/Media/graphic/graphic.html +29 -0
- package/livingdocs/Media/graphic/ldd.scss +1 -0
- package/livingdocs/Media/graphic/pdf.scss +1 -0
- package/livingdocs/Media/graphic/print.scss +0 -0
- package/livingdocs/Media/graphic/properties.json +36 -0
- package/livingdocs/Media/graphic/web.scss +0 -0
- package/livingdocs/Media/graphic/word.scss +1 -0
- package/livingdocs/Media/image/app.scss +25 -0
- package/livingdocs/Media/image/general.scss +11 -0
- package/livingdocs/Media/image/image.html +55 -0
- package/livingdocs/Media/image/ldd.scss +1 -0
- package/livingdocs/Media/image/pdf.scss +1 -0
- package/livingdocs/Media/image/print.scss +7 -0
- package/livingdocs/Media/image/properties.json +41 -0
- package/livingdocs/Media/image/web.scss +0 -0
- package/livingdocs/Media/image/word.scss +1 -0
- package/livingdocs/Media/nswow-table/app.scss +2 -0
- package/livingdocs/Media/nswow-table/app.ts +35 -0
- package/livingdocs/Media/nswow-table/general.scss +281 -0
- package/livingdocs/Media/nswow-table/ldd.scss +2 -0
- package/livingdocs/Media/nswow-table/nswow-table.html +30 -0
- package/livingdocs/Media/nswow-table/pdf.scss +8 -0
- package/livingdocs/Media/nswow-table/print.scss +0 -0
- package/livingdocs/Media/nswow-table/properties.json +66 -0
- package/livingdocs/Media/nswow-table/web.scss +23 -0
- package/livingdocs/Media/nswow-table/word.scss +2 -0
- package/livingdocs/Media/video/app.scss +1 -0
- package/livingdocs/Media/video/general.scss +7 -0
- package/livingdocs/Media/video/ldd.scss +1 -0
- package/livingdocs/Media/video/pdf.scss +1 -0
- package/livingdocs/Media/video/print.scss +5 -0
- package/livingdocs/Media/video/properties.json +41 -0
- package/livingdocs/Media/video/video.html +26 -0
- package/livingdocs/Media/video/web.scss +0 -0
- package/livingdocs/Media/video/word.scss +1 -0
- package/livingdocs/Misc/accordion/accordion.html +56 -0
- package/livingdocs/Misc/accordion/app.scss +63 -0
- package/livingdocs/Misc/accordion/app.ts +10 -0
- package/livingdocs/Misc/accordion/general.scss +44 -0
- package/livingdocs/Misc/accordion/ldd.scss +36 -0
- package/livingdocs/Misc/accordion/pdf.scss +39 -0
- package/livingdocs/Misc/accordion/word.scss +39 -0
- package/livingdocs/Misc/anchor/anchor.html +15 -0
- package/livingdocs/Misc/anchor/app.scss +10 -0
- package/livingdocs/Misc/anchor/app.ts +11 -0
- package/livingdocs/Misc/anchor/general.scss +1 -0
- package/livingdocs/Misc/anchor/pdf.scss +1 -0
- package/livingdocs/Misc/anchor/print.scss +3 -0
- package/livingdocs/Misc/anchor/word.scss +1 -0
- package/livingdocs/Misc/spacer/app.scss +1 -0
- package/livingdocs/Misc/spacer/general.scss +8 -0
- package/livingdocs/Misc/spacer/ldd.scss +1 -0
- package/livingdocs/Misc/spacer/pdf.scss +1 -0
- package/livingdocs/Misc/spacer/print.scss +18 -0
- package/livingdocs/Misc/spacer/properties.json +52 -0
- package/livingdocs/Misc/spacer/spacer.html +12 -0
- package/livingdocs/Misc/spacer/web.scss +18 -0
- package/livingdocs/Misc/spacer/word.scss +1 -0
- package/livingdocs/PDF_only/pdf-cover/ldd.scss +42 -0
- package/livingdocs/PDF_only/pdf-cover/pdf-cover.html +29 -0
- package/livingdocs/PDF_only/pdf-cover/pdf.scss +1 -0
- package/livingdocs/PDF_only/pdf-cover/print.scss +0 -0
- package/livingdocs/PDF_only/pdf-cover/word.scss +1 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/ldd.scss +19 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/pdf-chapter-cover.html +18 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/pdf.scss +1 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/print.scss +19 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/word.scss +1 -0
- package/livingdocs/PDF_only/pdf-pagebreak/general.scss +4 -0
- package/livingdocs/PDF_only/pdf-pagebreak/ldd.scss +5 -0
- package/livingdocs/PDF_only/pdf-pagebreak/pdf-pagebreak.html +8 -0
- package/livingdocs/PDF_only/pdf-publication-title/general.scss +5 -0
- package/livingdocs/PDF_only/pdf-publication-title/pdf-publication-title.html +15 -0
- package/livingdocs/PDF_only/pdf-toc-item/general.scss +41 -0
- package/livingdocs/PDF_only/pdf-toc-item/pdf-toc-item.html +33 -0
- package/livingdocs/PDF_only/pdf-toc-item/properties.json +7 -0
- package/livingdocs/PDF_only/pdf-toc-item-blank/general.scss +5 -0
- package/livingdocs/PDF_only/pdf-toc-item-blank/pdf-toc-item-blank.html +11 -0
- package/livingdocs/PDF_only/pdf-toc-item-title/general.scss +5 -0
- package/livingdocs/PDF_only/pdf-toc-item-title/pdf-toc-item-title.html +11 -0
- package/livingdocs/PDF_only/pdf-toc-page/app.scss +1 -0
- package/livingdocs/PDF_only/pdf-toc-page/general.scss +1 -0
- package/livingdocs/PDF_only/pdf-toc-page/ldd.scss +1 -0
- package/livingdocs/PDF_only/pdf-toc-page/pdf-toc-page.html +33 -0
- package/livingdocs/PDF_only/pdf-toc-page/pdf.scss +1 -0
- package/livingdocs/PDF_only/pdf-toc-page/properties.json +12 -0
- package/livingdocs/PDF_only/pdf-toc-page/word.scss +1 -0
- package/livingdocs/PDF_only/pdf-video-link/ldd.scss +16 -0
- package/livingdocs/PDF_only/pdf-video-link/pdf-video-link.html +41 -0
- package/livingdocs/PDF_only/pdf-video-link/pdf.scss +1 -0
- package/livingdocs/PDF_only/pdf-video-link/print.scss +12 -0
- package/livingdocs/PDF_only/pdf-video-link/word.scss +1 -0
- package/livingdocs/Properties/grid/app.scss +1 -0
- package/livingdocs/Properties/grid/general.scss +95 -0
- package/livingdocs/Properties/grid/ldd.scss +1 -0
- package/livingdocs/Properties/grid/pdf.scss +1 -0
- package/livingdocs/Properties/grid/print.scss +94 -0
- package/livingdocs/Properties/grid/properties.json +68 -0
- package/livingdocs/Properties/grid/web.scss +98 -0
- package/livingdocs/Properties/grid/word.scss +1 -0
- package/livingdocs/Signatures/signature-container/app.scss +1 -0
- package/livingdocs/Signatures/signature-container/general.scss +7 -0
- package/livingdocs/Signatures/signature-container/ldd.scss +1 -0
- package/livingdocs/Signatures/signature-container/pdf.scss +1 -0
- package/livingdocs/Signatures/signature-container/print.scss +0 -0
- package/livingdocs/Signatures/signature-container/signature-container.html +30 -0
- package/livingdocs/Signatures/signature-container/web.scss +0 -0
- package/livingdocs/Signatures/signature-container/word.scss +1 -0
- package/livingdocs/Signatures/signature-item/app.scss +1 -0
- package/livingdocs/Signatures/signature-item/general.scss +53 -0
- package/livingdocs/Signatures/signature-item/ldd.scss +1 -0
- package/livingdocs/Signatures/signature-item/pdf.scss +1 -0
- package/livingdocs/Signatures/signature-item/print.scss +0 -0
- package/livingdocs/Signatures/signature-item/signature-item.html +23 -0
- package/livingdocs/Signatures/signature-item/web.scss +0 -0
- package/livingdocs/Signatures/signature-item/word.scss +1 -0
- package/livingdocs/Text/footnote/app.scss +1 -0
- package/livingdocs/Text/footnote/footnote.html +14 -0
- package/livingdocs/Text/footnote/general.scss +12 -0
- package/livingdocs/Text/footnote/ldd.scss +1 -0
- package/livingdocs/Text/footnote/pdf.scss +1 -0
- package/livingdocs/Text/footnote/print.scss +36 -0
- package/livingdocs/Text/footnote/web.scss +27 -0
- package/livingdocs/Text/footnote/word.scss +1 -0
- package/livingdocs/Text/lead/general.scss +9 -0
- package/livingdocs/Text/lead/lead.html +23 -0
- package/livingdocs/Text/paragraph/general.scss +9 -0
- package/livingdocs/Text/paragraph/paragraph.html +24 -0
- package/livingdocs/Text/quote/general.scss +43 -0
- package/livingdocs/Text/quote/properties.json +7 -0
- package/livingdocs/Text/quote/quote.html +29 -0
- package/livingdocs/Text/quote-with-portrait/general.scss +81 -0
- package/livingdocs/Text/quote-with-portrait/properties.json +12 -0
- package/livingdocs/Text/quote-with-portrait/quote-with-portrait.html +49 -0
- package/livingdocs/Titles/title-h1/general.scss +10 -0
- package/livingdocs/Titles/title-h1/title-h1.html +16 -0
- package/livingdocs/Titles/title-h2/app.scss +1 -0
- package/livingdocs/Titles/title-h2/general.scss +13 -0
- package/livingdocs/Titles/title-h2/ldd.scss +1 -0
- package/livingdocs/Titles/title-h2/pdf.scss +1 -0
- package/livingdocs/Titles/title-h2/print.scss +36 -0
- package/livingdocs/Titles/title-h2/title-h2.html +26 -0
- package/livingdocs/Titles/title-h2/web.scss +27 -0
- package/livingdocs/Titles/title-h2/word.scss +1 -0
- package/livingdocs/Titles/title-h3/app.scss +1 -0
- package/livingdocs/Titles/title-h3/general.scss +13 -0
- package/livingdocs/Titles/title-h3/ldd.scss +1 -0
- package/livingdocs/Titles/title-h3/pdf.scss +1 -0
- package/livingdocs/Titles/title-h3/print.scss +34 -0
- package/livingdocs/Titles/title-h3/title-h3.html +26 -0
- package/livingdocs/Titles/title-h3/web.scss +27 -0
- package/livingdocs/Titles/title-h3/word.scss +1 -0
- package/livingdocs/Titles/title-h4/app.scss +1 -0
- package/livingdocs/Titles/title-h4/general.scss +13 -0
- package/livingdocs/Titles/title-h4/ldd.scss +1 -0
- package/livingdocs/Titles/title-h4/pdf.scss +1 -0
- package/livingdocs/Titles/title-h4/print.scss +34 -0
- package/livingdocs/Titles/title-h4/title-h4.html +26 -0
- package/livingdocs/Titles/title-h4/web.scss +27 -0
- package/livingdocs/Titles/title-h4/word.scss +1 -0
- package/livingdocs/Titles/title-h5/general.scss +10 -0
- package/livingdocs/Titles/title-h5/title-h5.html +16 -0
- package/livingdocs/Titles/title-h6/general.scss +10 -0
- package/livingdocs/Titles/title-h6/title-h6.html +16 -0
- package/package.json +50 -0
- package/preparePublish.cjs +95 -0
- package/scripts/beaver.d.ts +6 -0
- package/scripts/beaver.js +316 -0
- package/scripts/build.d.ts +40 -0
- package/scripts/build.js +812 -0
- package/scripts/colors.d.ts +3 -0
- package/scripts/colors.js +27 -0
- package/scripts/components.d.ts +43 -0
- package/scripts/components.js +566 -0
- package/scripts/config.d.ts +1 -0
- package/scripts/config.js +1 -0
- package/scripts/doPublish.d.ts +1 -0
- package/scripts/doPublish.js +43 -0
- package/scripts/init.d.ts +9 -0
- package/scripts/init.js +45 -0
- package/scripts/migrate-livingdocs-build/LICENSE +21 -0
- package/scripts/migrate-livingdocs-build/bin/build.d.ts +8 -0
- package/scripts/migrate-livingdocs-build/bin/build.js +53 -0
- package/scripts/migrate-livingdocs-build/bin/migrate.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/bin/migrate.js +43 -0
- package/scripts/migrate-livingdocs-build/dev/build/v1.d.ts +9 -0
- package/scripts/migrate-livingdocs-build/dev/build/v1.d.ts.map +1 -0
- package/scripts/migrate-livingdocs-build/dev/build/v1.js +51 -0
- package/scripts/migrate-livingdocs-build/dev/build/v2.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/dev/build/v2.d.ts.map +1 -0
- package/scripts/migrate-livingdocs-build/dev/build/v2.js +44 -0
- package/scripts/migrate-livingdocs-build/dev/build/zip-archive.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/dev/build/zip-archive.d.ts.map +1 -0
- package/scripts/migrate-livingdocs-build/dev/build/zip-archive.js +39 -0
- package/scripts/migrate-livingdocs-build/dev/build.d.ts +9 -0
- package/scripts/migrate-livingdocs-build/dev/build.js +7 -0
- package/scripts/migrate-livingdocs-build/dev/configuration-defaults.d.ts +20 -0
- package/scripts/migrate-livingdocs-build/dev/configuration-defaults.js +18 -0
- package/scripts/migrate-livingdocs-build/dev/configuration.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/dev/configuration.js +34 -0
- package/scripts/migrate-livingdocs-build/dev/lib.d.ts +33 -0
- package/scripts/migrate-livingdocs-build/dev/lib.js +251 -0
- package/scripts/migrate-livingdocs-build/dev/livingdocs-design.d.ts +9 -0
- package/scripts/migrate-livingdocs-build/dev/livingdocs-design.js +80 -0
- package/scripts/migrate-livingdocs-build/dev/logger.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/dev/logger.js +16 -0
- package/scripts/migrate-livingdocs-build/dev/migrate.d.ts +22 -0
- package/scripts/migrate-livingdocs-build/dev/migrate.js +241 -0
- package/scripts/migrate-livingdocs-build/readme.md +62 -0
- package/scripts/preparePublish.d.ts +1 -0
- package/scripts/preparePublish.js +88 -0
- package/scripts/renamePackage.d.ts +1 -0
- package/scripts/renamePackage.js +48 -0
- package/scripts/utils.d.ts +49 -0
- package/scripts/utils.js +106 -0
- package/scripts/vite.d.ts +10 -0
- package/scripts/vite.js +58 -0
- package/scss/colors/functions.scss +18 -0
- package/scss/colors/index.scss +3 -0
- package/scss/colors/mixins.scss +45 -0
- package/scss/colors/variables.scss +6 -0
- package/scss/config.scss +7 -0
- package/scss/core-styles.scss +22 -0
- package/scss/fonts/functions.scss +21 -0
- package/scss/fonts/index.scss +3 -0
- package/scss/fonts/mixins.scss +31 -0
- package/scss/fonts/variables.scss +8 -0
- package/scss/grid/functions.scss +29 -0
- package/scss/grid/index.scss +3 -0
- package/scss/grid/mixins.scss +388 -0
- package/scss/grid/variables.scss +10 -0
- package/scss/helpers/functions.scss +0 -0
- package/scss/helpers/index.scss +3 -0
- package/scss/helpers/mixins.scss +87 -0
- package/scss/helpers/variables.scss +7 -0
- package/scss/index.scss +8 -0
- package/scss/meta/functions.scss +64 -0
- package/scss/meta/index.scss +3 -0
- package/scss/meta/mixins.scss +6 -0
- package/scss/meta/variables.scss +8 -0
- package/scss/spacer/functions.scss +9 -0
- package/scss/spacer/index.scss +3 -0
- package/scss/spacer/mixins.scss +236 -0
- package/scss/spacer/variables.scss +6 -0
- package/scss/system/functions.scss +77 -0
- package/scss/system/index.scss +3 -0
- package/scss/system/mixins.scss +27 -0
- package/scss/system/root.scss +39 -0
- package/scss/system/variables.scss +13 -0
- package/scss/typography/functions.scss +63 -0
- package/scss/typography/index.scss +3 -0
- package/scss/typography/mixins.scss +262 -0
- package/scss/typography/variables.scss +11 -0
- package/tags.txt +1 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use 'nswow';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
$numberSize: 50;
|
|
5
|
+
|
|
6
|
+
$gap: map.get(nswow.$grid-gutter, print, gap);
|
|
7
|
+
$column-gap: map.get(nswow.$grid-gutter, print, column-gap);
|
|
8
|
+
@if not $column-gap {
|
|
9
|
+
$column-gap: $gap;
|
|
10
|
+
}
|
|
11
|
+
@if not $column-gap {
|
|
12
|
+
$column-gap: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.srl-title-h4 {
|
|
16
|
+
> span {
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__number {
|
|
21
|
+
display: block;
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 0;
|
|
24
|
+
left: 0;
|
|
25
|
+
width: nswow.system-size-unit($numberSize, in);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__text {
|
|
29
|
+
display: block;
|
|
30
|
+
&:not(:first-child) {
|
|
31
|
+
margin-left: nswow.system-size-unit($numberSize + $column-gap, in);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script type="ld-conf">
|
|
2
|
+
{
|
|
3
|
+
"name": "title-h4",
|
|
4
|
+
"label": "Title (h4)",
|
|
5
|
+
"iconUrl": "https://mms-xbrl.s3.eu-central-1.amazonaws.com/design/svg/editor/icon-h4.min.svg",
|
|
6
|
+
"properties": [
|
|
7
|
+
"web-width",
|
|
8
|
+
"pdf-width"
|
|
9
|
+
],
|
|
10
|
+
"directives": {
|
|
11
|
+
"number": {
|
|
12
|
+
"recommendedMaxLength": 6
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
<h4 class="srl-title-h4 srl-article__grid srl-article__grid--indent">
|
|
18
|
+
<span class="srl-article__grid--inner">
|
|
19
|
+
<span class="srl-title-h4__number" doc-optional doc-editable="number">
|
|
20
|
+
1.1.1
|
|
21
|
+
</span>
|
|
22
|
+
<span class="srl-title-h4__text" doc-editable="text">
|
|
23
|
+
Title h4 Lorem ipsum dolor sit amet
|
|
24
|
+
</span>
|
|
25
|
+
</span>
|
|
26
|
+
</h4>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use 'nswow';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
$numberSize: 50;
|
|
5
|
+
|
|
6
|
+
.srl-title-h4 {
|
|
7
|
+
> span {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-wrap: nowrap;
|
|
10
|
+
@each $breakpoint, $gutter in nswow.$grid-gutter {
|
|
11
|
+
$gap: map.get($gutter, gap);
|
|
12
|
+
$column-gap: map.get($gutter, column-gap);
|
|
13
|
+
@if not $column-gap {
|
|
14
|
+
$column-gap: $gap;
|
|
15
|
+
}
|
|
16
|
+
@if $column-gap {
|
|
17
|
+
@include nswow.grid-media($breakpoint) {
|
|
18
|
+
column-gap: nswow.system-size-unit($column-gap);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__number {
|
|
25
|
+
flex: 0 0 nswow.system-size-unit($numberSize);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'print';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script type="ld-conf">
|
|
2
|
+
{
|
|
3
|
+
"name": "title-h5",
|
|
4
|
+
"label": "Title (h5)",
|
|
5
|
+
"iconUrl": "https://mms-xbrl.s3.eu-central-1.amazonaws.com/design/svg/editor/icon-h5.min.svg",
|
|
6
|
+
"properties": [
|
|
7
|
+
"web-width",
|
|
8
|
+
"pdf-width"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
<h5 class="srl-title-h5 srl-article__grid srl-article__grid--indent">
|
|
13
|
+
<span class="srl-article__grid--inner" doc-editable="text">
|
|
14
|
+
Title h5 Lorem ipsum dolor sit amet
|
|
15
|
+
</span>
|
|
16
|
+
</h5>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script type="ld-conf">
|
|
2
|
+
{
|
|
3
|
+
"name": "title-h6",
|
|
4
|
+
"label": "Title (h6)",
|
|
5
|
+
"iconUrl": "https://mms-xbrl.s3.eu-central-1.amazonaws.com/design/svg/editor/icon-h6.min.svg",
|
|
6
|
+
"properties": [
|
|
7
|
+
"web-width",
|
|
8
|
+
"pdf-width"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
<h6 class="lc-title-h6 srl-article__grid srl-article__grid--indent">
|
|
13
|
+
<span class="srl-article__grid--inner" doc-editable="text">
|
|
14
|
+
Title h6 Lorem ipsum dolor sit amet
|
|
15
|
+
</span>
|
|
16
|
+
</h6>
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@simple-reporting/base",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Manage nswow templates, build and publish",
|
|
5
|
+
"bin": {
|
|
6
|
+
"nswow": "cli.js"
|
|
7
|
+
},
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=22.12.0",
|
|
10
|
+
"npm": ">=10.9.0"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"preparePublish": "node preparePublish.cjs && prettier --write --list-different .",
|
|
15
|
+
"lint": "prettier --check .",
|
|
16
|
+
"lint:fix": "prettier --write ."
|
|
17
|
+
},
|
|
18
|
+
"main": "cli.js",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@kne/color-palette": "^0.1.0",
|
|
21
|
+
"archiver": "^7.0.1",
|
|
22
|
+
"cheerio": "^1.0.0",
|
|
23
|
+
"colors": "^1.4.0",
|
|
24
|
+
"commander": "^11.1.0",
|
|
25
|
+
"enquirer": "^2.4.1",
|
|
26
|
+
"fs": "^0.0.1-security",
|
|
27
|
+
"fs-extra": "^11.2.0",
|
|
28
|
+
"glob": "^10.4.5",
|
|
29
|
+
"globby": "^13.2.2",
|
|
30
|
+
"html-minifier": "^4.0.0",
|
|
31
|
+
"lodash": "^4.17.21",
|
|
32
|
+
"modern-css-reset": "^1.4.0",
|
|
33
|
+
"vite": "^5.4.11",
|
|
34
|
+
"winston": "^3.17.0",
|
|
35
|
+
"write-json": "^3.0.1"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"scss",
|
|
39
|
+
"grid",
|
|
40
|
+
"fonts",
|
|
41
|
+
"typography",
|
|
42
|
+
"colors"
|
|
43
|
+
],
|
|
44
|
+
"author": "Michael Dörer",
|
|
45
|
+
"license": "ISC",
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"prettier": "^3.4.2",
|
|
48
|
+
"typescript": "^5.7.2"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
const { resolve } = require('node:path');
|
|
2
|
+
const { readFileSync, writeFileSync, rmSync } = require('node:fs');
|
|
3
|
+
const { globSync } = require('glob');
|
|
4
|
+
const writeJson = require('write-json');
|
|
5
|
+
const ts = require('typescript');
|
|
6
|
+
const enquirer = require('enquirer');
|
|
7
|
+
const { Input } = enquirer;
|
|
8
|
+
const { exec } = require('child_process');
|
|
9
|
+
|
|
10
|
+
function getPackageVersion(packageName) {
|
|
11
|
+
return new Promise((resolve, reject) => {
|
|
12
|
+
exec(`npm list ${packageName} --json`, (error, stdout, stderr) => {
|
|
13
|
+
const jsonOutput = JSON.parse(stdout);
|
|
14
|
+
resolve(jsonOutput.version);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async function compile(fileNames, options) {
|
|
20
|
+
// Create a Program with an in-memory emit
|
|
21
|
+
const createdFiles = {};
|
|
22
|
+
const host = ts.createCompilerHost(options);
|
|
23
|
+
host.writeFile = (fileName, contents) => (createdFiles[fileName] = contents);
|
|
24
|
+
|
|
25
|
+
// Prepare and emit the d.ts files
|
|
26
|
+
const program = ts.createProgram(fileNames, options, host);
|
|
27
|
+
program.emit();
|
|
28
|
+
|
|
29
|
+
for (file in createdFiles) {
|
|
30
|
+
const content = createdFiles[file];
|
|
31
|
+
await writeFileSync(file, content);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function action() {
|
|
36
|
+
const nswowVersion = await getPackageVersion('@simple-reporting/base');
|
|
37
|
+
|
|
38
|
+
const writeJson = require('write-json');
|
|
39
|
+
const { globSync } = require('glob');
|
|
40
|
+
|
|
41
|
+
const currentVersion = nswowVersion.split('.');
|
|
42
|
+
let major = parseInt(currentVersion[0]);
|
|
43
|
+
let minor = parseInt(currentVersion[1]);
|
|
44
|
+
let patch = parseInt(currentVersion[2]);
|
|
45
|
+
|
|
46
|
+
if (process.argv.includes('major')) {
|
|
47
|
+
major++;
|
|
48
|
+
minor = 0;
|
|
49
|
+
patch = 0;
|
|
50
|
+
} else if (process.argv.includes('minor')) {
|
|
51
|
+
minor++;
|
|
52
|
+
patch = 0;
|
|
53
|
+
} else {
|
|
54
|
+
patch++;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let version = `${major}.${minor}.${patch}`;
|
|
58
|
+
|
|
59
|
+
const prompt = new Input({
|
|
60
|
+
message: 'Package version',
|
|
61
|
+
initial: version,
|
|
62
|
+
});
|
|
63
|
+
version = await prompt.run();
|
|
64
|
+
|
|
65
|
+
if (version) {
|
|
66
|
+
const packageJson = JSON.parse(
|
|
67
|
+
await readFileSync(resolve(process.cwd(), './package.json')),
|
|
68
|
+
);
|
|
69
|
+
packageJson.version = version;
|
|
70
|
+
await writeJson(resolve(process.cwd(), './package.json'), packageJson);
|
|
71
|
+
|
|
72
|
+
const devJson = JSON.parse(
|
|
73
|
+
await readFileSync(resolve(process.cwd(), './dev/package.json')),
|
|
74
|
+
);
|
|
75
|
+
devJson.devDependencies['@simple-reporting/base'] = `^${version}`;
|
|
76
|
+
await writeJson(resolve(process.cwd(), './dev/package.json'), devJson);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const typescriptFiles = await globSync(
|
|
80
|
+
resolve(process.cwd(), './scripts/**/*.d.ts'),
|
|
81
|
+
);
|
|
82
|
+
for (let i = 0; i < typescriptFiles.length; i++) {
|
|
83
|
+
await rmSync(typescriptFiles[i]);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const jsFiles = await globSync(resolve(process.cwd(), './scripts/**/*.js'));
|
|
87
|
+
|
|
88
|
+
await compile(jsFiles, {
|
|
89
|
+
allowJs: true,
|
|
90
|
+
declaration: true,
|
|
91
|
+
emitDeclarationOnly: true,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
action();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates configuration files for nswow.
|
|
3
|
+
* @param {number} [verbose=0] - The verbosity level. Default is 0.
|
|
4
|
+
* @returns {Promise<void>} - A promise that resolves once the files have been generated.
|
|
5
|
+
*/
|
|
6
|
+
export function beaver(verbose?: number): Promise<void>;
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { writeFileSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve, relative } from 'node:path';
|
|
3
|
+
import { colors } from './colors.js';
|
|
4
|
+
import { readNsWowJson } from './utils.js';
|
|
5
|
+
import colorPalette from '@kne/color-palette';
|
|
6
|
+
/**
|
|
7
|
+
* Maps the values of an object or array recursively.
|
|
8
|
+
*
|
|
9
|
+
* @param {Object|Array} values - The object or array of values to map.
|
|
10
|
+
* @returns {Object|Array} - The mapped object or array.
|
|
11
|
+
*/
|
|
12
|
+
function mapValues(values) {
|
|
13
|
+
let r = {};
|
|
14
|
+
if (Array.isArray(values)) {
|
|
15
|
+
for (let x = 0; x < values.length; x++) {
|
|
16
|
+
if (typeof values[x].name === 'undefined') {
|
|
17
|
+
if (!Array.isArray(r)) {
|
|
18
|
+
r = [];
|
|
19
|
+
}
|
|
20
|
+
r.push(mapValues(values[x]));
|
|
21
|
+
} else {
|
|
22
|
+
r[values[x].name] = mapValues(values[x]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
} else if (typeof values === 'object') {
|
|
26
|
+
for (const label in values) {
|
|
27
|
+
if (label !== 'name') {
|
|
28
|
+
r[label] = mapValues(values[label]);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
if (values === '') {
|
|
33
|
+
return `""`;
|
|
34
|
+
}
|
|
35
|
+
return values;
|
|
36
|
+
}
|
|
37
|
+
return r;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Generates SCSS code to import and write typography mixins.
|
|
42
|
+
*
|
|
43
|
+
* @param {Object} typography - The typography configuration object.
|
|
44
|
+
* @param {Object} typography.typography - The typography mixin definitions.
|
|
45
|
+
* @returns {string} - The generated SCSS code.
|
|
46
|
+
*/
|
|
47
|
+
function writeTypographyScss(typography) {
|
|
48
|
+
let r = [`@use "config";`, `@forward "@simple-reporting/base/scss/typography";`];
|
|
49
|
+
if (typography) {
|
|
50
|
+
if (typography.typography) {
|
|
51
|
+
let o = [];
|
|
52
|
+
|
|
53
|
+
for (const typo in typography.typography) {
|
|
54
|
+
o.push(`@mixin ${typo}($margins: false) {`);
|
|
55
|
+
o.push(` @include typography.get("${typo}", $margins);`);
|
|
56
|
+
o.push(`}\n`);
|
|
57
|
+
}
|
|
58
|
+
if (o.length) {
|
|
59
|
+
r.push(`@use "@simple-reporting/base/scss/typography";\n`);
|
|
60
|
+
r.push(o.join(`\n`));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return r.join(`\n`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Writes SCSS code for importing and forwarding colors from a config file.
|
|
69
|
+
*
|
|
70
|
+
* @param {Object} colors - The colors object containing color keys and their values.
|
|
71
|
+
* @returns {string} - The SCSS code for importing and forwarding colors.
|
|
72
|
+
*/
|
|
73
|
+
function writeColorsScss(colors) {
|
|
74
|
+
let r = [`@use "config";`, `@forward "@simple-reporting/base/scss/colors";`];
|
|
75
|
+
if (colors) {
|
|
76
|
+
if (colors.colors) {
|
|
77
|
+
let o = [];
|
|
78
|
+
|
|
79
|
+
for (const color in colors.colors) {
|
|
80
|
+
o.push(`@function ${color}() {`);
|
|
81
|
+
o.push(` @return colors.get("${color}");`);
|
|
82
|
+
o.push(`}\n`);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (o.length) {
|
|
86
|
+
r.push(`@use "@simple-reporting/base/scss/colors";\n`);
|
|
87
|
+
r.push(o.join(`\n`));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return r.join(`\n`);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Checks if there are any commas outside of parentheses in the given text.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} text - The text to be checked.
|
|
98
|
+
* @return {boolean} - True if there is at least one comma outside of parentheses, false otherwise.
|
|
99
|
+
*/
|
|
100
|
+
function hasCommasOutsideOfParentheses(text) {
|
|
101
|
+
let depth = 0;
|
|
102
|
+
for (let char of text) {
|
|
103
|
+
if (char === '(') depth++;
|
|
104
|
+
else if (char === ')') depth--;
|
|
105
|
+
else if (char === ',' && depth === 0) return true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Determines if there are points outside of parentheses in the given text.
|
|
112
|
+
*
|
|
113
|
+
* @param {string} text - The text to check.
|
|
114
|
+
* @return {boolean} - True if there are points outside of parentheses, false otherwise.
|
|
115
|
+
*/
|
|
116
|
+
function hasPointsOutsideOfParentheses(text) {
|
|
117
|
+
let depth = 0;
|
|
118
|
+
for (let char of text) {
|
|
119
|
+
if (char === '(') depth++;
|
|
120
|
+
else if (char === ')') depth--;
|
|
121
|
+
else if (char === '.' && depth === 0) return true;
|
|
122
|
+
}
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Converts a JavaScript object into SCSS variables.
|
|
128
|
+
*
|
|
129
|
+
* @param {object} values - The JavaScript object containing the variable names and values.
|
|
130
|
+
* @param {number} indent - The number of spaces to indent each line of the generated SCSS. Default is 2.
|
|
131
|
+
* @returns {string} - The SCSS variables as a string.
|
|
132
|
+
*/
|
|
133
|
+
function makeScssVariables(values, indent = 2) {
|
|
134
|
+
let r = [];
|
|
135
|
+
if (typeof values === 'object') {
|
|
136
|
+
r.push(`(`);
|
|
137
|
+
let v = [];
|
|
138
|
+
for (const variables in values) {
|
|
139
|
+
if (Array.isArray(values)) {
|
|
140
|
+
v.push(
|
|
141
|
+
`${' '.repeat(indent + 2)}var${variables}: ${makeScssVariables(values[variables], indent + 2)}`,
|
|
142
|
+
);
|
|
143
|
+
} else {
|
|
144
|
+
v.push(
|
|
145
|
+
`${' '.repeat(indent + 2)}${variables}: ${makeScssVariables(values[variables], indent + 2)}`,
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
r.push(v.join(`,\n`));
|
|
150
|
+
r.push(`${' '.repeat(indent)})`);
|
|
151
|
+
} else {
|
|
152
|
+
if (
|
|
153
|
+
typeof values === 'string' &&
|
|
154
|
+
values !== `""` &&
|
|
155
|
+
(hasPointsOutsideOfParentheses(values) ||
|
|
156
|
+
hasCommasOutsideOfParentheses(values))
|
|
157
|
+
) {
|
|
158
|
+
values = `\"${values.replaceAll('"', '\\"')}\"`;
|
|
159
|
+
}
|
|
160
|
+
return values;
|
|
161
|
+
}
|
|
162
|
+
return r.join(`\n`);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Generates configuration files for nswow.
|
|
167
|
+
* @param {number} [verbose=0] - The verbosity level. Default is 0.
|
|
168
|
+
* @returns {Promise<void>} - A promise that resolves once the files have been generated.
|
|
169
|
+
*/
|
|
170
|
+
async function beaver(verbose = 0) {
|
|
171
|
+
const configJson = await readNsWowJson();
|
|
172
|
+
const nswowPath = resolve(process.cwd(), './nswow');
|
|
173
|
+
|
|
174
|
+
if (typeof verbose === 'boolean') {
|
|
175
|
+
verbose = verbose ? 1 : 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (typeof configJson.system === 'undefined') {
|
|
179
|
+
configJson.system = {};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (typeof configJson.system.environment === 'undefined') {
|
|
183
|
+
configJson.system.environment = process.env.NODE_ENV;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (typeof configJson.fonts !== 'undefined') {
|
|
187
|
+
const fontBasePath = configJson.fonts['font-base-path'] ?? '';
|
|
188
|
+
if (fontBasePath.length) {
|
|
189
|
+
configJson.fonts['font-base-path'] = '.' + fontBasePath;
|
|
190
|
+
}
|
|
191
|
+
if (typeof configJson.fonts.fonts !== 'undefined') {
|
|
192
|
+
for (let x = 0; x < configJson.fonts.fonts.length; x++) {
|
|
193
|
+
let font = configJson.fonts.fonts[x];
|
|
194
|
+
if (typeof font === 'string') {
|
|
195
|
+
configJson.fonts.fonts[x] = JSON.parse(
|
|
196
|
+
readFileSync(
|
|
197
|
+
resolve(process.cwd(), `${fontBasePath}/${font}/styles.json`),
|
|
198
|
+
),
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const map = {};
|
|
206
|
+
|
|
207
|
+
for (const file in configJson) {
|
|
208
|
+
map[file] = {};
|
|
209
|
+
for (const variable in configJson[file]) {
|
|
210
|
+
map[file][variable] = mapValues(configJson[file][variable]);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (map?.colors?.colors?.shade) {
|
|
215
|
+
const shade = map.colors.colors.shade.color;
|
|
216
|
+
if (!map.colors.colors['shade-50']) {
|
|
217
|
+
map.colors.colors['shade-50'] = { color: colorPalette(shade, 0.5) };
|
|
218
|
+
}
|
|
219
|
+
if (!map.colors.colors['shade-100']) {
|
|
220
|
+
map.colors.colors['shade-100'] = { color: colorPalette(shade, 1) };
|
|
221
|
+
}
|
|
222
|
+
if (!map.colors.colors['shade-200']) {
|
|
223
|
+
map.colors.colors['shade-200'] = { color: colorPalette(shade, 2) };
|
|
224
|
+
}
|
|
225
|
+
if (!map.colors.colors['shade-300']) {
|
|
226
|
+
map.colors.colors['shade-300'] = { color: colorPalette(shade, 3) };
|
|
227
|
+
}
|
|
228
|
+
if (!map.colors.colors['shade-400']) {
|
|
229
|
+
map.colors.colors['shade-400'] = { color: colorPalette(shade, 4) };
|
|
230
|
+
}
|
|
231
|
+
if (!map.colors.colors['shade-500']) {
|
|
232
|
+
map.colors.colors['shade-500'] = { color: colorPalette(shade, 5) };
|
|
233
|
+
}
|
|
234
|
+
if (!map.colors.colors['shade-600']) {
|
|
235
|
+
map.colors.colors['shade-600'] = { color: colorPalette(shade, 6) };
|
|
236
|
+
}
|
|
237
|
+
if (!map.colors.colors['shade-700']) {
|
|
238
|
+
map.colors.colors['shade-700'] = { color: colorPalette(shade, 7) };
|
|
239
|
+
}
|
|
240
|
+
if (!map.colors.colors['shade-800']) {
|
|
241
|
+
map.colors.colors['shade-800'] = { color: colorPalette(shade, 8) };
|
|
242
|
+
}
|
|
243
|
+
if (!map.colors.colors['shade-900']) {
|
|
244
|
+
map.colors.colors['shade-900'] = { color: colorPalette(shade, 9) };
|
|
245
|
+
}
|
|
246
|
+
if (!map.colors.colors['shade-950']) {
|
|
247
|
+
map.colors.colors['shade-950'] = { color: colorPalette(shade, 9.5) };
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
let configOutput = [];
|
|
252
|
+
[
|
|
253
|
+
'system',
|
|
254
|
+
'fonts',
|
|
255
|
+
'meta',
|
|
256
|
+
'grid',
|
|
257
|
+
'colors',
|
|
258
|
+
'typography',
|
|
259
|
+
'spacer',
|
|
260
|
+
'helpers',
|
|
261
|
+
].forEach((file) => {
|
|
262
|
+
if (typeof map[file] !== 'undefined') {
|
|
263
|
+
const o = [];
|
|
264
|
+
o.push(
|
|
265
|
+
`@use "@simple-reporting/base/scss/${file}/variables.scss" as ${file}Variables with (`,
|
|
266
|
+
);
|
|
267
|
+
let v = [];
|
|
268
|
+
for (const variable in map[file]) {
|
|
269
|
+
v.push(` $${variable}: ${makeScssVariables(map[file][variable])}`);
|
|
270
|
+
}
|
|
271
|
+
o.push(v.join(`,\n`));
|
|
272
|
+
o.push(');\n');
|
|
273
|
+
configOutput.push(o.join(`\n`));
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
configOutput = configOutput.join(`\n`);
|
|
278
|
+
const configFile = `${nswowPath}/config.scss`;
|
|
279
|
+
writeFileSync(configFile, configOutput);
|
|
280
|
+
|
|
281
|
+
const typographyFile = `${nswowPath}/typography.scss`;
|
|
282
|
+
const typographyOutput = writeTypographyScss(map.typography);
|
|
283
|
+
writeFileSync(typographyFile, typographyOutput);
|
|
284
|
+
|
|
285
|
+
const colorsFile = `${nswowPath}/colors.scss`;
|
|
286
|
+
const colorsOutput = writeColorsScss(map.colors);
|
|
287
|
+
writeFileSync(colorsFile, colorsOutput);
|
|
288
|
+
|
|
289
|
+
if (verbose > 0) {
|
|
290
|
+
console.log(colors.info(`\nThe following files has been written.\n`));
|
|
291
|
+
|
|
292
|
+
console.log(
|
|
293
|
+
colors.bgWhite(colors.file(relative(process.cwd(), configFile))),
|
|
294
|
+
);
|
|
295
|
+
if (verbose > 1) {
|
|
296
|
+
console.log(colors.prompt(`\n` + configOutput + `\n`));
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
console.log(
|
|
300
|
+
colors.bgWhite(colors.file(relative(process.cwd(), typographyFile))),
|
|
301
|
+
);
|
|
302
|
+
if (verbose > 1) {
|
|
303
|
+
console.log(colors.prompt(`\n` + typographyOutput + `\n`));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
console.log(
|
|
307
|
+
colors.bgWhite(colors.file(relative(process.cwd(), colorsFile))),
|
|
308
|
+
);
|
|
309
|
+
if (verbose > 1) {
|
|
310
|
+
console.log(colors.prompt(`\n` + colorsOutput + `\n`));
|
|
311
|
+
}
|
|
312
|
+
console.log('');
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export { beaver };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the project sequentially by executing a series of asynchronous tasks in a specific order.
|
|
3
|
+
* This method is used to build the project in a predetermined sequence.
|
|
4
|
+
*
|
|
5
|
+
* @return {Promise<void>} A Promise that resolves when the build process is completed or rejects if an error occurs.
|
|
6
|
+
*/
|
|
7
|
+
export function build(): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Builds the project sequentially by executing a series of asynchronous tasks in a specific order.
|
|
10
|
+
* This method is used to build the project in a predetermined sequence.
|
|
11
|
+
*
|
|
12
|
+
* @return {Promise<void>} A Promise that resolves when the build process is completed or rejects if an error occurs.
|
|
13
|
+
*/
|
|
14
|
+
export function ddev(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Maps the SCSS files and the LDD files in the project.
|
|
17
|
+
*
|
|
18
|
+
* @async
|
|
19
|
+
* @function map
|
|
20
|
+
* @returns {Promise<boolean>} A promise that resolves after successfully mapping the files.
|
|
21
|
+
* @throws {Error} If there is an error during the mapping process.
|
|
22
|
+
*/
|
|
23
|
+
export function map(): Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Maps SCSS files and generates import statements for different output files.
|
|
26
|
+
*
|
|
27
|
+
* @returns {Promise<boolean>} Returns a promise that resolves to true if the SCSS mapping is successful, and false if there's an error.
|
|
28
|
+
*/
|
|
29
|
+
export function mapScss(): Promise<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Maps the livingdocs properties to components and groups.
|
|
32
|
+
*
|
|
33
|
+
* @returns {Promise<boolean>} Returns a promise that resolves to a boolean indicating the success or failure of the mapping.
|
|
34
|
+
*/
|
|
35
|
+
export function mapLdd(): Promise<boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* This function asynchronously maps JavaScript files and imports them into specific files.
|
|
38
|
+
* @returns {Promise<boolean>} - A promise that resolves to true if the mapping and importing is successful.
|
|
39
|
+
*/
|
|
40
|
+
export function mapJs(): Promise<boolean>;
|