@growthcurve/flowmate-components 0.1.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.
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ # @growthcurve/flowmate-components
2
+
3
+ Framework-agnostic Web Components for [Flowmate](https://flowmate.dev) — the open-source product adoption platform.
4
+
5
+ These components work with any framework: Vue, Svelte, Angular, Solid, or plain HTML.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @growthcurve/flowmate-components
11
+ ```
12
+
13
+ ## Setup
14
+
15
+ ```typescript
16
+ import { setupComponents } from "@growthcurve/flowmate-components";
17
+
18
+ // Register all Flowmate custom elements
19
+ setupComponents();
20
+ ```
21
+
22
+ ## Usage with @growthcurve/flowmate-js
23
+
24
+ ```typescript
25
+ import { init } from "@growthcurve/flowmate-js";
26
+ import { setupComponents } from "@growthcurve/flowmate-components";
27
+
28
+ setupComponents();
29
+
30
+ init({
31
+ organizationId: "your-org-id",
32
+ apiKey: "your-api-key",
33
+ userId: currentUser.id,
34
+ });
35
+ ```
36
+
37
+ ## Available Components
38
+
39
+ | Element | Description |
40
+ |---------|-------------|
41
+ | `<flowmate-modal>` | Centered overlay dialog |
42
+ | `<flowmate-banner>` | Top/bottom notification bar |
43
+ | `<flowmate-tooltip>` | Positioned tooltip near target elements |
44
+ | `<flowmate-card>` | Floating info card |
45
+ | `<flowmate-hint>` | Pulsing indicator on elements |
46
+ | `<flowmate-sidebar>` | Slide-in panel |
47
+ | `<flowmate-checklist>` | Task completion checklist |
48
+ | `<flowmate-floating-blocks>` | Container mount point |
49
+
50
+ ## Theming
51
+
52
+ Components use CSS custom properties that can be set globally:
53
+
54
+ ```css
55
+ :root {
56
+ --flowmate-primary: #6366f1;
57
+ --flowmate-background: #ffffff;
58
+ --flowmate-foreground: #1a1a2e;
59
+ --flowmate-border: #e2e8f0;
60
+ --flowmate-radius: 12px;
61
+ --flowmate-font-family: Inter, sans-serif;
62
+ --flowmate-shadow: 0 4px 24px rgba(0,0,0,0.12);
63
+ }
64
+ ```
65
+
66
+ ## Framework Notes
67
+
68
+ ### Vue / Nuxt
69
+ Tell Vue about Flowmate custom elements:
70
+ ```typescript
71
+ // nuxt.config.ts or vite.config.ts
72
+ vue: {
73
+ compilerOptions: {
74
+ isCustomElement: (tag) => tag.startsWith('flowmate-'),
75
+ }
76
+ }
77
+ ```
78
+
79
+ ### Angular
80
+ Add `CUSTOM_ELEMENTS_SCHEMA` to your module:
81
+ ```typescript
82
+ @NgModule({ schemas: [CUSTOM_ELEMENTS_SCHEMA] })
83
+ ```
84
+
85
+ ## License
86
+
87
+ MIT
@@ -0,0 +1,78 @@
1
+ declare class FlowmateBaseElement extends HTMLElement {
2
+ protected shadow: ShadowRoot;
3
+ constructor();
4
+ protected createStyle(additionalCSS?: string): HTMLStyleElement;
5
+ protected emitAction(action: string, detail?: any): void;
6
+ protected emitDismiss(): void;
7
+ get blockData(): Record<string, any>;
8
+ get blockActions(): Array<{
9
+ label: string;
10
+ key: string;
11
+ variant?: string;
12
+ }>;
13
+ get blockTitle(): string;
14
+ get blockBody(): string;
15
+ get dismissible(): boolean;
16
+ }
17
+
18
+ declare class FlowmateModal extends FlowmateBaseElement {
19
+ connectedCallback(): void;
20
+ disconnectedCallback(): void;
21
+ }
22
+
23
+ declare class FlowmateBanner extends FlowmateBaseElement {
24
+ connectedCallback(): void;
25
+ disconnectedCallback(): void;
26
+ }
27
+
28
+ declare class FlowmateTooltip extends FlowmateBaseElement {
29
+ connectedCallback(): void;
30
+ disconnectedCallback(): void;
31
+ }
32
+
33
+ declare class FlowmateCard extends FlowmateBaseElement {
34
+ connectedCallback(): void;
35
+ disconnectedCallback(): void;
36
+ }
37
+
38
+ declare class FlowmateHint extends FlowmateBaseElement {
39
+ connectedCallback(): void;
40
+ disconnectedCallback(): void;
41
+ }
42
+
43
+ declare class FlowmateSidebar extends FlowmateBaseElement {
44
+ connectedCallback(): void;
45
+ disconnectedCallback(): void;
46
+ }
47
+
48
+ declare class FlowmateChecklist extends FlowmateBaseElement {
49
+ private checkedItems;
50
+ connectedCallback(): void;
51
+ private render;
52
+ disconnectedCallback(): void;
53
+ }
54
+
55
+ declare class FlowmateFloatingBlocks extends FlowmateBaseElement {
56
+ connectedCallback(): void;
57
+ }
58
+
59
+ declare function setupComponents(options?: {
60
+ components?: Record<string, typeof HTMLElement>;
61
+ }): void;
62
+
63
+ interface FlowmateComponentProps {
64
+ title?: string;
65
+ body?: string;
66
+ primaryAction?: {
67
+ label: string;
68
+ key: string;
69
+ };
70
+ secondaryAction?: {
71
+ label: string;
72
+ key: string;
73
+ };
74
+ dismissible?: boolean;
75
+ theme?: Record<string, string>;
76
+ }
77
+
78
+ export { FlowmateBanner, FlowmateCard, FlowmateChecklist, type FlowmateComponentProps, FlowmateFloatingBlocks, FlowmateHint, FlowmateModal, FlowmateSidebar, FlowmateTooltip, setupComponents };
@@ -0,0 +1,78 @@
1
+ declare class FlowmateBaseElement extends HTMLElement {
2
+ protected shadow: ShadowRoot;
3
+ constructor();
4
+ protected createStyle(additionalCSS?: string): HTMLStyleElement;
5
+ protected emitAction(action: string, detail?: any): void;
6
+ protected emitDismiss(): void;
7
+ get blockData(): Record<string, any>;
8
+ get blockActions(): Array<{
9
+ label: string;
10
+ key: string;
11
+ variant?: string;
12
+ }>;
13
+ get blockTitle(): string;
14
+ get blockBody(): string;
15
+ get dismissible(): boolean;
16
+ }
17
+
18
+ declare class FlowmateModal extends FlowmateBaseElement {
19
+ connectedCallback(): void;
20
+ disconnectedCallback(): void;
21
+ }
22
+
23
+ declare class FlowmateBanner extends FlowmateBaseElement {
24
+ connectedCallback(): void;
25
+ disconnectedCallback(): void;
26
+ }
27
+
28
+ declare class FlowmateTooltip extends FlowmateBaseElement {
29
+ connectedCallback(): void;
30
+ disconnectedCallback(): void;
31
+ }
32
+
33
+ declare class FlowmateCard extends FlowmateBaseElement {
34
+ connectedCallback(): void;
35
+ disconnectedCallback(): void;
36
+ }
37
+
38
+ declare class FlowmateHint extends FlowmateBaseElement {
39
+ connectedCallback(): void;
40
+ disconnectedCallback(): void;
41
+ }
42
+
43
+ declare class FlowmateSidebar extends FlowmateBaseElement {
44
+ connectedCallback(): void;
45
+ disconnectedCallback(): void;
46
+ }
47
+
48
+ declare class FlowmateChecklist extends FlowmateBaseElement {
49
+ private checkedItems;
50
+ connectedCallback(): void;
51
+ private render;
52
+ disconnectedCallback(): void;
53
+ }
54
+
55
+ declare class FlowmateFloatingBlocks extends FlowmateBaseElement {
56
+ connectedCallback(): void;
57
+ }
58
+
59
+ declare function setupComponents(options?: {
60
+ components?: Record<string, typeof HTMLElement>;
61
+ }): void;
62
+
63
+ interface FlowmateComponentProps {
64
+ title?: string;
65
+ body?: string;
66
+ primaryAction?: {
67
+ label: string;
68
+ key: string;
69
+ };
70
+ secondaryAction?: {
71
+ label: string;
72
+ key: string;
73
+ };
74
+ dismissible?: boolean;
75
+ theme?: Record<string, string>;
76
+ }
77
+
78
+ export { FlowmateBanner, FlowmateCard, FlowmateChecklist, type FlowmateComponentProps, FlowmateFloatingBlocks, FlowmateHint, FlowmateModal, FlowmateSidebar, FlowmateTooltip, setupComponents };