@pixelmatters/markup 0.0.0

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,26 @@
1
+ export type WidgetTheme = 'light' | 'dark' | 'auto';
2
+ export interface WidgetConfig {
3
+ /** Convex deployment site URL, e.g. `https://your-deployment.convex.site` */
4
+ apiUrl: string;
5
+ /** Raw API key minted from a project's settings page */
6
+ apiKey: string;
7
+ /** Where the floating button sits. Defaults to bottom-right. */
8
+ position?: 'bottom-right' | 'bottom-left';
9
+ /**
10
+ * Visual theme.
11
+ * - `'light'` — force light palette
12
+ * - `'dark'` — force dark palette
13
+ * - `'auto'` (default) — follow the host's `prefers-color-scheme`
14
+ */
15
+ theme?: WidgetTheme;
16
+ }
17
+ /**
18
+ * Mounts the feedback widget on the page. Idempotent — calling init again
19
+ * with the same config is a no-op; calling with different config tears down
20
+ * the previous instance first.
21
+ *
22
+ * Returns a `destroy()` function that unmounts the widget and removes the
23
+ * host element. Useful for SPAs that want to dispose on logout.
24
+ */
25
+ export declare function init(config: WidgetConfig): () => void;
26
+ export declare function destroy(): void;