@lobehub/ui 2.12.1 → 2.12.2

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,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- var _excluded = ["ref", "children", "className", "style", "fullFeaturedCodeBlock", "onDoubleClick", "animated", "enableLatex", "enableMermaid", "enableImageGallery", "enableCustomFootnotes", "enableGithubAlert", "enableStream", "componentProps", "allowHtml", "borderRadius", "fontSize", "headerMultiple", "marginMultiple", "variant", "reactMarkdownProps", "lineHeight", "rehypePlugins", "remarkPlugins", "remarkPluginsAhead", "components", "customRender", "showFootnotes", "citations"];
4
+ var _excluded = ["ref", "children", "className", "style", "fullFeaturedCodeBlock", "onDoubleClick", "animated", "enableLatex", "enableMermaid", "enableImageGallery", "enableCustomFootnotes", "enableGithubAlert", "enableStream", "componentProps", "rehypePluginsAhead", "allowHtml", "borderRadius", "fontSize", "headerMultiple", "marginMultiple", "variant", "reactMarkdownProps", "lineHeight", "rehypePlugins", "remarkPlugins", "remarkPluginsAhead", "components", "customRender", "showFootnotes", "citations"];
5
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -37,6 +37,7 @@ var Markdown = /*#__PURE__*/memo(function (props) {
37
37
  _props$enableStream = props.enableStream,
38
38
  enableStream = _props$enableStream === void 0 ? true : _props$enableStream,
39
39
  componentProps = props.componentProps,
40
+ rehypePluginsAhead = props.rehypePluginsAhead,
40
41
  allowHtml = props.allowHtml,
41
42
  _props$borderRadius = props.borderRadius,
42
43
  borderRadius = _props$borderRadius === void 0 ? props.variant === 'chat' ? 4 : undefined : _props$borderRadius,
@@ -122,23 +123,22 @@ var Markdown = /*#__PURE__*/memo(function (props) {
122
123
  style: style
123
124
  }, rest), {}, {
124
125
  children: /*#__PURE__*/_jsx(MarkdownProvider, {
125
- config: {
126
- allowHtml: allowHtml,
127
- animated: delayedAnimated,
128
- citations: citations,
129
- componentProps: componentProps,
130
- components: components,
131
- enableCustomFootnotes: enableCustomFootnotes,
132
- enableGithubAlert: enableGithubAlert,
133
- enableLatex: enableLatex,
134
- enableMermaid: enableMermaid,
135
- fullFeaturedCodeBlock: fullFeaturedCodeBlock,
136
- rehypePlugins: rehypePlugins,
137
- remarkPlugins: remarkPlugins,
138
- remarkPluginsAhead: remarkPluginsAhead,
139
- showFootnotes: showFootnotes,
140
- variant: variant
141
- },
126
+ allowHtml: allowHtml,
127
+ animated: delayedAnimated,
128
+ citations: citations,
129
+ componentProps: componentProps,
130
+ components: components,
131
+ enableCustomFootnotes: enableCustomFootnotes,
132
+ enableGithubAlert: enableGithubAlert,
133
+ enableLatex: enableLatex,
134
+ enableMermaid: enableMermaid,
135
+ fullFeaturedCodeBlock: fullFeaturedCodeBlock,
136
+ rehypePlugins: rehypePlugins,
137
+ rehypePluginsAhead: rehypePluginsAhead,
138
+ remarkPlugins: remarkPlugins,
139
+ remarkPluginsAhead: remarkPluginsAhead,
140
+ showFootnotes: showFootnotes,
141
+ variant: variant,
142
142
  children: /*#__PURE__*/_jsx(Render, {
143
143
  enableStream: enableStream,
144
144
  reactMarkdownProps: reactMarkdownProps,
@@ -1,9 +1,6 @@
1
- import { type ReactNode } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  import type { SyntaxMarkdownProps } from '../type';
3
3
  export type MarkdownContentConfig = Omit<SyntaxMarkdownProps, 'children' | 'reactMarkdownProps'>;
4
4
  export declare const MarkdownContext: import("react").Context<MarkdownContentConfig>;
5
- export declare const MarkdownProvider: import("react").NamedExoticComponent<{
6
- children: ReactNode;
7
- config?: MarkdownContentConfig | undefined;
8
- }>;
5
+ export declare const MarkdownProvider: import("react").NamedExoticComponent<PropsWithChildren<MarkdownContentConfig>>;
9
6
  export declare const useMarkdownContext: () => MarkdownContentConfig;
@@ -1,12 +1,14 @@
1
1
  'use client';
2
2
 
3
+ var _excluded = ["children"];
4
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
3
6
  import { createContext, memo, use } from 'react';
4
7
  import { jsx as _jsx } from "react/jsx-runtime";
5
8
  export var MarkdownContext = /*#__PURE__*/createContext({});
6
9
  export var MarkdownProvider = /*#__PURE__*/memo(function (_ref) {
7
10
  var children = _ref.children,
8
- _ref$config = _ref.config,
9
- config = _ref$config === void 0 ? {} : _ref$config;
11
+ config = _objectWithoutProperties(_ref, _excluded);
10
12
  return /*#__PURE__*/_jsx(MarkdownContext, {
11
13
  value: config,
12
14
  children: children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",