@@ -902,6 +902,34 @@ export interface HydrateDocumentOptions {
902
902
* Sets `navigator.userAgent`
903
903
*/
904
904
userAgent ?: string ;
905
+ /**
906
+ * Configure how Stencil serializes the components shadow root.
907
+ * - If set to `declarative-shadow-dom` the component will be rendered within a Declarative Shadow DOM.
908
+ * - If set to `scoped` Stencil will render the contents of the shadow root as a `scoped: true` component
909
+ * and the shadow DOM will be created during client-side hydration.
910
+ * - Alternatively you can mix and match the two by providing an object with `declarative-shadow-dom` and `scoped` keys,
911
+ * the value arrays containing the tag names of the components that should be rendered in that mode.
912
+ *
913
+ * Examples:
914
+ * - `{ 'declarative-shadow-dom': ['my-component-1', 'another-component'], default: 'scoped' }`
915
+ * Render all components as `scoped` apart from `my-component-1` and `another-component`
916
+ * - `{ 'scoped': ['an-option-component'], default: 'declarative-shadow-dom' }`
917
+ * Render all components within `declarative-shadow-dom` apart from `an-option-component`
918
+ * - `'scoped'` Render all components as `scoped`
919
+ * - `false` disables shadow root serialization
920
+ *
921
+ * *NOTE* `true` has been deprecated in favor of `declarative-shadow-dom` and `scoped`
922
+ * @default 'declarative-shadow-dom'
923
+ */
924
+ serializeShadowRoot ?:
925
+ | 'declarative-shadow-dom'
926
+ | 'scoped'
927
+ | {
928
+ 'declarative-shadow-dom' ?: string [ ] ;
929
+ scoped ?: string [ ] ;
930
+ default : 'declarative-shadow-dom' | 'scoped' ;
931
+ }
932
+ | boolean ;
905
933
}
906
934
907
935
export interface SerializeDocumentOptions extends HydrateDocumentOptions {
@@ -945,34 +973,6 @@ export interface SerializeDocumentOptions extends HydrateDocumentOptions {
945
973
* Remove HTML comments. Defaults to `true`.
946
974
*/
947
975
removeHtmlComments ?: boolean ;
948
- /**
949
- * Configure how Stencil serializes the components shadow root.
950
- * - If set to `declarative-shadow-dom` the component will be rendered within a Declarative Shadow DOM.
951
- * - If set to `scoped` Stencil will render the contents of the shadow root as a `scoped: true` component
952
- * and the shadow DOM will be created during client-side hydration.
953
- * - Alternatively you can mix and match the two by providing an object with `declarative-shadow-dom` and `scoped` keys,
954
- * the value arrays containing the tag names of the components that should be rendered in that mode.
955
- *
956
- * Examples:
957
- * - `{ 'declarative-shadow-dom': ['my-component-1', 'another-component'], default: 'scoped' }`
958
- * Render all components as `scoped` apart from `my-component-1` and `another-component`
959
- * - `{ 'scoped': ['an-option-component'], default: 'declarative-shadow-dom' }`
960
- * Render all components within `declarative-shadow-dom` apart from `an-option-component`
961
- * - `'scoped'` Render all components as `scoped`
962
- * - `false` disables shadow root serialization
963
- *
964
- * *NOTE* `true` has been deprecated in favor of `declarative-shadow-dom` and `scoped`
965
- * @default 'declarative-shadow-dom'
966
- */
967
- serializeShadowRoot ?:
968
- | 'declarative-shadow-dom'
969
- | 'scoped'
970
- | {
971
- 'declarative-shadow-dom' ?: string [ ] ;
972
- scoped ?: string [ ] ;
973
- default : 'declarative-shadow-dom' | 'scoped' ;
974
- }
975
- | boolean ;
976
976
/**
977
977
* The `fullDocument` flag determines the format of the rendered output. Set it to true to
978
978
* generate a complete HTML document, or false to render only the component.
0 commit comments