@snack-uikit/markdown 0.5.62-preview-02d918ac.0 → 0.5.62
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.5.62 (2026-07-03)
|
|
7
|
+
|
|
8
|
+
### Only dependencies have been changed
|
|
9
|
+
* [@snack-uikit/fields@0.57.2]($PUBLIC_PROJECT_URL/blob/master/packages/fields/CHANGELOG.md)
|
|
10
|
+
* [@snack-uikit/link@0.18.3]($PUBLIC_PROJECT_URL/blob/master/packages/link/CHANGELOG.md)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## 0.5.61 (2026-06-24)
|
|
7
17
|
|
|
8
18
|
### Only dependencies have been changed
|
|
@@ -24,15 +24,16 @@ const utils_1 = require("@snack-uikit/utils");
|
|
|
24
24
|
const helperComponents_1 = require("../../helperComponents");
|
|
25
25
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
26
26
|
function Markdown(_a) {
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
var value = _a.value,
|
|
28
|
+
className = _a.className,
|
|
29
|
+
onCopyClick = _a.onCopyClick,
|
|
30
|
+
_a$skipHtml = _a.skipHtml,
|
|
31
|
+
skipHtml = _a$skipHtml === void 0 ? true : _a$skipHtml,
|
|
32
|
+
_a$remarkPlugins = _a.remarkPlugins,
|
|
33
|
+
remarkPlugins = _a$remarkPlugins === void 0 ? [] : _a$remarkPlugins,
|
|
34
|
+
rehypePlugins = _a.rehypePlugins,
|
|
35
|
+
_a$components = _a.components,
|
|
36
|
+
components = _a$components === void 0 ? {} : _a$components,
|
|
36
37
|
rest = __rest(_a, ["value", "className", "onCopyClick", "skipHtml", "remarkPlugins", "rehypePlugins", "components"]);
|
|
37
38
|
return (0, jsx_runtime_1.jsx)("div", Object.assign({
|
|
38
39
|
className: className
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
3
5
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
4
6
|
var t = {};
|
|
5
7
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -28,27 +30,28 @@ const constants_1 = require("../../constants");
|
|
|
28
30
|
const Markdown_1 = require("../Markdown");
|
|
29
31
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
30
32
|
function MarkdownEditor(_a) {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
footer
|
|
49
|
-
} = _a,
|
|
33
|
+
var value = _a.value,
|
|
34
|
+
onChange = _a.onChange,
|
|
35
|
+
defaultMode = _a.defaultMode,
|
|
36
|
+
className = _a.className,
|
|
37
|
+
error = _a.error,
|
|
38
|
+
label = _a.label,
|
|
39
|
+
required = _a.required,
|
|
40
|
+
onCodeCopyClick = _a.onCodeCopyClick,
|
|
41
|
+
components = _a.components,
|
|
42
|
+
resizable = _a.resizable,
|
|
43
|
+
placeholder = _a.placeholder,
|
|
44
|
+
hint = _a.hint,
|
|
45
|
+
caption = _a.caption,
|
|
46
|
+
spellCheck = _a.spellCheck,
|
|
47
|
+
labelTooltip = _a.labelTooltip,
|
|
48
|
+
labelTooltipPlacement = _a.labelTooltipPlacement,
|
|
49
|
+
footer = _a.footer,
|
|
50
50
|
rest = __rest(_a, ["value", "onChange", "defaultMode", "className", "error", "label", "required", "onCodeCopyClick", "components", "resizable", "placeholder", "hint", "caption", "spellCheck", "labelTooltip", "labelTooltipPlacement", "footer"]);
|
|
51
|
-
const
|
|
51
|
+
const _ref = (0, react_1.useState)(false),
|
|
52
|
+
_ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
53
|
+
isViewMode = _ref2[0],
|
|
54
|
+
setIsViewMode = _ref2[1];
|
|
52
55
|
(0, react_1.useEffect)(() => {
|
|
53
56
|
setIsViewMode(defaultMode === constants_1.MODE.View);
|
|
54
57
|
}, [defaultMode]);
|
|
@@ -13,12 +13,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
13
13
|
const code_editor_1 = require("@snack-uikit/code-editor");
|
|
14
14
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
15
15
|
function Code(_ref) {
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
onClick
|
|
21
|
-
} = _ref;
|
|
16
|
+
let inline = _ref.inline,
|
|
17
|
+
className = _ref.className,
|
|
18
|
+
children = _ref.children,
|
|
19
|
+
onClick = _ref.onClick;
|
|
22
20
|
var _a;
|
|
23
21
|
const language = (_a = /language-(\w+)/.exec(className || '')) === null || _a === void 0 ? void 0 : _a[1];
|
|
24
22
|
const value = String(children).replace(/\n$/, '');
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Markdown",
|
|
7
|
-
"version": "0.5.62
|
|
7
|
+
"version": "0.5.62",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@snack-uikit/code-editor": "0.7.17",
|
|
39
39
|
"@snack-uikit/divider": "3.2.12",
|
|
40
|
-
"@snack-uikit/fields": "0.57.2
|
|
41
|
-
"@snack-uikit/link": "0.18.3
|
|
40
|
+
"@snack-uikit/fields": "0.57.2",
|
|
41
|
+
"@snack-uikit/link": "0.18.3",
|
|
42
42
|
"@snack-uikit/toggles": "0.13.27",
|
|
43
43
|
"@snack-uikit/typography": "0.8.13",
|
|
44
44
|
"@snack-uikit/utils": "4.0.2",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react-markdown": "7.1.1",
|
|
47
47
|
"remark-gfm": "3.0.1"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "864821fceaa6bbb61080166d14f1682fa16e3f85"
|
|
50
50
|
}
|