@ongov/ontario-design-system-component-library-react 7.0.0-alpha.2 → 8.0.0-alpha.1

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,28 @@
1
+ /**
2
+ * Compatibility shim for `@ongov/ontario-design-system-component-library/hydrate`.
3
+ *
4
+ * Why this exists:
5
+ * - `@stencil/react-output-target/ssr` expects a hydrate module shape that includes
6
+ * `renderToString`, `serializeProperty` (string return), `transformTag`, and
7
+ * `setTagTransformer`.
8
+ * - The generated hydrate typings in this repo may not always match that exact
9
+ * contract, which causes TypeScript errors in generated React SSR wrappers.
10
+ *
11
+ * Future impact:
12
+ * - This file is intentionally small and local, but it can drift if upstream
13
+ * Stencil/output-target contracts change. Revisit on major Stencil upgrades,
14
+ * and remove once upstream types align reliably.
15
+ */
16
+ declare module '@ongov/ontario-design-system-component-library/hydrate' {
17
+ export function renderToString(
18
+ html: string,
19
+ options: {
20
+ serializeShadowRoot?: 'declarative-shadow-dom' | 'scoped' | boolean;
21
+ fullDocument?: boolean;
22
+ prettyHtml?: boolean;
23
+ },
24
+ ): Promise<{ html: string | null; styles: Array<{ href: string | null; id: string; content: string }> }>;
25
+ export function serializeProperty(value: unknown): string;
26
+ export function transformTag(tagName: string): string;
27
+ export function setTagTransformer(transformer: (tagName: string) => string): void;
28
+ }