omni-viewer-core 0.13.0 → 0.14.0

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
@@ -15,8 +15,8 @@ models, viewers mount into a DOM element, and everything host-specific
15
15
  - **Documents** — PDF, Word (DOCX and legacy DOC), HWP, PowerPoint (PPTX and
16
16
  legacy PPT), Markdown, LaTeX (structure and math preview, not typesetting)
17
17
  - **Data & spreadsheets** — Excel, CSV/TSV, JSON, JSONL/NDJSON, YAML, TOML,
18
- Parquet, Avro, HDF5, MATLAB MAT, Safetensors, GGUF, ONNX, Protocol Buffers, ReqIF,
19
- SQLite
18
+ Parquet, Avro, HDF5, MATLAB MAT, Safetensors, GGUF, ONNX, TFLite/LiteRT,
19
+ Protocol Buffers, ReqIF, SQLite
20
20
  - **Media & graphics** — audio (waveform/spectrogram), video, images,
21
21
  Photoshop PSD
22
22
  - **Engineering & automotive** — CAN DBC, AUTOSAR ARXML, ASAM A2L, Vector
@@ -121,6 +121,25 @@ await mountOnnxViewer({ fileName: file.name, data: bytes }, container, ctx);
121
121
  The viewer provides a connected computation graph with node inspection plus
122
122
  searchable node, initializer, input/output, and model-information panels.
123
123
 
124
+ ### TFLite / LiteRT models
125
+
126
+ The TFLite parser reads the `TFL3` FlatBuffer directly — no schema compiler and
127
+ no runtime dependency. Buffer payloads stay unread while subgraph topology,
128
+ operator codes, decoded builtin options, tensor types, shapes, quantization,
129
+ sparsity, signature definitions, and metadata are retained:
130
+
131
+ ```ts
132
+ import { mountTfliteViewer } from 'omni-viewer-core/viewers/tflite';
133
+
134
+ await mountTfliteViewer({ fileName: file.name, data: bytes }, container, ctx);
135
+ ```
136
+
137
+ The viewer provides a per-subgraph computation graph with operator and tensor
138
+ inspection, navigation into the subgraphs a control-flow operator references,
139
+ and searchable operator, tensor, input/output, buffer, and model-information
140
+ panels. Custom operators, Select TensorFlow fallbacks, and buffers stored
141
+ outside the FlatBuffer are surfaced as warnings.
142
+
124
143
  ### Archive host integration
125
144
 
126
145
  Archive decompression remains adapter-owned: pass an `ArchiveDecoder` to
