@cenk1cenk2/md-printer 3.2.24 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +213 -57
- package/dist/_virtual/{_@oxc-project_runtime@0.156.0 → _@oxc-project_runtime@0.157.0}/helpers/esm/decorate.mjs +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.156.0 → _@oxc-project_runtime@0.157.0}/helpers/esm/decorateMetadata.mjs +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.156.0 → _@oxc-project_runtime@0.157.0}/helpers/esm/decorateParam.mjs +1 -1
- package/dist/commands/index.mjs +3 -1
- package/dist/components/Localized.svelte +18 -0
- package/dist/components/SignatureBlock.svelte +8 -46
- package/dist/components/Translate.svelte +15 -0
- package/dist/components/extension.ts +8 -0
- package/dist/components/index.ts +3 -0
- package/dist/constants/attachment.constants.mjs +7 -0
- package/dist/constants/index.mjs +3 -2
- package/dist/constants/template.constants.mjs +26 -2
- package/dist/interfaces/attachment.interface.mjs +1 -0
- package/dist/modules/md-printer/md-printer.handler.mjs +4 -2
- package/dist/modules/md-printer/md-printer.module.mjs +1 -1
- package/dist/modules/md-printer/md-printer.schema.mjs +12 -1
- package/dist/services/i18n.service.mjs +6 -4
- package/dist/services/index.mjs +2 -1
- package/dist/services/markdown.service.mjs +1 -1
- package/dist/services/pdf/pdf.service.mjs +124 -0
- package/dist/services/printer.module.mjs +3 -1
- package/dist/services/printer.service.mjs +55 -11
- package/dist/services/renderer/browser.service.mjs +3 -3
- package/dist/services/renderer/renderer.service.mjs +3 -3
- package/dist/services/session/preview.service.mjs +2 -2
- package/dist/services/session/session.service.mjs +11 -11
- package/dist/services/signature/adapters/a-trust.adapter.mjs +2 -2
- package/dist/services/signature/signature.service.mjs +2 -2
- package/dist/services/template/assets.mjs +1 -1
- package/dist/services/template/render.entry.ts +6 -2
- package/dist/services/template/svelte.plugin.mjs +12 -7
- package/dist/services/template/template.schema.mjs +27 -0
- package/dist/services/template/template.service.mjs +123 -26
- package/oclif.manifest.json +16 -2
- package/package.json +14 -24
- package/templates/default/Template.svelte +0 -83
- package/templates/default/settings.json +0 -7
- package/templates/invoice/Template.svelte +0 -247
- package/templates/invoice/components/Client.svelte +0 -42
- package/templates/invoice/components/Company.svelte +0 -41
- package/templates/invoice/components/Items.svelte +0 -66
- package/templates/invoice/components/Notes.svelte +0 -21
- package/templates/invoice/components/Payment.svelte +0 -25
- package/templates/invoice/components/Signature.svelte +0 -34
- package/templates/invoice/components/Totals.svelte +0 -47
- package/templates/invoice/i18n/de.yaml +0 -30
- package/templates/invoice/i18n/en.yaml +0 -30
- package/templates/invoice/round.js +0 -2
- package/templates/invoice/settings.json +0 -11
- package/templates/kilic.dev/Template.svelte +0 -102
- package/templates/kilic.dev/settings.json +0 -7
- package/templates/mail/Template.svelte +0 -166
- package/templates/mail/settings.json +0 -7
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Markdown, Page, PageNumber, Title, TotalPages } from '@cenk1cenk2/md-printer/components'
|
|
3
|
-
|
|
4
|
-
let { data } = $props()
|
|
5
|
-
|
|
6
|
-
const logo = 'https://main.s3.kilic.dev/html/icon.png'
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<svelte:head>
|
|
10
|
-
{#if data.documentTitle}
|
|
11
|
-
<title>{data.documentTitle}</title>
|
|
12
|
-
{/if}
|
|
13
|
-
</svelte:head>
|
|
14
|
-
|
|
15
|
-
<Page>
|
|
16
|
-
{#snippet header()}
|
|
17
|
-
<header style="margin: 0 auto; text-align: center; font-family: monospace; color: #242424">
|
|
18
|
-
<img height="24" src={logo} alt="logo" />
|
|
19
|
-
</header>
|
|
20
|
-
{/snippet}
|
|
21
|
-
|
|
22
|
-
{#snippet footer()}
|
|
23
|
-
<footer style="margin: 0 auto; text-align: center; font-size: 8px; color: #38404b; width: 100%; border-top: 1px solid #efefef; padding-top: 8px">
|
|
24
|
-
<img height="8" src={logo} alt="logo" />
|
|
25
|
-
<span>kilic.dev</span>
|
|
26
|
-
-
|
|
27
|
-
<Title />
|
|
28
|
-
-
|
|
29
|
-
<PageNumber />/<TotalPages />
|
|
30
|
-
</footer>
|
|
31
|
-
{/snippet}
|
|
32
|
-
|
|
33
|
-
<Markdown />
|
|
34
|
-
</Page>
|
|
35
|
-
|
|
36
|
-
<style lang="postcss">
|
|
37
|
-
@import 'github-markdown-css/github-markdown-light.css';
|
|
38
|
-
@import '@fontsource/montserrat/latin-400.css';
|
|
39
|
-
@import '@fontsource/montserrat/latin-ext-400.css';
|
|
40
|
-
@import '@fontsource/montserrat/latin-700.css';
|
|
41
|
-
@import '@fontsource/montserrat/latin-ext-700.css';
|
|
42
|
-
@import '@fontsource/montserrat/latin-800.css';
|
|
43
|
-
@import '@fontsource/montserrat/latin-ext-800.css';
|
|
44
|
-
|
|
45
|
-
.markdown-body {
|
|
46
|
-
font-size: 11px;
|
|
47
|
-
font-family: 'Montserrat', sans-serif;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.markdown-body h1,
|
|
51
|
-
.markdown-body h2 {
|
|
52
|
-
font-weight: 800;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.markdown-body h3,
|
|
56
|
-
.markdown-body h4,
|
|
57
|
-
.markdown-body h5,
|
|
58
|
-
.markdown-body h6,
|
|
59
|
-
.markdown-body strong,
|
|
60
|
-
.markdown-body b {
|
|
61
|
-
font-weight: 700;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.markdown-body pre > code {
|
|
65
|
-
white-space: pre-wrap;
|
|
66
|
-
padding: 0;
|
|
67
|
-
margin: 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.markdown-body .document-title-header {
|
|
71
|
-
height: 500px;
|
|
72
|
-
margin: auto auto;
|
|
73
|
-
padding-top: 50%;
|
|
74
|
-
break-after: page;
|
|
75
|
-
border-bottom: 0;
|
|
76
|
-
font-size: 2.5em;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.markdown-body pre {
|
|
80
|
-
padding: 12px 8px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.markdown-body output pre {
|
|
84
|
-
margin-top: -36px;
|
|
85
|
-
border-top-left-radius: 0;
|
|
86
|
-
border-top-right-radius: 0;
|
|
87
|
-
border-top: 2px solid #d1d9e0;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.markdown-body output::before {
|
|
91
|
-
padding: 4px 16px;
|
|
92
|
-
position: relative;
|
|
93
|
-
top: -24px;
|
|
94
|
-
border-top-left-radius: 4px;
|
|
95
|
-
border-top-right-radius: 4px;
|
|
96
|
-
border-top: 2px solid #d1d9e0;
|
|
97
|
-
color: #59636e;
|
|
98
|
-
background-color: #f6f8fa;
|
|
99
|
-
content: '> output';
|
|
100
|
-
font-size: 0.85em;
|
|
101
|
-
}
|
|
102
|
-
</style>
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Page } from '@cenk1cenk2/md-printer/components'
|
|
3
|
-
|
|
4
|
-
let { content } = $props()
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<svelte:head>
|
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
9
|
-
<meta charset="UTF-8" />
|
|
10
|
-
</svelte:head>
|
|
11
|
-
|
|
12
|
-
<Page>
|
|
13
|
-
<!-- eslint-disable-next-line svelte/no-at-html-tags -- markdown input is trusted, same as the document itself -->
|
|
14
|
-
<div class="leading-tight prose">{@html content}</div>
|
|
15
|
-
</Page>
|
|
16
|
-
|
|
17
|
-
<style lang="postcss">
|
|
18
|
-
@import '@fontsource/montserrat/latin-400.css';
|
|
19
|
-
@import '@fontsource/montserrat/latin-ext-400.css';
|
|
20
|
-
@import '@fontsource/montserrat/latin-700.css';
|
|
21
|
-
@import '@fontsource/montserrat/latin-ext-700.css';
|
|
22
|
-
|
|
23
|
-
@import 'tailwindcss';
|
|
24
|
-
@plugin '@tailwindcss/typography';
|
|
25
|
-
|
|
26
|
-
@theme {
|
|
27
|
-
--font-sans: 'Montserrat';
|
|
28
|
-
--font-serif: 'Montserrat';
|
|
29
|
-
--font-weight-semibold: 700;
|
|
30
|
-
--font-weight-bold: 800;
|
|
31
|
-
--font-weight-extrabold: 900;
|
|
32
|
-
--color-primary-500: #cd0043;
|
|
33
|
-
--color-gray-50: oklch(98.5% 0.002 247.839);
|
|
34
|
-
--color-gray-100: #abb2bf;
|
|
35
|
-
--color-gray-200: #979eab;
|
|
36
|
-
--color-gray-300: #7c8a9d;
|
|
37
|
-
--color-gray-400: #5c6370;
|
|
38
|
-
--color-gray-500: #4b5263;
|
|
39
|
-
--color-gray-600: #2c333d;
|
|
40
|
-
--color-gray-700: #22282f;
|
|
41
|
-
--color-gray-800: #1e2127;
|
|
42
|
-
--color-gray-900: #17191e;
|
|
43
|
-
--color-gray-950: oklch(13% 0.028 261.692);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
*,
|
|
47
|
-
::after,
|
|
48
|
-
::before,
|
|
49
|
-
::backdrop,
|
|
50
|
-
::file-selector-button {
|
|
51
|
-
border-color: var(--color-gray-200, currentcolor);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
body {
|
|
55
|
-
font-family: var(--font-sans);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
address {
|
|
59
|
-
@apply text-sm;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/* Typography styles converted from config */
|
|
63
|
-
.prose a {
|
|
64
|
-
text-decoration: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.prose h1 {
|
|
68
|
-
font-weight: 800;
|
|
69
|
-
padding-top: 0.1875rem;
|
|
70
|
-
/* 0.75 * 0.25rem */
|
|
71
|
-
padding-bottom: 0.1875rem;
|
|
72
|
-
margin-bottom: 0;
|
|
73
|
-
margin-top: 0;
|
|
74
|
-
border-width: 0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.prose h2 {
|
|
78
|
-
font-weight: 800;
|
|
79
|
-
padding-top: 0.125rem;
|
|
80
|
-
/* 0.5 * 0.25rem */
|
|
81
|
-
padding-bottom: 0.125rem;
|
|
82
|
-
margin-bottom: 0;
|
|
83
|
-
margin-top: 0;
|
|
84
|
-
border-width: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.prose h3 {
|
|
88
|
-
font-weight: 700;
|
|
89
|
-
padding-top: 0.0625rem;
|
|
90
|
-
/* 0.25 * 0.25rem */
|
|
91
|
-
padding-bottom: 0.0625rem;
|
|
92
|
-
margin-bottom: 0;
|
|
93
|
-
margin-top: 0;
|
|
94
|
-
border-width: 0;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
p {
|
|
98
|
-
margin: 0.1em 0em;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.prose blockquote {
|
|
102
|
-
font-weight: 400;
|
|
103
|
-
color: var(--color-gray-600);
|
|
104
|
-
font-style: normal;
|
|
105
|
-
quotes: '\201C' '\201D' '\2018' '\2019';
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.prose blockquote p:first-of-type::before {
|
|
109
|
-
content: '';
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.prose blockquote p:last-of-type::after {
|
|
113
|
-
content: '';
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.prose ul > li {
|
|
117
|
-
padding-left: 1em;
|
|
118
|
-
text-align: left;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.prose ol > li {
|
|
122
|
-
padding-left: 1em;
|
|
123
|
-
text-align: left;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.prose ol > li::before {
|
|
127
|
-
top: calc(0.875em - 0.1em);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.prose ul > li::before {
|
|
131
|
-
top: calc(0.875em - 0.1em);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
html {
|
|
135
|
-
font-size: 12px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.page-break {
|
|
139
|
-
page-break-after: always;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.text-vertical {
|
|
143
|
-
text-orientation: upright;
|
|
144
|
-
writing-mode: vertical-lr;
|
|
145
|
-
display: flex;
|
|
146
|
-
flex-direction: column;
|
|
147
|
-
justify-content: center;
|
|
148
|
-
@apply p-4;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
table th {
|
|
152
|
-
@apply bg-gray-700 text-white;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
table tr {
|
|
156
|
-
border-top: 0;
|
|
157
|
-
@apply even:bg-gray-50;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
table th,
|
|
161
|
-
table td,
|
|
162
|
-
table tr {
|
|
163
|
-
border: 0;
|
|
164
|
-
padding: 0.5em 0.5em;
|
|
165
|
-
}
|
|
166
|
-
</style>
|