@uiw/react-md-editor 3.11.2 → 3.11.3

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.
package/dist/mdeditor.js CHANGED
@@ -7,7 +7,7 @@
7
7
  exports["@uiw/react-md-editor"] = factory(require("react"));
8
8
  else
9
9
  root["@uiw/react-md-editor"] = factory(root["React"]);
10
- })(self, function(__WEBPACK_EXTERNAL_MODULE__787__) {
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__787__) => {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
@@ -10990,7 +10990,8 @@ module.exports = ReactPropTypesSecret;
10990
10990
  /***/ ((__unused_webpack_module, exports) => {
10991
10991
 
10992
10992
  "use strict";
10993
- /** @license React v17.0.2
10993
+ /**
10994
+ * @license React
10994
10995
  * react-is.production.min.js
10995
10996
  *
10996
10997
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -10998,12 +10999,11 @@ module.exports = ReactPropTypesSecret;
10998
10999
  * This source code is licensed under the MIT license found in the
10999
11000
  * LICENSE file in the root directory of this source tree.
11000
11001
  */
11001
- var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
11002
- if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden")}
11003
- function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;
11004
- exports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};
11005
- exports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
11006
- exports.typeOf=y;
11002
+ var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u=Symbol.for("react.module.reference");
11003
+ function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;
11004
+ exports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};
11005
+ exports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};
11006
+ exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;
11007
11007
 
11008
11008
 
11009
11009
  /***/ }),
@@ -21872,7 +21872,7 @@ const pointEnd = unist_util_position_point('end')
21872
21872
  /**
21873
21873
  * Get the positional info of `node`.
21874
21874
  *
21875
- * @param {NodeLike} [node]
21875
+ * @param {NodeLike|Node} [node]
21876
21876
  * @returns {Position}
21877
21877
  */
