From 77ac14ca3464bd6a50a07fe47db5bf9bec797593 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 19 Jun 2023 21:22:24 +0800 Subject: [PATCH] released v1.0.0 --- core/README.md | 2 +- core/package.json | 2 +- lerna.json | 2 +- www/package.json | 4 ++-- www/src/Markdown.tsx | 5 +++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/README.md b/core/README.md index 291fbede..2a95712b 100644 --- a/core/README.md +++ b/core/README.md @@ -138,7 +138,7 @@ export default function Demo() { Online custom style example, please check in the [documentation website](https://uiwjs.github.io/react-json-view/) -```tsx mdx:preview +```tsx mdx:preview:&title=Online Editing Theme import React, { useState, useRef } from 'react'; import Colorful from '@uiw/react-color-colorful'; import JsonView from '@uiw/react-json-view'; diff --git a/core/package.json b/core/package.json index a27bb55a..741d73f5 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@uiw/react-json-view", - "version": "0.1.0", + "version": "1.0.0", "description": "JSON viewer for react.", "main": "cjs/index.js", "module": "esm/index.js", diff --git a/lerna.json b/lerna.json index b1bfa115..ffd039e0 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.1.0", + "version": "1.0.0", "packages": [ "core", "www" diff --git a/www/package.json b/www/package.json index d946fd30..8c61ab80 100644 --- a/www/package.json +++ b/www/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "0.1.0", + "version": "1.0.0", "preview": true, "scripts": { "build": "kkt build", @@ -11,7 +11,7 @@ "@uiw/react-back-to-top": "1.2.3", "@uiw/react-color-colorful": "^1.3.1", "@uiw/react-github-corners": "^1.5.15", - "@uiw/react-json-view": "0.1.0", + "@uiw/react-json-view": "1.0.0", "@uiw/react-markdown-preview": "^4.1.0", "@wcj/dark-mode": "^1.0.13", "react": "^18.2.0", diff --git a/www/src/Markdown.tsx b/www/src/Markdown.tsx index 75f66c48..7feb7b81 100644 --- a/www/src/Markdown.tsx +++ b/www/src/Markdown.tsx @@ -1,5 +1,5 @@ import CodeLayout from 'react-code-preview-layout'; -import { getMetaId, isMeta } from 'markdown-react-code-preview-loader'; +import { getMetaId, isMeta, getURLParameters } from 'markdown-react-code-preview-loader'; import MarkdownPreview from '@uiw/react-markdown-preview'; import styled from 'styled-components'; import rehypeIgnore from 'rehype-ignore'; @@ -31,12 +31,13 @@ const CodePreview: CodeComponent | ReactMarkdownNames = ({ inline, node, ...prop const Child = data.components[`${metaId}`]; if (metaId && typeof Child === 'function') { const code = data.data[metaId].value || ''; + const { title } = getURLParameters(meta); return ( - Code Example + {title || 'Code Example'}