@@ -20,15 +20,15 @@ with an automatic JSX runtime.
20
20
* [ API] ( #api )
21
21
* [ ` toJsxRuntime(tree, options) ` ] ( #tojsxruntimetree-options )
22
22
* [ ` Options ` ] ( #options )
23
- * [ ` Components ` ] ( #components-1 )
24
- * [ ` ElementAttributeNameCase ` ] ( #elementattributenamecase-1 )
25
- * [ ` Fragment ` ] ( #fragment-1 )
26
- * [ ` Jsx ` ] ( #jsx-1 )
27
- * [ ` JsxDev ` ] ( #jsxdev-1 )
23
+ * [ ` Components ` ] ( #components )
24
+ * [ ` ElementAttributeNameCase ` ] ( #elementattributenamecase )
25
+ * [ ` Fragment ` ] ( #fragment )
26
+ * [ ` Jsx ` ] ( #jsx )
27
+ * [ ` JsxDev ` ] ( #jsxdev )
28
28
* [ ` Props ` ] ( #props )
29
29
* [ ` Source ` ] ( #source )
30
- * [ ` Space ` ] ( #space-1 )
31
- * [ ` StylePropertyNameCase ` ] ( #stylepropertynamecase-1 )
30
+ * [ ` Space ` ] ( #space )
31
+ * [ ` StylePropertyNameCase ` ] ( #stylepropertynamecase )
32
32
* [ Examples] ( #examples )
33
33
* [ Example: Preact] ( #example-preact )
34
34
* [ Example: Vue] ( #example-vue )
@@ -128,73 +128,37 @@ Result from your configured JSX runtime (`JSX.Element`).
128
128
129
129
Configuration (TypeScript type).
130
130
131
- ##### Fields
132
-
133
- ###### ` Fragment `
134
-
135
- Fragment ([ ` Fragment ` ] [ api-fragment ] , required).
136
-
137
- ###### ` jsx `
138
-
139
- Dynamic JSX ([ ` Jsx ` ] [ api-jsx ] , required in production).
140
-
141
- ###### ` jsxs `
142
-
143
- Static JSX ([ ` Jsx ` ] [ api-jsx ] , required in production).
144
-
145
- ###### ` jsxDEV `
146
-
147
- Development JSX ([ ` JsxDev ` ] [ api-jsx-dev ] , required in development).
148
-
149
- ###### ` development `
150
-
151
- Whether to use ` jsxDEV ` when on or ` jsx ` and ` jsxs ` when off (` boolean ` ,
152
- default: ` false ` ).
153
-
154
- ###### ` components `
155
-
156
- Components to use ([ ` Partial<Components> ` ] [ api-components ] , optional).
157
-
158
- Each key is the name of an HTML (or SVG) element to override.
159
- The value is the component to render instead.
160
-
161
- ###### ` elementAttributeNameCase `
162
-
163
- Specify casing to use for attribute names
164
- ([ ` ElementAttributeNameCase ` ] [ api-element-attribute-name-case ] , default:
165
- ` 'react' ` ).
166
-
167
- ###### ` filePath `
168
-
169
- File path to the original source file (` string ` , optional).
170
-
171
- Passed in source info to ` jsxDEV ` when using the automatic runtime with
172
- ` development: true ` .
173
-
174
- ###### ` passNode `
175
-
176
- Pass the hast element node to components (` boolean ` , default: ` false ` ).
177
-
178
- ###### ` space `
179
-
180
- Whether ` tree ` is in the ` 'html' ` or ` 'svg' ` space ([ ` Space ` ] [ api-space ] ,
181
- default: ` 'html' ` ).
182
-
183
- When an ` <svg> ` element is found in the HTML space, this package already
184
- automatically switches to and from the SVG space when entering and exiting
185
- it.
186
-
187
- > 👉 ** Note** : hast is not XML.
188
- > It supports SVG as embedded in HTML.
189
- > It does not support the features available in XML.
190
- > Passing SVG might break but fragments of modern SVG should be fine.
191
- > Use ` xast ` if you need to support SVG as XML.
192
-
193
- ###### ` stylePropertyNameCase `
131
+ ###### Fields
194
132
195
- Specify casing to use for property names in ` style ` objects
196
- ([ ` StylePropertyNameCase ` ] [ api-style-property-name-case ] , default:
197
- ` 'dom' ` ).
133
+ * ` Fragment ` ([ ` Fragment ` ] [ api-fragment ] , required)
134
+ — fragment
135
+ * ` jsx ` ([ ` Jsx ` ] [ api-jsx ] , required in production)
136
+ — dynamic JSX
137
+ * ` jsxs ` ([ ` Jsx ` ] [ api-jsx ] , required in production)
138
+ — static JSX
139
+ * ` jsxDEV ` ([ ` JsxDev ` ] [ api-jsx-dev ] , required in development)
140
+ — development JSX
141
+ * ` development ` (` boolean ` , default: ` false ` )
142
+ — whether to use ` jsxDEV ` when on or ` jsx ` and ` jsxs ` when off
143
+ * ` components ` ([ ` Partial<Components> ` ] [ api-components ] , optional)
144
+ — components to use
145
+ * ` elementAttributeNameCase `
146
+ ([ ` ElementAttributeNameCase ` ] [ api-element-attribute-name-case ] ,
147
+ default: ` 'react' ` )
148
+ — specify casing to use for attribute names
149
+ * ` filePath ` (` string ` , optional)
150
+ — file path to the original source file, passed in source info to ` jsxDEV `
151
+ when using the automatic runtime with ` development: true `
152
+ * ` passNode ` (` boolean ` , default: ` false ` )
153
+ — pass the hast element node to components
154
+ * ` space ` ([ ` Space ` ] [ api-space ] , default: ` 'html' ` )
155
+ — whether ` tree ` is in the ` 'html' ` or ` 'svg' ` space, when an ` <svg> `
156
+ element is found in the HTML space, this package already automatically
157
+ switches to and from the SVG space when entering and exiting it
158
+ * ` stylePropertyNameCase `
159
+ ([ ` StylePropertyNameCase ` ] [ api-style-property-name-case ] ,
160
+ default: ` 'dom' ` )
161
+ — specify casing to use for property names in ` style ` objects
198
162
199
163
### ` Components `
200
164
@@ -331,6 +295,12 @@ Info about source (TypeScript type).
331
295
332
296
Namespace (TypeScript type).
333
297
298
+ > 👉 **Note**: hast is not XML.
299
+ > It supports SVG as embedded in HTML.
300
+ > It does not support the features available in XML.
301
+ > Passing SVG might break but fragments of modern SVG should be fine.
302
+ > Use ` xast ` if you need to support SVG as XML.
303
+
334
304
###### Type
335
305
336
306
` ` ` ts
@@ -637,22 +607,22 @@ abide by its terms.
637
607
638
608
[ api-to-jsx-runtime ] : #tojsxruntimetree-options
639
609
640
- [ api-components ] : #components-1
610
+ [ api-components ] : #components
641
611
642
- [ api-element-attribute-name-case ] : #elementattributenamecase-1
612
+ [ api-element-attribute-name-case ] : #elementattributenamecase
643
613
644
- [ api-fragment ] : #fragment-1
614
+ [ api-fragment ] : #fragment
645
615
646
- [ api-jsx ] : #jsx-1
616
+ [ api-jsx ] : #jsx
647
617
648
- [ api-jsx-dev ] : #jsxdev-1
618
+ [ api-jsx-dev ] : #jsxdev
649
619
650
620
[ api-options ] : #options
651
621
652
622
[ api-props ] : #props
653
623
654
624
[ api-source ] : #source
655
625
656
- [ api-space ] : #space-1
626
+ [ api-space ] : #space
657
627
658
- [ api-style-property-name-case ] : #stylepropertynamecase-1
628
+ [ api-style-property-name-case ] : #stylepropertynamecase
0 commit comments