@enslo/sd-metadata 1.5.0 → 1.6.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.ja.md CHANGED
@@ -149,7 +149,7 @@ if (result.status === 'success') {
149
149
  > 本番環境では `@latest` の代わりに特定のバージョンを指定してください:
150
150
  >
151
151
  > ```text
152
- > https://cdn.jsdelivr.net/npm/@enslo/sd-metadata@1.5.0/dist/index.js
152
+ > https://cdn.jsdelivr.net/npm/@enslo/sd-metadata@1.6.0/dist/index.js
153
153
  > ```
154
154
 
155
155
  ### 応用例
package/README.md CHANGED
@@ -148,7 +148,7 @@ if (result.status === 'success') {
148
148
  > For production use, pin to a specific version instead of `@latest`:
149
149
  >
150
150
  > ```text
151
- > https://cdn.jsdelivr.net/npm/@enslo/sd-metadata@1.5.0/dist/index.js
151
+ > https://cdn.jsdelivr.net/npm/@enslo/sd-metadata@1.6.0/dist/index.js
152
152
  > ```
153
153
 
154
154
  ### Advanced Examples
package/dist/index.d.ts CHANGED
@@ -294,6 +294,15 @@ type ParseResult = {
294
294
  * Automatically detects image format and extracts embedded generation metadata.
295
295
  */
296
296
 
297
+ /** Options for the read function */
298
+ interface ReadOptions {
299
+ /**
300
+ * When true, dimensions are taken strictly from metadata only.
301
+ * When false (default), missing dimensions are extracted from image headers.
302
+ * @default false
303
+ */
304
+ strict?: boolean;
305
+ }
297
306
  /**
298
307
  * Read and parse metadata from an image
299
308
  *
@@ -301,9 +310,10 @@ type ParseResult = {
301
310
  * any embedded generation metadata.
302
311
  *
303
312
  * @param input - Image file data (Uint8Array or ArrayBuffer)
313
+ * @param options - Read options
304
314
  * @returns Parse result containing metadata and raw data
305
315
  */
306
- declare function read(input: Uint8Array | ArrayBuffer): ParseResult;
316
+ declare function read(input: Uint8Array | ArrayBuffer, options?: ReadOptions): ParseResult;
307
317
 
308
318
  /**
309
319
  * Write API for sd-metadata
@@ -477,4 +487,4 @@ declare function formatAsWebUI(metadata: GenerationMetadata): string;
477
487
  */
478
488
  declare function formatRaw(raw: RawMetadata): string;
479
489
 
480
- export { type CharacterPrompt, type GenerationMetadata, type HiresSettings, type ITXtChunk, type MetadataSegment, type MetadataSegmentSource, type ModelSettings, type ParseResult, type PngTextChunk, type RawMetadata, type SamplingSettings, type TExtChunk, type UpscaleSettings, type WriteResult, type WriteWarning, formatAsWebUI, formatRaw, read, write, writeAsWebUI };
490
+ export { type CharacterPrompt, type ComfyNode, type ComfyNodeGraph, type ComfyNodeInputValue, type ComfyNodeReference, type GenerationMetadata, type HiresSettings, type ITXtChunk, type MetadataSegment, type MetadataSegmentSource, type ModelSettings, type ParseResult, type PngTextChunk, type RawMetadata, type ReadOptions, type SamplingSettings, type TExtChunk, type UpscaleSettings, type WriteResult, type WriteWarning, formatAsWebUI, formatRaw, read, write, writeAsWebUI };