livelocale 0.8.0 → 0.8.1

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.
@@ -1,4 +1,4 @@
1
- export { W as WrapOptions, d as decodeKey, e as encodeKey, h as hasWatermark, s as sanitizeZeroWidth, a as stripWatermark, u as unwrap, w as wrapNextIntl, b as wrapTranslationEngine } from '../wrap-CsOtHp8r.cjs';
1
+ export { W as WrapOptions, d as decodeKey, e as encodeKey, h as hasWatermark, r as removeWatermarks, s as sanitizeZeroWidth, a as stripWatermark, u as unwrap, w as wrapNextIntl, b as wrapTranslationEngine } from '../wrap-2qVxLN9Q.cjs';
2
2
 
3
3
  declare class FileMutator {
4
4
  private fileLocks;
@@ -1,4 +1,4 @@
1
- export { W as WrapOptions, d as decodeKey, e as encodeKey, h as hasWatermark, s as sanitizeZeroWidth, a as stripWatermark, u as unwrap, w as wrapNextIntl, b as wrapTranslationEngine } from '../wrap-CsOtHp8r.js';
1
+ export { W as WrapOptions, d as decodeKey, e as encodeKey, h as hasWatermark, r as removeWatermarks, s as sanitizeZeroWidth, a as stripWatermark, u as unwrap, w as wrapNextIntl, b as wrapTranslationEngine } from '../wrap-2qVxLN9Q.js';
2
2
 
3
3
  declare class FileMutator {
4
4
  private fileLocks;
@@ -2073,10 +2073,11 @@ import { readdirSync, statSync as statSync2 } from "fs";
2073
2073
  import { join as join4 } from "path";
2074
2074
 
2075
2075
  // src/client/watermark.ts
2076
- var DELIM = "\u200D";
2076
+ var DELIM = "\u200C";
2077
2077
  var BIT_0 = "\u200B";
2078
- var BIT_1 = "\u200C";
2078
+ var BIT_1 = "\u200D";
2079
2079
  var ZW_RE = /[\u200B\u200C\u200D]/g;
2080
+ var WATERMARK_RE = /\u200C(?:[\u200B\u200D]{8})+\u200C/g;
2080
2081
  function encodeKey(text, key) {
2081
2082
  const bytes = new TextEncoder().encode(key);
2082
2083
  let bits = "";
@@ -2123,6 +2124,9 @@ function stripWatermark(text) {
2123
2124
  function sanitizeZeroWidth(text) {
2124
2125
  return text.replace(ZW_RE, "");
2125
2126
  }
2127
+ function removeWatermarks(text) {
2128
+ return text.replace(WATERMARK_RE, "");
2129
+ }
2126
2130
  function hasWatermark(text) {
2127
2131
  return text.startsWith(DELIM);
2128
2132
  }
@@ -2372,6 +2376,7 @@ export {
2372
2376
  getLiveLocaleMode,
2373
2377
  hasWatermark,
2374
2378
  isLiveLocaleEnabled,
2379
+ removeWatermarks,
2375
2380
  sanitizeZeroWidth,
2376
2381
  stripWatermark,
2377
2382
  unwrap,