locize 4.0.5 → 4.0.7
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/CHANGELOG.md +4 -0
- package/LICENSE +1 -1
- package/README.md +4 -4
- package/dist/cjs/api/handleSendMatchedUninstrumented.js +2 -2
- package/dist/cjs/ui/highlightNode.js +1 -1
- package/dist/esm/api/handleSendMatchedUninstrumented.js +2 -2
- package/dist/esm/ui/highlightNode.js +1 -1
- package/dist/umd/locize.js +724 -75
- package/dist/umd/locize.min.js +1 -1
- package/locize.js +724 -75
- package/locize.min.js +1 -1
- package/package.json +3 -2
- package/src/api/handleSendMatchedUninstrumented.js +2 -2
- package/src/ui/highlightNode.js +1 -1
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -102,8 +102,8 @@ Having [i18next-locize-backend](https://github.com/locize/i18next-locize-backend
|
|
|
102
102
|
i18next.init({
|
|
103
103
|
// ...
|
|
104
104
|
editor: {
|
|
105
|
-
projectId
|
|
106
|
-
version
|
|
105
|
+
projectId: "5e9ed7da-51ab-4b15-888b-27903f06be09"
|
|
106
|
+
version: "latest"
|
|
107
107
|
}
|
|
108
108
|
})
|
|
109
109
|
```
|
|
@@ -137,8 +137,8 @@ setEditorLng(lng)
|
|
|
137
137
|
|
|
138
138
|
```js
|
|
139
139
|
startStandalone({
|
|
140
|
-
projectId
|
|
141
|
-
version
|
|
140
|
+
projectId: "5e9ed7da-51ab-4b15-888b-27903f06be09",
|
|
141
|
+
version: "latest"
|
|
142
142
|
})
|
|
143
143
|
```
|
|
144
144
|
|
|
@@ -18,8 +18,8 @@ function handler(payload) {
|
|
|
18
18
|
ns: item.ns,
|
|
19
19
|
key: item.key
|
|
20
20
|
}), item.value), uni === null || uni === void 0 ? void 0 : uni.node);
|
|
21
|
-
delete uni.keys["".concat(item.textType)];
|
|
22
|
-
if (!Object.keys(uni.keys).length) uninstrumentedStore.uninstrumentedStore.remove(item.eleUniqueID, uni.node);
|
|
21
|
+
if (uni && uni.keys) delete uni.keys["".concat(item.textType)];
|
|
22
|
+
if (uni && uni.keys && !Object.keys(uni.keys).length) uninstrumentedStore.uninstrumentedStore.remove(item.eleUniqueID, uni.node);
|
|
23
23
|
});
|
|
24
24
|
postMessage.api.sendCurrentParsedContent();
|
|
25
25
|
}
|
|
@@ -34,7 +34,7 @@ function highlight(item, node, keys) {
|
|
|
34
34
|
}), dom.shift(), dom.offset(function (_ref) {
|
|
35
35
|
var placement = _ref.placement,
|
|
36
36
|
rects = _ref.rects;
|
|
37
|
-
if (placement === 'bottom') return rects.
|
|
37
|
+
if (placement === 'bottom') return -rects.reference.height / 2 - rects.floating.height / 2;
|
|
38
38
|
return 35;
|
|
39
39
|
}), dom.arrow({
|
|
40
40
|
element: arrowEle
|
|
@@ -12,8 +12,8 @@ function handler(payload) {
|
|
|
12
12
|
ns: item.ns,
|
|
13
13
|
key: item.key
|
|
14
14
|
}), item.value), uni === null || uni === void 0 ? void 0 : uni.node);
|
|
15
|
-
delete uni.keys["".concat(item.textType)];
|
|
16
|
-
if (!Object.keys(uni.keys).length) uninstrumentedStore.remove(item.eleUniqueID, uni.node);
|
|
15
|
+
if (uni && uni.keys) delete uni.keys["".concat(item.textType)];
|
|
16
|
+
if (uni && uni.keys && !Object.keys(uni.keys).length) uninstrumentedStore.remove(item.eleUniqueID, uni.node);
|
|
17
17
|
});
|
|
18
18
|
api.sendCurrentParsedContent();
|
|
19
19
|
}
|
|
@@ -26,7 +26,7 @@ function highlight(item, node, keys) {
|
|
|
26
26
|
}), shift(), offset(function (_ref) {
|
|
27
27
|
var placement = _ref.placement,
|
|
28
28
|
rects = _ref.rects;
|
|
29
|
-
if (placement === 'bottom') return rects.
|
|
29
|
+
if (placement === 'bottom') return -rects.reference.height / 2 - rects.floating.height / 2;
|
|
30
30
|
return 35;
|
|
31
31
|
}), arrow({
|
|
32
32
|
element: arrowEle
|