diff --git a/www/.kktrc.ts b/www/.kktrc.ts index 9104e6a2..a95e68a7 100644 --- a/www/.kktrc.ts +++ b/www/.kktrc.ts @@ -1,12 +1,12 @@ import path from 'path'; -import webpack, { Configuration } from 'webpack'; -import { LoaderConfOptions } from 'kkt'; +import webpack from 'webpack'; +import { LoaderConfOptions, WebpackConfiguration } from 'kkt'; import lessModules from '@kkt/less-modules'; import scopePluginOptions from '@kkt/scope-plugin-options'; import { mdCodeModulesLoader } from 'markdown-react-code-preview-loader'; import pkg from './package.json'; -export default (conf: Configuration, env: 'production' | 'development', options: LoaderConfOptions) => { +export default (conf: WebpackConfiguration, env: 'production' | 'development', options: LoaderConfOptions) => { conf = lessModules(conf, env, options); conf = mdCodeModulesLoader(conf); conf = scopePluginOptions(conf, env, { diff --git a/www/package.json b/www/package.json index 7f3c1a15..6c56be3c 100644 --- a/www/package.json +++ b/www/package.json @@ -20,17 +20,12 @@ "source-map-explorer": "^2.5.3" }, "dependencies": { - "@uiw/react-github-corners": "~1.5.3", + "@uiw/react-markdown-preview-example": "^1.5.3", "@uiw/react-heat-map": "2.1.1", - "@uiw/react-markdown-preview": "^4.0.17", - "@uiw/react-shields": "~1.1.2", "@uiw/react-tooltip": "^4.21.11", "@uiw/reset.css": "^1.0.6", - "@wcj/dark-mode": "^1.0.15", "react": "^18.2.0", - "react-code-preview-layout": "^3.0.0", - "react-dom": "^18.2.0", - "rehype-ignore": "^1.0.5" + "react-dom": "^18.2.0" }, "eslintConfig": { "extends": [ diff --git a/www/src/App.module.less b/www/src/App.module.less deleted file mode 100644 index ed099579..00000000 --- a/www/src/App.module.less +++ /dev/null @@ -1,73 +0,0 @@ -html { - background-color: #282c34; - font-family: Alliance no\.1, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, - Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; -} - -.header { - background-color: #282c34; - min-height: calc(100vh - 80px); - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding-bottom: 30px; - color: white; -} -.version { - position: fixed; - z-index: 9; - left: 40px; - top: 10px; - background-color: #ffffff4f; -} -.logo { - max-width: 210px; -} - -.info { - font-size: 21px; - max-width: 520px; - text-align: center; -} - -.app { - padding-bottom: 70px; -} - -.content { - max-width: 950px; - margin: 0 auto; - padding-top: 125px; - > pre { - overflow-x: initial; - } -} - -.example { - background-color: #fff; - border-radius: 5px; - box-shadow: 0 0 0 1px rgb(16 22 26 / 10%), 0 0 0 rgb(16 22 26 / 0%), 0 1px 1px rgb(16 22 26 / 20%); - margin: 0 auto; - margin-top: 70px; - svg { - border-radius: 5px; - } -} - -.tools { - user-select: none; - font-size: 12px; - margin-top: 10px !important; - padding: 10px; - padding-left: 0px; - border-radius: 5px; - label { - display: flex; - align-items: center; - input { - margin-right: 5px; - margin-left: 10px; - } - } -} diff --git a/www/src/App.tsx b/www/src/App.tsx deleted file mode 100644 index 48fbfdd3..00000000 --- a/www/src/App.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import GitHubCorners from '@uiw/react-github-corners'; -import '@wcj/dark-mode'; -import MarkdownPreview from './Markdown'; -import Example from './Example'; -import logo from './logo.svg'; -import styles from './App.module.less'; - -const App: React.FC = () => { - return ( -
- React component create calendar heatmap to visualize time series data, a la github contribution graph. -
-
;
- }
- const line = node.position?.start.line;
- const metaId = getMetaId(meta) || String(line);
- const Child = data.components[`${metaId}`];
- if (metaId && typeof Child === 'function') {
- const code = data.data[metaId].value || '';
- const { title } = getURLParameters(meta);
- return (
-
-
-
-
;
-};
-
-export default function Markdown() {
- return (
-