@lowdefy/blocks-basic 0.0.0-experimental-20251010122007 → 0.0.0-experimental-20251015143743

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/LICENSE CHANGED
@@ -2,180 +2,180 @@
2
2
  Version 2.0, January 2004
3
3
  http://www.apache.org/licenses/
4
4
 
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
179
 
180
180
  To apply the Apache License to your work, attach the following
181
181
  boilerplate notice, with the fields enclosed by brackets "[]"
@@ -186,16 +186,16 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright [yyyy] [name of copyright owner]
190
190
 
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
194
 
195
195
  http://www.apache.org/licenses/LICENSE-2.0
196
196
 
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-basic",
3
- "version": "0.0.0-experimental-20251010122007",
3
+ "version": "0.0.0-experimental-20251015143743",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Basic html Lowdefy blocks.",
6
6
  "homepage": "https://lowdefy.com",
@@ -40,16 +40,16 @@
40
40
  "dist/*"
41
41
  ],
42
42
  "dependencies": {
43
- "@lowdefy/block-utils": "0.0.0-experimental-20251010122007",
44
- "@lowdefy/helpers": "0.0.0-experimental-20251010122007",
43
+ "@lowdefy/block-utils": "0.0.0-experimental-20251015143743",
44
+ "@lowdefy/helpers": "0.0.0-experimental-20251015143743",
45
45
  "dompurify": "3.2.4",
46
46
  "react": "18.2.0",
47
47
  "react-dom": "18.2.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@emotion/jest": "11.10.5",
51
- "@lowdefy/block-dev": "0.0.0-experimental-20251010122007",
52
- "@lowdefy/jest-yaml-transform": "0.0.0-experimental-20251010122007",
51
+ "@lowdefy/block-dev": "0.0.0-experimental-20251015143743",
52
+ "@lowdefy/jest-yaml-transform": "0.0.0-experimental-20251015143743",
53
53
  "@swc/cli": "0.1.63",
54
54
  "@swc/core": "1.3.99",
55
55
  "@swc/jest": "0.2.29",
@@ -1,122 +0,0 @@
1
- <TITLE>
2
- Anchor
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- Anchor link block. Creates a clickable icon and/ or text.
8
-
9
- > When changing the relationship (`rel`) property of the linked URL, make sure you understand the security implications. Read more about link types [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
10
-
11
- </DESCRIPTION>
12
-
13
- <SCHEMA>
14
-
15
- ```json
16
- {
17
- "type": "object",
18
- "properties": {
19
- "type": "object",
20
- "additionalProperties": false,
21
- "properties": {
22
- "ariaLabel": {
23
- "type": "string",
24
- "description": "Arial-label to apply to link tag."
25
- },
26
- "back": {
27
- "type": "boolean",
28
- "description": "When the link is clicked, trigger the browser back."
29
- },
30
- "home": {
31
- "type": "boolean",
32
- "description": "When the link is clicked, route to the home page."
33
- },
34
- "input": {
35
- "type": "object",
36
- "description": "When the link is clicked, pass data as the input object to the next Lowdefy page. Can only be used with pageId link and newTab false.",
37
- "docs": {
38
- "displayType": "yaml"
39
- }
40
- },
41
- "urlQuery": {
42
- "type": "object",
43
- "description": "When the link is clicked, pass data as a url query to the next page.",
44
- "docs": {
45
- "displayType": "yaml"
46
- }
47
- },
48
- "disabled": {
49
- "type": "boolean",
50
- "default": false,
51
- "description": "Disable the anchor if true."
52
- },
53
- "icon": {
54
- "type": ["string", "object"],
55
- "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block for anchor icon.",
56
- "docs": {
57
- "displayType": "icon"
58
- }
59
- },
60
- "pageId": {
61
- "type": "string",
62
- "description": "When the link is clicked, route to the provided Lowdefy page."
63
- },
64
- "href": {
65
- "type": "string",
66
- "description": "The href to link to when the anchor link is clicked."
67
- },
68
- "url": {
69
- "type": "string",
70
- "description": "External url to link to when the anchor link is clicked."
71
- },
72
- "rel": {
73
- "type": "string",
74
- "default": "noopener noreferrer",
75
- "description": "The relationship of the linked URL as space-separated link types."
76
- },
77
- "newTab": {
78
- "type": "boolean",
79
- "default": false,
80
- "description": "Open link in a new tab when the anchor link is clicked."
81
- },
82
- "replace": {
83
- "type": "boolean",
84
- "default": false,
85
- "description": "Prevent adding a new entry into browser history by replacing the url instead of pushing into history. Can only be used with pageId link and newTab false."
86
- },
87
- "scroll": {
88
- "type": "boolean",
89
- "default": false,
90
- "description": "Disable scrolling to the top of the page after page transition. Can only be used with pageId link and newTab false."
91
- },
92
- "style": {
93
- "type": "object",
94
- "description": "Css style object to applied to anchor.",
95
- "docs": {
96
- "displayType": "yaml"
97
- }
98
- },
99
- "title": {
100
- "type": "string",
101
- "description": "Text to display in the anchor."
102
- }
103
- }
104
- },
105
- "events": {
106
- "type": "object",
107
- "additionalProperties": false,
108
- "properties": {
109
- "onClick": {
110
- "type": "array",
111
- "description": "Called when Anchor is clicked."
112
- }
113
- }
114
- }
115
- }
116
- ```
117
-
118
- </SCHEMA>
119
-
120
- <EXAMPLES>
121
-
122
- </EXAMPLES>
@@ -1,55 +0,0 @@
1
- <TITLE>
2
- Box
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- A Box is a container that places sub-blocks into a html `<div>`.
8
- The Box has a single area, `content`.
9
-
10
- </DESCRIPTION>
11
-
12
- <SCHEMA>
13
-
14
- ```json
15
- {
16
- "type": "object",
17
- "properties": {
18
- "type": "object",
19
- "additionalProperties": false,
20
- "properties": {
21
- "content": {
22
- "type": "string",
23
- "description": "Box content string. Overrides the \"content\" content area."
24
- },
25
- "style": {
26
- "type": "object",
27
- "description": "Css style object to apply to Box div.",
28
- "docs": {
29
- "displayType": "yaml"
30
- }
31
- }
32
- }
33
- },
34
- "events": {
35
- "type": "object",
36
- "additionalProperties": false,
37
- "properties": {
38
- "onClick": {
39
- "type": "array",
40
- "description": "Trigger actions when the Box is clicked."
41
- },
42
- "onPaste": {
43
- "type": "array",
44
- "description": "Trigger actions when the element is focused and a paste event is triggered."
45
- }
46
- }
47
- }
48
- }
49
- ```
50
-
51
- </SCHEMA>
52
-
53
- <EXAMPLES>
54
-
55
- </EXAMPLES>
@@ -1,97 +0,0 @@
1
- <TITLE>
2
- DangerousHtml
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- A block to render HTML with the ability to customize the [DOMPurify's options](https://github.com/cure53/DOMPurify#can-i-configure-dompurify).
8
-
9
- > The DangerousHtml block sanitizes HTML using [DOMPurify's](https://github.com/cure53/DOMPurify) with the ability to customize the sanitization options. This comes with some security considerations, please consider [DOMPurify's Security Goals and Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for more details regarding the security impact of using the DangerousHtml block.
10
-
11
- > In short, it is strongly advised to never render any user input DangerousHtml content, only render hardcoded or trusted HTML content.
12
-
13
- </DESCRIPTION>
14
-
15
- <SCHEMA>
16
-
17
- ```json
18
- {
19
- "type": "object",
20
- "properties": {
21
- "type": "object",
22
- "additionalProperties": false,
23
- "properties": {
24
- "html": {
25
- "type": "string",
26
- "description": "Content to be rendered as Html.",
27
- "docs": {
28
- "displayType": "text-area"
29
- }
30
- },
31
- "DOMPurifyOptions": {
32
- "type": "object",
33
- "description": "Customize DOMPurify options. Options are only applied when the block is mounted, thus any parsed settings is only applied at first render.",
34
- "docs": {
35
- "displayType": "yaml"
36
- }
37
- },
38
- "style": {
39
- "type": "object",
40
- "description": "Css style object to apply to Html div.",
41
- "docs": {
42
- "displayType": "yaml"
43
- }
44
- }
45
- }
46
- }
47
- }
48
- ```
49
-
50
- </SCHEMA>
51
-
52
- <EXAMPLES>
53
-
54
- ### Basic DangerousHtml
55
-
56
- ```yaml
57
- id: basic_example
58
- type: DangerousHtml
59
- properties:
60
- html: |
61
- <div style="background: #123456; padding: 10px;"><h1 style="color: white;">A simple white title box</h1></div>
62
- ```
63
-
64
- ### DangerousHtml with iframes sanitized
65
-
66
- ```yaml
67
- id: sanitized_iframes_example
68
- type: DangerousHtml
69
- properties:
70
- html: |
71
- The iframe was removed: <iframe width="560" height="315" src="https://www.youtube.com/embed/pkCJpDleMtI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> - title: DangerousHtml with iframes enabled
72
- ```
73
-
74
- ### DangerousHtml with iframes not sanitized
75
-
76
- ```yaml
77
- id: iframes_example
78
- type: DangerousHtml
79
- properties:
80
- DOMPurifyOptions:
81
- ADD_TAGS:
82
- - iframe
83
- html: |
84
- The iframe was not removed: <iframe width="560" height="315" src="https://www.youtube.com/embed/pkCJpDleMtI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
85
- ```
86
-
87
- ### DangerousHtml basic sanitization
88
-
89
- ```yaml
90
- id: sanitized_example
91
- type: DangerousHtml
92
- properties:
93
- html: |
94
- <div style="color: red; border: 2px dashed blue; padding: 10px;"><script>alert("hello world")</script><img src=x onerror=alert("img") />A little bit of bad html sanitized.</div>
95
- ```
96
-
97
- </EXAMPLES>
@@ -1,85 +0,0 @@
1
- <TITLE>
2
- Html
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- A block to render HTML.
8
-
9
- > The Html block sanitizes HTML using [DOMPurify's](https://github.com/cure53/DOMPurify) default configuration. This comes with some security considerations, please consider [DOMPurify's Security Goals and Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for more details regarding the security impact of using the Html block. In short, it is strongly advised to never render any user input Html content, only render hardcoded or trusted HTML content.
10
-
11
- </DESCRIPTION>
12
-
13
- <SCHEMA>
14
-
15
- ```json
16
- {
17
- "type": "object",
18
- "properties": {
19
- "type": "object",
20
- "additionalProperties": false,
21
- "properties": {
22
- "html": {
23
- "type": "string",
24
- "description": "Content to be rendered as Html.",
25
- "docs": {
26
- "displayType": "text-area"
27
- }
28
- },
29
- "style": {
30
- "type": "object",
31
- "description": "Css style object to apply to Html div.",
32
- "docs": {
33
- "displayType": "yaml"
34
- }
35
- }
36
- }
37
- },
38
- "events": {
39
- "type": "object",
40
- "additionalProperties": false,
41
- "properties": {
42
- "onTextSelection": {
43
- "type": "array",
44
- "description": "Trigger action when text is selected and pass selected text to the event object."
45
- }
46
- }
47
- }
48
- }
49
- ```
50
-
51
- </SCHEMA>
52
-
53
- <EXAMPLES>
54
-
55
- ### Basic DangerousHtml
56
-
57
- ```yaml
58
- id: basic_example
59
- type: Html
60
- properties:
61
- html: |
62
- <div style="background: #123456; padding: 10px;"><h1 style="color: white;">A simple white title box</h1></div>
63
- ```
64
-
65
- ### DangerousHtml with iframes sanitized
66
-
67
- ```yaml
68
- id: sanitized_iframes_example
69
- type: Html
70
- properties:
71
- html: |
72
- The iframe was removed: <iframe style="max-width: 512px;" width="100%" src="https://www.youtube.com/embed/7N7GWdlQJlU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> - title: DangerousHtml with iframes enabled
73
- ```
74
-
75
- ### DangerousHtml basic sanitization
76
-
77
- ```yaml
78
- id: sanitized_example
79
- type: Html
80
- properties:
81
- html: |
82
- <div style="color: red; border: 2px dashed blue; padding: 10px;"><script>alert("hello world")</script><img src=x onerror=alert("img") />A little bit of bad html sanitized.</div>
83
- ```
84
-
85
- </EXAMPLES>
@@ -1,83 +0,0 @@
1
- <TITLE>
2
- Icon
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- A Icon component. Render Ant Design and other icons
8
-
9
- </DESCRIPTION>
10
-
11
- <SCHEMA>
12
-
13
- ```json
14
- {
15
- "type": "object",
16
- "properties": {
17
- "type": "object",
18
- "additionalProperties": false,
19
- "properties": {
20
- "color": {
21
- "type": "string",
22
- "description": "Primary icon color.",
23
- "docs": {
24
- "displayType": "color"
25
- }
26
- },
27
- "name": {
28
- "type": "string",
29
- "default": "AiOutlineCloseCircle",
30
- "description": "Name of icon to be displayed."
31
- },
32
- "rotate": {
33
- "type": "number",
34
- "description": "Number of degrees to rotate the icon."
35
- },
36
- "size": {
37
- "type": ["string", "number"],
38
- "description": "Size of the icon.",
39
- "docs": {
40
- "displayType": "number"
41
- }
42
- },
43
- "spin": {
44
- "type": "boolean",
45
- "default": false,
46
- "description": "Continuously spin icon with animation."
47
- },
48
- "title": {
49
- "type": "string",
50
- "description": "Icon hover title for accessibility."
51
- },
52
- "style": {
53
- "type": "object",
54
- "description": "CSS style object.",
55
- "docs": {
56
- "displayType": "yaml"
57
- }
58
- },
59
- "disableLoadingIcon": {
60
- "type": "boolean",
61
- "default": false,
62
- "description": "While loading after the icon has been clicked, don't render the loading icon."
63
- }
64
- }
65
- },
66
- "events": {
67
- "type": "object",
68
- "additionalProperties": false,
69
- "properties": {
70
- "onClick": {
71
- "type": "array",
72
- "description": "Trigger actions when icon is clicked."
73
- }
74
- }
75
- }
76
- }
77
- ```
78
-
79
- </SCHEMA>
80
-
81
- <EXAMPLES>
82
-
83
- </EXAMPLES>
@@ -1,99 +0,0 @@
1
- <TITLE>
2
- Img
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- A block to render a HTML [`<img/>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) element.
8
-
9
- </DESCRIPTION>
10
-
11
- <SCHEMA>
12
-
13
- ```json
14
- {
15
- "type": "object",
16
- "properties": {
17
- "type": "object",
18
- "additionalProperties": false,
19
- "required": ["src"],
20
- "properties": {
21
- "src": {
22
- "type": "string",
23
- "description": "The image URL."
24
- },
25
- "alt": {
26
- "type": "string",
27
- "description": "Alternative text description of the image."
28
- },
29
- "crossOrigin": {
30
- "type": "string",
31
- "enum": ["anonymous", "use-credentials"],
32
- "description": "Indicates if the fetching of the image must be done using a CORS request."
33
- },
34
- "decoding": {
35
- "type": "string",
36
- "enum": ["sync", "async", "auto"],
37
- "description": "An image decoding hint to the browser. Sync for atomic presentation with other content, async, to reduce delay in presenting other content and auto leave to browser to decide."
38
- },
39
- "height": {
40
- "type": "number",
41
- "description": "Height of the image."
42
- },
43
- "loading": {
44
- "type": "string",
45
- "enum": ["eager", "lazy"],
46
- "description": "How the browser should load the image. Eager loads the image immediately, lazy, defers loading until the image it reaches a calculated distance from the viewport, as defined by the browser."
47
- },
48
- "sizes": {
49
- "type": "string",
50
- "description": "Indicating a set of source sizes of strings separated by commas."
51
- },
52
- "srcSet": {
53
- "type": "string",
54
- "description": "Possible image sources for the user agent to use, strings separated by commas.",
55
- "docs": {
56
- "displayType": "text-area"
57
- }
58
- },
59
- "style": {
60
- "type": "object",
61
- "description": "Css style object to applied to the image.",
62
- "docs": {
63
- "displayType": "yaml"
64
- }
65
- },
66
- "width": {
67
- "type": "number",
68
- "description": "Width of the image."
69
- }
70
- }
71
- }
72
- }
73
- ```
74
-
75
- </SCHEMA>
76
-
77
- <EXAMPLES>
78
-
79
- ### Basic Img
80
-
81
- ```yaml
82
- id: basic_example
83
- type: Img
84
- properties:
85
- src: https://docs.lowdefy.com/logo-light-theme.png
86
- ```
87
-
88
- ### srcset Img
89
-
90
- ```yaml
91
- id: srcset_example
92
- type: Img
93
- properties:
94
- src: https://docs.lowdefy.com/logo-light-theme.png
95
- srcSet: https://docs.lowdefy.com/logo-square-light-theme.png 40w, https://docs.lowdefy.com/logo-light-theme.png 577w
96
- sizes: '(max-width: 576px) 40px, 577px'
97
- ```
98
-
99
- </EXAMPLES>
@@ -1,125 +0,0 @@
1
- <TITLE>
2
- List
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- The List block renders a content area for all items in the array. All list blocks create a array in state at their block `id`. The list content areas are rendered for each index in the array. See the [List Concept](/lists) page for a detailed description on how to work with lists.
8
-
9
- </DESCRIPTION>
10
-
11
- <SCHEMA>
12
-
13
- ```json
14
- {
15
- "type": "object",
16
- "properties": {
17
- "type": "object",
18
- "additionalProperties": false,
19
- "properties": {
20
- "direction": {
21
- "type": "string",
22
- "enum": ["row", "column", "row-reverse", "column-reverse"],
23
- "description": "List content along a 'row' or down a 'column'. Applies the 'flex-direction' css property to the List block."
24
- },
25
- "wrap": {
26
- "type": "string",
27
- "enum": ["wrap", "nowrap", "wrap-reverse"],
28
- "description": "Specifies wrapping style to be applied to List block as 'wrap', 'nowrap' or 'wrap-reverse'. Applies the 'flex-wrap' css property to the List block - defaults to 'wrap', requires List direction to be set."
29
- },
30
- "scroll": {
31
- "type": "boolean",
32
- "description": "Specifies whether scrolling should be applied to the List, can be true or false. Applies the 'overflow' css property to the List block - defaults to 'visible', requires List direction to be set."
33
- },
34
- "style": {
35
- "type": "object",
36
- "description": "Css style object to apply to List block.",
37
- "docs": {
38
- "displayType": "yaml"
39
- }
40
- }
41
- }
42
- },
43
- "events": {
44
- "type": "object",
45
- "additionalProperties": false,
46
- "properties": {
47
- "onClick": {
48
- "type": "array",
49
- "description": "Trigger actions when the List is clicked."
50
- }
51
- }
52
- }
53
- }
54
- ```
55
-
56
- </SCHEMA>
57
-
58
- <EXAMPLES>
59
-
60
- ### Todo List
61
-
62
- ```yaml
63
- id: todo_app
64
- type: Box
65
- layout:
66
- contentGutter: 16
67
- blocks:
68
- - id: todo_input
69
- type: TextInput
70
- layout:
71
- grow: 1
72
- properties:
73
- label:
74
- disabled: true
75
- placeholder: Write something todo...
76
- - id: add_item
77
- type: Button
78
- layout:
79
- shrink: 1
80
- properties:
81
- icon: AiOutlinePlus
82
- title: Add item
83
- events:
84
- onClick:
85
- - id: add
86
- type: SetState
87
- params:
88
- todo_input: null
89
- todos:
90
- _array.concat:
91
- - - _state: todo_input
92
- - _state: todos
93
- - id: todos
94
- type: List
95
- layout:
96
- contentGutter: 16
97
- blocks:
98
- - id: todos.$
99
- type: TitleInput
100
- layout:
101
- grow: 1
102
- properties:
103
- level: 4
104
- - id: remove_item
105
- type: Icon
106
- layout:
107
- shrink: 1
108
- properties:
109
- name: AiOutlineMinusCircle
110
- size: 18
111
- events:
112
- onClick:
113
- - id: remove
114
- type: CallMethod
115
- messages:
116
- loading: Removing Item...
117
- success: Item Removed.
118
- params:
119
- blockId: todos
120
- method: removeItem
121
- args:
122
- - _index: 0
123
- ```
124
-
125
- </EXAMPLES>
@@ -1,51 +0,0 @@
1
- <TITLE>
2
- Span
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- A Span is a container that places sub-blocks into a html `<span>`.
8
- The Span has a single area, `content`.
9
-
10
- </DESCRIPTION>
11
-
12
- <SCHEMA>
13
-
14
- ```json
15
- {
16
- "type": "object",
17
- "properties": {
18
- "type": "object",
19
- "additionalProperties": false,
20
- "properties": {
21
- "content": {
22
- "type": "string",
23
- "description": "Span content string. Overrides the \"content\" content area."
24
- },
25
- "style": {
26
- "type": "object",
27
- "description": "Css style object to apply to Span div.",
28
- "docs": {
29
- "displayType": "yaml"
30
- }
31
- }
32
- }
33
- },
34
- "events": {
35
- "type": "object",
36
- "additionalProperties": false,
37
- "properties": {
38
- "onClick": {
39
- "type": "array",
40
- "description": "Trigger actions when the Span is clicked."
41
- }
42
- }
43
- }
44
- }
45
- ```
46
-
47
- </SCHEMA>
48
-
49
- <EXAMPLES>
50
-
51
- </EXAMPLES>