hdrify-react 1.3.0 → 1.4.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 +51 -19
- package/dist/HdrifyCanvas.d.ts +1 -1
- package/dist/HdrifyCanvas.d.ts.map +1 -1
- package/dist/HdrifyCanvas.js +5 -30
- package/dist/HdrifyCanvas.js.map +1 -1
- package/dist/ImageViewer.d.ts +75 -0
- package/dist/ImageViewer.d.ts.map +1 -0
- package/dist/ImageViewer.js +199 -0
- package/dist/ImageViewer.js.map +1 -0
- package/dist/capture.d.ts +21 -0
- package/dist/capture.d.ts.map +1 -0
- package/dist/capture.js +50 -0
- package/dist/capture.js.map +1 -0
- package/dist/decode.d.ts +7 -0
- package/dist/decode.d.ts.map +1 -0
- package/dist/decode.js +23 -0
- package/dist/decode.js.map +1 -0
- package/dist/element.d.ts +51 -0
- package/dist/element.d.ts.map +1 -0
- package/dist/element.js +212 -0
- package/dist/element.js.map +1 -0
- package/dist/image-viewer.js +159 -0
- package/dist/image-viewer.js.map +7 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/progress.d.ts +19 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +47 -0
- package/dist/progress.js.map +1 -0
- package/dist/readiness.d.ts +15 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +46 -0
- package/dist/readiness.js.map +1 -0
- package/dist/styles.d.ts +6 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +84 -0
- package/dist/styles.js.map +1 -0
- package/package.json +37 -13
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { HdrifyImage } from 'hdrify';
|
|
2
|
+
import { type ImageViewerCaptureOptions } from './capture.js';
|
|
3
|
+
import { type ImageViewerSettings } from './ImageViewer.js';
|
|
4
|
+
declare const ElementBase: {
|
|
5
|
+
new (): HTMLElement;
|
|
6
|
+
prototype: HTMLElement;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* `<image-viewer>`: displays an EXR, HDR or gain map JPEG with tone mapping. A web component wrapping
|
|
10
|
+
* {@link ImageViewer}; it works in plain HTML and any framework.
|
|
11
|
+
*
|
|
12
|
+
* Attributes: `src`, `tone-mapping`, `exposure` (stops), `fit`, `settings-panel`, `exposure-control`.
|
|
13
|
+
* Events: `progress` ({@link ImageViewerProgress}), `load` (`{ image }`), `error` (`{ message, error }`),
|
|
14
|
+
* `settingschange` (`{ settings }`). Children with `slot="progress-bar"` replace the default loading bar.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ImageViewerElement extends ElementBase {
|
|
17
|
+
#private;
|
|
18
|
+
static observedAttributes: string[];
|
|
19
|
+
/** URL to load; reflects the `src` attribute. */
|
|
20
|
+
get src(): string;
|
|
21
|
+
set src(value: string);
|
|
22
|
+
/** A decoded image to display; takes precedence over `data` and `src`. */
|
|
23
|
+
get image(): HdrifyImage | undefined;
|
|
24
|
+
set image(value: HdrifyImage | undefined);
|
|
25
|
+
/** Encoded EXR, HDR or gain map JPEG bytes; takes precedence over `src`. */
|
|
26
|
+
get data(): ArrayBuffer | Uint8Array | undefined;
|
|
27
|
+
set data(value: ArrayBuffer | Uint8Array | undefined);
|
|
28
|
+
/** The current display settings. Assign a partial object to change them. */
|
|
29
|
+
get settings(): ImageViewerSettings;
|
|
30
|
+
set settings(patch: Partial<ImageViewerSettings>);
|
|
31
|
+
connectedCallback(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Resolve once the current source is loaded and drawn (immediately with no source). If the source changes first,
|
|
34
|
+
* it waits for the new source instead. Rejects with the load's error, or if the element is disconnected.
|
|
35
|
+
*/
|
|
36
|
+
whenReady(): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Wait for {@link whenReady}, then encode the tone-mapped image with the current settings, at the image's own
|
|
39
|
+
* size unless `width`/`height` are given. Only the image is included, not the viewer's controls.
|
|
40
|
+
*/
|
|
41
|
+
toBlob(options?: ImageViewerCaptureOptions): Promise<Blob>;
|
|
42
|
+
disconnectedCallback(): void;
|
|
43
|
+
attributeChangedCallback(name: string): void;
|
|
44
|
+
}
|
|
45
|
+
declare global {
|
|
46
|
+
interface HTMLElementTagNameMap {
|
|
47
|
+
'image-viewer': ImageViewerElement;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element.d.ts","sources":["../src/element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAAgB,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAIL,KAAK,mBAAmB,EAGzB,MAAM,kBAAkB,CAAC;AAW1B,QAAA,MAAM,WAAW;;;CAAsF,CAAC;AAExG;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;;IACjD,MAAM,CAAC,kBAAkB,WAAoF;IAgB7G,iDAAiD;IACjD,IAAI,GAAG,IAAI,MAAM,CAEhB;IACD,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,EAEpB;IACD,0EAA0E;IAC1E,IAAI,KAAK,IAAI,WAAW,GAAG,SAAS,CAEnC;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAIvC;IACD,4EAA4E;IAC5E,IAAI,IAAI,IAAI,WAAW,GAAG,UAAU,GAAG,SAAS,CAE/C;IACD,IAAI,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,EAInD;IACD,4EAA4E;IAC5E,IAAI,QAAQ,IAAI,mBAAmB,CAElC;IACD,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,EAS/C;IAED,iBAAiB,IAAI,IAAI,CAgBxB;IAED;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAEzB;IAED;;;OAGG;IACG,MAAM,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/D;IAED,oBAAoB,IAAI,IAAI,CAW3B;IAED,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAa3C;CAoEF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,kBAAkB,CAAC;KACpC;CACF"}
|
package/dist/element.js
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
|
+
import { captureImage } from './capture.js';
|
|
4
|
+
import { DEFAULT_IMAGE_VIEWER_SETTINGS, ImageViewer, TONE_MAPPING_OPTIONS, } from './ImageViewer.js';
|
|
5
|
+
import { ViewerReadiness } from './readiness.js';
|
|
6
|
+
const HOST_CSS = ':host{display:block;height:480px;position:relative;min-width:0}:host([hidden]){display:none}';
|
|
7
|
+
function oneOf(value, allowed) {
|
|
8
|
+
return allowed.find((option) => option === value);
|
|
9
|
+
}
|
|
10
|
+
// Importing this module on an SSR server is safe; registration occurs only in a browser.
|
|
11
|
+
// oxlint-disable-next-line typescript/no-extraneous-class
|
|
12
|
+
const ElementBase = typeof HTMLElement === 'undefined' ? class {
|
|
13
|
+
} : HTMLElement;
|
|
14
|
+
/**
|
|
15
|
+
* `<image-viewer>`: displays an EXR, HDR or gain map JPEG with tone mapping. A web component wrapping
|
|
16
|
+
* {@link ImageViewer}; it works in plain HTML and any framework.
|
|
17
|
+
*
|
|
18
|
+
* Attributes: `src`, `tone-mapping`, `exposure` (stops), `fit`, `settings-panel`, `exposure-control`.
|
|
19
|
+
* Events: `progress` ({@link ImageViewerProgress}), `load` (`{ image }`), `error` (`{ message, error }`),
|
|
20
|
+
* `settingschange` (`{ settings }`). Children with `slot="progress-bar"` replace the default loading bar.
|
|
21
|
+
*/
|
|
22
|
+
export class ImageViewerElement extends ElementBase {
|
|
23
|
+
static observedAttributes = ['src', 'tone-mapping', 'exposure', 'fit', 'settings-panel', 'exposure-control'];
|
|
24
|
+
#root;
|
|
25
|
+
#mount;
|
|
26
|
+
#generation = 0;
|
|
27
|
+
#reflecting = false;
|
|
28
|
+
#image;
|
|
29
|
+
#data;
|
|
30
|
+
#settings = { ...DEFAULT_IMAGE_VIEWER_SETTINGS };
|
|
31
|
+
#readiness = new ViewerReadiness();
|
|
32
|
+
/** Incremented on every source change, so callbacks from a superseded load are ignored. */
|
|
33
|
+
#revision = 0;
|
|
34
|
+
/** The image currently drawn, for toBlob(). */
|
|
35
|
+
#shown;
|
|
36
|
+
/** The source of the current load: what ImageViewer loads, by precedence. */
|
|
37
|
+
#source;
|
|
38
|
+
/** URL to load; reflects the `src` attribute. */
|
|
39
|
+
get src() {
|
|
40
|
+
return this.getAttribute('src') ?? '';
|
|
41
|
+
}
|
|
42
|
+
set src(value) {
|
|
43
|
+
this.setAttribute('src', value);
|
|
44
|
+
}
|
|
45
|
+
/** A decoded image to display; takes precedence over `data` and `src`. */
|
|
46
|
+
get image() {
|
|
47
|
+
return this.#image;
|
|
48
|
+
}
|
|
49
|
+
set image(value) {
|
|
50
|
+
this.#image = value;
|
|
51
|
+
this.#sourceChanged();
|
|
52
|
+
this.#render();
|
|
53
|
+
}
|
|
54
|
+
/** Encoded EXR, HDR or gain map JPEG bytes; takes precedence over `src`. */
|
|
55
|
+
get data() {
|
|
56
|
+
return this.#data;
|
|
57
|
+
}
|
|
58
|
+
set data(value) {
|
|
59
|
+
this.#data = value;
|
|
60
|
+
this.#sourceChanged();
|
|
61
|
+
this.#render();
|
|
62
|
+
}
|
|
63
|
+
/** The current display settings. Assign a partial object to change them. */
|
|
64
|
+
get settings() {
|
|
65
|
+
return { ...this.#settings };
|
|
66
|
+
}
|
|
67
|
+
set settings(patch) {
|
|
68
|
+
const next = { ...this.#settings, ...patch };
|
|
69
|
+
this.#reflect([
|
|
70
|
+
['tone-mapping', next.toneMapping],
|
|
71
|
+
['exposure', String(next.exposure)],
|
|
72
|
+
['fit', next.fit],
|
|
73
|
+
]);
|
|
74
|
+
this.#settings = next;
|
|
75
|
+
this.#render();
|
|
76
|
+
}
|
|
77
|
+
connectedCallback() {
|
|
78
|
+
++this.#generation;
|
|
79
|
+
if (!this.shadowRoot) {
|
|
80
|
+
const shadow = this.attachShadow({ mode: 'open' });
|
|
81
|
+
const style = document.createElement('style');
|
|
82
|
+
style.textContent = HOST_CSS;
|
|
83
|
+
this.#mount = document.createElement('div');
|
|
84
|
+
this.#mount.style.height = '100%';
|
|
85
|
+
shadow.append(style, this.#mount);
|
|
86
|
+
}
|
|
87
|
+
// A moved element keeps its React root and image; a new root loads the source again.
|
|
88
|
+
if (!this.#root) {
|
|
89
|
+
this.#root = createRoot(this.#mount);
|
|
90
|
+
this.#sourceChanged(true);
|
|
91
|
+
}
|
|
92
|
+
this.#render();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Resolve once the current source is loaded and drawn (immediately with no source). If the source changes first,
|
|
96
|
+
* it waits for the new source instead. Rejects with the load's error, or if the element is disconnected.
|
|
97
|
+
*/
|
|
98
|
+
whenReady() {
|
|
99
|
+
return this.#readiness.whenReady();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Wait for {@link whenReady}, then encode the tone-mapped image with the current settings, at the image's own
|
|
103
|
+
* size unless `width`/`height` are given. Only the image is included, not the viewer's controls.
|
|
104
|
+
*/
|
|
105
|
+
async toBlob(options) {
|
|
106
|
+
await this.whenReady();
|
|
107
|
+
if (!this.#shown)
|
|
108
|
+
throw new Error('No image is loaded.');
|
|
109
|
+
return captureImage(this.#shown, this.#settings.toneMapping, 2 ** this.#settings.exposure, options);
|
|
110
|
+
}
|
|
111
|
+
disconnectedCallback() {
|
|
112
|
+
const generation = ++this.#generation;
|
|
113
|
+
// A parent React tree may be removing this element right now: unmount after that commit, and keep the root
|
|
114
|
+
// if the element is moved (disconnected and reconnected synchronously).
|
|
115
|
+
queueMicrotask(() => {
|
|
116
|
+
if (generation !== this.#generation || this.isConnected)
|
|
117
|
+
return;
|
|
118
|
+
this.#root?.unmount();
|
|
119
|
+
this.#root = undefined;
|
|
120
|
+
this.#readiness.disconnect();
|
|
121
|
+
++this.#revision;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
attributeChangedCallback(name) {
|
|
125
|
+
if (this.#reflecting)
|
|
126
|
+
return;
|
|
127
|
+
if (name === 'src')
|
|
128
|
+
this.#sourceChanged();
|
|
129
|
+
const exposure = this.getAttribute('exposure');
|
|
130
|
+
const toneMapping = oneOf(this.getAttribute('tone-mapping'), TONE_MAPPING_OPTIONS.map((option) => option.value));
|
|
131
|
+
const fit = oneOf(this.getAttribute('fit'), ['contain', 'actual']);
|
|
132
|
+
if (toneMapping)
|
|
133
|
+
this.#settings.toneMapping = toneMapping;
|
|
134
|
+
if (fit)
|
|
135
|
+
this.#settings.fit = fit;
|
|
136
|
+
if (exposure !== null && Number.isFinite(Number(exposure)))
|
|
137
|
+
this.#settings.exposure = Number(exposure);
|
|
138
|
+
this.#render();
|
|
139
|
+
}
|
|
140
|
+
// Mark a new load synchronously, so whenReady() called right after a change waits for the new source.
|
|
141
|
+
#sourceChanged(reload = false) {
|
|
142
|
+
const source = this.#image ?? this.#data ?? this.getAttribute('src') ?? undefined;
|
|
143
|
+
// Setting the same source again does not reload, so it must not start waiting for a load either.
|
|
144
|
+
if (!this.#root || (source === this.#source && !reload))
|
|
145
|
+
return;
|
|
146
|
+
this.#source = source;
|
|
147
|
+
++this.#revision;
|
|
148
|
+
this.#shown = undefined;
|
|
149
|
+
this.#readiness.pending();
|
|
150
|
+
this.setAttribute('aria-busy', String(source !== undefined));
|
|
151
|
+
if (source === undefined)
|
|
152
|
+
this.#readiness.finish();
|
|
153
|
+
}
|
|
154
|
+
// Write attributes without re-entering attributeChangedCallback.
|
|
155
|
+
#reflect(entries) {
|
|
156
|
+
this.#reflecting = true;
|
|
157
|
+
try {
|
|
158
|
+
for (const [name, value] of entries)
|
|
159
|
+
if (this.getAttribute(name) !== value)
|
|
160
|
+
this.setAttribute(name, value);
|
|
161
|
+
}
|
|
162
|
+
finally {
|
|
163
|
+
this.#reflecting = false;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
#dispatch(type, detail) {
|
|
167
|
+
this.dispatchEvent(new CustomEvent(type, { detail, bubbles: true, composed: true }));
|
|
168
|
+
}
|
|
169
|
+
#render() {
|
|
170
|
+
const exposureControl = this.getAttribute('exposure-control');
|
|
171
|
+
const revision = this.#revision;
|
|
172
|
+
const current = () => revision === this.#revision;
|
|
173
|
+
this.#root?.render(createElement(ImageViewer, {
|
|
174
|
+
src: this.getAttribute('src') ?? undefined,
|
|
175
|
+
data: this.#data,
|
|
176
|
+
image: this.#image,
|
|
177
|
+
...this.#settings,
|
|
178
|
+
settingsPanel: oneOf(this.getAttribute('settings-panel'), ['open', 'closed', 'hidden']),
|
|
179
|
+
exposureControl: exposureControl !== null && exposureControl !== 'false',
|
|
180
|
+
style: { height: '100%' },
|
|
181
|
+
onProgress: (progress) => {
|
|
182
|
+
if (!current())
|
|
183
|
+
return;
|
|
184
|
+
this.setAttribute('aria-busy', String(progress.totalProgress < 1));
|
|
185
|
+
this.#dispatch('progress', progress);
|
|
186
|
+
},
|
|
187
|
+
onLoad: (image) => {
|
|
188
|
+
if (!current())
|
|
189
|
+
return;
|
|
190
|
+
this.#shown = image;
|
|
191
|
+
this.setAttribute('aria-busy', 'false');
|
|
192
|
+
this.#readiness.finish();
|
|
193
|
+
this.#dispatch('load', { image });
|
|
194
|
+
},
|
|
195
|
+
onError: (error) => {
|
|
196
|
+
if (!current())
|
|
197
|
+
return;
|
|
198
|
+
this.setAttribute('aria-busy', 'false');
|
|
199
|
+
this.#readiness.finish(error);
|
|
200
|
+
this.#dispatch('error', { message: error.message, error });
|
|
201
|
+
},
|
|
202
|
+
onSettingsChange: (settings) => {
|
|
203
|
+
this.settings = settings;
|
|
204
|
+
this.#dispatch('settingschange', { settings: this.settings });
|
|
205
|
+
},
|
|
206
|
+
onSettingsPanelChange: (mode) => this.#reflect([['settings-panel', mode]]),
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (typeof customElements !== 'undefined' && !customElements.get('image-viewer'))
|
|
211
|
+
customElements.define('image-viewer', ImageViewerElement);
|
|
212
|
+
//# sourceMappingURL=element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element.js","sources":["../src/element.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAa,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAkC,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,6BAA6B,EAE7B,WAAW,EAGX,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,QAAQ,GAAG,8FAA8F,CAAC;AAEhH,SAAS,KAAK,CAAmB,KAAoB,EAAE,OAAqB;IAC1E,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC;AACpD,CAAC;AAED,yFAAyF;AACzF,0DAA0D;AAC1D,MAAM,WAAW,GAAG,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAE;CAA+B,CAAC,CAAC,CAAC,WAAW,CAAC;AAExG;;;;;;;GAOG;AACH,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IACjD,MAAM,CAAC,kBAAkB,GAAG,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IAC7G,KAAK,CAAQ;IACb,MAAM,CAAkB;IACxB,WAAW,GAA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