@lowdefy/blocks-markdown 4.0.0-alpha.9 → 4.0.0-rc.1

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,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import rehypeRaw from 'rehype-raw';
21
21
  let DangerousMarkdown = class DangerousMarkdown extends React.Component {
22
22
  render() {
23
23
  const { blockId , properties , methods } = this.props;
24
- return(/*#__PURE__*/ React.createElement("div", {
24
+ return /*#__PURE__*/ React.createElement("div", {
25
25
  id: blockId,
26
26
  className: methods.makeCssClass(properties.style)
27
27
  }, /*#__PURE__*/ React.createElement(ReactMarkdown, {
@@ -33,7 +33,7 @@ let DangerousMarkdown = class DangerousMarkdown extends React.Component {
33
33
  rehypeRaw
34
34
  ],
35
35
  skipHtml: false
36
- }, DOMPurify.sanitize(this.props.properties.content, this.DOMPurifyOptions))));
36
+ }, DOMPurify.sanitize(this.props.properties.content, this.DOMPurifyOptions)));
37
37
  }
38
38
  constructor(props){
39
39
  super(props);
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -25,8 +25,7 @@ const Markdown = ({ blockId , properties , methods })=>/*#__PURE__*/ React.crea
25
25
  remarkPlugins: [
26
26
  gfm
27
27
  ]
28
- }, properties.content))
29
- ;
28
+ }, properties.content));
30
29
  Markdown.defaultProps = blockDefaultProps;
31
30
  Markdown.meta = {
32
31
  category: 'container',
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -12,7 +12,21 @@
12
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
- */ import React from 'react';
15
+ */ function _extends() {
16
+ _extends = Object.assign || function(target) {
17
+ for(var i = 1; i < arguments.length; i++){
18
+ var source = arguments[i];
19
+ for(var key in source){
20
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
21
+ target[key] = source[key];
22
+ }
23
+ }
24
+ }
25
+ return target;
26
+ };
27
+ return _extends.apply(this, arguments);
28
+ }
29
+ import React from 'react';
16
30
  import { Light as SyntaxHighlighter } from 'react-syntax-highlighter';
17
31
  import { blockDefaultProps } from '@lowdefy/block-utils';
18
32
  import ReactMarkdown from 'react-markdown';
@@ -28,20 +42,6 @@ import json from 'react-syntax-highlighter/dist/cjs/languages/hljs/json.js';
28
42
  import yaml from 'react-syntax-highlighter/dist/cjs/languages/hljs/yaml.js';
29
43
  import markdown from 'react-syntax-highlighter/dist/cjs/languages/hljs/markdown.js';
30
44
  import handlebars from 'react-syntax-highlighter/dist/cjs/languages/hljs/handlebars.js';
31
- function _extends() {
32
- _extends = Object.assign || function(target) {
33
- for(var i = 1; i < arguments.length; i++){
34
- var source = arguments[i];
35
- for(var key in source){
36
- if (Object.prototype.hasOwnProperty.call(source, key)) {
37
- target[key] = source[key];
38
- }
39
- }
40
- }
41
- return target;
42
- };
43
- return _extends.apply(this, arguments);
44
- }
45
45
  SyntaxHighlighter.registerLanguage('handlebars', handlebars.default);
46
46
  SyntaxHighlighter.registerLanguage('nunjucks', handlebars.default);
47
47
  SyntaxHighlighter.registerLanguage('html', handlebars.default);
@@ -77,8 +77,7 @@ const MarkdownWithCode = ({ blockId , properties , methods })=>/*#__PURE__*/ Re
77
77
  gfm
78
78
  ],
79
79
  components: components
80
- }, properties.content))
81
- ;
80
+ }, properties.content));
82
81
  MarkdownWithCode.defaultProps = blockDefaultProps;
83
82
  MarkdownWithCode.meta = {
84
83
  category: 'container',
package/dist/blocks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/namespace */ /*
2
- Copyright 2020-2022 Lowdefy, Inc
2
+ Copyright 2020-2023 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-markdown",
3
- "version": "4.0.0-alpha.9",
3
+ "version": "4.0.0-rc.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy markdown blocks.",
6
6
  "homepage": "https://lowdefy.com",
@@ -38,40 +38,40 @@
38
38
  "dist/*"
39
39
  ],
40
40
  "scripts": {
41
- "build": "yarn swc",
41
+ "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && pnpm copyfiles",
42
42
  "clean": "rm -rf dist",
43
43
  "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
44
- "prepare": "yarn build",
45
- "swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && yarn copyfiles",
46
- "test:watch": "jest --coverage --watch",
47
- "test": "jest --coverage"
44
+ "prepublishOnly": "pnpm build",
45
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
48
46
  },
49
47
  "dependencies": {
50
- "@lowdefy/block-utils": "4.0.0-alpha.9",
51
- "dompurify": "2.3.5",
52
- "react": "17.0.2",
53
- "react-dom": "17.0.2",
54
- "react-markdown": "8.0.0",
48
+ "@lowdefy/block-utils": "4.0.0-rc.1",
49
+ "dompurify": "2.4.1",
50
+ "react": "18.2.0",
51
+ "react-dom": "18.2.0",
52
+ "react-markdown": "8.0.4",
55
53
  "react-syntax-highlighter": "15.5.0",
56
54
  "rehype-raw": "6.1.1",
57
55
  "remark-gfm": "3.0.1"
58
56
  },
59
57
  "devDependencies": {
60
- "@emotion/jest": "11.7.1",
61
- "@lowdefy/block-dev": "4.0.0-alpha.9",
62
- "@swc/cli": "0.1.55",
63
- "@swc/core": "1.2.135",
64
- "@swc/jest": "0.2.17",
65
- "@testing-library/dom": "8.11.3",
66
- "@testing-library/react": "13.0.0-alpha.4",
67
- "@testing-library/user-event": "14.0.0-alpha.14",
58
+ "@emotion/jest": "11.10.5",
59
+ "@lowdefy/block-dev": "4.0.0-rc.1",
60
+ "@lowdefy/jest-yaml-transform": "4.0.0-rc.1",
61
+ "@swc/cli": "0.1.59",
62
+ "@swc/core": "1.3.24",
63
+ "@swc/jest": "0.2.24",
64
+ "@testing-library/dom": "8.19.1",
65
+ "@testing-library/react": "13.4.0",
66
+ "@testing-library/user-event": "14.4.3",
67
+ "@types/react": "18.0.26",
68
68
  "copyfiles": "2.4.1",
69
- "jest": "27.5.1",
70
- "jest-serializer-html": "7.1.0",
71
- "jest-transform-yaml": "1.0.0"
69
+ "jest": "28.1.0",
70
+ "jest-environment-jsdom": "28.1.0",
71
+ "jest-serializer-html": "7.1.0"
72
72
  },
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "98b544eca231bdcfca6c3a8601a891835d5ce571"
76
+ "gitHead": "ecc4f16c19eede929eda177db524cf13a8053379"
77
77
  }