@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,78 @@
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: box
16
+ type: Box
17
+ properties:
18
+ style:
19
+ padding: 20px
20
+
21
+ blocks:
22
+ # Test 1: Basic Box renders
23
+ - id: box_basic
24
+ type: Box
25
+
26
+ # Test 2: Box with content property
27
+ - id: box_content
28
+ type: Box
29
+ properties:
30
+ content: Hello from Box
31
+
32
+ # Test 3: Box with style property
33
+ - id: box_styled
34
+ type: Box
35
+ properties:
36
+ content: Styled Box
37
+ style:
38
+ backgroundColor: rgb(0, 128, 255)
39
+ color: white
40
+ padding: 10px
41
+
42
+ # Test 4: Box with nested child block
43
+ - id: box_with_children
44
+ type: Box
45
+ blocks:
46
+ - id: child_span
47
+ type: Span
48
+ properties:
49
+ content: Child content
50
+
51
+ # Test 5: Box with dotted block ID (regression test for CSS selector escaping)
52
+ - id: form.field.name
53
+ type: Box
54
+ properties:
55
+ content: Dotted ID Box
56
+
57
+ # Test 6: Box with onClick event using SetState
58
+ - id: box_clickable
59
+ type: Box
60
+ properties:
61
+ content:
62
+ _if:
63
+ test:
64
+ _eq:
65
+ - _state: clicked
66
+ - true
67
+ then: Clicked!
68
+ else: Click me
69
+ style:
70
+ cursor: pointer
71
+ padding: 10px
72
+ border: 1px solid gray
73
+ events:
74
+ onClick:
75
+ - id: set_clicked
76
+ type: SetState
77
+ params:
78
+ clicked: true
@@ -0,0 +1,43 @@
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: Box
17
+ - id: properties.content
18
+ type: Box
19
+ properties:
20
+ content: Foo
21
+ - id: properties.style
22
+ type: Box
23
+ properties:
24
+ style:
25
+ border: '1px solid blue'
26
+ - id: areas.content
27
+ type: Box
28
+ areas:
29
+ content:
30
+ blocks:
31
+ - id: testArea
32
+ type: Test
33
+ - id: events.onClick
34
+ type: Box
35
+ areas:
36
+ content:
37
+ blocks:
38
+ - id: testArea
39
+ type: Test
40
+ events:
41
+ onClick:
42
+ - id: testAction
43
+ type: Text
@@ -0,0 +1,182 @@
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: DangerousHtml
19
+ properties:
20
+ html: '<p>This is a basic paragraph rendered as HTML.</p>'
21
+ - id: basic_heading
22
+ type: DangerousHtml
23
+ properties:
24
+ html: '<h3>Heading rendered with DangerousHtml</h3>'
25
+ - id: basic_link
26
+ type: DangerousHtml
27
+ properties:
28
+ html: '<p>Visit <a href="https://lowdefy.com" target="_blank" rel="noopener noreferrer">Lowdefy</a> for more info.</p>'
29
+ - id: basic_multiple_headings
30
+ type: DangerousHtml
31
+ properties:
32
+ html: '<h4>Section Title</h4><p>Some paragraph text below the heading.</p><h5>Sub-section</h5><p>More text in the sub-section.</p>'
33
+
34
+ - title: Styled HTML
35
+ blocks:
36
+ - id: styled_colored
37
+ type: DangerousHtml
38
+ properties:
39
+ html: '<p style="color: var(--ant-color-primary); font-weight: bold; font-size: 18px;">Blue bold text with inline styles</p>'
40
+ - id: styled_box_success
41
+ type: DangerousHtml
42
+ properties:
43
+ html: '<div style="padding: 16px; background-color: var(--ant-color-success-bg); border: 1px solid var(--ant-color-success-border); border-radius: 6px;"><strong>Success:</strong> Your changes have been saved.</div>'
44
+ - id: styled_box_warning
45
+ type: DangerousHtml
46
+ properties:
47
+ html: '<div style="padding: 16px; background-color: var(--ant-color-warning-bg); border: 1px solid var(--ant-color-warning-border); border-radius: 6px;"><strong>Warning:</strong> Please review your settings before proceeding.</div>'
48
+ - id: styled_box_error
49
+ type: DangerousHtml
50
+ properties:
51
+ html: '<div style="padding: 16px; background-color: var(--ant-color-error-bg); border: 1px solid var(--ant-color-error-border); border-radius: 6px;"><strong>Error:</strong> Unable to complete the operation.</div>'
52
+ - id: styled_box_info
53
+ type: DangerousHtml
54
+ properties:
55
+ html: '<div style="padding: 16px; background-color: var(--ant-color-info-bg); border: 1px solid var(--ant-color-info-border); border-radius: 6px;"><strong>Info:</strong> The system will undergo maintenance at midnight.</div>'
56
+
57
+ - title: Lists
58
+ blocks:
59
+ - id: list_unordered
60
+ type: DangerousHtml
61
+ properties:
62
+ html: '<ul style="list-style-type: disc; padding-left: 20px;"><li>First item</li><li>Second item</li><li>Third item</li></ul>'
63
+ - id: list_ordered
64
+ type: DangerousHtml
65
+ properties:
66
+ html: '<ol style="padding-left: 20px;"><li>Step one</li><li>Step two</li><li>Step three</li></ol>'
67
+ - id: list_colored
68
+ type: DangerousHtml
69
+ properties:
70
+ html: '<ul style="list-style-type: disc; padding-left: 20px;"><li style="color: var(--ant-color-success);">Completed</li><li style="color: var(--ant-color-warning);">In Progress</li><li style="color: var(--ant-color-error);">Overdue</li></ul>'
71
+ - id: list_nested
72
+ type: DangerousHtml
73
+ properties:
74
+ html: '<ul style="padding-left: 20px;"><li>Parent item<ul style="padding-left: 20px;"><li>Child item 1</li><li>Child item 2</li></ul></li><li>Another parent item</li></ul>'
75
+ - id: list_definition
76
+ type: DangerousHtml
77
+ properties:
78
+ html: '<dl><dt style="font-weight: bold;">Term 1</dt><dd style="margin-left: 20px; color: var(--ant-color-text-secondary);">Definition of the first term.</dd><dt style="font-weight: bold;">Term 2</dt><dd style="margin-left: 20px; color: var(--ant-color-text-secondary);">Definition of the second term.</dd></dl>'
79
+
80
+ - title: HTML Table
81
+ blocks:
82
+ - id: table_simple
83
+ type: DangerousHtml
84
+ properties:
85
+ 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;">Name</th><th style="border: 1px solid var(--ant-color-border); padding: 8px; background: var(--ant-color-fill-quaternary); text-align: left;">Role</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;">Alice</td><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Developer</td><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Active</td></tr><tr><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Bob</td><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Designer</td><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Active</td></tr><tr><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Charlie</td><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Manager</td><td style="border: 1px solid var(--ant-color-border); padding: 8px;">Away</td></tr></tbody></table>'
86
+ - id: table_striped
87
+ type: DangerousHtml
88
+ properties:
89
+ html: '<table style="width: 100%; border-collapse: collapse;"><thead><tr><th style="border: 1px solid var(--ant-color-border); padding: 10px; background: var(--ant-color-primary); color: white; text-align: left;">Product</th><th style="border: 1px solid var(--ant-color-border); padding: 10px; background: var(--ant-color-primary); color: white; text-align: right;">Price</th><th style="border: 1px solid var(--ant-color-border); padding: 10px; background: var(--ant-color-primary); color: white; text-align: center;">Stock</th></tr></thead><tbody><tr><td style="border: 1px solid var(--ant-color-border); padding: 10px;">Widget A</td><td style="border: 1px solid var(--ant-color-border); padding: 10px; text-align: right;">$29.99</td><td style="border: 1px solid var(--ant-color-border); padding: 10px; text-align: center;">150</td></tr><tr style="background: var(--ant-color-fill-quaternary);"><td style="border: 1px solid var(--ant-color-border); padding: 10px;">Widget B</td><td style="border: 1px solid var(--ant-color-border); padding: 10px; text-align: right;">$49.99</td><td style="border: 1px solid var(--ant-color-border); padding: 10px; text-align: center;">85</td></tr><tr><td style="border: 1px solid var(--ant-color-border); padding: 10px;">Widget C</td><td style="border: 1px solid var(--ant-color-border); padding: 10px; text-align: right;">$19.99</td><td style="border: 1px solid var(--ant-color-border); padding: 10px; text-align: center;">320</td></tr></tbody></table>'
90
+
91
+ - title: Embedded Media Placeholders
92
+ blocks:
93
+ - id: media_video_placeholder
94
+ type: DangerousHtml
95
+ properties:
96
+ html: '<div style="width: 100%; max-width: 560px; aspect-ratio: 16/9; background: var(--ant-color-fill-tertiary); border: 2px dashed var(--ant-color-border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--ant-color-text-tertiary); font-size: 16px;">Video Placeholder (16:9)</div>'
97
+ - id: media_iframe_placeholder
98
+ type: DangerousHtml
99
+ properties:
100
+ html: '<div style="width: 100%; max-width: 400px; height: 300px; background: var(--ant-color-fill-quaternary); border: 2px dashed var(--ant-color-border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--ant-color-text-tertiary);">Embedded Content Area</div>'
101
+
102
+ - title: Complex Layout
103
+ blocks:
104
+ - id: layout_card
105
+ type: DangerousHtml
106
+ properties:
107
+ html: '<div style="max-width: 400px; border: 1px solid var(--ant-color-border); border-radius: 8px; overflow: hidden;"><div style="padding: 16px; background: var(--ant-color-fill-quaternary); border-bottom: 1px solid var(--ant-color-border);"><h4 style="margin: 0;">Card Title</h4></div><div style="padding: 16px;"><p style="margin: 0 0 12px 0; color: var(--ant-color-text-secondary);">This is a card-like layout created purely with HTML and inline styles.</p><div style="display: flex; gap: 8px;"><span style="background: var(--ant-color-primary-bg); color: var(--ant-color-primary); padding: 2px 8px; border-radius: 4px; font-size: 12px;">Tag 1</span><span style="background: var(--ant-color-success-bg); color: var(--ant-color-success); padding: 2px 8px; border-radius: 4px; font-size: 12px;">Tag 2</span></div></div></div>'
108
+ - id: layout_flex_row
109
+ type: DangerousHtml
110
+ properties:
111
+ html: '<div style="display: flex; gap: 16px; flex-wrap: wrap;"><div style="flex: 1; min-width: 150px; padding: 16px; background: var(--ant-color-primary-bg); border-radius: 8px; text-align: center;"><div style="font-size: 24px; font-weight: bold; color: var(--ant-color-primary);">42</div><div style="color: var(--ant-color-text-secondary); font-size: 12px;">Active Users</div></div><div style="flex: 1; min-width: 150px; padding: 16px; background: var(--ant-color-success-bg); border-radius: 8px; text-align: center;"><div style="font-size: 24px; font-weight: bold; color: var(--ant-color-success);">128</div><div style="color: var(--ant-color-text-secondary); font-size: 12px;">Completed</div></div><div style="flex: 1; min-width: 150px; padding: 16px; background: var(--ant-color-warning-bg); border-radius: 8px; text-align: center;"><div style="font-size: 24px; font-weight: bold; color: var(--ant-color-warning);">7</div><div style="color: var(--ant-color-text-secondary); font-size: 12px;">Pending</div></div></div>'
112
+ - id: layout_timeline
113
+ type: DangerousHtml
114
+ properties:
115
+ html: '<div style="padding-left: 20px; border-left: 2px solid var(--ant-color-primary);"><div style="position: relative; padding-bottom: 16px;"><div style="position: absolute; left: -26px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ant-color-primary);"></div><div style="font-weight: bold;">Step 1: Setup</div><div style="color: var(--ant-color-text-secondary); font-size: 13px;">Configure your project settings.</div></div><div style="position: relative; padding-bottom: 16px;"><div style="position: absolute; left: -26px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ant-color-primary);"></div><div style="font-weight: bold;">Step 2: Build</div><div style="color: var(--ant-color-text-secondary); font-size: 13px;">Run the build pipeline.</div></div><div style="position: relative;"><div style="position: absolute; left: -26px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ant-color-border);"></div><div style="font-weight: bold; color: var(--ant-color-text-tertiary);">Step 3: Deploy</div><div style="color: var(--ant-color-text-quaternary); font-size: 13px;">Deploy to production.</div></div></div>'
116
+
117
+ - title: DOMPurify Options
118
+ blocks:
119
+ - id: purify_default_label
120
+ type: Markdown
121
+ properties:
122
+ content: '**Default (scripts and event handlers stripped):**'
123
+ - id: purify_default
124
+ type: DangerousHtml
125
+ properties:
126
+ html: '<p>Safe content rendered. <script>alert("removed")</script></p>'
127
+ - id: purify_allow_target_label
128
+ type: Markdown
129
+ properties:
130
+ content: '**With ADD_ATTR to allow target attribute:**'
131
+ - id: purify_allow_target
132
+ type: DangerousHtml
133
+ properties:
134
+ html: '<a href="https://lowdefy.com" target="_blank">Link with target=_blank allowed</a>'
135
+ DOMPurifyOptions:
136
+ ADD_ATTR:
137
+ - target
138
+
139
+ - title: Style Overrides
140
+ blocks:
141
+ - id: style_padded
142
+ type: DangerousHtml
143
+ style:
144
+ .element:
145
+ padding: 20
146
+ background: var(--ant-color-fill-quaternary)
147
+ borderRadius: 8
148
+ border: 1px solid var(--ant-color-border)
149
+ properties:
150
+ html: '<p style="margin: 0;">Content inside a styled DangerousHtml container with padding and background.</p>'
151
+ - id: style_max_width
152
+ type: DangerousHtml
153
+ style:
154
+ .element:
155
+ maxWidth: 400
156
+ margin: 0 auto
157
+ padding: 16
158
+ background: var(--ant-color-primary-bg)
159
+ borderRadius: 8
160
+ textAlign: center
161
+ properties:
162
+ html: '<p style="margin: 0; color: var(--ant-color-primary); font-weight: bold;">Centered container with max-width constraint.</p>'
163
+ - id: style_shadow
164
+ type: DangerousHtml
165
+ style:
166
+ .element:
167
+ padding: 20
168
+ borderRadius: 12
169
+ boxShadow: var(--ant-box-shadow)
170
+ background: var(--ant-color-bg-container)
171
+ properties:
172
+ html: '<h4 style="margin: 0 0 8px 0;">Elevated Card</h4><p style="margin: 0; color: var(--ant-color-text-secondary);">A DangerousHtml block styled with a box shadow for an elevated card appearance.</p>'
173
+ - id: style_border_left
174
+ type: DangerousHtml
175
+ style:
176
+ .element:
177
+ borderLeft: 4px solid var(--ant-color-primary)
178
+ paddingLeft: 16
179
+ paddingTop: 8
180
+ paddingBottom: 8
181
+ properties:
182
+ html: '<p style="margin: 0; color: var(--ant-color-primary); font-weight: 500;">Highlighted with a primary color left border accent.</p>'
@@ -0,0 +1,33 @@
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: dangeroushtml
16
+ type: Box
17
+
18
+ blocks:
19
+ - id: dangeroushtml_basic
20
+ type: DangerousHtml
21
+ properties:
22
+ html: <p>Basic dangerous HTML content</p>
23
+
24
+ - id: dangeroushtml_iframe
25
+ type: DangerousHtml
26
+ properties:
27
+ html: <iframe src="about:blank" title="Test iframe"></iframe>
28
+ DOMPurifyOptions:
29
+ ADD_TAGS:
30
+ - iframe
31
+ ADD_ATTR:
32
+ - src
33
+ - title
@@ -0,0 +1,83 @@
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: DangerousHtml
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: DangerousHtml
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: DangerousHtml
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: DangerousHtml
40
+ properties:
41
+ html: |
42
+ No additional ADD_TAGS:
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-DOMPurifyOptions.ADD_TAGS-iframe
45
+ type: DangerousHtml
46
+ properties:
47
+ DOMPurifyOptions:
48
+ ADD_TAGS:
49
+ - iframe
50
+ html: |
51
+ With iframe ADD_TAGS:
52
+ <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>
53
+ - id: properties.html-bad-code
54
+ type: DangerousHtml
55
+ properties:
56
+ html: |
57
+ <h1>Link<h1>
58
+
59
+ <a href="https://lowdefy.com">Lowdefy link</a>
60
+
61
+ <font size="+10">Description</font>
62
+
63
+ <h1>Bad HTML</h1>
64
+
65
+ <div onmouseover="alert('alpha')">
66
+ <a href="javascript:alert('bravo')">delta</a>
67
+ <img src="x" onerror="alert('charlie')">
68
+ <iframe src="javascript:alert('delta')"></iframe>
69
+ <math>
70
+ <mi xlink:href="data:x,<script>alert('echo')</script>"></mi>
71
+ </math>
72
+ </div>
73
+ <script>
74
+ alert('script tag');
75
+ </script>
76
+ - id: properties.html is number 0
77
+ type: DangerousHtml
78
+ properties:
79
+ html: 0
80
+ - id: properties.html is boolean false
81
+ type: DangerousHtml
82
+ properties:
83
+ html: false
@@ -0,0 +1,239 @@
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>'