@lowdefy/blocks-basic 4.0.0-rc.10 → 4.0.0-rc.12

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.
@@ -14,8 +14,9 @@
14
14
  limitations under the License.
15
15
  */ import React from 'react';
16
16
  import { blockDefaultProps, HtmlComponent } from '@lowdefy/block-utils';
17
- const HtmlBlock = ({ blockId, properties, methods })=>/*#__PURE__*/ React.createElement(HtmlComponent, {
17
+ const HtmlBlock = ({ blockId, events, properties, methods })=>/*#__PURE__*/ React.createElement(HtmlComponent, {
18
18
  div: true,
19
+ events: events,
19
20
  html: properties.html,
20
21
  id: blockId,
21
22
  methods: methods,
@@ -19,5 +19,15 @@
19
19
  }
20
20
  }
21
21
  }
22
+ },
23
+ "events": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "onTextSelection": {
28
+ "type": "array",
29
+ "description": "Trigger action when text is selected and pass selected text to the event object."
30
+ }
31
+ }
22
32
  }
23
33
  }
package/dist/types.js CHANGED
@@ -16,8 +16,8 @@
16
16
  const icons = {};
17
17
  const styles = {};
18
18
  Object.keys(blocks).forEach((block)=>{
19
- icons[block] = blocks[block].meta.icons || [];
20
- styles[block] = blocks[block].meta.styles || [];
19
+ icons[block] = blocks[block].meta.icons ?? [];
20
+ styles[block] = blocks[block].meta.styles ?? [];
21
21
  });
22
22
  export default {
23
23
  blocks: Object.keys(blocks),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-basic",
3
- "version": "4.0.0-rc.10",
3
+ "version": "4.0.0-rc.12",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Basic html Lowdefy blocks.",
6
6
  "homepage": "https://lowdefy.com",
@@ -47,19 +47,19 @@
47
47
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
48
48
  },
49
49
  "dependencies": {
50
- "@lowdefy/block-utils": "4.0.0-rc.10",
51
- "@lowdefy/helpers": "4.0.0-rc.10",
52
- "dompurify": "2.4.7",
50
+ "@lowdefy/block-utils": "4.0.0-rc.12",
51
+ "@lowdefy/helpers": "4.0.0-rc.12",
52
+ "dompurify": "3.0.6",
53
53
  "react": "18.2.0",
54
54
  "react-dom": "18.2.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@emotion/jest": "11.10.5",
58
- "@lowdefy/block-dev": "4.0.0-rc.10",
59
- "@lowdefy/jest-yaml-transform": "4.0.0-rc.10",
58
+ "@lowdefy/block-dev": "4.0.0-rc.12",
59
+ "@lowdefy/jest-yaml-transform": "4.0.0-rc.12",
60
60
  "@swc/cli": "0.1.62",
61
- "@swc/core": "1.3.70",
62
- "@swc/jest": "0.2.27",
61
+ "@swc/core": "1.3.92",
62
+ "@swc/jest": "0.2.29",
63
63
  "@testing-library/dom": "8.19.1",
64
64
  "@testing-library/react": "13.4.0",
65
65
  "@testing-library/user-event": "14.4.3",
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "537af074f27770e32da9da8d48490f2eda94b406"
74
+ "gitHead": "7f3059b6778b1cb8900b1d4456681b977521d45d"
75
75
  }