uikit/WATERMARK_1.7.0.md
Mohamadzadeh 38a5935d29
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Successful in 52s
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Successful in 7s
uikit-v1.7.0-watermark-v31-full
2026-11-04 18:52:10 +03:30

2.5 KiB

UI Kit 1.7.0 — WM-v3.1 (SDK 0.2.1, Phase C.3)

Source: user-supplied forensic_watermark_frontend_sdk(2).zip.

Integrated runtime only

  • src/watermark/codec.js: unchanged (SHA-256 identical to SDK). No change to UUID validation or frame bytes.
  • src/watermark/v3.js: byte-identical to SDK; same WM-v3 FEC/pilot/geometry, default 0.014.
  • src/watermark/v31.js: added byte-identical from SDK. New deterministic luma-spread windowed masks with wire version 4.
  • src/watermark/render.js: byte-identical to SDK; default version=4, support versions 2, 3, 4. Default opacity for all three is 0.014; explicit opacity stays untouched.
  • src/watermark/ForensicWatermark.jsx: UI Kit-specific auth/session lifecycle kept intact (sessionKey, onStatusChange, AbortController, duplicate-canvas protection). Only default version changed from 3 to 4. Render functions are imported from the SDK-identical modules.
  • Watermark marker, token resolution (Keycloak first, external fallback), blockUntilReady unchanged.
  • Types, distribution builder, prebuilt dist/watermark.js / .d.ts, README, demo docs, tests updated.

Usage

<Watermark />                               // WM-v3.1, version 4, opacity 0.014
<Watermark version={4} opacity={0.014} />   // explicit same defaults
<Watermark version={3} />                  // previous WM-v3, default opacity now 0.014
<Watermark version={3} opacity={0.03} />    // exact previous UI Kit 1.6.2 default intensity
<Watermark version={2} />                  // historical WM-v2, default opacity 0.014
<ForensicWatermark getAccessToken={getAccessToken} sessionKey={userId} version={4} />

Deployment order: Update the independent backend decoder to support WM-v3.1/wire version 4 before enabling the new default in deployed apps. Old WM-v3 decoders cannot decode v3.1. To preserve previous UI Kit behavior before decoder deployment, explicitly pass version={3} opacity={0.03}. version={2} remains a second rollback option. New defaults are not a guarantee of readability or invisibility. Test on target mobile devices and screenshot transformations.

Excluded by design: Python decoder (tools/), benchmarking, screenshot automation, demo/, test UI assets, Playwright/Python test harness, sample datasets. No extra UI Kit dependencies or remote server deployment.

Note: the upstream SDK's standalone component differs from the UI Kit-specific lifecycle wrapper, so it is not copied wholesale. Only the algorithm files are copied byte-for-byte; the wrapper retains compatibility semantics.