ripple 0.3.67 → 0.3.69

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 (182) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/package.json +3 -3
  3. package/src/jsx-runtime.d.ts +2 -2
  4. package/src/runtime/element.js +1 -1
  5. package/src/runtime/index-client.js +11 -11
  6. package/src/runtime/index-server.js +7 -4
  7. package/src/runtime/internal/client/bindings.js +1 -1
  8. package/src/runtime/internal/client/blocks.js +13 -4
  9. package/src/runtime/internal/client/component.js +55 -0
  10. package/src/runtime/internal/client/composite.js +4 -2
  11. package/src/runtime/internal/client/expression.js +65 -7
  12. package/src/runtime/internal/client/hmr.js +54 -43
  13. package/src/runtime/internal/client/index.js +5 -1
  14. package/src/runtime/internal/client/portal.js +70 -69
  15. package/src/runtime/internal/client/render.js +3 -0
  16. package/src/runtime/internal/server/index.js +92 -8
  17. package/tests/client/__snapshots__/html.test.tsrx.snap +3 -3
  18. package/tests/client/array/array.copy-within.test.tsrx +33 -31
  19. package/tests/client/array/array.derived.test.tsrx +186 -169
  20. package/tests/client/array/array.iteration.test.tsrx +40 -37
  21. package/tests/client/array/array.mutations.test.tsrx +113 -101
  22. package/tests/client/array/array.static.test.tsrx +119 -101
  23. package/tests/client/array/array.to-methods.test.tsrx +24 -21
  24. package/tests/client/async-suspend.test.tsrx +247 -246
  25. package/tests/client/basic/__snapshots__/basic.rendering.test.tsrx.snap +0 -1
  26. package/tests/client/basic/basic.attributes.test.tsrx +428 -423
  27. package/tests/client/basic/basic.collections.test.tsrx +109 -102
  28. package/tests/client/basic/basic.components.test.tsrx +323 -205
  29. package/tests/client/basic/basic.errors.test.tsrx +91 -91
  30. package/tests/client/basic/basic.events.test.tsrx +114 -115
  31. package/tests/client/basic/basic.get-set.test.tsrx +97 -87
  32. package/tests/client/basic/basic.hmr.test.tsrx +19 -16
  33. package/tests/client/basic/basic.reactivity.test.tsrx +199 -191
  34. package/tests/client/basic/basic.rendering.test.tsrx +272 -182
  35. package/tests/client/basic/basic.styling.test.tsrx +23 -22
  36. package/tests/client/basic/basic.utilities.test.tsrx +10 -8
  37. package/tests/client/boundaries.test.tsrx +26 -26
  38. package/tests/client/compiler/__snapshots__/compiler.assignments.test.rsrx.snap +5 -5
  39. package/tests/client/compiler/__snapshots__/compiler.assignments.test.tsrx.snap +5 -5
  40. package/tests/client/compiler/compiler.assignments.test.tsrx +77 -81
  41. package/tests/client/compiler/compiler.attributes.test.tsrx +15 -15
  42. package/tests/client/compiler/compiler.basic.test.tsrx +322 -314
  43. package/tests/client/compiler/compiler.regex.test.tsrx +44 -47
  44. package/tests/client/compiler/compiler.tracked-access.test.tsrx +38 -38
  45. package/tests/client/compiler/compiler.try-in-function.test.tsrx +16 -16
  46. package/tests/client/compiler/compiler.typescript.test.tsrx +2 -2
  47. package/tests/client/composite/composite.dynamic-components.test.tsrx +47 -48
  48. package/tests/client/composite/composite.generics.test.tsrx +168 -192
  49. package/tests/client/composite/composite.props.test.tsrx +97 -81
  50. package/tests/client/composite/composite.reactivity.test.tsrx +177 -147
  51. package/tests/client/composite/composite.render.test.tsrx +122 -105
  52. package/tests/client/computed-properties.test.tsrx +28 -28
  53. package/tests/client/context.test.tsrx +21 -21
  54. package/tests/client/css/global-additional-cases.test.tsrx +58 -58
  55. package/tests/client/css/global-advanced-selectors.test.tsrx +16 -16
  56. package/tests/client/css/global-at-rules.test.tsrx +10 -10
  57. package/tests/client/css/global-basic.test.tsrx +14 -14
  58. package/tests/client/css/global-classes-ids.test.tsrx +14 -14
  59. package/tests/client/css/global-combinators.test.tsrx +10 -10
  60. package/tests/client/css/global-complex-nesting.test.tsrx +14 -14
  61. package/tests/client/css/global-edge-cases.test.tsrx +18 -18
  62. package/tests/client/css/global-keyframes.test.tsrx +12 -12
  63. package/tests/client/css/global-nested.test.tsrx +10 -10
  64. package/tests/client/css/global-pseudo.test.tsrx +12 -12
  65. package/tests/client/css/global-scoping.test.tsrx +20 -20
  66. package/tests/client/css/style-identifier.test.tsrx +143 -291
  67. package/tests/client/date.test.tsrx +146 -133
  68. package/tests/client/dynamic-elements.test.tsrx +398 -365
  69. package/tests/client/events.test.tsrx +292 -290
  70. package/tests/client/for.test.tsrx +156 -153
  71. package/tests/client/head.test.tsrx +105 -96
  72. package/tests/client/html.test.tsrx +122 -26
  73. package/tests/client/input-value.test.tsrx +1361 -1314
  74. package/tests/client/lazy-array.test.tsrx +16 -13
  75. package/tests/client/lazy-destructuring.test.tsrx +257 -213
  76. package/tests/client/map.test.tsrx +65 -60
  77. package/tests/client/media-query.test.tsrx +22 -20
  78. package/tests/client/object.test.tsrx +87 -81
  79. package/tests/client/portal.test.tsrx +57 -51
  80. package/tests/client/ref.test.tsrx +233 -202
  81. package/tests/client/return.test.tsrx +71 -2560
  82. package/tests/client/set.test.tsrx +54 -45
  83. package/tests/client/svg.test.tsrx +216 -186
  84. package/tests/client/switch.test.tsrx +194 -193
  85. package/tests/client/track-async-hydration.test.tsrx +18 -14
  86. package/tests/client/tracked-index-access.test.tsrx +28 -18
  87. package/tests/client/try.test.tsrx +675 -548
  88. package/tests/client/tsx.test.tsrx +373 -311
  89. package/tests/client/typescript-generics.test.tsrx +145 -145
  90. package/tests/client/url/url.derived.test.tsrx +33 -28
  91. package/tests/client/url/url.parsing.test.tsrx +61 -51
  92. package/tests/client/url/url.partial-removal.test.tsrx +56 -48
  93. package/tests/client/url/url.reactivity.test.tsrx +142 -125
  94. package/tests/client/url/url.serialization.test.tsrx +13 -11
  95. package/tests/client/url-search-params/url-search-params.derived.test.tsrx +34 -29
  96. package/tests/client/url-search-params/url-search-params.initialization.test.tsrx +25 -21
  97. package/tests/client/url-search-params/url-search-params.iteration.test.tsrx +50 -45
  98. package/tests/client/url-search-params/url-search-params.mutation.test.tsrx +111 -99
  99. package/tests/client/url-search-params/url-search-params.retrieval.test.tsrx +49 -43
  100. package/tests/client/url-search-params/url-search-params.serialization.test.tsrx +14 -12
  101. package/tests/client/url-search-params/url-search-params.tracked-url.test.tsrx +16 -14
  102. package/tests/hydration/basic.test.js +3 -3
  103. package/tests/hydration/compiled/client/basic.js +586 -651
  104. package/tests/hydration/compiled/client/composite.js +79 -104
  105. package/tests/hydration/compiled/client/events.js +140 -148
  106. package/tests/hydration/compiled/client/for.js +1005 -1018
  107. package/tests/hydration/compiled/client/head.js +124 -134
  108. package/tests/hydration/compiled/client/hmr.js +41 -48
  109. package/tests/hydration/compiled/client/html-in-template.js +38 -41
  110. package/tests/hydration/compiled/client/html.js +970 -1314
  111. package/tests/hydration/compiled/client/if-children.js +234 -249
  112. package/tests/hydration/compiled/client/if.js +182 -189
  113. package/tests/hydration/compiled/client/mixed-control-flow.js +347 -303
  114. package/tests/hydration/compiled/client/nested-control-flow.js +1084 -832
  115. package/tests/hydration/compiled/client/portal.js +65 -85
  116. package/tests/hydration/compiled/client/reactivity.js +84 -90
  117. package/tests/hydration/compiled/client/return.js +38 -1939
  118. package/tests/hydration/compiled/client/switch.js +218 -224
  119. package/tests/hydration/compiled/client/track-async-serialization.js +250 -259
  120. package/tests/hydration/compiled/client/try.js +123 -132
  121. package/tests/hydration/compiled/server/basic.js +773 -831
  122. package/tests/hydration/compiled/server/composite.js +166 -191
  123. package/tests/hydration/compiled/server/events.js +170 -184
  124. package/tests/hydration/compiled/server/for.js +851 -909
  125. package/tests/hydration/compiled/server/head.js +206 -216
  126. package/tests/hydration/compiled/server/hmr.js +64 -72
  127. package/tests/hydration/compiled/server/html-in-template.js +42 -76
  128. package/tests/hydration/compiled/server/html.js +1362 -1667
  129. package/tests/hydration/compiled/server/if-children.js +419 -445
  130. package/tests/hydration/compiled/server/if.js +194 -208
  131. package/tests/hydration/compiled/server/mixed-control-flow.js +249 -257
  132. package/tests/hydration/compiled/server/nested-control-flow.js +491 -515
  133. package/tests/hydration/compiled/server/portal.js +152 -160
  134. package/tests/hydration/compiled/server/reactivity.js +94 -106
  135. package/tests/hydration/compiled/server/return.js +28 -2172
  136. package/tests/hydration/compiled/server/switch.js +274 -286
  137. package/tests/hydration/compiled/server/track-async-serialization.js +340 -358
  138. package/tests/hydration/compiled/server/try.js +167 -185
  139. package/tests/hydration/components/basic.tsrx +320 -272
  140. package/tests/hydration/components/composite.tsrx +44 -32
  141. package/tests/hydration/components/events.tsrx +101 -91
  142. package/tests/hydration/components/for.tsrx +510 -452
  143. package/tests/hydration/components/head.tsrx +87 -80
  144. package/tests/hydration/components/hmr.tsrx +22 -17
  145. package/tests/hydration/components/html-in-template.tsrx +22 -17
  146. package/tests/hydration/components/html.tsrx +525 -443
  147. package/tests/hydration/components/if-children.tsrx +158 -148
  148. package/tests/hydration/components/if.tsrx +109 -95
  149. package/tests/hydration/components/mixed-control-flow.tsrx +100 -96
  150. package/tests/hydration/components/nested-control-flow.tsrx +215 -203
  151. package/tests/hydration/components/portal.tsrx +41 -34
  152. package/tests/hydration/components/reactivity.tsrx +37 -27
  153. package/tests/hydration/components/return.tsrx +12 -556
  154. package/tests/hydration/components/switch.tsrx +120 -114
  155. package/tests/hydration/components/track-async-serialization.tsrx +107 -91
  156. package/tests/hydration/components/try.tsrx +55 -40
  157. package/tests/hydration/html.test.js +4 -4
  158. package/tests/hydration/return.test.js +13 -532
  159. package/tests/server/await.test.tsrx +3 -3
  160. package/tests/server/basic.attributes.test.tsrx +264 -195
  161. package/tests/server/basic.components.test.tsrx +296 -169
  162. package/tests/server/basic.test.tsrx +300 -198
  163. package/tests/server/compiler.test.tsrx +62 -60
  164. package/tests/server/composite.props.test.tsrx +77 -63
  165. package/tests/server/composite.test.tsrx +168 -192
  166. package/tests/server/context.test.tsrx +18 -12
  167. package/tests/server/dynamic-elements.test.tsrx +197 -180
  168. package/tests/server/for.test.tsrx +85 -78
  169. package/tests/server/head.test.tsrx +50 -43
  170. package/tests/server/html-nesting-validation.test.tsrx +8 -8
  171. package/tests/server/if.test.tsrx +57 -51
  172. package/tests/server/lazy-destructuring.test.tsrx +366 -294
  173. package/tests/server/return.test.tsrx +76 -1355
  174. package/tests/server/streaming-ssr.test.tsrx +4 -75
  175. package/tests/server/style-identifier.test.tsrx +169 -148
  176. package/tests/server/switch.test.tsrx +91 -85
  177. package/tests/server/track-async-serialization.test.tsrx +105 -85
  178. package/tests/server/try.test.tsrx +374 -280
  179. package/tests/utils/compiler-compat-config.test.js +2 -2
  180. package/tests/utils/runtime-imports.test.js +10 -0
  181. package/types/index.d.ts +8 -0
  182. package/tests/client/__snapshots__/html.test.rsrx.snap +0 -40
