@chaoswise/ui 3.1.21 → 3.1.22

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.
@@ -12,10 +12,13 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
12
12
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
13
13
  import { useCallback, useState } from 'react';
14
14
 
15
- // 复用 @chaoswise/intl 内嵌的 react-intl-universal 实例(其依赖 intl-messageformat v7,
16
- // 兼容 zh_CN 下划线 locale),避免直接 require 外部 riu 2.14 拉入 intl-messageformat v11
17
- // 导致 zh_CN 被判为非法 locale、ICU 变量不替换的问题。
18
- import { intl as IntlInstance } from '@chaoswise/intl';
15
+ // 从 @chaoswise/intl 内嵌的 react-intl-universal 类 new 出 ui 自己的实例:
16
+ // 1) 底层走 intl-messageformat v7,兼容 zh_CN 下划线 locale,避免外部 riu 2.14
17
+ // 拉入 v11 后 zh_CN 被判非法、ICU 变量不替换;
18
+ // 2) ui 组件的词条注册/语言切换由 ConfigProvider 通过 intlContext 自管理,
19
+ // 独立实例不会与宿主 @chaoswise/intl 单例互相覆盖词条。
20
+ import { intl } from '@chaoswise/intl';
21
+ var IntlInstance = new intl.constructor();
19
22
  var createNewObject = function createNewObject() {
20
23
  return {};
21
24
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chaoswise/ui",
3
3
  "packageName": "chaoswiseUI",
4
- "version": "3.1.21",
4
+ "version": "3.1.22",
5
5
  "description": "公共UI库",
6
6
  "keywords": [
7
7
  "ui",