@cloudtower/parrot 0.26.29 → 0.26.30
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/esm/index.js +18 -9
- package/dist/esm/stats1.html +1 -1
- package/dist/umd/index.js +18 -9
- package/dist/umd/stats1.html +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
@@ -273,6 +273,8 @@ const locales = {
|
|
273
273
|
};
|
274
274
|
|
275
275
|
var __defProp = Object.defineProperty;
|
276
|
+
var __defProps = Object.defineProperties;
|
277
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
276
278
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
277
279
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
278
280
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
@@ -288,29 +290,36 @@ var __spreadValues = (a, b) => {
|
|
288
290
|
}
|
289
291
|
return a;
|
290
292
|
};
|
293
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
291
294
|
const defaultOptions = {
|
292
|
-
lng: "zh-CN"
|
293
|
-
fallbackLng: "en-US",
|
295
|
+
lng: "zh-CN" /* zh */,
|
296
|
+
fallbackLng: ["zh-CN" /* zh */, "en-US" /* en */],
|
294
297
|
interpolation: {
|
295
298
|
prefix: "{",
|
296
299
|
suffix: "}"
|
297
300
|
},
|
298
301
|
resources: {
|
299
|
-
"en-US":
|
300
|
-
|
301
|
-
},
|
302
|
-
"zh-CN": {
|
303
|
-
translation: __spreadValues({}, locales["zh-CN"])
|
304
|
-
}
|
302
|
+
["en-US" /* en */]: locales["en-US"],
|
303
|
+
["zh-CN" /* zh */]: locales["zh-CN"]
|
305
304
|
},
|
305
|
+
nsSeparator: ".",
|
306
|
+
ns: Object.keys(locales["zh-CN"]),
|
306
307
|
react: {
|
307
308
|
useSuspense: false
|
308
309
|
}
|
309
310
|
};
|
310
311
|
const parrotI18n = i18next.createInstance(defaultOptions);
|
311
312
|
const initParrotI18n = (options, callback) => {
|
313
|
+
const finalResources = merge(defaultOptions.resources, options == null ? void 0 : options.resources) || {};
|
314
|
+
const finalNameSpaces = Object.keys(finalResources["zh-CN" /* zh */]);
|
312
315
|
if (!parrotI18n.isInitialized) {
|
313
|
-
parrotI18n.init(
|
316
|
+
parrotI18n.init(
|
317
|
+
__spreadProps(__spreadValues({}, merge(defaultOptions, options)), {
|
318
|
+
resources: finalResources,
|
319
|
+
ns: finalNameSpaces
|
320
|
+
}),
|
321
|
+
callback
|
322
|
+
);
|
314
323
|
}
|
315
324
|
};
|
316
325
|
|
package/dist/esm/stats1.html
CHANGED
@@ -6157,7 +6157,7 @@ var drawChart = (function (exports) {
|
|
6157
6157
|
</script>
|
6158
6158
|
<script>
|
6159
6159
|
/*<!--*/
|
6160
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"locales","children":[{"name":"en-US","children":[{"uid":"
|
6160
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"locales","children":[{"name":"en-US","children":[{"uid":"46b0-25","name":"common.json"},{"uid":"46b0-27","name":"components.json"},{"uid":"46b0-29","name":"metric.json"},{"uid":"46b0-31","name":"index.ts"}]},{"name":"zh-CN","children":[{"uid":"46b0-33","name":"common.json"},{"uid":"46b0-35","name":"components.json"},{"uid":"46b0-37","name":"metric.json"},{"uid":"46b0-39","name":"index.ts"}]},{"uid":"46b0-41","name":"index.ts"}]},{"uid":"46b0-43","name":"parrotI18n.ts"},{"uid":"46b0-45","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"46b0-25":{"renderedLength":1829,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-24"},"46b0-27":{"renderedLength":1426,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-26"},"46b0-29":{"renderedLength":165,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-28"},"46b0-31":{"renderedLength":88,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-30"},"46b0-33":{"renderedLength":1694,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-32"},"46b0-35":{"renderedLength":1587,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-34"},"46b0-37":{"renderedLength":157,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-36"},"46b0-39":{"renderedLength":52,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-38"},"46b0-41":{"renderedLength":59,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-40"},"46b0-43":{"renderedLength":1735,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-42"},"46b0-45":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-44"}},"nodeMetas":{"46b0-24":{"id":"/src/locales/en-US/common.json","moduleParts":{"index.js":"46b0-25"},"imported":[],"importedBy":[{"uid":"46b0-30"}]},"46b0-26":{"id":"/src/locales/en-US/components.json","moduleParts":{"index.js":"46b0-27"},"imported":[],"importedBy":[{"uid":"46b0-30"}]},"46b0-28":{"id":"/src/locales/en-US/metric.json","moduleParts":{"index.js":"46b0-29"},"imported":[],"importedBy":[{"uid":"46b0-30"}]},"46b0-30":{"id":"/src/locales/en-US/index.ts","moduleParts":{"index.js":"46b0-31"},"imported":[{"uid":"46b0-24"},{"uid":"46b0-26"},{"uid":"46b0-28"}],"importedBy":[{"uid":"46b0-40"}]},"46b0-32":{"id":"/src/locales/zh-CN/common.json","moduleParts":{"index.js":"46b0-33"},"imported":[],"importedBy":[{"uid":"46b0-38"}]},"46b0-34":{"id":"/src/locales/zh-CN/components.json","moduleParts":{"index.js":"46b0-35"},"imported":[],"importedBy":[{"uid":"46b0-38"}]},"46b0-36":{"id":"/src/locales/zh-CN/metric.json","moduleParts":{"index.js":"46b0-37"},"imported":[],"importedBy":[{"uid":"46b0-38"}]},"46b0-38":{"id":"/src/locales/zh-CN/index.ts","moduleParts":{"index.js":"46b0-39"},"imported":[{"uid":"46b0-32"},{"uid":"46b0-34"},{"uid":"46b0-36"}],"importedBy":[{"uid":"46b0-40"}]},"46b0-40":{"id":"/src/locales/index.ts","moduleParts":{"index.js":"46b0-41"},"imported":[{"uid":"46b0-30"},{"uid":"46b0-38"}],"importedBy":[{"uid":"46b0-44"},{"uid":"46b0-42"}]},"46b0-42":{"id":"/src/parrotI18n.ts","moduleParts":{"index.js":"46b0-43"},"imported":[{"uid":"46b0-46"},{"uid":"46b0-47"},{"uid":"46b0-40"}],"importedBy":[{"uid":"46b0-44"}]},"46b0-44":{"id":"/src/index.ts","moduleParts":{"index.js":"46b0-45"},"imported":[{"uid":"46b0-40"},{"uid":"46b0-42"}],"importedBy":[],"isEntry":true},"46b0-46":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"46b0-42"}],"isExternal":true},"46b0-47":{"id":"lodash.merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"46b0-42"}],"isExternal":true}},"env":{"rollup":"3.15.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
6161
6161
|
|
6162
6162
|
const run = () => {
|
6163
6163
|
const width = window.innerWidth;
|
package/dist/umd/index.js
CHANGED
@@ -276,6 +276,8 @@
|
|
276
276
|
};
|
277
277
|
|
278
278
|
var __defProp = Object.defineProperty;
|
279
|
+
var __defProps = Object.defineProperties;
|
280
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
279
281
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
280
282
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
281
283
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
@@ -291,29 +293,36 @@
|
|
291
293
|
}
|
292
294
|
return a;
|
293
295
|
};
|
296
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
294
297
|
const defaultOptions = {
|
295
|
-
lng: "zh-CN"
|
296
|
-
fallbackLng: "en-US",
|
298
|
+
lng: "zh-CN" /* zh */,
|
299
|
+
fallbackLng: ["zh-CN" /* zh */, "en-US" /* en */],
|
297
300
|
interpolation: {
|
298
301
|
prefix: "{",
|
299
302
|
suffix: "}"
|
300
303
|
},
|
301
304
|
resources: {
|
302
|
-
"en-US":
|
303
|
-
|
304
|
-
},
|
305
|
-
"zh-CN": {
|
306
|
-
translation: __spreadValues({}, locales["zh-CN"])
|
307
|
-
}
|
305
|
+
["en-US" /* en */]: locales["en-US"],
|
306
|
+
["zh-CN" /* zh */]: locales["zh-CN"]
|
308
307
|
},
|
308
|
+
nsSeparator: ".",
|
309
|
+
ns: Object.keys(locales["zh-CN"]),
|
309
310
|
react: {
|
310
311
|
useSuspense: false
|
311
312
|
}
|
312
313
|
};
|
313
314
|
const parrotI18n = i18next.createInstance(defaultOptions);
|
314
315
|
const initParrotI18n = (options, callback) => {
|
316
|
+
const finalResources = merge(defaultOptions.resources, options == null ? void 0 : options.resources) || {};
|
317
|
+
const finalNameSpaces = Object.keys(finalResources["zh-CN" /* zh */]);
|
315
318
|
if (!parrotI18n.isInitialized) {
|
316
|
-
parrotI18n.init(
|
319
|
+
parrotI18n.init(
|
320
|
+
__spreadProps(__spreadValues({}, merge(defaultOptions, options)), {
|
321
|
+
resources: finalResources,
|
322
|
+
ns: finalNameSpaces
|
323
|
+
}),
|
324
|
+
callback
|
325
|
+
);
|
317
326
|
}
|
318
327
|
};
|
319
328
|
|
package/dist/umd/stats1.html
CHANGED
@@ -6157,7 +6157,7 @@ var drawChart = (function (exports) {
|
|
6157
6157
|
</script>
|
6158
6158
|
<script>
|
6159
6159
|
/*<!--*/
|
6160
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"locales","children":[{"name":"en-US","children":[{"uid":"
|
6160
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"name":"locales","children":[{"name":"en-US","children":[{"uid":"46b0-1","name":"common.json"},{"uid":"46b0-3","name":"components.json"},{"uid":"46b0-5","name":"metric.json"},{"uid":"46b0-7","name":"index.ts"}]},{"name":"zh-CN","children":[{"uid":"46b0-9","name":"common.json"},{"uid":"46b0-11","name":"components.json"},{"uid":"46b0-13","name":"metric.json"},{"uid":"46b0-15","name":"index.ts"}]},{"uid":"46b0-17","name":"index.ts"}]},{"uid":"46b0-19","name":"parrotI18n.ts"},{"uid":"46b0-21","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"46b0-1":{"renderedLength":1973,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-0"},"46b0-3":{"renderedLength":1504,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-2"},"46b0-5":{"renderedLength":181,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-4"},"46b0-7":{"renderedLength":98,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-6"},"46b0-9":{"renderedLength":1838,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-8"},"46b0-11":{"renderedLength":1685,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-10"},"46b0-13":{"renderedLength":173,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-12"},"46b0-15":{"renderedLength":62,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-14"},"46b0-17":{"renderedLength":67,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-16"},"46b0-19":{"renderedLength":1835,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-18"},"46b0-21":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"46b0-20"}},"nodeMetas":{"46b0-0":{"id":"/src/locales/en-US/common.json","moduleParts":{"index.js":"46b0-1"},"imported":[],"importedBy":[{"uid":"46b0-6"}]},"46b0-2":{"id":"/src/locales/en-US/components.json","moduleParts":{"index.js":"46b0-3"},"imported":[],"importedBy":[{"uid":"46b0-6"}]},"46b0-4":{"id":"/src/locales/en-US/metric.json","moduleParts":{"index.js":"46b0-5"},"imported":[],"importedBy":[{"uid":"46b0-6"}]},"46b0-6":{"id":"/src/locales/en-US/index.ts","moduleParts":{"index.js":"46b0-7"},"imported":[{"uid":"46b0-0"},{"uid":"46b0-2"},{"uid":"46b0-4"}],"importedBy":[{"uid":"46b0-16"}]},"46b0-8":{"id":"/src/locales/zh-CN/common.json","moduleParts":{"index.js":"46b0-9"},"imported":[],"importedBy":[{"uid":"46b0-14"}]},"46b0-10":{"id":"/src/locales/zh-CN/components.json","moduleParts":{"index.js":"46b0-11"},"imported":[],"importedBy":[{"uid":"46b0-14"}]},"46b0-12":{"id":"/src/locales/zh-CN/metric.json","moduleParts":{"index.js":"46b0-13"},"imported":[],"importedBy":[{"uid":"46b0-14"}]},"46b0-14":{"id":"/src/locales/zh-CN/index.ts","moduleParts":{"index.js":"46b0-15"},"imported":[{"uid":"46b0-8"},{"uid":"46b0-10"},{"uid":"46b0-12"}],"importedBy":[{"uid":"46b0-16"}]},"46b0-16":{"id":"/src/locales/index.ts","moduleParts":{"index.js":"46b0-17"},"imported":[{"uid":"46b0-6"},{"uid":"46b0-14"}],"importedBy":[{"uid":"46b0-20"},{"uid":"46b0-18"}]},"46b0-18":{"id":"/src/parrotI18n.ts","moduleParts":{"index.js":"46b0-19"},"imported":[{"uid":"46b0-22"},{"uid":"46b0-23"},{"uid":"46b0-16"}],"importedBy":[{"uid":"46b0-20"}]},"46b0-20":{"id":"/src/index.ts","moduleParts":{"index.js":"46b0-21"},"imported":[{"uid":"46b0-16"},{"uid":"46b0-18"}],"importedBy":[],"isEntry":true},"46b0-22":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"46b0-18"}],"isExternal":true},"46b0-23":{"id":"lodash.merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"46b0-18"}],"isExternal":true}},"env":{"rollup":"3.15.0"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
6161
6161
|
|
6162
6162
|
const run = () => {
|
6163
6163
|
const width = window.innerWidth;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cloudtower/parrot",
|
3
|
-
"version": "0.26.
|
3
|
+
"version": "0.26.30",
|
4
4
|
"description": "i18n modules for cloudtower sparrow and eagle",
|
5
5
|
"keywords": [
|
6
6
|
"i18n",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"lint": "eslint src --ext .ts --quiet"
|
28
28
|
},
|
29
29
|
"dependencies": {
|
30
|
-
"i18next": "^
|
30
|
+
"i18next": "^23.2.3",
|
31
31
|
"lodash.merge": "^4.6.2"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -40,5 +40,5 @@
|
|
40
40
|
"rollup-plugin-visualizer": "5.9.0",
|
41
41
|
"typescript": "5.0.2"
|
42
42
|
},
|
43
|
-
"gitHead": "
|
43
|
+
"gitHead": "d0a1ff8c7502471899afe2e3e0c1938d8db03588"
|
44
44
|
}
|