@@ -1,95 +1,121 @@
1
- import { track } from 'ripple';
1
+ import { Fragment, track } from 'ripple';
2
2
 
3
- export component StaticHtml() {
4
- const html = '<p><strong>Bold</strong> text</p>';
5
- <div>{html html}</div>
3
+ export function StaticHtml() {
4
+ return <>
5
+ const html = '<p><strong>Bold</strong> text</p>';
6
+ <div innerHTML={html} />
7
+ </>;
6
8
  }
7
9
 
8
- export component DynamicHtml() {
9
- const content = '<p>Dynamic <span>HTML</span> content</p>';
10
- <div>{html content}</div>
10
+ export function DynamicHtml() {
11
+ return <>
12
+ const content = '<p>Dynamic <span>HTML</span> content</p>';
13
+ <div innerHTML={content} />
14
+ </>;
11
15
  }
12
16
 
13
- export component EmptyHtml() {
14
- const html = '';
15
- <div>{html html}</div>
17
+ export function EmptyHtml() {
18
+ return <>
19
+ const html = '';
20
+ <div innerHTML={html} />
21
+ </>;
16
22
  }
17
23
 
18
- export component ComplexHtml() {
19
- const html = '<div class="nested"><span>Nested <em>content</em></span></div>';
20
- <section>{html html}</section>
24
+ export function ComplexHtml() {
25
+ return <>
26
+ const html = '<div class="nested"><span>Nested <em>content</em></span></div>';
27
+ <section innerHTML={html} />
28
+ </>;
21
29
  }
22
30
 
23
- export component MultipleHtml() {
24
- const html1 = '<p>First paragraph</p>';
25
- const html2 = '<p>Second paragraph</p>';
26
- <div>
27
- {html html1}
28
- {html html2}
29
- </div>
30
- }
31
-
32
- export component HtmlWithReactivity() {
33
- <div>
34
- {html '<p>Count: 0</p>'}
35
- <button>{'Increment'}</button>
36
- </div>
31
+ export function MultipleHtml() {
32
+ return <>
33
+ const html1 = '<p>First paragraph</p>';
34
+ const html2 = '<p>Second paragraph</p>';
35
+ <div>
36
+ <Fragment innerHTML={html1} />
37
+ <Fragment innerHTML={html2} />
38
+ </div>
39
+ </>;
37
40
  }
38
41
 
39
- export component HtmlWrapper({ children }: { children: any }) {
40
- <div class="wrapper">
41
- <div class="inner">{children}</div>
42
- </div>
42
+ export function HtmlWithReactivity() {
43
+ return <>
44
+ <div>
45
+ <Fragment innerHTML="<p>Count: 0</p>" />
46
+ <button>{'Increment'}</button>
47
+ </div>
48
+ </>;
43
49
  }
44
50
 
45
- export component HtmlInChildren() {
46
- const content = '<p><strong>Bold</strong> text</p>';
47
- <HtmlWrapper>
48
- <div class="vp-doc">{html content}</div>
49
- </HtmlWrapper>
51
+ export function HtmlWrapper({ children }: { children: any }) {
52
+ return <>
53
+ <div class="wrapper">
54
+ <div class="inner">{children}</div>
55
+ </div>
56
+ </>;
50
57
  }
51
58
 
52
- export component HtmlInChildrenWithSiblings() {
53
- const content = '<p>Dynamic content</p>';
54
- <HtmlWrapper>
55
- <h1>{'Title'}</h1>
56
- <div class="content">{html content}</div>
57
- </HtmlWrapper>
59
+ export function HtmlInChildren() {
60
+ return <>
61
+ const content = '<p><strong>Bold</strong> text</p>';
62
+ <HtmlWrapper>
63
+ <div class="vp-doc" innerHTML={content} />
64
+ </HtmlWrapper>
65
+ </>;
58
66
  }
59
67
 
60
- export component MultipleHtmlInChildren() {
61
- const html1 = '<p>First</p>';
62
- const html2 = '<p>Second</p>';
63
- <HtmlWrapper>
64
- <div class="doc">
65
- {html html1}
66
- {html html2}
67
- </div>
68
- </HtmlWrapper>
68
+ export function HtmlInChildrenWithSiblings() {
69
+ return <>
70
+ const content = '<p>Dynamic content</p>';
71
+ <HtmlWrapper>
72
+ <h1>{'Title'}</h1>
73
+ <div class="content" innerHTML={content} />
74
+ </HtmlWrapper>
75
+ </>;
76
+ }
77
+
78
+ export function MultipleHtmlInChildren() {
79
+ return <>
80
+ const html1 = '<p>First</p>';
81
+ const html2 = '<p>Second</p>';
82
+ <HtmlWrapper>
83
+ <div class="doc">
84
+ <Fragment innerHTML={html1} />
85
+ <Fragment innerHTML={html2} />
86
+ </div>
87
+ </HtmlWrapper>
88
+ </>;
69
89
  }
70
90
 
71
- export component HtmlWithComments() {
72
- const content = '<p>Before comment</p><!-- TODO: Elaborate --><p>After comment</p>';
73
- <div>{html content}</div>
91
+ export function HtmlWithComments() {
92
+ return <>
93
+ const content = '<p>Before comment</p><!-- TODO: Elaborate --><p>After comment</p>';
94
+ <div innerHTML={content} />
95
+ </>;
74
96
  }
75
97
 
76
- export component HtmlWithEmptyComment() {
77
- const content = '<p>Before</p><!----><p>After</p>';
78
- <div>{html content}</div>
98
+ export function HtmlWithEmptyComment() {
99
+ return <>
100
+ const content = '<p>Before</p><!----><p>After</p>';
101
+ <div innerHTML={content} />
102
+ </>;
79
103
  }
80
104
 
81
- export component HtmlWithCommentsInChildren() {
82
- const content = '<h2 id="intro">Introduction</h2><p>Some text</p><!-- TODO --><p>More text</p>';
83
- <HtmlWrapper>
84
- <div class="vp-doc">{html content}</div>
85
- </HtmlWrapper>
105
+ export function HtmlWithCommentsInChildren() {
106
+ return <>
107
+ const content = '<h2 id="intro">Introduction</h2><p>Some text</p><!-- TODO --><p>More text</p>';
108
+ <HtmlWrapper>
109
+ <div class="vp-doc" innerHTML={content} />
110
+ </HtmlWrapper>
111
+ </>;
86
112
  }
87
113
 
88
- component DocFooter() {
89
- <footer class="doc-footer">{'Footer content'}</footer>
114
+ function DocFooter() {
115
+ return <><footer class="doc-footer">{'Footer content'}</footer></>;
90
116
  }
91
117
 
92
- export component DocLayout({
118
+ export function DocLayout({
93
119
  children,
94
120
  editPath = '',
95
121
  nextLink = null,
@@ -100,106 +126,122 @@ export component DocLayout({
100
126
  nextLink?: { href: string; text: string } | null;
101
127
  toc?: { href: string; text: string }[];
102
128
  }) {
103
- <div class="layout">
104
- <div class="content-container">
105
- <article>
106
- <div>{children}</div>
107
- </article>
108
- if (editPath) {
109
- <div class="edit-link">
110
- <a href={`https://github.com/edit/${editPath}`}>{'Edit'}</a>
111
- </div>
112
- }
113
- if (nextLink) {
114
- <nav class="prev-next">
115
- <a href={nextLink.href}>{nextLink.text}</a>
116
- </nav>
117
- }
118
- <DocFooter />
129
+ return <>
130
+ <div class="layout">
131
+ <div class="content-container">
132
+ <article>
133
+ <div>{children}</div>
134
+ </article>
135
+ if (editPath) {
136
+ <div class="edit-link">
137
+ <a href={`https://github.com/edit/${editPath}`}>{'Edit'}</a>
138
+ </div>
139
+ }
140
+ if (nextLink) {
141
+ <nav class="prev-next">
142
+ <a href={nextLink.href}>{nextLink.text}</a>
143
+ </nav>
144
+ }
145
+ <DocFooter />
146
+ </div>
147
+ <aside>
148
+ if (toc.length > 0) {
149
+ <div class="toc">
150
+ <ul>
151
+ for (const item of toc) {
152
+ <li>
153
+ <a href={item.href}>{item.text}</a>
154
+ </li>
155
+ }
156
+ </ul>
157
+ </div>
158
+ }
159
+ </aside>
119
160
  </div>
120
- <aside>
121
- if (toc.length > 0) {
122
- <div class="toc">
123
- <ul>
124
- for (const item of toc) {
125
- <li>
126
- <a href={item.href}>{item.text}</a>
127
- </li>
128
- }
129
- </ul>
130
- </div>
131
- }
132
- </aside>
133
- </div>
134
- }
135
-
136
- export component HtmlWithServerData() {
137
- const content = '<h1 id="intro" class="doc-h1">Introduction</h1><p>Ripple is a framework.</p>';
138
- <DocLayout
139
- editPath="docs/introduction.md"
140
- nextLink={{ href: '/docs/quick-start', text: 'Quick Start' }}
141
- toc={[
142
- { href: '#intro', text: 'Introduction' },
143
- { href: '#features', text: 'Features' },
144
- ]}
145
- >
146
- <div class="vp-doc">{html content}</div>
147
- </DocLayout>
148
- }
149
-
150
- export component HtmlWithClientDefaults() {
151
- const content = '<h1 id="intro" class="doc-h1">Introduction</h1><p>Ripple is a framework.</p>';
152
- <DocLayout>
153
- <div class="vp-doc">{html content}</div>
154
- </DocLayout>
155
- }
156
-
157
- export component HtmlWithUndefinedContent() {
158
- const content: string | undefined = undefined;
159
- <DocLayout>
160
- <div class="vp-doc">{html content}</div>
161
- </DocLayout>
162
- }
163
-
164
- component DynamicHeading({ level, children }: { level: number; children: any }) {
165
- switch (level) {
166
- case 1: {
167
- <h1 class="heading">{children}</h1>
168
- }
169
- case 2: {
170
- <h2 class="heading">{children}</h2>
161
+ </>;
162
+ }
163
+
164
+ export function HtmlWithServerData() {
165
+ return <>
166
+ const content = '<h1 id="intro" class="doc-h1">Introduction</h1><p>Ripple is a framework.</p>';
167
+ <DocLayout
168
+ editPath="docs/introduction.md"
169
+ nextLink={{ href: '/docs/quick-start', text: 'Quick Start' }}
170
+ toc={[
171
+ { href: '#intro', text: 'Introduction' },
172
+ { href: '#features', text: 'Features' },
173
+ ]}
174
+ >
175
+ <div class="vp-doc" innerHTML={content} />
176
+ </DocLayout>
177
+ </>;
178
+ }
179
+
180
+ export function HtmlWithClientDefaults() {
181
+ return <>
182
+ const content = '<h1 id="intro" class="doc-h1">Introduction</h1><p>Ripple is a framework.</p>';
183
+ <DocLayout>
184
+ <div class="vp-doc" innerHTML={content} />
185
+ </DocLayout>
186
+ </>;
187
+ }
188
+
189
+ export function HtmlWithUndefinedContent() {
190
+ return <>
191
+ const content: string | undefined = undefined;
192
+ <DocLayout>
193
+ <div class="vp-doc" innerHTML={content} />
194
+ </DocLayout>
195
+ </>;
196
+ }
197
+
198
+ function DynamicHeading({ level, children }: { level: number; children: any }) {
199
+ return <>
200
+ switch (level) {
201
+ case 1:
202
+ <h1 class="heading">{children}</h1>
203
+ break;
204
+ case 2:
205
+ <h2 class="heading">{children}</h2>
206
+ break;
171
207
  }
172
- }
208
+ </>;
173
209
  }
174
210
 
175
- component CodeBlock({ code }: { code: string }) {
176
- const highlighted = `<pre class="shiki"><code>${code}</code></pre>`;
177
- <div class="code-block">
178
- <div class="header">
179
- <button>{'Copy'}</button>
180
- <span class="lang">{'js'}</span>
211
+ function CodeBlock({ code }: { code: string }) {
212
+ return <>
213
+ const highlighted = `<pre class="shiki"><code>${code}</code></pre>`;
214
+ <div class="code-block">
215
+ <div class="header">
216
+ <button>{'Copy'}</button>
217
+ <span class="lang">{'js'}</span>
218
+ </div>
219
+ <div class="content" innerHTML={highlighted} />
181
220
  </div>
182
- <div class="content">{html highlighted}</div>
183
- </div>
221
+ </>;
184
222
  }
185
223
 
186
- component ContentWrapper({ children }: { children: any }) {
187
- <div class="wrapper">
188
- <div class="inner">{children}</div>
189
- </div>
224
+ function ContentWrapper({ children }: { children: any }) {
225
+ return <>
226
+ <div class="wrapper">
227
+ <div class="inner">{children}</div>
228
+ </div>
229
+ </>;
190
230
  }
191
231
 
192
- export component HtmlAfterSwitchInChildren() {
193
- <ContentWrapper>
194
- <DynamicHeading level={1}>{'Title'}</DynamicHeading>
195
- <p>{'First paragraph'}</p>
196
- <p>{'Second paragraph'}</p>
197
- <CodeBlock code="const x = 1;" />
198
- <p>{'After code'}</p>
199
- </ContentWrapper>
232
+ export function HtmlAfterSwitchInChildren() {
233
+ return <>
234
+ <ContentWrapper>
235
+ <DynamicHeading level={1}>{'Title'}</DynamicHeading>
236
+ <p>{'First paragraph'}</p>
237
+ <p>{'Second paragraph'}</p>
238
+ <CodeBlock code="const x = 1;" />
239
+ <p>{'After code'}</p>
240
+ </ContentWrapper>
241
+ </>;
200
242
  }
201
243
 
202
- component NavItem({
244
+ function NavItem({
203
245
  href,
204
246
  text: label,
205
247
  active = false,
@@ -208,156 +250,176 @@ component NavItem({
208
250
  text: string;
209
251
  active?: boolean;
210
252
  }) {
211
- <div class={`nav-item${active ? ' active' : ''}`}>
212
- if (active) {
213
- <div class="indicator" />
214
- }
215
- <a {href}>
216
- <span>{label}</span>
217
- </a>
218
- </div>
219
- }
220
-
221
- component SidebarSection({ title, children }: { title: string; children: any }) {
222
- let &[expanded] = track(true);
223
- <section class="sidebar-section">
224
- <div class="section-header">
225
- <h2>{title}</h2>
226
- <button onClick={() => (expanded = !expanded)}>{'Toggle'}</button>
253
+ return <>
254
+ <div class={`nav-item${active ? ' active' : ''}`}>
255
+ if (active) {
256
+ <div class="indicator" />
257
+ }
258
+ <a {href}>
259
+ <span>{label}</span>
260
+ </a>
227
261
  </div>
228
- if (expanded) {
229
- <div class="section-items">{children}</div>
230
- }
231
- </section>
262
+ </>;
232
263
  }
233
264
 
234
- component SideNav({ currentPath }: { currentPath: string }) {
235
- <aside class="sidebar">
236
- <nav>
237
- <div class="group">
238
- <SidebarSection title="Getting Started">
239
- <NavItem href="/intro" text="Introduction" active={currentPath === '/intro'} />
240
- <NavItem href="/start" text="Quick Start" active={currentPath === '/start'} />
241
- </SidebarSection>
265
+ function SidebarSection({ title, children }: { title: string; children: any }) {
266
+ return <>
267
+ let &[expanded] = track(true);
268
+ <section class="sidebar-section">
269
+ <div class="section-header">
270
+ <h2>{title}</h2>
271
+ <button onClick={() => (expanded = !expanded)}>{'Toggle'}</button>
242
272
  </div>
243
- <div class="group">
244
- <SidebarSection title="Guide">
245
- <NavItem href="/guide/app" text="Application" active={currentPath === '/guide/app'} />
246
- <NavItem href="/guide/syntax" text="Syntax" active={currentPath === '/guide/syntax'} />
247
- </SidebarSection>
248
- </div>
249
- </nav>
250
- </aside>
251
- }
252
-
253
- component PageHeader() {
254
- <header class="page-header">
255
- <div class="logo">{'MyApp'}</div>
256
- </header>
257
- }
258
-
259
- export component LayoutWithSidebarAndMain() {
260
- <div class="layout">
261
- <PageHeader />
262
- <div class="content-wrapper">
263
- <SideNav currentPath="/intro" />
264
- <main class="main-content">
265
- <div class="article">
266
- <div>
267
- <h1>{'Introduction'}</h1>
268
- <p>{'Welcome to the docs.'}</p>
269
- </div>
273
+ if (expanded) {
274
+ <div class="section-items">{children}</div>
275
+ }
276
+ </section>
277
+ </>;
278
+ }
279
+
280
+ function SideNav({ currentPath }: { currentPath: string }) {
281
+ return <>
282
+ <aside class="sidebar">
283
+ <nav>
284
+ <div class="group">
285
+ <SidebarSection title="Getting Started">
286
+ <NavItem href="/intro" text="Introduction" active={currentPath === '/intro'} />
287
+ <NavItem href="/start" text="Quick Start" active={currentPath === '/start'} />
288
+ </SidebarSection>
270
289
  </div>
271
- if (true) {
272
- <div class="edit-link">
273
- <a href="/edit">{'Edit'}</a>
290
+ <div class="group">
291
+ <SidebarSection title="Guide">
292
+ <NavItem href="/guide/app" text="Application" active={currentPath === '/guide/app'} />
293
+ <NavItem href="/guide/syntax" text="Syntax" active={currentPath === '/guide/syntax'} />
294
+ </SidebarSection>
295
+ </div>
296
+ </nav>
297
+ </aside>
298
+ </>;
299
+ }
300
+
301
+ function PageHeader() {
302
+ return <>
303
+ <header class="page-header">
304
+ <div class="logo">{'MyApp'}</div>
305
+ </header>
306
+ </>;
307
+ }
308
+
309
+ export function LayoutWithSidebarAndMain() {
310
+ return <>
311
+ <div class="layout">
312
+ <PageHeader />
313
+ <div class="content-wrapper">
314
+ <SideNav currentPath="/intro" />
315
+ <main class="main-content">
316
+ <div class="article">
317
+ <div>
318
+ <h1>{'Introduction'}</h1>
319
+ <p>{'Welcome to the docs.'}</p>
320
+ </div>
274
321
  </div>
275
- }
276
- <PageHeader />
277
- </main>
322
+ if (true) {
323
+ <div class="edit-link">
324
+ <a href="/edit">{'Edit'}</a>
325
+ </div>
326
+ }
327
+ <PageHeader />
328
+ </main>
329
+ </div>
278
330
  </div>
279
- </div>
331
+ </>;
280
332
  }
281
333
 
282
- component ArticleWrapper({ children }: { children: any }) {
283
- <article class="doc-content">
284
- <div>{children}</div>
285
- </article>
334
+ function ArticleWrapper({ children }: { children: any }) {
335
+ return <>
336
+ <article class="doc-content">
337
+ <div>{children}</div>
338
+ </article>
339
+ </>;
286
340
  }
287
341
 
288
- component SimpleFooter() {
289
- <footer class="doc-footer">{'Footer'}</footer>
342
+ function SimpleFooter() {
343
+ return <><footer class="doc-footer">{'Footer'}</footer></>;
290
344
  }
291
345
 
292
- export component ArticleWithChildrenThenSibling() {
293
- <div class="content-container">
294
- <ArticleWrapper>
295
- <h1>{'Title'}</h1>
296
- <p>{'Content goes here.'}</p>
297
- </ArticleWrapper>
298
- if (true) {
299
- <div class="edit-link">
300
- <a href="/edit">{'Edit'}</a>
301
- </div>
302
- }
303
- if (true) {
304
- <nav class="prev-next">
305
- <a href="/prev">{'Previous'}</a>
306
- </nav>
307
- }
308
- <SimpleFooter />
309
- </div>
310
- }
311
-
312
- export component ArticleWithHtmlChildThenSibling() {
313
- const htmlContent = '<pre><code>const x = 1;</code></pre>';
314
- <div class="content-container">
315
- <ArticleWrapper>
316
- <div class="doc-content">{html htmlContent}</div>
317
- </ArticleWrapper>
318
- if (true) {
319
- <div class="edit-link">
320
- <a href="/edit">{'Edit'}</a>
321
- </div>
322
- }
323
- <SimpleFooter />
324
- </div>
346
+ export function ArticleWithChildrenThenSibling() {
347
+ return <>
348
+ <div class="content-container">
349
+ <ArticleWrapper>
350
+ <h1>{'Title'}</h1>
351
+ <p>{'Content goes here.'}</p>
352
+ </ArticleWrapper>
353
+ if (true) {
354
+ <div class="edit-link">
355
+ <a href="/edit">{'Edit'}</a>
356
+ </div>
357
+ }
358
+ if (true) {
359
+ <nav class="prev-next">
360
+ <a href="/prev">{'Previous'}</a>
361
+ </nav>
362
+ }
363
+ <SimpleFooter />
364
+ </div>
365
+ </>;
325
366
  }
326
367
 
327
- component InlineArticleLayout({ children }: { children: any }) {
328
- <div class="content-container">
329
- <article class="doc-content">
330
- <div>{children}</div>
331
- </article>
332
- if (true) {
333
- <div class="edit-link">
334
- <a href="/edit">{'Edit'}</a>
335
- </div>
336
- }
337
- <SimpleFooter />
338
- </div>
368
+ export function ArticleWithHtmlChildThenSibling() {
369
+ return <>
370
+ const htmlContent = '<pre><code>const x = 1;</code></pre>';
371
+ <div class="content-container">
372
+ <ArticleWrapper>
373
+ <div class="doc-content" innerHTML={htmlContent} />
374
+ </ArticleWrapper>
375
+ if (true) {
376
+ <div class="edit-link">
377
+ <a href="/edit">{'Edit'}</a>
378
+ </div>
379
+ }
380
+ <SimpleFooter />
381
+ </div>
382
+ </>;
339
383
  }
340
384
 
341
- export component InlineArticleWithHtmlChild() {
342
- const htmlContent = '<pre><code>const x = 1;</code></pre>';
343
- <InlineArticleLayout>
344
- <div class="doc-content">{html htmlContent}</div>
345
- </InlineArticleLayout>
385
+ function InlineArticleLayout({ children }: { children: any }) {
386
+ return <>
387
+ <div class="content-container">
388
+ <article class="doc-content">
389
+ <div>{children}</div>
390
+ </article>
391
+ if (true) {
392
+ <div class="edit-link">
393
+ <a href="/edit">{'Edit'}</a>
394
+ </div>
395
+ }
396
+ <SimpleFooter />
397
+ </div>
398
+ </>;
346
399
  }
347
400
 
348
- component HeaderStub() {
349
- <header class="header">{'Header'}</header>
401
+ export function InlineArticleWithHtmlChild() {
402
+ return <>
403
+ const htmlContent = '<pre><code>const x = 1;</code></pre>';
404
+ <InlineArticleLayout>
405
+ <div class="doc-content" innerHTML={htmlContent} />
406
+ </InlineArticleLayout>
407
+ </>;
350
408
  }
351
409
 
352
- component SidebarStub() {
353
- <aside class="sidebar">{'Sidebar'}</aside>
410
+ function HeaderStub() {
411
+ return <><header class="header">{'Header'}</header></>;
354
412
  }
355
413
 
356
- component FooterStub() {
357
- <footer class="footer">{'Footer'}</footer>
414
+ function SidebarStub() {
415
+ return <><aside class="sidebar">{'Sidebar'}</aside></>;
358
416
  }
359
417
 
360
- component DocsLayoutInner({
418
+ function FooterStub() {
419
+ return <><footer class="footer">{'Footer'}</footer></>;
420
+ }
421
+
422
+ function DocsLayoutInner({
361
423
  children,
362
424
  editPath = '',
363
425
  nextLink = null,
@@ -366,51 +428,57 @@ component DocsLayoutInner({
366
428
  editPath?: string;
367
429
  nextLink?: { href: string; text: string } | null;
368
430
  }) {
369
- <div class="layout">
370
- <HeaderStub />
371
- <div class="docs-wrapper">
372
- <SidebarStub />
373
- <main class="docs-main">
374
- <div class="docs-container">
375
- <div class="content">
376
- <div class="content-container">
377
- <article class="doc-content">
378
- <div>{children}</div>
379
- </article>
380
- if (editPath) {
381
- <div class="edit-link">
382
- <a href="/edit">{'Edit on GitHub'}</a>
383
- </div>
384
- }
385
- if (nextLink) {
386
- <nav class="prev-next">
387
- <a href={nextLink.href}>{nextLink.text}</a>
388
- </nav>
389
- }
390
- <FooterStub />
431
+ return <>
432
+ <div class="layout">
433
+ <HeaderStub />
434
+ <div class="docs-wrapper">
435
+ <SidebarStub />
436
+ <main class="docs-main">
437
+ <div class="docs-container">
438
+ <div class="content">
439
+ <div class="content-container">
440
+ <article class="doc-content">
441
+ <div>{children}</div>
442
+ </article>
443
+ if (editPath) {
444
+ <div class="edit-link">
445
+ <a href="/edit">{'Edit on GitHub'}</a>
446
+ </div>
447
+ }
448
+ if (nextLink) {
449
+ <nav class="prev-next">
450
+ <a href={nextLink.href}>{nextLink.text}</a>
451
+ </nav>
452
+ }
453
+ <FooterStub />
454
+ </div>
391
455
  </div>
392
456
  </div>
393
- </div>
394
- </main>
457
+ </main>
458
+ </div>
395
459
  </div>
396
- </div>
460
+ </>;
397
461
  }
398
462
 
399
- export component DocsLayoutWithData() {
400
- const htmlContent = '<h1>Title</h1><p>Content</p>';
401
- <DocsLayoutInner editPath="docs/styling.md" nextLink={{ href: '/next', text: 'Next' }}>
402
- <div class="doc-content">{html htmlContent}</div>
403
- </DocsLayoutInner>
463
+ export function DocsLayoutWithData() {
464
+ return <>
465
+ const htmlContent = '<h1>Title</h1><p>Content</p>';
466
+ <DocsLayoutInner editPath="docs/styling.md" nextLink={{ href: '/next', text: 'Next' }}>
467
+ <div class="doc-content" innerHTML={htmlContent} />
468
+ </DocsLayoutInner>
469
+ </>;
404
470
  }
405
471
 
406
- export component DocsLayoutWithoutData() {
407
- const htmlContent: string | undefined = undefined;
408
- <DocsLayoutInner>
409
- <div class="doc-content">{html htmlContent}</div>
410
- </DocsLayoutInner>
472
+ export function DocsLayoutWithoutData() {
473
+ return <>
474
+ const htmlContent: string | undefined = undefined;
475
+ <DocsLayoutInner>
476
+ <div class="doc-content" innerHTML={htmlContent} />
477
+ </DocsLayoutInner>
478
+ </>;
411
479
  }
412
480
 
413
- component DocsLayoutExact({
481
+ function DocsLayoutExact({
414
482
  children,
415
483
  editPath = '',
416
484
  prevLink = null,
@@ -423,136 +491,150 @@ component DocsLayoutExact({
423
491
  nextLink?: { href: string; text: string } | null;
424
492
  toc?: { href: string; text: string }[];
425
493
  }) {
426
- <div class="layout">
427
- <HeaderStub />
428
- <div class="docs-wrapper">
429
- <SidebarStub />
430
- <main class="docs-main">
431
- <div class="docs-container">
432
- <div class="content">
433
- <div class="content-container">
434
- <article class="doc-content">
435
- <div>{children}</div>
436
- </article>
437
- if (editPath) {
438
- <div class="edit-link">
439
- <a href={`/edit/${editPath}`}>{'Edit on GitHub'}</a>
494
+ return <>
495
+ <div class="layout">
496
+ <HeaderStub />
497
+ <div class="docs-wrapper">
498
+ <SidebarStub />
499
+ <main class="docs-main">
500
+ <div class="docs-container">
501
+ <div class="content">
502
+ <div class="content-container">
503
+ <article class="doc-content">
504
+ <div>{children}</div>
505
+ </article>
506
+ if (editPath) {
507
+ <div class="edit-link">
508
+ <a href={`/edit/${editPath}`}>{'Edit on GitHub'}</a>
509
+ </div>
510
+ }
511
+ if (prevLink || nextLink) {
512
+ <nav class="prev-next">
513
+ if (prevLink) {
514
+ <a href={prevLink.href} class="pager prev">
515
+ <span class="title">{prevLink.text}</span>
516
+ </a>
517
+ } else {
518
+ <span />
519
+ }
520
+ if (nextLink) {
521
+ <a href={nextLink.href} class="pager next">
522
+ <span class="title">{nextLink.text}</span>
523
+ </a>
524
+ }
525
+ </nav>
526
+ }
527
+ <FooterStub />
528
+ </div>
529
+ </div>
530
+ <aside class="aside">
531
+ if (toc.length > 0) {
532
+ <div class="aside-content">
533
+ <nav class="outline">
534
+ for (const item of toc) {
535
+ <a href={item.href}>{item.text}</a>
536
+ }
537
+ </nav>
440
538
  </div>
441
539
  }
442
- if (prevLink || nextLink) {
443
- <nav class="prev-next">
444
- if (prevLink) {
445
- <a href={prevLink.href} class="pager prev">
446
- <span class="title">{prevLink.text}</span>
447
- </a>
448
- } else {
449
- <span />
450
- }
451
- if (nextLink) {
452
- <a href={nextLink.href} class="pager next">
453
- <span class="title">{nextLink.text}</span>
454
- </a>
455
- }
456
- </nav>
457
- }
458
- <FooterStub />
459
- </div>
540
+ </aside>
460
541
  </div>
461
- <aside class="aside">
462
- if (toc.length > 0) {
463
- <div class="aside-content">
464
- <nav class="outline">
465
- for (const item of toc) {
466
- <a href={item.href}>{item.text}</a>
467
- }
468
- </nav>
469
- </div>
470
- }
471
- </aside>
472
- </div>
473
- </main>
542
+ </main>
543
+ </div>
544
+ </div>
545
+ </>;
546
+ }
547
+
548
+ export function DocsLayoutExactWithData() {
549
+ return <>
550
+ const htmlContent = '<h1>Styling Guide</h1><p>Content</p>';
551
+ <DocsLayoutExact
552
+ editPath="docs/guide/styling.md"
553
+ prevLink={{ href: '/prev', text: 'Previous' }}
554
+ nextLink={{ href: '/next', text: 'Next' }}
555
+ toc={[
556
+ { href: '#intro', text: 'Introduction' },
557
+ { href: '#usage', text: 'Usage' },
558
+ ]}
559
+ >
560
+ <div class="doc-content" innerHTML={htmlContent} />
561
+ </DocsLayoutExact>
562
+ </>;
563
+ }
564
+
565
+ export function DocsLayoutExactWithoutData() {
566
+ return <>
567
+ const htmlContent: string | undefined = undefined;
568
+ const editPath: string | undefined = undefined;
569
+ const prevLink: { href: string; text: string } | null | undefined = undefined;
570
+ const nextLink: { href: string; text: string } | null | undefined = undefined;
571
+ const toc: { href: string; text: string }[] | undefined = undefined;
572
+ <DocsLayoutExact {editPath} {prevLink} {nextLink} {toc}>
573
+ <div class="doc-content" innerHTML={htmlContent} />
574
+ </DocsLayoutExact>
575
+ </>;
576
+ }
577
+
578
+ export function TemplateWithHtmlContent() {
579
+ return <>
580
+ const data = { title: 'Test', value: 42 };
581
+ <div>
582
+ <template id="t1" innerHTML={JSON.stringify(data)} />
583
+ <p class="content">{'Main content'}</p>
584
+ </div>
585
+ </>;
586
+ }
587
+
588
+ export function TemplateWithHtmlAndSiblings() {
589
+ return <>
590
+ const data = { name: 'Ripple', version: '1.0' };
591
+ <div class="wrapper">
592
+ <h1>{'Title'}</h1>
593
+ <template id="data-template" innerHTML={JSON.stringify(data)} />
594
+ <p class="after-template">{'Content after template'}</p>
595
+ </div>
596
+ </>;
597
+ }
598
+
599
+ function LayoutWithTemplate({ children, data }: { children: any; data: object }) {
600
+ return <>
601
+ <div class="layout">
602
+ <template id="page-data" innerHTML={JSON.stringify(data)} />
603
+ <main>{children}</main>
474
604
  </div>
475
- </div>
476
- }
477
-
478
- export component DocsLayoutExactWithData() {
479
- const htmlContent = '<h1>Styling Guide</h1><p>Content</p>';
480
- <DocsLayoutExact
481
- editPath="docs/guide/styling.md"
482
- prevLink={{ href: '/prev', text: 'Previous' }}
483
- nextLink={{ href: '/next', text: 'Next' }}
484
- toc={[
485
- { href: '#intro', text: 'Introduction' },
486
- { href: '#usage', text: 'Usage' },
487
- ]}
488
- >
489
- <div class="doc-content">{html htmlContent}</div>
490
- </DocsLayoutExact>
491
- }
492
-
493
- export component DocsLayoutExactWithoutData() {
494
- const htmlContent: string | undefined = undefined;
495
- const editPath: string | undefined = undefined;
496
- const prevLink: { href: string; text: string } | null | undefined = undefined;
497
- const nextLink: { href: string; text: string } | null | undefined = undefined;
498
- const toc: { href: string; text: string }[] | undefined = undefined;
499
-
500
- <DocsLayoutExact {editPath} {prevLink} {nextLink} {toc}>
501
- <div class="doc-content">{html htmlContent}</div>
502
- </DocsLayoutExact>
503
- }
504
-
505
- export component TemplateWithHtmlContent() {
506
- const data = { title: 'Test', value: 42 };
507
- <div>
508
- <template id="t1">{html JSON.stringify(data)}</template>
509
- <p class="content">{'Main content'}</p>
510
- </div>
511
- }
512
-
513
- export component TemplateWithHtmlAndSiblings() {
514
- const data = { name: 'Ripple', version: '1.0' };
515
- <div class="wrapper">
516
- <h1>{'Title'}</h1>
517
- <template id="data-template">{html JSON.stringify(data)}</template>
518
- <p class="after-template">{'Content after template'}</p>
519
- </div>
520
- }
521
-
522
- component LayoutWithTemplate({ children, data }: { children: any; data: object }) {
523
- <div class="layout">
524
- <template id="page-data">{html JSON.stringify(data)}</template>
525
- <main>{children}</main>
526
- </div>
527
- }
528
-
529
- export component NestedTemplateInLayout() {
530
- const doc = { title: 'Comparison', html: '<p>Content</p>' };
531
- <LayoutWithTemplate data={doc}>
532
- <div class="doc-content">{html doc.html}</div>
533
- </LayoutWithTemplate>
534
- }
535
-
536
- export component HtmlCodeBlocksWithSiblingChain() {
537
- const html1 = '<span class="kw">const</span> <span class="id">a</span> = 1;';
538
- const html2 = '<span class="kw">const</span> <span class="id">b</span> = 2;';
539
- const html3 = '<span class="kw">const</span> <span class="id">c</span> = 3;';
540
-
541
- <section class="readable-section">
542
- <p>{'Ergonomics'}</p>
543
- <h2>{'Sibling traversal pattern'}</h2>
544
- <p>{'Before first block'}</p>
545
- <p>{'Before second block'}</p>
546
- <pre class="code-block">
547
- <code>{html html1}</code>
548
- </pre>
549
- <p>{'Between one and two'}</p>
550
- <pre class="code-block">
551
- <code>{html html2}</code>
552
- </pre>
553
- <p>{'Between two and three'}</p>
554
- <pre class="code-block">
555
- <code>{html html3}</code>
556
- </pre>
557
- </section>
605
+ </>;
606
+ }
607
+
608
+ export function NestedTemplateInLayout() {
609
+ return <>
610
+ const doc = { title: 'Comparison', html: '<p>Content</p>' };
611
+ <LayoutWithTemplate data={doc}>
612
+ <div class="doc-content" innerHTML={doc.html} />
613
+ </LayoutWithTemplate>
614
+ </>;
615
+ }
616
+
617
+ export function HtmlCodeBlocksWithSiblingChain() {
618
+ return <>
619
+ const html1 = '<span class="kw">const</span> <span class="id">a</span> = 1;';
620
+ const html2 = '<span class="kw">const</span> <span class="id">b</span> = 2;';
621
+ const html3 = '<span class="kw">const</span> <span class="id">c</span> = 3;';
622
+ <section class="readable-section">
623
+ <p>{'Ergonomics'}</p>
624
+ <h2>{'Sibling traversal pattern'}</h2>
625
+ <p>{'Before first block'}</p>
626
+ <p>{'Before second block'}</p>
627
+ <pre class="code-block">
628
+ <code innerHTML={html1} />
629
+ </pre>
630
+ <p>{'Between one and two'}</p>
631
+ <pre class="code-block">
632
+ <code innerHTML={html2} />
633
+ </pre>
634
+ <p>{'Between two and three'}</p>
635
+ <pre class="code-block">
636
+ <code innerHTML={html3} />
637
+ </pre>
638
+ </section>
639
+ </>;
558
640
  }