@silurus/ooxml 0.71.0 → 0.72.1

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- > **This entire codebase — Rust parsers, TypeScript renderers, tests, and tooling — was implemented by [Claude](https://claude.ai)** (Anthropic's AI assistant) through iterative prompting. No human-written application code exists in this repository.
1
+ > **This entire codebase — Rust parsers, TypeScript renderers, tests, and tooling — is implemented by AI coding agents, primarily [Claude](https://claude.ai) and [Codex](https://openai.com/codex/)**, through iterative prompting. No human-written application code exists in this repository.
2
2
 
3
3
  <details>
4
4
  <summary><b>Why this project exists — a note from the author</b></summary>
@@ -11,7 +11,7 @@ In practice, it didn't happen. For more than a decade, no free, open-source libr
11
11
 
12
12
  Generative AI changed that. A viewer is an unusually good fit for AI-driven iterative development ("vibe coding"): there is a spec to read and a correct output to aim for, so the work comes down to interpreting the specification and refining the rendering until it matches. Limiting the scope to viewing also avoids the most serious risk an Office library can carry — corrupting a user's files.
13
13
 
14
- So I'm building this library with Claude, spec-first, and keeping it free to use. For some documents it already reproduces the desktop Office applications more faithfully than commercial libraries — and sometimes even the official Microsoft 365 web apps.
14
+ So I'm building this library with AI coding agents, spec-first, and keeping it free to use. For some documents it already reproduces the desktop Office applications more faithfully than commercial libraries — and sometimes even the official Microsoft 365 web apps.
15
15
 
16
16
  </details>
17
17
 
@@ -229,6 +229,20 @@ a transparent, selectable text layer per page/slide for native copy. In
229
229
  worker boundary) and the viewer logs one warning — use the default `mode: 'main'`
230
230
  for selectable text.
231
231
 
232
+ **Hyperlinks.** For DOCX/PPTX the link hit regions live on the text-selection
233
+ overlay, so hyperlink interaction requires `enableTextSelection: true`; when that
234
+ overlay is enabled, links are interactive by default. XLSX hit-tests cells
235
+ directly, so links are interactive out of the box. An external link opens in a
236
+ new tab (scheme-sanitized to `http` / `https` / `mailto` / `tel`, `noopener`),
237
+ and an internal target navigates within the document (docx bookmark, pptx slide
238
+ jump, xlsx sheet). Pass `onHyperlinkClick(target)` to take over the click
239
+ yourself.
240
+ Pass `enableHyperlinks: false` to disable hyperlink interactivity entirely — no
241
+ hit-testing, no pointer cursor over links, no default navigation, and
242
+ `onHyperlinkClick` is never called; links still render as authored but are inert.
243
+ This applies to every viewer that supports hyperlinks (`DocxViewer`,
244
+ `DocxScrollViewer`, `PptxViewer`, `PptxScrollViewer`, `XlsxViewer`).
245
+
232
246
  **Master–detail / shared engine.** Inject an already-loaded headless engine so a
233
247
  paged viewer and a scroll viewer (or several panes) share **one** parse. When you
234
248
  inject, `load()` is unsupported (the engine is already loaded), the engine's own
@@ -416,7 +430,7 @@ const current = ref(0);
416
430
  const total = ref(0);
417
431
 
418
432
  onMounted(async () => {
419
- viewer = new PptxViewer(canvas.value!, {
433
+ viewer = new PptxViewer(canvas.value as HTMLCanvasElement, {
420
434
  onSlideChange: (i, t) => { current.value = i; total.value = t; },
421
435
  });
422
436
  await viewer.load(props.src);
@@ -92,15 +92,88 @@ remains entirely MIT / Apache-2.0, with no copyleft licenses:
92
92
  cargo license --manifest-path packages/mcp-server/Cargo.toml --avoid-dev-deps
93
93
  ```
94
94
 
95
+ ## Unicode Character Database data
96
+
97
+ The line-breaking, vertical-orientation and Arabic-shaping logic is driven
98
+ by tables generated from the Unicode Character Database (UCD), © Unicode,
99
+ Inc., licensed under the [Unicode License v3](#unicode-license-v3-full-text)
100
+ (SPDX: `Unicode-3.0`), which expressly permits copying, modification and
101
+ redistribution of the data files with this notice.
102
+
103
+ Checked into this repository (generator inputs, each retaining its original
104
+ Unicode copyright header; not part of the npm tarball):
105
+
106
+ - `packages/core/scripts/VerticalOrientation.txt` (UAX #50
107
+ Vertical_Orientation, UCD 17.0.0)
108
+ - `packages/docx/scripts/ArabicShaping.txt` (Joining_Type / Joining_Group,
109
+ UCD 17.0.0)
110
+ - `packages/docx/scripts/DerivedJoiningType.txt` (UCD 17.0.0)
111
+
112
+ Shipped in `dist/` as UCD-derived data compiled from the above and from
113
+ `LineBreak.txt` / `DerivedGeneralCategory.txt` / `EastAsianWidth.txt`
114
+ (fetched at generation time, not checked in): the `*.generated.ts` tables
115
+ under `packages/core/src/text/` and `packages/docx/src/` (line-break
116
+ classes, East Asian width, vertical orientation, bidi character data,
117
+ Arabic joining classes).
118
+
119
+ The `unicode-ident` Rust crate listed above also carries `Unicode-3.0` in
120
+ its SPDX expression for the same reason (embedded UCD-derived tables).
121
+
95
122
  ## License texts
96
123
 
97
124
  - **MIT** — see [LICENSE](./LICENSE) (this repository's own license; the
98
125
  MIT-licensed dependencies above use the same standard text with their own
99
126
  copyright holder).
127
+ - **Unicode License v3** — canonical text at
128
+ <https://www.unicode.org/license.txt>, reproduced below.
100
129
  - **Apache License, Version 2.0** — full text at
101
130
  <https://www.apache.org/licenses/LICENSE-2.0>, reproduced below for
102
131
  convenience.
103
132
 
133
+ ### Unicode License v3 (full text)
134
+
135
+ ```
136
+ UNICODE LICENSE V3
137
+
138
+ COPYRIGHT AND PERMISSION NOTICE
139
+
140
+ Copyright © 1991-2026 Unicode, Inc.
141
+
142
+ NOTICE TO USER: Carefully read the following legal agreement. BY
143
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
144
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
145
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
146
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
147
+
148
+ Permission is hereby granted, free of charge, to any person obtaining a
149
+ copy of data files and any associated documentation (the "Data Files") or
150
+ software and any associated documentation (the "Software") to deal in the
151
+ Data Files or Software without restriction, including without limitation
152
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
153
+ copies of the Data Files or Software, and to permit persons to whom the
154
+ Data Files or Software are furnished to do so, provided that either (a)
155
+ this copyright and permission notice appear with all copies of the Data
156
+ Files or Software, or (b) this copyright and permission notice appear in
157
+ associated Documentation.
158
+
159
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
160
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
161
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
162
+ THIRD PARTY RIGHTS.
163
+
164
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
165
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
166
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
167
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
168
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
169
+ FILES OR SOFTWARE.
170
+
171
+ Except as contained in this notice, the name of a copyright holder shall
172
+ not be used in advertising or otherwise to promote the sale, use or other
173
+ dealings in these Data Files or Software without prior written
174
+ authorization of the copyright holder.
175
+ ```
176
+
104
177
  ### Apache License 2.0 (full text)
105
178
 
106
179
  ```