@reekon-tools/boldr-utils 1.9.2 → 1.9.4

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.
@@ -24,6 +24,7 @@ export interface UseAnnotationCanvasDocResult {
24
24
  error: Error | null;
25
25
  saveStatus: SaveStatus;
26
26
  save: () => Promise<void>;
27
+ refreshThumbnail: () => Promise<void>;
27
28
  ensureFileId: () => Promise<string>;
28
29
  setBackgroundImage: (blob: ImageBlob, dims: {
29
30
  width: number;
@@ -322,6 +322,16 @@ export const useAnnotationCanvasDoc = (options) => {
322
322
  await flush();
323
323
  await thumbnailPromiseRef.current;
324
324
  }, [flush]);
325
+ // Thumbnail-only refresh (see UseAnnotationCanvasDocResult.refreshThumbnail).
326
+ // Deliberately does NOT touch saveStatus: the canvas document is unchanged,
327
+ // so marking it dirty would both write an identical canvas and raise the
328
+ // unsaved-changes prompt for an edit the user already committed elsewhere.
329
+ const refreshThumbnail = useCallback(async () => {
330
+ const id = fileIdRef.current ?? createdIdRef.current;
331
+ if (!id)
332
+ return;
333
+ await saveThumbnail(id);
334
+ }, [saveThumbnail]);
325
335
  const ensureFileId = useCallback(async () => {
326
336
  const existing = fileIdRef.current ?? createdIdRef.current;
327
337
  if (existing)
@@ -402,6 +412,7 @@ export const useAnnotationCanvasDoc = (options) => {
402
412
  error,
403
413
  saveStatus,
404
414
  save,
415
+ refreshThumbnail,
405
416
  ensureFileId,
406
417
  setBackgroundImage,
407
418
  clearBackgroundImage,
@@ -1,5 +1,5 @@
1
1
  export declare const GeneralColors: {
2
- readonly darkGrey: "#1D1F21";
2
+ readonly darkGrey: "#181A1C";
3
3
  readonly grey1: "#2B2C2E";
4
4
  readonly grey2: "#424345";
5
5
  readonly grey3: "#626364";
@@ -58,7 +58,7 @@ export declare const GreenColors: {
58
58
  */
59
59
  export declare const tailwindColors: {
60
60
  readonly general: {
61
- readonly 'dark-grey': "#1D1F21";
61
+ readonly 'dark-grey': "#181A1C";
62
62
  readonly 'grey-1': "#2B2C2E";
63
63
  readonly 'grey-2': "#424345";
64
64
  readonly 'grey-3': "#626364";
@@ -1,5 +1,5 @@
1
1
  export const GeneralColors = {
2
- darkGrey: '#1D1F21',
2
+ darkGrey: '#181A1C',
3
3
  grey1: '#2B2C2E',
4
4
  grey2: '#424345',
5
5
  grey3: '#626364',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reekon-tools/boldr-utils",
3
- "version": "1.9.2",
3
+ "version": "1.9.4",
4
4
  "description": "Shared utilities for formulas and measurement conversion used in Reekon apps",
5
5
  "author": "REEKON Tools",
6
6
  "license": "MIT",