@antsoo-lib/components 0.1.11 → 0.1.13

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.
Files changed (1434) hide show
  1. package/dist/es/modal/index.d.ts +1 -0
  2. package/package.json +3 -4
  3. package/src/_util/ActionButton.tsx +0 -124
  4. package/src/_util/BaseInput.tsx +0 -169
  5. package/src/_util/BaseInputInner.tsx +0 -97
  6. package/src/_util/BaseMixin.ts +0 -46
  7. package/src/_util/EventInterface.ts +0 -19
  8. package/src/_util/KeyCode.ts +0 -522
  9. package/src/_util/Portal.tsx +0 -73
  10. package/src/_util/PortalWrapper.tsx +0 -191
  11. package/src/_util/__mocks__/Portal.tsx +0 -13
  12. package/src/_util/__mocks__/RenderSlot.tsx +0 -12
  13. package/src/_util/canUseDom.ts +0 -5
  14. package/src/_util/classNames.ts +0 -28
  15. package/src/_util/collapseMotion.tsx +0 -51
  16. package/src/_util/colors.ts +0 -34
  17. package/src/_util/component-classes.ts +0 -167
  18. package/src/_util/copy-to-clipboard/index.ts +0 -120
  19. package/src/_util/copy-to-clipboard/toggle-selection.ts +0 -41
  20. package/src/_util/createContext.ts +0 -22
  21. package/src/_util/createRef.ts +0 -31
  22. package/src/_util/cssinjs/Cache.ts +0 -28
  23. package/src/_util/cssinjs/Keyframes.ts +0 -19
  24. package/src/_util/cssinjs/StyleContext.tsx +0 -187
  25. package/src/_util/cssinjs/hooks/useCacheToken.tsx +0 -167
  26. package/src/_util/cssinjs/hooks/useGlobalCache.tsx +0 -60
  27. package/src/_util/cssinjs/hooks/useHMR.ts +0 -34
  28. package/src/_util/cssinjs/hooks/useStyleRegister/cacheMapUtil.ts +0 -91
  29. package/src/_util/cssinjs/hooks/useStyleRegister/index.tsx +0 -567
  30. package/src/_util/cssinjs/index.ts +0 -75
  31. package/src/_util/cssinjs/linters/contentQuotesLinter.ts +0 -25
  32. package/src/_util/cssinjs/linters/hashedAnimationLinter.ts +0 -15
  33. package/src/_util/cssinjs/linters/index.ts +0 -6
  34. package/src/_util/cssinjs/linters/interface.ts +0 -9
  35. package/src/_util/cssinjs/linters/legacyNotSelectorLinter.ts +0 -33
  36. package/src/_util/cssinjs/linters/logicalPropertiesLinter.ts +0 -88
  37. package/src/_util/cssinjs/linters/parentSelectorLinter.ts +0 -15
  38. package/src/_util/cssinjs/linters/utils.ts +0 -13
  39. package/src/_util/cssinjs/theme/Theme.ts +0 -38
  40. package/src/_util/cssinjs/theme/ThemeCache.ts +0 -135
  41. package/src/_util/cssinjs/theme/createTheme.ts +0 -26
  42. package/src/_util/cssinjs/theme/index.ts +0 -4
  43. package/src/_util/cssinjs/theme/interface.ts +0 -5
  44. package/src/_util/cssinjs/transformers/interface.ts +0 -5
  45. package/src/_util/cssinjs/transformers/legacyLogicalProperties.ts +0 -162
  46. package/src/_util/cssinjs/transformers/px2rem.ts +0 -77
  47. package/src/_util/cssinjs/util.ts +0 -118
  48. package/src/_util/debouncedWatch.ts +0 -87
  49. package/src/_util/eagerComputed.ts +0 -17
  50. package/src/_util/easings.ts +0 -8
  51. package/src/_util/env.ts +0 -9
  52. package/src/_util/extendsObject.ts +0 -21
  53. package/src/_util/firstNotUndefined.ts +0 -10
  54. package/src/_util/gapSize.ts +0 -13
  55. package/src/_util/getRequestAnimationFrame.ts +0 -47
  56. package/src/_util/getScroll.ts +0 -33
  57. package/src/_util/getScrollBarSize.ts +0 -60
  58. package/src/_util/hooks/_vueuse/_configurable.ts +0 -34
  59. package/src/_util/hooks/_vueuse/is.ts +0 -26
  60. package/src/_util/hooks/_vueuse/resolveUnref.ts +0 -10
  61. package/src/_util/hooks/_vueuse/tryOnMounted.ts +0 -15
  62. package/src/_util/hooks/_vueuse/tryOnScopeDispose.ts +0 -16
  63. package/src/_util/hooks/_vueuse/types.ts +0 -143
  64. package/src/_util/hooks/_vueuse/unrefElement.ts +0 -25
  65. package/src/_util/hooks/_vueuse/useElementSize.ts +0 -66
  66. package/src/_util/hooks/_vueuse/useMutationObserver.ts +0 -63
  67. package/src/_util/hooks/_vueuse/useResizeObserver.ts +0 -95
  68. package/src/_util/hooks/_vueuse/useSupported.ts +0 -14
  69. package/src/_util/hooks/useBreakpoint.ts +0 -25
  70. package/src/_util/hooks/useDestroyed.ts +0 -12
  71. package/src/_util/hooks/useFlexGapSupport.ts +0 -12
  72. package/src/_util/hooks/useId.ts +0 -31
  73. package/src/_util/hooks/useLayoutState.ts +0 -42
  74. package/src/_util/hooks/useMemo.ts +0 -21
  75. package/src/_util/hooks/useMergedState.ts +0 -47
  76. package/src/_util/hooks/useRefs.ts +0 -21
  77. package/src/_util/hooks/useScrollLocker.ts +0 -53
  78. package/src/_util/hooks/useState.ts +0 -17
  79. package/src/_util/isNumeric.ts +0 -5
  80. package/src/_util/isValid.ts +0 -4
  81. package/src/_util/isValidValue.ts +0 -3
  82. package/src/_util/json2mq.ts +0 -60
  83. package/src/_util/omit.ts +0 -9
  84. package/src/_util/pickAttrs.ts +0 -74
  85. package/src/_util/placements.ts +0 -111
  86. package/src/_util/props-util/index.ts +0 -287
  87. package/src/_util/props-util/initDefaultProps.ts +0 -34
  88. package/src/_util/raf.ts +0 -47
  89. package/src/_util/reactivePick.ts +0 -16
  90. package/src/_util/requestAnimationTimeout.ts +0 -24
  91. package/src/_util/responsiveObserve.ts +0 -86
  92. package/src/_util/scrollTo.ts +0 -38
  93. package/src/_util/setStyle.ts +0 -30
  94. package/src/_util/shallowequal.ts +0 -50
  95. package/src/_util/static-style-extract/index.tsx +0 -92
  96. package/src/_util/static-style-extract/interface.ts +0 -3
  97. package/src/_util/statusUtils.tsx +0 -23
  98. package/src/_util/styleChecker.ts +0 -62
  99. package/src/_util/supportsPassive.js +0 -13
  100. package/src/_util/throttleByAnimationFrame.ts +0 -31
  101. package/src/_util/toReactive.ts +0 -43
  102. package/src/_util/transButton.tsx +0 -103
  103. package/src/_util/transKeys.ts +0 -17
  104. package/src/_util/transition.tsx +0 -130
  105. package/src/_util/type.ts +0 -95
  106. package/src/_util/unreachableException.ts +0 -7
  107. package/src/_util/util.ts +0 -102
  108. package/src/_util/vnode.ts +0 -84
  109. package/src/_util/vue-types/index.ts +0 -45
  110. package/src/_util/warning.ts +0 -21
  111. package/src/_util/wave/WaveEffect.tsx +0 -172
  112. package/src/_util/wave/index.tsx +0 -96
  113. package/src/_util/wave/style.ts +0 -38
  114. package/src/_util/wave/useWave.ts +0 -26
  115. package/src/_util/wave/util.ts +0 -34
  116. package/src/affix/index.en-US.md +0 -47
  117. package/src/affix/index.tsx +0 -287
  118. package/src/affix/index.zh-CN.md +0 -50
  119. package/src/affix/style/index.ts +0 -27
  120. package/src/affix/utils.ts +0 -107
  121. package/src/alert/index.en-US.md +0 -36
  122. package/src/alert/index.tsx +0 -207
  123. package/src/alert/index.zh-CN.md +0 -37
  124. package/src/alert/style/index.ts +0 -240
  125. package/src/anchor/Anchor.tsx +0 -331
  126. package/src/anchor/AnchorLink.tsx +0 -108
  127. package/src/anchor/context.ts +0 -36
  128. package/src/anchor/index.en-US.md +0 -59
  129. package/src/anchor/index.tsx +0 -23
  130. package/src/anchor/index.zh-CN.md +0 -60
  131. package/src/anchor/style/index.ts +0 -173
  132. package/src/app/context.ts +0 -45
  133. package/src/app/index.en-US.md +0 -131
  134. package/src/app/index.tsx +0 -84
  135. package/src/app/index.zh-CN.md +0 -132
  136. package/src/app/style/index.ts +0 -22
  137. package/src/auto-complete/OptGroup.tsx +0 -15
  138. package/src/auto-complete/Option.tsx +0 -18
  139. package/src/auto-complete/index.en-US.md +0 -95
  140. package/src/auto-complete/index.tsx +0 -174
  141. package/src/auto-complete/index.zh-CN.md +0 -96
  142. package/src/avatar/Avatar.tsx +0 -222
  143. package/src/avatar/AvatarContext.ts +0 -18
  144. package/src/avatar/Group.tsx +0 -100
  145. package/src/avatar/index.en-US.md +0 -37
  146. package/src/avatar/index.ts +0 -22
  147. package/src/avatar/index.zh-CN.md +0 -42
  148. package/src/avatar/style/index.ts +0 -211
  149. package/src/badge/Badge.tsx +0 -242
  150. package/src/badge/Ribbon.tsx +0 -63
  151. package/src/badge/ScrollNumber.tsx +0 -87
  152. package/src/badge/SingleNumber.tsx +0 -134
  153. package/src/badge/index.en_US.md +0 -48
  154. package/src/badge/index.ts +0 -19
  155. package/src/badge/index.zh-CN.md +0 -49
  156. package/src/badge/style/index.ts +0 -378
  157. package/src/breadcrumb/Breadcrumb.tsx +0 -172
  158. package/src/breadcrumb/BreadcrumbItem.tsx +0 -91
  159. package/src/breadcrumb/BreadcrumbSeparator.tsx +0 -33
  160. package/src/breadcrumb/index.en-US.md +0 -120
  161. package/src/breadcrumb/index.ts +0 -27
  162. package/src/breadcrumb/index.zh-CN.md +0 -121
  163. package/src/breadcrumb/style/index.ts +0 -127
  164. package/src/button/LoadingIcon.tsx +0 -70
  165. package/src/button/button-group.tsx +0 -61
  166. package/src/button/button.tsx +0 -246
  167. package/src/button/buttonTypes.ts +0 -47
  168. package/src/button/index.en-US.md +0 -72
  169. package/src/button/index.ts +0 -25
  170. package/src/button/index.zh-CN.md +0 -75
  171. package/src/button/style/group.ts +0 -80
  172. package/src/button/style/index.ts +0 -557
  173. package/src/calendar/Header.tsx +0 -206
  174. package/src/calendar/date-fns.tsx +0 -9
  175. package/src/calendar/dayjs.tsx +0 -9
  176. package/src/calendar/generateCalendar.tsx +0 -371
  177. package/src/calendar/index.en-US.md +0 -68
  178. package/src/calendar/index.tsx +0 -5
  179. package/src/calendar/index.zh-CN.md +0 -67
  180. package/src/calendar/locale/ar_EG.ts +0 -3
  181. package/src/calendar/locale/az_AZ.ts +0 -3
  182. package/src/calendar/locale/bg_BG.ts +0 -3
  183. package/src/calendar/locale/bn_BD.ts +0 -3
  184. package/src/calendar/locale/by_BY.ts +0 -3
  185. package/src/calendar/locale/ca_ES.ts +0 -3
  186. package/src/calendar/locale/cs_CZ.ts +0 -3
  187. package/src/calendar/locale/da_DK.ts +0 -3
  188. package/src/calendar/locale/de_DE.ts +0 -3
  189. package/src/calendar/locale/el_GR.ts +0 -3
  190. package/src/calendar/locale/en_GB.ts +0 -3
  191. package/src/calendar/locale/en_US.ts +0 -3
  192. package/src/calendar/locale/es_ES.ts +0 -3
  193. package/src/calendar/locale/et_EE.ts +0 -3
  194. package/src/calendar/locale/fa_IR.ts +0 -3
  195. package/src/calendar/locale/fi_FI.ts +0 -3
  196. package/src/calendar/locale/fr_BE.ts +0 -3
  197. package/src/calendar/locale/fr_CA.ts +0 -3
  198. package/src/calendar/locale/fr_FR.ts +0 -3
  199. package/src/calendar/locale/ga_IE.ts +0 -3
  200. package/src/calendar/locale/gl_ES.ts +0 -3
  201. package/src/calendar/locale/he_IL.ts +0 -3
  202. package/src/calendar/locale/hi_IN.ts +0 -3
  203. package/src/calendar/locale/hr_HR.ts +0 -3
  204. package/src/calendar/locale/hu_HU.ts +0 -3
  205. package/src/calendar/locale/id_ID.ts +0 -3
  206. package/src/calendar/locale/is_IS.ts +0 -3
  207. package/src/calendar/locale/it_IT.ts +0 -3
  208. package/src/calendar/locale/ja_JP.ts +0 -3
  209. package/src/calendar/locale/ka_GE.ts +0 -3
  210. package/src/calendar/locale/kk_KZ.ts +0 -3
  211. package/src/calendar/locale/km_KH.ts +0 -3
  212. package/src/calendar/locale/kmr_IQ.ts +0 -3
  213. package/src/calendar/locale/kn_IN.ts +0 -3
  214. package/src/calendar/locale/ko_KR.ts +0 -3
  215. package/src/calendar/locale/lt_LT.ts +0 -3
  216. package/src/calendar/locale/lv_LV.ts +0 -3
  217. package/src/calendar/locale/mk_MK.ts +0 -3
  218. package/src/calendar/locale/ml_IN.ts +0 -3
  219. package/src/calendar/locale/mn_MN.ts +0 -3
  220. package/src/calendar/locale/ms_MY.ts +0 -3
  221. package/src/calendar/locale/nb_NO.ts +0 -3
  222. package/src/calendar/locale/nl_BE.ts +0 -3
  223. package/src/calendar/locale/nl_NL.ts +0 -3
  224. package/src/calendar/locale/pl_PL.ts +0 -3
  225. package/src/calendar/locale/pt_BR.ts +0 -3
  226. package/src/calendar/locale/pt_PT.ts +0 -3
  227. package/src/calendar/locale/ro_RO.ts +0 -3
  228. package/src/calendar/locale/ru_RU.ts +0 -3
  229. package/src/calendar/locale/sk_SK.ts +0 -3
  230. package/src/calendar/locale/sl_SI.ts +0 -3
  231. package/src/calendar/locale/sr_RS.ts +0 -3
  232. package/src/calendar/locale/sv_SE.ts +0 -3
  233. package/src/calendar/locale/ta_IN.ts +0 -3
  234. package/src/calendar/locale/th_TH.ts +0 -3
  235. package/src/calendar/locale/tr_TR.ts +0 -3
  236. package/src/calendar/locale/uk_UA.ts +0 -3
  237. package/src/calendar/locale/ur_PK.ts +0 -3
  238. package/src/calendar/locale/vi_VN.ts +0 -3
  239. package/src/calendar/locale/zh_CN.ts +0 -3
  240. package/src/calendar/locale/zh_TW.ts +0 -3
  241. package/src/calendar/moment.tsx +0 -11
  242. package/src/calendar/style/index.tsx +0 -218
  243. package/src/card/Card.tsx +0 -197
  244. package/src/card/Grid.tsx +0 -28
  245. package/src/card/Meta.tsx +0 -56
  246. package/src/card/index.en-US.md +0 -59
  247. package/src/card/index.ts +0 -26
  248. package/src/card/index.zh-CN.md +0 -60
  249. package/src/card/style/index.tsx +0 -387
  250. package/src/carousel/index.en-US.md +0 -38
  251. package/src/carousel/index.tsx +0 -161
  252. package/src/carousel/index.zh-CN.md +0 -39
  253. package/src/carousel/style/index.tsx +0 -350
  254. package/src/cascader/index.en-US.md +0 -97
  255. package/src/cascader/index.tsx +0 -357
  256. package/src/cascader/index.zh-CN.md +0 -100
  257. package/src/cascader/style/index.ts +0 -165
  258. package/src/checkbox/Checkbox.tsx +0 -140
  259. package/src/checkbox/Group.tsx +0 -131
  260. package/src/checkbox/index.en-US.md +0 -58
  261. package/src/checkbox/index.ts +0 -21
  262. package/src/checkbox/index.zh-CN.md +0 -59
  263. package/src/checkbox/interface.ts +0 -90
  264. package/src/checkbox/style/index.ts +0 -303
  265. package/src/col/index.ts +0 -5
  266. package/src/col/style/index.ts +0 -4
  267. package/src/collapse/Collapse.tsx +0 -204
  268. package/src/collapse/CollapsePanel.tsx +0 -124
  269. package/src/collapse/PanelContent.tsx +0 -35
  270. package/src/collapse/commonProps.ts +0 -56
  271. package/src/collapse/index.en-US.md +0 -47
  272. package/src/collapse/index.ts +0 -22
  273. package/src/collapse/index.zh-CN.md +0 -47
  274. package/src/collapse/style/index.tsx +0 -271
  275. package/src/comment/index.en-US.md +0 -22
  276. package/src/comment/index.tsx +0 -118
  277. package/src/comment/index.zh-CN.md +0 -23
  278. package/src/comment/style/index.ts +0 -160
  279. package/src/components.ts +0 -263
  280. package/src/config-provider/DisabledContext.ts +0 -17
  281. package/src/config-provider/SizeContext.ts +0 -17
  282. package/src/config-provider/context.ts +0 -178
  283. package/src/config-provider/cssVariables.ts +0 -102
  284. package/src/config-provider/hooks/useConfigInject.ts +0 -74
  285. package/src/config-provider/hooks/useTheme.ts +0 -44
  286. package/src/config-provider/index.en-US.md +0 -115
  287. package/src/config-provider/index.tsx +0 -296
  288. package/src/config-provider/index.zh-CN.md +0 -116
  289. package/src/config-provider/renderEmpty.tsx +0 -35
  290. package/src/config-provider/style/index.ts +0 -31
  291. package/src/date-picker/PickerButton.tsx +0 -9
  292. package/src/date-picker/PickerTag.tsx +0 -6
  293. package/src/date-picker/date-fns.tsx +0 -38
  294. package/src/date-picker/dayjs.tsx +0 -40
  295. package/src/date-picker/generatePicker/generateRangePicker.tsx +0 -256
  296. package/src/date-picker/generatePicker/generateSinglePicker.tsx +0 -290
  297. package/src/date-picker/generatePicker/index.tsx +0 -85
  298. package/src/date-picker/generatePicker/interface.ts +0 -74
  299. package/src/date-picker/generatePicker/props.ts +0 -301
  300. package/src/date-picker/index.en-US.md +0 -232
  301. package/src/date-picker/index.tsx +0 -5
  302. package/src/date-picker/index.zh-CN.md +0 -231
  303. package/src/date-picker/locale/ar_EG.ts +0 -24
  304. package/src/date-picker/locale/az_AZ.ts +0 -16
  305. package/src/date-picker/locale/bg_BG.ts +0 -20
  306. package/src/date-picker/locale/bn_BD.ts +0 -27
  307. package/src/date-picker/locale/by_BY.ts +0 -23
  308. package/src/date-picker/locale/ca_ES.ts +0 -20
  309. package/src/date-picker/locale/cs_CZ.ts +0 -20
  310. package/src/date-picker/locale/da_DK.ts +0 -20
  311. package/src/date-picker/locale/de_DE.ts +0 -20
  312. package/src/date-picker/locale/el_GR.ts +0 -20
  313. package/src/date-picker/locale/en_GB.ts +0 -28
  314. package/src/date-picker/locale/en_US.ts +0 -28
  315. package/src/date-picker/locale/es_ES.ts +0 -20
  316. package/src/date-picker/locale/et_EE.ts +0 -20
  317. package/src/date-picker/locale/example.json +0 -40
  318. package/src/date-picker/locale/fa_IR.ts +0 -27
  319. package/src/date-picker/locale/fi_FI.ts +0 -20
  320. package/src/date-picker/locale/fr_BE.ts +0 -20
  321. package/src/date-picker/locale/fr_CA.ts +0 -27
  322. package/src/date-picker/locale/fr_FR.ts +0 -27
  323. package/src/date-picker/locale/ga_IE.ts +0 -27
  324. package/src/date-picker/locale/gl_ES.ts +0 -20
  325. package/src/date-picker/locale/he_IL.ts +0 -20
  326. package/src/date-picker/locale/hi_IN.ts +0 -27
  327. package/src/date-picker/locale/hr_HR.ts +0 -27
  328. package/src/date-picker/locale/hu_HU.ts +0 -20
  329. package/src/date-picker/locale/id_ID.ts +0 -20
  330. package/src/date-picker/locale/is_IS.ts +0 -20
  331. package/src/date-picker/locale/it_IT.ts +0 -20
  332. package/src/date-picker/locale/ja_JP.ts +0 -28
  333. package/src/date-picker/locale/ka_GE.ts +0 -23
  334. package/src/date-picker/locale/kk_KZ.ts +0 -27
  335. package/src/date-picker/locale/km_KH.ts +0 -27
  336. package/src/date-picker/locale/kmr_IQ.ts +0 -19
  337. package/src/date-picker/locale/kn_IN.ts +0 -20
  338. package/src/date-picker/locale/ko_KR.ts +0 -20
  339. package/src/date-picker/locale/lt_LT.ts +0 -27
  340. package/src/date-picker/locale/lv_LV.ts +0 -20
  341. package/src/date-picker/locale/mk_MK.ts +0 -20
  342. package/src/date-picker/locale/ml_IN.ts +0 -27
  343. package/src/date-picker/locale/mn_MN.ts +0 -20
  344. package/src/date-picker/locale/ms_MY.ts +0 -20
  345. package/src/date-picker/locale/nb_NO.ts +0 -27
  346. package/src/date-picker/locale/nl_BE.ts +0 -27
  347. package/src/date-picker/locale/nl_NL.ts +0 -27
  348. package/src/date-picker/locale/pl_PL.ts +0 -20
  349. package/src/date-picker/locale/pt_BR.ts +0 -20
  350. package/src/date-picker/locale/pt_PT.ts +0 -47
  351. package/src/date-picker/locale/ro_RO.ts +0 -20
  352. package/src/date-picker/locale/ru_RU.ts +0 -28
  353. package/src/date-picker/locale/sk_SK.ts +0 -20
  354. package/src/date-picker/locale/sl_SI.ts +0 -45
  355. package/src/date-picker/locale/sr_RS.ts +0 -27
  356. package/src/date-picker/locale/sv_SE.ts +0 -27
  357. package/src/date-picker/locale/ta_IN.ts +0 -21
  358. package/src/date-picker/locale/th_TH.ts +0 -27
  359. package/src/date-picker/locale/tr_TR.ts +0 -28
  360. package/src/date-picker/locale/uk_UA.ts +0 -20
  361. package/src/date-picker/locale/ur_PK.ts +0 -27
  362. package/src/date-picker/locale/vi_VN.ts +0 -20
  363. package/src/date-picker/locale/zh_CN.ts +0 -31
  364. package/src/date-picker/locale/zh_TW.ts +0 -30
  365. package/src/date-picker/moment.tsx +0 -41
  366. package/src/date-picker/style/index.ts +0 -1451
  367. package/src/date-picker/util.ts +0 -102
  368. package/src/descriptions/Cell.tsx +0 -75
  369. package/src/descriptions/Row.tsx +0 -139
  370. package/src/descriptions/index.en-US.md +0 -40
  371. package/src/descriptions/index.tsx +0 -257
  372. package/src/descriptions/index.zh-CN.md +0 -41
  373. package/src/descriptions/style/index.ts +0 -208
  374. package/src/divider/index.en-US.md +0 -24
  375. package/src/divider/index.tsx +0 -98
  376. package/src/divider/index.zh-CN.md +0 -25
  377. package/src/divider/style/index.ts +0 -167
  378. package/src/drawer/index.en-US.md +0 -60
  379. package/src/drawer/index.tsx +0 -441
  380. package/src/drawer/index.zh-CN.md +0 -59
  381. package/src/drawer/style/index.ts +0 -230
  382. package/src/drawer/style/motion.ts +0 -134
  383. package/src/dropdown/dropdown-button.tsx +0 -120
  384. package/src/dropdown/dropdown.tsx +0 -219
  385. package/src/dropdown/index.en-US.md +0 -64
  386. package/src/dropdown/index.ts +0 -24
  387. package/src/dropdown/index.zh-CN.md +0 -68
  388. package/src/dropdown/props.ts +0 -95
  389. package/src/dropdown/style/button.ts +0 -26
  390. package/src/dropdown/style/index.ts +0 -458
  391. package/src/dropdown/style/status.ts +0 -25
  392. package/src/empty/empty.tsx +0 -77
  393. package/src/empty/index.en-US.md +0 -38
  394. package/src/empty/index.tsx +0 -91
  395. package/src/empty/index.zh-CN.md +0 -39
  396. package/src/empty/simple.tsx +0 -42
  397. package/src/empty/style/index.ts +0 -80
  398. package/src/flex/index.en-US.md +0 -32
  399. package/src/flex/index.tsx +0 -59
  400. package/src/flex/index.zh-CN.md +0 -33
  401. package/src/flex/interface.ts +0 -17
  402. package/src/flex/style/index.ts +0 -110
  403. package/src/flex/utils.ts +0 -67
  404. package/src/float-button/BackTop.tsx +0 -146
  405. package/src/float-button/FloatButton.tsx +0 -105
  406. package/src/float-button/FloatButtonContent.tsx +0 -38
  407. package/src/float-button/FloatButtonGroup.tsx +0 -142
  408. package/src/float-button/context.ts +0 -19
  409. package/src/float-button/index.en-US.md +0 -60
  410. package/src/float-button/index.ts +0 -41
  411. package/src/float-button/index.zh-CN.md +0 -63
  412. package/src/float-button/interface.ts +0 -71
  413. package/src/float-button/style/index.ts +0 -396
  414. package/src/float-button/util.ts +0 -10
  415. package/src/form/ErrorList.tsx +0 -66
  416. package/src/form/Form.tsx +0 -416
  417. package/src/form/FormItem.tsx +0 -545
  418. package/src/form/FormItemContext.ts +0 -128
  419. package/src/form/FormItemInput.tsx +0 -114
  420. package/src/form/FormItemLabel.tsx +0 -118
  421. package/src/form/context.ts +0 -78
  422. package/src/form/index.en-US.md +0 -255
  423. package/src/form/index.tsx +0 -31
  424. package/src/form/index.zh-CN.md +0 -253
  425. package/src/form/interface.ts +0 -227
  426. package/src/form/style/explain.ts +0 -56
  427. package/src/form/style/index.ts +0 -492
  428. package/src/form/useForm.ts +0 -394
  429. package/src/form/utils/asyncUtil.ts +0 -34
  430. package/src/form/utils/messages.ts +0 -49
  431. package/src/form/utils/typeUtil.ts +0 -7
  432. package/src/form/utils/useDebounce.ts +0 -18
  433. package/src/form/utils/validateUtil.ts +0 -244
  434. package/src/form/utils/valueUtil.ts +0 -85
  435. package/src/grid/Col.tsx +0 -160
  436. package/src/grid/Row.tsx +0 -199
  437. package/src/grid/context.ts +0 -25
  438. package/src/grid/index.en-US.md +0 -67
  439. package/src/grid/index.ts +0 -11
  440. package/src/grid/index.zh-CN.md +0 -64
  441. package/src/grid/style/index.ts +0 -179
  442. package/src/icon/index.en-US.md +0 -247
  443. package/src/icon/index.tsx +0 -11
  444. package/src/icon/index.zh-CN.md +0 -248
  445. package/src/image/PreviewGroup.tsx +0 -77
  446. package/src/image/index.en-US.md +0 -48
  447. package/src/image/index.tsx +0 -87
  448. package/src/image/index.zh-CN.md +0 -49
  449. package/src/image/style/index.ts +0 -322
  450. package/src/index.ts +0 -32
  451. package/src/input/ClearableLabeledInput.tsx +0 -126
  452. package/src/input/Group.tsx +0 -50
  453. package/src/input/Input.tsx +0 -206
  454. package/src/input/Password.tsx +0 -112
  455. package/src/input/ResizableTextArea.tsx +0 -189
  456. package/src/input/Search.tsx +0 -171
  457. package/src/input/TextArea.tsx +0 -317
  458. package/src/input/calculateNodeHeight.tsx +0 -175
  459. package/src/input/index.en-US.md +0 -101
  460. package/src/input/index.ts +0 -38
  461. package/src/input/index.zh-CN.md +0 -102
  462. package/src/input/inputProps.ts +0 -41
  463. package/src/input/style/index.ts +0 -971
  464. package/src/input/util.ts +0 -21
  465. package/src/input-number/index.en-US.md +0 -65
  466. package/src/input-number/index.tsx +0 -250
  467. package/src/input-number/index.zh-CN.md +0 -68
  468. package/src/input-number/src/InputNumber.tsx +0 -593
  469. package/src/input-number/src/StepHandler.tsx +0 -110
  470. package/src/input-number/src/hooks/useCursor.ts +0 -79
  471. package/src/input-number/src/hooks/useFrame.ts +0 -26
  472. package/src/input-number/src/utils/MiniDecimal.ts +0 -307
  473. package/src/input-number/src/utils/numberUtil.ts +0 -115
  474. package/src/input-number/src/utils/supportUtil.ts +0 -3
  475. package/src/input-number/style/index.tsx +0 -416
  476. package/src/layout/Sider.tsx +0 -235
  477. package/src/layout/index.en-US.md +0 -122
  478. package/src/layout/index.ts +0 -28
  479. package/src/layout/index.zh-CN.md +0 -123
  480. package/src/layout/injectionKey.ts +0 -12
  481. package/src/layout/layout.tsx +0 -113
  482. package/src/layout/style/index.ts +0 -226
  483. package/src/layout/style/light.ts +0 -27
  484. package/src/list/Item.tsx +0 -112
  485. package/src/list/ItemMeta.tsx +0 -52
  486. package/src/list/contextKey.ts +0 -8
  487. package/src/list/index.en-US.md +0 -73
  488. package/src/list/index.tsx +0 -344
  489. package/src/list/index.zh-CN.md +0 -74
  490. package/src/list/style/index.tsx +0 -354
  491. package/src/locale/LocaleReceiver.tsx +0 -87
  492. package/src/locale/ar_EG.ts +0 -120
  493. package/src/locale/az_AZ.ts +0 -48
  494. package/src/locale/bg_BG.ts +0 -46
  495. package/src/locale/bn_BD.ts +0 -134
  496. package/src/locale/by_BY.ts +0 -128
  497. package/src/locale/ca_ES.ts +0 -129
  498. package/src/locale/cs_CZ.ts +0 -57
  499. package/src/locale/da_DK.ts +0 -56
  500. package/src/locale/de_DE.ts +0 -127
  501. package/src/locale/el_GR.ts +0 -46
  502. package/src/locale/en_GB.ts +0 -108
  503. package/src/locale/en_US.ts +0 -146
  504. package/src/locale/es_ES.ts +0 -134
  505. package/src/locale/et_EE.ts +0 -136
  506. package/src/locale/fa_IR.ts +0 -134
  507. package/src/locale/fi_FI.ts +0 -56
  508. package/src/locale/fr_BE.ts +0 -50
  509. package/src/locale/fr_CA.ts +0 -62
  510. package/src/locale/fr_FR.ts +0 -131
  511. package/src/locale/ga_IE.ts +0 -127
  512. package/src/locale/gl_ES.ts +0 -114
  513. package/src/locale/he_IL.ts +0 -120
  514. package/src/locale/hi_IN.ts +0 -134
  515. package/src/locale/hr_HR.ts +0 -133
  516. package/src/locale/hu_HU.ts +0 -47
  517. package/src/locale/hy_AM.ts +0 -115
  518. package/src/locale/id_ID.ts +0 -48
  519. package/src/locale/index.tsx +0 -111
  520. package/src/locale/is_IS.ts +0 -46
  521. package/src/locale/it_IT.ts +0 -62
  522. package/src/locale/ja_JP.ts +0 -106
  523. package/src/locale/ka_GE.ts +0 -134
  524. package/src/locale/kk_KZ.ts +0 -128
  525. package/src/locale/km_KH.ts +0 -108
  526. package/src/locale/kmr_IQ.ts +0 -46
  527. package/src/locale/kn_IN.ts +0 -54
  528. package/src/locale/ko_KR.ts +0 -100
  529. package/src/locale/ku_IQ.ts +0 -50
  530. package/src/locale/lt_LT.ts +0 -125
  531. package/src/locale/lv_LV.ts +0 -46
  532. package/src/locale/mk_MK.ts +0 -61
  533. package/src/locale/ml_IN.ts +0 -134
  534. package/src/locale/mn_MN.ts +0 -46
  535. package/src/locale/ms_MY.ts +0 -66
  536. package/src/locale/nb_NO.ts +0 -128
  537. package/src/locale/ne_NP.ts +0 -47
  538. package/src/locale/nl_BE.ts +0 -134
  539. package/src/locale/nl_NL.ts +0 -134
  540. package/src/locale/pl_PL.ts +0 -136
  541. package/src/locale/pt_BR.ts +0 -139
  542. package/src/locale/pt_PT.ts +0 -47
  543. package/src/locale/ro_RO.ts +0 -134
  544. package/src/locale/ru_RU.ts +0 -143
  545. package/src/locale/sk_SK.ts +0 -135
  546. package/src/locale/sl_SI.ts +0 -46
  547. package/src/locale/sr_RS.ts +0 -134
  548. package/src/locale/sv_SE.ts +0 -134
  549. package/src/locale/ta_IN.ts +0 -66
  550. package/src/locale/th_TH.ts +0 -130
  551. package/src/locale/tr_TR.ts +0 -132
  552. package/src/locale/uk_UA.ts +0 -46
  553. package/src/locale/ur_PK.ts +0 -134
  554. package/src/locale/vi_VN.ts +0 -46
  555. package/src/locale/zh_CN.ts +0 -145
  556. package/src/locale/zh_HK.ts +0 -141
  557. package/src/locale/zh_TW.ts +0 -142
  558. package/src/locale-provider/LocaleReceiver.tsx +0 -5
  559. package/src/locale-provider/index.ts +0 -5
  560. package/src/mentions/index.en-US.md +0 -70
  561. package/src/mentions/index.tsx +0 -301
  562. package/src/mentions/index.zh-CN.md +0 -71
  563. package/src/mentions/style/index.ts +0 -232
  564. package/src/menu/index.en-US.md +0 -166
  565. package/src/menu/index.tsx +0 -56
  566. package/src/menu/index.zh-CN.md +0 -166
  567. package/src/menu/src/Divider.tsx +0 -29
  568. package/src/menu/src/InlineSubMenuList.tsx +0 -56
  569. package/src/menu/src/ItemGroup.tsx +0 -48
  570. package/src/menu/src/Menu.tsx +0 -529
  571. package/src/menu/src/MenuItem.tsx +0 -272
  572. package/src/menu/src/OverrideContext.ts +0 -30
  573. package/src/menu/src/PopupTrigger.tsx +0 -117
  574. package/src/menu/src/SubMenu.tsx +0 -376
  575. package/src/menu/src/SubMenuList.tsx +0 -25
  576. package/src/menu/src/hooks/useDirectionStyle.ts +0 -16
  577. package/src/menu/src/hooks/useItems.tsx +0 -137
  578. package/src/menu/src/hooks/useKeyPath.ts +0 -46
  579. package/src/menu/src/hooks/useMenuContext.ts +0 -144
  580. package/src/menu/src/interface.ts +0 -116
  581. package/src/menu/src/placements.ts +0 -52
  582. package/src/menu/style/horizontal.ts +0 -57
  583. package/src/menu/style/index.ts +0 -585
  584. package/src/menu/style/rtl.ts +0 -28
  585. package/src/menu/style/theme.ts +0 -264
  586. package/src/menu/style/vertical.ts +0 -231
  587. package/src/message/PurePanel.tsx +0 -75
  588. package/src/message/index.en-US.md +0 -119
  589. package/src/message/index.tsx +0 -263
  590. package/src/message/index.zh-CN.md +0 -122
  591. package/src/message/interface.ts +0 -49
  592. package/src/message/style/index.ts +0 -180
  593. package/src/message/useMessage.tsx +0 -231
  594. package/src/modal/ConfirmDialog.tsx +0 -232
  595. package/src/modal/Modal.tsx +0 -262
  596. package/src/modal/confirm.tsx +0 -146
  597. package/src/modal/destroyFns.ts +0 -2
  598. package/src/modal/index.en-US.md +0 -161
  599. package/src/modal/index.tsx +0 -84
  600. package/src/modal/index.zh-CN.md +0 -165
  601. package/src/modal/locale.ts +0 -28
  602. package/src/modal/style/index.ts +0 -466
  603. package/src/modal/useModal/HookModal.tsx +0 -75
  604. package/src/modal/useModal/index.tsx +0 -151
  605. package/src/notification/PurePanel.tsx +0 -122
  606. package/src/notification/index.en-US.md +0 -108
  607. package/src/notification/index.tsx +0 -256
  608. package/src/notification/index.zh-CN.md +0 -109
  609. package/src/notification/interface.ts +0 -62
  610. package/src/notification/style/index.ts +0 -287
  611. package/src/notification/style/placement.ts +0 -81
  612. package/src/notification/useNotification.tsx +0 -150
  613. package/src/notification/util.ts +0 -74
  614. package/src/page-header/index.en-US.md +0 -34
  615. package/src/page-header/index.tsx +0 -196
  616. package/src/page-header/index.zh-CN.md +0 -34
  617. package/src/page-header/style/index.ts +0 -155
  618. package/src/pagination/Pagination.tsx +0 -169
  619. package/src/pagination/Select.tsx +0 -38
  620. package/src/pagination/index.en-US.md +0 -48
  621. package/src/pagination/index.ts +0 -7
  622. package/src/pagination/index.zh-CN.md +0 -42
  623. package/src/pagination/style/index.tsx +0 -717
  624. package/src/popconfirm/index.en-US.md +0 -47
  625. package/src/popconfirm/index.tsx +0 -243
  626. package/src/popconfirm/index.zh-CN.md +0 -46
  627. package/src/popconfirm/style/index.ts +0 -89
  628. package/src/popover/index.en-US.md +0 -28
  629. package/src/popover/index.tsx +0 -81
  630. package/src/popover/index.zh-CN.md +0 -29
  631. package/src/popover/style/index.ts +0 -183
  632. package/src/progress/Circle.tsx +0 -110
  633. package/src/progress/Line.tsx +0 -163
  634. package/src/progress/Steps.tsx +0 -67
  635. package/src/progress/index.en-US.md +0 -56
  636. package/src/progress/index.ts +0 -6
  637. package/src/progress/index.zh-CN.md +0 -57
  638. package/src/progress/progress.tsx +0 -163
  639. package/src/progress/props.ts +0 -52
  640. package/src/progress/style/index.ts +0 -274
  641. package/src/progress/utils.ts +0 -97
  642. package/src/qrcode/QRCode.tsx +0 -354
  643. package/src/qrcode/index.en-US.md +0 -43
  644. package/src/qrcode/index.tsx +0 -117
  645. package/src/qrcode/index.zh-CN.md +0 -44
  646. package/src/qrcode/interface.ts +0 -51
  647. package/src/qrcode/qrcodegen.ts +0 -969
  648. package/src/qrcode/style/index.ts +0 -65
  649. package/src/radio/Group.tsx +0 -148
  650. package/src/radio/Radio.tsx +0 -127
  651. package/src/radio/RadioButton.tsx +0 -23
  652. package/src/radio/context.ts +0 -24
  653. package/src/radio/index.en-US.md +0 -54
  654. package/src/radio/index.ts +0 -27
  655. package/src/radio/index.zh-CN.md +0 -55
  656. package/src/radio/interface.ts +0 -33
  657. package/src/radio/style/index.tsx +0 -545
  658. package/src/rate/Star.tsx +0 -99
  659. package/src/rate/index.en-US.md +0 -44
  660. package/src/rate/index.tsx +0 -254
  661. package/src/rate/index.zh-CN.md +0 -45
  662. package/src/rate/style/index.ts +0 -135
  663. package/src/rate/util.ts +0 -40
  664. package/src/result/index.en-US.md +0 -23
  665. package/src/result/index.tsx +0 -122
  666. package/src/result/index.zh-CN.md +0 -24
  667. package/src/result/noFound.tsx +0 -289
  668. package/src/result/serverError.tsx +0 -331
  669. package/src/result/style/index.tsx +0 -157
  670. package/src/result/unauthorized.tsx +0 -280
  671. package/src/row/index.ts +0 -6
  672. package/src/row/style/index.ts +0 -4
  673. package/src/segmented/index.en-US.md +0 -50
  674. package/src/segmented/index.ts +0 -6
  675. package/src/segmented/index.zh-CN.md +0 -53
  676. package/src/segmented/src/MotionThumb.tsx +0 -162
  677. package/src/segmented/src/index.ts +0 -5
  678. package/src/segmented/src/segmented.tsx +0 -191
  679. package/src/segmented/style/index.ts +0 -216
  680. package/src/select/index.en-US.md +0 -128
  681. package/src/select/index.tsx +0 -318
  682. package/src/select/index.zh-CN.md +0 -128
  683. package/src/select/style/dropdown.ts +0 -166
  684. package/src/select/style/index.ts +0 -342
  685. package/src/select/style/multiple.ts +0 -239
  686. package/src/select/style/single.ts +0 -192
  687. package/src/select/utils/iconUtil.tsx +0 -63
  688. package/src/skeleton/Avatar.tsx +0 -49
  689. package/src/skeleton/Button.tsx +0 -50
  690. package/src/skeleton/Element.tsx +0 -43
  691. package/src/skeleton/Image.tsx +0 -43
  692. package/src/skeleton/Input.tsx +0 -48
  693. package/src/skeleton/Paragraph.tsx +0 -44
  694. package/src/skeleton/Skeleton.tsx +0 -174
  695. package/src/skeleton/Title.tsx +0 -24
  696. package/src/skeleton/index.en-US.md +0 -64
  697. package/src/skeleton/index.tsx +0 -42
  698. package/src/skeleton/index.zh-CN.md +0 -65
  699. package/src/skeleton/style/index.ts +0 -388
  700. package/src/slider/SliderTooltip.tsx +0 -50
  701. package/src/slider/index.en-US.md +0 -51
  702. package/src/slider/index.tsx +0 -256
  703. package/src/slider/index.zh-CN.md +0 -50
  704. package/src/slider/style/index.tsx +0 -346
  705. package/src/space/Compact.tsx +0 -136
  706. package/src/space/index.en-US.md +0 -46
  707. package/src/space/index.tsx +0 -162
  708. package/src/space/index.zh-CN.md +0 -52
  709. package/src/space/style/compact.tsx +0 -30
  710. package/src/space/style/index.tsx +0 -54
  711. package/src/spin/Spin.tsx +0 -133
  712. package/src/spin/index.en-US.md +0 -36
  713. package/src/spin/index.ts +0 -19
  714. package/src/spin/index.zh-CN.md +0 -37
  715. package/src/spin/style/index.ts +0 -241
  716. package/src/statistic/Countdown.tsx +0 -103
  717. package/src/statistic/Number.tsx +0 -54
  718. package/src/statistic/Statistic.tsx +0 -89
  719. package/src/statistic/index.en-US.md +0 -47
  720. package/src/statistic/index.ts +0 -21
  721. package/src/statistic/index.zh-CN.md +0 -48
  722. package/src/statistic/style/index.tsx +0 -69
  723. package/src/statistic/utils.ts +0 -69
  724. package/src/steps/index.en-US.md +0 -58
  725. package/src/steps/index.tsx +0 -170
  726. package/src/steps/index.zh-CN.md +0 -63
  727. package/src/steps/style/custom-icon.ts +0 -36
  728. package/src/steps/style/index.tsx +0 -408
  729. package/src/steps/style/inline.ts +0 -124
  730. package/src/steps/style/label-placement.ts +0 -56
  731. package/src/steps/style/nav.ts +0 -146
  732. package/src/steps/style/progress-dot.ts +0 -133
  733. package/src/steps/style/progress.ts +0 -60
  734. package/src/steps/style/rtl.ts +0 -47
  735. package/src/steps/style/small.ts +0 -68
  736. package/src/steps/style/vertical.ts +0 -72
  737. package/src/style/compact-item-vertical.ts +0 -57
  738. package/src/style/compact-item.ts +0 -102
  739. package/src/style/index.ts +0 -138
  740. package/src/style/motion/collapse.ts +0 -24
  741. package/src/style/motion/fade.ts +0 -49
  742. package/src/style/motion/index.ts +0 -77
  743. package/src/style/motion/motion.ts +0 -51
  744. package/src/style/motion/move.ts +0 -163
  745. package/src/style/motion/slide.ts +0 -166
  746. package/src/style/motion/zoom.ts +0 -230
  747. package/src/style/operationUnit.ts +0 -20
  748. package/src/style/placementArrow.ts +0 -257
  749. package/src/style/presetColor.tsx +0 -34
  750. package/src/style/reset.css +0 -253
  751. package/src/style/roundedArrow.ts +0 -71
  752. package/src/switch/index.en-US.md +0 -42
  753. package/src/switch/index.tsx +0 -209
  754. package/src/switch/index.zh-CN.md +0 -43
  755. package/src/switch/style/index.ts +0 -354
  756. package/src/table/Column.tsx +0 -18
  757. package/src/table/ColumnGroup.tsx +0 -16
  758. package/src/table/ExpandIcon.tsx +0 -41
  759. package/src/table/Table.tsx +0 -689
  760. package/src/table/context.ts +0 -45
  761. package/src/table/hooks/useColumns.tsx +0 -55
  762. package/src/table/hooks/useFilter/FilterDropdown.tsx +0 -576
  763. package/src/table/hooks/useFilter/FilterSearch.tsx +0 -41
  764. package/src/table/hooks/useFilter/FilterWrapper.tsx +0 -16
  765. package/src/table/hooks/useFilter/index.tsx +0 -300
  766. package/src/table/hooks/useLazyKVMap.ts +0 -51
  767. package/src/table/hooks/usePagination.ts +0 -92
  768. package/src/table/hooks/useSelection.tsx +0 -690
  769. package/src/table/hooks/useSorter.tsx +0 -450
  770. package/src/table/hooks/useTitleColumns.tsx +0 -30
  771. package/src/table/index.en-US.md +0 -306
  772. package/src/table/index.tsx +0 -56
  773. package/src/table/index.zh-CN.md +0 -313
  774. package/src/table/interface.tsx +0 -235
  775. package/src/table/style/bordered.ts +0 -159
  776. package/src/table/style/ellipsis.ts +0 -37
  777. package/src/table/style/empty.ts +0 -22
  778. package/src/table/style/expand.ts +0 -152
  779. package/src/table/style/filter.ts +0 -172
  780. package/src/table/style/fixed.ts +0 -132
  781. package/src/table/style/index.ts +0 -378
  782. package/src/table/style/pagination.ts +0 -39
  783. package/src/table/style/radius.ts +0 -57
  784. package/src/table/style/resize.ts +0 -52
  785. package/src/table/style/rtl.ts +0 -39
  786. package/src/table/style/selection.ts +0 -76
  787. package/src/table/style/size.ts +0 -68
  788. package/src/table/style/sorter.ts +0 -101
  789. package/src/table/style/sticky.ts +0 -59
  790. package/src/table/style/summary.ts +0 -29
  791. package/src/table/util.ts +0 -62
  792. package/src/tabs/index.en-US.md +0 -69
  793. package/src/tabs/index.ts +0 -21
  794. package/src/tabs/index.zh-CN.md +0 -71
  795. package/src/tabs/src/TabContext.ts +0 -35
  796. package/src/tabs/src/TabNavList/AddButton.tsx +0 -50
  797. package/src/tabs/src/TabNavList/OperationNode.tsx +0 -253
  798. package/src/tabs/src/TabNavList/TabNode.tsx +0 -140
  799. package/src/tabs/src/TabNavList/index.tsx +0 -581
  800. package/src/tabs/src/TabPanelList/TabPane.tsx +0 -81
  801. package/src/tabs/src/TabPanelList/index.tsx +0 -68
  802. package/src/tabs/src/Tabs.tsx +0 -387
  803. package/src/tabs/src/hooks/useOffsets.ts +0 -41
  804. package/src/tabs/src/hooks/useRaf.ts +0 -53
  805. package/src/tabs/src/hooks/useSyncState.ts +0 -21
  806. package/src/tabs/src/hooks/useTouchMove.ts +0 -141
  807. package/src/tabs/src/index.ts +0 -11
  808. package/src/tabs/src/interface.ts +0 -48
  809. package/src/tabs/style/index.ts +0 -906
  810. package/src/tabs/style/motion.ts +0 -46
  811. package/src/tag/CheckableTag.tsx +0 -56
  812. package/src/tag/index.en-US.md +0 -44
  813. package/src/tag/index.tsx +0 -175
  814. package/src/tag/index.zh-CN.md +0 -45
  815. package/src/tag/style/index.ts +0 -184
  816. package/src/theme/convertLegacyToken.ts +0 -1107
  817. package/src/theme/index.ts +0 -30
  818. package/src/theme/interface/alias.ts +0 -153
  819. package/src/theme/interface/components.ts +0 -121
  820. package/src/theme/interface/index.ts +0 -25
  821. package/src/theme/interface/maps/colors.ts +0 -438
  822. package/src/theme/interface/maps/font.ts +0 -49
  823. package/src/theme/interface/maps/index.ts +0 -34
  824. package/src/theme/interface/maps/size.ts +0 -68
  825. package/src/theme/interface/maps/style.ts +0 -38
  826. package/src/theme/interface/presetColors.ts +0 -25
  827. package/src/theme/interface/seeds.ts +0 -221
  828. package/src/theme/internal.ts +0 -145
  829. package/src/theme/themes/ColorMap.ts +0 -20
  830. package/src/theme/themes/compact/genCompactSizeMapToken.ts +0 -19
  831. package/src/theme/themes/compact/index.ts +0 -27
  832. package/src/theme/themes/dark/colorAlgorithm.ts +0 -9
  833. package/src/theme/themes/dark/colors.ts +0 -54
  834. package/src/theme/themes/dark/index.ts +0 -45
  835. package/src/theme/themes/default/colorAlgorithm.ts +0 -9
  836. package/src/theme/themes/default/colors.ts +0 -54
  837. package/src/theme/themes/default/index.ts +0 -49
  838. package/src/theme/themes/seed.ts +0 -79
  839. package/src/theme/themes/shared/genColorMapToken.ts +0 -93
  840. package/src/theme/themes/shared/genCommonMapToken.ts +0 -19
  841. package/src/theme/themes/shared/genControlHeight.ts +0 -13
  842. package/src/theme/themes/shared/genFontMapToken.ts +0 -33
  843. package/src/theme/themes/shared/genFontSizes.ts +0 -24
  844. package/src/theme/themes/shared/genRadius.ts +0 -59
  845. package/src/theme/themes/shared/genSizeMapToken.ts +0 -17
  846. package/src/theme/util/alias.ts +0 -202
  847. package/src/theme/util/genComponentStyleHook.ts +0 -110
  848. package/src/theme/util/getAlphaColor.ts +0 -29
  849. package/src/theme/util/statistic.ts +0 -71
  850. package/src/time-picker/date-fns.tsx +0 -27
  851. package/src/time-picker/dayjs.tsx +0 -30
  852. package/src/time-picker/index.en-US.md +0 -95
  853. package/src/time-picker/index.tsx +0 -9
  854. package/src/time-picker/index.zh-CN.md +0 -97
  855. package/src/time-picker/locale/ar_EG.ts +0 -7
  856. package/src/time-picker/locale/az_AZ.ts +0 -7
  857. package/src/time-picker/locale/bg_BG.ts +0 -7
  858. package/src/time-picker/locale/bn_BD.ts +0 -8
  859. package/src/time-picker/locale/by_BY.ts +0 -8
  860. package/src/time-picker/locale/ca_ES.ts +0 -7
  861. package/src/time-picker/locale/cs_CZ.ts +0 -7
  862. package/src/time-picker/locale/da_DK.ts +0 -8
  863. package/src/time-picker/locale/de_DE.ts +0 -7
  864. package/src/time-picker/locale/el_GR.ts +0 -7
  865. package/src/time-picker/locale/en_GB.ts +0 -7
  866. package/src/time-picker/locale/en_US.ts +0 -8
  867. package/src/time-picker/locale/es_ES.ts +0 -7
  868. package/src/time-picker/locale/et_EE.ts +0 -7
  869. package/src/time-picker/locale/fa_IR.ts +0 -8
  870. package/src/time-picker/locale/fi_FI.ts +0 -7
  871. package/src/time-picker/locale/fr_BE.ts +0 -7
  872. package/src/time-picker/locale/fr_CA.ts +0 -8
  873. package/src/time-picker/locale/fr_FR.ts +0 -8
  874. package/src/time-picker/locale/ga_IE.ts +0 -8
  875. package/src/time-picker/locale/gl_ES.ts +0 -7
  876. package/src/time-picker/locale/he_IL.ts +0 -7
  877. package/src/time-picker/locale/hi_IN.ts +0 -8
  878. package/src/time-picker/locale/hr_HR.ts +0 -8
  879. package/src/time-picker/locale/hu_HU.ts +0 -7
  880. package/src/time-picker/locale/id_ID.ts +0 -7
  881. package/src/time-picker/locale/is_IS.ts +0 -7
  882. package/src/time-picker/locale/it_IT.ts +0 -7
  883. package/src/time-picker/locale/ja_JP.ts +0 -8
  884. package/src/time-picker/locale/ka_GE.ts +0 -8
  885. package/src/time-picker/locale/kk_KZ.ts +0 -8
  886. package/src/time-picker/locale/km_KH.ts +0 -8
  887. package/src/time-picker/locale/kmr_IQ.ts +0 -7
  888. package/src/time-picker/locale/kn_IN.ts +0 -7
  889. package/src/time-picker/locale/ko_KR.ts +0 -8
  890. package/src/time-picker/locale/lt_LT.ts +0 -8
  891. package/src/time-picker/locale/lv_LV.ts +0 -7
  892. package/src/time-picker/locale/mk_MK.ts +0 -7
  893. package/src/time-picker/locale/ml_IN.ts +0 -8
  894. package/src/time-picker/locale/mn_MN.ts +0 -7
  895. package/src/time-picker/locale/ms_MY.ts +0 -7
  896. package/src/time-picker/locale/nb_NO.ts +0 -8
  897. package/src/time-picker/locale/nl_BE.ts +0 -8
  898. package/src/time-picker/locale/nl_NL.ts +0 -8
  899. package/src/time-picker/locale/pl_PL.ts +0 -7
  900. package/src/time-picker/locale/pt_BR.ts +0 -7
  901. package/src/time-picker/locale/pt_PT.ts +0 -7
  902. package/src/time-picker/locale/ro_RO.ts +0 -7
  903. package/src/time-picker/locale/ru_RU.ts +0 -9
  904. package/src/time-picker/locale/sk_SK.ts +0 -7
  905. package/src/time-picker/locale/sl_SI.ts +0 -7
  906. package/src/time-picker/locale/sr_RS.ts +0 -8
  907. package/src/time-picker/locale/sv_SE.ts +0 -7
  908. package/src/time-picker/locale/ta_IN.ts +0 -7
  909. package/src/time-picker/locale/th_TH.ts +0 -7
  910. package/src/time-picker/locale/tr_TR.ts +0 -8
  911. package/src/time-picker/locale/uk_UA.ts +0 -7
  912. package/src/time-picker/locale/ur_PK.ts +0 -8
  913. package/src/time-picker/locale/vi_VN.ts +0 -7
  914. package/src/time-picker/locale/zh_CN.ts +0 -8
  915. package/src/time-picker/locale/zh_TW.ts +0 -7
  916. package/src/time-picker/moment.tsx +0 -29
  917. package/src/time-picker/time-picker.tsx +0 -247
  918. package/src/timeline/Timeline.tsx +0 -116
  919. package/src/timeline/TimelineItem.tsx +0 -64
  920. package/src/timeline/index.en-US.md +0 -47
  921. package/src/timeline/index.tsx +0 -21
  922. package/src/timeline/index.zh-CN.md +0 -48
  923. package/src/timeline/style/index.tsx +0 -237
  924. package/src/tooltip/Tooltip.tsx +0 -322
  925. package/src/tooltip/abstractTooltipProps.ts +0 -61
  926. package/src/tooltip/index.en-US.md +0 -52
  927. package/src/tooltip/index.ts +0 -14
  928. package/src/tooltip/index.zh-CN.md +0 -53
  929. package/src/tooltip/style/index.ts +0 -158
  930. package/src/tooltip/util.ts +0 -23
  931. package/src/tour/index.en-US.md +0 -60
  932. package/src/tour/index.tsx +0 -92
  933. package/src/tour/index.zh-CN.md +0 -61
  934. package/src/tour/interface.ts +0 -43
  935. package/src/tour/panelRender.tsx +0 -152
  936. package/src/tour/style/index.ts +0 -251
  937. package/src/tour/useMergedType.ts +0 -39
  938. package/src/transfer/ListBody.tsx +0 -170
  939. package/src/transfer/ListItem.tsx +0 -97
  940. package/src/transfer/index.en-US.md +0 -104
  941. package/src/transfer/index.tsx +0 -455
  942. package/src/transfer/index.zh-CN.md +0 -105
  943. package/src/transfer/interface.ts +0 -8
  944. package/src/transfer/list.tsx +0 -424
  945. package/src/transfer/operation.tsx +0 -68
  946. package/src/transfer/search.tsx +0 -52
  947. package/src/transfer/style/index.tsx +0 -376
  948. package/src/tree/DirectoryTree.tsx +0 -309
  949. package/src/tree/Tree.tsx +0 -277
  950. package/src/tree/breakchange.md +0 -1
  951. package/src/tree/index.en-US.md +0 -93
  952. package/src/tree/index.tsx +0 -38
  953. package/src/tree/index.zh-CN.md +0 -94
  954. package/src/tree/style/index.ts +0 -482
  955. package/src/tree/utils/dictUtil.ts +0 -100
  956. package/src/tree/utils/dropIndicator.tsx +0 -33
  957. package/src/tree/utils/iconUtil.tsx +0 -67
  958. package/src/tree-select/index.en-US.md +0 -100
  959. package/src/tree-select/index.tsx +0 -364
  960. package/src/tree-select/index.zh-CN.md +0 -95
  961. package/src/tree-select/style/index.tsx +0 -75
  962. package/src/typography/Base.tsx +0 -626
  963. package/src/typography/Editable.tsx +0 -161
  964. package/src/typography/Link.tsx +0 -37
  965. package/src/typography/Paragraph.tsx +0 -24
  966. package/src/typography/Text.tsx +0 -45
  967. package/src/typography/Title.tsx +0 -40
  968. package/src/typography/Typography.tsx +0 -58
  969. package/src/typography/index.en-US.md +0 -146
  970. package/src/typography/index.tsx +0 -41
  971. package/src/typography/index.zh-CN.md +0 -147
  972. package/src/typography/style/index.tsx +0 -128
  973. package/src/typography/style/mixins.tsx +0 -262
  974. package/src/typography/util.tsx +0 -227
  975. package/src/upload/Dragger.tsx +0 -24
  976. package/src/upload/Upload.tsx +0 -458
  977. package/src/upload/UploadList/ListItem.tsx +0 -306
  978. package/src/upload/UploadList/index.tsx +0 -264
  979. package/src/upload/index.en-US.md +0 -139
  980. package/src/upload/index.tsx +0 -19
  981. package/src/upload/index.zh-CN.md +0 -140
  982. package/src/upload/interface.tsx +0 -195
  983. package/src/upload/style/dragger.ts +0 -76
  984. package/src/upload/style/index.ts +0 -66
  985. package/src/upload/style/list.ts +0 -129
  986. package/src/upload/style/motion.ts +0 -52
  987. package/src/upload/style/picture.ts +0 -228
  988. package/src/upload/style/rtl.ts +0 -15
  989. package/src/upload/utils.tsx +0 -124
  990. package/src/vc-align/Align.tsx +0 -209
  991. package/src/vc-align/hooks/useBuffer.tsx +0 -39
  992. package/src/vc-align/index.ts +0 -4
  993. package/src/vc-align/interface.ts +0 -60
  994. package/src/vc-align/util.ts +0 -61
  995. package/src/vc-cascader/Cascader.tsx +0 -585
  996. package/src/vc-cascader/OptionList/Checkbox.tsx +0 -44
  997. package/src/vc-cascader/OptionList/Column.tsx +0 -182
  998. package/src/vc-cascader/OptionList/index.tsx +0 -246
  999. package/src/vc-cascader/OptionList/useActive.ts +0 -32
  1000. package/src/vc-cascader/OptionList/useKeyboard.ts +0 -194
  1001. package/src/vc-cascader/context.ts +0 -37
  1002. package/src/vc-cascader/hooks/useDisplayValues.ts +0 -64
  1003. package/src/vc-cascader/hooks/useEntities.ts +0 -37
  1004. package/src/vc-cascader/hooks/useMissingValues.ts +0 -27
  1005. package/src/vc-cascader/hooks/useSearchConfig.ts +0 -41
  1006. package/src/vc-cascader/hooks/useSearchOptions.ts +0 -78
  1007. package/src/vc-cascader/index.tsx +0 -16
  1008. package/src/vc-cascader/utils/commonUtil.ts +0 -51
  1009. package/src/vc-cascader/utils/treeUtil.ts +0 -60
  1010. package/src/vc-checkbox/Checkbox.tsx +0 -151
  1011. package/src/vc-dialog/Content.tsx +0 -158
  1012. package/src/vc-dialog/Dialog.tsx +0 -203
  1013. package/src/vc-dialog/DialogWrap.tsx +0 -78
  1014. package/src/vc-dialog/IDialogPropTypes.ts +0 -50
  1015. package/src/vc-dialog/Mask.tsx +0 -25
  1016. package/src/vc-dialog/index.ts +0 -7
  1017. package/src/vc-dialog/util.ts +0 -46
  1018. package/src/vc-drawer/index.ts +0 -4
  1019. package/src/vc-drawer/src/DrawerChild.tsx +0 -258
  1020. package/src/vc-drawer/src/DrawerWrapper.tsx +0 -101
  1021. package/src/vc-drawer/src/IDrawerPropTypes.ts +0 -60
  1022. package/src/vc-drawer/src/utils.ts +0 -112
  1023. package/src/vc-dropdown/Dropdown.tsx +0 -145
  1024. package/src/vc-dropdown/index.ts +0 -4
  1025. package/src/vc-dropdown/placements.ts +0 -47
  1026. package/src/vc-image/index.ts +0 -5
  1027. package/src/vc-image/src/Image.tsx +0 -308
  1028. package/src/vc-image/src/Preview.tsx +0 -422
  1029. package/src/vc-image/src/PreviewGroup.tsx +0 -212
  1030. package/src/vc-image/src/getFixScaleEleTransPosition.ts +0 -61
  1031. package/src/vc-image/src/hooks/useFrameSetState.ts +0 -32
  1032. package/src/vc-input/BaseInput.tsx +0 -153
  1033. package/src/vc-input/Input.tsx +0 -255
  1034. package/src/vc-input/inputProps.ts +0 -123
  1035. package/src/vc-input/utils/commonUtils.ts +0 -105
  1036. package/src/vc-input/utils/types.ts +0 -3
  1037. package/src/vc-mentions/index.ts +0 -6
  1038. package/src/vc-mentions/src/DropdownMenu.tsx +0 -86
  1039. package/src/vc-mentions/src/KeywordTrigger.tsx +0 -102
  1040. package/src/vc-mentions/src/Mentions.tsx +0 -306
  1041. package/src/vc-mentions/src/MentionsContext.ts +0 -16
  1042. package/src/vc-mentions/src/Option.tsx +0 -31
  1043. package/src/vc-mentions/src/mentionsProps.ts +0 -52
  1044. package/src/vc-mentions/src/util.ts +0 -124
  1045. package/src/vc-notification/HookNotification.tsx +0 -231
  1046. package/src/vc-notification/Notice.tsx +0 -139
  1047. package/src/vc-notification/Notification.tsx +0 -279
  1048. package/src/vc-notification/index.ts +0 -6
  1049. package/src/vc-notification/useNotification.tsx +0 -182
  1050. package/src/vc-overflow/Item.tsx +0 -100
  1051. package/src/vc-overflow/Overflow.tsx +0 -376
  1052. package/src/vc-overflow/RawItem.tsx +0 -54
  1053. package/src/vc-overflow/context.ts +0 -49
  1054. package/src/vc-overflow/index.ts +0 -6
  1055. package/src/vc-pagination/KeyCode.ts +0 -14
  1056. package/src/vc-pagination/Options.tsx +0 -172
  1057. package/src/vc-pagination/Pager.tsx +0 -69
  1058. package/src/vc-pagination/Pagination.tsx +0 -683
  1059. package/src/vc-pagination/index.ts +0 -2
  1060. package/src/vc-pagination/locale/ar_EG.ts +0 -15
  1061. package/src/vc-pagination/locale/az_AZ.ts +0 -15
  1062. package/src/vc-pagination/locale/bg_BG.ts +0 -15
  1063. package/src/vc-pagination/locale/bn_BD.ts +0 -15
  1064. package/src/vc-pagination/locale/by_BY.ts +0 -14
  1065. package/src/vc-pagination/locale/ca_ES.ts +0 -15
  1066. package/src/vc-pagination/locale/cs_CZ.ts +0 -15
  1067. package/src/vc-pagination/locale/da_DK.ts +0 -15
  1068. package/src/vc-pagination/locale/de_DE.ts +0 -15
  1069. package/src/vc-pagination/locale/el_GR.ts +0 -15
  1070. package/src/vc-pagination/locale/en_GB.ts +0 -15
  1071. package/src/vc-pagination/locale/en_US.ts +0 -15
  1072. package/src/vc-pagination/locale/es_ES.ts +0 -15
  1073. package/src/vc-pagination/locale/et_EE.ts +0 -15
  1074. package/src/vc-pagination/locale/fa_IR.ts +0 -15
  1075. package/src/vc-pagination/locale/fi_FI.ts +0 -15
  1076. package/src/vc-pagination/locale/fr_BE.ts +0 -15
  1077. package/src/vc-pagination/locale/fr_CA.ts +0 -15
  1078. package/src/vc-pagination/locale/fr_FR.ts +0 -15
  1079. package/src/vc-pagination/locale/ga_IE.ts +0 -15
  1080. package/src/vc-pagination/locale/gl_ES.ts +0 -15
  1081. package/src/vc-pagination/locale/he_IL.ts +0 -15
  1082. package/src/vc-pagination/locale/hi_IN.ts +0 -15
  1083. package/src/vc-pagination/locale/hr_HR.ts +0 -15
  1084. package/src/vc-pagination/locale/hu_HU.ts +0 -15
  1085. package/src/vc-pagination/locale/id_ID.ts +0 -15
  1086. package/src/vc-pagination/locale/is_IS.ts +0 -15
  1087. package/src/vc-pagination/locale/it_IT.ts +0 -15
  1088. package/src/vc-pagination/locale/ja_JP.ts +0 -15
  1089. package/src/vc-pagination/locale/ka_GE.ts +0 -14
  1090. package/src/vc-pagination/locale/kk_KZ.ts +0 -15
  1091. package/src/vc-pagination/locale/km_KH.ts +0 -15
  1092. package/src/vc-pagination/locale/kmr_IQ.ts +0 -15
  1093. package/src/vc-pagination/locale/kn_IN.ts +0 -15
  1094. package/src/vc-pagination/locale/ko_KR.ts +0 -15
  1095. package/src/vc-pagination/locale/lt_LT.ts +0 -15
  1096. package/src/vc-pagination/locale/lv_LV.ts +0 -15
  1097. package/src/vc-pagination/locale/mk_MK.ts +0 -15
  1098. package/src/vc-pagination/locale/ml_IN.ts +0 -15
  1099. package/src/vc-pagination/locale/mm_MM.ts +0 -15
  1100. package/src/vc-pagination/locale/mn_MN.ts +0 -15
  1101. package/src/vc-pagination/locale/ms_MY.ts +0 -15
  1102. package/src/vc-pagination/locale/nb_NO.ts +0 -14
  1103. package/src/vc-pagination/locale/nl_BE.ts +0 -15
  1104. package/src/vc-pagination/locale/nl_NL.ts +0 -15
  1105. package/src/vc-pagination/locale/pa_IN.ts +0 -15
  1106. package/src/vc-pagination/locale/pb_IN.ts +0 -15
  1107. package/src/vc-pagination/locale/pl_PL.ts +0 -15
  1108. package/src/vc-pagination/locale/pt_BR.ts +0 -15
  1109. package/src/vc-pagination/locale/pt_PT.ts +0 -15
  1110. package/src/vc-pagination/locale/ro_RO.ts +0 -15
  1111. package/src/vc-pagination/locale/ru_RU.ts +0 -15
  1112. package/src/vc-pagination/locale/sk_SK.ts +0 -15
  1113. package/src/vc-pagination/locale/sl_SI.ts +0 -15
  1114. package/src/vc-pagination/locale/sr_RS.ts +0 -14
  1115. package/src/vc-pagination/locale/sv_SE.ts +0 -15
  1116. package/src/vc-pagination/locale/ta_IN.ts +0 -15
  1117. package/src/vc-pagination/locale/th_TH.ts +0 -15
  1118. package/src/vc-pagination/locale/tr_TR.ts +0 -15
  1119. package/src/vc-pagination/locale/ug_CN.ts +0 -14
  1120. package/src/vc-pagination/locale/uk_UA.ts +0 -15
  1121. package/src/vc-pagination/locale/ur_PK.ts +0 -15
  1122. package/src/vc-pagination/locale/vi_VN.ts +0 -15
  1123. package/src/vc-pagination/locale/zh_CN.ts +0 -15
  1124. package/src/vc-pagination/locale/zh_TW.ts +0 -15
  1125. package/src/vc-picker/PanelContext.tsx +0 -39
  1126. package/src/vc-picker/Picker.tsx +0 -641
  1127. package/src/vc-picker/PickerPanel.tsx +0 -609
  1128. package/src/vc-picker/PickerTrigger.tsx +0 -104
  1129. package/src/vc-picker/PresetPanel.tsx +0 -44
  1130. package/src/vc-picker/RangeContext.tsx +0 -76
  1131. package/src/vc-picker/RangePicker.tsx +0 -1324
  1132. package/src/vc-picker/generate/dateFns.ts +0 -140
  1133. package/src/vc-picker/generate/dayjs.ts +0 -250
  1134. package/src/vc-picker/generate/index.ts +0 -52
  1135. package/src/vc-picker/generate/moment.ts +0 -159
  1136. package/src/vc-picker/hooks/useCellClassName.ts +0 -97
  1137. package/src/vc-picker/hooks/useHoverValue.ts +0 -47
  1138. package/src/vc-picker/hooks/useMergeProps.ts +0 -8
  1139. package/src/vc-picker/hooks/usePickerInput.ts +0 -177
  1140. package/src/vc-picker/hooks/usePresets.ts +0 -30
  1141. package/src/vc-picker/hooks/useRangeDisabled.ts +0 -115
  1142. package/src/vc-picker/hooks/useRangeViewDates.ts +0 -129
  1143. package/src/vc-picker/hooks/useTextValueMapping.ts +0 -37
  1144. package/src/vc-picker/hooks/useValueTexts.ts +0 -52
  1145. package/src/vc-picker/index.tsx +0 -12
  1146. package/src/vc-picker/interface.ts +0 -116
  1147. package/src/vc-picker/locale/ar_EG.ts +0 -32
  1148. package/src/vc-picker/locale/az_AZ.ts +0 -33
  1149. package/src/vc-picker/locale/bg_BG.ts +0 -31
  1150. package/src/vc-picker/locale/bn_BD.ts +0 -33
  1151. package/src/vc-picker/locale/by_BY.ts +0 -33
  1152. package/src/vc-picker/locale/ca_ES.ts +0 -32
  1153. package/src/vc-picker/locale/cs_CZ.ts +0 -32
  1154. package/src/vc-picker/locale/da_DK.ts +0 -32
  1155. package/src/vc-picker/locale/de_DE.ts +0 -32
  1156. package/src/vc-picker/locale/el_GR.ts +0 -32
  1157. package/src/vc-picker/locale/en_GB.ts +0 -32
  1158. package/src/vc-picker/locale/en_US.ts +0 -33
  1159. package/src/vc-picker/locale/es_ES.ts +0 -32
  1160. package/src/vc-picker/locale/es_MX.ts +0 -33
  1161. package/src/vc-picker/locale/et_EE.ts +0 -32
  1162. package/src/vc-picker/locale/fa_IR.ts +0 -32
  1163. package/src/vc-picker/locale/fi_FI.ts +0 -32
  1164. package/src/vc-picker/locale/fr_BE.ts +0 -32
  1165. package/src/vc-picker/locale/fr_CA.ts +0 -32
  1166. package/src/vc-picker/locale/fr_FR.ts +0 -32
  1167. package/src/vc-picker/locale/ga_IE.ts +0 -33
  1168. package/src/vc-picker/locale/gl_ES.ts +0 -32
  1169. package/src/vc-picker/locale/he_IL.ts +0 -33
  1170. package/src/vc-picker/locale/hi_IN.ts +0 -33
  1171. package/src/vc-picker/locale/hr_HR.ts +0 -33
  1172. package/src/vc-picker/locale/hu_HU.ts +0 -32
  1173. package/src/vc-picker/locale/id_ID.ts +0 -33
  1174. package/src/vc-picker/locale/is_IS.ts +0 -32
  1175. package/src/vc-picker/locale/it_IT.ts +0 -32
  1176. package/src/vc-picker/locale/ja_JP.ts +0 -32
  1177. package/src/vc-picker/locale/ka_GE.ts +0 -33
  1178. package/src/vc-picker/locale/kk_KZ.ts +0 -32
  1179. package/src/vc-picker/locale/km_KH.ts +0 -32
  1180. package/src/vc-picker/locale/kmr_IQ.ts +0 -32
  1181. package/src/vc-picker/locale/kn_IN.ts +0 -33
  1182. package/src/vc-picker/locale/ko_KR.ts +0 -32
  1183. package/src/vc-picker/locale/lt_LT.ts +0 -32
  1184. package/src/vc-picker/locale/lv_LV.ts +0 -32
  1185. package/src/vc-picker/locale/mk_MK.ts +0 -32
  1186. package/src/vc-picker/locale/ml_IN.ts +0 -33
  1187. package/src/vc-picker/locale/mm_MM.ts +0 -33
  1188. package/src/vc-picker/locale/mn_MN.ts +0 -33
  1189. package/src/vc-picker/locale/ms_MY.ts +0 -32
  1190. package/src/vc-picker/locale/nb_NO.ts +0 -33
  1191. package/src/vc-picker/locale/nl_BE.ts +0 -32
  1192. package/src/vc-picker/locale/nl_NL.ts +0 -32
  1193. package/src/vc-picker/locale/pl_PL.ts +0 -32
  1194. package/src/vc-picker/locale/pt_BR.ts +0 -34
  1195. package/src/vc-picker/locale/pt_PT.ts +0 -34
  1196. package/src/vc-picker/locale/ro_RO.ts +0 -33
  1197. package/src/vc-picker/locale/ru_RU.ts +0 -32
  1198. package/src/vc-picker/locale/sk_SK.ts +0 -32
  1199. package/src/vc-picker/locale/sl_SI.ts +0 -32
  1200. package/src/vc-picker/locale/sr_RS.ts +0 -32
  1201. package/src/vc-picker/locale/sv_SE.ts +0 -32
  1202. package/src/vc-picker/locale/ta_IN.ts +0 -33
  1203. package/src/vc-picker/locale/th_TH.ts +0 -32
  1204. package/src/vc-picker/locale/tr_TR.ts +0 -32
  1205. package/src/vc-picker/locale/ug_CN.ts +0 -31
  1206. package/src/vc-picker/locale/uk_UA.ts +0 -32
  1207. package/src/vc-picker/locale/ur_PK.ts +0 -33
  1208. package/src/vc-picker/locale/vi_VN.ts +0 -33
  1209. package/src/vc-picker/locale/zh_CN.ts +0 -32
  1210. package/src/vc-picker/locale/zh_TW.ts +0 -33
  1211. package/src/vc-picker/panels/DatePanel/DateBody.tsx +0 -119
  1212. package/src/vc-picker/panels/DatePanel/DateHeader.tsx +0 -106
  1213. package/src/vc-picker/panels/DatePanel/index.tsx +0 -117
  1214. package/src/vc-picker/panels/DatetimePanel/index.tsx +0 -167
  1215. package/src/vc-picker/panels/DecadePanel/DecadeBody.tsx +0 -68
  1216. package/src/vc-picker/panels/DecadePanel/DecadeHeader.tsx +0 -45
  1217. package/src/vc-picker/panels/DecadePanel/index.tsx +0 -80
  1218. package/src/vc-picker/panels/Header.tsx +0 -101
  1219. package/src/vc-picker/panels/MonthPanel/MonthBody.tsx +0 -89
  1220. package/src/vc-picker/panels/MonthPanel/MonthHeader.tsx +0 -50
  1221. package/src/vc-picker/panels/MonthPanel/index.tsx +0 -83
  1222. package/src/vc-picker/panels/PanelBody.tsx +0 -146
  1223. package/src/vc-picker/panels/QuarterPanel/QuarterBody.tsx +0 -71
  1224. package/src/vc-picker/panels/QuarterPanel/QuarterHeader.tsx +0 -49
  1225. package/src/vc-picker/panels/QuarterPanel/index.tsx +0 -76
  1226. package/src/vc-picker/panels/TimePanel/TimeBody.tsx +0 -315
  1227. package/src/vc-picker/panels/TimePanel/TimeHeader.tsx +0 -42
  1228. package/src/vc-picker/panels/TimePanel/TimeUnitColumn.tsx +0 -103
  1229. package/src/vc-picker/panels/TimePanel/index.tsx +0 -111
  1230. package/src/vc-picker/panels/WeekPanel/index.tsx +0 -44
  1231. package/src/vc-picker/panels/YearPanel/YearBody.tsx +0 -78
  1232. package/src/vc-picker/panels/YearPanel/YearHeader.tsx +0 -49
  1233. package/src/vc-picker/panels/YearPanel/index.tsx +0 -85
  1234. package/src/vc-picker/utils/dateUtil.ts +0 -320
  1235. package/src/vc-picker/utils/getExtraFooter.tsx +0 -13
  1236. package/src/vc-picker/utils/getRanges.tsx +0 -66
  1237. package/src/vc-picker/utils/miscUtil.ts +0 -55
  1238. package/src/vc-picker/utils/timeUtil.ts +0 -60
  1239. package/src/vc-picker/utils/uiUtil.ts +0 -277
  1240. package/src/vc-picker/utils/warnUtil.ts +0 -17
  1241. package/src/vc-progress/index.ts +0 -9
  1242. package/src/vc-progress/src/Circle.tsx +0 -178
  1243. package/src/vc-progress/src/Line.tsx +0 -114
  1244. package/src/vc-progress/src/common.ts +0 -44
  1245. package/src/vc-progress/src/index.ts +0 -12
  1246. package/src/vc-progress/src/types.ts +0 -30
  1247. package/src/vc-resize-observer/index.tsx +0 -141
  1248. package/src/vc-select/BaseSelect.tsx +0 -928
  1249. package/src/vc-select/OptGroup.tsx +0 -15
  1250. package/src/vc-select/Option.tsx +0 -18
  1251. package/src/vc-select/OptionList.tsx +0 -391
  1252. package/src/vc-select/Select.tsx +0 -658
  1253. package/src/vc-select/SelectContext.ts +0 -36
  1254. package/src/vc-select/SelectTrigger.tsx +0 -193
  1255. package/src/vc-select/Selector/Input.tsx +0 -172
  1256. package/src/vc-select/Selector/MultipleSelector.tsx +0 -302
  1257. package/src/vc-select/Selector/SingleSelector.tsx +0 -187
  1258. package/src/vc-select/Selector/index.tsx +0 -283
  1259. package/src/vc-select/Selector/interface.ts +0 -27
  1260. package/src/vc-select/TransBtn.tsx +0 -69
  1261. package/src/vc-select/hooks/useBaseProps.ts +0 -24
  1262. package/src/vc-select/hooks/useCache.ts +0 -56
  1263. package/src/vc-select/hooks/useDelayReset.ts +0 -32
  1264. package/src/vc-select/hooks/useFilterOptions.ts +0 -87
  1265. package/src/vc-select/hooks/useId.ts +0 -31
  1266. package/src/vc-select/hooks/useLock.ts +0 -29
  1267. package/src/vc-select/hooks/useOptions.ts +0 -59
  1268. package/src/vc-select/hooks/useSelectTriggerControl.ts +0 -32
  1269. package/src/vc-select/index.ts +0 -13
  1270. package/src/vc-select/interface.ts +0 -11
  1271. package/src/vc-select/utils/commonUtil.ts +0 -12
  1272. package/src/vc-select/utils/keyUtil.ts +0 -34
  1273. package/src/vc-select/utils/legacyUtil.ts +0 -62
  1274. package/src/vc-select/utils/platformUtil.ts +0 -4
  1275. package/src/vc-select/utils/valueUtil.ts +0 -130
  1276. package/src/vc-select/utils/warningPropsUtil.ts +0 -136
  1277. package/src/vc-slick/arrows.jsx +0 -119
  1278. package/src/vc-slick/default-props.js +0 -56
  1279. package/src/vc-slick/dots.jsx +0 -86
  1280. package/src/vc-slick/index.js +0 -4
  1281. package/src/vc-slick/initial-state.js +0 -27
  1282. package/src/vc-slick/inner-slider.jsx +0 -760
  1283. package/src/vc-slick/slider.jsx +0 -198
  1284. package/src/vc-slick/track.jsx +0 -190
  1285. package/src/vc-slick/utils/innerSliderUtils.js +0 -785
  1286. package/src/vc-slider/index.ts +0 -4
  1287. package/src/vc-slider/src/Handle.tsx +0 -148
  1288. package/src/vc-slider/src/Range.tsx +0 -527
  1289. package/src/vc-slider/src/Slider.tsx +0 -226
  1290. package/src/vc-slider/src/common/Marks.tsx +0 -75
  1291. package/src/vc-slider/src/common/Steps.tsx +0 -76
  1292. package/src/vc-slider/src/common/Track.tsx +0 -29
  1293. package/src/vc-slider/src/common/createSlider.tsx +0 -368
  1294. package/src/vc-slider/src/index.ts +0 -8
  1295. package/src/vc-slider/src/utils.ts +0 -134
  1296. package/src/vc-steps/Step.tsx +0 -201
  1297. package/src/vc-steps/Steps.tsx +0 -146
  1298. package/src/vc-steps/index.ts +0 -6
  1299. package/src/vc-steps/interface.ts +0 -16
  1300. package/src/vc-table/Body/BodyRow.tsx +0 -217
  1301. package/src/vc-table/Body/ExpandedRow.tsx +0 -68
  1302. package/src/vc-table/Body/MeasureCell.tsx +0 -35
  1303. package/src/vc-table/Body/index.tsx +0 -146
  1304. package/src/vc-table/Cell/index.tsx +0 -368
  1305. package/src/vc-table/ColGroup.tsx +0 -38
  1306. package/src/vc-table/FixedHolder/index.tsx +0 -191
  1307. package/src/vc-table/Footer/Cell.tsx +0 -53
  1308. package/src/vc-table/Footer/Row.tsx +0 -9
  1309. package/src/vc-table/Footer/Summary.tsx +0 -27
  1310. package/src/vc-table/Footer/index.tsx +0 -41
  1311. package/src/vc-table/Header/DragHandle.tsx +0 -160
  1312. package/src/vc-table/Header/Header.tsx +0 -128
  1313. package/src/vc-table/Header/HeaderRow.tsx +0 -112
  1314. package/src/vc-table/Panel/index.tsx +0 -7
  1315. package/src/vc-table/Table.tsx +0 -865
  1316. package/src/vc-table/constant.ts +0 -1
  1317. package/src/vc-table/context/BodyContext.tsx +0 -41
  1318. package/src/vc-table/context/ExpandedRowContext.tsx +0 -18
  1319. package/src/vc-table/context/HoverContext.tsx +0 -21
  1320. package/src/vc-table/context/ResizeContext.tsx +0 -18
  1321. package/src/vc-table/context/StickyContext.tsx +0 -14
  1322. package/src/vc-table/context/SummaryContext.tsx +0 -23
  1323. package/src/vc-table/context/TableContext.tsx +0 -34
  1324. package/src/vc-table/hooks/useColumns.tsx +0 -251
  1325. package/src/vc-table/hooks/useFlattenRecords.ts +0 -90
  1326. package/src/vc-table/hooks/useFrame.ts +0 -63
  1327. package/src/vc-table/hooks/useSticky.ts +0 -41
  1328. package/src/vc-table/hooks/useStickyOffsets.ts +0 -55
  1329. package/src/vc-table/index.ts +0 -11
  1330. package/src/vc-table/interface.ts +0 -257
  1331. package/src/vc-table/stickyScrollBar.tsx +0 -241
  1332. package/src/vc-table/sugar/Column.tsx +0 -14
  1333. package/src/vc-table/sugar/ColumnGroup.tsx +0 -15
  1334. package/src/vc-table/utils/expandUtil.tsx +0 -51
  1335. package/src/vc-table/utils/fixUtil.ts +0 -69
  1336. package/src/vc-table/utils/legacyUtil.ts +0 -59
  1337. package/src/vc-table/utils/valueUtil.tsx +0 -89
  1338. package/src/vc-tooltip/index.ts +0 -4
  1339. package/src/vc-tooltip/src/Content.tsx +0 -30
  1340. package/src/vc-tooltip/src/Tooltip.tsx +0 -137
  1341. package/src/vc-tooltip/src/placements.ts +0 -83
  1342. package/src/vc-tour/Mask.tsx +0 -132
  1343. package/src/vc-tour/Tour.tsx +0 -259
  1344. package/src/vc-tour/TourStep/DefaultPanel.tsx +0 -57
  1345. package/src/vc-tour/TourStep/index.tsx +0 -27
  1346. package/src/vc-tour/hooks/useTarget.ts +0 -101
  1347. package/src/vc-tour/index.ts +0 -7
  1348. package/src/vc-tour/interface.ts +0 -37
  1349. package/src/vc-tour/placements.tsx +0 -79
  1350. package/src/vc-tour/util.ts +0 -7
  1351. package/src/vc-tree/DropIndicator.tsx +0 -34
  1352. package/src/vc-tree/Indent.tsx +0 -31
  1353. package/src/vc-tree/MotionTreeNode.tsx +0 -125
  1354. package/src/vc-tree/NodeList.tsx +0 -304
  1355. package/src/vc-tree/Tree.tsx +0 -1242
  1356. package/src/vc-tree/TreeNode.tsx +0 -585
  1357. package/src/vc-tree/contextTypes.ts +0 -149
  1358. package/src/vc-tree/index.ts +0 -9
  1359. package/src/vc-tree/interface.tsx +0 -102
  1360. package/src/vc-tree/props.ts +0 -256
  1361. package/src/vc-tree/useMaxLevel.ts +0 -39
  1362. package/src/vc-tree/util.tsx +0 -352
  1363. package/src/vc-tree/utils/conductUtil.ts +0 -241
  1364. package/src/vc-tree/utils/diffUtil.ts +0 -45
  1365. package/src/vc-tree/utils/treeUtil.ts +0 -458
  1366. package/src/vc-tree-select/LegacyContext.tsx +0 -65
  1367. package/src/vc-tree-select/OptionList.tsx +0 -263
  1368. package/src/vc-tree-select/TreeNode.tsx +0 -15
  1369. package/src/vc-tree-select/TreeSelect.tsx +0 -765
  1370. package/src/vc-tree-select/TreeSelectContext.ts +0 -27
  1371. package/src/vc-tree-select/hooks/useCache.ts +0 -44
  1372. package/src/vc-tree-select/hooks/useCheckedKeys.ts +0 -39
  1373. package/src/vc-tree-select/hooks/useDataEntities.ts +0 -42
  1374. package/src/vc-tree-select/hooks/useFilterTreeData.ts +0 -64
  1375. package/src/vc-tree-select/hooks/useTreeData.ts +0 -75
  1376. package/src/vc-tree-select/index.tsx +0 -10
  1377. package/src/vc-tree-select/interface.ts +0 -101
  1378. package/src/vc-tree-select/utils/legacyUtil.tsx +0 -180
  1379. package/src/vc-tree-select/utils/strategyUtil.ts +0 -48
  1380. package/src/vc-tree-select/utils/valueUtil.ts +0 -50
  1381. package/src/vc-tree-select/utils/warningPropsUtil.ts +0 -35
  1382. package/src/vc-trigger/Popup/Mask.tsx +0 -38
  1383. package/src/vc-trigger/Popup/MobilePopupInner.tsx +0 -60
  1384. package/src/vc-trigger/Popup/PopupInner.tsx +0 -221
  1385. package/src/vc-trigger/Popup/index.tsx +0 -57
  1386. package/src/vc-trigger/Popup/interface.ts +0 -61
  1387. package/src/vc-trigger/Popup/useStretchStyle.ts +0 -42
  1388. package/src/vc-trigger/Popup/useVisibleStatus.ts +0 -98
  1389. package/src/vc-trigger/Trigger.tsx +0 -716
  1390. package/src/vc-trigger/context.ts +0 -38
  1391. package/src/vc-trigger/index.ts +0 -8
  1392. package/src/vc-trigger/interface.ts +0 -147
  1393. package/src/vc-trigger/utils/alignUtil.ts +0 -40
  1394. package/src/vc-trigger/utils/motionUtil.ts +0 -22
  1395. package/src/vc-upload/AjaxUploader.tsx +0 -320
  1396. package/src/vc-upload/Upload.tsx +0 -43
  1397. package/src/vc-upload/attr-accept.ts +0 -53
  1398. package/src/vc-upload/index.ts +0 -7
  1399. package/src/vc-upload/interface.tsx +0 -83
  1400. package/src/vc-upload/request.ts +0 -104
  1401. package/src/vc-upload/traverseFileTree.ts +0 -73
  1402. package/src/vc-upload/uid.ts +0 -6
  1403. package/src/vc-util/Children/toArray.ts +0 -26
  1404. package/src/vc-util/Dom/addEventListener.js +0 -22
  1405. package/src/vc-util/Dom/class.js +0 -28
  1406. package/src/vc-util/Dom/contains.ts +0 -12
  1407. package/src/vc-util/Dom/css.ts +0 -133
  1408. package/src/vc-util/Dom/dynamicCSS.ts +0 -153
  1409. package/src/vc-util/Dom/isVisible.ts +0 -25
  1410. package/src/vc-util/Dom/scrollLocker.ts +0 -130
  1411. package/src/vc-util/devWarning.ts +0 -7
  1412. package/src/vc-util/get.ts +0 -13
  1413. package/src/vc-util/isEqual.ts +0 -52
  1414. package/src/vc-util/isMobile.ts +0 -15
  1415. package/src/vc-util/set.ts +0 -51
  1416. package/src/vc-util/warning.ts +0 -40
  1417. package/src/vc-virtual-list/Filler.tsx +0 -72
  1418. package/src/vc-virtual-list/Item.tsx +0 -26
  1419. package/src/vc-virtual-list/List.tsx +0 -549
  1420. package/src/vc-virtual-list/ScrollBar.tsx +0 -266
  1421. package/src/vc-virtual-list/hooks/useFrameWheel.ts +0 -62
  1422. package/src/vc-virtual-list/hooks/useHeights.tsx +0 -67
  1423. package/src/vc-virtual-list/hooks/useMobileTouchMove.ts +0 -85
  1424. package/src/vc-virtual-list/hooks/useOriginScroll.ts +0 -33
  1425. package/src/vc-virtual-list/hooks/useScrollTo.tsx +0 -113
  1426. package/src/vc-virtual-list/index.ts +0 -4
  1427. package/src/vc-virtual-list/interface.ts +0 -11
  1428. package/src/vc-virtual-list/utils/algorithmUtil.js +0 -81
  1429. package/src/vc-virtual-list/utils/isFirefox.ts +0 -3
  1430. package/src/vc-virtual-list/utils/itemUtil.js +0 -147
  1431. package/src/watermark/index.en-US.md +0 -42
  1432. package/src/watermark/index.tsx +0 -260
  1433. package/src/watermark/index.zh-CN.md +0 -43
  1434. package/src/watermark/utils.ts +0 -43