@@ -85,6 +85,7 @@ export const CATALOG_EN = {
85
85
  'gguf.warning.tensorsLimited': 'Showing the first {shown} of {total} tensors to limit memory use.',
86
86
  'gguf.warning.metadataLimited': 'Showing the first {shown} of {total} metadata entries to limit memory use.',
87
87
  'gguf.warning.textTruncated': 'Some text was truncated by per-field limits or the normalized GGUF character budget.',
88
+ 'gguf.warning.metadataTooLarge': 'This file’s metadata is too large to parse in full, so only key previews are shown and the tensor list is unavailable.',
88
89
  'onnx.title': 'ONNX model', 'onnx.search': 'Search graph, nodes, and tensors…', 'onnx.copyJson': 'Copy JSON',
89
90
  'onnx.graph': 'Graph', 'onnx.nodes': 'Nodes', 'onnx.tensors': 'Tensors', 'onnx.io': 'Inputs & Outputs',
90
91
  'onnx.modelInfo': 'Model Info', 'onnx.rows': '{shown} / {total} rows shown', 'onnx.noMatches': 'No rows match the current search.',
@@ -115,6 +116,51 @@ export const CATALOG_EN = {
115
116
  'onnx.info.training': 'Training graphs', 'onnx.info.configurations': 'Device configurations',
116
117
  'onnx.info.quantization': 'Quantization annotations', 'onnx.info.deviceConfiguration': 'Device configuration',
117
118
  'onnx.info.pipelineStage': 'pipeline stage',
119
+ 'tflite.title': 'TFLite model', 'tflite.search': 'Search operators, tensors, and buffers…',
120
+ 'tflite.copyJson': 'Copy JSON', 'tflite.subgraph': 'Subgraph', 'tflite.unnamed': 'unnamed',
121
+ 'tflite.graph': 'Graph', 'tflite.operators': 'Operators', 'tflite.tensors': 'Tensors',
122
+ 'tflite.io': 'Inputs & Outputs', 'tflite.buffers': 'Buffers', 'tflite.modelInfo': 'Model Info',
123
+ 'tflite.rows': '{shown} / {total} rows shown', 'tflite.noMatches': 'No rows match the current search.',
124
+ 'tflite.selectNode': 'Select an operator or tensor to inspect it.',
125
+ 'tflite.graphLimited': 'Graph preview shows {shown} of {total} items.',
126
+ 'tflite.graphEdgesLimited': 'Only the first {count} connections are shown.',
127
+ 'tflite.moreItems': '{count} more…', 'tflite.runtime': 'runtime {version}', 'tflite.schema': 'schema v{version}',
128
+ 'tflite.scalar': 'scalar', 'tflite.unknownRank': 'unknown rank', 'tflite.optional': 'optional', 'tflite.variable': 'Variable',
129
+ 'tflite.opDetail': '#{index} · v{version}', 'tflite.customBytes': '{bytes} bytes of custom options',
130
+ 'tflite.binaryBuffer': 'binary, {bytes} in buffer {buffer}',
131
+ 'tflite.summary.operators': 'Operators', 'tflite.summary.tensors': 'Tensors',
132
+ 'tflite.summary.subgraphs': 'Subgraphs', 'tflite.summary.operatorCodes': 'Operator codes',
133
+ 'tflite.summary.weights': 'Weights', 'tflite.summary.version': 'Schema version',
134
+ 'tflite.warning.identifier': 'The file identifier is {identifier} rather than the expected TFL3.',
135
+ 'tflite.warning.version': 'The model declares schema version {version}; this viewer targets version 3.',
136
+ 'tflite.warning.noSubgraphs': 'The model contains no subgraphs.',
137
+ 'tflite.warning.emptyGraph': 'The model subgraphs contain no operators.',
138
+ 'tflite.warning.customOps': '{count} custom operator(s) require a matching runtime registration: {names}',
139
+ 'tflite.warning.flexOps': '{count} operator(s) fall back to Select TensorFlow ops.',
140
+ 'tflite.warning.appendedBuffers': '{count} buffer(s) store their payload outside the FlatBuffer.',
141
+ 'tflite.column.index': '#', 'tflite.column.name': 'Name', 'tflite.column.operator': 'Operator',
142
+ 'tflite.column.kind': 'Kind', 'tflite.column.version': 'Version', 'tflite.column.inputs': 'Inputs',
143
+ 'tflite.column.outputs': 'Outputs', 'tflite.column.optionsType': 'Options type', 'tflite.column.options': 'Options',
144
+ 'tflite.column.type': 'Type', 'tflite.column.shape': 'Shape', 'tflite.column.elements': 'Elements',
145
+ 'tflite.column.dataSize': 'Data size', 'tflite.column.storage': 'Storage',
146
+ 'tflite.column.quantization': 'Quantization', 'tflite.column.variable': 'Variable',
147
+ 'tflite.column.signature': 'Signature', 'tflite.column.typeShape': 'Type / Shape',
148
+ 'tflite.column.tensorIndex': 'Tensor', 'tflite.column.fileOffset': 'File offset',
149
+ 'tflite.column.usedBy': 'Used by', 'tflite.column.buffer': 'Buffer',
150
+ 'tflite.storage.empty': 'Runtime', 'tflite.storage.inline': 'Inline', 'tflite.storage.appended': 'Appended',
151
+ 'tflite.kind.builtin': 'Builtin', 'tflite.kind.custom': 'Custom', 'tflite.kind.input': 'Input',
152
+ 'tflite.kind.output': 'Output', 'tflite.kind.signatureInput': 'Signature input',
153
+ 'tflite.kind.signatureOutput': 'Signature output',
154
+ 'tflite.info.description': 'Description', 'tflite.info.schemaVersion': 'Schema version',
155
+ 'tflite.info.identifier': 'File identifier', 'tflite.info.minRuntime': 'Minimum runtime',
156
+ 'tflite.info.fileSize': 'File size', 'tflite.info.weights': 'Weight bytes',
157
+ 'tflite.info.subgraphs': 'Subgraphs', 'tflite.info.signatures': 'Signatures',
158
+ 'tflite.info.operatorCode': 'Operator code', 'tflite.info.metadata': 'Metadata',
159
+ 'tflite.info.expectedSize': 'Expected size', 'tflite.info.shapeSignature': 'Shape signature',
160
+ 'tflite.info.sparsity': 'Sparsity', 'tflite.info.traversalOrder': 'Traversal order',
161
+ 'tflite.inspector.inputs': 'Inputs', 'tflite.inspector.outputs': 'Outputs',
162
+ 'tflite.inspector.intermediates': 'Intermediates', 'tflite.inspector.options': 'Options',
163
+ 'tflite.inspector.customOptions': 'Custom options', 'tflite.inspector.subgraphs': 'Referenced subgraphs',
118
164
  'proto.title': 'Protocol Buffer', 'proto.summary': '{syntax} · {package} · {messages} messages · {services} services',
119
165
  'proto.noPackage': 'no package', 'proto.search': 'Search message, field, enum, RPC', 'proto.copyPanel': 'Copy panel',
120
166
  'proto.panel.tree': 'Message Tree', 'proto.panel.types': 'Types', 'proto.panel.relationships': 'Relationships',
@@ -81,6 +81,7 @@ export const CATALOG_JA = {
81
81
  'gguf.warning.tensorsLimited': 'メモリ使用量を抑えるため、{total}個のテンソルのうち先頭{shown}個を表示します。',
82
82
  'gguf.warning.metadataLimited': 'メモリ使用量を抑えるため、{total}個のメタデータのうち先頭{shown}個を表示します。',
83
83
  'gguf.warning.textTruncated': 'フィールド制限またはGGUF文字数予算により、一部のテキストが省略されました。',
84
+ 'gguf.warning.metadataTooLarge': 'このファイルのメタデータは大きすぎて完全には解析できません。キーのプレビューのみを表示し、テンソル一覧は利用できません。',
84
85
  'onnx.title': 'ONNXモデル', 'onnx.search': 'グラフ、ノード、テンソルを検索…', 'onnx.copyJson': 'JSONをコピー',
85
86
  'onnx.graph': 'グラフ', 'onnx.nodes': 'ノード', 'onnx.tensors': 'テンソル', 'onnx.io': '入出力',
86
87
  'onnx.modelInfo': 'モデル情報', 'onnx.rows': '{total}行中{shown}行を表示', 'onnx.noMatches': '検索に一致する行がありません。',
@@ -111,6 +112,51 @@ export const CATALOG_JA = {
111
112
  'onnx.info.training': '学習グラフ', 'onnx.info.configurations': 'デバイス構成',
112
113
  'onnx.info.quantization': '量子化注釈', 'onnx.info.deviceConfiguration': 'デバイス構成',
113
114
  'onnx.info.pipelineStage': 'パイプライン段階',
115
+ 'tflite.title': 'TFLiteモデル', 'tflite.search': '演算子・テンソル・バッファを検索…',
116
+ 'tflite.copyJson': 'JSONをコピー', 'tflite.subgraph': 'サブグラフ', 'tflite.unnamed': '名前なし',
117
+ 'tflite.graph': 'グラフ', 'tflite.operators': '演算子', 'tflite.tensors': 'テンソル',
118
+ 'tflite.io': '入力と出力', 'tflite.buffers': 'バッファ', 'tflite.modelInfo': 'モデル情報',
119
+ 'tflite.rows': '{total}行中{shown}行を表示', 'tflite.noMatches': '検索条件に一致する行はありません。',
120
+ 'tflite.selectNode': '演算子またはテンソルを選択すると詳細が表示されます。',
121
+ 'tflite.graphLimited': 'グラフプレビューは全{total}件中{shown}件を表示しています。',
122
+ 'tflite.graphEdgesLimited': '接続線は最初の{count}本のみ表示しています。',
123
+ 'tflite.moreItems': '他{count}件…', 'tflite.runtime': 'ランタイム {version}', 'tflite.schema': 'スキーマ v{version}',
124
+ 'tflite.scalar': 'スカラー', 'tflite.unknownRank': 'ランク不明', 'tflite.optional': '省略可', 'tflite.variable': '変数',
125
+ 'tflite.opDetail': '#{index} · v{version}', 'tflite.customBytes': 'カスタムオプション{bytes}バイト',
126
+ 'tflite.binaryBuffer': 'バイナリ、バッファ{buffer}に{bytes}',
127
+ 'tflite.summary.operators': '演算子', 'tflite.summary.tensors': 'テンソル',
128
+ 'tflite.summary.subgraphs': 'サブグラフ', 'tflite.summary.operatorCodes': '演算子コード',
129
+ 'tflite.summary.weights': '重み', 'tflite.summary.version': 'スキーマバージョン',
130
+ 'tflite.warning.identifier': 'ファイル識別子が想定のTFL3ではなく{identifier}です。',
131
+ 'tflite.warning.version': 'モデルはスキーマバージョン{version}を宣言していますが、このビューアはバージョン3を対象としています。',
132
+ 'tflite.warning.noSubgraphs': 'モデルにサブグラフがありません。',
133
+ 'tflite.warning.emptyGraph': 'モデルのサブグラフに演算子がありません。',
134
+ 'tflite.warning.customOps': 'カスタム演算子{count}件にはランタイムへの登録が必要です: {names}',
135
+ 'tflite.warning.flexOps': '{count}件の演算子がSelect TensorFlow演算にフォールバックします。',
136
+ 'tflite.warning.appendedBuffers': '{count}件のバッファがFlatBufferの外部にデータを保持しています。',
137
+ 'tflite.column.index': '#', 'tflite.column.name': '名前', 'tflite.column.operator': '演算子',
138
+ 'tflite.column.kind': '種類', 'tflite.column.version': 'バージョン', 'tflite.column.inputs': '入力',
139
+ 'tflite.column.outputs': '出力', 'tflite.column.optionsType': 'オプション型', 'tflite.column.options': 'オプション',
140
+ 'tflite.column.type': '型', 'tflite.column.shape': '形状', 'tflite.column.elements': '要素数',
141
+ 'tflite.column.dataSize': 'データサイズ', 'tflite.column.storage': '格納場所',
142
+ 'tflite.column.quantization': '量子化', 'tflite.column.variable': '変数',
143
+ 'tflite.column.signature': 'シグネチャ', 'tflite.column.typeShape': '型 / 形状',
144
+ 'tflite.column.tensorIndex': 'テンソル', 'tflite.column.fileOffset': 'ファイルオフセット',
145
+ 'tflite.column.usedBy': '使用元', 'tflite.column.buffer': 'バッファ',
146
+ 'tflite.storage.empty': 'ランタイム', 'tflite.storage.inline': 'インライン', 'tflite.storage.appended': '外部追加',
147
+ 'tflite.kind.builtin': '組み込み', 'tflite.kind.custom': 'カスタム', 'tflite.kind.input': '入力',
148
+ 'tflite.kind.output': '出力', 'tflite.kind.signatureInput': 'シグネチャ入力',
149
+ 'tflite.kind.signatureOutput': 'シグネチャ出力',
150
+ 'tflite.info.description': '説明', 'tflite.info.schemaVersion': 'スキーマバージョン',
151
+ 'tflite.info.identifier': 'ファイル識別子', 'tflite.info.minRuntime': '最小ランタイム',
152
+ 'tflite.info.fileSize': 'ファイルサイズ', 'tflite.info.weights': '重みバイト数',
153
+ 'tflite.info.subgraphs': 'サブグラフ', 'tflite.info.signatures': 'シグネチャ',
154
+ 'tflite.info.operatorCode': '演算子コード', 'tflite.info.metadata': 'メタデータ',
155
+ 'tflite.info.expectedSize': '想定サイズ', 'tflite.info.shapeSignature': '形状シグネチャ',
156
+ 'tflite.info.sparsity': 'スパース性', 'tflite.info.traversalOrder': '走査順序',
157
+ 'tflite.inspector.inputs': '入力', 'tflite.inspector.outputs': '出力',
158
+ 'tflite.inspector.intermediates': '中間テンソル', 'tflite.inspector.options': 'オプション',
159
+ 'tflite.inspector.customOptions': 'カスタムオプション', 'tflite.inspector.subgraphs': '参照サブグラフ',
114
160
  'proto.title': 'Protocol Buffer', 'proto.summary': '{syntax} · {package} · メッセージ{messages}件 · サービス{services}件',
115
161
  'proto.noPackage': 'パッケージなし', 'proto.search': 'メッセージ、フィールド、列挙型、RPCを検索', 'proto.copyPanel': 'パネルをコピー',
116
162
  'proto.panel.tree': 'メッセージツリー', 'proto.panel.types': '型', 'proto.panel.relationships': '関係',
@@ -83,6 +83,7 @@ export const CATALOG_KO = {
83
83
  'gguf.warning.tensorsLimited': '메모리 사용을 제한하기 위해 전체 {total}개 텐서 중 처음 {shown}개를 표시합니다.',
84
84
  'gguf.warning.metadataLimited': '메모리 사용을 제한하기 위해 전체 {total}개 메타데이터 중 처음 {shown}개를 표시합니다.',
85
85
  'gguf.warning.textTruncated': '필드별 제한 또는 GGUF 문자 예산으로 인해 일부 텍스트가 잘렸습니다.',
86
+ 'gguf.warning.metadataTooLarge': '이 파일의 메타데이터가 너무 커서 전체를 해석할 수 없습니다. 키 미리보기만 표시되며 텐서 목록은 제공되지 않습니다.',
86
87
  'onnx.title': 'ONNX 모델', 'onnx.search': '그래프, 노드, 텐서 검색…', 'onnx.copyJson': 'JSON 복사',
87
88
  'onnx.graph': '그래프', 'onnx.nodes': '노드', 'onnx.tensors': '텐서', 'onnx.io': '입출력',
88
89
  'onnx.modelInfo': '모델 정보', 'onnx.rows': '전체 {total}행 중 {shown}행 표시', 'onnx.noMatches': '검색과 일치하는 행이 없습니다.',
@@ -113,6 +114,51 @@ export const CATALOG_KO = {
113
114
  'onnx.info.training': '학습 그래프', 'onnx.info.configurations': '장치 구성',
114
115
  'onnx.info.quantization': '양자화 주석', 'onnx.info.deviceConfiguration': '장치 구성',
115
116
  'onnx.info.pipelineStage': '파이프라인 단계',
117
+ 'tflite.title': 'TFLite 모델', 'tflite.search': '연산자, 텐서, 버퍼 검색…',
118
+ 'tflite.copyJson': 'JSON 복사', 'tflite.subgraph': '서브그래프', 'tflite.unnamed': '이름 없음',
119
+ 'tflite.graph': '그래프', 'tflite.operators': '연산자', 'tflite.tensors': '텐서',
120
+ 'tflite.io': '입력 및 출력', 'tflite.buffers': '버퍼', 'tflite.modelInfo': '모델 정보',
121
+ 'tflite.rows': '{total}행 중 {shown}행 표시', 'tflite.noMatches': '검색 조건과 일치하는 행이 없습니다.',
122
+ 'tflite.selectNode': '연산자나 텐서를 선택하면 상세 정보가 표시됩니다.',
123
+ 'tflite.graphLimited': '그래프 미리보기에 전체 {total}개 중 {shown}개를 표시합니다.',
124
+ 'tflite.graphEdgesLimited': '연결선은 처음 {count}개만 표시합니다.',
125
+ 'tflite.moreItems': '{count}개 더…', 'tflite.runtime': '런타임 {version}', 'tflite.schema': '스키마 v{version}',
126
+ 'tflite.scalar': '스칼라', 'tflite.unknownRank': '랭크 불명', 'tflite.optional': '선택적', 'tflite.variable': '변수',
127
+ 'tflite.opDetail': '#{index} · v{version}', 'tflite.customBytes': '커스텀 옵션 {bytes}바이트',
128
+ 'tflite.binaryBuffer': '바이너리, 버퍼 {buffer}에 {bytes}',
129
+ 'tflite.summary.operators': '연산자', 'tflite.summary.tensors': '텐서',
130
+ 'tflite.summary.subgraphs': '서브그래프', 'tflite.summary.operatorCodes': '연산자 코드',
131
+ 'tflite.summary.weights': '가중치', 'tflite.summary.version': '스키마 버전',
132
+ 'tflite.warning.identifier': '파일 식별자가 예상되는 TFL3가 아니라 {identifier}입니다.',
133
+ 'tflite.warning.version': '모델이 스키마 버전 {version}을 선언했습니다. 이 뷰어는 버전 3을 기준으로 합니다.',
134
+ 'tflite.warning.noSubgraphs': '모델에 서브그래프가 없습니다.',
135
+ 'tflite.warning.emptyGraph': '모델의 서브그래프에 연산자가 없습니다.',
136
+ 'tflite.warning.customOps': '커스텀 연산자 {count}개는 런타임에 별도 등록이 필요합니다: {names}',
137
+ 'tflite.warning.flexOps': '연산자 {count}개가 Select TensorFlow 연산으로 대체됩니다.',
138
+ 'tflite.warning.appendedBuffers': '버퍼 {count}개가 FlatBuffer 바깥에 데이터를 저장합니다.',
139
+ 'tflite.column.index': '#', 'tflite.column.name': '이름', 'tflite.column.operator': '연산자',
140
+ 'tflite.column.kind': '종류', 'tflite.column.version': '버전', 'tflite.column.inputs': '입력',
141
+ 'tflite.column.outputs': '출력', 'tflite.column.optionsType': '옵션 형식', 'tflite.column.options': '옵션',
142
+ 'tflite.column.type': '타입', 'tflite.column.shape': '형상', 'tflite.column.elements': '요소 수',
143
+ 'tflite.column.dataSize': '데이터 크기', 'tflite.column.storage': '저장 위치',
144
+ 'tflite.column.quantization': '양자화', 'tflite.column.variable': '변수',
145
+ 'tflite.column.signature': '시그니처', 'tflite.column.typeShape': '타입 / 형상',
146
+ 'tflite.column.tensorIndex': '텐서', 'tflite.column.fileOffset': '파일 오프셋',
147
+ 'tflite.column.usedBy': '사용처', 'tflite.column.buffer': '버퍼',
148
+ 'tflite.storage.empty': '런타임', 'tflite.storage.inline': '인라인', 'tflite.storage.appended': '외부 추가',
149
+ 'tflite.kind.builtin': '내장', 'tflite.kind.custom': '커스텀', 'tflite.kind.input': '입력',
150
+ 'tflite.kind.output': '출력', 'tflite.kind.signatureInput': '시그니처 입력',
151
+ 'tflite.kind.signatureOutput': '시그니처 출력',
152
+ 'tflite.info.description': '설명', 'tflite.info.schemaVersion': '스키마 버전',
153
+ 'tflite.info.identifier': '파일 식별자', 'tflite.info.minRuntime': '최소 런타임',
154
+ 'tflite.info.fileSize': '파일 크기', 'tflite.info.weights': '가중치 바이트',
155
+ 'tflite.info.subgraphs': '서브그래프', 'tflite.info.signatures': '시그니처',
156
+ 'tflite.info.operatorCode': '연산자 코드', 'tflite.info.metadata': '메타데이터',
157
+ 'tflite.info.expectedSize': '예상 크기', 'tflite.info.shapeSignature': '형상 시그니처',
158
+ 'tflite.info.sparsity': '희소성', 'tflite.info.traversalOrder': '순회 순서',
159
+ 'tflite.inspector.inputs': '입력', 'tflite.inspector.outputs': '출력',
160
+ 'tflite.inspector.intermediates': '중간 텐서', 'tflite.inspector.options': '옵션',
161
+ 'tflite.inspector.customOptions': '커스텀 옵션', 'tflite.inspector.subgraphs': '참조 서브그래프',
116
162
  'proto.title': 'Protocol Buffer', 'proto.summary': '{syntax} · {package} · 메시지 {messages}개 · 서비스 {services}개',
117
163
  'proto.noPackage': '패키지 없음', 'proto.search': '메시지, 필드, enum, RPC 검색', 'proto.copyPanel': '패널 복사',
118
164
  'proto.panel.tree': '메시지 트리', 'proto.panel.types': '타입', 'proto.panel.relationships': '관계',
@@ -73,6 +73,7 @@ export const CATALOG_ZH_CN = {
73
73
  'gguf.warning.tensorsLimited': '为限制内存使用,仅显示 {total} 个张量中的前 {shown} 个。',
74
74
  'gguf.warning.metadataLimited': '为限制内存使用,仅显示 {total} 个元数据条目中的前 {shown} 个。',
75
75
  'gguf.warning.textTruncated': '由于字段限制或 GGUF 字符预算,部分文本已被截断。',
76
+ 'gguf.warning.metadataTooLarge': '该文件的元数据过大,无法完整解析,因此仅显示键的预览,且无法提供张量列表。',
76
77
  'onnx.title': 'ONNX 模型', 'onnx.search': '搜索图、节点和张量…', 'onnx.copyJson': '复制 JSON',
77
78
  'onnx.graph': '计算图', 'onnx.nodes': '节点', 'onnx.tensors': '张量', 'onnx.io': '输入和输出',
78
79
  'onnx.modelInfo': '模型信息', 'onnx.rows': '显示 {shown} / {total} 行', 'onnx.noMatches': '没有符合当前搜索的行。',
@@ -102,6 +103,51 @@ export const CATALOG_ZH_CN = {
102
103
  'onnx.info.training': '训练图', 'onnx.info.configurations': '设备配置',
103
104
  'onnx.info.quantization': '量化注释', 'onnx.info.deviceConfiguration': '设备配置',
104
105
  'onnx.info.pipelineStage': '流水线阶段',
106
+ 'tflite.title': 'TFLite 模型', 'tflite.search': '搜索算子、张量和缓冲区…',
107
+ 'tflite.copyJson': '复制 JSON', 'tflite.subgraph': '子图', 'tflite.unnamed': '未命名',
108
+ 'tflite.graph': '计算图', 'tflite.operators': '算子', 'tflite.tensors': '张量',
109
+ 'tflite.io': '输入与输出', 'tflite.buffers': '缓冲区', 'tflite.modelInfo': '模型信息',
110
+ 'tflite.rows': '共 {total} 行,显示 {shown} 行', 'tflite.noMatches': '没有符合当前搜索条件的行。',
111
+ 'tflite.selectNode': '选择算子或张量以查看详情。',
112
+ 'tflite.graphLimited': '计算图预览显示 {total} 项中的 {shown} 项。',
113
+ 'tflite.graphEdgesLimited': '仅显示前 {count} 条连接。',
114
+ 'tflite.moreItems': '还有 {count} 项…', 'tflite.runtime': '运行时 {version}', 'tflite.schema': '架构 v{version}',
115
+ 'tflite.scalar': '标量', 'tflite.unknownRank': '秩未知', 'tflite.optional': '可选', 'tflite.variable': '变量',
116
+ 'tflite.opDetail': '#{index} · v{version}', 'tflite.customBytes': '自定义选项 {bytes} 字节',
117
+ 'tflite.binaryBuffer': '二进制,缓冲区 {buffer} 中 {bytes}',
118
+ 'tflite.summary.operators': '算子', 'tflite.summary.tensors': '张量',
119
+ 'tflite.summary.subgraphs': '子图', 'tflite.summary.operatorCodes': '算子编码',
120
+ 'tflite.summary.weights': '权重', 'tflite.summary.version': '架构版本',
121
+ 'tflite.warning.identifier': '文件标识为 {identifier},而非预期的 TFL3。',
122
+ 'tflite.warning.version': '模型声明的架构版本为 {version},本查看器针对版本 3。',
123
+ 'tflite.warning.noSubgraphs': '模型不包含子图。',
124
+ 'tflite.warning.emptyGraph': '模型的子图中没有算子。',
125
+ 'tflite.warning.customOps': '{count} 个自定义算子需要在运行时注册:{names}',
126
+ 'tflite.warning.flexOps': '{count} 个算子回退到 Select TensorFlow 算子。',
127
+ 'tflite.warning.appendedBuffers': '{count} 个缓冲区将数据存放在 FlatBuffer 之外。',
128
+ 'tflite.column.index': '#', 'tflite.column.name': '名称', 'tflite.column.operator': '算子',
129
+ 'tflite.column.kind': '类别', 'tflite.column.version': '版本', 'tflite.column.inputs': '输入',
130
+ 'tflite.column.outputs': '输出', 'tflite.column.optionsType': '选项类型', 'tflite.column.options': '选项',
131
+ 'tflite.column.type': '类型', 'tflite.column.shape': '形状', 'tflite.column.elements': '元素数',
132
+ 'tflite.column.dataSize': '数据大小', 'tflite.column.storage': '存储方式',
133
+ 'tflite.column.quantization': '量化', 'tflite.column.variable': '变量',
134
+ 'tflite.column.signature': '签名', 'tflite.column.typeShape': '类型 / 形状',
135
+ 'tflite.column.tensorIndex': '张量', 'tflite.column.fileOffset': '文件偏移',
136
+ 'tflite.column.usedBy': '使用者', 'tflite.column.buffer': '缓冲区',
137
+ 'tflite.storage.empty': '运行时', 'tflite.storage.inline': '内联', 'tflite.storage.appended': '外部追加',
138
+ 'tflite.kind.builtin': '内置', 'tflite.kind.custom': '自定义', 'tflite.kind.input': '输入',
139
+ 'tflite.kind.output': '输出', 'tflite.kind.signatureInput': '签名输入',
140
+ 'tflite.kind.signatureOutput': '签名输出',
141
+ 'tflite.info.description': '说明', 'tflite.info.schemaVersion': '架构版本',
142
+ 'tflite.info.identifier': '文件标识', 'tflite.info.minRuntime': '最低运行时',
143
+ 'tflite.info.fileSize': '文件大小', 'tflite.info.weights': '权重字节数',
144
+ 'tflite.info.subgraphs': '子图', 'tflite.info.signatures': '签名',
145
+ 'tflite.info.operatorCode': '算子编码', 'tflite.info.metadata': '元数据',
146
+ 'tflite.info.expectedSize': '预期大小', 'tflite.info.shapeSignature': '形状签名',
147
+ 'tflite.info.sparsity': '稀疏性', 'tflite.info.traversalOrder': '遍历顺序',
148
+ 'tflite.inspector.inputs': '输入', 'tflite.inspector.outputs': '输出',
149
+ 'tflite.inspector.intermediates': '中间张量', 'tflite.inspector.options': '选项',
150
+ 'tflite.inspector.customOptions': '自定义选项', 'tflite.inspector.subgraphs': '引用的子图',
105
151
  'proto.title': 'Protocol Buffer', 'proto.summary': '{syntax} · {package} · {messages} 条消息 · {services} 个服务',
106
152
  'proto.noPackage': '无软件包', 'proto.search': '搜索消息、字段、枚举或 RPC', 'proto.copyPanel': '复制面板',
107
153
  'proto.panel.tree': '消息树', 'proto.panel.types': '类型', 'proto.panel.relationships': '关系',
@@ -80,8 +80,25 @@ export declare const GGUF_NORMALIZED_TEXT_BUDGET = 2000000;
80
80
  /** Admission limits enforced from source bytes before @huggingface/gguf allocates entry objects. */
81
81
  export declare const GGUF_PARSE_TENSOR_LIMIT = 100000;
82
82
  export declare const GGUF_PARSE_METADATA_LIMIT = 10000;
83
- export declare const GGUF_PARSE_ARRAY_ELEMENT_LIMIT = 1000000;
83
+ /**
84
+ * Total metadata array elements. Numeric elements land in packed JS arrays (~8 B
85
+ * each), but INT64/UINT64 subtypes become BigInt objects, so keep the headroom
86
+ * modest: a 256K-vocab model's `tokens` + `token_type` + `merges` is ~1M elements,
87
+ * and the Qwen3 file from issue #18 measures 455,265.
88
+ */
89
+ export declare const GGUF_PARSE_ARRAY_ELEMENT_LIMIT = 2000000;
84
90
  export declare const GGUF_PARSE_STRING_BYTE_LIMIT: number;
91
+ /**
92
+ * Caps the metadata elements that become individual JS objects upstream. String
93
+ * *content* is already bounded by GGUF_PARSE_STRING_BYTE_LIMIT, so what is left to
94
+ * bound is per-object overhead (~50-60 B each in V8), i.e. roughly 60 MB here.
95
+ *
96
+ * Real tokenizers sit well under this: `tokens` + `merges` is ~303K for Qwen3
97
+ * (151,936-entry vocab), ~408K for Llama 3, and ~756K for a 256K-vocab BPE model.
98
+ * The previous 300K ceiling cut through that range and rejected most current
99
+ * models -- see https://github.com/battlecook/vscode-omni-viewer/issues/18.
100
+ */
101
+ export declare const GGUF_PARSE_COMPLEX_ARRAY_LIMIT = 1000000;
85
102
  /**
86
103
  * Parses a remote GGUF URL. Node local files use the abortable `./node` helper.
87
104
  * Tensor payload bytes are not decoded; @huggingface/gguf range-reads only the