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