@@ -1,969 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- /* eslint-disable @typescript-eslint/no-namespace */
3
- /**
4
- * @license QR Code generator library (TypeScript)
5
- * Copyright (c) Project Nayuki.
6
- * SPDX-License-Identifier: MIT
7
- */
8
-
9
- 'use strict'
10
-
11
- namespace qrcodegen {
12
- type bit = number
13
- type byte = number
14
- type int = number
15
-
16
- /*---- QR Code symbol class ----*/
17
-
18
- /*
19
- * A QR Code symbol, which is a type of two-dimension barcode.
20
- * Invented by Denso Wave and described in the ISO/IEC 18004 standard.
21
- * Instances of this class represent an immutable square grid of dark and light cells.
22
- * The class provides static factory functions to create a QR Code from text or binary data.
23
- * The class covers the QR Code Model 2 specification, supporting all versions (sizes)
24
- * from 1 to 40, all 4 error correction levels, and 4 character encoding modes.
25
- *
26
- * Ways to create a QR Code object:
27
- * - High level: Take the payload data and call QrCode.encodeText() or QrCode.encodeBinary().
28
- * - Mid level: Custom-make the list of segments and call QrCode.encodeSegments().
29
- * - Low level: Custom-make the array of data codeword bytes (including
30
- * segment headers and final padding, excluding error correction codewords),
31
- * supply the appropriate version number, and call the QrCode() constructor.
32
- * (Note that all ways require supplying the desired error correction level.)
33
- */
34
- export class QrCode {
35
- /*-- Static factory functions (high level) --*/
36
-
37
- // Returns a QR Code representing the given Unicode text string at the given error correction level.
38
- // As a conservative upper bound, this function is guaranteed to succeed for strings that have 738 or fewer
39
- // Unicode code points (not UTF-16 code units) if the low error correction level is used. The smallest possible
40
- // QR Code version is automatically chosen for the output. The ECC level of the result may be higher than the
41
- // ecl argument if it can be done without increasing the version.
42
- public static encodeText(text: string, ecl: QrCode.Ecc): QrCode {
43
- const segs: Array<QrSegment> = qrcodegen.QrSegment.makeSegments(text)
44
- return QrCode.encodeSegments(segs, ecl)
45
- }
46
-
47
- // Returns a QR Code representing the given binary data at the given error correction level.
48
- // This function always encodes using the binary segment mode, not any text mode. The maximum number of
49
- // bytes allowed is 2953. The smallest possible QR Code version is automatically chosen for the output.
50
- // The ECC level of the result may be higher than the ecl argument if it can be done without increasing the version.
51
- public static encodeBinary(data: Readonly<Array<byte>>, ecl: QrCode.Ecc): QrCode {
52
- const seg: QrSegment = qrcodegen.QrSegment.makeBytes(data)
53
- return QrCode.encodeSegments([seg], ecl)
54
- }
55
-
56
- /*-- Static factory functions (mid level) --*/
57
-
58
- // Returns a QR Code representing the given segments with the given encoding parameters.
59
- // The smallest possible QR Code version within the given range is automatically
60
- // chosen for the output. Iff boostEcl is true, then the ECC level of the result
61
- // may be higher than the ecl argument if it can be done without increasing the
62
- // version. The mask number is either between 0 to 7 (inclusive) to force that
63
- // mask, or -1 to automatically choose an appropriate mask (which may be slow).
64
- // This function allows the user to create a custom sequence of segments that switches
65
- // between modes (such as alphanumeric and byte) to encode text in less space.
66
- // This is a mid-level API; the high-level API is encodeText() and encodeBinary().
67
- public static encodeSegments(
68
- segs: Readonly<Array<QrSegment>>,
69
- ecl: QrCode.Ecc,
70
- minVersion: int = 1,
71
- maxVersion: int = 40,
72
- mask: int = -1,
73
- boostEcl = true,
74
- ): QrCode {
75
- if (
76
- !(
77
- QrCode.MIN_VERSION <= minVersion &&
78
- minVersion <= maxVersion &&
79
- maxVersion <= QrCode.MAX_VERSION
80
- ) ||
81
- mask < -1 ||
82
- mask > 7
83
- )
84
- throw new RangeError('Invalid value')
85
-
86
- // Find the minimal version number to use
87
- let version: int
88
- let dataUsedBits: int
89
- for (version = minVersion; ; version++) {
90
- const dataCapacityBits: int = QrCode.getNumDataCodewords(version, ecl) * 8 // Number of data bits available
91
- const usedBits: number = QrSegment.getTotalBits(segs, version)
92
- if (usedBits <= dataCapacityBits) {
93
- dataUsedBits = usedBits
94
- break // This version number is found to be suitable
95
- }
96
- if (version >= maxVersion)
97
- // All versions in the range could not fit the given data
98
- throw new RangeError('Data too long')
99
- }
100
-
101
- // Increase the error correction level while the data still fits in the current version number
102
- for (const newEcl of [QrCode.Ecc.MEDIUM, QrCode.Ecc.QUARTILE, QrCode.Ecc.HIGH]) {
103
- // From low to high
104
- if (boostEcl && dataUsedBits <= QrCode.getNumDataCodewords(version, newEcl) * 8)
105
- ecl = newEcl
106
- }
107
-
108
- // Concatenate all segments to create the data bit string
109
- const bb: Array<bit> = []
110
- for (const seg of segs) {
111
- appendBits(seg.mode.modeBits, 4, bb)
112
- appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb)
113
- for (const b of seg.getData()) bb.push(b)
114
- }
115
- assert(bb.length == dataUsedBits)
116
-
117
- // Add terminator and pad up to a byte if applicable
118
- const dataCapacityBits: int = QrCode.getNumDataCodewords(version, ecl) * 8
119
- assert(bb.length <= dataCapacityBits)
120
- appendBits(0, Math.min(4, dataCapacityBits - bb.length), bb)
121
- appendBits(0, (8 - (bb.length % 8)) % 8, bb)
122
- assert(bb.length % 8 == 0)
123
-
124
- // Pad with alternating bytes until data capacity is reached
125
- for (let padByte = 0xec; bb.length < dataCapacityBits; padByte ^= 0xec ^ 0x11)
126
- appendBits(padByte, 8, bb)
127
-
128
- // Pack bits into bytes in big endian
129
- const dataCodewords: Array<byte> = []
130
- while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0)
131
- bb.forEach((b: bit, i: int) => (dataCodewords[i >>> 3] |= b << (7 - (i & 7))))
132
-
133
- // Create the QR Code object
134
- return new QrCode(version, ecl, dataCodewords, mask)
135
- }
136
-
137
- /*-- Fields --*/
138
-
139
- // The width and height of this QR Code, measured in modules, between
140
- // 21 and 177 (inclusive). This is equal to version * 4 + 17.
141
- public readonly size: int
142
-
143
- // The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).
144
- // Even if a QR Code is created with automatic masking requested (mask = -1),
145
- // the resulting object still has a mask value between 0 and 7.
146
- public readonly mask: int
147
-
148
- // The modules of this QR Code (false = light, true = dark).
149
- // Immutable after constructor finishes. Accessed through getModule().
150
- private readonly modules: Array<Array<boolean>> = []
151
-
152
- // Indicates function modules that are not subjected to masking. Discarded when constructor finishes.
153
- private readonly isFunction: Array<Array<boolean>> = []
154
-
155
- /*-- Constructor (low level) and fields --*/
156
-
157
- // Creates a new QR Code with the given version number,
158
- // error correction level, data codeword bytes, and mask number.
159
- // This is a low-level API that most users should not use directly.
160
- // A mid-level API is the encodeSegments() function.
161
- public constructor(
162
- // The version number of this QR Code, which is between 1 and 40 (inclusive).
163
- // This determines the size of this barcode.
164
- public readonly version: int,
165
-
166
- // The error correction level used in this QR Code.
167
- public readonly errorCorrectionLevel: QrCode.Ecc,
168
-
169
- dataCodewords: Readonly<Array<byte>>,
170
-
171
- msk: int,
172
- ) {
173
- // Check scalar arguments
174
- if (version < QrCode.MIN_VERSION || version > QrCode.MAX_VERSION)
175
- throw new RangeError('Version value out of range')
176
- if (msk < -1 || msk > 7) throw new RangeError('Mask value out of range')
177
- this.size = version * 4 + 17
178
-
179
- // Initialize both grids to be size*size arrays of Boolean false
180
- const row: Array<boolean> = []
181
- for (let i = 0; i < this.size; i++) row.push(false)
182
- for (let i = 0; i < this.size; i++) {
183
- this.modules.push(row.slice()) // Initially all light
184
- this.isFunction.push(row.slice())
185
- }
186
-
187
- // Compute ECC, draw modules
188
- this.drawFunctionPatterns()
189
- const allCodewords: Array<byte> = this.addEccAndInterleave(dataCodewords)
190
- this.drawCodewords(allCodewords)
191
-
192
- // Do masking
193
- if (msk == -1) {
194
- // Automatically choose best mask
195
- let minPenalty: int = 1000000000
196
- for (let i = 0; i < 8; i++) {
197
- this.applyMask(i)
198
- this.drawFormatBits(i)
199
- const penalty: int = this.getPenaltyScore()
200
- if (penalty < minPenalty) {
201
- msk = i
202
- minPenalty = penalty
203
- }
204
- this.applyMask(i) // Undoes the mask due to XOR
205
- }
206
- }
207
- assert(msk >= 0 && msk <= 7)
208
- this.mask = msk
209
- this.applyMask(msk) // Apply the final choice of mask
210
- this.drawFormatBits(msk) // Overwrite old format bits
211
-
212
- this.isFunction = []
213
- }
214
-
215
- /*-- Accessor methods --*/
216
-
217
- // Returns the color of the module (pixel) at the given coordinates, which is false
218
- // for light or true for dark. The top left corner has the coordinates (x=0, y=0).
219
- // If the given coordinates are out of bounds, then false (light) is returned.
220
- public getModule(x: int, y: int): boolean {
221
- return x >= 0 && x < this.size && y >= 0 && y < this.size && this.modules[y][x]
222
- }
223
-
224
- // Modified to expose modules for easy access
225
- public getModules() {
226
- return this.modules
227
- }
228
-
229
- /*-- Private helper methods for constructor: Drawing function modules --*/
230
-
231
- // Reads this object's version field, and draws and marks all function modules.
232
- private drawFunctionPatterns(): void {
233
- // Draw horizontal and vertical timing patterns
234
- for (let i = 0; i < this.size; i++) {
235
- this.setFunctionModule(6, i, i % 2 == 0)
236
- this.setFunctionModule(i, 6, i % 2 == 0)
237
- }
238
-
239
- // Draw 3 finder patterns (all corners except bottom right; overwrites some timing modules)
240
- this.drawFinderPattern(3, 3)
241
- this.drawFinderPattern(this.size - 4, 3)
242
- this.drawFinderPattern(3, this.size - 4)
243
-
244
- // Draw numerous alignment patterns
245
- const alignPatPos: Array<int> = this.getAlignmentPatternPositions()
246
- const numAlign: int = alignPatPos.length
247
- for (let i = 0; i < numAlign; i++) {
248
- for (let j = 0; j < numAlign; j++) {
249
- // Don't draw on the three finder corners
250
- if (
251
- !((i == 0 && j == 0) || (i == 0 && j == numAlign - 1) || (i == numAlign - 1 && j == 0))
252
- )
253
- this.drawAlignmentPattern(alignPatPos[i], alignPatPos[j])
254
- }
255
- }
256
-
257
- // Draw configuration data
258
- this.drawFormatBits(0) // Dummy mask value; overwritten later in the constructor
259
- this.drawVersion()
260
- }
261
-
262
- // Draws two copies of the format bits (with its own error correction code)
263
- // based on the given mask and this object's error correction level field.
264
- private drawFormatBits(mask: int): void {
265
- // Calculate error correction code and pack bits
266
- const data: int = (this.errorCorrectionLevel.formatBits << 3) | mask // errCorrLvl is uint2, mask is uint3
267
- let rem: int = data
268
- for (let i = 0; i < 10; i++) rem = (rem << 1) ^ ((rem >>> 9) * 0x537)
269
- const bits = ((data << 10) | rem) ^ 0x5412 // uint15
270
- assert(bits >>> 15 == 0)
271
-
272
- // Draw first copy
273
- for (let i = 0; i <= 5; i++) this.setFunctionModule(8, i, getBit(bits, i))
274
- this.setFunctionModule(8, 7, getBit(bits, 6))
275
- this.setFunctionModule(8, 8, getBit(bits, 7))
276
- this.setFunctionModule(7, 8, getBit(bits, 8))
277
- for (let i = 9; i < 15; i++) this.setFunctionModule(14 - i, 8, getBit(bits, i))
278
-
279
- // Draw second copy
280
- for (let i = 0; i < 8; i++) this.setFunctionModule(this.size - 1 - i, 8, getBit(bits, i))
281
- for (let i = 8; i < 15; i++) this.setFunctionModule(8, this.size - 15 + i, getBit(bits, i))
282
- this.setFunctionModule(8, this.size - 8, true) // Always dark
283
- }
284
-
285
- // Draws two copies of the version bits (with its own error correction code),
286
- // based on this object's version field, iff 7 <= version <= 40.
287
- private drawVersion(): void {
288
- if (this.version < 7) return
289
-
290
- // Calculate error correction code and pack bits
291
- let rem: int = this.version // version is uint6, in the range [7, 40]
292
- for (let i = 0; i < 12; i++) rem = (rem << 1) ^ ((rem >>> 11) * 0x1f25)
293
- const bits: int = (this.version << 12) | rem // uint18
294
- assert(bits >>> 18 == 0)
295
-
296
- // Draw two copies
297
- for (let i = 0; i < 18; i++) {
298
- const color: boolean = getBit(bits, i)
299
- const a: int = this.size - 11 + (i % 3)
300
- const b: int = Math.floor(i / 3)
301
- this.setFunctionModule(a, b, color)
302
- this.setFunctionModule(b, a, color)
303
- }
304
- }
305
-
306
- // Draws a 9*9 finder pattern including the border separator,
307
- // with the center module at (x, y). Modules can be out of bounds.
308
- private drawFinderPattern(x: int, y: int): void {
309
- for (let dy = -4; dy <= 4; dy++) {
310
- for (let dx = -4; dx <= 4; dx++) {
311
- const dist: int = Math.max(Math.abs(dx), Math.abs(dy)) // Chebyshev/infinity norm
312
- const xx: int = x + dx
313
- const yy: int = y + dy
314
- if (xx >= 0 && xx < this.size && yy >= 0 && yy < this.size)
315
- this.setFunctionModule(xx, yy, dist != 2 && dist != 4)
316
- }
317
- }
318
- }
319
-
320
- // Draws a 5*5 alignment pattern, with the center module
321
- // at (x, y). All modules must be in bounds.
322
- private drawAlignmentPattern(x: int, y: int): void {
323
- for (let dy = -2; dy <= 2; dy++) {
324
- for (let dx = -2; dx <= 2; dx++)
325
- this.setFunctionModule(x + dx, y + dy, Math.max(Math.abs(dx), Math.abs(dy)) != 1)
326
- }
327
- }
328
-
329
- // Sets the color of a module and marks it as a function module.
330
- // Only used by the constructor. Coordinates must be in bounds.
331
- private setFunctionModule(x: int, y: int, isDark: boolean): void {
332
- this.modules[y][x] = isDark
333
- this.isFunction[y][x] = true
334
- }
335
-
336
- /*-- Private helper methods for constructor: Codewords and masking --*/
337
-
338
- // Returns a new byte string representing the given data with the appropriate error correction
339
- // codewords appended to it, based on this object's version and error correction level.
340
- private addEccAndInterleave(data: Readonly<Array<byte>>): Array<byte> {
341
- const ver: int = this.version
342
- const ecl: QrCode.Ecc = this.errorCorrectionLevel
343
- if (data.length != QrCode.getNumDataCodewords(ver, ecl))
344
- throw new RangeError('Invalid argument')
345
-
346
- // Calculate parameter numbers
347
- const numBlocks: int = QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver]
348
- const blockEccLen: int = QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver]
349
- const rawCodewords: int = Math.floor(QrCode.getNumRawDataModules(ver) / 8)
350
- const numShortBlocks: int = numBlocks - (rawCodewords % numBlocks)
351
- const shortBlockLen: int = Math.floor(rawCodewords / numBlocks)
352
-
353
- // Split data into blocks and append ECC to each block
354
- const blocks: Array<Array<byte>> = []
355
- const rsDiv: Array<byte> = QrCode.reedSolomonComputeDivisor(blockEccLen)
356
- for (let i = 0, k = 0; i < numBlocks; i++) {
357
- const dat: Array<byte> = data.slice(
358
- k,
359
- k + shortBlockLen - blockEccLen + (i < numShortBlocks ? 0 : 1),
360
- )
361
- k += dat.length
362
- const ecc: Array<byte> = QrCode.reedSolomonComputeRemainder(dat, rsDiv)
363
- if (i < numShortBlocks) dat.push(0)
364
- blocks.push(dat.concat(ecc))
365
- }
366
-
367
- // Interleave (not concatenate) the bytes from every block into a single sequence
368
- const result: Array<byte> = []
369
- for (let i = 0; i < blocks[0].length; i++) {
370
- blocks.forEach((block, j) => {
371
- // Skip the padding byte in short blocks
372
- if (i != shortBlockLen - blockEccLen || j >= numShortBlocks) result.push(block[i])
373
- })
374
- }
375
- assert(result.length == rawCodewords)
376
- return result
377
- }
378
-
379
- // Draws the given sequence of 8-bit codewords (data and error correction) onto the entire
380
- // data area of this QR Code. Function modules need to be marked off before this is called.
381
- private drawCodewords(data: Readonly<Array<byte>>): void {
382
- if (data.length != Math.floor(QrCode.getNumRawDataModules(this.version) / 8))
383
- throw new RangeError('Invalid argument')
384
- let i: int = 0 // Bit index into the data
385
- // Do the funny zigzag scan
386
- for (let right = this.size - 1; right >= 1; right -= 2) {
387
- // Index of right column in each column pair
388
- if (right == 6) right = 5
389
- for (let vert = 0; vert < this.size; vert++) {
390
- // Vertical counter
391
- for (let j = 0; j < 2; j++) {
392
- const x: int = right - j // Actual x coordinate
393
- const upward: boolean = ((right + 1) & 2) == 0
394
- const y: int = upward ? this.size - 1 - vert : vert // Actual y coordinate
395
- if (!this.isFunction[y][x] && i < data.length * 8) {
396
- this.modules[y][x] = getBit(data[i >>> 3], 7 - (i & 7))
397
- i++
398
- }
399
- // If this QR Code has any remainder bits (0 to 7), they were assigned as
400
- // 0/false/light by the constructor and are left unchanged by this method
401
- }
402
- }
403
- }
404
- assert(i == data.length * 8)
405
- }
406
-
407
- // XORs the codeword modules in this QR Code with the given mask pattern.
408
- // The function modules must be marked and the codeword bits must be drawn
409
- // before masking. Due to the arithmetic of XOR, calling applyMask() with
410
- // the same mask value a second time will undo the mask. A final well-formed
411
- // QR Code needs exactly one (not zero, two, etc.) mask applied.
412
- private applyMask(mask: int): void {
413
- if (mask < 0 || mask > 7) throw new RangeError('Mask value out of range')
414
- for (let y = 0; y < this.size; y++) {
415
- for (let x = 0; x < this.size; x++) {
416
- let invert: boolean
417
- switch (mask) {
418
- case 0:
419
- invert = (x + y) % 2 == 0
420
- break
421
- case 1:
422
- invert = y % 2 == 0
423
- break
424
- case 2:
425
- invert = x % 3 == 0
426
- break
427
- case 3:
428
- invert = (x + y) % 3 == 0
429
- break
430
- case 4:
431
- invert = (Math.floor(x / 3) + Math.floor(y / 2)) % 2 == 0
432
- break
433
- case 5:
434
- invert = ((x * y) % 2) + ((x * y) % 3) == 0
435
- break
436
- case 6:
437
- invert = (((x * y) % 2) + ((x * y) % 3)) % 2 == 0
438
- break
439
- case 7:
440
- invert = (((x + y) % 2) + ((x * y) % 3)) % 2 == 0
441
- break
442
- default:
443
- throw new Error('Unreachable')
444
- }
445
- if (!this.isFunction[y][x] && invert) this.modules[y][x] = !this.modules[y][x]
446
- }
447
- }
448
- }
449
-
450
- // Calculates and returns the penalty score based on state of this QR Code's current modules.
451
- // This is used by the automatic mask choice algorithm to find the mask pattern that yields the lowest score.
452
- private getPenaltyScore(): int {
453
- let result: int = 0
454
-
455
- // Adjacent modules in row having same color, and finder-like patterns
456
- for (let y = 0; y < this.size; y++) {
457
- let runColor = false
458
- let runX = 0
459
- const runHistory = [0, 0, 0, 0, 0, 0, 0]
460
- for (let x = 0; x < this.size; x++) {
461
- if (this.modules[y][x] == runColor) {
462
- runX++
463
- if (runX == 5) result += QrCode.PENALTY_N1
464
- else if (runX > 5) result++
465
- } else {
466
- this.finderPenaltyAddHistory(runX, runHistory)
467
- if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3
468
- runColor = this.modules[y][x]
469
- runX = 1
470
- }
471
- }
472
- result +=
473
- this.finderPenaltyTerminateAndCount(runColor, runX, runHistory) * QrCode.PENALTY_N3
474
- }
475
- // Adjacent modules in column having same color, and finder-like patterns
476
- for (let x = 0; x < this.size; x++) {
477
- let runColor = false
478
- let runY = 0
479
- const runHistory = [0, 0, 0, 0, 0, 0, 0]
480
- for (let y = 0; y < this.size; y++) {
481
- if (this.modules[y][x] == runColor) {
482
- runY++
483
- if (runY == 5) result += QrCode.PENALTY_N1
484
- else if (runY > 5) result++
485
- } else {
486
- this.finderPenaltyAddHistory(runY, runHistory)
487
- if (!runColor) result += this.finderPenaltyCountPatterns(runHistory) * QrCode.PENALTY_N3
488
- runColor = this.modules[y][x]
489
- runY = 1
490
- }
491
- }
492
- result +=
493
- this.finderPenaltyTerminateAndCount(runColor, runY, runHistory) * QrCode.PENALTY_N3
494
- }
495
-
496
- // 2*2 blocks of modules having same color
497
- for (let y = 0; y < this.size - 1; y++) {
498
- for (let x = 0; x < this.size - 1; x++) {
499
- const color: boolean = this.modules[y][x]
500
- if (
501
- color == this.modules[y][x + 1] &&
502
- color == this.modules[y + 1][x] &&
503
- color == this.modules[y + 1][x + 1]
504
- )
505
- result += QrCode.PENALTY_N2
506
- }
507
- }
508
-
509
- // Balance of dark and light modules
510
- let dark: int = 0
511
- for (const row of this.modules) dark = row.reduce((sum, color) => sum + (color ? 1 : 0), dark)
512
- const total: int = this.size * this.size // Note that size is odd, so dark/total != 1/2
513
- // Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%
514
- const k: int = Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1
515
- assert(k >= 0 && k <= 9)
516
- result += k * QrCode.PENALTY_N4
517
- assert(result >= 0 && result <= 2568888) // Non-tight upper bound based on default values of PENALTY_N1, ..., N4
518
- return result
519
- }
520
-
521
- /*-- Private helper functions --*/
522
-
523
- // Returns an ascending list of positions of alignment patterns for this version number.
524
- // Each position is in the range [0,177), and are used on both the x and y axes.
525
- // This could be implemented as lookup table of 40 variable-length lists of integers.
526
- private getAlignmentPatternPositions(): Array<int> {
527
- if (this.version == 1) return []
528
- else {
529
- const numAlign: int = Math.floor(this.version / 7) + 2
530
- const step: int =
531
- this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2
532
- const result: Array<int> = [6]
533
- for (let pos = this.size - 7; result.length < numAlign; pos -= step)
534
- result.splice(1, 0, pos)
535
- return result
536
- }
537
- }
538
-
539
- // Returns the number of data bits that can be stored in a QR Code of the given version number, after
540
- // all function modules are excluded. This includes remainder bits, so it might not be a multiple of 8.
541
- // The result is in the range [208, 29648]. This could be implemented as a 40-entry lookup table.
542
- private static getNumRawDataModules(ver: int): int {
543
- if (ver < QrCode.MIN_VERSION || ver > QrCode.MAX_VERSION)
544
- throw new RangeError('Version number out of range')
545
- let result: int = (16 * ver + 128) * ver + 64
546
- if (ver >= 2) {
547
- const numAlign: int = Math.floor(ver / 7) + 2
548
- result -= (25 * numAlign - 10) * numAlign - 55
549
- if (ver >= 7) result -= 36
550
- }
551
- assert(result >= 208 && result <= 29648)
552
- return result
553
- }
554
-
555
- // Returns the number of 8-bit data (i.e. not error correction) codewords contained in any
556
- // QR Code of the given version number and error correction level, with remainder bits discarded.
557
- // This stateless pure function could be implemented as a (40*4)-cell lookup table.
558
- private static getNumDataCodewords(ver: int, ecl: QrCode.Ecc): int {
559
- return (
560
- Math.floor(QrCode.getNumRawDataModules(ver) / 8) -
561
- QrCode.ECC_CODEWORDS_PER_BLOCK[ecl.ordinal][ver] *
562
- QrCode.NUM_ERROR_CORRECTION_BLOCKS[ecl.ordinal][ver]
563
- )
564
- }
565
-
566
- // Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
567
- // implemented as a lookup table over all possible parameter values, instead of as an algorithm.
568
- private static reedSolomonComputeDivisor(degree: int): Array<byte> {
569
- if (degree < 1 || degree > 255) throw new RangeError('Degree out of range')
570
- // Polynomial coefficients are stored from highest to lowest power, excluding the leading term which is always 1.
571
- // For example the polynomial x^3 + 255x^2 + 8x + 93 is stored as the uint8 array [255, 8, 93].
572
- const result: Array<byte> = []
573
- for (let i = 0; i < degree - 1; i++) result.push(0)
574
- result.push(1) // Start off with the monomial x^0
575
-
576
- // Compute the product polynomial (x - r^0) * (x - r^1) * (x - r^2) * ... * (x - r^{degree-1}),
577
- // and drop the highest monomial term which is always 1x^degree.
578
- // Note that r = 0x02, which is a generator element of this field GF(2^8/0x11D).
579
- let root = 1
580
- for (let i = 0; i < degree; i++) {
581
- // Multiply the current product by (x - r^i)
582
- for (let j = 0; j < result.length; j++) {
583
- result[j] = QrCode.reedSolomonMultiply(result[j], root)
584
- if (j + 1 < result.length) result[j] ^= result[j + 1]
585
- }
586
- root = QrCode.reedSolomonMultiply(root, 0x02)
587
- }
588
- return result
589
- }
590
-
591
- // Returns the Reed-Solomon error correction codeword for the given data and divisor polynomials.
592
- private static reedSolomonComputeRemainder(
593
- data: Readonly<Array<byte>>,
594
- divisor: Readonly<Array<byte>>,
595
- ): Array<byte> {
596
- const result: Array<byte> = divisor.map((_) => 0)
597
- for (const b of data) {
598
- // Polynomial division
599
- const factor: byte = b ^ (result.shift() as byte)
600
- result.push(0)
601
- divisor.forEach((coef, i) => (result[i] ^= QrCode.reedSolomonMultiply(coef, factor)))
602
- }
603
- return result
604
- }
605
-
606
- // Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result
607
- // are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.
608
- private static reedSolomonMultiply(x: byte, y: byte): byte {
609
- if (x >>> 8 != 0 || y >>> 8 != 0) throw new RangeError('Byte out of range')
610
- // Russian peasant multiplication
611
- let z: int = 0
612
- for (let i = 7; i >= 0; i--) {
613
- z = (z << 1) ^ ((z >>> 7) * 0x11d)
614
- z ^= ((y >>> i) & 1) * x
615
- }
616
- assert(z >>> 8 == 0)
617
- return z as byte
618
- }
619
-
620
- // Can only be called immediately after a light run is added, and
621
- // returns either 0, 1, or 2. A helper function for getPenaltyScore().
622
- private finderPenaltyCountPatterns(runHistory: Readonly<Array<int>>): int {
623
- const n: int = runHistory[1]
624
- assert(n <= this.size * 3)
625
- const core: boolean =
626
- n > 0 &&
627
- runHistory[2] == n &&
628
- runHistory[3] == n * 3 &&
629
- runHistory[4] == n &&
630
- runHistory[5] == n
631
- return (
632
- (core && runHistory[0] >= n * 4 && runHistory[6] >= n ? 1 : 0) +
633
- (core && runHistory[6] >= n * 4 && runHistory[0] >= n ? 1 : 0)
634
- )
635
- }
636
-
637
- // Must be called at the end of a line (row or column) of modules. A helper function for getPenaltyScore().
638
- private finderPenaltyTerminateAndCount(
639
- currentRunColor: boolean,
640
- currentRunLength: int,
641
- runHistory: Array<int>,
642
- ): int {
643
- if (currentRunColor) {
644
- // Terminate dark run
645
- this.finderPenaltyAddHistory(currentRunLength, runHistory)
646
- currentRunLength = 0
647
- }
648
- currentRunLength += this.size // Add light border to final run
649
- this.finderPenaltyAddHistory(currentRunLength, runHistory)
650
- return this.finderPenaltyCountPatterns(runHistory)
651
- }
652
-
653
- // Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().
654
- private finderPenaltyAddHistory(currentRunLength: int, runHistory: Array<int>): void {
655
- if (runHistory[0] == 0) currentRunLength += this.size // Add light border to initial run
656
- runHistory.pop()
657
- runHistory.unshift(currentRunLength)
658
- }
659
-
660
- /*-- Constants and tables --*/
661
-
662
- // The minimum version number supported in the QR Code Model 2 standard.
663
- public static readonly MIN_VERSION: int = 1
664
- // The maximum version number supported in the QR Code Model 2 standard.
665
- public static readonly MAX_VERSION: int = 40
666
-
667
- // For use in getPenaltyScore(), when evaluating which mask is best.
668
- private static readonly PENALTY_N1: int = 3
669
- private static readonly PENALTY_N2: int = 3
670
- private static readonly PENALTY_N3: int = 40
671
- private static readonly PENALTY_N4: int = 10
672
-
673
- private static readonly ECC_CODEWORDS_PER_BLOCK: Array<Array<int>> = [
674
- // Version: (note that index 0 is for padding, and is set to an illegal value)
675
- //0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
676
- [
677
- -1, 7, 10, 15, 20, 26, 18, 20, 24, 30, 18, 20, 24, 26, 30, 22, 24, 28, 30, 28, 28, 28, 28,
678
- 30, 30, 26, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
679
- ], // Low
680
- [
681
- -1, 10, 16, 26, 18, 24, 16, 18, 22, 22, 26, 30, 22, 22, 24, 24, 28, 28, 26, 26, 26, 26, 28,
682
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
683
- ], // Medium
684
- [
685
- -1, 13, 22, 18, 26, 18, 24, 18, 22, 20, 24, 28, 26, 24, 20, 30, 24, 28, 28, 26, 30, 28, 30,
686
- 30, 30, 30, 28, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
687
- ], // Quartile
688
- [
689
- -1, 17, 28, 22, 16, 22, 28, 26, 26, 24, 28, 24, 28, 22, 24, 24, 30, 28, 28, 26, 28, 30, 24,
690
- 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
691
- ], // High
692
- ]
693
-
694
- private static readonly NUM_ERROR_CORRECTION_BLOCKS: Array<Array<int>> = [
695
- // Version: (note that index 0 is for padding, and is set to an illegal value)
696
- //0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 Error correction level
697
- [
698
- -1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12, 12, 13,
699
- 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25,
700
- ], // Low
701
- [
702
- -1, 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20, 21,
703
- 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49,
704
- ], // Medium
705
- [
706
- -1, 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25, 27, 29,
707
- 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68,
708
- ], // Quartile
709
- [
710
- -1, 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30, 32,
711
- 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81,
712
- ], // High
713
- ]
714
- }
715
-
716
- // Appends the given number of low-order bits of the given value
717
- // to the given buffer. Requires 0 <= len <= 31 and 0 <= val < 2^len.
718
- function appendBits(val: int, len: int, bb: Array<bit>): void {
719
- if (len < 0 || len > 31 || val >>> len != 0) throw new RangeError('Value out of range')
720
- for (
721
- let i = len - 1;
722
- i >= 0;
723
- i-- // Append bit by bit
724
- )
725
- bb.push((val >>> i) & 1)
726
- }
727
-
728
- // Returns true iff the i'th bit of x is set to 1.
729
- function getBit(x: int, i: int): boolean {
730
- return ((x >>> i) & 1) != 0
731
- }
732
-
733
- // Throws an exception if the given condition is false.
734
- function assert(cond: boolean): void {
735
- if (!cond) throw new Error('Assertion error')
736
- }
737
-
738
- /*---- Data segment class ----*/
739
-
740
- /*
741
- * A segment of character/binary/control data in a QR Code symbol.
742
- * Instances of this class are immutable.
743
- * The mid-level way to create a segment is to take the payload data
744
- * and call a static factory function such as QrSegment.makeNumeric().
745
- * The low-level way to create a segment is to custom-make the bit buffer
746
- * and call the QrSegment() constructor with appropriate values.
747
- * This segment class imposes no length restrictions, but QR Codes have restrictions.
748
- * Even in the most favorable conditions, a QR Code can only hold 7089 characters of data.
749
- * Any segment longer than this is meaningless for the purpose of generating QR Codes.
750
- */
751
- export class QrSegment {
752
- /*-- Static factory functions (mid level) --*/
753
-
754
- // Returns a segment representing the given binary data encoded in
755
- // byte mode. All input byte arrays are acceptable. Any text string
756
- // can be converted to UTF-8 bytes and encoded as a byte mode segment.
757
- public static makeBytes(data: Readonly<Array<byte>>): QrSegment {
758
- const bb: Array<bit> = []
759
- for (const b of data) appendBits(b, 8, bb)
760
- return new QrSegment(QrSegment.Mode.BYTE, data.length, bb)
761
- }
762
-
763
- // Returns a segment representing the given string of decimal digits encoded in numeric mode.
764
- public static makeNumeric(digits: string): QrSegment {
765
- if (!QrSegment.isNumeric(digits))
766
- throw new RangeError('String contains non-numeric characters')
767
- const bb: Array<bit> = []
768
- for (let i = 0; i < digits.length; ) {
769
- // Consume up to 3 digits per iteration
770
- const n: int = Math.min(digits.length - i, 3)
771
- appendBits(Number.parseInt(digits.substring(i, i + n), 10), n * 3 + 1, bb)
772
- i += n
773
- }
774
- return new QrSegment(QrSegment.Mode.NUMERIC, digits.length, bb)
775
- }
776
-
777
- // Returns a segment representing the given text string encoded in alphanumeric mode.
778
- // The characters allowed are: 0 to 9, A to Z (uppercase only), space,
779
- // dollar, percent, asterisk, plus, hyphen, period, slash, colon.
780
- public static makeAlphanumeric(text: string): QrSegment {
781
- if (!QrSegment.isAlphanumeric(text))
782
- throw new RangeError('String contains unencodable characters in alphanumeric mode')
783
- const bb: Array<bit> = []
784
- let i: int
785
- for (i = 0; i + 2 <= text.length; i += 2) {
786
- // Process groups of 2
787
- let temp: int = QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)) * 45
788
- temp += QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i + 1))
789
- appendBits(temp, 11, bb)
790
- }
791
- if (i < text.length)
792
- // 1 character remaining
793
- appendBits(QrSegment.ALPHANUMERIC_CHARSET.indexOf(text.charAt(i)), 6, bb)
794
- return new QrSegment(QrSegment.Mode.ALPHANUMERIC, text.length, bb)
795
- }
796
-
797
- // Returns a new mutable list of zero or more segments to represent the given Unicode text string.
798
- // The result may use various segment modes and switch modes to optimize the length of the bit stream.
799
- public static makeSegments(text: string): Array<QrSegment> {
800
- // Select the most efficient segment encoding automatically
801
- if (text == '') return []
802
- else if (QrSegment.isNumeric(text)) return [QrSegment.makeNumeric(text)]
803
- else if (QrSegment.isAlphanumeric(text)) return [QrSegment.makeAlphanumeric(text)]
804
- else return [QrSegment.makeBytes(QrSegment.toUtf8ByteArray(text))]
805
- }
806
-
807
- // Returns a segment representing an Extended Channel Interpretation
808
- // (ECI) designator with the given assignment value.
809
- public static makeEci(assignVal: int): QrSegment {
810
- const bb: Array<bit> = []
811
- if (assignVal < 0) throw new RangeError('ECI assignment value out of range')
812
- else if (assignVal < 1 << 7) appendBits(assignVal, 8, bb)
813
- else if (assignVal < 1 << 14) {
814
- appendBits(0b10, 2, bb)
815
- appendBits(assignVal, 14, bb)
816
- } else if (assignVal < 1000000) {
817
- appendBits(0b110, 3, bb)
818
- appendBits(assignVal, 21, bb)
819
- } else throw new RangeError('ECI assignment value out of range')
820
- return new QrSegment(QrSegment.Mode.ECI, 0, bb)
821
- }
822
-
823
- // Tests whether the given string can be encoded as a segment in numeric mode.
824
- // A string is encodable iff each character is in the range 0 to 9.
825
- public static isNumeric(text: string): boolean {
826
- return QrSegment.NUMERIC_REGEX.test(text)
827
- }
828
-
829
- // Tests whether the given string can be encoded as a segment in alphanumeric mode.
830
- // A string is encodable iff each character is in the following set: 0 to 9, A to Z
831
- // (uppercase only), space, dollar, percent, asterisk, plus, hyphen, period, slash, colon.
832
- public static isAlphanumeric(text: string): boolean {
833
- return QrSegment.ALPHANUMERIC_REGEX.test(text)
834
- }
835
-
836
- /*-- Constructor (low level) and fields --*/
837
-
838
- // Creates a new QR Code segment with the given attributes and data.
839
- // The character count (numChars) must agree with the mode and the bit buffer length,
840
- // but the constraint isn't checked. The given bit buffer is cloned and stored.
841
- public constructor(
842
- // The mode indicator of this segment.
843
- public readonly mode: QrSegment.Mode,
844
-
845
- // The length of this segment's unencoded data. Measured in characters for
846
- // numeric/alphanumeric/kanji mode, bytes for byte mode, and 0 for ECI mode.
847
- // Always zero or positive. Not the same as the data's bit length.
848
- public readonly numChars: int,
849
-
850
- // The data bits of this segment. Accessed through getData().
851
- private readonly bitData: Array<bit>,
852
- ) {
853
- if (numChars < 0) throw new RangeError('Invalid argument')
854
- this.bitData = bitData.slice() // Make defensive copy
855
- }
856
-
857
- /*-- Methods --*/
858
-
859
- // Returns a new copy of the data bits of this segment.
860
- public getData(): Array<bit> {
861
- return this.bitData.slice() // Make defensive copy
862
- }
863
-
864
- // (Package-private) Calculates and returns the number of bits needed to encode the given segments at
865
- // the given version. The result is infinity if a segment has too many characters to fit its length field.
866
- public static getTotalBits(segs: Readonly<Array<QrSegment>>, version: int): number {
867
- let result = 0
868
- for (const seg of segs) {
869
- const ccbits: int = seg.mode.numCharCountBits(version)
870
- if (seg.numChars >= 1 << ccbits) return Infinity // The segment's length doesn't fit the field's bit width
871
- result += 4 + ccbits + seg.bitData.length
872
- }
873
- return result
874
- }
875
-
876
- // Returns a new array of bytes representing the given string encoded in UTF-8.
877
- private static toUtf8ByteArray(str: string): Array<byte> {
878
- str = encodeURI(str)
879
- const result: Array<byte> = []
880
- for (let i = 0; i < str.length; i++) {
881
- if (str.charAt(i) != '%') result.push(str.charCodeAt(i))
882
- else {
883
- result.push(Number.parseInt(str.substring(i + 1, i + 3), 16))
884
- i += 2
885
- }
886
- }
887
- return result
888
- }
889
-
890
- /*-- Constants --*/
891
-
892
- // Describes precisely all strings that are encodable in numeric mode.
893
- private static readonly NUMERIC_REGEX: RegExp = /^\d*$/
894
-
895
- // Describes precisely all strings that are encodable in alphanumeric mode.
896
- private static readonly ALPHANUMERIC_REGEX: RegExp = /^[A-Z0-9 $%*+./:-]*$/
897
-
898
- // The set of all legal characters in alphanumeric mode,
899
- // where each character value maps to the index in the string.
900
- private static readonly ALPHANUMERIC_CHARSET: string =
901
- '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'
902
- }
903
- }
904
-
905
- /*---- Public helper enumeration ----*/
906
-
907
- namespace qrcodegen.QrCode {
908
- type int = number
909
-
910
- /*
911
- * The error correction level in a QR Code symbol. Immutable.
912
- */
913
- export class Ecc {
914
- /*-- Constants --*/
915
-
916
- public static readonly LOW = new Ecc(0, 1) // The QR Code can tolerate about 7% erroneous codewords
917
- public static readonly MEDIUM = new Ecc(1, 0) // The QR Code can tolerate about 15% erroneous codewords
918
- public static readonly QUARTILE = new Ecc(2, 3) // The QR Code can tolerate about 25% erroneous codewords
919
- public static readonly HIGH = new Ecc(3, 2) // The QR Code can tolerate about 30% erroneous codewords
920
-
921
- /*-- Constructor and fields --*/
922
-
923
- private constructor(
924
- // In the range 0 to 3 (unsigned 2-bit integer).
925
- public readonly ordinal: int,
926
- // (Package-private) In the range 0 to 3 (unsigned 2-bit integer).
927
- public readonly formatBits: int,
928
- ) {}
929
- }
930
- }
931
-
932
- /*---- Public helper enumeration ----*/
933
-
934
- namespace qrcodegen.QrSegment {
935
- type int = number
936
-
937
- /*
938
- * Describes how a segment's data bits are interpreted. Immutable.
939
- */
940
- export class Mode {
941
- /*-- Constants --*/
942
-
943
- public static readonly NUMERIC = new Mode(0x1, [10, 12, 14])
944
- public static readonly ALPHANUMERIC = new Mode(0x2, [9, 11, 13])
945
- public static readonly BYTE = new Mode(0x4, [8, 16, 16])
946
- public static readonly KANJI = new Mode(0x8, [8, 10, 12])
947
- public static readonly ECI = new Mode(0x7, [0, 0, 0])
948
-
949
- /*-- Constructor and fields --*/
950
-
951
- private constructor(
952
- // The mode indicator bits, which is a uint4 value (range 0 to 15).
953
- public readonly modeBits: int,
954
- // Number of character count bits for three different version ranges.
955
- private readonly numBitsCharCount: [int, int, int],
956
- ) {}
957
-
958
- /*-- Method --*/
959
-
960
- // (Package-private) Returns the bit width of the character count field for a segment in
961
- // this mode in a QR Code at the given version number. The result is in the range [0, 16].
962
- public numCharCountBits(ver: int): int {
963
- return this.numBitsCharCount[Math.floor((ver + 7) / 17)]
964
- }
965
- }
966
- }
967
-
968
- // Modification to export for actual use
969
- export default qrcodegen