diff --git a/package-lock.json b/package-lock.json index 99d616ed..ee38318e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@bendera/vscode-webview-elements": "0.6.2", "@estruyf/vscode": "^1.1.0", "@headlessui/react": "^1.7.17", - "@heroicons/react": "1.0.4", + "@heroicons/react": "^2.1.1", "@iarna/toml": "2.2.3", "@octokit/rest": "^18.12.0", "@popperjs/core": "^2.11.6", @@ -364,7 +364,9 @@ } }, "node_modules/@heroicons/react": { - "version": "1.0.4", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.1.tgz", + "integrity": "sha512-JyyN9Lo66kirbCMuMMRPtJxtKJoIsXKS569ebHGGRKbl8s4CtUfLnyKJxteA+vIKySocO4s1SkTkGS4xtG/yEA==", "dev": true, "peerDependencies": { "react": ">= 16" @@ -13333,7 +13335,9 @@ } }, "@heroicons/react": { - "version": "1.0.4", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.1.1.tgz", + "integrity": "sha512-JyyN9Lo66kirbCMuMMRPtJxtKJoIsXKS569ebHGGRKbl8s4CtUfLnyKJxteA+vIKySocO4s1SkTkGS4xtG/yEA==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index 90600fd0..b56558ba 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "color": "#0e131f", "theme": "dark" }, - "badges": [{ + "badges": [ + { "description": "version", "url": "https://img.shields.io/github/package-json/v/estruyf/vscode-front-matter?color=green&label=vscode-front-matter&style=flat-square", "href": "https://github.com/estruyf/vscode-front-matter" @@ -70,7 +71,8 @@ "**/.frontmatter/config/*.json": "jsonc" } }, - "keybindings": [{ + "keybindings": [ + { "command": "frontMatter.dashboard", "key": "alt+d" }, @@ -88,19 +90,23 @@ } ], "viewsContainers": { - "activitybar": [{ - "id": "frontmatter-explorer", - "title": "FM", - "icon": "$(fm-logo)" - }] + "activitybar": [ + { + "id": "frontmatter-explorer", + "title": "FM", + "icon": "$(fm-logo)" + } + ] }, "views": { - "frontmatter-explorer": [{ - "id": "frontMatter.explorer", - "name": "Front Matter", - "icon": "$(fm-logo)", - "type": "webview" - }] + "frontmatter-explorer": [ + { + "id": "frontMatter.explorer", + "name": "Front Matter", + "icon": "$(fm-logo)", + "type": "webview" + } + ] }, "configuration": { "title": "%settings.configuration.title%", @@ -168,7 +174,8 @@ "frontMatter.content.defaultFileType": { "type": "string", "default": "md", - "oneOf": [{ + "oneOf": [ + { "enum": [ "md", "mdx" @@ -184,7 +191,8 @@ "frontMatter.content.defaultSorting": { "type": "string", "default": "", - "oneOf": [{ + "oneOf": [ + { "enum": [ "LastModifiedAsc", "LastModifiedDesc", @@ -536,7 +544,8 @@ "command": { "$id": "#scriptCommand", "type": "string", - "anyOf": [{ + "anyOf": [ + { "enum": [ "node", "bash", @@ -743,7 +752,8 @@ "title", "file" ], - "anyOf": [{ + "anyOf": [ + { "required": [ "schema" ] @@ -797,7 +807,8 @@ "id", "path" ], - "anyOf": [{ + "anyOf": [ + { "required": [ "schema" ] @@ -1198,7 +1209,8 @@ "default": "", "description": "%setting.frontMatter.taxonomy.contentTypes.items.properties.fields.items.properties.taxonomyId.description%", "not": { - "anyOf": [{ + "anyOf": [ + { "const": "" }, { @@ -1392,7 +1404,8 @@ "type", "name" ], - "allOf": [{ + "allOf": [ + { "if": { "properties": { "type": { @@ -1592,48 +1605,51 @@ "fields" ] }, - "default": [{ - "name": "default", - "pageBundle": false, - "fields": [{ - "title": "Title", - "name": "title", - "type": "string" - }, - { - "title": "Description", - "name": "description", - "type": "string" - }, - { - "title": "Publishing date", - "name": "date", - "type": "datetime", - "default": "{{now}}", - "isPublishDate": true - }, - { - "title": "Content preview", - "name": "preview", - "type": "image" - }, - { - "title": "Is in draft", - "name": "draft", - "type": "boolean" - }, - { - "title": "Tags", - "name": "tags", - "type": "tags" - }, - { - "title": "Categories", - "name": "categories", - "type": "categories" - } - ] - }], + "default": [ + { + "name": "default", + "pageBundle": false, + "fields": [ + { + "title": "Title", + "name": "title", + "type": "string" + }, + { + "title": "Description", + "name": "description", + "type": "string" + }, + { + "title": "Publishing date", + "name": "date", + "type": "datetime", + "default": "{{now}}", + "isPublishDate": true + }, + { + "title": "Content preview", + "name": "preview", + "type": "image" + }, + { + "title": "Is in draft", + "name": "draft", + "type": "boolean" + }, + { + "title": "Tags", + "name": "tags", + "type": "tags" + }, + { + "title": "Categories", + "name": "categories", + "type": "categories" + } + ] + } + ], "scope": "Taxonomy" }, "frontMatter.taxonomy.customTaxonomy": { @@ -1646,7 +1662,8 @@ "type": "string", "description": "%setting.frontMatter.taxonomy.customTaxonomy.items.properties.id.description%", "not": { - "anyOf": [{ + "anyOf": [ + { "const": "" }, { @@ -1838,7 +1855,8 @@ } } }, - "commands": [{ + "commands": [ + { "command": "frontMatter.project.switch", "title": "%command.frontMatter.project.switch%", "category": "Front Matter", @@ -2155,12 +2173,15 @@ "category": "Front Matter" } ], - "submenus": [{ - "id": "frontmatter.submenu", - "label": "Front Matter" - }], + "submenus": [ + { + "id": "frontmatter.submenu", + "label": "Front Matter" + } + ], "menus": { - "editor/title": [{ + "editor/title": [ + { "command": "frontMatter.markup.heading", "group": "navigation@-133", "when": "frontMatter:file:isValid == true && frontMatter:markdown:wysiwyg" @@ -2241,11 +2262,14 @@ "when": "resourceFilename == 'frontmatter.json'" } ], - "explorer/context": [{ - "submenu": "frontmatter.submenu", - "group": "frontmatter@1" - }], - "frontmatter.submenu": [{ + "explorer/context": [ + { + "submenu": "frontmatter.submenu", + "group": "frontmatter@1" + } + ], + "frontmatter.submenu": [ + { "command": "frontMatter.createFromTemplate", "when": "explorerResourceIsFolder", "group": "frontmatter@1" @@ -2261,7 +2285,8 @@ "group": "frontmatter@3" } ], - "commandPalette": [{ + "commandPalette": [ + { "command": "frontMatter.init", "when": "frontMatterCanInit" }, @@ -2410,7 +2435,8 @@ "when": "frontMatter:file:isValid == true" } ], - "view/title": [{ + "view/title": [ + { "command": "frontMatter.chatbot", "group": "navigation@0", "when": "view == frontMatter.explorer" @@ -2442,52 +2468,57 @@ } ] }, - "grammars": [{ - "path": "./syntaxes/hugo.tmLanguage.json", - "scopeName": "frontmatter.markdown.hugo", - "injectTo": [ - "text.html.markdown" - ] - }], - "walkthroughs": [{ - "id": "frontmatter.welcome", - "title": "Get started with Front Matter", - "description": "Discover the features of Front Matter and learn how to use the CMS for your SSG or static site.", - "steps": [{ - "id": "frontmatter.welcome.init", - "title": "Get started", - "description": "Initial steps to get started.\n[Open dashboard](command:frontMatter.dashboard)", - "media": { - "markdown": "assets/walkthrough/get-started.md" + "grammars": [ + { + "path": "./syntaxes/hugo.tmLanguage.json", + "scopeName": "frontmatter.markdown.hugo", + "injectTo": [ + "text.html.markdown" + ] + } + ], + "walkthroughs": [ + { + "id": "frontmatter.welcome", + "title": "Get started with Front Matter", + "description": "Discover the features of Front Matter and learn how to use the CMS for your SSG or static site.", + "steps": [ + { + "id": "frontmatter.welcome.init", + "title": "Get started", + "description": "Initial steps to get started.\n[Open dashboard](command:frontMatter.dashboard)", + "media": { + "markdown": "assets/walkthrough/get-started.md" + }, + "completionEvents": [ + "onContext:frontMatterInitialized" + ] }, - "completionEvents": [ - "onContext:frontMatterInitialized" - ] - }, - { - "id": "frontmatter.welcome.documentation", - "title": "Documentation", - "description": "Check out the documentation for Front Matter.\n[View our documentation](https://frontmatter.codes/docs)", - "media": { - "markdown": "assets/walkthrough/documentation.md" + { + "id": "frontmatter.welcome.documentation", + "title": "Documentation", + "description": "Check out the documentation for Front Matter.\n[View our documentation](https://frontmatter.codes/docs)", + "media": { + "markdown": "assets/walkthrough/documentation.md" + }, + "completionEvents": [ + "onLink:https://frontmatter.codes/docs" + ] }, - "completionEvents": [ - "onLink:https://frontmatter.codes/docs" - ] - }, - { - "id": "frontmatter.welcome.supporter", - "title": "Support the project", - "description": "Become a supporter.\n[Support the project](https://github.com/sponsors/estruyf)", - "media": { - "markdown": "assets/walkthrough/support-the-project.md" - }, - "completionEvents": [ - "onLink:https://github.com/sponsors/estruyf" - ] - } - ] - }] + { + "id": "frontmatter.welcome.supporter", + "title": "Support the project", + "description": "Become a supporter.\n[Support the project](https://github.com/sponsors/estruyf)", + "media": { + "markdown": "assets/walkthrough/support-the-project.md" + }, + "completionEvents": [ + "onLink:https://github.com/sponsors/estruyf" + ] + } + ] + } + ] }, "scripts": { "dev:ext": "npm run clean && npm run localization:generate && npm-run-all --parallel watch:*", @@ -2519,7 +2550,7 @@ "@bendera/vscode-webview-elements": "0.6.2", "@estruyf/vscode": "^1.1.0", "@headlessui/react": "^1.7.17", - "@heroicons/react": "1.0.4", + "@heroicons/react": "^2.1.1", "@iarna/toml": "2.2.3", "@octokit/rest": "^18.12.0", "@popperjs/core": "^2.11.6", @@ -2624,4 +2655,4 @@ "vsce": { "dependencies": false } -} \ No newline at end of file +} diff --git a/src/components/uniforms-frontmatter/ListAddField.tsx b/src/components/uniforms-frontmatter/ListAddField.tsx index 4428fa0f..136d0a17 100644 --- a/src/components/uniforms-frontmatter/ListAddField.tsx +++ b/src/components/uniforms-frontmatter/ListAddField.tsx @@ -1,4 +1,4 @@ -import { PlusIcon } from '@heroicons/react/outline'; +import { PlusIcon } from '@heroicons/react/24/outline'; import * as React from 'react'; import { HTMLFieldProps, connectField, filterDOMProps, joinName, useField } from 'uniforms'; import './ListAddField.css'; diff --git a/src/components/uniforms-frontmatter/ListDelField.tsx b/src/components/uniforms-frontmatter/ListDelField.tsx index 074bc914..e5972c4f 100644 --- a/src/components/uniforms-frontmatter/ListDelField.tsx +++ b/src/components/uniforms-frontmatter/ListDelField.tsx @@ -1,4 +1,4 @@ -import { TrashIcon } from '@heroicons/react/outline'; +import { TrashIcon } from '@heroicons/react/24/outline'; import * as React from 'react'; import { HTMLFieldProps, connectField, filterDOMProps, joinName, useField } from 'uniforms'; import './ListDelField.css'; diff --git a/src/dashboardWebView/components/Chatbot/Chatbox.tsx b/src/dashboardWebView/components/Chatbot/Chatbox.tsx index 351b3b1c..43ac25ac 100644 --- a/src/dashboardWebView/components/Chatbot/Chatbox.tsx +++ b/src/dashboardWebView/components/Chatbot/Chatbox.tsx @@ -1,4 +1,4 @@ -import { PaperAirplaneIcon } from '@heroicons/react/outline'; +import { PaperAirplaneIcon } from '@heroicons/react/24/outline'; import * as React from 'react'; import { useCallback } from 'react'; import useThemeColors from '../../hooks/useThemeColors'; diff --git a/src/dashboardWebView/components/Chatbot/Feedback.tsx b/src/dashboardWebView/components/Chatbot/Feedback.tsx index 429054b8..535d3ee7 100644 --- a/src/dashboardWebView/components/Chatbot/Feedback.tsx +++ b/src/dashboardWebView/components/Chatbot/Feedback.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { ThumbDownIcon, ThumbUpIcon } from '@heroicons/react/outline'; -import { ThumbDownIcon as ThumbDownSolidIcon, ThumbUpIcon as ThumbUpSolidIcon } from '@heroicons/react/solid'; +import { HandThumbDownIcon, HandThumbUpIcon } from '@heroicons/react/24/outline'; +import { HandThumbDownIcon as ThumbDownSolidIcon, HandThumbUpIcon as ThumbUpSolidIcon } from '@heroicons/react/24/solid'; import { useCallback } from 'react'; import { useSettingsContext } from '../../providers/SettingsProvider'; @@ -53,7 +53,7 @@ export const Feedback: React.FunctionComponent = ({ isUpVoted ? ( ) : ( - + ) } @@ -64,7 +64,7 @@ export const Feedback: React.FunctionComponent = ({ isDownVoted ? ( ) : ( - + ) } diff --git a/src/dashboardWebView/components/Common/ChoiceButton.tsx b/src/dashboardWebView/components/Common/ChoiceButton.tsx index 3d20cfb5..8d44b5ac 100644 --- a/src/dashboardWebView/components/Common/ChoiceButton.tsx +++ b/src/dashboardWebView/components/Common/ChoiceButton.tsx @@ -1,5 +1,5 @@ import { Menu } from '@headlessui/react'; -import { ChevronDownIcon } from '@heroicons/react/outline'; +import { ChevronDownIcon } from '@heroicons/react/24/outline'; import * as React from 'react'; import useThemeColors from '../../hooks/useThemeColors'; import { MenuItem, MenuItems } from '../Menu'; diff --git a/src/dashboardWebView/components/Contents/ContentActions.tsx b/src/dashboardWebView/components/Contents/ContentActions.tsx index 6e3e81d4..04f73623 100644 --- a/src/dashboardWebView/components/Contents/ContentActions.tsx +++ b/src/dashboardWebView/components/Contents/ContentActions.tsx @@ -1,6 +1,6 @@ import { Messenger, messageHandler } from '@estruyf/vscode/dist/client'; import { Menu } from '@headlessui/react'; -import { EyeIcon, GlobeIcon, TerminalIcon, TrashIcon } from '@heroicons/react/outline'; +import { EyeIcon, GlobeEuropeAfricaIcon, CommandLineIcon, TrashIcon } from '@heroicons/react/24/outline'; import * as React from 'react'; import { CustomScript, ScriptType } from '../../../models'; import { DashboardMessage } from '../../DashboardMessage'; @@ -112,7 +112,7 @@ export const ContentActions: React.FunctionComponent = ({ key={script.title} title={
- {' '} + {' '} {script.title}
} @@ -145,7 +145,7 @@ export const ContentActions: React.FunctionComponent = ({ { settings?.websiteUrl && ( - ) } @@ -195,7 +195,7 @@ export const ContentActions: React.FunctionComponent = ({ - {' '} + {' '} {l10n.t(LocalizationKey.commonOpenOnWebsite)} } diff --git a/src/dashboardWebView/components/Contents/Overview.tsx b/src/dashboardWebView/components/Contents/Overview.tsx index 492214a5..a0f4a0ab 100644 --- a/src/dashboardWebView/components/Contents/Overview.tsx +++ b/src/dashboardWebView/components/Contents/Overview.tsx @@ -1,5 +1,5 @@ import { Disclosure } from '@headlessui/react'; -import { ChevronRightIcon } from '@heroicons/react/solid'; +import { ChevronRightIcon } from '@heroicons/react/24/solid'; import * as React from 'react'; import { useCallback, useMemo } from 'react'; import { useRecoilState, useRecoilValue } from 'recoil'; diff --git a/src/dashboardWebView/components/DataView/DataView.tsx b/src/dashboardWebView/components/DataView/DataView.tsx index ac9b24ab..f74f21cb 100644 --- a/src/dashboardWebView/components/DataView/DataView.tsx +++ b/src/dashboardWebView/components/DataView/DataView.tsx @@ -15,7 +15,7 @@ import { arrayMoveImmutable } from 'array-move'; import { EmptyView } from './EmptyView'; import { Container } from './SortableContainer'; import { SortableItem } from './SortableItem'; -import { ChevronRightIcon, DatabaseIcon } from '@heroicons/react/outline'; +import { ChevronRightIcon, CircleStackIcon } from '@heroicons/react/24/outline'; import { ToastContainer, toast, Slide } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import { DataType } from '../../../models/DataType'; @@ -297,7 +297,7 @@ export const DataView: React.FunctionComponent = ( 'text-[var(--frontmatter-text)]' ) }`}> - +

{l10n.t(LocalizationKey.dashboardDataViewDataViewNoDataFiles)}

void; } -const DragHandle = SortableHandle(() => ); +const DragHandle = SortableHandle(() => ); export const SortableItem = SortableElement( ({ diff --git a/src/dashboardWebView/components/ErrorView/index.tsx b/src/dashboardWebView/components/ErrorView/index.tsx index 078c0e0b..d30bcca7 100644 --- a/src/dashboardWebView/components/ErrorView/index.tsx +++ b/src/dashboardWebView/components/ErrorView/index.tsx @@ -1,4 +1,4 @@ -import { ExclamationIcon } from '@heroicons/react/solid'; +import { ExclamationTriangleIcon } from '@heroicons/react/24/solid'; import * as React from 'react'; import useThemeColors from '../../hooks/useThemeColors'; import * as l10n from '@vscode/l10n'; @@ -13,7 +13,7 @@ export const ErrorView: React.FunctionComponent = ( return (

- +

{l10n.t(LocalizationKey.commonErrorMessage)}

{l10n.t(LocalizationKey.dashboardErrorViewDescription)}

diff --git a/src/dashboardWebView/components/Header/Breadcrumb.tsx b/src/dashboardWebView/components/Header/Breadcrumb.tsx index ba3a5245..47f642d2 100644 --- a/src/dashboardWebView/components/Header/Breadcrumb.tsx +++ b/src/dashboardWebView/components/Header/Breadcrumb.tsx @@ -1,4 +1,4 @@ -import { CollectionIcon } from '@heroicons/react/outline'; +import { HomeModernIcon } from '@heroicons/react/24/outline'; import { basename, join } from 'path'; import * as React from 'react'; import { useRecoilState, useRecoilValue } from 'recoil'; @@ -91,7 +91,7 @@ export const Breadcrumb: React.FunctionComponent = ( `text-[var(--vscode-tab-inactiveForeground)] hover:text-[var(--vscode-tab-activeForeground)]` )} > -