From 28e325c69ea1e187b47f74dc4ea063a9bd89a6df Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Sun, 4 Feb 2024 22:42:12 +0100 Subject: [PATCH] feat(twoslash): support `errorRendering` to render error in hover style --- docs/package.json | 4 +- package.json | 2 +- packages/shiki/package.json | 2 +- packages/twoslash/package.json | 2 +- packages/twoslash/src/renderer-rich.ts | 83 ++++- packages/twoslash/style-rich.css | 29 +- .../test/out/rich/rich-error-hover.html | 35 +++ packages/twoslash/test/rich.test.ts | 33 +- packages/vitepress-twoslash/package.json | 2 +- pnpm-lock.yaml | 294 +++++++++--------- 10 files changed, 328 insertions(+), 158 deletions(-) create mode 100644 packages/twoslash/test/out/rich/rich-error-hover.html diff --git a/docs/package.json b/docs/package.json index d5939c3a6..b55b1f2d2 100644 --- a/docs/package.json +++ b/docs/package.json @@ -13,12 +13,12 @@ "@iconify-json/svg-spinners": "^1.1.2", "@shikijs/transformers": "workspace:*", "@shikijs/twoslash": "workspace:*", - "@unocss/reset": "^0.58.4", + "@unocss/reset": "^0.58.5", "@vueuse/core": "^10.7.2", "floating-vue": "^5.2.2", "pinia": "^2.1.7", "shiki": "workspace:*", - "unocss": "^0.58.4", + "unocss": "^0.58.5", "unplugin-vue-components": "^0.26.0", "vitepress": "^1.0.0-rc.41", "vue": "^3.4.15" diff --git a/package.json b/package.json index 816aca315..db68afd33 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "mdast-util-to-hast": "^13.1.0", "ofetch": "^1.3.3", "pnpm": "^8.15.1", - "prettier": "^3.2.4", + "prettier": "^3.2.5", "rimraf": "^5.0.5", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", diff --git a/packages/shiki/package.json b/packages/shiki/package.json index 5b07ffd76..9c150dc9e 100644 --- a/packages/shiki/package.json +++ b/packages/shiki/package.json @@ -102,7 +102,7 @@ "@shikijs/core": "workspace:*" }, "devDependencies": { - "tm-grammars": "^1.1.2", + "tm-grammars": "^1.1.3", "tm-themes": "^1.1.1", "vscode-oniguruma": "^1.7.0" } diff --git a/packages/twoslash/package.json b/packages/twoslash/package.json index 1404a5c48..e683e45a5 100644 --- a/packages/twoslash/package.json +++ b/packages/twoslash/package.json @@ -56,7 +56,7 @@ }, "dependencies": { "@shikijs/core": "workspace:*", - "twoslash": "^0.1.0" + "twoslash": "^0.1.1" }, "devDependencies": { "@iconify-json/carbon": "^1.1.28", diff --git a/packages/twoslash/src/renderer-rich.ts b/packages/twoslash/src/renderer-rich.ts index f39d08aa0..619ed7250 100644 --- a/packages/twoslash/src/renderer-rich.ts +++ b/packages/twoslash/src/renderer-rich.ts @@ -1,6 +1,6 @@ import type { Element, ElementContent, Text } from 'hast' import type { ShikiTransformerContextCommon } from '@shikijs/core' -import type { NodeHover, NodeQuery } from 'twoslash' +import type { NodeError, NodeHover, NodeQuery } from 'twoslash' import type { TwoslashRenderer } from './types' import type { CompletionItem } from './icons' import { defaultCompletionIcons, defaultCustomTagIcons } from './icons' @@ -47,6 +47,16 @@ export interface RendererRichOptions { */ processHoverDocs?: (docs: string) => string + /** + * The way errors should be rendered. + * + * - `'line'`: Render the error line after the line of code + * - `'hover'`: Render the error in the hover popup + * + * @default 'line' + */ + errorRendering?: 'line' | 'hover' + /** * Classes added to injected elements */ @@ -137,6 +147,16 @@ export interface RendererRichOptions { * The token for the error informaton. */ errorToken?: HastExtension + /** + * The container of the error popup. + * Only used when `errorRendering` is set to `'hover'`. + */ + errorPopup?: HastExtension + /** + * Custom function to compose the error token. + * Only used when `errorRendering` is set to `'hover'`. + */ + errorCompose?: (parts: { popup: Element, token: Text | Element }) => ElementContent[] /** * The wrapper for the highlighted nodes. */ @@ -188,6 +208,7 @@ export function rendererRich(options: RendererRichOptions = {}): TwoslashRendere processHoverDocs = docs => docs, classExtra = '', jsdoc = true, + errorRendering = 'line', renderMarkdown = renderMarkdownPassThrough, renderMarkdownInline = renderMarkdownPassThrough, hast, @@ -474,27 +495,66 @@ export function rendererRich(options: RendererRichOptions = {}): TwoslashRendere ) }, - nodeError(_, node) { + nodeError(error, node) { + if (errorRendering !== 'hover') { + return extend( + hast?.errorToken, + { + type: 'element', + tagName: 'span', + properties: { + class: [`twoslash-error`, getErrorLevelClass(error)].filter(Boolean).join(' '), + }, + children: [node], + }, + ) + } + + const popup = extend( + hast?.errorPopup, + { + type: 'element', + tagName: 'span', + properties: { + class: ['twoslash-popup-container', classExtra].filter(Boolean).join(' '), + }, + children: [ + { + type: 'element', + tagName: 'div', + properties: { + class: 'twoslash-popup-error', + }, + children: renderMarkdown.call(this, error.text), + }, + ], + }, + ) + return extend( hast?.errorToken, { type: 'element', tagName: 'span', properties: { - class: 'twoslash-error', + class: `twoslash-error twoslash-error-hover ${getErrorLevelClass(error)}`, }, - children: [node], + children: hast?.errorCompose + ? hast?.errorCompose({ popup, token: node }) + : [popup, node], }, ) }, lineError(error) { + if (errorRendering !== 'line') + return [] return [ { type: 'element', tagName: 'div', properties: { - class: ['twoslash-meta-line twoslash-error-line', classExtra].filter(Boolean).join(' '), + class: ['twoslash-meta-line twoslash-error-line', getErrorLevelClass(error), classExtra].filter(Boolean).join(' '), }, children: [ { @@ -576,3 +636,16 @@ export function defaultHoverInfoProcessor(type: string) { return content } + +function getErrorLevelClass(error: NodeError) { + switch (error.level) { + case 0: + return 'twoslash-error-level-warning' + case 1: + return '' // 'twoslash-error-level-error' + case 2: + return 'twoslash-error-level-suggestion' + default: + return 'twoslash-error-level-info' + } +} diff --git a/packages/twoslash/style-rich.css b/packages/twoslash/style-rich.css index 3f852395e..787b2edaa 100644 --- a/packages/twoslash/style-rich.css +++ b/packages/twoslash/style-rich.css @@ -6,7 +6,7 @@ --twoslash-highlighted-bg: #c37d0d20; --twoslash-popup-bg: #f8f8f8; --twoslash-popup-color: inherit; - --twoslash-popup-shadow: rgba(0, 0, 0.08) 0px 1px 4px; + --twoslash-popup-shadow: rgba(0, 0, 0, 0.08) 0px 1px 4px; --twoslash-docs-color: #888; --twoslash-docs-font: sans-serif; --twoslash-code-font: inherit; @@ -16,10 +16,12 @@ --twoslash-cursor-color: #8888; --twoslash-error-color: #d45656; --twoslash-error-bg: #d4565620; + --twoslash-warn-color: #c37d0d; + --twoslash-warn-bg: #c37d0d20; --twoslash-tag-color: #3772cf; --twoslash-tag-bg: #3772cf20; - --twoslash-tag-warn-color: #c37d0d; - --twoslash-tag-warn-bg: #c37d0d20; + --twoslash-tag-warn-color: var(--twoslash-warn-color); + --twoslash-tag-warn-bg: var(--twoslash-warn-bg); --twoslash-tag-annotate-color: #1ba673; --twoslash-tag-annotate-bg: #1ba67320; } @@ -67,6 +69,7 @@ } .twoslash .twoslash-hover:hover .twoslash-popup-container, +.twoslash .twoslash-error-hover:hover .twoslash-popup-container, .twoslash .twoslash-query-presisted .twoslash-popup-container { opacity: 1; pointer-events: auto; @@ -90,6 +93,7 @@ } .twoslash .twoslash-popup-code, +.twoslash .twoslash-popup-error, .twoslash .twoslash-popup-docs { padding: 6px 8px !important; } @@ -106,6 +110,13 @@ border-top: 1px solid var(--twoslash-border-color); } +.twoslash .twoslash-popup-error { + color: var(--twoslash-error-color); + background-color: var(--twoslash-error-bg); + font-family: var(--twoslash-docs-font); + font-size: 0.8em; +} + .twoslash .twoslash-popup-docs-tags { display: flex; flex-direction: column; @@ -131,12 +142,24 @@ margin: 0.2em 0; } +.twoslash .twoslash-error-line.twoslash-error-level-warning { + background-color: var(--twoslash-warn-bg); + border-left: 3px solid var(--twoslash-warn-color); + color: var(--twoslash-warn-color); +} + .twoslash .twoslash-error { background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x bottom left; padding-bottom: 2px; } +.twoslash .twoslash-error.twoslash-error-level-warning { + background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c37d0d'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") + repeat-x bottom left; + padding-bottom: 2px; +} + /* ===== Completeions ===== */ .twoslash .twoslash-completion-cursor { position: relative; diff --git a/packages/twoslash/test/out/rich/rich-error-hover.html b/packages/twoslash/test/out/rich/rich-error-hover.html new file mode 100644 index 000000000..818147456 --- /dev/null +++ b/packages/twoslash/test/out/rich/rich-error-hover.html @@ -0,0 +1,35 @@ + + + +
interface Todo {
+  Todo.title: stringtitle: string;
+}
+
+const const todo: Readonly<Todo>todo: type Readonly<T> = { readonly [P in keyof T]: T[P]; }
Make all properties in T readonly
Readonly
<Todo> = {
+ title: stringtitle: "Delete inactive users".String.toUpperCase(): string
Converts all the alphabetic characters in a string to uppercase.
toUpperCase
(),
+}; + +const todo: Readonly<Todo>todo.
Cannot assign to 'title' because it is a read-only property.
title
= "Hello";
\ No newline at end of file diff --git a/packages/twoslash/test/rich.test.ts b/packages/twoslash/test/rich.test.ts index c4708156f..c32ec0ac6 100644 --- a/packages/twoslash/test/rich.test.ts +++ b/packages/twoslash/test/rich.test.ts @@ -77,7 +77,7 @@ Number.parseInt(todo.title, 10); expect(styleTag + html + colorToggle).toMatchFileSnapshot('./out/rich/rich.html') - const html2 = await codeToHtml(code, { + const htmlNoTheme = await codeToHtml(code, { lang: 'ts', theme: 'none', transformers: [ @@ -87,7 +87,36 @@ Number.parseInt(todo.title, 10); ], }) - expect(styleTag + html2).toMatchFileSnapshot('./out/rich/rich-none-theme.html') + expect(styleTag + htmlNoTheme).toMatchFileSnapshot('./out/rich/rich-none-theme.html') +}) + +it('error rendering hover', async () => { + const code = ` +// @errors: 2540 +interface Todo { + title: string; +} + +const todo: Readonly = { + title: "Delete inactive users".toUpperCase(), +}; + +todo.title = "Hello"; +`.trim() + + const htmlErrorsHover = await codeToHtml(code, { + lang: 'ts', + theme: 'vitesse-light', + transformers: [ + transformerTwoslash({ + renderer: rendererRich({ + errorRendering: 'hover', + }), + }), + ], + }) + + expect(styleTag + htmlErrorsHover).toMatchFileSnapshot('./out/rich/rich-error-hover.html') }) it('no-icons', async () => { diff --git a/packages/vitepress-twoslash/package.json b/packages/vitepress-twoslash/package.json index ccbb775ac..37235449e 100644 --- a/packages/vitepress-twoslash/package.json +++ b/packages/vitepress-twoslash/package.json @@ -59,7 +59,7 @@ "mdast-util-gfm": "^3.0.0", "mdast-util-to-hast": "^13.1.0", "shiki": "workspace:*", - "twoslash-vue": "^0.1.0", + "twoslash-vue": "^0.1.1", "vue": "^3.4.15" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48a541ee3..4aceb0aaa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -123,8 +123,8 @@ importers: specifier: ^8.15.1 version: 8.15.1 prettier: - specifier: ^3.2.4 - version: 3.2.4 + specifier: ^3.2.5 + version: 3.2.5 rimraf: specifier: ^5.0.5 version: 5.0.5 @@ -193,8 +193,8 @@ importers: specifier: workspace:* version: link:../packages/twoslash '@unocss/reset': - specifier: ^0.58.4 - version: 0.58.4 + specifier: ^0.58.5 + version: 0.58.5 '@vueuse/core': specifier: ^10.7.2 version: 10.7.2(vue@3.4.15) @@ -208,8 +208,8 @@ importers: specifier: workspace:* version: link:../packages/shiki unocss: - specifier: ^0.58.4 - version: 0.58.4(postcss@8.4.33)(rollup@4.9.6)(vite@5.0.12) + specifier: ^0.58.5 + version: 0.58.5(postcss@8.4.33)(rollup@4.9.6)(vite@5.0.12) unplugin-vue-components: specifier: ^0.26.0 version: 0.26.0(rollup@4.9.6)(vue@3.4.15) @@ -328,8 +328,8 @@ importers: version: link:../core devDependencies: tm-grammars: - specifier: ^1.1.2 - version: 1.1.2 + specifier: ^1.1.3 + version: 1.1.3 tm-themes: specifier: ^1.1.1 version: 1.1.1 @@ -349,8 +349,8 @@ importers: specifier: workspace:* version: link:../core twoslash: - specifier: ^0.1.0 - version: 0.1.0(typescript@5.3.3) + specifier: ^0.1.1 + version: 0.1.1(typescript@5.3.3) devDependencies: '@iconify-json/carbon': specifier: ^1.1.28 @@ -389,8 +389,8 @@ importers: specifier: workspace:* version: link:../shiki twoslash-vue: - specifier: ^0.1.0 - version: 0.1.0(typescript@5.3.3) + specifier: ^0.1.1 + version: 0.1.1(typescript@5.3.3) vue: specifier: ^3.4.15 version: 3.4.15(typescript@5.3.3) @@ -850,6 +850,7 @@ packages: /@babel/highlight@7.23.4: resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} + requiresBuild: true dependencies: '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 @@ -1634,15 +1635,16 @@ packages: resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} dev: true - /@iconify/utils@2.1.19: - resolution: {integrity: sha512-pysGqVBjZRZ7JMFpFpQZ3WNK1kEm1l7NwdA2k7kAlmoArJgsw999dSmyzmXgCUJ6GM9LLgyP2PCrDchygWOCGg==} + /@iconify/utils@2.1.22: + resolution: {integrity: sha512-6UHVzTVXmvO8uS6xFF+L/QTSpTzA/JZxtgU+KYGFyDYMEObZ1bu/b5l+zNJjHy+0leWjHI+C0pXlzGvv3oXZMA==} dependencies: '@antfu/install-pkg': 0.1.1 '@antfu/utils': 0.7.7 '@iconify/types': 2.0.0 debug: 4.3.4 kolorist: 1.8.0 - local-pkg: 0.4.3 + local-pkg: 0.5.0 + mlly: 1.5.0 transitivePeerDependencies: - supports-color dev: true @@ -2664,215 +2666,215 @@ packages: /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - /@unocss/astro@0.58.4(rollup@4.9.6)(vite@5.0.12): - resolution: {integrity: sha512-feS8+f3oPmCeR1XF7isQjs3Z9ojM5Ssv0vCNR/dexPFdROfccK/7sIu1YnHWtVg1trPc1kMfI8XJRqfrHMdd5w==} + /@unocss/astro@0.58.5(rollup@4.9.6)(vite@5.0.12): + resolution: {integrity: sha512-LtuVnj8oFAK9663OVhQO8KpdJFiOyyPsYfnOZlDCOFK3gHb/2WMrzdBwr1w8LoQF3bDedkFMKirVF7gWjyZiaw==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 peerDependenciesMeta: vite: optional: true dependencies: - '@unocss/core': 0.58.4 - '@unocss/reset': 0.58.4 - '@unocss/vite': 0.58.4(rollup@4.9.6)(vite@5.0.12) + '@unocss/core': 0.58.5 + '@unocss/reset': 0.58.5 + '@unocss/vite': 0.58.5(rollup@4.9.6)(vite@5.0.12) vite: 5.0.12(@types/node@20.11.16) transitivePeerDependencies: - rollup dev: true - /@unocss/cli@0.58.4(rollup@4.9.6): - resolution: {integrity: sha512-8dAs1TzzWCtb3FxoTsVtR2+JGkdmchuP0RvGlSywADf5FqYn9nbP0m3z4STtpPavHO9JaGbabStyjS0nA8Ck6w==} + /@unocss/cli@0.58.5(rollup@4.9.6): + resolution: {integrity: sha512-FzVVXO9ghsGtJpu9uR4o7JeM9gUfWNbVZZ/IfH+0WbDJuyx4rO/jwN55z0yA5QDkhvOz9DvzwPCBzLpTJ5q+Lw==} engines: {node: '>=14'} hasBin: true dependencies: '@ampproject/remapping': 2.2.1 '@rollup/pluginutils': 5.1.0(rollup@4.9.6) - '@unocss/config': 0.58.4 - '@unocss/core': 0.58.4 - '@unocss/preset-uno': 0.58.4 + '@unocss/config': 0.58.5 + '@unocss/core': 0.58.5 + '@unocss/preset-uno': 0.58.5 cac: 6.7.14 chokidar: 3.5.3 colorette: 2.0.20 consola: 3.2.3 fast-glob: 3.3.2 - magic-string: 0.30.5 + magic-string: 0.30.6 pathe: 1.1.2 perfect-debounce: 1.0.0 transitivePeerDependencies: - rollup dev: true - /@unocss/config@0.58.4: - resolution: {integrity: sha512-b/inDCOnhUPzobhj+SxRI7xeSwoAQU+3D3J5JoWZNPBI4OaJdwpuz40uLXl9VsPz5N6dc8/qa+FrSsgCjUcLTg==} + /@unocss/config@0.58.5: + resolution: {integrity: sha512-O1pLSeNXfG11QHaLSVwS9rJKvE4b9304IQ3UvOdbYN+7SAT4YTZ7JDU4ngO1KWyOFBO6RD0WspCR95pgqOqJiQ==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 unconfig: 0.3.11 dev: true - /@unocss/core@0.58.4: - resolution: {integrity: sha512-wh4pxXUCkhC+C/0ct74PMYeZgX+oWuHj2mnvr09nM0WmvOm1HeeISrDCCBGcxmKbErUk+D1v3JgzXF7b6j2l4g==} + /@unocss/core@0.58.5: + resolution: {integrity: sha512-qbPqL+46hf1/UelQOwUwpAuvm6buoss43DPYHOPdfNJ+NTWkSpATQMF0JKT04QE0QRQbHNSHdMe9ariG+IIlCw==} dev: true - /@unocss/extractor-arbitrary-variants@0.58.4: - resolution: {integrity: sha512-TQlVtSQk8YdBU9KuTA5k6JBJ8d/aPrIsCWjDPfBvAqDvrll/dzwBCLoLTQMdCHFjCXCOYWKPum1ET+Wn9R+XbA==} + /@unocss/extractor-arbitrary-variants@0.58.5: + resolution: {integrity: sha512-KJQX0OJKzy4YjJo09h2la2Q+cn5IJ1JdyPVJJkzovHnv7jSBWzsfct+bj/6a+SJ4p4JBIqEJz3M/qxHv4EPJyA==} dependencies: - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 dev: true - /@unocss/inspector@0.58.4: - resolution: {integrity: sha512-BbsaIMqP6dqa3qCfkC0nkvjCg11JRigvFPU4319imTPcTHQNQSg35t2mVFPGZ+QYHlU/3ouBeogUQfJDHBmtVQ==} + /@unocss/inspector@0.58.5: + resolution: {integrity: sha512-cbJlIHEZ14puTtttf7sl+VZFDscV1DJiSseh9sSe0xJ/1NVBT9Bvkm09/1tnpLYAgF5gfa1CaCcjKmURgYzKrA==} dependencies: - '@unocss/core': 0.58.4 - '@unocss/rule-utils': 0.58.4 + '@unocss/core': 0.58.5 + '@unocss/rule-utils': 0.58.5 gzip-size: 6.0.0 sirv: 2.0.4 dev: true - /@unocss/postcss@0.58.4(postcss@8.4.33): - resolution: {integrity: sha512-pg2qCGakV1TyMApPdvuvqqmPDhgogPWF14J97BT5zIfGYITAJSmBsm7d3+06w6EuqIS+vcYRw+qCV3oX6qTeiA==} + /@unocss/postcss@0.58.5(postcss@8.4.33): + resolution: {integrity: sha512-m4L2YRdYfT6CV306Kl2VwEwbqa/92EpW4GE2Kqak1RuJyFJXBnWEEMJV4Uy6B1jWKLlCEWkuVUW33JUg7X6BxQ==} engines: {node: '>=14'} peerDependencies: postcss: ^8.4.21 dependencies: - '@unocss/config': 0.58.4 - '@unocss/core': 0.58.4 - '@unocss/rule-utils': 0.58.4 + '@unocss/config': 0.58.5 + '@unocss/core': 0.58.5 + '@unocss/rule-utils': 0.58.5 css-tree: 2.3.1 fast-glob: 3.3.2 - magic-string: 0.30.5 + magic-string: 0.30.6 postcss: 8.4.33 dev: true - /@unocss/preset-attributify@0.58.4: - resolution: {integrity: sha512-r7pDXgcOgGMmrMoqM4/w20KKn4PxF+/vpElatAGXW3V/tHJWFOLGzk+wYeCMgMxeC+vPzqyJkjTfoqYlZrlokQ==} + /@unocss/preset-attributify@0.58.5: + resolution: {integrity: sha512-OR4gUHamHCb4/LB/zZHlibaraTyILfFvRIzgmJnEb6lITGApQUl86qaJcTbTyfTfLVRufLG/JVeuz2HLUBPRXw==} dependencies: - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 dev: true - /@unocss/preset-icons@0.58.4: - resolution: {integrity: sha512-xdOe3PLfEWS4y+rA7Gxh/kDI82VkW0PbdoYO2FBwXH7a0JegdUDD5zuOTsTKAIymvQ7eVH53WXN9mcuhfNmdvQ==} + /@unocss/preset-icons@0.58.5: + resolution: {integrity: sha512-LDNXavHtWaIvMvBezT9O8yiqHJChVCEfTRO6YFVY0yy+wo5jHiuMh6iKeHVcwbYdn3NqHYmpi7b/hrXPMtODzA==} dependencies: - '@iconify/utils': 2.1.19 - '@unocss/core': 0.58.4 + '@iconify/utils': 2.1.22 + '@unocss/core': 0.58.5 ofetch: 1.3.3 transitivePeerDependencies: - supports-color dev: true - /@unocss/preset-mini@0.58.4: - resolution: {integrity: sha512-cpIWUYxLi4VCkkjxpNJOVqH9D32NX1ebRFaoAVnvCRsoj5TRsZJSdxs0WMN7reHT/CUHh0Wh6d3TfMCFxzbZ4g==} + /@unocss/preset-mini@0.58.5: + resolution: {integrity: sha512-WqD31fKUAN28OCUOyi1uremmLk0eTMqtCizjbbXsY/DP6RKYUT7trFAtppTcHWFhSQcknb4FURfAZppACsTVQQ==} dependencies: - '@unocss/core': 0.58.4 - '@unocss/extractor-arbitrary-variants': 0.58.4 - '@unocss/rule-utils': 0.58.4 + '@unocss/core': 0.58.5 + '@unocss/extractor-arbitrary-variants': 0.58.5 + '@unocss/rule-utils': 0.58.5 dev: true - /@unocss/preset-tagify@0.58.4: - resolution: {integrity: sha512-1E3vQvg5Qy4tbgovvrV0JaIXFfcdhK4NCSz+MuUk5ZYgKGVDh4IEw0WPuic534nlLm9+YFqyCSLLyIs3bT/GYQ==} + /@unocss/preset-tagify@0.58.5: + resolution: {integrity: sha512-UB9IXi8vA/SzmmRLMWR7bzeBpxpiRo7y9xk3ruvDddYlsyiwIeDIMwG23YtcA6q41FDQvkrmvTxUEH9LFlv6aA==} dependencies: - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 dev: true - /@unocss/preset-typography@0.58.4: - resolution: {integrity: sha512-0Opt3Y0At4F03092iwGgz7HswRC2ElBXHR+IO9wWxSbldtpdmKzFJ/GBHEalzQjacWnyyzmRjabjA2quoQ8FQA==} + /@unocss/preset-typography@0.58.5: + resolution: {integrity: sha512-rFny4a9yxgY34XOom5euCqQaOLV8PpbTg0Pn+5FelUMG4OfMevTwBCe9JttFJcUc3cNTL2enkzIdMa3l66114g==} dependencies: - '@unocss/core': 0.58.4 - '@unocss/preset-mini': 0.58.4 + '@unocss/core': 0.58.5 + '@unocss/preset-mini': 0.58.5 dev: true - /@unocss/preset-uno@0.58.4: - resolution: {integrity: sha512-FWBPGIt0UcQHu58l75kvhB4vF2v+s2m0OW9DnIrPm3aY7Qj3q4yA2wdahR37qSsH+6vR3JP4+mV9WBrGjIsjrQ==} + /@unocss/preset-uno@0.58.5: + resolution: {integrity: sha512-vgq/R4f7RDmdROy+pX+PeE38I3SgYKd4LL7Wb1HJUaVwz7PkF0XHCynOTbwrPXnK1kp1cnZYYEww7/RiYp+IQQ==} dependencies: - '@unocss/core': 0.58.4 - '@unocss/preset-mini': 0.58.4 - '@unocss/preset-wind': 0.58.4 - '@unocss/rule-utils': 0.58.4 + '@unocss/core': 0.58.5 + '@unocss/preset-mini': 0.58.5 + '@unocss/preset-wind': 0.58.5 + '@unocss/rule-utils': 0.58.5 dev: true - /@unocss/preset-web-fonts@0.58.4: - resolution: {integrity: sha512-vcy20fIK37GdhesRpiWGvCvkJDQsSiRF1jxw3dy8J5n9kFpIV8DQoPWUIE0ePF4i5ky2dHSDxKaNOP1bxHdKGA==} + /@unocss/preset-web-fonts@0.58.5: + resolution: {integrity: sha512-WKZ5raSClFXhqzfAhApef3+fuMq6cjKBxvhJ1FBIxFKcSOvN8e2czty2iGQVl02yMsxBWMv0Bpfm7np+cCoI1w==} dependencies: - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 ofetch: 1.3.3 dev: true - /@unocss/preset-wind@0.58.4: - resolution: {integrity: sha512-e2F0HsqPXw+nD85MKIZ63mx5yUx5g8iPOtMw9/eEUeK67HrD+jFxeLq0hAM3ou3a4589QIzeg23LXAkM7gCzvg==} + /@unocss/preset-wind@0.58.5: + resolution: {integrity: sha512-54RkjLmlqMUlC8o8nDCVzB25D1zzK4eth+/3uQzt739qU0U92NxuZKY21ADj9Rp/mVhKBV5FKuXPjmYc6yTQRQ==} dependencies: - '@unocss/core': 0.58.4 - '@unocss/preset-mini': 0.58.4 - '@unocss/rule-utils': 0.58.4 + '@unocss/core': 0.58.5 + '@unocss/preset-mini': 0.58.5 + '@unocss/rule-utils': 0.58.5 dev: true - /@unocss/reset@0.58.4: - resolution: {integrity: sha512-ZZTrAdl4WWmMjQdOqcOSWdgFH6kdFKZjPu4c6Ijxk7KvY2BW3nttTTBa7IYeuXFHVfcExUFqlOgRurt+NeWYyQ==} + /@unocss/reset@0.58.5: + resolution: {integrity: sha512-2wMrkCj3SSb5hrx9TKs5jZa34QIRkHv9FotbJutAPo7o8hx+XXn56ogzdoUrcFPJZJUx2R2nyOVbSlGMIjtFtw==} dev: true - /@unocss/rule-utils@0.58.4: - resolution: {integrity: sha512-52Jp4I+joGTaDm7ehB/7uZ2kJL+9BZcYRDUVk4IDacDH5W9yxf1F75LzYT8jJVWXD/HIhiS0r9V6qhcBq2OWZw==} + /@unocss/rule-utils@0.58.5: + resolution: {integrity: sha512-w0sGJoeUGwMWLVFLEE9PDiv/fQcQqZnTIIQLYNCjTdqXDRlwTp9ACW0h47x/hAAIXdOtEOOBuTfjGD79GznUmA==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.58.4 - magic-string: 0.30.5 + '@unocss/core': 0.58.5 + magic-string: 0.30.6 dev: true - /@unocss/scope@0.58.4: - resolution: {integrity: sha512-JrX98xoYnv0HN41WyzlvCCU1T3jnDOry+V8mm2dB9DvByzxI484X6gtKbOXlJFAPwOlZPU5Bru/XTDaL6yQQww==} + /@unocss/scope@0.58.5: + resolution: {integrity: sha512-vSentagAwYTnThGRCjzZ6eNSSRuzdWBl21L1BbvVNM91Ss/FugQnZ1hd0m3TrVvvStYXnFVHMQ/MjCAEJ4cMYg==} dev: true - /@unocss/transformer-attributify-jsx-babel@0.58.4: - resolution: {integrity: sha512-yJd+OxAdgAxSQHVrqC6z19ibPqwwWO7J0TFf2caiP3hidSJ0iOvxcC0h62YCMr9dg4MsCpXaiHmGzxXbWGJ9nQ==} + /@unocss/transformer-attributify-jsx-babel@0.58.5: + resolution: {integrity: sha512-IAWSSKN3V0D87DE8bqaaPrZBWOdWQ06QNfi9vRuQJfRWOui87ezi9+NffjcnQw/ap9xMk1O6z74/WOW3zo6uYA==} dependencies: '@babel/core': 7.23.9 '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.23.9) '@babel/preset-typescript': 7.23.3(@babel/core@7.23.9) - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 transitivePeerDependencies: - supports-color dev: true - /@unocss/transformer-attributify-jsx@0.58.4: - resolution: {integrity: sha512-Y4YMVkgY/EF7x0llV8Y42WGs8b77hbXkPstRLNeRD5x8KBNKnjYUXADwhTBEKXjDR8/y5Ewie8u43i1nbh1XuA==} + /@unocss/transformer-attributify-jsx@0.58.5: + resolution: {integrity: sha512-sItEALyvAt3PZLd9Q1tlIATjaj3kWbS/qI3otUVsYBdZjP4UudzJ3D1fcWNL2WPlgz8KtlVzRUuxob8TQ4ibZg==} dependencies: - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 dev: true - /@unocss/transformer-compile-class@0.58.4: - resolution: {integrity: sha512-GPz462ogvtb64W0iweuB0Dcm1snGsGte0RlVpFUeG2eWlVqKMRvNRtYuive2Ky2zSZKefWJQBGk3Ti+7CM4wFA==} + /@unocss/transformer-compile-class@0.58.5: + resolution: {integrity: sha512-4MaxjaZo1rf5uHvDGa2mbnXxAYVYoj1+oRNpL4fE3FoExS1Ka2CiNGQn/S4bHMF51vmXMSWtOzurJpPD4BaJUQ==} dependencies: - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 dev: true - /@unocss/transformer-directives@0.58.4: - resolution: {integrity: sha512-5g2XVhwpmu2IrGHqPwxh+S3ZtkC/AwAtLIBLWB1QNhY3HVzAAaOzcif6uarngrCTTDQSDmsjzm8TSAq26LtCmQ==} + /@unocss/transformer-directives@0.58.5: + resolution: {integrity: sha512-allspF5TlT1B2bJSZ1houHScXOTaTPlatLiEmgQKzr/m93rCvktokaO5J6qeN2VXQdpTIsxdA5B8//7UkfTuIA==} dependencies: - '@unocss/core': 0.58.4 - '@unocss/rule-utils': 0.58.4 + '@unocss/core': 0.58.5 + '@unocss/rule-utils': 0.58.5 css-tree: 2.3.1 dev: true - /@unocss/transformer-variant-group@0.58.4: - resolution: {integrity: sha512-zpJ4TMor7aJ3SoLJm4jNBOSqikyXUdQEO1AxkILd9Zcn7JWRgudfFXiXnFP+WGJcs9mMLoUiISxzT8SKNCckfA==} + /@unocss/transformer-variant-group@0.58.5: + resolution: {integrity: sha512-SjUwGzKK5CVqn7Gg+3v3hV47ZUll7GcGu0vR3RCLO4gqEfFlZWMTHml1Sl2sY1WAca2iVcDRu+dp0RLxRG/dUA==} dependencies: - '@unocss/core': 0.58.4 + '@unocss/core': 0.58.5 dev: true - /@unocss/vite@0.58.4(rollup@4.9.6)(vite@5.0.12): - resolution: {integrity: sha512-TqD5fIXv6NF3v10FFrCII//GRbkou6Dn/OzW+d4T5f0KM5+T6DutljpYUdGo0+2QXKDroUWLAspFUaZUx8iwVw==} + /@unocss/vite@0.58.5(rollup@4.9.6)(vite@5.0.12): + resolution: {integrity: sha512-p4o1XNX1rvjmoUqSSdua8XyWNg/d+YUChDd2L/xEty+6j2qv0wUaohs3UQ87vWlv632/UmgdX+2MbrgtqthCtw==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 dependencies: '@ampproject/remapping': 2.2.1 '@rollup/pluginutils': 5.1.0(rollup@4.9.6) - '@unocss/config': 0.58.4 - '@unocss/core': 0.58.4 - '@unocss/inspector': 0.58.4 - '@unocss/scope': 0.58.4 - '@unocss/transformer-directives': 0.58.4 + '@unocss/config': 0.58.5 + '@unocss/core': 0.58.5 + '@unocss/inspector': 0.58.5 + '@unocss/scope': 0.58.5 + '@unocss/transformer-directives': 0.58.5 chokidar: 3.5.3 fast-glob: 3.3.2 - magic-string: 0.30.5 + magic-string: 0.30.6 vite: 5.0.12(@types/node@20.11.16) transitivePeerDependencies: - rollup @@ -3487,6 +3489,7 @@ packages: /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} + requiresBuild: true dependencies: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 @@ -4577,7 +4580,7 @@ packages: eslint: /eslint-ts-patch@8.56.0-0 eslint-formatting-reporter: 0.0.0(eslint-ts-patch@8.56.0-0) eslint-parser-plain: 0.1.0 - prettier: 3.2.4 + prettier: 3.2.5 synckit: 0.8.8 dev: true @@ -6060,6 +6063,13 @@ packages: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + /magic-string@0.30.6: + resolution: {integrity: sha512-n62qCLbPjNjyo+owKtveQxZFZTBm+Ms6YoGD23Wew6Vw337PElFNifQpknPruVRQV57kVShPnLGo9vWxVhpPvA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /magicast@0.3.3: resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==} dependencies: @@ -7679,8 +7689,8 @@ packages: fast-diff: 1.3.0 dev: true - /prettier@3.2.4: - resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==} + /prettier@3.2.5: + resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} engines: {node: '>=14'} hasBin: true dev: true @@ -8548,8 +8558,8 @@ packages: engines: {node: '>=14.0.0'} dev: true - /tm-grammars@1.1.2: - resolution: {integrity: sha512-MCkNL3nPRkd9WNtWk0DCLJtWcmeQprrJ4q3SjxWs2o2ibVlrcc8FfQssxX9n9QfYHpx6rKN2EjEqHcPrYipgAg==} + /tm-grammars@1.1.3: + resolution: {integrity: sha512-MDyg6OuRsxz8Lv6nobIlDOsnFRKdGIXFCbnxNimtKtOPc+zJVo1/PVp2Br6zvHqCviSu4CxMGWX/lwp/ID9j0Q==} dev: true /tm-themes@1.1.1: @@ -8638,20 +8648,20 @@ packages: - supports-color dev: true - /twoslash-vue@0.1.0(typescript@5.3.3): - resolution: {integrity: sha512-4IVOdvQcjLY5KTrsR9GuTUAThhpYQqkkKawCtfUaTSkui3CXR2KPYBJMvY5yM1by+TkENBlW1ykLywP2BGukHg==} + /twoslash-vue@0.1.1(typescript@5.3.3): + resolution: {integrity: sha512-rqsL5wbXzG5umZsoi+TWI8I+yKU7F0FkgMoui6qQYuu21lF7pis49o6zwWNJcLEiD6NezCohS4O79QoaI0H/mg==} peerDependencies: typescript: '*' dependencies: '@vue/language-core': 1.8.27(typescript@5.3.3) - twoslash: 0.1.0(typescript@5.3.3) + twoslash: 0.1.1(typescript@5.3.3) typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: false - /twoslash@0.1.0(typescript@5.3.3): - resolution: {integrity: sha512-zvDn23/FwNdi/i2xMTTDcn7xnX4iKlp6tJt68aD86zRqesQrb/HOnMBtaUu6+vme4gtlX9ScEfKYog1+7IPKSw==} + /twoslash@0.1.1(typescript@5.3.3): + resolution: {integrity: sha512-lpGq143m4KDz0kWk+D8TjAXDIdiwfLD1vJ6rV9ga+gWZglVG4MWOjuKrflJSPVVTFLv0FDywFLgOjQ6pepJoGQ==} peerDependencies: typescript: '*' dependencies: @@ -8839,11 +8849,11 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /unocss@0.58.4(postcss@8.4.33)(rollup@4.9.6)(vite@5.0.12): - resolution: {integrity: sha512-JYeQddAIObJPr6nuxahOgku0MIzjIaQ2P73KtJr0zSuzx6kiq20jf67FgDIOP1Ks6s7iJd7Ga3yuY2h49XjDjg==} + /unocss@0.58.5(postcss@8.4.33)(rollup@4.9.6)(vite@5.0.12): + resolution: {integrity: sha512-0g4P6jLgRRNnhscxw7nQ9RHGrKJ1UPPiHPet+YT3TXUcmy4mTiYgo9+kGQf5bjyrzsELJ10cT6Qz2y6g9Tls4g==} engines: {node: '>=14'} peerDependencies: - '@unocss/webpack': 0.58.4 + '@unocss/webpack': 0.58.5 vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 peerDependenciesMeta: '@unocss/webpack': @@ -8851,26 +8861,26 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.58.4(rollup@4.9.6)(vite@5.0.12) - '@unocss/cli': 0.58.4(rollup@4.9.6) - '@unocss/core': 0.58.4 - '@unocss/extractor-arbitrary-variants': 0.58.4 - '@unocss/postcss': 0.58.4(postcss@8.4.33) - '@unocss/preset-attributify': 0.58.4 - '@unocss/preset-icons': 0.58.4 - '@unocss/preset-mini': 0.58.4 - '@unocss/preset-tagify': 0.58.4 - '@unocss/preset-typography': 0.58.4 - '@unocss/preset-uno': 0.58.4 - '@unocss/preset-web-fonts': 0.58.4 - '@unocss/preset-wind': 0.58.4 - '@unocss/reset': 0.58.4 - '@unocss/transformer-attributify-jsx': 0.58.4 - '@unocss/transformer-attributify-jsx-babel': 0.58.4 - '@unocss/transformer-compile-class': 0.58.4 - '@unocss/transformer-directives': 0.58.4 - '@unocss/transformer-variant-group': 0.58.4 - '@unocss/vite': 0.58.4(rollup@4.9.6)(vite@5.0.12) + '@unocss/astro': 0.58.5(rollup@4.9.6)(vite@5.0.12) + '@unocss/cli': 0.58.5(rollup@4.9.6) + '@unocss/core': 0.58.5 + '@unocss/extractor-arbitrary-variants': 0.58.5 + '@unocss/postcss': 0.58.5(postcss@8.4.33) + '@unocss/preset-attributify': 0.58.5 + '@unocss/preset-icons': 0.58.5 + '@unocss/preset-mini': 0.58.5 + '@unocss/preset-tagify': 0.58.5 + '@unocss/preset-typography': 0.58.5 + '@unocss/preset-uno': 0.58.5 + '@unocss/preset-web-fonts': 0.58.5 + '@unocss/preset-wind': 0.58.5 + '@unocss/reset': 0.58.5 + '@unocss/transformer-attributify-jsx': 0.58.5 + '@unocss/transformer-attributify-jsx-babel': 0.58.5 + '@unocss/transformer-compile-class': 0.58.5 + '@unocss/transformer-directives': 0.58.5 + '@unocss/transformer-variant-group': 0.58.5 + '@unocss/vite': 0.58.5(rollup@4.9.6)(vite@5.0.12) vite: 5.0.12(@types/node@20.11.16) transitivePeerDependencies: - postcss