@lobehub/ui 1.82.1 → 1.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { HighlighterOptions } from 'shiki-es';
2
+ import { type HighlighterCoreOptions } from 'shikiji';
3
3
  export interface SyntaxHighlighterProps {
4
4
  children: string;
5
5
  language: string;
6
- options?: HighlighterOptions;
6
+ options?: HighlighterCoreOptions;
7
7
  }
8
8
  declare const SyntaxHighlighter: import("react").NamedExoticComponent<SyntaxHighlighterProps>;
9
9
  export default SyntaxHighlighter;
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["children", "className", "style"];
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- import { Collapse, Divider, Typography } from 'antd';
6
+ import { Collapse, Divider, Image, Typography } from 'antd';
7
7
  import { memo } from 'react';
8
8
  import { ErrorBoundary } from 'react-error-boundary';
9
9
  import ReactMarkdown from 'react-markdown';
@@ -32,6 +32,7 @@ var Markdown = /*#__PURE__*/memo(function (_ref) {
32
32
  }
33
33
  });
34
34
  },
35
+ img: Image,
35
36
  pre: CodeBlock
36
37
  };
37
38
  return /*#__PURE__*/_jsx(Typography, {
@@ -1,4 +1,4 @@
1
- import { type Highlighter, type HighlighterOptions } from 'shiki-es';
1
+ import { type Highlighter, type HighlighterCoreOptions } from 'shikiji';
2
2
  export declare const languageMap: readonly ["javascript", "js", "jsx", "json", "markdown", "md", "less", "css", "typescript", "ts", "tsx", "diff", "bash"];
3
3
  /**
4
4
  * @title 代码高亮的存储对象
@@ -20,7 +20,7 @@ interface Store {
20
20
  * @title Initialize the highlighter object
21
21
  * @returns Initialization promise object
22
22
  */
23
- initHighlighter: (options?: HighlighterOptions) => Promise<void>;
23
+ initHighlighter: (options?: HighlighterCoreOptions) => Promise<void>;
24
24
  }
25
25
  export declare const useHighlight: import("zustand/traditional").UseBoundStoreWithEqualityFn<import("zustand/vanilla").StoreApi<Store>>;
26
26
  export {};
@@ -1,6 +1,6 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- import { getHighlighter } from 'shiki-es';
3
+ import { getHighlighter } from 'shikiji';
4
4
  import { shallow } from 'zustand/shallow';
5
5
  import { createWithEqualityFn } from 'zustand/traditional';
6
6
  import { themeConfig } from "../Highlighter/theme";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.82.1",
3
+ "version": "1.83.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -102,7 +102,7 @@
102
102
  "react-simple-code-editor": "^0",
103
103
  "rehype-raw": "^6",
104
104
  "remark-gfm": "^3",
105
- "shiki-es": "^0",
105
+ "shikiji": "^0",
106
106
  "styled-components": "^6",
107
107
  "three": "^0.150",
108
108
  "ts-md5": "^1",