@team-monolith/cds 1.130.0-alpha.4 → 1.130.0-alpha.6

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 (391) hide show
  1. package/dist/CdsProvider.js +180 -180
  2. package/dist/components/AlertDialog/AlertDialogTitle.js +15 -15
  3. package/dist/components/Banner.js +28 -28
  4. package/dist/components/FileTypeAlertDialog.js +16 -16
  5. package/dist/components/Pagination.js +22 -22
  6. package/dist/i18n/i18n.js +14 -14
  7. package/dist/node_modules/.pnpm/html-parse-stringify@3.0.1/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +78 -0
  8. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/I18nextProvider.js +12 -0
  9. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/Trans.js +26 -0
  10. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/TransWithoutContext.js +174 -0
  11. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/context.js +20 -0
  12. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/defaults.js +24 -0
  13. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/i18nInstance.js +6 -0
  14. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/initReactI18next.js +11 -0
  15. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/unescape.js +25 -0
  16. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/useTranslation.js +69 -0
  17. package/dist/node_modules/.pnpm/react-i18next@15.7.3_i18next@25.5.2_typescript@5.5.4__react-dom@18.2.0_react@18.2.0__react@18.2.0_typescript@5.5.4/node_modules/react-i18next/dist/es/utils.js +35 -0
  18. package/dist/patterns/LexicalEditor/Plugins.js +66 -66
  19. package/dist/patterns/LexicalEditor/components/FileSelectInput.js +19 -19
  20. package/dist/patterns/LexicalEditor/components/InsertImageDialog/ImagePreview.js +6 -6
  21. package/dist/patterns/LexicalEditor/components/InsertImageDialog/InsertImageDialog.js +34 -34
  22. package/dist/patterns/LexicalEditor/components/UploadFileDialog/UploadFileDialog.js +14 -14
  23. package/dist/patterns/LexicalEditor/nodes/FileNode/CompactFileView.js +19 -19
  24. package/dist/patterns/LexicalEditor/nodes/FileNode/FileDownloadButton.js +17 -17
  25. package/dist/patterns/LexicalEditor/nodes/ImageNode/CompactImageView.js +22 -22
  26. package/dist/patterns/LexicalEditor/nodes/ImageNode/ImageComponent.js +61 -61
  27. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/InputComponent.js +25 -25
  28. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormPlaceholder.js +7 -7
  29. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/FormSolution.js +24 -23
  30. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/SettingForm.js +48 -47
  31. package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/TextTypeDropdown.js +11 -11
  32. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectBox/SelectBoxView.js +15 -15
  33. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SelectComponent.js +28 -28
  34. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/FormSelection.js +30 -30
  35. package/dist/patterns/LexicalEditor/nodes/ProblemSelectNode/SettingForm/SettingForm.js +35 -35
  36. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormIconAndLabel.js +21 -21
  37. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormIconAndLabel/FormLabel.js +15 -15
  38. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/FormQuestion.js +17 -17
  39. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/Evaluation/SettingForm/SettingForm.js +30 -30
  40. package/dist/patterns/LexicalEditor/nodes/SelfEvaluationNode/EvaluationComponent/EvaluationComponent.js +20 -20
  41. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/InputComponent.js +24 -24
  42. package/dist/patterns/LexicalEditor/nodes/SheetInputNode/SettingForm.js +28 -28
  43. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectBox/SelectBoxView.js +11 -11
  44. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SelectComponent.js +26 -26
  45. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormAllowMultipleAnswers.js +8 -8
  46. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/FormSelection.js +27 -27
  47. package/dist/patterns/LexicalEditor/nodes/SheetSelectNode/SelectComponent/SettingForm/SettingForm.js +33 -33
  48. package/dist/patterns/LexicalEditor/nodes/VideoNode/VideoComponent.js +21 -21
  49. package/dist/patterns/LexicalEditor/plugins/CompactToolbarPlugin/CompactToolbarPlugin.js +34 -34
  50. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/ComponentAdderPlugin.js +99 -99
  51. package/dist/patterns/LexicalEditor/plugins/ComponentAdderPlugin/useContextMenuOptions.js +50 -50
  52. package/dist/patterns/LexicalEditor/plugins/ComponentPickerMenuPlugin/ComponentPickerMenuPlugin.js +85 -85
  53. package/dist/patterns/LexicalEditor/plugins/DragDropPastePlugin/index.js +13 -13
  54. package/dist/patterns/LexicalEditor/plugins/FloatingLinkEditorPlugin/FloatingLinkEditor.js +48 -48
  55. package/dist/patterns/LexicalEditor/plugins/ImagesPlugin/useImageNodeTransform.js +16 -16
  56. package/dist/patterns/ToggleButtonGroup/ToggleButton.js +17 -17
  57. package/package.json +2 -5
  58. package/node_modules/@babel/runtime/LICENSE +0 -22
  59. package/node_modules/@babel/runtime/README.md +0 -19
  60. package/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -4
  61. package/node_modules/@babel/runtime/helpers/OverloadYield.js +0 -4
  62. package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -9
  63. package/node_modules/@babel/runtime/helpers/applyDecs.js +0 -236
  64. package/node_modules/@babel/runtime/helpers/applyDecs2203.js +0 -184
  65. package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +0 -191
  66. package/node_modules/@babel/runtime/helpers/applyDecs2301.js +0 -222
  67. package/node_modules/@babel/runtime/helpers/applyDecs2305.js +0 -133
  68. package/node_modules/@babel/runtime/helpers/applyDecs2311.js +0 -124
  69. package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -6
  70. package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -4
  71. package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -5
  72. package/node_modules/@babel/runtime/helpers/assertClassBrand.js +0 -5
  73. package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -5
  74. package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -24
  75. package/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -45
  76. package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -26
  77. package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -5
  78. package/node_modules/@babel/runtime/helpers/callSuper.js +0 -7
  79. package/node_modules/@babel/runtime/helpers/checkInRHS.js +0 -6
  80. package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -4
  81. package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -10
  82. package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -4
  83. package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -7
  84. package/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -4
  85. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -5
  86. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
  87. package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -5
  88. package/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -4
  89. package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -7
  90. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -7
  91. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +0 -5
  92. package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -5
  93. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -5
  94. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -5
  95. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -7
  96. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +0 -5
  97. package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +0 -5
  98. package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -5
  99. package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -5
  100. package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -4
  101. package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +0 -5
  102. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
  103. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -7
  104. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -7
  105. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -5
  106. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -4
  107. package/node_modules/@babel/runtime/helpers/construct.js +0 -10
  108. package/node_modules/@babel/runtime/helpers/createClass.js +0 -13
  109. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -50
  110. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -19
  111. package/node_modules/@babel/runtime/helpers/createSuper.js +0 -16
  112. package/node_modules/@babel/runtime/helpers/decorate.js +0 -250
  113. package/node_modules/@babel/runtime/helpers/defaults.js +0 -9
  114. package/node_modules/@babel/runtime/helpers/defineAccessor.js +0 -8
  115. package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -12
  116. package/node_modules/@babel/runtime/helpers/defineProperty.js +0 -10
  117. package/node_modules/@babel/runtime/helpers/dispose.js +0 -28
  118. package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -4
  119. package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +0 -4
  120. package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -9
  121. package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +0 -236
  122. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +0 -184
  123. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +0 -191
  124. package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +0 -222
  125. package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +0 -133
  126. package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +0 -124
  127. package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -6
  128. package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -4
  129. package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -5
  130. package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +0 -5
  131. package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -5
  132. package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -24
  133. package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -45
  134. package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -26
  135. package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -5
  136. package/node_modules/@babel/runtime/helpers/esm/callSuper.js +0 -7
  137. package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +0 -6
  138. package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -4
  139. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
  140. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -4
  141. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -7
  142. package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -4
  143. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
  144. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
  145. package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -5
  146. package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -4
  147. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
  148. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -7
  149. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +0 -5
  150. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
  151. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -5
  152. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -5
  153. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
  154. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +0 -5
  155. package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +0 -5
  156. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -5
  157. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
  158. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -4
  159. package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +0 -5
  160. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
  161. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
  162. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
  163. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
  164. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -4
  165. package/node_modules/@babel/runtime/helpers/esm/construct.js +0 -10
  166. package/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -13
  167. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -50
  168. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -19
  169. package/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -16
  170. package/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -250
  171. package/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -9
  172. package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +0 -8
  173. package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -12
  174. package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -10
  175. package/node_modules/@babel/runtime/helpers/esm/dispose.js +0 -28
  176. package/node_modules/@babel/runtime/helpers/esm/extends.js +0 -10
  177. package/node_modules/@babel/runtime/helpers/esm/get.js +0 -11
  178. package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
  179. package/node_modules/@babel/runtime/helpers/esm/identity.js +0 -4
  180. package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +0 -27
  181. package/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -14
  182. package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -5
  183. package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
  184. package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -4
  185. package/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -4
  186. package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -6
  187. package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -22
  188. package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -8
  189. package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -9
  190. package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -4
  191. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -28
  192. package/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -22
  193. package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
  194. package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -4
  195. package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -4
  196. package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -4
  197. package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +0 -4
  198. package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -4
  199. package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -14
  200. package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -23
  201. package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -13
  202. package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -10
  203. package/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
  204. package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -8
  205. package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -4
  206. package/node_modules/@babel/runtime/helpers/esm/regenerator.js +0 -89
  207. package/node_modules/@babel/runtime/helpers/esm/regeneratorAsync.js +0 -8
  208. package/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncGen.js +0 -6
  209. package/node_modules/@babel/runtime/helpers/esm/regeneratorAsyncIterator.js +0 -33
  210. package/node_modules/@babel/runtime/helpers/esm/regeneratorDefine.js +0 -22
  211. package/node_modules/@babel/runtime/helpers/esm/regeneratorKeys.js +0 -10
  212. package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +0 -77
  213. package/node_modules/@babel/runtime/helpers/esm/regeneratorValues.js +0 -19
  214. package/node_modules/@babel/runtime/helpers/esm/set.js +0 -22
  215. package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +0 -12
  216. package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -6
  217. package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
  218. package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -8
  219. package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -6
  220. package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +0 -9
  221. package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +0 -6
  222. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -8
  223. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -4
  224. package/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -4
  225. package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -6
  226. package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -2
  227. package/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -8
  228. package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -8
  229. package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -12
  230. package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -7
  231. package/node_modules/@babel/runtime/helpers/esm/toSetter.js +0 -10
  232. package/node_modules/@babel/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +0 -6
  233. package/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -10
  234. package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
  235. package/node_modules/@babel/runtime/helpers/esm/using.js +0 -12
  236. package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +0 -59
  237. package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -56
  238. package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -27
  239. package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -52
  240. package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -4
  241. package/node_modules/@babel/runtime/helpers/extends.js +0 -10
  242. package/node_modules/@babel/runtime/helpers/get.js +0 -11
  243. package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -6
  244. package/node_modules/@babel/runtime/helpers/identity.js +0 -4
  245. package/node_modules/@babel/runtime/helpers/importDeferProxy.js +0 -27
  246. package/node_modules/@babel/runtime/helpers/inherits.js +0 -14
  247. package/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -5
  248. package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -9
  249. package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -4
  250. package/node_modules/@babel/runtime/helpers/instanceof.js +0 -4
  251. package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -6
  252. package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -22
  253. package/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -8
  254. package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -9
  255. package/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -4
  256. package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -28
  257. package/node_modules/@babel/runtime/helpers/jsx.js +0 -22
  258. package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -9
  259. package/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -4
  260. package/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -4
  261. package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -4
  262. package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +0 -4
  263. package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -4
  264. package/node_modules/@babel/runtime/helpers/objectSpread.js +0 -14
  265. package/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -23
  266. package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -13
  267. package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -10
  268. package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -8
  269. package/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -4
  270. package/node_modules/@babel/runtime/helpers/regenerator.js +0 -89
  271. package/node_modules/@babel/runtime/helpers/regeneratorAsync.js +0 -8
  272. package/node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js +0 -6
  273. package/node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js +0 -33
  274. package/node_modules/@babel/runtime/helpers/regeneratorDefine.js +0 -22
  275. package/node_modules/@babel/runtime/helpers/regeneratorKeys.js +0 -10
  276. package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +0 -77
  277. package/node_modules/@babel/runtime/helpers/regeneratorValues.js +0 -19
  278. package/node_modules/@babel/runtime/helpers/set.js +0 -22
  279. package/node_modules/@babel/runtime/helpers/setFunctionName.js +0 -12
  280. package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -6
  281. package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -7
  282. package/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -8
  283. package/node_modules/@babel/runtime/helpers/superPropBase.js +0 -6
  284. package/node_modules/@babel/runtime/helpers/superPropGet.js +0 -9
  285. package/node_modules/@babel/runtime/helpers/superPropSet.js +0 -6
  286. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -8
  287. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -4
  288. package/node_modules/@babel/runtime/helpers/tdz.js +0 -4
  289. package/node_modules/@babel/runtime/helpers/temporalRef.js +0 -6
  290. package/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -2
  291. package/node_modules/@babel/runtime/helpers/toArray.js +0 -8
  292. package/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -8
  293. package/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -12
  294. package/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -7
  295. package/node_modules/@babel/runtime/helpers/toSetter.js +0 -10
  296. package/node_modules/@babel/runtime/helpers/tsRewriteRelativeImportExtensions.js +0 -6
  297. package/node_modules/@babel/runtime/helpers/typeof.js +0 -10
  298. package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -9
  299. package/node_modules/@babel/runtime/helpers/using.js +0 -12
  300. package/node_modules/@babel/runtime/helpers/usingCtx.js +0 -59
  301. package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -56
  302. package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -27
  303. package/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -52
  304. package/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -4
  305. package/node_modules/@babel/runtime/package.json +0 -1107
  306. package/node_modules/@babel/runtime/regenerator/index.js +0 -15
  307. package/node_modules/html-parse-stringify/README.md +0 -154
  308. package/node_modules/html-parse-stringify/dist/html-parse-stringify.js +0 -2
  309. package/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map +0 -1
  310. package/node_modules/html-parse-stringify/dist/html-parse-stringify.modern.js +0 -2
  311. package/node_modules/html-parse-stringify/dist/html-parse-stringify.modern.js.map +0 -1
  312. package/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +0 -2
  313. package/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +0 -1
  314. package/node_modules/html-parse-stringify/dist/html-parse-stringify.umd.js +0 -2
  315. package/node_modules/html-parse-stringify/dist/html-parse-stringify.umd.js.map +0 -1
  316. package/node_modules/html-parse-stringify/package.json +0 -50
  317. package/node_modules/react-i18next/.eslintrc.json +0 -74
  318. package/node_modules/react-i18next/.husky/pre-commit +0 -1
  319. package/node_modules/react-i18next/.prettierignore +0 -4
  320. package/node_modules/react-i18next/CHANGELOG.md +0 -1433
  321. package/node_modules/react-i18next/LICENSE +0 -22
  322. package/node_modules/react-i18next/README.md +0 -181
  323. package/node_modules/react-i18next/TransWithoutContext.d.mts +0 -1
  324. package/node_modules/react-i18next/TransWithoutContext.d.ts +0 -129
  325. package/node_modules/react-i18next/dist/amd/react-i18next.js +0 -867
  326. package/node_modules/react-i18next/dist/amd/react-i18next.min.js +0 -1
  327. package/node_modules/react-i18next/dist/commonjs/I18nextProvider.js +0 -21
  328. package/node_modules/react-i18next/dist/commonjs/Trans.js +0 -54
  329. package/node_modules/react-i18next/dist/commonjs/TransWithoutContext.js +0 -330
  330. package/node_modules/react-i18next/dist/commonjs/Translation.js +0 -19
  331. package/node_modules/react-i18next/dist/commonjs/context.js +0 -81
  332. package/node_modules/react-i18next/dist/commonjs/defaults.js +0 -26
  333. package/node_modules/react-i18next/dist/commonjs/i18nInstance.js +0 -13
  334. package/node_modules/react-i18next/dist/commonjs/index.js +0 -128
  335. package/node_modules/react-i18next/dist/commonjs/initReactI18next.js +0 -15
  336. package/node_modules/react-i18next/dist/commonjs/unescape.js +0 -32
  337. package/node_modules/react-i18next/dist/commonjs/useSSR.js +0 -34
  338. package/node_modules/react-i18next/dist/commonjs/useTranslation.js +0 -114
  339. package/node_modules/react-i18next/dist/commonjs/utils.js +0 -76
  340. package/node_modules/react-i18next/dist/commonjs/withSSR.js +0 -27
  341. package/node_modules/react-i18next/dist/commonjs/withTranslation.js +0 -39
  342. package/node_modules/react-i18next/dist/es/I18nextProvider.js +0 -15
  343. package/node_modules/react-i18next/dist/es/Trans.js +0 -43
  344. package/node_modules/react-i18next/dist/es/TransWithoutContext.js +0 -321
  345. package/node_modules/react-i18next/dist/es/Translation.js +0 -12
  346. package/node_modules/react-i18next/dist/es/context.js +0 -42
  347. package/node_modules/react-i18next/dist/es/defaults.js +0 -18
  348. package/node_modules/react-i18next/dist/es/i18nInstance.js +0 -5
  349. package/node_modules/react-i18next/dist/es/index.js +0 -18
  350. package/node_modules/react-i18next/dist/es/initReactI18next.js +0 -9
  351. package/node_modules/react-i18next/dist/es/package.json +0 -1
  352. package/node_modules/react-i18next/dist/es/unescape.js +0 -25
  353. package/node_modules/react-i18next/dist/es/useSSR.js +0 -27
  354. package/node_modules/react-i18next/dist/es/useTranslation.js +0 -107
  355. package/node_modules/react-i18next/dist/es/utils.js +0 -62
  356. package/node_modules/react-i18next/dist/es/withSSR.js +0 -20
  357. package/node_modules/react-i18next/dist/es/withTranslation.js +0 -32
  358. package/node_modules/react-i18next/dist/umd/react-i18next.js +0 -871
  359. package/node_modules/react-i18next/dist/umd/react-i18next.min.js +0 -1
  360. package/node_modules/react-i18next/helpers.d.ts +0 -3
  361. package/node_modules/react-i18next/icu.macro.d.mts +0 -1
  362. package/node_modules/react-i18next/icu.macro.d.ts +0 -103
  363. package/node_modules/react-i18next/icu.macro.js +0 -729
  364. package/node_modules/react-i18next/index.d.mts +0 -1
  365. package/node_modules/react-i18next/index.d.ts +0 -209
  366. package/node_modules/react-i18next/initReactI18next.d.mts +0 -1
  367. package/node_modules/react-i18next/initReactI18next.d.ts +0 -3
  368. package/node_modules/react-i18next/lint-staged.config.mjs +0 -4
  369. package/node_modules/react-i18next/package.json +0 -167
  370. package/node_modules/react-i18next/react-i18next.js +0 -871
  371. package/node_modules/react-i18next/react-i18next.min.js +0 -1
  372. package/node_modules/react-i18next/src/I18nextProvider.js +0 -7
  373. package/node_modules/react-i18next/src/Trans.js +0 -45
  374. package/node_modules/react-i18next/src/TransWithoutContext.js +0 -479
  375. package/node_modules/react-i18next/src/Translation.js +0 -14
  376. package/node_modules/react-i18next/src/context.js +0 -54
  377. package/node_modules/react-i18next/src/defaults.js +0 -20
  378. package/node_modules/react-i18next/src/i18nInstance.js +0 -7
  379. package/node_modules/react-i18next/src/index.js +0 -22
  380. package/node_modules/react-i18next/src/initReactI18next.js +0 -11
  381. package/node_modules/react-i18next/src/unescape.js +0 -31
  382. package/node_modules/react-i18next/src/useSSR.js +0 -33
  383. package/node_modules/react-i18next/src/useTranslation.js +0 -171
  384. package/node_modules/react-i18next/src/utils.js +0 -93
  385. package/node_modules/react-i18next/src/withSSR.js +0 -21
  386. package/node_modules/react-i18next/src/withTranslation.js +0 -35
  387. package/node_modules/react-i18next/vitest.workspace.typescript.mts +0 -52
  388. package/node_modules/void-elements/LICENSE +0 -22
  389. package/node_modules/void-elements/README.md +0 -27
  390. package/node_modules/void-elements/index.js +0 -21
  391. package/node_modules/void-elements/package.json +0 -34
