@lowdefy/blocks-basic 0.0.0-experimental-20260720072521 → 0.0.0-experimental-20260720135014

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.
Files changed (33) hide show
  1. package/dist/blocks.js +0 -1
  2. package/dist/e2e.js +0 -1
  3. package/dist/metas.js +0 -1
  4. package/package.json +10 -10
  5. package/dist/blocks/Anchor/gallery.yaml +0 -316
  6. package/dist/blocks/Anchor/tests/Anchor.e2e.yaml +0 -78
  7. package/dist/blocks/Anchor/tests.yaml +0 -109
  8. package/dist/blocks/Box/gallery.yaml +0 -1369
  9. package/dist/blocks/Box/tests/Box.e2e.yaml +0 -78
  10. package/dist/blocks/Box/tests.yaml +0 -43
  11. package/dist/blocks/DangerousHtml/gallery.yaml +0 -182
  12. package/dist/blocks/DangerousHtml/tests/DangerousHtml.e2e.yaml +0 -33
  13. package/dist/blocks/DangerousHtml/tests.yaml +0 -83
  14. package/dist/blocks/Dynamic/Dynamic.js +0 -35
  15. package/dist/blocks/Dynamic/e2e.js +0 -16
  16. package/dist/blocks/Dynamic/meta.js +0 -76
  17. package/dist/blocks/Html/gallery.yaml +0 -239
  18. package/dist/blocks/Html/tests/Html.e2e.yaml +0 -56
  19. package/dist/blocks/Html/tests.yaml +0 -75
  20. package/dist/blocks/Icon/gallery.yaml +0 -702
  21. package/dist/blocks/Icon/tests/Icon.e2e.yaml +0 -43
  22. package/dist/blocks/Icon/tests.yaml +0 -54
  23. package/dist/blocks/Img/gallery.yaml +0 -446
  24. package/dist/blocks/Img/tests/Img.e2e.yaml +0 -61
  25. package/dist/blocks/Img/tests.yaml +0 -74
  26. package/dist/blocks/List/gallery.yaml +0 -523
  27. package/dist/blocks/List/tests/List.e2e.yaml +0 -199
  28. package/dist/blocks/List/tests.yaml +0 -471
  29. package/dist/blocks/Span/gallery.yaml +0 -664
  30. package/dist/blocks/Span/tests/Span.e2e.yaml +0 -59
  31. package/dist/blocks/Span/tests.yaml +0 -43
  32. package/dist/blocks/Throw/gallery.yaml +0 -40
  33. package/dist/blocks/Throw/tests.yaml +0 -20
