Skip to content

Commit 2841d2a

Browse files
committed
Update directory trees
1 parent f6dd98e commit 2841d2a

34 files changed

Lines changed: 1662 additions & 157 deletions

File tree

docxjs/.github/index.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5+
<meta name="Author" content="Made by 'tree'">
6+
<meta name="GENERATOR" content="tree v2.1.1 © 1996 - 2023 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro">
7+
<title>Directory Tree</title>
8+
<style type="text/css">
9+
BODY { font-family : monospace, sans-serif; color: black;}
10+
P { font-family : monospace, sans-serif; color: black; margin:0px; padding: 0px;}
11+
A:visited { text-decoration : none; margin : 0px; padding : 0px;}
12+
A:link { text-decoration : none; margin : 0px; padding : 0px;}
13+
A:hover { text-decoration: underline; background-color : yellow; margin : 0px; padding : 0px;}
14+
A:active { margin : 0px; padding : 0px;}
15+
.VERSION { font-size: small; font-family : arial, sans-serif; }
16+
.NORM { color: black; }
17+
.FIFO { color: purple; }
18+
.CHAR { color: yellow; }
19+
.DIR { color: blue; }
20+
.BLOCK { color: yellow; }
21+
.LINK { color: aqua; }
22+
.SOCK { color: fuchsia;}
23+
.EXEC { color: green; }
24+
</style>
25+
</head>
26+
<body>
27+
<h1>Directory Tree</h1><p>
28+
<a href="../">👆 回到上一级目录</a><br>
29+
├── <a href="./ISSUE_TEMPLATE/">ISSUE_TEMPLATE</a><br>
30+
│   └── <a href="./ISSUE_TEMPLATE/document-rendering-bug-report.md">document-rendering-bug-report.md</a><br>
31+
└── <a href="./workflows/">workflows</a><br>
32+
&nbsp;&nbsp;&nbsp; └── <a href="./workflows/webpack.yml">webpack.yml</a><br>
33+
<br><br><p>
34+
35+
3 directories, 2 files
36+
37+
</p>
38+
<hr>
39+
<p class="VERSION">
40+
tree v2.1.1 © 1996 - 2023 by Steve Baker and Thomas Moore <br>
41+
HTML output hacked and copyleft © 1998 by Francesc Rocher <br>
42+
JSON output hacked and copyleft © 2014 by Florian Sesser <br>
43+
Charsets / OS/2 support © 2001 by Kyosuke Tokoro
44+
</p>
45+
</body>
46+
</html>
47+
<style>body { font-family: Arial, sans-serif; } .tree { margin: 20px; } .tree ul { list-style-type: none; margin-left: 20px; padding-left: 1em; position: relative; } .tree ul ul::before { content: ""; display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background-color: #ccc; } .tree li { margin: 5px 0; padding-left: 1.5em; position: relative; } .tree li::before { content: ""; display: block; position: absolute; left: 0; top: 0.7em; width: 10px; height: 1px; background-color: #ccc; } .tree a { color: #0366d6; text-decoration: none; } .tree a:hover { text-decoration: underline; } .back-link { font-weight: bold; color: #0366d6; }</style>

docxjs/demo/index.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5+
<meta name="Author" content="Made by 'tree'">
6+
<meta name="GENERATOR" content="tree v2.1.1 © 1996 - 2023 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro">
7+
<title>Directory Tree</title>
8+
<style type="text/css">
9+
BODY { font-family : monospace, sans-serif; color: black;}
10+
P { font-family : monospace, sans-serif; color: black; margin:0px; padding: 0px;}
11+
A:visited { text-decoration : none; margin : 0px; padding : 0px;}
12+
A:link { text-decoration : none; margin : 0px; padding : 0px;}
13+
A:hover { text-decoration: underline; background-color : yellow; margin : 0px; padding : 0px;}
14+
A:active { margin : 0px; padding : 0px;}
15+
.VERSION { font-size: small; font-family : arial, sans-serif; }
16+
.NORM { color: black; }
17+
.FIFO { color: purple; }
18+
.CHAR { color: yellow; }
19+
.DIR { color: blue; }
20+
.BLOCK { color: yellow; }
21+
.LINK { color: aqua; }
22+
.SOCK { color: fuchsia;}
23+
.EXEC { color: green; }
24+
</style>
25+
</head>
26+
<body>
27+
<h1>Directory Tree</h1><p>
28+
<a href="../">👆 回到上一级目录</a><br>
29+
├── <a href="./thumbnail.example.css">thumbnail.example.css</a><br>
30+
├── <a href="./thumbnail.example.js">thumbnail.example.js</a><br>
31+
└── <a href="./tiff-preprocessor.js">tiff-preprocessor.js</a><br>
32+
<br><br><p>
33+
34+
1 directory, 3 files
35+
36+
</p>
37+
<hr>
38+
<p class="VERSION">
39+
tree v2.1.1 © 1996 - 2023 by Steve Baker and Thomas Moore <br>
40+
HTML output hacked and copyleft © 1998 by Francesc Rocher <br>
41+
JSON output hacked and copyleft © 2014 by Florian Sesser <br>
42+
Charsets / OS/2 support © 2001 by Kyosuke Tokoro
43+
</p>
44+
</body>
45+
</html>
46+
<style>body { font-family: Arial, sans-serif; } .tree { margin: 20px; } .tree ul { list-style-type: none; margin-left: 20px; padding-left: 1em; position: relative; } .tree ul ul::before { content: ""; display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background-color: #ccc; } .tree li { margin: 5px 0; padding-left: 1.5em; position: relative; } .tree li::before { content: ""; display: block; position: absolute; left: 0; top: 0.7em; width: 10px; height: 1px; background-color: #ccc; } .tree a { color: #0366d6; text-decoration: none; } .tree a:hover { text-decoration: underline; } .back-link { font-weight: bold; color: #0366d6; }</style>

docxjs/dist/index.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5+
<meta name="Author" content="Made by 'tree'">
6+
<meta name="GENERATOR" content="tree v2.1.1 © 1996 - 2023 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro">
7+
<title>Directory Tree</title>
8+
<style type="text/css">
9+
BODY { font-family : monospace, sans-serif; color: black;}
10+
P { font-family : monospace, sans-serif; color: black; margin:0px; padding: 0px;}
11+
A:visited { text-decoration : none; margin : 0px; padding : 0px;}
12+
A:link { text-decoration : none; margin : 0px; padding : 0px;}
13+
A:hover { text-decoration: underline; background-color : yellow; margin : 0px; padding : 0px;}
14+
A:active { margin : 0px; padding : 0px;}
15+
.VERSION { font-size: small; font-family : arial, sans-serif; }
16+
.NORM { color: black; }
17+
.FIFO { color: purple; }
18+
.CHAR { color: yellow; }
19+
.DIR { color: blue; }
20+
.BLOCK { color: yellow; }
21+
.LINK { color: aqua; }
22+
.SOCK { color: fuchsia;}
23+
.EXEC { color: green; }
24+
</style>
25+
</head>
26+
<body>
27+
<h1>Directory Tree</h1><p>
28+
<a href="../">👆 回到上一级目录</a><br>
29+
├── <a href="./docx-preview.d.ts">docx-preview.d.ts</a><br>
30+
├── <a href="./docx-preview.js">docx-preview.js</a><br>
31+
├── <a href="./docx-preview.js.map">docx-preview.js.map</a><br>
32+
├── <a href="./docx-preview.min.js">docx-preview.min.js</a><br>
33+
├── <a href="./docx-preview.min.js.map">docx-preview.min.js.map</a><br>
34+
├── <a href="./docx-preview.min.mjs">docx-preview.min.mjs</a><br>
35+
├── <a href="./docx-preview.min.mjs.map">docx-preview.min.mjs.map</a><br>
36+
├── <a href="./docx-preview.mjs">docx-preview.mjs</a><br>
37+
└── <a href="./docx-preview.mjs.map">docx-preview.mjs.map</a><br>
38+
<br><br><p>
39+
40+
1 directory, 9 files
41+
42+
</p>
43+
<hr>
44+
<p class="VERSION">
45+
tree v2.1.1 © 1996 - 2023 by Steve Baker and Thomas Moore <br>
46+
HTML output hacked and copyleft © 1998 by Francesc Rocher <br>
47+
JSON output hacked and copyleft © 2014 by Florian Sesser <br>
48+
Charsets / OS/2 support © 2001 by Kyosuke Tokoro
49+
</p>
50+
</body>
51+
</html>
52+
<style>body { font-family: Arial, sans-serif; } .tree { margin: 20px; } .tree ul { list-style-type: none; margin-left: 20px; padding-left: 1em; position: relative; } .tree ul ul::before { content: ""; display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background-color: #ccc; } .tree li { margin: 5px 0; padding-left: 1.5em; position: relative; } .tree li::before { content: ""; display: block; position: absolute; left: 0; top: 0.7em; width: 10px; height: 1px; background-color: #ccc; } .tree a { color: #0366d6; text-decoration: none; } .tree a:hover { text-decoration: underline; } .back-link { font-weight: bold; color: #0366d6; }</style>

docxjs/index.html

Lines changed: 81 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -1,161 +1,86 @@
11
<!DOCTYPE html>
22
<html>
3-
43
<head>
5-
<meta charset="UTF-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
7-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
8-
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
9-
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
10-
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
11-
crossorigin="anonymous"></script>
12-
<!--dependencies-->
13-
<script crossorigin src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
14-
<!--library-->
15-
<script src="dist/docx-preview.js"></script>
16-
<!--thumbnail example-->
17-
<script src="./demo/thumbnail.example.js"></script>
18-
<link href="./demo/thumbnail.example.css" rel="stylesheet">
19-
<script crossorigin src="https://unpkg.com/tiff.js@1.0.0/tiff.min.js"></script>
20-
<script src="./demo/tiff-preprocessor.js"></script>
21-
22-
<style>
23-
@media print {
24-
.no-print {
25-
display: none;
26-
}
27-
28-
.overflow-auto {
29-
overflow: initial !important;
30-
}
31-
}
32-
</style>
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5+
<meta name="Author" content="Made by 'tree'">
6+
<meta name="GENERATOR" content="tree v2.1.1 © 1996 - 2023 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro">
7+
<title>Directory Tree</title>
8+
<style type="text/css">
9+
BODY { font-family : monospace, sans-serif; color: black;}
10+
P { font-family : monospace, sans-serif; color: black; margin:0px; padding: 0px;}
11+
A:visited { text-decoration : none; margin : 0px; padding : 0px;}
12+
A:link { text-decoration : none; margin : 0px; padding : 0px;}
13+
A:hover { text-decoration: underline; background-color : yellow; margin : 0px; padding : 0px;}
14+
A:active { margin : 0px; padding : 0px;}
15+
.VERSION { font-size: small; font-family : arial, sans-serif; }
16+
.NORM { color: black; }
17+
.FIFO { color: purple; }
18+
.CHAR { color: yellow; }
19+
.DIR { color: blue; }
20+
.BLOCK { color: yellow; }
21+
.LINK { color: aqua; }
22+
.SOCK { color: fuchsia;}
23+
.EXEC { color: green; }
24+
</style>
3325
</head>
34-
35-
<body class="vh-100 d-flex flex-column">
36-
<div class="hstack bg-black no-print">
37-
<a class="mx-auto p-2 text-white" href="https://war.ukraine.ua">Support Ukraine 🇺🇦</a>
38-
</div>
39-
40-
<div class="hstack p-2 gap-2 bg-light no-print">
41-
42-
<input id="files" type="file" class="form-control" style="width: 50ch;" accept=".docx" />
43-
<div class="col-2">
44-
<select id="testDocuments" class="form-select">
45-
<option disabled selected>-- Test Documents --</option>
46-
</select>
47-
</div>
48-
<button id="loadButton" class="btn btn-primary px-4">Reload</button>
49-
<div class="dropdown">
50-
<button class="btn btn-secondary dropdown-toggle" type="button" id="optionsMenuButton"
51-
data-bs-toggle="dropdown" aria-expanded="false">
52-
Options
53-
</button>
54-
<ul id="optionsMenu" class="dropdown-menu" aria-labelledby="optionsMenuButton">
55-
</ul>
56-
</div>
57-
<button id="saveTestButton" class="btn btn-primary px-4" style="display: none">Save Test</button>
58-
</div>
59-
60-
<div class="flex-grow-1 d-flex flex-row" style="height: 0;">
61-
<details class="docx-thumbnails h-100 no-print">
62-
<summary></summary>
63-
<div id="thumbnails-container" class="docx-thumbnails-container"></div>
64-
</details>
65-
<div id="document-container" class="overflow-auto flex-grow-1 h-100"></div>
66-
</div>
67-
68-
<script>
69-
let currentDocument = null;
70-
const docxOptions = Object.assign(docx.defaultOptions, {
71-
debug: true,
72-
experimental: true,
73-
hideWrapperOnPrint: true
74-
});
75-
76-
const container = document.querySelector("#document-container");
77-
const fileInput = document.querySelector("#files");
78-
const loadButton = document.querySelector("#loadButton");
79-
const testDocuments = document.querySelector("#testDocuments");
80-
81-
async function renderDocx(file) {
82-
currentDocument = file;
83-
84-
if (!currentDocument)
85-
return;
86-
87-
// optional, find and convert all tiff images
88-
let docxBlob = preprocessTiff(currentDocument);
89-
// render document
90-
let res = await docx.renderAsync(docxBlob, container, null, docxOptions)
91-
// optional - render thumbnails
92-
renderThumbnails(container, document.querySelector("#thumbnails-container"));
93-
console.log(res);
94-
}
95-
96-
fileInput.addEventListener("change", ev => {
97-
renderDocx(fileInput.files[0]);
98-
testDocuments.selectedIndex = 0;
99-
});
100-
loadButton.addEventListener("click", ev => renderDocx(fileInput.files[0]));
101-
102-
const menu = document.querySelector("#optionsMenu");
103-
104-
Object.keys(docxOptions).filter(key => !/className/i.test(key)).forEach(function(key) {
105-
const listItem = document.createElement("li");
106-
listItem.innerHTML = `
107-
<div class="dropdown-item">
108-
<div class="form-check">
109-
<label class="form-check-name"><input type="checkbox" class="form-check-input" ${docxOptions[key] ? 'checked' : ''}> ${key}</label>
110-
</div>
111-
</div>`;
112-
113-
const checkInput = listItem.querySelector("input");
114-
115-
checkInput.addEventListener("click", (e) => {
116-
docxOptions[key] = checkInput.checked;
117-
renderDocx(currentDocument);
118-
});
119-
120-
menu.appendChild(listItem);
121-
});
122-
123-
container.addEventListener("dragover", ev => ev.preventDefault());
124-
container.addEventListener("drop", ev => {
125-
ev.preventDefault();
126-
renderDocx(ev.dataTransfer.files[0]);
127-
});
128-
129-
const selectedTest = new URLSearchParams(location.search).get('test');
130-
131-
for (let testName of ['text','underlines','text-break','line-spacing','numbering','page-layout','table','table-spans','footnote','header-footer','revision','equation'])
132-
{
133-
var op = document.createElement("option");
134-
op.value = testName;
135-
op.label = testName;
136-
op.selected = testName == selectedTest;
137-
testDocuments.add(op);
138-
}
139-
140-
testDocuments.addEventListener("change", e => tryLoadTest(testDocuments.value));
141-
142-
tryLoadTest(selectedTest);
143-
144-
document.querySelector("#saveTestButton").addEventListener("click", async () => {
145-
const file = await showSaveFilePicker({ types: [ { description: "HTML File", accept: { "text/html": [".html"] } }] });
146-
const stream = await file.createWritable();
147-
await stream.write(container.innerHTML);
148-
await stream.close();
149-
});
150-
151-
async function tryLoadTest(testName) {
152-
if (testName) {
153-
let resp = await fetch(`tests/render-test/${testName}/document.docx`);
154-
renderDocx(await resp.blob());
155-
fileInput.value = "";
156-
}
157-
}
158-
</script>
26+
<body>
27+
<h1>Directory Tree</h1><p>
28+
<a href="../">👆 回到上一级目录</a><br>
29+
├── <a href="./LICENSE">LICENSE</a><br>
30+
├── <a href="./README.md">README.md</a><br>
31+
├── <a href="./demo/">demo</a><br>
32+
│   ├── <a href="./demo/thumbnail.example.css">thumbnail.example.css</a><br>
33+
│   ├── <a href="./demo/thumbnail.example.js">thumbnail.example.js</a><br>
34+
│   └── <a href="./demo/tiff-preprocessor.js">tiff-preprocessor.js</a><br>
35+
├── <a href="./dist/">dist</a><br>
36+
│   ├── <a href="./dist/docx-preview.d.ts">docx-preview.d.ts</a><br>
37+
│   ├── <a href="./dist/docx-preview.js">docx-preview.js</a><br>
38+
│   ├── <a href="./dist/docx-preview.js.map">docx-preview.js.map</a><br>
39+
│   ├── <a href="./dist/docx-preview.min.js">docx-preview.min.js</a><br>
40+
│   ├── <a href="./dist/docx-preview.min.js.map">docx-preview.min.js.map</a><br>
41+
│   ├── <a href="./dist/docx-preview.min.mjs">docx-preview.min.mjs</a><br>
42+
│   ├── <a href="./dist/docx-preview.min.mjs.map">docx-preview.min.mjs.map</a><br>
43+
│   ├── <a href="./dist/docx-preview.mjs">docx-preview.mjs</a><br>
44+
│   └── <a href="./dist/docx-preview.mjs.map">docx-preview.mjs.map</a><br>
45+
├── <a href="./karma.conf.cjs">karma.conf.cjs</a><br>
46+
├── <a href="./rollup.config.mjs">rollup.config.mjs</a><br>
47+
├── <a href="./src/">src</a><br>
48+
│   ├── <a href="./src/comments/">comments</a><br>
49+
│   ├── <a href="./src/common/">common</a><br>
50+
│   ├── <a href="./src/document/">document</a><br>
51+
│   ├── <a href="./src/document-parser.ts">document-parser.ts</a><br>
52+
│   ├── <a href="./src/document-props/">document-props</a><br>
53+
│   ├── <a href="./src/docx-preview.ts">docx-preview.ts</a><br>
54+
│   ├── <a href="./src/font-table/">font-table</a><br>
55+
│   ├── <a href="./src/header-footer/">header-footer</a><br>
56+
│   ├── <a href="./src/html-renderer.ts">html-renderer.ts</a><br>
57+
│   ├── <a href="./src/javascript.ts">javascript.ts</a><br>
58+
│   ├── <a href="./src/length.ts">length.ts</a><br>
59+
│   ├── <a href="./src/notes/">notes</a><br>
60+
│   ├── <a href="./src/numbering/">numbering</a><br>
61+
│   ├── <a href="./src/parser/">parser</a><br>
62+
│   ├── <a href="./src/settings/">settings</a><br>
63+
│   ├── <a href="./src/styles/">styles</a><br>
64+
│   ├── <a href="./src/theme/">theme</a><br>
65+
│   ├── <a href="./src/typings.d.ts">typings.d.ts</a><br>
66+
│   ├── <a href="./src/utils.ts">utils.ts</a><br>
67+
│   ├── <a href="./src/vml/">vml</a><br>
68+
│   └── <a href="./src/word-document.ts">word-document.ts</a><br>
69+
└── <a href="./tests/">tests</a><br>
70+
&nbsp;&nbsp;&nbsp; ├── <a href="./tests/extended-props-test/">extended-props-test</a><br>
71+
&nbsp;&nbsp;&nbsp; └── <a href="./tests/render-test/">render-test</a><br>
72+
<br><br><p>
73+
74+
20 directories, 24 files
75+
76+
</p>
77+
<hr>
78+
<p class="VERSION">
79+
tree v2.1.1 © 1996 - 2023 by Steve Baker and Thomas Moore <br>
80+
HTML output hacked and copyleft © 1998 by Francesc Rocher <br>
81+
JSON output hacked and copyleft © 2014 by Florian Sesser <br>
82+
Charsets / OS/2 support © 2001 by Kyosuke Tokoro
83+
</p>
15984
</body>
160-
161-
</html>
85+
</html>
86+
<style>body { font-family: Arial, sans-serif; } .tree { margin: 20px; } .tree ul { list-style-type: none; margin-left: 20px; padding-left: 1em; position: relative; } .tree ul ul::before { content: ""; display: block; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background-color: #ccc; } .tree li { margin: 5px 0; padding-left: 1.5em; position: relative; } .tree li::before { content: ""; display: block; position: absolute; left: 0; top: 0.7em; width: 10px; height: 1px; background-color: #ccc; } .tree a { color: #0366d6; text-decoration: none; } .tree a:hover { text-decoration: underline; } .back-link { font-weight: bold; color: #0366d6; }</style>

0 commit comments

Comments
 (0)