21878
21878
  function unist_util_position_position(node) {
@@ -21890,12 +21890,10 @@ function unist_util_position_point(type) {
21890
21890
  /**
21891
21891
  * Get the positional info of `node`.
21892
21892
  *
21893
- * @param {NodeLike} [node]
21893
+ * @param {NodeLike|Node} [node]
21894
21894
  * @returns {Point}
21895
21895
  */
21896
21896
  function point(node) {
21897
- /** @type {Point} */
21898
- // @ts-expect-error looks like a point
21899
21897
  const point = (node && node.position && node.position[type]) || {}
21900
21898
 
21901
21899
  return {
@@ -25755,7 +25753,7 @@ function flattenPosition(pos) {
25755
25753
  * @typedef PluginOptions
25756
25754
  * @property {PluggableList} [remarkPlugins=[]]
25757
25755
  * @property {PluggableList} [rehypePlugins=[]]
25758
- * @property {import('remark-rehype').Options} [remarkRehypeOptions={}]
25756
+ * @property {import('remark-rehype').Options | undefined} [remarkRehypeOptions={}]
25759
25757
  *
25760
25758
  * @typedef LayoutOptions
25761
25759
  * @property {string} [className]
@@ -57669,27 +57667,22 @@ function indexedSearch(query, parent, state, from, firstElementOnly) {
57669
57667
  * @typedef {Array<Tag>} Tags
57670
57668
  * @typedef {string} Range
57671
57669
  * @typedef {Array<Range>} Ranges
57672
- */
57673
-
57674
- /**
57670
+ *
57675
57671
  * @callback Check
57676
57672
  * @param {Tag} tag
57677
57673
  * @param {Range} range
57678
57674
  * @returns {boolean}
57675
+ *
57676
+ * @typedef {FilterOrLookup<true>} Filter
57677
+ * @typedef {FilterOrLookup<false>} Lookup
57679
57678
  */
57680
57679
 
57681
57680
  /**
57682
- * @callback Filter
57683
- * @param {Tag|Tags} tag
57684
- * @param {Range|Ranges} [ranges]
57685
- * @returns {Tag}
57686
- */
57687
-
57688
- /**
57689
- * @callback Lookup
57690
- * @param {Tag|Tags} tag
57691
- * @param {Range|Ranges} [ranges]
57692
- * @returns {Tag}
57681
+ * @template {boolean} IsFilter
57682
+ * @callback FilterOrLookup
57683
+ * @param {Tag|Tags} tags
57684
+ * @param {Range|Ranges} [ranges='*']
57685
+ * @returns {IsFilter extends true ? Tags : Tag|undefined}
57693
57686
  */
57694
57687
 
57695
57688
  /**
@@ -57701,163 +57694,136 @@ function indexedSearch(query, parent, state, from, firstElementOnly) {
57701
57694
  * iterates over tags. That way, earlier ranges matching any tag have
57702
57695
  * precedence over later ranges.
57703
57696
  *
57704
- * @type {{
57705
- * (check: Check, filter: true): Filter
57706
- * (check: Check, filter?: false): Lookup
57707
- * }}
57708
- */
57709
- // prettier-ignore
57710
- const bcp_47_match_factory = (
57711
- /**
57712
- * @param {Check} check
57713
- * @param {boolean} [filter=false]
57714
- */
57715
- function (check, filter) {
57716
- return match
57717
-
57718
- /**
57719
- * @param {Tag|Tags} tags
57720
- * @param {Range|Ranges} [ranges='*']
57721
- * @returns {Tag|Tags|undefined}
57722
- */
57723
- function match(tags, ranges) {
57724
- let left = cast(tags, 'tag')
57725
- const right = cast(
57726
- ranges === null || ranges === undefined ? '*' : ranges,
57727
- 'range'
57728
- )
57729
- /** @type {Tags} */
57730
- const matches = []
57731
- let rightIndex = -1
57732
-
57733
- while (++rightIndex < right.length) {
57734
- const range = right[rightIndex].toLowerCase()
57697
+ * @template {boolean} IsFilter
57698
+ * @param {Check} check
57699
+ * @param {IsFilter} filter
57700
+ * @returns {FilterOrLookup<IsFilter>}
57701
+ */
57702
+ function bcp_47_match_factory(check, filter) {
57703
+ return function (tags, ranges) {
57704
+ let left = cast(tags, 'tag')
57705
+ const right = cast(
57706
+ ranges === null || ranges === undefined ? '*' : ranges,
57707
+ 'range'
57708
+ )
57709
+ /** @type {Tags} */
57710
+ const matches = []
57711
+ let rightIndex = -1
57735
57712
 
57736
- // Ignore wildcards in lookup mode.
57737
- if (!filter && range === '*') continue
57713
+ while (++rightIndex < right.length) {
57714
+ const range = right[rightIndex].toLowerCase()
57738
57715
 
57739
- let leftIndex = -1
57740
- /** @type {Tags} */
57741
- const next = []
57716
+ // Ignore wildcards in lookup mode.
57717
+ if (!filter && range === '*') continue
57742
57718
 
57743
- while (++leftIndex < left.length) {
57744
- if (check(left[leftIndex].toLowerCase(), range)) {
57745
- // Exit if this is a lookup and we have a match.
57746
- if (!filter) return left[leftIndex]
57747
- matches.push(left[leftIndex])
57748
- } else {
57749
- next.push(left[leftIndex])
57719
+ let leftIndex = -1
57720
+ /** @type {Tags} */
57721
+ const next = []
57722
+
57723
+ while (++leftIndex < left.length) {
57724
+ if (check(left[leftIndex].toLowerCase(), range)) {
57725
+ // Exit if this is a lookup and we have a match.
57726
+ if (!filter) {
57727
+ return /** @type {IsFilter extends true ? Tags : Tag|undefined} */ (
57728
+ left[leftIndex]
57729
+ )
57750
57730
  }
57751
- }
57752
57731
 
57753
- left = next
57732
+ matches.push(left[leftIndex])
57733
+ } else {
57734
+ next.push(left[leftIndex])
57735
+ }
57754
57736
  }
57755
57737
 
57756
- // If this is a filter, return the list. If it’s a lookup, we didn’t find
57757
- // a match, so return `undefined`.
57758
- return filter ? matches : undefined
57738
+ left = next
57759
57739
  }
57740
+
57741
+ // If this is a filter, return the list. If it’s a lookup, we didn’t find
57742
+ // a match, so return `undefined`.
57743
+ return /** @type {IsFilter extends true ? Tags : Tag|undefined} */ (
57744
+ filter ? matches : undefined
57745
+ )
57760
57746
  }
57761
- )
57747
+ }
57762
57748
 
57763
57749
  /**
57764
57750
  * Basic Filtering (Section 3.3.1) matches a language priority list consisting
57765
57751
  * of basic language ranges (Section 2.1) to sets of language tags.
57766
- * @param {Tag|Tags} tags
57767
- * @param {Range|Ranges} [ranges]
57768
- * @returns {Tags}
57769
57752
  */
57770
- const basicFilter = bcp_47_match_factory(
57771
- /** @type {Check} */
57772
- function (tag, range) {
57773
- return range === '*' || tag === range || tag.includes(range + '-')
57774
- },
57775
- true
57776
- )
57753
+ const basicFilter = bcp_47_match_factory(function (tag, range) {
57754
+ return range === '*' || tag === range || tag.includes(range + '-')
57755
+ }, true)
57777
57756
 
57778
57757
  /**
57779
57758
  * Extended Filtering (Section 3.3.2) matches a language priority list
57780
57759
  * consisting of extended language ranges (Section 2.2) to sets of language
57781
57760
  * tags.
57782
- * @param {Tag|Tags} tags
57783
- * @param {Range|Ranges} [ranges]
57784
- * @returns {Tags}
57785
- */
57786
- const extendedFilter = bcp_47_match_factory(
57787
- /** @type {Check} */
57788
- function (tag, range) {
57789
- // 3.3.2.1
57790
- const left = tag.split('-')
57791
- const right = range.split('-')
57792
- let leftIndex = 0
57793
- let rightIndex = 0
57794
-
57795
- // 3.3.2.2
57796
- if (right[rightIndex] !== '*' && left[leftIndex] !== right[rightIndex]) {
57797
- return false
57798
- }
57799
-
57800
- leftIndex++
57801
- rightIndex++
57761
+ */
57762
+ const extendedFilter = bcp_47_match_factory(function (tag, range) {
57763
+ // 3.3.2.1
57764
+ const left = tag.split('-')
57765
+ const right = range.split('-')
57766
+ let leftIndex = 0
57767
+ let rightIndex = 0
57802
57768
 
57803
- // 3.3.2.3
57804
- while (rightIndex < right.length) {
57805
- // 3.3.2.3.A
57806
- if (right[rightIndex] === '*') {
57807
- rightIndex++
57808
- continue
57809
- }
57769
+ // 3.3.2.2
57770
+ if (right[rightIndex] !== '*' && left[leftIndex] !== right[rightIndex]) {
57771
+ return false
57772
+ }
57810
57773
 
57811
- // 3.3.2.3.B
57812
- if (!left[leftIndex]) return false
57774
+ leftIndex++
57775
+ rightIndex++
57813
57776
 
57814
- // 3.3.2.3.C
57815
- if (left[leftIndex] === right[rightIndex]) {
57816
- leftIndex++
57817
- rightIndex++
57818
- continue
57819
- }
57777
+ // 3.3.2.3
57778
+ while (rightIndex < right.length) {
57779
+ // 3.3.2.3.A
57780
+ if (right[rightIndex] === '*') {
57781
+ rightIndex++
57782
+ continue
57783
+ }
57820
57784
 
57821
- // 3.3.2.3.D
57822
- if (left[leftIndex].length === 1) return false
57785
+ // 3.3.2.3.B
57786
+ if (!left[leftIndex]) return false
57823
57787
 
57824
- // 3.3.2.3.E
57788
+ // 3.3.2.3.C
57789
+ if (left[leftIndex] === right[rightIndex]) {
57825
57790
  leftIndex++
57791
+ rightIndex++
57792
+ continue
57826
57793
  }
57827
57794
 
57828
- // 3.3.2.4
57829
- return true
57830
- },
57831
- true
57832
- )
57795
+ // 3.3.2.3.D
57796
+ if (left[leftIndex].length === 1) return false
57797
+
57798
+ // 3.3.2.3.E
57799
+ leftIndex++
57800
+ }
57801
+
57802
+ // 3.3.2.4
57803
+ return true
57804
+ }, true)
57833
57805
 
57834
57806
  /**
57835
57807
  * Lookup (Section 3.4) matches a language priority list consisting of basic
57836
57808
  * language ranges to sets of language tags to find the one exact language tag
57837
57809
  * that best matches the range.
57838
- * @param {Tag|Tags} tags
57839
- * @param {Range|Ranges} [ranges]
57840
- * @returns {Tag}
57841
57810
  */
57842
- const lookup = bcp_47_match_factory(
57843
- /** @type {Check} */
57844
- function (tag, range) {
57845
- let right = range
57811
+ const lookup = bcp_47_match_factory(function (tag, range) {
57812
+ let right = range
57846
57813
 
57847
- /* eslint-disable-next-line no-constant-condition */
57848
- while (true) {
57849
- if (right === '*' || tag === right) return true
57814
+ /* eslint-disable-next-line no-constant-condition */
57815
+ while (true) {
57816
+ if (right === '*' || tag === right) return true
57850
57817
 
57851
- let index = right.lastIndexOf('-')
57818
+ let index = right.lastIndexOf('-')
57852
57819
 
57853
- if (index < 0) return false
57820
+ if (index < 0) return false
57854
57821
 
57855
- if (right.charAt(index - 2) === '-') index -= 2
57822
+ if (right.charAt(index - 2) === '-') index -= 2
57856
57823
 
57857
- right = right.slice(0, index)
57858
- }
57824
+ right = right.slice(0, index)
57859
57825
  }
57860
- )
57826
+ }, false)
57861
57827
 
57862
57828
  /**
57863
57829
  * Validate tags or ranges, and cast them to arrays.
@@ -61366,7 +61332,7 @@ api.setSelectionRange({start:state2.selection.end-2-state1.selectedText.length,e
61366
61332
  var code_code={name:'code',keyCommand:'code',shortcuts:'ctrlcmd+j',buttonProps:{'aria-label':'Insert code'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",role:"img",viewBox:"0 0 640 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:function execute(tate,api){// Adjust the selection to encompass the whole word if the caret is inside one
61367
61333
  var newSelectionRange=selectWord({text:tate.text,selection:tate.selection});var state1=api.setSelectionRange(newSelectionRange);// when there's no breaking line
61368
61334
  if(state1.selectedText.indexOf('\n')===-1){api.replaceSelection("`".concat(state1.selectedText,"`"));// Adjust the selection to not contain the **
61369
- var _selectionStart=state1.selection.start+1;var _selectionEnd=_selectionStart+state1.selectedText.length;api.setSelectionRange({start:_selectionStart,end:_selectionEnd});return;}var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');api.replaceSelection("".concat(breaksBefore,"```\n").concat(state1.selectedText,"\n```").concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount+4;var selectionEnd=selectionStart+state1.selectedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};var codeBlock={name:'codeBlock',keyCommand:'codeBlock',shortcuts:'ctrlcmd+shift+j',icon:code_code['icon'],buttonProps:{'aria-label':'Insert Code Block'},execute:function execute(tate,api){// Adjust the selection to encompass the whole word if the caret is inside one
61335
+ var _selectionStart=state1.selection.start+1;var _selectionEnd=_selectionStart+state1.selectedText.length;api.setSelectionRange({start:_selectionStart,end:_selectionEnd});return;}var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');api.replaceSelection("".concat(breaksBefore,"```\n").concat(state1.selectedText,"\n```").concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount+4;var selectionEnd=selectionStart+state1.selectedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};var codeBlock={name:'codeBlock',keyCommand:'codeBlock',shortcuts:'ctrlcmd+shift+j',icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",role:"img",viewBox:"0 0 156 156",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),buttonProps:{'aria-label':'Insert Code Block'},execute:function execute(tate,api){// Adjust the selection to encompass the whole word if the caret is inside one
61370
61336
  var newSelectionRange=selectWord({text:tate.text,selection:tate.selection});var state1=api.setSelectionRange(newSelectionRange);var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');api.replaceSelection("".concat(breaksBefore,"```\n").concat(state1.selectedText,"\n```").concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount+4;var selectionEnd=selectionStart+state1.selectedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};
61371
61337
  ;// CONCATENATED MODULE: ./src/commands/italic.tsx
61372
61338
  var italic={name:'italic',keyCommand:'italic',shortcuts:'ctrlcmd+i',buttonProps:{'aria-label':'Add italic text',title:'Add italic text'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:function execute(state,api){// Adjust the selection to encompass the whole word if the caret is inside one