@@ -1,239 +0,0 @@
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
- - title: Basic HTML
16
- blocks:
17
- - id: basic_paragraph
18
- type: Html
19
- properties:
20
- html: '<p>This is a paragraph rendered safely with the Html block.</p>'
21
- - id: basic_heading
22
- type: Html
23
- properties:
24
- html: '<h3>Safe Heading</h3><p>The Html block sanitizes content to prevent XSS attacks.</p>'
25
- - id: basic_headings_all
26
- type: Html
27
- properties:
28
- html: '<h4>Heading 4</h4><h5>Heading 5</h5><h6>Heading 6</h6>'
29
- - id: basic_line_break
30
- type: Html
31
- properties:
32
- html: '<p>First line<br />Second line<br />Third line</p>'
33
- - id: basic_hr
34
- type: Html
35
- properties:
36
- html: '<p>Content above</p><hr /><p>Content below the horizontal rule</p>'
37
-
38
- - title: Text Formatting
39
- blocks:
40
- - id: text_bold
41
- type: Html
42
- properties:
43
- html: '<p>Text with <strong>bold</strong> and <b>also bold</b> formatting.</p>'
44
- - id: text_italic
45
- type: Html
46
- properties:
47
- html: '<p>Text with <em>italic</em> and <i>also italic</i> formatting.</p>'
48
- - id: text_underline
49
- type: Html
50
- properties:
51
- html: '<p>Text with <u>underline</u> formatting.</p>'
52
- - id: text_strikethrough
53
- type: Html
54
- properties:
55
- html: '<p>Text with <s>strikethrough</s> and <del>deleted</del> formatting.</p>'
56
- - id: text_combined
57
- type: Html
58
- properties:
59
- html: '<p>Text with <strong><em>bold italic</em></strong>, <strong><u>bold underline</u></strong>, and <em><u>italic underline</u></em>.</p>'
60
- - id: text_small
61
- type: Html
62
- properties:
63
- html: '<p>Normal text and <small>small text</small> together.</p>'
64
- - id: text_sub_sup
65
- type: Html
66
- properties:
67
- html: '<p>H<sub>2</sub>O is water. E=mc<sup>2</sup> is relativity.</p>'
68
- - id: text_mark
69
- type: Html
70
- properties:
71
- html: '<p>This sentence has <mark>highlighted text</mark> using the mark tag.</p>'
72
-
73
- - title: Lists
74
- blocks:
75
- - id: list_unordered
76
- type: Html
77
- properties:
78
- html: '<ul><li>First item</li><li>Second item</li><li>Third item</li></ul>'
79
- - id: list_ordered
80
- type: Html
81
- properties:
82
- html: '<ol><li>Step one</li><li>Step two</li><li>Step three</li></ol>'
83
- - id: list_nested
84
- type: Html
85
- properties:
86
- html: '<ul><li>Parent item<ul><li>Child item 1</li><li>Child item 2</li></ul></li><li>Another parent item<ul><li>Another child</li></ul></li></ul>'
87
- - id: list_ordered_nested
88
- type: Html
89
- properties:
90
- html: '<ol><li>First item<ol><li>Sub-item A</li><li>Sub-item B</li></ol></li><li>Second item</li><li>Third item</li></ol>'
91
-
92
- - title: Styled Inline Elements
93
- blocks:
94
- - id: styled_colored_text
95
- type: Html
96
- properties:
97
- html: '<p><span style="color: var(--ant-color-primary);">Primary text</span>, <span style="color: var(--ant-color-success);">success text</span>, <span style="color: var(--ant-color-error);">error text</span>, and <span style="color: var(--ant-color-warning);">warning text</span>.</p>'
98
- - id: styled_background
99
- type: Html
100
- properties:
101
- html: '<p><span style="background: var(--ant-color-primary-bg); padding: 2px 6px; border-radius: 3px;">Primary highlight</span> and <span style="background: var(--ant-color-success-bg); padding: 2px 6px; border-radius: 3px;">Success highlight</span>.</p>'
102
- - id: styled_sizes
103
- type: Html
104
- properties:
105
- html: '<p><span style="font-size: 12px;">Small text</span>, <span style="font-size: 16px;">Normal text</span>, <span style="font-size: 20px;">Large text</span>, <span style="font-size: 24px;">Extra large</span>.</p>'
106
-
107
- - title: Blockquotes
108
- blocks:
109
- - id: blockquote_simple
110
- type: Html
111
- properties:
112
- html: '<blockquote>A simple blockquote with default styling.</blockquote>'
113
- - id: blockquote_styled
114
- type: Html
115
- properties:
116
- html: '<blockquote style="border-left: 4px solid var(--ant-color-primary); padding-left: 16px; margin: 0; color: var(--ant-color-text-secondary);">This is a styled blockquote with a primary color left border accent and subdued text color.</blockquote>'
117
- - id: blockquote_attribution
118
- type: Html
119
- properties:
120
- html: '<blockquote style="border-left: 4px solid var(--ant-color-border); padding-left: 16px; margin: 0;"><p style="margin: 0 0 4px 0; font-style: italic; color: var(--ant-color-text-secondary);">"The best way to predict the future is to invent it."</p><footer style="color: var(--ant-color-text-tertiary); font-size: 13px;">-- Alan Kay</footer></blockquote>'
121
-
122
- - title: Code Blocks
123
- blocks:
124
- - id: code_inline
125
- type: Html
126
- properties:
127
- html: '<p>Use the <code style="background: var(--ant-color-fill-tertiary); padding: 2px 6px; border-radius: 4px; font-family: monospace;">Html</code> block for safe HTML rendering.</p>'
128
- - id: code_block
129
- type: Html
130
- properties:
131
- html: |
132
- <pre style="background: var(--ant-color-bg-elevated); color: var(--ant-color-text); padding: 16px; border-radius: 6px; overflow-x: auto; font-family: monospace; font-size: 14px; border: 1px solid var(--ant-color-border);"><code>function greet(name) {
133
- return "Hello, " + name + "!";
134
- }</code></pre>
135
- - id: code_multi_inline
136
- type: Html
137
- properties:
138
- html: '<p>Set <code style="background: var(--ant-color-fill-tertiary); padding: 2px 6px; border-radius: 4px; font-family: monospace;">type</code> to <code style="background: var(--ant-color-fill-tertiary); padding: 2px 6px; border-radius: 4px; font-family: monospace;">Html</code> and provide the <code style="background: var(--ant-color-fill-tertiary); padding: 2px 6px; border-radius: 4px; font-family: monospace;">html</code> property.</p>'
139
-
140
- - title: Links
141
- blocks:
142
- - id: link_basic
143
- type: Html
144
- properties:
145
- html: '<p>Visit <a href="https://lowdefy.com">Lowdefy</a> for more information.</p>'
146
- - id: link_styled
147
- type: Html
148
- properties:
149
- html: '<p><a href="https://lowdefy.com" style="color: var(--ant-color-primary); text-decoration: none; font-weight: bold;">Primary styled link</a> within a paragraph.</p>'
150
- - id: link_multiple
151
- type: Html
152
- properties:
153
- html: '<p>Resources: <a href="https://lowdefy.com">Home</a> | <a href="https://docs.lowdefy.com">Docs</a> | <a href="https://github.com/lowdefy/lowdefy">GitHub</a></p>'
154
-
155
- - title: Nested Elements
156
- blocks:
157
- - id: nested_section
158
- type: Html
159
- properties:
160
- html: '<div><h4>Section Title</h4><p>A paragraph with a <a href="https://lowdefy.com">safe link</a> inside it.</p><hr /><p>Content below the horizontal rule.</p></div>'
161
- - id: nested_formatted_list
162
- type: Html
163
- properties:
164
- html: '<div><h4>Features</h4><ul><li><strong>Fast:</strong> Optimized rendering</li><li><strong>Safe:</strong> XSS protection built-in</li><li><strong>Flexible:</strong> Supports many HTML tags</li></ul></div>'
165
- - id: nested_mixed
166
- type: Html
167
- properties:
168
- html: '<div><p>This block mixes <strong>bold</strong>, <em>italic</em>, and <code style="background: var(--ant-color-fill-tertiary); padding: 2px 4px; border-radius: 3px;">code</code> formatting.</p><blockquote style="border-left: 3px solid var(--ant-color-border); padding-left: 12px; margin: 12px 0; color: var(--ant-color-text-secondary);">It also includes a blockquote with <strong>bold text</strong>.</blockquote><ol><li>And a numbered list</li><li>With multiple items</li></ol></div>'
169
-
170
- - title: Tables
171
- blocks:
172
- - id: table_simple
173
- type: Html
174
- properties:
175
- html: '<table style="width: 100%; border-collapse: collapse;"><thead><tr><th style="border: 1px solid var(--ant-color-border); padding: 8px; background: var(--ant-color-fill-quaternary); text-align: left;">Feature</th><th style="border: 1px solid var(--ant-color-border); padding: 8px; background: var(--ant-color-fill-quaternary); text-align: left;">Status</th></tr></thead><tbody><tr><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Html block</td><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Safe</td></tr><tr><td style="border: 1px solid var(--ant-color-border); padding: 8px;">DangerousHtml</td><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Powerful</td></tr></tbody></table>'
176
-
177
- - title: Style Overrides
178
- blocks:
179
- - id: style_padded
180
- type: Html
181
- style:
182
- .element:
183
- padding: 20
184
- background: var(--ant-color-primary-bg)
185
- borderRadius: 8
186
- properties:
187
- html: '<p style="margin: 0;">Content inside a styled Html container with primary background.</p>'
188
- - id: style_bordered
189
- type: Html
190
- style:
191
- .element:
192
- border: 2px solid var(--ant-color-primary)
193
- padding: 16
194
- borderRadius: 8
195
- properties:
196
- html: '<p style="margin: 0;">Content with a primary color border applied via style override.</p>'
197
- - id: style_shadow
198
- type: Html
199
- style:
200
- .element:
201
- padding: 20
202
- borderRadius: 12
203
- boxShadow: var(--ant-box-shadow)
204
- background: var(--ant-color-bg-container)
205
- properties:
206
- html: '<h4 style="margin: 0 0 8px 0;">Elevated Html Block</h4><p style="margin: 0; color: var(--ant-color-text-secondary);">An Html block styled with box-shadow for an elevated card look.</p>'
207
- - id: style_max_width
208
- type: Html
209
- style:
210
- .element:
211
- maxWidth: 350
212
- margin: 0 auto
213
- textAlign: center
214
- padding: 16
215
- background: var(--ant-color-success-bg)
216
- borderRadius: 8
217
- properties:
218
- html: '<p style="margin: 0; color: var(--ant-color-success); font-weight: bold;">Centered and constrained width.</p>'
219
- - id: style_left_accent
220
- type: Html
221
- style:
222
- .element:
223
- borderLeft: 4px solid var(--ant-color-warning)
224
- paddingLeft: 16
225
- paddingTop: 8
226
- paddingBottom: 8
227
- properties:
228
- html: '<p style="margin: 0; color: var(--ant-color-warning); font-weight: 500;">Warning accent border on the left side.</p>'
229
- - id: style_elevated
230
- type: Html
231
- style:
232
- .element:
233
- background: var(--ant-color-bg-elevated)
234
- color: var(--ant-color-text)
235
- padding: 20
236
- borderRadius: 8
237
- border: 1px solid var(--ant-color-border)
238
- properties:
239
- html: '<h4 style="margin: 0 0 8px 0;">Elevated Block</h4><p style="margin: 0;">Uses bg-elevated token for a surface that adapts to light and dark mode.</p>'
@@ -1,56 +0,0 @@
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
@@ -1,75 +0,0 @@
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