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.
- package/dist/client/index.cjs +56 -12
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +55 -12
- package/dist/client/index.js.map +1 -1
- package/dist/codemod/index.cjs +0 -0
- package/dist/codemod/index.js +0 -0
- package/dist/react/index.cjs +57 -14
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +57 -14
- package/dist/react/index.js.map +1 -1
- package/dist/server/index.cjs +8 -2
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +7 -2
- package/dist/server/index.js.map +1 -1
- package/dist/studio/assets/{index-D7ifnqy5.js → index-D6D5nPQI.js} +1 -1
- package/dist/studio/assets/{index-Zh0KtFUH.css → index-z0sbyt6N.css} +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/{wrap-CsOtHp8r.d.cts → wrap-2qVxLN9Q.d.cts} +10 -18
- package/dist/{wrap-CsOtHp8r.d.ts → wrap-2qVxLN9Q.d.ts} +10 -18
- package/package.json +1 -1
package/dist/server/index.d.cts
CHANGED
|
@@ -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-
|
|
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;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -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-
|
|
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;
|
package/dist/server/index.js
CHANGED
|
@@ -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 = "\
|
|
2076
|
+
var DELIM = "\u200C";
|
|
2077
2077
|
var BIT_0 = "\u200B";
|
|
2078
|
-
var BIT_1 = "\
|
|
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,
|