@lowdefy/blocks-basic 0.0.0-experimental-20260708135841 → 0.0.0-experimental-20260710073520

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.
@@ -0,0 +1,56 @@
1
+ # Copyright 2020-2026 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ id: html
16
+ type: Box
17
+
18
+ blocks:
19
+ - id: html_basic
20
+ type: Html
21
+ properties:
22
+ html: <p>Hello World</p>
23
+
24
+ - id: html_styled
25
+ type: Html
26
+ properties:
27
+ html: <p>Styled content</p>
28
+ style:
29
+ backgroundColor: rgb(240, 240, 240)
30
+ padding: 10px
31
+
32
+ - id: html_complex
33
+ type: Html
34
+ properties:
35
+ html: |
36
+ <div>
37
+ <h1>Title</h1>
38
+ <p>Paragraph with <strong>bold</strong> text</p>
39
+ </div>
40
+
41
+ - id: html_sanitized
42
+ type: Html
43
+ properties:
44
+ html: <p>Safe content</p><script>alert('xss')</script>
45
+
46
+ - id: html_selection
47
+ type: Html
48
+ properties:
49
+ html: <p>Select this text to trigger event</p>
50
+ events:
51
+ onTextSelection:
52
+ - id: set_selection
53
+ type: SetState
54
+ params:
55
+ selected_text:
56
+ _event: selectedText
@@ -0,0 +1,75 @@
1
+ # Copyright 2020-2026 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ - id: default
16
+ type: Html
17
+ - id: properties.html
18
+ type: Html
19
+ properties:
20
+ html: |
21
+ <div style="background: green; padding: 10px;">Content green background</div>
22
+ - id: properties.style
23
+ type: Html
24
+ properties:
25
+ style:
26
+ background: yellow
27
+ padding: 10
28
+ html: |
29
+ <div>properties.style yellow background</div>
30
+ - id: properties.html-styled
31
+ type: Html
32
+ properties:
33
+ style:
34
+ background: yellow
35
+ padding: 10
36
+ html: |
37
+ <div style="background: green; padding: 10px;">Content green background and properties.style yellow background</div>
38
+ - id: properties.html-iframe
39
+ type: Html
40
+ properties:
41
+ html: |
42
+ An iframe:
43
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/7N7GWdlQJlU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
44
+ - id: properties.html-bad-code
45
+ type: Html
46
+ properties:
47
+ html: |
48
+ <h1>Link<h1>
49
+
50
+ <a href="https://lowdefy.com">Lowdefy link</a>
51
+
52
+ <font size="+10">Description</font>
53
+
54
+ <h1>Bad HTML</h1>
55
+
56
+ <div onmouseover="alert('alpha')">
57
+ <a href="javascript:alert('bravo')">delta</a>
58
+ <img src="x" onerror="alert('charlie')">
59
+ <iframe src="javascript:alert('delta')"></iframe>
60
+ <math>
61
+ <mi xlink:href="data:x,<script>alert('echo')</script>"></mi>
62
+ </math>
63
+ </div>
64
+ <script>
65
+ alert('script tag');
66
+ </script>
67
+
68
+ - id: properties.html is number 0
69
+ type: Html
70
+ properties:
71
+ html: 0
72
+ - id: properties.html is boolean false
73
+ type: Html
74
+ properties:
75
+ html: false