@file-viewer/renderer-eda 2.0.11
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/LICENSE +160 -0
- package/README.en.md +44 -0
- package/README.md +44 -0
- package/dist/eda.d.ts +2 -0
- package/dist/eda.js +736 -0
- package/dist/edaParser.d.ts +80 -0
- package/dist/edaParser.js +489 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +18 -0
- package/package.json +73 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and
|
|
10
|
+
distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
|
13
|
+
owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities
|
|
16
|
+
that control, are controlled by, or are under common control with that entity.
|
|
17
|
+
For the purposes of this definition, "control" means (i) the power, direct or
|
|
18
|
+
indirect, to cause the direction or management of such entity, whether by
|
|
19
|
+
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
20
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
21
|
+
|
|
22
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
23
|
+
permissions granted by this License.
|
|
24
|
+
|
|
25
|
+
"Source" form shall mean the preferred form for making modifications, including
|
|
26
|
+
but not limited to software source code, documentation source, and configuration
|
|
27
|
+
files.
|
|
28
|
+
|
|
29
|
+
"Object" form shall mean any form resulting from mechanical transformation or
|
|
30
|
+
translation of a Source form, including but not limited to compiled object code,
|
|
31
|
+
generated documentation, and conversions to other media types.
|
|
32
|
+
|
|
33
|
+
"Work" shall mean the work of authorship, whether in Source or Object form,
|
|
34
|
+
made available under the License, as indicated by a copyright notice that is
|
|
35
|
+
included in or attached to the work.
|
|
36
|
+
|
|
37
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
|
38
|
+
is based on (or derived from) the Work and for which the editorial revisions,
|
|
39
|
+
annotations, elaborations, or other modifications represent, as a whole, an
|
|
40
|
+
original work of authorship. For the purposes of this License, Derivative Works
|
|
41
|
+
shall not include works that remain separable from, or merely link (or bind by
|
|
42
|
+
name) to the interfaces of, the Work and Derivative Works thereof.
|
|
43
|
+
|
|
44
|
+
"Contribution" shall mean any work of authorship, including the original version
|
|
45
|
+
of the Work and any modifications or additions to that Work or Derivative Works
|
|
46
|
+
thereof, that is intentionally submitted to Licensor for inclusion in the Work by
|
|
47
|
+
the copyright owner or by an individual or Legal Entity authorized to submit on
|
|
48
|
+
behalf of the copyright owner. For the purposes of this definition, "submitted"
|
|
49
|
+
means any form of electronic, verbal, or written communication sent to the
|
|
50
|
+
Licensor or its representatives, including but not limited to communication on
|
|
51
|
+
electronic mailing lists, source code control systems, and issue tracking systems
|
|
52
|
+
that are managed by, or on behalf of, the Licensor for the purpose of discussing
|
|
53
|
+
and improving the Work, but excluding communication that is conspicuously marked
|
|
54
|
+
or otherwise designated in writing by the copyright owner as "Not a
|
|
55
|
+
Contribution."
|
|
56
|
+
|
|
57
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
|
58
|
+
of whom a Contribution has been received by Licensor and subsequently
|
|
59
|
+
incorporated within the Work.
|
|
60
|
+
|
|
61
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this
|
|
62
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
63
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
64
|
+
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
|
65
|
+
sublicense, and distribute the Work and such Derivative Works in Source or
|
|
66
|
+
Object form.
|
|
67
|
+
|
|
68
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License,
|
|
69
|
+
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
|
|
70
|
+
no-charge, royalty-free, irrevocable (except as stated in this section) patent
|
|
71
|
+
license to make, have made, use, offer to sell, sell, import, and otherwise
|
|
72
|
+
transfer the Work, where such license applies only to those patent claims
|
|
73
|
+
licensable by such Contributor that are necessarily infringed by their
|
|
74
|
+
Contribution(s) alone or by combination of their Contribution(s) with the Work to
|
|
75
|
+
which such Contribution(s) was submitted. If You institute patent litigation
|
|
76
|
+
against any entity (including a cross-claim or counterclaim in a lawsuit)
|
|
77
|
+
alleging that the Work or a Contribution incorporated within the Work
|
|
78
|
+
constitutes direct or contributory patent infringement, then any patent licenses
|
|
79
|
+
granted to You under this License for that Work shall terminate as of the date
|
|
80
|
+
such litigation is filed.
|
|
81
|
+
|
|
82
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or
|
|
83
|
+
Derivative Works thereof in any medium, with or without modifications, and in
|
|
84
|
+
Source or Object form, provided that You meet the following conditions:
|
|
85
|
+
|
|
86
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of
|
|
87
|
+
this License; and
|
|
88
|
+
|
|
89
|
+
(b) You must cause any modified files to carry prominent notices stating that
|
|
90
|
+
You changed the files; and
|
|
91
|
+
|
|
92
|
+
(c) You must retain, in the Source form of any Derivative Works that You
|
|
93
|
+
distribute, all copyright, patent, trademark, and attribution notices from the
|
|
94
|
+
Source form of the Work, excluding those notices that do not pertain to any part
|
|
95
|
+
of the Derivative Works; and
|
|
96
|
+
|
|
97
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then
|
|
98
|
+
any Derivative Works that You distribute must include a readable copy of the
|
|
99
|
+
attribution notices contained within such NOTICE file, excluding those notices
|
|
100
|
+
that do not pertain to any part of the Derivative Works, in at least one of the
|
|
101
|
+
following places: within a NOTICE text file distributed as part of the Derivative
|
|
102
|
+
Works; within the Source form or documentation, if provided along with the
|
|
103
|
+
Derivative Works; or, within a display generated by the Derivative Works, if and
|
|
104
|
+
wherever such third-party notices normally appear. The contents of the NOTICE
|
|
105
|
+
file are for informational purposes only and do not modify the License. You may
|
|
106
|
+
add Your own attribution notices within Derivative Works that You distribute,
|
|
107
|
+
alongside or as an addendum to the NOTICE text from the Work, provided that such
|
|
108
|
+
additional attribution notices cannot be construed as modifying the License.
|
|
109
|
+
|
|
110
|
+
You may add Your own copyright statement to Your modifications and may provide
|
|
111
|
+
additional or different license terms and conditions for use, reproduction, or
|
|
112
|
+
distribution of Your modifications, or for any such Derivative Works as a whole,
|
|
113
|
+
provided Your use, reproduction, and distribution of the Work otherwise complies
|
|
114
|
+
with the conditions stated in this License.
|
|
115
|
+
|
|
116
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
|
117
|
+
Contribution intentionally submitted for inclusion in the Work by You to the
|
|
118
|
+
Licensor shall be under the terms and conditions of this License, without any
|
|
119
|
+
additional terms or conditions. Notwithstanding the above, nothing herein shall
|
|
120
|
+
supersede or modify the terms of any separate license agreement you may have
|
|
121
|
+
executed with Licensor regarding such Contributions.
|
|
122
|
+
|
|
123
|
+
6. Trademarks. This License does not grant permission to use the trade names,
|
|
124
|
+
trademarks, service marks, or product names of the Licensor, except as required
|
|
125
|
+
for reasonable and customary use in describing the origin of the Work and
|
|
126
|
+
reproducing the content of the NOTICE file.
|
|
127
|
+
|
|
128
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
|
|
129
|
+
writing, Licensor provides the Work (and each Contributor provides its
|
|
130
|
+
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
131
|
+
KIND, either express or implied, including, without limitation, any warranties or
|
|
132
|
+
conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
133
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
134
|
+
appropriateness of using or redistributing the Work and assume any risks
|
|
135
|
+
associated with Your exercise of permissions under this License.
|
|
136
|
+
|
|
137
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in
|
|
138
|
+
tort (including negligence), contract, or otherwise, unless required by
|
|
139
|
+
applicable law (such as deliberate and grossly negligent acts) or agreed to in
|
|
140
|
+
writing, shall any Contributor be liable to You for damages, including any
|
|
141
|
+
direct, indirect, special, incidental, or consequential damages of any character
|
|
142
|
+
arising as a result of this License or out of the use or inability to use the
|
|
143
|
+
Work (including but not limited to damages for loss of goodwill, work stoppage,
|
|
144
|
+
computer failure or malfunction, or any and all other commercial damages or
|
|
145
|
+
losses), even if such Contributor has been advised of the possibility of such
|
|
146
|
+
damages.
|
|
147
|
+
|
|
148
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or
|
|
149
|
+
Derivative Works thereof, You may choose to offer, and charge a fee for,
|
|
150
|
+
acceptance of support, warranty, indemnity, or other liability obligations and/or
|
|
151
|
+
rights consistent with this License. However, in accepting such obligations, You
|
|
152
|
+
may act only on Your own behalf and on Your sole responsibility, not on behalf of
|
|
153
|
+
any other Contributor, and only if You agree to indemnify, defend, and hold each
|
|
154
|
+
Contributor harmless for any liability incurred by, or claims asserted against,
|
|
155
|
+
such Contributor by reason of your accepting any such warranty or additional
|
|
156
|
+
liability.
|
|
157
|
+
|
|
158
|
+
END OF TERMS AND CONDITIONS
|
|
159
|
+
|
|
160
|
+
Copyright 2026 Flyfish Viewer
|
package/README.en.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @file-viewer/renderer-eda
|
|
2
|
+
|
|
3
|
+
Standalone EDA renderer package for Flyfish File Viewer. It handles safe structure previews for OLB, DRA, GDSII, and OASIS files without forcing normal document preview installs to carry EDA parsing code.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import FileViewer from '@file-viewer/vue3'
|
|
9
|
+
import { edaRenderer } from '@file-viewer/renderer-eda'
|
|
10
|
+
|
|
11
|
+
const options = {
|
|
12
|
+
rendererMode: 'replace',
|
|
13
|
+
renderers: edaRenderer,
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Compose it with other renderers when needed:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { edaRenderer } from '@file-viewer/renderer-eda'
|
|
21
|
+
import { cadRenderer } from '@file-viewer/renderer-cad'
|
|
22
|
+
|
|
23
|
+
const options = {
|
|
24
|
+
rendererMode: 'replace',
|
|
25
|
+
renderers: [edaRenderer, cadRenderer],
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Scope
|
|
30
|
+
|
|
31
|
+
- `gds` reads standard GDSII records and extracts libraries, structures, boundaries, paths, text, references, and coordinate bounds. Small layouts render as SVG; larger element sets automatically use WebGL typed-array batches from `@file-viewer/eda-layout` and a canvas renderer.
|
|
32
|
+
- `oas` / `oasis` readable text layout fixtures render as SVG; real SEMI binary OASIS files provide safe binary indexing, readable strings, structure candidates, and diagnostics rather than claiming full geometry rendering.
|
|
33
|
+
- `olb` / `dra` use `cfb` to inspect common compound document containers and expose stream trees, entity candidates, properties, strings, and diagnostics.
|
|
34
|
+
- GDSII/OASIS primitives now live in `@file-viewer/eda-layout`; OrCAD/Allegro binary inspection primitives now live in `@file-viewer/eda-orcad`. This package focuses on UI presentation, SVG/WebGL selection, and the File Viewer renderer protocol.
|
|
35
|
+
- After a web-wide ecosystem review, the boundary stays explicit: GDSII has mature record parser / WebGL viewer paths and is suitable for official quick preview today; OASIS text fixtures validate visible UI output, while real SEMI binary OASIS needs a lower-level parser, repetition expansion, and incremental rendering; OLB / DRA belong to the proprietary OrCAD / Allegro ecosystem, where the sustainable public path is C++ WASM or staged TypeScript ports based on OpenOrCadParser / OpenAllegroParser.
|
|
36
|
+
- High-fidelity OrCAD / Allegro / OASIS graphics should evolve as a dedicated WASM or incremental rendering kernel instead of entering core or the default document first-screen path.
|
|
37
|
+
|
|
38
|
+
## Migration Notes
|
|
39
|
+
|
|
40
|
+
`@file-viewer/core` no longer bundles the EDA renderer and no longer installs `cfb` by default. Install this package explicitly, or use `@file-viewer/preset-all`, when you need OLB, DRA, GDSII, or OASIS previews. The low-level `parseEdaFile()` API is exported from this package for business-side structure indexing, diagnostics, or future custom WASM engine integration.
|
|
41
|
+
|
|
42
|
+
## Offline Deployment
|
|
43
|
+
|
|
44
|
+
The current EDA renderer does not require extra Worker or WASM assets. Larger GDSII layouts use the browser's native WebGL canvas without public CDN dependencies. It only loads `cfb`, `@file-viewer/eda-layout`, `@file-viewer/eda-orcad`, and this UI package when OLB, DRA, GDSII, or OASIS formats are selected.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @file-viewer/renderer-eda
|
|
2
|
+
|
|
3
|
+
Flyfish File Viewer 的独立 EDA renderer 包。它承接 OLB、DRA、GDSII、OASIS 等电子设计与版图文件的安全结构预览,避免普通文档预览场景安装 EDA 解析链路。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import FileViewer from '@file-viewer/vue3'
|
|
9
|
+
import { edaRenderer } from '@file-viewer/renderer-eda'
|
|
10
|
+
|
|
11
|
+
const options = {
|
|
12
|
+
rendererMode: 'replace',
|
|
13
|
+
renderers: edaRenderer,
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
也可以和其他 renderer 一起组合:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { edaRenderer } from '@file-viewer/renderer-eda'
|
|
21
|
+
import { cadRenderer } from '@file-viewer/renderer-cad'
|
|
22
|
+
|
|
23
|
+
const options = {
|
|
24
|
+
rendererMode: 'replace',
|
|
25
|
+
renderers: [edaRenderer, cadRenderer],
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 能力边界
|
|
30
|
+
|
|
31
|
+
- `gds` 读取标准 GDSII record,提取 library、structure、boundary、path、text、sref/aref 和坐标边界;小文件生成 SVG 快速版图预览,元素较多时自动使用 `@file-viewer/eda-layout` 的 WebGL typed-array 批次和 canvas 渲染。
|
|
32
|
+
- `oas` / `oasis` 的可读文本版图夹具会生成 SVG 预览;真实 SEMI 二进制 OASIS 做安全二进制索引、可读字符串、结构候选和诊断,不虚标为完整几何渲染。
|
|
33
|
+
- `olb` / `dra` 使用 `cfb` 读取常见复合文档容器,展示结构树、对象候选、属性、可读字符串和诊断。
|
|
34
|
+
- GDSII/OASIS 底层能力已经下沉到 `@file-viewer/eda-layout`;OrCAD/Allegro 二进制检查能力已经下沉到 `@file-viewer/eda-orcad`。本包只负责 UI 展示、SVG/WebGL 选择和 File Viewer renderer 协议。
|
|
35
|
+
- 全网调研后继续保持边界清晰: GDSII 有成熟 record parser / WebGL viewer 路线,当前可作为正式快速预览;OASIS 文本夹具用于验证 UI 出图,真实 SEMI 二进制 OASIS 是复杂二进制版图格式,完整几何需要低层 parser、重复结构展开和增量渲染;OLB / DRA 属于 OrCAD / Allegro 专有生态,公开可持续路线是参考 OpenOrCadParser / OpenAllegroParser 做 C++ WASM 或逐步 TS 移植。
|
|
36
|
+
- 复杂 OrCAD / Allegro / OASIS 高保真图形能力后续会继续演进为独立 WASM/增量渲染内核,不进入 core 或普通文档首屏链路。
|
|
37
|
+
|
|
38
|
+
## 迁移说明
|
|
39
|
+
|
|
40
|
+
`@file-viewer/core` 已不再内置 EDA renderer,也不再默认安装 `cfb`。需要 OLB / DRA / GDSII / OASIS 预览时,请显式安装本包,或使用 `@file-viewer/preset-all`。底层 `parseEdaFile()` 也从本包导出,适合业务侧做结构索引、诊断和后续自研 WASM 内核对接。
|
|
41
|
+
|
|
42
|
+
## 离线部署
|
|
43
|
+
|
|
44
|
+
当前 EDA renderer 没有额外 Worker/WASM 静态资产。GDSII 大图使用浏览器原生 WebGL canvas,不依赖公共 CDN;命中 OLB、DRA、GDSII 或 OASIS 格式时才加载 `cfb`、`@file-viewer/eda-layout`、`@file-viewer/eda-orcad` 和本包 UI 代码。
|
package/dist/eda.d.ts
ADDED