@@ -1,22 +0,0 @@
1
- export { Trans } from './Trans.js';
2
- export { Trans as TransWithoutContext } from './TransWithoutContext.js';
3
- export { useTranslation } from './useTranslation.js';
4
- export { withTranslation } from './withTranslation.js';
5
- export { Translation } from './Translation.js';
6
- export { I18nextProvider } from './I18nextProvider.js';
7
- export { withSSR } from './withSSR.js';
8
- export { useSSR } from './useSSR.js';
9
- export { initReactI18next } from './initReactI18next.js';
10
- export { setDefaults, getDefaults } from './defaults.js';
11
- export { setI18n, getI18n } from './i18nInstance.js';
12
-
13
- export { I18nContext, composeInitialProps, getInitialProps } from './context.js';
14
-
15
- // dummy functions for icu.macro support
16
-
17
- export const date = () => '';
18
- export const time = () => '';
19
- export const number = () => '';
20
- export const select = () => '';
21
- export const plural = () => '';
22
- export const selectOrdinal = () => '';
@@ -1,11 +0,0 @@
1
- import { setDefaults } from './defaults.js';
2
- import { setI18n } from './i18nInstance.js';
3
-
4
- export const initReactI18next = {
5
- type: '3rdParty',
6
-
7
- init(instance) {
8
- setDefaults(instance.options.react);
9
- setI18n(instance);
10
- },
11
- };
@@ -1,31 +0,0 @@
1
- // unescape common html entities
2
-
3
- const matchHtmlEntity =
4
- /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
5
-
6
- const htmlEntities = {
7
- '&': '&',
8
- '&': '&',
9
- '&lt;': '<',
10
- '&#60;': '<',
11
- '&gt;': '>',
12
- '&#62;': '>',
13
- '&apos;': "'",
14
- '&#39;': "'",
15
- '&quot;': '"',
16
- '&#34;': '"',
17
- '&nbsp;': ' ',
18
- '&#160;': ' ',
19
- '&copy;': '©',
20
- '&#169;': '©',
21
- '&reg;': '®',
22
- '&#174;': '®',
23
- '&hellip;': '…',
24
- '&#8230;': '…',
25
- '&#x2F;': '/',
26
- '&#47;': '/',
27
- };
28
-
29
- const unescapeHtmlEntity = (m) => htmlEntities[m];
30
-
31
- export const unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
@@ -1,33 +0,0 @@
1
- import { useContext } from 'react';
2
- import { getI18n, I18nContext } from './context.js';
3
-
4
- export const useSSR = (initialI18nStore, initialLanguage, props = {}) => {
5
- const { i18n: i18nFromProps } = props;
6
- const { i18n: i18nFromContext } = useContext(I18nContext) || {};
7
- const i18n = i18nFromProps || i18nFromContext || getI18n();
8
-
9
- // opt out if is a cloned instance, eg. created by i18next-http-middleware on request
10
- // -> do not set initial stuff on server side
11
- if (i18n.options?.isClone) return;
12
-
13
- // nextjs / SSR: getting data from next.js or other ssr stack
14
- if (initialI18nStore && !i18n.initializedStoreOnce) {
15
- i18n.services.resourceStore.data = initialI18nStore;
16
-
17
- // add namespaces to the config - so a languageChange call loads all namespaces needed
18
- i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {
19
- Object.keys(lngResources).forEach((ns) => {
20
- if (mem.indexOf(ns) < 0) mem.push(ns);
21
- });
22
- return mem;
23
- }, i18n.options.ns);
24
-
25
- i18n.initializedStoreOnce = true;
26
- i18n.isInitialized = true;
27
- }
28
-
29
- if (initialLanguage && !i18n.initializedLanguageOnce) {
30
- i18n.changeLanguage(initialLanguage);
31
- i18n.initializedLanguageOnce = true;
32
- }
33
- };
@@ -1,171 +0,0 @@
1
- import { useState, useEffect, useContext, useRef, useCallback } from 'react';
2
- import { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';
3
- import {
4
- warnOnce,
5
- loadNamespaces,
6
- loadLanguages,
7
- hasLoadedNamespace,
8
- isString,
9
- isObject,
10
- } from './utils.js';
11
-
12
- const usePrevious = (value, ignore) => {
13
- const ref = useRef();
14
- useEffect(() => {
15
- ref.current = ignore ? ref.current : value;
16
- }, [value, ignore]);
17
- return ref.current;
18
- };
19
-
20
- const alwaysNewT = (i18n, language, namespace, keyPrefix) =>
21
- i18n.getFixedT(language, namespace, keyPrefix);
22
-
23
- const useMemoizedT = (i18n, language, namespace, keyPrefix) =>
24
- useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [
25
- i18n,
26
- language,
27
- namespace,
28
- keyPrefix,
29
- ]);
30
-
31
- export const useTranslation = (ns, props = {}) => {
32
- // assert we have the needed i18nInstance
33
- const { i18n: i18nFromProps } = props;
34
- const { i18n: i18nFromContext, defaultNS: defaultNSFromContext } = useContext(I18nContext) || {};
35
- const i18n = i18nFromProps || i18nFromContext || getI18n();
36
- if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
37
- if (!i18n) {
38
- warnOnce(
39
- i18n,
40
- 'NO_I18NEXT_INSTANCE',
41
- 'useTranslation: You will need to pass in an i18next instance by using initReactI18next',
42
- );
43
- const notReadyT = (k, optsOrDefaultValue) => {
44
- if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
45
- if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue))
46
- return optsOrDefaultValue.defaultValue;
47
- return Array.isArray(k) ? k[k.length - 1] : k;
48
- };
49
- const retNotReady = [notReadyT, {}, false];
50
- retNotReady.t = notReadyT;
51
- retNotReady.i18n = {};
52
- retNotReady.ready = false;
53
- return retNotReady;
54
- }
55
-
56
- if (i18n.options.react?.wait)
57
- warnOnce(
58
- i18n,
59
- 'DEPRECATED_OPTION',
60
- 'useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.',
61
- );
62
-
63
- const i18nOptions = { ...getDefaults(), ...i18n.options.react, ...props };
64
- const { useSuspense, keyPrefix } = i18nOptions;
65
-
66
- // prepare having a namespace
67
- let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
68
- namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];
69
-
70
- // report namespaces as used
71
- i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
72
-
73
- // are we ready? yes if all namespaces in first language are loaded already (either with data or empty object on failed load)
74
- const ready =
75
- (i18n.isInitialized || i18n.initializedStoreOnce) &&
76
- namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
77
-
78
- // binding t function to namespace (acts also as rerender trigger *when* args have changed)
79
- const memoGetT = useMemoizedT(
80
- i18n,
81
- props.lng || null,
82
- i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0],
83
- keyPrefix,
84
- );
85
- // using useState with a function expects an initializer, not the function itself:
86
- const getT = () => memoGetT;
87
- const getNewT = () =>
88
- alwaysNewT(
89
- i18n,
90
- props.lng || null,
91
- i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0],
92
- keyPrefix,
93
- );
94
-
95
- const [t, setT] = useState(getT);
96
-
97
- let joinedNS = namespaces.join();
98
- if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
99
- const previousJoinedNS = usePrevious(joinedNS);
100
-
101
- const isMounted = useRef(true);
102
- useEffect(() => {
103
- const { bindI18n, bindI18nStore } = i18nOptions;
104
- isMounted.current = true;
105
-
106
- // if not ready and not using suspense load the namespaces
107
- // in side effect and do not call resetT if unmounted
108
- if (!ready && !useSuspense) {
109
- if (props.lng) {
110
- loadLanguages(i18n, props.lng, namespaces, () => {
111
- if (isMounted.current) setT(getNewT);
112
- });
113
- } else {
114
- loadNamespaces(i18n, namespaces, () => {
115
- if (isMounted.current) setT(getNewT);
116
- });
117
- }
118
- }
119
-
120
- if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
121
- setT(getNewT);
122
- }
123
-
124
- const boundReset = () => {
125
- if (isMounted.current) setT(getNewT);
126
- };
127
-
128
- // bind events to trigger change, like languageChanged
129
- if (bindI18n) i18n?.on(bindI18n, boundReset);
130
- if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
131
-
132
- // unbinding on unmount
133
- return () => {
134
- isMounted.current = false;
135
- if (i18n && bindI18n) bindI18n?.split(' ').forEach((e) => i18n.off(e, boundReset));
136
- if (bindI18nStore && i18n)
137
- bindI18nStore.split(' ').forEach((e) => i18n.store.off(e, boundReset));
138
- };
139
- }, [i18n, joinedNS]); // re-run effect whenever list of namespaces changes
140
-
141
- // t is correctly initialized by useState hook. We only need to update it after i18n
142
- // instance was replaced (for example in the provider).
143
- useEffect(() => {
144
- if (isMounted.current && ready) {
145
- // not getNewT: depend on dependency list of the useCallback call within
146
- // useMemoizedT to only provide a newly-bound t *iff* i18n instance was
147
- // replaced; see bug 1691 https://github.com/i18next/react-i18next/issues/1691
148
- setT(getT);
149
- }
150
- }, [i18n, keyPrefix, ready]); // re-run when i18n instance or keyPrefix were replaced
151
-
152
- const ret = [t, i18n, ready];
153
- ret.t = t;
154
- ret.i18n = i18n;
155
- ret.ready = ready;
156
-
157
- // return hook stuff if ready
158
- if (ready) return ret;
159
-
160
- // not yet loaded namespaces -> load them -> and return if useSuspense option set false
161
- if (!ready && !useSuspense) return ret;
162
-
163
- // not yet loaded namespaces -> load them -> and trigger suspense
164
- throw new Promise((resolve) => {
165
- if (props.lng) {
166
- loadLanguages(i18n, props.lng, namespaces, () => resolve());
167
- } else {
168
- loadNamespaces(i18n, namespaces, () => resolve());
169
- }
170
- });
171
- };
@@ -1,93 +0,0 @@
1
- /** @type {(i18n:any,code:import('../TransWithoutContext').ErrorCode,msg?:string, rest?:{[key:string]: any})=>void} */
2
- export const warn = (i18n, code, msg, rest) => {
3
- const args = [msg, { code, ...(rest || {}) }];
4
- if (i18n?.services?.logger?.forward) {
5
- return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);
6
- }
7
- if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
8
- if (i18n?.services?.logger?.warn) {
9
- i18n.services.logger.warn(...args);
10
- } else if (console?.warn) {
11
- console.warn(...args);
12
- }
13
- };
14
- const alreadyWarned = {};
15
- /** @type {typeof warn} */
16
- export const warnOnce = (i18n, code, msg, rest) => {
17
- if (isString(msg) && alreadyWarned[msg]) return;
18
- if (isString(msg)) alreadyWarned[msg] = new Date();
19
- warn(i18n, code, msg, rest);
20
- };
21
-
22
- // not needed right now
23
- //
24
- // export const deprecated = (i18n, ...args) => {
25
- // if (process && process.env && (!process.env.NODE_ENV || process.env.NODE_ENV === 'development')) {
26
- // if (isString(args[0])) args[0] = `deprecation warning -> ${args[0]}`;
27
- // warnOnce(i18n, ...args);
28
- // }
29
- // }
30
-
31
- const loadedClb = (i18n, cb) => () => {
32
- // delay ready if not yet initialized i18n instance
33
- if (i18n.isInitialized) {
34
- cb();
35
- } else {
36
- const initialized = () => {
37
- // due to emitter removing issue in i18next we need to delay remove
38
- setTimeout(() => {
39
- i18n.off('initialized', initialized);
40
- }, 0);
41
- cb();
42
- };
43
- i18n.on('initialized', initialized);
44
- }
45
- };
46
-
47
- export const loadNamespaces = (i18n, ns, cb) => {
48
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
49
- };
50
-
51
- // should work with I18NEXT >= v22.5.0
52
- export const loadLanguages = (i18n, lng, ns, cb) => {
53
- // eslint-disable-next-line no-param-reassign
54
- if (isString(ns)) ns = [ns];
55
- if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1)
56
- return loadNamespaces(i18n, ns, cb);
57
- ns.forEach((n) => {
58
- if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
59
- });
60
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
61
- };
62
-
63
- export const hasLoadedNamespace = (ns, i18n, options = {}) => {
64
- if (!i18n.languages || !i18n.languages.length) {
65
- warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {
66
- languages: i18n.languages,
67
- });
68
- return true;
69
- }
70
-
71
- return i18n.hasLoadedNamespace(ns, {
72
- lng: options.lng,
73
- precheck: (i18nInstance, loadNotPending) => {
74
- if (
75
- options.bindI18n &&
76
- options.bindI18n.indexOf('languageChanging') > -1 &&
77
- i18nInstance.services.backendConnector.backend &&
78
- i18nInstance.isLanguageChangingTo &&
79
- !loadNotPending(i18nInstance.isLanguageChangingTo, ns)
80
- )
81
- return false;
82
- },
83
- });
84
- };
85
-
86
- export const getDisplayName = (Component) =>
87
- Component.displayName ||
88
- Component.name ||
89
- (isString(Component) && Component.length > 0 ? Component : 'Unknown');
90
-
91
- export const isString = (obj) => typeof obj === 'string';
92
-
93
- export const isObject = (obj) => typeof obj === 'object' && obj !== null;
@@ -1,21 +0,0 @@
1
- import { createElement } from 'react';
2
- import { useSSR } from './useSSR.js';
3
- import { composeInitialProps } from './context.js';
4
- import { getDisplayName } from './utils.js';
5
-
6
- export const withSSR = () =>
7
- function Extend(WrappedComponent) {
8
- function I18nextWithSSR({ initialI18nStore, initialLanguage, ...rest }) {
9
- useSSR(initialI18nStore, initialLanguage);
10
-
11
- return createElement(WrappedComponent, {
12
- ...rest,
13
- });
14
- }
15
-
16
- I18nextWithSSR.getInitialProps = composeInitialProps(WrappedComponent);
17
- I18nextWithSSR.displayName = `withI18nextSSR(${getDisplayName(WrappedComponent)})`;
18
- I18nextWithSSR.WrappedComponent = WrappedComponent;
19
-
20
- return I18nextWithSSR;
21
- };
@@ -1,35 +0,0 @@
1
- import { createElement, forwardRef as forwardRefReact } from 'react';
2
- import { useTranslation } from './useTranslation.js';
3
- import { getDisplayName } from './utils.js';
4
-
5
- export const withTranslation = (ns, options = {}) =>
6
- function Extend(WrappedComponent) {
7
- function I18nextWithTranslation({ forwardedRef, ...rest }) {
8
- const [t, i18n, ready] = useTranslation(ns, { ...rest, keyPrefix: options.keyPrefix });
9
-
10
- const passDownProps = {
11
- ...rest,
12
- t,
13
- i18n,
14
- tReady: ready,
15
- };
16
- if (options.withRef && forwardedRef) {
17
- passDownProps.ref = forwardedRef;
18
- } else if (!options.withRef && forwardedRef) {
19
- passDownProps.forwardedRef = forwardedRef;
20
- }
21
- return createElement(WrappedComponent, passDownProps);
22
- }
23
-
24
- I18nextWithTranslation.displayName = `withI18nextTranslation(${getDisplayName(
25
- WrappedComponent,
26
- )})`;
27
-
28
- I18nextWithTranslation.WrappedComponent = WrappedComponent;
29
-
30
- const forwardRef = (props, ref) =>
31
- // eslint-disable-next-line prefer-object-spread
32
- createElement(I18nextWithTranslation, Object.assign({}, props, { forwardedRef: ref }));
33
-
34
- return options.withRef ? forwardRefReact(forwardRef) : I18nextWithTranslation;
35
- };
@@ -1,52 +0,0 @@
1
- import { readdirSync } from 'node:fs';
2
- import { defineWorkspace } from 'vitest/config';
3
- import type { UserProjectConfigExport } from 'vitest/config';
4
-
5
- export default defineWorkspace(
6
- /**
7
- * If you need to test multiple typescript configurations (like misc) simply create a file named tsconfig.{customName}.json
8
- * and this script will automatically create a new workspace named with the dirName followed by `customName`
9
- */
10
- readdirSync('./test/typescript', { withFileTypes: true })
11
- .filter((dir) => dir.isDirectory())
12
- .reduce<UserProjectConfigExport[]>((workspaces, dir) => {
13
- const dirPath = `test/typescript/${dir.name}` as const;
14
-
15
- const tsConfigFiles = readdirSync(dirPath).filter(
16
- // Do not include temporary vitest tsconfig files
17
- (it) => it.startsWith('tsconfig.') && it.endsWith('.json') && !it.includes('vitest-temp'),
18
- );
19
-
20
- tsConfigFiles.forEach((tsConfigFileName) => {
21
- const workspaceName =
22
- tsConfigFileName === 'tsconfig.json'
23
- ? `typescript-${dir.name}`
24
- : `${dir.name}-${tsConfigFileName.split('.')[1]}`;
25
-
26
- workspaces.push({
27
- test: {
28
- dir: `./${dirPath}`,
29
- name: workspaceName,
30
- alias: {
31
- /**
32
- * From `vitest` >= 2 imports are resolved even if we are running only typecheck tests.
33
- * This will result in:
34
- * ```text
35
- * Error: Failed to resolve entry for package "react-i18next". The package may have incorrect main/module/exports specified in its package.json.
36
- * ```
37
- * To avoid a useless build process before running these tests an empty alias to `react-i18next` is added.
38
- */
39
- 'react-i18next': '',
40
- },
41
- typecheck: {
42
- enabled: true,
43
- include: [`**/${dirPath}/*.test.{ts,tsx}`],
44
- tsconfig: `./${dirPath}/${tsConfigFileName}`,
45
- },
46
- },
47
- });
48
- });
49
-
50
- return workspaces;
51
- }, []),
52
- );
@@ -1,22 +0,0 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2014 hemanth
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- 'Software'), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,27 +0,0 @@
1
- void-elements
2
- ==============
3
-
4
- ### Object of "void elements" defined by the HTML specification
5
-
6
- Exports an `Object` of "void element" node names as defined by the HTML spec.
7
-
8
- The list is programatically generated from the [latest W3C HTML draft](http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements).
9
-
10
- [![Build Status](https://img.shields.io/travis/pugjs/void-elements/master.svg?style=flat)](https://travis-ci.org/pugjs/void-elements)
11
- [![Developing Dependency Status](https://img.shields.io/david/dev/pugjs/void-elements.svg?style=flat)](https://david-dm.org/pugjs/void-elements#info=devDependencies)
12
- [![NPM version](https://img.shields.io/npm/v/void-elements.svg?style=flat)](https://www.npmjs.org/package/void-elements)
13
-
14
- Usage
15
- -----
16
-
17
- ```js
18
- var voidElements = require('void-elements');
19
-
20
- assert(!voidElements['span'], '<span> is not a void element');
21
- assert(voidElements['img'], '<img> is a void element');
22
- ```
23
-
24
- License
25
- -------
26
-
27
- MIT
@@ -1,21 +0,0 @@
1
- /**
2
- * This file automatically generated from `pre-publish.js`.
3
- * Do not manually edit.
4
- */
5
-
6
- module.exports = {
7
- "area": true,
8
- "base": true,
9
- "br": true,
10
- "col": true,
11
- "embed": true,
12
- "hr": true,
13
- "img": true,
14
- "input": true,
15
- "link": true,
16
- "meta": true,
17
- "param": true,
18
- "source": true,
19
- "track": true,
20
- "wbr": true
21
- };
@@ -1,34 +0,0 @@
1
- {
2
- "name": "void-elements",
3
- "version": "3.1.0",
4
- "description": "Array of \"void elements\" defined by the HTML specification.",
5
- "main": "index.js",
6
- "scripts": {
7
- "pretest": "node build.js > test/latest.js",
8
- "test": "node test",
9
- "update": "node build.js > index.js"
10
- },
11
- "keywords": [
12
- "html",
13
- "void",
14
- "elements"
15
- ],
16
- "files": [
17
- "index.js"
18
- ],
19
- "repository": "pugjs/void-elements",
20
- "author": "hemanth.hm",
21
- "engines": {
22
- "node": ">=0.10.0"
23
- },
24
- "license": "MIT",
25
- "bugs": {
26
- "url": "https://github.com/jadejs/void-elements/issues"
27
- },
28
- "homepage": "https://github.com/jadejs/void-elements",
29
- "devDependencies": {
30
- "jsdom": "^9.9.1",
31
- "request": "^2.79.0",
32
- "request-promise": "^4.1.1"
33
- }
34
- }