@fileverse-dev/ddoc 2.1.2-patch-3.2 → 2.1.2-patch-3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.es.js +140 -84
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -79838,20 +79838,35 @@ const x5 = [
79838
79838
  `;
79839
79839
  iX(n);
79840
79840
  }, rX = (t) => {
79841
- const e = `
79841
+ const e = document.createElement("div");
79842
+ e.innerHTML = t;
79843
+ const n = [];
79844
+ let r = [];
79845
+ if (Array.from(e.childNodes).forEach((a) => {
79846
+ if (a instanceof HTMLElement && (a.getAttribute("data-type") === "page-break" && a.getAttribute("data-page-break") === "true" || a.tagName.toLowerCase() === "br" && a.getAttribute("data-page-break") === "true")) {
79847
+ if (r.length > 0) {
79848
+ const o = document.createElement("div");
79849
+ r.forEach(
79850
+ (l) => o.appendChild(l.cloneNode(!0))
79851
+ ), n.push(o.innerHTML), r = [];
79852
+ }
79853
+ } else
79854
+ r.push(a.cloneNode(!0));
79855
+ }), r.length > 0) {
79856
+ const a = document.createElement("div");
79857
+ r.forEach((o) => a.appendChild(o.cloneNode(!0))), n.push(a.innerHTML);
79858
+ }
79859
+ const s = `
79842
79860
  <!DOCTYPE html>
79843
79861
  <html>
79844
79862
  <head>
79863
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
79845
79864
  <title>Print Preview</title>
79846
79865
  <style>
79847
- @page {
79848
- margin: 0.3in 0.5in 0.3in 0.5in !important;
79849
- }
79850
- @page :first {
79851
- margin: -0.25in 0.5in 0.3in 0.5in !important;
79852
- }
79853
79866
  @media print {
79854
- @page { margin: 0; }
79867
+ @page {
79868
+ margin: 0.25in 0.5in;
79869
+ }
79855
79870
  html {
79856
79871
  -webkit-print-color-adjust: exact;
79857
79872
  print-color-adjust: exact;
@@ -79905,86 +79920,128 @@ const x5 = [
79905
79920
  appearance: none;
79906
79921
  background-color: #fff;
79907
79922
  margin: 0;
79908
- cursor: pointer;
79909
- width: 1.5em;
79910
- height: 1.5em;
79911
- position: relative;
79912
- border: 2px solid black;
79913
- margin-right: 0.5rem;
79914
- display: grid;
79915
- place-content: center;
79916
- }
79923
+ font-family: 'Inter', sans-serif;
79924
+ }
79925
+ .print-page {
79926
+ page-break-after: always;
79927
+ box-sizing: border-box;
79928
+ }
79929
+ .print-page:last-child {
79930
+ page-break-after: auto;
79931
+ }
79932
+
79933
+ img {
79934
+ max-width: 100%;
79935
+ height: auto;
79936
+ }
79937
+ h3 {
79938
+ font-weight: 600;
79939
+ color: #0D0D0D;
79940
+ font-size: 20px;
79941
+ line-height: 1.2;
79942
+ }
79943
+ p {
79944
+ line-height: 1.5;
79945
+ color: #0D0D0D;
79946
+ font-size: 16px;
79947
+ }
79948
+ /* Lists */
79949
+ ul, ol {
79950
+ font-size: 16px;
79951
+ line-height: 1.5;
79952
+ margin: 0 0 16px 0;
79953
+ padding-left: 24px;
79954
+ }
79955
+ /* Task List Styles */
79956
+ input[type='checkbox'] {
79957
+ -webkit-appearance: none;
79958
+ appearance: none;
79959
+ background-color: #fff;
79960
+ margin: 0;
79961
+ cursor: pointer;
79962
+ width: 1.5em;
79963
+ height: 1.5em;
79964
+ position: relative;
79965
+ border: 2px solid black;
79966
+ margin-right: 0.5rem;
79967
+ display: grid;
79968
+ place-content: center;
79969
+ }
79917
79970
 
79918
- input[type='checkbox']::before {
79919
- content: '';
79920
- width: 1em;
79921
- height: 1em;
79922
- transform: scale(0);
79923
- transition: 120ms transform ease-in-out;
79924
- box-shadow: inset 1em 1em;
79925
- transform-origin: center;
79926
- clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
79927
- }
79971
+ input[type='checkbox']::before {
79972
+ content: '';
79973
+ width: 1em;
79974
+ height: 1em;
79975
+ transform: scale(0);
79976
+ transition: 120ms transform ease-in-out;
79977
+ box-shadow: inset 1em 1em;
79978
+ transform-origin: center;
79979
+ clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
79980
+ }
79928
79981
 
79929
- input[type='checkbox']:checked::before {
79930
- transform: scale(1);
79931
- }
79982
+ input[type='checkbox']:checked::before {
79983
+ transform: scale(1);
79984
+ }
79932
79985
 
79933
- li:has(input[type="checkbox"]) {
79934
- list-style-type: none;
79935
- transform: translateX(-16px);
79936
- font-size: 24px;
79937
- display: flex;
79938
- align-items: center;
79939
- }
79940
- ol {
79941
- list-style-type: decimal;
79942
- }
79943
- ol ol {
79944
- list-style-type: lower-latin;
79945
- }
79946
- ol ol ol {
79947
- list-style-type: lower-roman;
79948
- }
79949
- /* Tables */
79950
- table {
79951
- width: 100%;
79952
- border-collapse: collapse;
79953
- margin: 16px 0;
79954
- font-size: 16px;
79955
- }
79956
- th {
79957
- background: #F8F9FA;
79958
- font-weight: 600;
79959
- text-align: left;
79960
- }
79961
- td, th {
79962
- border: 1px solid #E8EBEC;
79963
- padding: 12px;
79964
- }
79965
- /* Code blocks */
79966
- pre {
79967
- background: #F8F9FA;
79968
- padding: 16px;
79969
- border-radius: 4px;
79970
- font-family: monospace;
79971
- font-size: 12px;
79972
- margin: 16px 0;
79973
- }
79974
- /* Blockquotes */
79975
- blockquote {
79976
- border-left: 4px solid #E8EBEC;
79977
- margin: 16px 0;
79978
- padding-left: 16px;
79979
- font-style: italic;
79980
- }
79981
- body {
79982
- padding: 10mm;
79986
+ li:has(input[type="checkbox"]) {
79987
+ list-style-type: none;
79988
+ transform: translateX(-16px);
79989
+ font-size: 24px;
79990
+ display: flex;
79991
+ align-items: center;
79992
+ }
79993
+ ol {
79994
+ list-style-type: decimal;
79995
+ }
79996
+ ol ol {
79997
+ list-style-type: lower-latin;
79998
+ }
79999
+ ol ol ol {
80000
+ list-style-type: lower-roman;
80001
+ }
80002
+ /* Tables */
80003
+ table {
80004
+ width: 100%;
80005
+ border-collapse: collapse;
80006
+ margin: 16px 0;
80007
+ font-size: 16px;
80008
+ }
80009
+ th {
80010
+ background: #F8F9FA;
80011
+ font-weight: 600;
80012
+ text-align: left;
80013
+ }
80014
+ td, th {
80015
+ border: 1px solid #E8EBEC;
80016
+ padding: 12px;
80017
+ }
80018
+ /* Code blocks */
80019
+ pre {
80020
+ background: #F8F9FA;
80021
+ padding: 16px;
80022
+ border-radius: 4px;
80023
+ font-family: monospace;
80024
+ font-size: 12px;
80025
+ margin: 16px 0;
80026
+ }
80027
+ /* Blockquotes */
80028
+ blockquote {
80029
+ border-left: 4px solid #E8EBEC;
80030
+ margin: 16px 0;
80031
+ padding-left: 16px;
80032
+ font-style: italic;
80033
+ }
79983
80034
  }
79984
80035
  </style>
79985
80036
  </head>
79986
80037
  <body>
79987
- ${t}
80038
+ ${n.map(
80039
+ (a) => `
80040
+ <div class="print-page">
80041
+ ${a}
80042
+ </div>
80043
+ `
80044
+ ).join("")}
79988
80045
  <script>
79989
80046
  window.onload = () => {
79990
80047
  window.print();
@@ -79994,9 +80051,8 @@ const x5 = [
79994
80051
  }
79995
80052
  <\/script>
79996
80053
  </body>
79997
- </html>
79998
- `;
79999
- iX(e);
80054
+ </html>`;
80055
+ iX(s);
80000
80056
  }, iX = (t) => {
80001
80057
  var s;
80002
80058
  const e = document.createElement("div");
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "2.1.2-patch-3.2",
5
+ "version": "2.1.2-patch-3.3",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {