@pilio/gemini-watermark-remover 1.0.34 → 1.0.35

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/dist/video-app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @pilio/gemini-watermark-remover v1.0.34+da2fcc5
2
+ * @pilio/gemini-watermark-remover v1.0.35+9b14e90
3
3
  * Automatically removes watermarks from Gemini AI generated images
4
4
  * (c) 2026 GargantuaX
5
5
  * https://github.com/GargantuaX/gemini-watermark-remover
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pilio/gemini-watermark-remover",
3
3
  "description": "Automatically removes watermarks from Gemini AI generated images",
4
- "version": "1.0.34",
4
+ "version": "1.0.35",
5
5
  "author": "GargantuaX",
6
6
  "sideEffects": false,
7
7
  "files": [
@@ -69,6 +69,8 @@ const EXACT_48_R96_SOURCE_WITNESS_DECOY_SHIFTS = [
69
69
  const EXACT_96_R192_SOURCE_WITNESS_MIN_GRADIENT = 0.02;
70
70
  const EXACT_96_R192_SOURCE_WITNESS_MIN_EDGE_PROMINENCE = 0.2;
71
71
  const EXACT_96_R192_SOURCE_WITNESS_MIN_EDGE_PERCENTILE = 0.5;
72
+ const EXACT_96_R192_SOURCE_WITNESS_MIN_INVERSE_SPATIAL = 0.1;
73
+ const EXACT_96_R192_SOURCE_WITNESS_MIN_INVERSE_SPATIAL_PERCENTILE = 0.5;
72
74
  const EXACT_96_R192_SOURCE_WITNESS_GAIN = 0.45;
73
75
  const EXACT_96_R192_SOURCE_WITNESS_REASON =
74
76
  'exact-96-r192-source-witness';
@@ -346,8 +348,24 @@ function createExact96R192SourceWitnessRescueTrial({
346
348
  position,
347
349
  decoyShifts: EXACT_96_R192_SOURCE_WITNESS_DECOY_SHIFTS
348
350
  });
351
+ const spatialSignal = Number(sourceLocalization.spatialSignedTarget);
352
+ const spatialPercentile = Number(sourceLocalization.spatialPercentile);
349
353
  const gradientSignal = Number(sourceLocalization.gradientSignedTarget);
354
+ // White inverse removal needs positive signed evidence. Preserve the
355
+ // structured-content exception only when a separate drifted dark trial
356
+ // exists and the exact anchor still has strong localized spatial support;
357
+ // otherwise unsigned edges alone can reproduce the Issue #123 dark hole.
358
+ const hasSupportedSpatialPolarity = spatialSignal > 0 || (
359
+ hasDriftedDarkPolaritySelection &&
360
+ Math.abs(spatialSignal) >=
361
+ EXACT_96_R192_SOURCE_WITNESS_MIN_INVERSE_SPATIAL &&
362
+ spatialPercentile >=
363
+ EXACT_96_R192_SOURCE_WITNESS_MIN_INVERSE_SPATIAL_PERCENTILE
364
+ );
350
365
  if (
366
+ !Number.isFinite(spatialSignal) ||
367
+ !Number.isFinite(spatialPercentile) ||
368
+ !hasSupportedSpatialPolarity ||
351
369
  !Number.isFinite(gradientSignal) ||
352
370
  gradientSignal < EXACT_96_R192_SOURCE_WITNESS_MIN_GRADIENT ||
353
371
  Number(sourceLocalization.twoSidedEdgeProminence) <
@@ -377,7 +395,8 @@ function createExact96R192SourceWitnessRescueTrial({
377
395
  sourceWitnessRescue: true,
378
396
  sourceWitnessReason: EXACT_96_R192_SOURCE_WITNESS_REASON,
379
397
  sourceWitnessGate: {
380
- spatialSignedTarget: sourceLocalization.spatialSignedTarget,
398
+ spatialSignedTarget: spatialSignal,
399
+ spatialPercentile,
381
400
  gradientSignedTarget: gradientSignal,
382
401
  twoSidedEdgeProminence:
383
402
  sourceLocalization.twoSidedEdgeProminence,