@files-preview-app/preview-file 1.3.9 → 1.3.10
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/angular.cjs +50 -4
- package/dist/angular.cjs.map +1 -1
- package/dist/angular.js +50 -4
- package/dist/angular.js.map +1 -1
- package/dist/index.cjs +50 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +50 -4
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +50 -4
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +50 -4
- package/dist/react.js.map +1 -1
- package/dist/vue.cjs +50 -4
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +50 -4
- package/dist/vue.js.map +1 -1
- package/package.json +1 -1
package/dist/vue.cjs
CHANGED
|
@@ -4806,6 +4806,36 @@ var CodePlugin = class {
|
|
|
4806
4806
|
pre.style.transition = "transform 0.15s ease";
|
|
4807
4807
|
pre.style.flexShrink = "0";
|
|
4808
4808
|
} else {
|
|
4809
|
+
if (typeof document !== "undefined" && !document.getElementById("fp-code-syntax-styles")) {
|
|
4810
|
+
const style = document.createElement("style");
|
|
4811
|
+
style.id = "fp-code-syntax-styles";
|
|
4812
|
+
style.textContent = `
|
|
4813
|
+
.fp-code-scroll-wrapper .hljs-keyword { color: #569cd6; font-weight: normal; }
|
|
4814
|
+
.fp-code-scroll-wrapper .hljs-built_in { color: #4ec9b0; }
|
|
4815
|
+
.fp-code-scroll-wrapper .hljs-type { color: #4ec9b0; }
|
|
4816
|
+
.fp-code-scroll-wrapper .hljs-literal { color: #569cd6; }
|
|
4817
|
+
.fp-code-scroll-wrapper .hljs-number { color: #b5cea8; }
|
|
4818
|
+
.fp-code-scroll-wrapper .hljs-regexp { color: #d16969; }
|
|
4819
|
+
.fp-code-scroll-wrapper .hljs-string { color: #ce9178; }
|
|
4820
|
+
.fp-code-scroll-wrapper .hljs-subst { color: #d4d4d4; }
|
|
4821
|
+
.fp-code-scroll-wrapper .hljs-symbol { color: #569cd6; }
|
|
4822
|
+
.fp-code-scroll-wrapper .hljs-class { color: #4ec9b0; }
|
|
4823
|
+
.fp-code-scroll-wrapper .hljs-function { color: #dcdcaa; }
|
|
4824
|
+
.fp-code-scroll-wrapper .hljs-title { color: #dcdcaa; }
|
|
4825
|
+
.fp-code-scroll-wrapper .hljs-params { color: #9cdcfe; }
|
|
4826
|
+
.fp-code-scroll-wrapper .hljs-comment { color: #6a9955; font-style: italic; }
|
|
4827
|
+
.fp-code-scroll-wrapper .hljs-doctag { color: #608b4e; }
|
|
4828
|
+
.fp-code-scroll-wrapper .hljs-meta { color: #9cdcfe; }
|
|
4829
|
+
.fp-code-scroll-wrapper .hljs-section { color: #569cd6; }
|
|
4830
|
+
.fp-code-scroll-wrapper .hljs-tag { color: #569cd6; }
|
|
4831
|
+
.fp-code-scroll-wrapper .hljs-name { color: #569cd6; }
|
|
4832
|
+
.fp-code-scroll-wrapper .hljs-attr { color: #9cdcfe; }
|
|
4833
|
+
.fp-code-scroll-wrapper .hljs-attribute { color: #9cdcfe; }
|
|
4834
|
+
.fp-code-scroll-wrapper .hljs-variable { color: #9cdcfe; }
|
|
4835
|
+
.fp-code-scroll-wrapper .hljs-punctuation { color: #d4d4d4; }
|
|
4836
|
+
`;
|
|
4837
|
+
document.head.appendChild(style);
|
|
4838
|
+
}
|
|
4809
4839
|
ctx.container.style.backgroundColor = "#1e1e1e";
|
|
4810
4840
|
ctx.container.style.color = "#d4d4d4";
|
|
4811
4841
|
scrollWrapper.className = "fp-code-scroll-wrapper";
|
|
@@ -4815,9 +4845,13 @@ var CodePlugin = class {
|
|
|
4815
4845
|
scrollWrapper.style.height = "max-content";
|
|
4816
4846
|
scrollWrapper.style.display = "flex";
|
|
4817
4847
|
scrollWrapper.style.alignItems = "flex-start";
|
|
4818
|
-
scrollWrapper.style.padding = "16px";
|
|
4848
|
+
scrollWrapper.style.padding = "16px 16px 16px 0";
|
|
4819
4849
|
scrollWrapper.style.boxSizing = "border-box";
|
|
4820
|
-
const
|
|
4850
|
+
const rawLines = fullText.split(/\r?\n/);
|
|
4851
|
+
if (rawLines.length > 1 && rawLines[rawLines.length - 1] === "") {
|
|
4852
|
+
rawLines.pop();
|
|
4853
|
+
}
|
|
4854
|
+
const lineCount = Math.max(1, rawLines.length);
|
|
4821
4855
|
const gutterLines = [];
|
|
4822
4856
|
for (let i = 1; i <= lineCount; i++) {
|
|
4823
4857
|
gutterLines.push(String(i));
|
|
@@ -4825,16 +4859,23 @@ var CodePlugin = class {
|
|
|
4825
4859
|
lineGutter.className = "fp-code-gutter";
|
|
4826
4860
|
lineGutter.style.userSelect = "none";
|
|
4827
4861
|
lineGutter.style.textAlign = "right";
|
|
4828
|
-
lineGutter.style.
|
|
4829
|
-
lineGutter.style.
|
|
4862
|
+
lineGutter.style.padding = "0 16px";
|
|
4863
|
+
lineGutter.style.margin = "0 16px 0 0";
|
|
4830
4864
|
lineGutter.style.borderRight = "1px solid #333333";
|
|
4831
4865
|
lineGutter.style.color = "#858585";
|
|
4832
4866
|
lineGutter.style.fontFamily = "Consolas, Menlo, Monaco, 'Courier New', monospace";
|
|
4833
4867
|
lineGutter.style.fontSize = `${fontSize}px`;
|
|
4834
4868
|
lineGutter.style.lineHeight = "1.6";
|
|
4869
|
+
lineGutter.style.whiteSpace = "pre";
|
|
4835
4870
|
lineGutter.style.flexShrink = "0";
|
|
4871
|
+
lineGutter.style.position = "sticky";
|
|
4872
|
+
lineGutter.style.left = "0";
|
|
4873
|
+
lineGutter.style.backgroundColor = "#1e1e1e";
|
|
4874
|
+
lineGutter.style.zIndex = "2";
|
|
4875
|
+
lineGutter.style.boxSizing = "border-box";
|
|
4836
4876
|
lineGutter.textContent = gutterLines.join("\n");
|
|
4837
4877
|
pre.style.margin = "0";
|
|
4878
|
+
pre.style.padding = "0 16px 0 0";
|
|
4838
4879
|
pre.style.fontFamily = "Consolas, Menlo, Monaco, 'Courier New', monospace";
|
|
4839
4880
|
pre.style.fontSize = `${fontSize}px`;
|
|
4840
4881
|
pre.style.lineHeight = "1.6";
|
|
@@ -4842,6 +4883,11 @@ var CodePlugin = class {
|
|
|
4842
4883
|
pre.style.wordBreak = "normal";
|
|
4843
4884
|
pre.style.overflowWrap = "normal";
|
|
4844
4885
|
pre.style.flex = "1";
|
|
4886
|
+
code.style.display = "block";
|
|
4887
|
+
code.style.fontFamily = "inherit";
|
|
4888
|
+
code.style.fontSize = "inherit";
|
|
4889
|
+
code.style.lineHeight = "inherit";
|
|
4890
|
+
code.style.whiteSpace = "inherit";
|
|
4845
4891
|
}
|
|
4846
4892
|
const ext = (ctx.metadata.extension || "").replace(".", "");
|
|
4847
4893
|
const renderCodePage = (text) => {
|