@fibrae/semi-polyfill 0.3.0 → 0.3.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/LICENSE CHANGED
@@ -20,65 +20,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
20
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
21
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  SOFTWARE.
23
-
24
- The code implementation of the external library is referenced by DouyinFe are:
25
-
26
- - animate.css
27
-
28
- The MIT License (MIT)
29
-
30
- Copyright (c) 2020 Daniel Eden
31
-
32
- Permission is hereby granted, free of charge, to any person obtaining a copy
33
- of this software and associated documentation files (the "Software"), to deal
34
- in the Software without restriction, including without limitation the rights
35
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
- copies of the Software, and to permit persons to whom the Software is
37
- furnished to do so, subject to the following conditions:
38
-
39
- The above copyright notice and this permission notice shall be included in all
40
- copies or substantial portions of the Software.
41
-
42
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
- SOFTWARE.
49
-
50
- - Ant Design
51
- MIT LICENSE
52
-
53
- Copyright (c) 2015-present Ant UED, https://xtech.antfin.com/
54
-
55
- Permission is hereby granted, free of charge, to any person obtaining
56
- a copy of this software and associated documentation files (the
57
- "Software"), to deal in the Software without restriction, including
58
- without limitation the rights to use, copy, modify, merge, publish,
59
- distribute, sublicense, and/or sell copies of the Software, and to
60
- permit persons to whom the Software is furnished to do so, subject to
61
- the following conditions:
62
-
63
- The above copyright notice and this permission notice shall be
64
- included in all copies or substantial portions of the Software.
65
-
66
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
67
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
68
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
69
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
70
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
71
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
72
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
73
-
74
- - rc-tree
75
-
76
- MIT LICENSE
77
-
78
- Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
79
-
80
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
81
-
82
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
83
-
84
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,29 +1,31 @@
1
1
  # @fibrae/semi-polyfill
2
2
 
3
- Semi Design Next 的可选 polyfill。组件代码直接使用原生 API,目标浏览器中个别版本缺少的 API 由本包补齐。
3
+ [简体中文](README.zh-CN.md)
4
4
 
5
- ## 目标浏览器
5
+ Optional polyfills for Semi Design Next. Component code uses native APIs directly, and this package fills in the APIs missing from some versions of the target browsers.
6
6
 
7
- Chrome 120、Firefox 125、Safari 17.2 及以上。Chrome 与 Firefox 已原生支持本包的全部内容,只有 Safari 17.2 与 17.3 需要它;只面向其余浏览器时不必安装。
7
+ ## Target browsers
8
8
 
9
- ## 安装与使用
9
+ Chrome 120, Firefox 125, Safari 17.2 and later. Chrome and Firefox support everything in this package natively, so only Safari 17.2 and 17.3 need it. If you target only the other browsers, you do not need to install it.
10
+
11
+ ## Installation and usage
10
12
 
11
13
  ```sh
12
14
  pnpm add @fibrae/semi-polyfill
13
15
  ```
14
16
 
15
- 在应用入口最先导入,保证组件代码运行前 API 已就绪:
17
+ Import it first in the application entry so the APIs are ready before component code runs:
16
18
 
17
19
  ```js
18
20
  import '@fibrae/semi-polyfill';
19
21
  ```
20
22
 
21
- 只需要其中一项时导入单项入口。每个 shim 只在原生缺失时安装;服务端渲染时没有对应全局,什么都不做。
23
+ If you need only one shim, import its own entry. Each shim installs only when the native API is missing, and does nothing during server rendering, where the matching global does not exist.
22
24
 
23
- ## 入口
25
+ ## Entry points
24
26
 
25
- | 入口 | 补齐的 API | 原生支持 | 说明 |
27
+ | Entry | API | Native support | Notes |
26
28
  | --- | --- | --- | --- |
27
- | `@fibrae/semi-polyfill` | 下面全部 | | 引入所有 shim |
28
- | `@fibrae/semi-polyfill/abort-signal-any` | `AbortSignal.any` | Safari 17.4 | 任一源 signal abort 时结果 abort,reason 取先 abort 的源;源已 abort 时立即 abort |
29
- | `@fibrae/semi-polyfill/check-visibility` | `Element.prototype.checkVisibility` | Safari 17.4 | 支持 `checkOpacity`、`checkVisibilityCSS` 与旧名 `opacityProperty`、`visibilityProperty`;渲染以 `getClientRects().length > 0` 判断,祖先 `content-visibility: hidden` 视为不可见。不支持 `contentVisibilityAuto`,该选项被忽略 |
29
+ | `@fibrae/semi-polyfill` | All of the below | | Imports every shim |
30
+ | `@fibrae/semi-polyfill/abort-signal-any` | `AbortSignal.any` | Safari 17.4 | The result aborts when any source signal aborts, with the reason of the first one to abort. It aborts immediately if a source has already aborted |
31
+ | `@fibrae/semi-polyfill/check-visibility` | `Element.prototype.checkVisibility` | Safari 17.4 | Supports `checkOpacity`, `checkVisibilityCSS` and the old names `opacityProperty` and `visibilityProperty`. Rendering is judged by `getClientRects().length > 0`, and an ancestor with `content-visibility: hidden` counts as invisible. `contentVisibilityAuto` is not supported and is ignored |
@@ -0,0 +1,31 @@
1
+ # @fibrae/semi-polyfill
2
+
3
+ [English](README.md)
4
+
5
+ Semi Design Next 的可选 polyfill。组件代码直接使用原生 API,目标浏览器中个别版本缺少的 API 由本包补齐。
6
+
7
+ ## 目标浏览器
8
+
9
+ Chrome 120、Firefox 125、Safari 17.2 及以上。Chrome 与 Firefox 已原生支持本包的全部内容,只有 Safari 17.2 与 17.3 需要它;只面向其余浏览器时不必安装。
10
+
11
+ ## 安装与使用
12
+
13
+ ```sh
14
+ pnpm add @fibrae/semi-polyfill
15
+ ```
16
+
17
+ 在应用入口最先导入,保证组件代码运行前 API 已就绪:
18
+
19
+ ```js
20
+ import '@fibrae/semi-polyfill';
21
+ ```
22
+
23
+ 只需要其中一项时导入单项入口。每个 shim 只在原生缺失时安装;服务端渲染时没有对应全局,什么都不做。
24
+
25
+ ## 入口
26
+
27
+ | 入口 | 补齐的 API | 原生支持 | 说明 |
28
+ | --- | --- | --- | --- |
29
+ | `@fibrae/semi-polyfill` | 下面全部 | | 引入所有 shim |
30
+ | `@fibrae/semi-polyfill/abort-signal-any` | `AbortSignal.any` | Safari 17.4 | 任一源 signal abort 时结果 abort,reason 取先 abort 的源;源已 abort 时立即 abort |
31
+ | `@fibrae/semi-polyfill/check-visibility` | `Element.prototype.checkVisibility` | Safari 17.4 | 支持 `checkOpacity`、`checkVisibilityCSS` 与旧名 `opacityProperty`、`visibilityProperty`;渲染以 `getClientRects().length > 0` 判断,祖先 `content-visibility: hidden` 视为不可见。不支持 `contentVisibilityAuto`,该选项被忽略 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibrae/semi-polyfill",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Optional polyfills for the APIs Semi uses that Safari 17.2 lacks",
5
5
  "license": "MIT",
6
6
  "homepage": "https://semi-design-next.pages.dev",