react-markdown-table-ts 0.4.14 → 0.4.15

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/index.cjs.js CHANGED
@@ -7,26 +7,83 @@ var React = require('react');
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
9
  function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n["default"] = e;
24
- return Object.freeze(n);
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
25
  }
26
26
 
27
27
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
28
28
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
29
 
30
+ /******************************************************************************
31
+ Copyright (c) Microsoft Corporation.
32
+
33
+ Permission to use, copy, modify, and/or distribute this software for any
34
+ purpose with or without fee is hereby granted.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
37
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
38
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
39
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
40
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
+ PERFORMANCE OF THIS SOFTWARE.
43
+ ***************************************************************************** */
44
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
45
+
46
+ var extendStatics = function(d, b) {
47
+ extendStatics = Object.setPrototypeOf ||
48
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
50
+ return extendStatics(d, b);
51
+ };
52
+
53
+ function __extends(d, b) {
54
+ if (typeof b !== "function" && b !== null)
55
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
56
+ extendStatics(d, b);
57
+ function __() { this.constructor = d; }
58
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
59
+ }
60
+
61
+ var __assign = function() {
62
+ __assign = Object.assign || function __assign(t) {
63
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
64
+ s = arguments[i];
65
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
66
+ }
67
+ return t;
68
+ };
69
+ return __assign.apply(this, arguments);
70
+ };
71
+
72
+ function __spreadArray(to, from, pack) {
73
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
74
+ if (ar || !(i in from)) {
75
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
76
+ ar[i] = from[i];
77
+ }
78
+ }
79
+ return to.concat(ar || Array.prototype.slice.call(from));
80
+ }
81
+
82
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
83
+ var e = new Error(message);
84
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
85
+ };
86
+
30
87
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
31
88
 
32
89
  function getDefaultExportFromCjs (x) {
@@ -4030,52 +4087,6 @@ var Prism$1 = /*@__PURE__*/getDefaultExportFromCjs(prismExports);
4030
4087
 
4031
4088
  }());
4032
4089
 
4033
- /******************************************************************************
4034
- Copyright (c) Microsoft Corporation.
4035
-
4036
- Permission to use, copy, modify, and/or distribute this software for any
4037
- purpose with or without fee is hereby granted.
4038
-
4039
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
4040
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
4041
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
4042
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
4043
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4044
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4045
- PERFORMANCE OF THIS SOFTWARE.
4046
- ***************************************************************************** */
4047
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
4048
-
4049
- var extendStatics = function(d, b) {
4050
- extendStatics = Object.setPrototypeOf ||
4051
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
4052
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
4053
- return extendStatics(d, b);
4054
- };
4055
-
4056
- function __extends(d, b) {
4057
- if (typeof b !== "function" && b !== null)
4058
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
4059
- extendStatics(d, b);
4060
- function __() { this.constructor = d; }
4061
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4062
- }
4063
-
4064
- function __spreadArray(to, from, pack) {
4065
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4066
- if (ar || !(i in from)) {
4067
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
4068
- ar[i] = from[i];
4069
- }
4070
- }
4071
- return to.concat(ar || Array.prototype.slice.call(from));
4072
- }
4073
-
4074
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
4075
- var e = new Error(message);
4076
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
4077
- };
4078
-
4079
4090
  // src/validation.ts
4080
4091
  /**
4081
4092
  * Custom error class for handling Markdown table generation errors.
@@ -11829,6 +11840,7 @@ var COPY_BUTTON_STYLES = {
11829
11840
  display: 'flex',
11830
11841
  alignItems: 'center',
11831
11842
  justifyContent: 'center',
11843
+ zIndex: 1,
11832
11844
  '&:hover': {
11833
11845
  backgroundColor: 'rgba(255, 255, 255, 0.2)',
11834
11846
  },
@@ -11890,7 +11902,7 @@ var MarkdownTable = function (_a) {
11890
11902
  var handleCopy = function () {
11891
11903
  navigator.clipboard.writeText(markdownTableSyntax);
11892
11904
  };
11893
- return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { children: theme === 'light' ? LIGHT_THEME_CSS : DARK_THEME_CSS }), jsxRuntimeExports.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntimeExports.jsx("button", { onClick: handleCopy, style: COPY_BUTTON_STYLES, title: "Copy to clipboard", "aria-label": "Copy to clipboard", children: jsxRuntimeExports.jsx(ContentCopyIcon, { fontSize: "small" }) }), jsxRuntimeExports.jsx("pre", { ref: preElementRef, className: "".concat(className, " language-markdown line-numbers ").concat(theme === 'dark' ? 'dark-theme' : ''), style: preStyle, children: jsxRuntimeExports.jsx("code", { className: "language-markdown", role: "code", children: markdownTableSyntax }) })] })] }));
11905
+ return (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("style", { children: theme === 'light' ? LIGHT_THEME_CSS : DARK_THEME_CSS }), jsxRuntimeExports.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntimeExports.jsx("button", { onClick: handleCopy, style: __assign(__assign({}, COPY_BUTTON_STYLES), { color: theme === 'light' ? '#000' : '#fff' }), title: "Copy to clipboard", "aria-label": "Copy to clipboard", children: jsxRuntimeExports.jsx(ContentCopyIcon, { fontSize: "small" }) }), jsxRuntimeExports.jsx("pre", { ref: preElementRef, className: "".concat(className, " language-markdown line-numbers ").concat(theme === 'dark' ? 'dark-theme' : ''), style: preStyle, children: jsxRuntimeExports.jsx("code", { className: "language-markdown", role: "code", children: markdownTableSyntax }) })] })] }));
11894
11906
  };
11895
11907
 
11896
11908
  exports.MarkdownTable = MarkdownTable;