From 8c5c3971c4de9361d5232d7e44d07a41ea68d232 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Fri, 9 Aug 2024 12:57:20 +0800 Subject: [PATCH] feat: add full-screen support to code input Signed-off-by: Ryan Wang --- ui/package.json | 4 +- ui/pnpm-lock.yaml | 188 ++++++++++++++++++++++- ui/src/formkit/inputs/code/CodeInput.vue | 61 ++++++-- ui/src/locales/en.yaml | 4 + ui/src/locales/zh-CN.yaml | 4 + ui/src/locales/zh-TW.yaml | 4 + 6 files changed, 247 insertions(+), 18 deletions(-) diff --git a/ui/package.json b/ui/package.json index 6c6b8e034e..a8a3f6aa1d 100644 --- a/ui/package.json +++ b/ui/package.json @@ -108,7 +108,7 @@ }, "devDependencies": { "@changesets/cli": "^2.25.2", - "@iconify/json": "^2.2.117", + "@iconify/json": "^2.2.235", "@intlify/unplugin-vue-i18n": "^4.0.0", "@rushstack/eslint-patch": "^1.3.2", "@tailwindcss/aspect-ratio": "^0.4.2", @@ -151,7 +151,7 @@ "tailwindcss-safe-area": "^0.2.2", "tailwindcss-themer": "^2.0.3", "typescript": "~5.5.4", - "unplugin-icons": "^0.14.15", + "unplugin-icons": "^0.19.2", "vite": "^5.2.11", "vite-plugin-externals": "^0.6.2", "vite-plugin-html": "^3.2.2", diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yaml index 1317cf03fb..0130cdf765 100644 --- a/ui/pnpm-lock.yaml +++ b/ui/pnpm-lock.yaml @@ -208,8 +208,8 @@ importers: specifier: ^2.25.2 version: 2.25.2 '@iconify/json': - specifier: ^2.2.117 - version: 2.2.147 + specifier: ^2.2.235 + version: 2.2.235 '@intlify/unplugin-vue-i18n': specifier: ^4.0.0 version: 4.0.0(rollup@4.17.2)(vue-i18n@9.13.1(vue@3.4.27(typescript@5.5.4))) @@ -337,8 +337,8 @@ importers: specifier: ~5.5.4 version: 5.5.4 unplugin-icons: - specifier: ^0.14.15 - version: 0.14.15(@vue/compiler-sfc@3.4.27)(vue-template-compiler@2.7.14) + specifier: ^0.19.2 + version: 0.19.2(@vue/compiler-sfc@3.4.27)(vue-template-compiler@2.7.14) vite: specifier: ^5.2.11 version: 5.2.11(@types/node@18.13.0)(less@4.2.0)(sass@1.60.0)(terser@5.31.0) @@ -649,6 +649,12 @@ packages: '@antfu/install-pkg@0.1.1': resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==} + '@antfu/install-pkg@0.3.3': + resolution: {integrity: sha512-nHHsk3NXQ6xkCfiRRC8Nfrg8pU5kkr3P3Y9s9dKqiuRmBD0Yap7fymNDjGFKeWhZQHqqbCS5CfeMy9wtExM24w==} + + '@antfu/utils@0.7.10': + resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + '@antfu/utils@0.7.6': resolution: {integrity: sha512-pvFiLP2BeOKA/ZOS6jxx4XhKzdVLHDhGlFEaZ2flWWYf2xOqVniqpk38I04DFRyz+L0ASggl7SkItTc+ZLju4w==} @@ -2449,12 +2455,18 @@ packages: '@iconify/json@2.2.147': resolution: {integrity: sha512-VTW1vVivOq5RVcZu7xqCXWptGH7fo6VPsUxT5QBlbBS042859YZnK1JTXHJu4InMuTwQC/3KLP+InJJ5kawOGg==} + '@iconify/json@2.2.235': + resolution: {integrity: sha512-8a5r/uIZY3DvJPCkRCMly0BgmsxItMTR6RjGnifQ0kGrLSE7TpdYIfQya9Ckd2qfWjD20WZmWblpFm1FcF6ybQ==} + '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} '@iconify/utils@2.1.12': resolution: {integrity: sha512-7vf3Uk6H7TKX4QMs2gbg5KR1X9J0NJzKSRNWhMZ+PWN92l0t6Q3tj2ZxLDG07rC3ppWBtTtA4FPmkQphuEmdsg==} + '@iconify/utils@2.1.30': + resolution: {integrity: sha512-bY0IO5xLOlbzJBnjWLxknp6Sss3yla03sVY9VeUz9nT6dbc+EGKlLfCt+6uytJnWm5CUvTF/BNotsLWF7kI61A==} + '@interactjs/actions@1.10.17': resolution: {integrity: sha512-wyB1ZqpaZy5gmz6VDqK9KWh98xKnFgL7VyLvxHODFi9V0IYX4HJAAOBlhtfze0D1R1f1cY+gqPDK+dLaHMlE+w==} peerDependencies: @@ -2651,6 +2663,10 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@jsdevtools/ez-spawn@3.0.4': + resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} + engines: {node: '>=10'} + '@juggle/resize-observer@3.4.0': resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} @@ -4545,6 +4561,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + engines: {node: '>=0.4.0'} + hasBin: true + acorn@8.8.2: resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} engines: {node: '>=0.4.0'} @@ -4969,6 +4990,9 @@ packages: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} + call-me-maybe@1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -5045,6 +5069,10 @@ packages: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -5215,6 +5243,9 @@ packages: engines: {node: '>=10.0.0'} hasBin: true + confbox@0.1.7: + resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} @@ -5430,6 +5461,15 @@ packages: supports-color: optional: true + debug@4.3.6: + resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize-keys@1.1.0: resolution: {integrity: sha512-ocLWuYzRPoS9bfiSdDd3cxvrzovVMZnRDVEzAs+hWIVXGDbHxWMECij2OBuyB/An0FFW/nLuq6Kv1i/YC5Qfzg==} engines: {node: '>=0.10.0'} @@ -7377,6 +7417,10 @@ packages: resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} engines: {node: '>=14'} + local-pkg@0.5.0: + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} + locate-path@3.0.0: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} @@ -7723,6 +7767,9 @@ packages: mlly@1.4.2: resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} + mlly@1.7.1: + resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -8249,6 +8296,9 @@ packages: pkg-types@1.0.3: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + pkg-types@1.1.3: + resolution: {integrity: sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA==} + pngjs@5.0.0: resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} engines: {node: '>=10.13.0'} @@ -9768,6 +9818,9 @@ packages: ufo@1.3.2: resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} @@ -9856,6 +9909,30 @@ packages: vue-template-es2015-compiler: optional: true + unplugin-icons@0.19.2: + resolution: {integrity: sha512-QkQJ/Iz3PFr/EoiOvFUQYvqbbJZ7Vs3hObKAFHh5eywTU1PQagSNeXKGRD+JpzXSTnUNLtG0u/xEA5Ec2OeANQ==} + peerDependencies: + '@svgr/core': '>=7.0.0' + '@svgx/core': ^1.0.1 + '@vue/compiler-sfc': ^3.0.2 || ^2.7.0 + vue-template-compiler: ^2.6.12 + vue-template-es2015-compiler: ^1.9.0 + peerDependenciesMeta: + '@svgr/core': + optional: true + '@svgx/core': + optional: true + '@vue/compiler-sfc': + optional: true + vue-template-compiler: + optional: true + vue-template-es2015-compiler: + optional: true + + unplugin@1.12.1: + resolution: {integrity: sha512-aXEH9c5qi3uYZHo0niUtxDlT9ylG/luMW/dZslSCkbtC31wCyFkmM0kyoBBh+Grhn7CL+/kvKLfN61/EdxPxMQ==} + engines: {node: '>=14.0.0'} + unplugin@1.5.1: resolution: {integrity: sha512-0QkvG13z6RD+1L1FoibQqnvTwVBXvS4XSPwAyinVgoOCl2jAgwzdUKmEj05o4Lt8xwQI85Hb6mSyYkcAGwZPew==} @@ -10274,6 +10351,9 @@ packages: webpack-virtual-modules@0.6.1: resolution: {integrity: sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==} + webpack-virtual-modules@0.6.2: + resolution: {integrity: sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==} + webpack@5.89.0: resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} engines: {node: '>=10.13.0'} @@ -10560,6 +10640,12 @@ snapshots: execa: 5.1.1 find-up: 5.0.0 + '@antfu/install-pkg@0.3.3': + dependencies: + '@jsdevtools/ez-spawn': 3.0.4 + + '@antfu/utils@0.7.10': {} + '@antfu/utils@0.7.6': {} '@antfu/utils@0.7.7': {} @@ -12802,6 +12888,11 @@ snapshots: '@iconify/types': 2.0.0 pathe: 1.1.1 + '@iconify/json@2.2.235': + dependencies: + '@iconify/types': 2.0.0 + pathe: 1.1.2 + '@iconify/types@2.0.0': {} '@iconify/utils@2.1.12': @@ -12815,6 +12906,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@iconify/utils@2.1.30': + dependencies: + '@antfu/install-pkg': 0.1.1 + '@antfu/utils': 0.7.10 + '@iconify/types': 2.0.0 + debug: 4.3.6 + kolorist: 1.8.0 + local-pkg: 0.5.0 + mlly: 1.7.1 + transitivePeerDependencies: + - supports-color + '@interactjs/actions@1.10.17(@interactjs/core@1.10.17(@interactjs/utils@1.10.17))(@interactjs/utils@1.10.17)': dependencies: '@interactjs/core': 1.10.17(@interactjs/utils@1.10.17) @@ -13079,6 +13182,13 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 + '@jsdevtools/ez-spawn@3.0.4': + dependencies: + call-me-maybe: 1.0.2 + cross-spawn: 7.0.3 + string-argv: 0.3.1 + type-detect: 4.0.8 + '@juggle/resize-observer@3.4.0': {} '@lezer/common@1.0.1': {} @@ -15655,6 +15765,8 @@ snapshots: acorn@8.11.3: {} + acorn@8.12.1: {} + acorn@8.8.2: {} address@1.2.2: {} @@ -16150,6 +16262,8 @@ snapshots: get-intrinsic: 1.2.4 set-function-length: 1.2.2 + call-me-maybe@1.0.2: {} + callsites@3.1.0: {} camel-case@4.1.2: @@ -16226,6 +16340,18 @@ snapshots: optionalDependencies: fsevents: 2.3.2 + chokidar@3.6.0: + dependencies: + anymatch: 3.1.2 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + chownr@1.1.4: {} chownr@2.0.0: {} @@ -16396,6 +16522,8 @@ snapshots: tree-kill: 1.2.2 yargs: 16.2.0 + confbox@0.1.7: {} + config-chain@1.1.13: dependencies: ini: 1.3.8 @@ -16645,6 +16773,10 @@ snapshots: optionalDependencies: supports-color: 8.1.1 + debug@4.3.6: + dependencies: + ms: 2.1.2 + decamelize-keys@1.1.0: dependencies: decamelize: 1.2.0 @@ -18935,6 +19067,11 @@ snapshots: local-pkg@0.4.3: {} + local-pkg@0.5.0: + dependencies: + mlly: 1.4.2 + pkg-types: 1.0.3 + locate-path@3.0.0: dependencies: p-locate: 3.0.0 @@ -19245,7 +19382,7 @@ snapshots: mlly@1.4.0: dependencies: - acorn: 8.10.0 + acorn: 8.11.3 pathe: 1.1.2 pkg-types: 1.0.3 ufo: 1.2.0 @@ -19257,6 +19394,13 @@ snapshots: pkg-types: 1.0.3 ufo: 1.3.2 + mlly@1.7.1: + dependencies: + acorn: 8.11.3 + pathe: 1.1.2 + pkg-types: 1.1.3 + ufo: 1.5.4 + mri@1.2.0: {} mrmime@1.0.1: {} @@ -19753,6 +19897,12 @@ snapshots: mlly: 1.4.2 pathe: 1.1.2 + pkg-types@1.1.3: + dependencies: + confbox: 0.1.7 + mlly: 1.7.1 + pathe: 1.1.2 + pngjs@5.0.0: {} polished@4.2.2: @@ -21251,7 +21401,7 @@ snapshots: terser@5.24.0: dependencies: '@jridgewell/source-map': 0.3.5 - acorn: 8.11.2 + acorn: 8.11.3 commander: 2.20.3 source-map-support: 0.5.21 @@ -21498,6 +21648,8 @@ snapshots: ufo@1.3.2: {} + ufo@1.5.4: {} + uglify-js@3.17.4: optional: true @@ -21603,6 +21755,28 @@ snapshots: transitivePeerDependencies: - supports-color + unplugin-icons@0.19.2(@vue/compiler-sfc@3.4.27)(vue-template-compiler@2.7.14): + dependencies: + '@antfu/install-pkg': 0.3.3 + '@antfu/utils': 0.7.10 + '@iconify/utils': 2.1.30 + debug: 4.3.6 + kolorist: 1.8.0 + local-pkg: 0.5.0 + unplugin: 1.12.1 + optionalDependencies: + '@vue/compiler-sfc': 3.4.27 + vue-template-compiler: 2.7.14 + transitivePeerDependencies: + - supports-color + + unplugin@1.12.1: + dependencies: + acorn: 8.12.1 + chokidar: 3.6.0 + webpack-sources: 3.2.3 + webpack-virtual-modules: 0.6.2 + unplugin@1.5.1: dependencies: acorn: 8.11.2 @@ -22145,6 +22319,8 @@ snapshots: webpack-virtual-modules@0.6.1: {} + webpack-virtual-modules@0.6.2: {} + webpack@5.89.0(esbuild@0.18.20): dependencies: '@types/eslint-scope': 3.7.7 diff --git a/ui/src/formkit/inputs/code/CodeInput.vue b/ui/src/formkit/inputs/code/CodeInput.vue index 12f3493713..5a8d27013d 100644 --- a/ui/src/formkit/inputs/code/CodeInput.vue +++ b/ui/src/formkit/inputs/code/CodeInput.vue @@ -1,6 +1,9 @@