@fileverse-dev/ddoc 2.1.2-patch-3.1 → 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 +142 -90
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -79767,9 +79767,6 @@ const x5 = [
79767
79767
  .ProseMirror img {
79768
79768
  max-width: 720px;
79769
79769
  max-height: calc(100vh - 96px);
79770
- width: initial !important;
79771
- height: initial !important;
79772
- object-fit: scale-down;
79773
79770
  display: block;
79774
79771
  margin: 16px auto;
79775
79772
  position: relative;
@@ -79841,20 +79838,35 @@ const x5 = [
79841
79838
  `;
79842
79839
  iX(n);
79843
79840
  }, rX = (t) => {
79844
- 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 = `
79845
79860
  <!DOCTYPE html>
79846
79861
  <html>
79847
79862
  <head>
79863
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
79848
79864
  <title>Print Preview</title>
79849
79865
  <style>
79850
- @page {
79851
- margin: 0.3in 0.5in 0.3in 0.5in !important;
79852
- }
79853
- @page :first {
79854
- margin: -0.25in 0.5in 0.3in 0.5in !important;
79855
- }
79856
79866
  @media print {
79857
- @page { margin: 0; }
79867
+ @page {
79868
+ margin: 0.25in 0.5in;
79869
+ }
79858
79870
  html {
79859
79871
  -webkit-print-color-adjust: exact;
79860
79872
  print-color-adjust: exact;
@@ -79877,9 +79889,8 @@ const x5 = [
79877
79889
  margin: 0;
79878
79890
  }
79879
79891
  img {
79880
- max-width: initial;
79881
- height: initial;
79882
- object-fit: scale-down;
79892
+ max-width: fit-content;
79893
+ height: auto;
79883
79894
  aspect-ratio: auto;
79884
79895
  display: block;
79885
79896
  margin-left: auto;
@@ -79909,86 +79920,128 @@ const x5 = [
79909
79920
  appearance: none;
79910
79921
  background-color: #fff;
79911
79922
  margin: 0;
79912
- cursor: pointer;
79913
- width: 1.5em;
79914
- height: 1.5em;
79915
- position: relative;
79916
- border: 2px solid black;
79917
- margin-right: 0.5rem;
79918
- display: grid;
79919
- place-content: center;
79920
- }
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
+ }
79921
79970
 
79922
- input[type='checkbox']::before {
79923
- content: '';
79924
- width: 1em;
79925
- height: 1em;
79926
- transform: scale(0);
79927
- transition: 120ms transform ease-in-out;
79928
- box-shadow: inset 1em 1em;
79929
- transform-origin: center;
79930
- clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
79931
- }
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
+ }
79932
79981
 
79933
- input[type='checkbox']:checked::before {
79934
- transform: scale(1);
79935
- }
79982
+ input[type='checkbox']:checked::before {
79983
+ transform: scale(1);
79984
+ }
79936
79985
 
79937
- li:has(input[type="checkbox"]) {
79938
- list-style-type: none;
79939
- transform: translateX(-16px);
79940
- font-size: 24px;
79941
- display: flex;
79942
- align-items: center;
79943
- }
79944
- ol {
79945
- list-style-type: decimal;
79946
- }
79947
- ol ol {
79948
- list-style-type: lower-latin;
79949
- }
79950
- ol ol ol {
79951
- list-style-type: lower-roman;
79952
- }
79953
- /* Tables */
79954
- table {
79955
- width: 100%;
79956
- border-collapse: collapse;
79957
- margin: 16px 0;
79958
- font-size: 16px;
79959
- }
79960
- th {
79961
- background: #F8F9FA;
79962
- font-weight: 600;
79963
- text-align: left;
79964
- }
79965
- td, th {
79966
- border: 1px solid #E8EBEC;
79967
- padding: 12px;
79968
- }
79969
- /* Code blocks */
79970
- pre {
79971
- background: #F8F9FA;
79972
- padding: 16px;
79973
- border-radius: 4px;
79974
- font-family: monospace;
79975
- font-size: 12px;
79976
- margin: 16px 0;
79977
- }
79978
- /* Blockquotes */
79979
- blockquote {
79980
- border-left: 4px solid #E8EBEC;
79981
- margin: 16px 0;
79982
- padding-left: 16px;
79983
- font-style: italic;
79984
- }
79985
- body {
79986
- 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
+ }
79987
80034
  }
79988
80035
  </style>
79989
80036
  </head>
79990
80037
  <body>
79991
- ${t}
80038
+ ${n.map(
80039
+ (a) => `
80040
+ <div class="print-page">
80041
+ ${a}
80042
+ </div>
80043
+ `
80044
+ ).join("")}
79992
80045
  <script>
79993
80046
  window.onload = () => {
79994
80047
  window.print();
@@ -79998,9 +80051,8 @@ const x5 = [
79998
80051
  }
79999
80052
  <\/script>
80000
80053
  </body>
80001
- </html>
80002
- `;
80003
- iX(e);
80054
+ </html>`;
80055
+ iX(s);
80004
80056
  }, iX = (t) => {
80005
80057
  var s;
80006
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.1",
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": {