diff --git a/package-lock.json b/package-lock.json index 924800bc6..f5b6d3144 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1301,9 +1301,10 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.2.0", - "dev": true, - "license": "MIT" + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.2.tgz", + "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==", + "dev": true }, "node_modules/@algolia/autocomplete-core": { "version": "1.9.3", @@ -17881,6 +17882,11 @@ "dequal": "^2.0.3" } }, + "node_modules/b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + }, "node_modules/babel-eslint": { "version": "10.1.0", "license": "MIT", @@ -25947,6 +25953,11 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "node_modules/fast-glob": { "version": "3.3.0", "license": "MIT", @@ -26462,14 +26473,15 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -35961,9 +35973,9 @@ "license": "MIT" }, "node_modules/msgpackr": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.9.5.tgz", - "integrity": "sha512-/IJ3cFSN6Ci3eG2wLhbFEL6GT63yEaoN/R5My2QkV6zro+OJaVRLPlwvxY7EtHYSmDlQpk8stvOQTL2qJFkDRg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.10.1.tgz", + "integrity": "sha512-r5VRLv9qouXuLiIBrLpl2d5ZvPt8svdQTl5/vMvE4nzDMyEX4sgW5yWhuBBj5UmgwOTWj8CIdSXn5sAfsHAWIQ==", "optionalDependencies": { "msgpackr-extract": "^3.0.2" } @@ -40094,6 +40106,11 @@ ], "license": "MIT" }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, "node_modules/quick-format-unescaped": { "version": "4.0.4", "license": "MIT" @@ -42140,8 +42157,9 @@ } }, "node_modules/semver": { - "version": "7.5.3", - "license": "ISC", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -42599,18 +42617,18 @@ "license": "MIT" }, "node_modules/sharp": { - "version": "0.32.1", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.1.tgz", - "integrity": "sha512-kQTFtj7ldpUqSe8kDxoGLZc1rnMFU0AO2pqbX6pLy3b7Oj8ivJIdoKNwxHVQG2HN6XpHPJqCSM2nsma2gOXvOg==", + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", "hasInstallScript": true, "dependencies": { "color": "^4.2.3", - "detect-libc": "^2.0.1", + "detect-libc": "^2.0.2", "node-addon-api": "^6.1.0", "prebuild-install": "^7.1.1", - "semver": "^7.5.0", + "semver": "^7.5.4", "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", + "tar-fs": "^3.0.4", "tunnel-agent": "^0.6.0" }, "engines": { @@ -42621,9 +42639,9 @@ } }, "node_modules/sharp/node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", "engines": { "node": ">=8" } @@ -42633,6 +42651,26 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" }, + "node_modules/sharp/node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/sharp/node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "license": "MIT", @@ -43876,6 +43914,15 @@ "node": ">=0.8.0" } }, + "node_modules/streamx": { + "version": "2.15.6", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", + "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "node_modules/strict-uri-encode": { "version": "2.0.0", "license": "MIT", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index fad5e336b..901b4e5cf 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,14 @@ # @viron/app +## 2.11.5 + +### Patch Changes + +- 3c66431c: align the label inside the button to the left +- 1d4039dc: align the label inside the button to the left +- 9d73d6a5: fixed localization leaks +- e7ec4bef: add padding to input form + ## 2.11.4 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index e4837c5d2..9fbf3f0da 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@viron/app", - "version": "2.11.4", + "version": "2.11.5", "engines": { "node": ">=18.14.0", "npm": ">=9.3.1" diff --git a/packages/app/src/components/numberinput/index.tsx b/packages/app/src/components/numberinput/index.tsx index aed018eb7..b09d8fca5 100644 --- a/packages/app/src/components/numberinput/index.tsx +++ b/packages/app/src/components/numberinput/index.tsx @@ -28,7 +28,7 @@ const Numberinput: React.FC = ({ type: 'number', step: isFloat ? 'any' : '1', className: classnames( - 'block w-full p-1 border rounded focus:outline-none focus:ring-2', + 'block w-full p-3 border rounded focus:outline-none focus:ring-2', `border-thm-on-${on}-faint bg-thm-${on} text-thm-on-${on} focus:bg-thm-on-${on}-faint focus:text-thm-on-${on} focus:ring-thm-on-${on}` ), }; diff --git a/packages/app/src/components/request/index.tsx b/packages/app/src/components/request/index.tsx index 262b1b874..585f565ee 100644 --- a/packages/app/src/components/request/index.tsx +++ b/packages/app/src/components/request/index.tsx @@ -9,6 +9,7 @@ import ChevronRightIcon from '~/components/icon/chevronRight/outline'; import Operation from '~/components/operation'; import Schema from '~/components/schema'; import { useEliminate } from '~/components/schema/hooks'; +import { useTranslation } from '~/hooks/i18n'; import { COLOR_SYSTEM, Endpoint } from '~/types/index'; import { Document, @@ -51,6 +52,7 @@ const _Request: React.FC = ({ defaultValues, }); const { ref, execute } = useEliminate(); + const { t } = useTranslation(); const _handleSubmit = useMemo( () => handleSubmit((data) => { @@ -191,7 +193,7 @@ const _Request: React.FC = ({ type="submit" cs={COLOR_SYSTEM.PRIMARY} size={BUTTON_SIZE.BASE} - label="Submit" + label={t('submitButtonLabel')} onClick={handleSubmitClick} /> diff --git a/packages/app/src/components/schema/types/array/index.tsx b/packages/app/src/components/schema/types/array/index.tsx index 3e5447ac0..3f22e0a3f 100644 --- a/packages/app/src/components/schema/types/array/index.tsx +++ b/packages/app/src/components/schema/types/array/index.tsx @@ -11,6 +11,7 @@ import { getDefaultValue } from '~/utils/oas'; import { getRegisterOptions } from '~/utils/oas/v8n'; import { useNameForError } from '../../hooks'; import { Props } from '../../index'; +import { useTranslation } from '~/hooks/i18n'; // Functions like `append` from useFieldArray accepts argument of type object only. // Use `setValue` to append data of type other than object. @@ -35,6 +36,8 @@ const SchemaOfTypeArray: React.FC = ({ }) => { const data: any[] | undefined = getValues(name); const nameForError = useNameForError({ schema, name }); + const { t } = useTranslation(); + useEffect(() => { if (!isDeepActive) { clearErrors(nameForError); @@ -107,7 +110,7 @@ const SchemaOfTypeArray: React.FC = ({ on={on} size={BUTTON_SIZE.XS} Icon={PlusIcon} - label="Prepend" + label={t('prependButtonLabel')} onClick={handlePrependClick} /> )} @@ -140,7 +143,7 @@ const SchemaOfTypeArray: React.FC = ({ size={BUTTON_SIZE.XS} data={index} Icon={MinusIcon} - label="Remove" + label={t('removeButtonLabel')} onClick={handleRemoveClick} /> )} @@ -153,7 +156,7 @@ const SchemaOfTypeArray: React.FC = ({ size={BUTTON_SIZE.XS} data={index + 1} Icon={PlusIcon} - label="Insert" + label={t('insertButtonLabel')} onClick={handleInsertClick} /> )} @@ -165,7 +168,7 @@ const SchemaOfTypeArray: React.FC = ({ on={on} size={BUTTON_SIZE.XS} Icon={PlusIcon} - label="Append" + label={t('appendButtonLabel')} onClick={handleAppendClick} /> diff --git a/packages/app/src/components/select/index.tsx b/packages/app/src/components/select/index.tsx index 0c312f42e..2d31cfa88 100644 --- a/packages/app/src/components/select/index.tsx +++ b/packages/app/src/components/select/index.tsx @@ -36,7 +36,7 @@ const _Select = function ({ } /> } /> } @@ -94,13 +96,13 @@ const Add: React.FC = ({ onAdd, onCancel }) => {