πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
Book a DemoInstallSign in
Socket

@uiw/react-markdown-editor

Package Overview
Dependencies
Maintainers
2
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-markdown-editor - npm Package Compare versions

Comparing version

to
6.1.1

4

cjs/index.d.ts

@@ -34,4 +34,6 @@ import React from 'react';

toolbarBottom?: boolean;
/** Option to hide the tool bar. @deprecated The next major version will be deprecated. Please use `showToolbar`. */
hideToolbar?: boolean;
/** Option to hide the tool bar. */
hideToolbar?: boolean;
showToolbar?: boolean;
/** [@uiw/react-markdown-preview](https://github.com/uiwjs/react-markdown-preview#options-props) options */

@@ -38,0 +40,0 @@ previewProps?: MarkdownPreviewProps;

@@ -60,3 +60,3 @@ "use strict";

var _jsxRuntime = require("react/jsx-runtime");
var _excluded = ["prefixCls", "className", "onChange", "toolbars", "toolbarsMode", "toolbarsFilter", "visible", "renderPreview", "visibleEditor", "hideToolbar", "toolbarBottom", "enableScroll", "enablePreview", "previewProps", "extensions", "previewWidth", "reExtensions", "onPreviewMode"];
var _excluded = ["prefixCls", "className", "onChange", "toolbars", "toolbarsMode", "toolbarsFilter", "visible", "renderPreview", "visibleEditor", "hideToolbar", "showToolbar", "toolbarBottom", "enableScroll", "enablePreview", "previewProps", "extensions", "previewWidth", "reExtensions", "onPreviewMode"];
var scrollerStyle = exports.scrollerStyle = _view.EditorView.theme({

@@ -86,4 +86,5 @@ '&.cm-editor, & .cm-scroller': {

visibleEditor = _props$visibleEditor === void 0 ? true : _props$visibleEditor,
_props$hideToolbar = props.hideToolbar,
hideToolbar = _props$hideToolbar === void 0 ? true : _props$hideToolbar,
hideToolbar = props.hideToolbar,
_props$showToolbar = props.showToolbar,
showToolbar = _props$showToolbar === void 0 ? true : _props$showToolbar,
_props$toolbarBottom = props.toolbarBottom,

@@ -214,3 +215,4 @@ toolbarBottom = _props$toolbarBottom === void 0 ? false : _props$toolbarBottom,

var toolsMode = toolbarsFilter ? toolbarsMode.filter(toolbarsFilter) : toolbarsMode;
var toolbarView = hideToolbar && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
var isShowToolbar = hideToolbar !== null && hideToolbar !== void 0 ? hideToolbar : showToolbar;
var toolbarView = isShowToolbar && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: clsToolbar,

@@ -217,0 +219,0 @@ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ToolBar["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, toolBarProps), {}, {

import { EditorSelection } from '@codemirror/state';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export var code = {

@@ -5,0 +4,0 @@ name: 'code',

import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["prefixCls", "className", "onClick", "toolbars", "editor", "mode", "preview", "container", "containerEditor", "editorProps"];
import React from 'react';
import React, { createElement as _createElement } from 'react';
import { defaultCommands } from '../../commands';
import "./index.css";
import { createElement as _createElement } from "react";
import { jsx as _jsx } from "react/jsx-runtime";

@@ -9,0 +8,0 @@ export default function ToolBar(props) {

@@ -34,4 +34,6 @@ import React from 'react';

toolbarBottom?: boolean;
/** Option to hide the tool bar. @deprecated The next major version will be deprecated. Please use `showToolbar`. */
hideToolbar?: boolean;
/** Option to hide the tool bar. */
hideToolbar?: boolean;
showToolbar?: boolean;
/** [@uiw/react-markdown-preview](https://github.com/uiwjs/react-markdown-preview#options-props) options */

@@ -38,0 +40,0 @@ previewProps?: MarkdownPreviewProps;

import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["prefixCls", "className", "onChange", "toolbars", "toolbarsMode", "toolbarsFilter", "visible", "renderPreview", "visibleEditor", "hideToolbar", "toolbarBottom", "enableScroll", "enablePreview", "previewProps", "extensions", "previewWidth", "reExtensions", "onPreviewMode"];
var _excluded = ["prefixCls", "className", "onChange", "toolbars", "toolbarsMode", "toolbarsFilter", "visible", "renderPreview", "visibleEditor", "hideToolbar", "showToolbar", "toolbarBottom", "enableScroll", "enablePreview", "previewProps", "extensions", "previewWidth", "reExtensions", "onPreviewMode"];
import React, { useState, useRef, useImperativeHandle, Fragment, useEffect, useCallback } from 'react';

@@ -15,4 +15,3 @@ import { markdown, markdownLanguage } from '@codemirror/lang-markdown';

import "./index.css";
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export * from './theme';

@@ -41,3 +40,4 @@ export * from './commands';

visibleEditor = true,
hideToolbar = true,
hideToolbar,
showToolbar = true,
toolbarBottom = false,

@@ -151,3 +151,4 @@ enableScroll = true,

var toolsMode = toolbarsFilter ? toolbarsMode.filter(toolbarsFilter) : toolbarsMode;
var toolbarView = hideToolbar && /*#__PURE__*/_jsxs("div", {
var isShowToolbar = hideToolbar != null ? hideToolbar : showToolbar;
var toolbarView = isShowToolbar && /*#__PURE__*/_jsxs("div", {
className: clsToolbar,

@@ -154,0 +155,0 @@ children: [/*#__PURE__*/_jsx(ToolBar, _extends({}, toolBarProps, {

{
"name": "@uiw/react-markdown-editor",
"version": "6.1.0",
"version": "6.1.1",
"description": "A markdown editor with preview, implemented with React.js and TypeScript.",

@@ -5,0 +5,0 @@ "homepage": "https://uiwjs.github.io/react-markdown-editor",

@@ -5,3 +5,3 @@ <!--rehype:ignore:start-->

<a href="https://github.com/uiwjs/react-markdown-editor">
<img alt="React Markdown Editor logo" src="https://github.com/uiwjs/react-markdown-editor/assets/1680273/8877c62e-9a74-48db-baca-8b1453ef929a">
<img alt="React Markdown Editor logo" src="https://github.com/uiwjs/react-markdown-editor/assets/1680273/d51ea355-4804-4c17-a4ab-6adf4803aa89">
</a>

@@ -292,4 +292,6 @@ </p>

toolbarBottom?: boolean;
/** Option to hide the tool bar. @deprecated The next major version will be deprecated. Please use `showToolbar`. */
hideToolbar?: boolean;
/** Option to hide the tool bar. */
hideToolbar?: boolean;
showToolbar?: boolean;
/** [@uiw/react-markdown-preview](https://github.com/uiwjs/react-markdown-preview#options-props) options */

@@ -296,0 +298,0 @@ previewProps?: MarkdownPreviewProps;

Sorry, the diff of this file is not supported yet