@codingfactory/messenger-client 0.3.1 → 0.4.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,62 @@
1
+ /**
2
+ * Minimal vanilla action sheet that replaces Ionic's actionSheetController.
3
+ * Renders a bottom sheet with buttons. Icons are stored but not rendered (acceptable tradeoff).
4
+ */
5
+ export interface ActionSheetButton {
6
+ text: string;
7
+ icon?: string;
8
+ role?: string;
9
+ data?: Record<string, unknown>;
10
+ cssClass?: string;
11
+ htmlAttributes?: Record<string, string>;
12
+ handler?: () => void | boolean | Promise<void>;
13
+ }
14
+ export interface ActionSheetOptions {
15
+ header?: string;
16
+ subHeader?: string;
17
+ buttons: ActionSheetButton[];
18
+ cssClass?: string;
19
+ htmlAttributes?: Record<string, string>;
20
+ }
21
+ export interface ActionSheetOverlay extends HTMLElement {
22
+ present: () => Promise<void>;
23
+ dismiss: () => Promise<void>;
24
+ onDidDismiss: () => Promise<{
25
+ role?: string;
26
+ }>;
27
+ remove: () => void;
28
+ }
29
+ declare class VanillaActionSheetController {
30
+ create(options: ActionSheetOptions): Promise<ActionSheetOverlay>;
31
+ }
32
+ export declare const actionSheetController: VanillaActionSheetController;
33
+ /**
34
+ * Minimal vanilla alert replacement.
35
+ * For simple confirm/cancel dialogs.
36
+ */
37
+ export interface AlertButton {
38
+ text: string;
39
+ role?: string;
40
+ cssClass?: string;
41
+ htmlAttributes?: Record<string, string>;
42
+ handler?: () => void | Promise<void>;
43
+ }
44
+ export interface AlertOptions {
45
+ header?: string;
46
+ message?: string;
47
+ buttons: AlertButton[];
48
+ cssClass?: string;
49
+ }
50
+ export interface AlertOverlay extends HTMLElement {
51
+ present: () => Promise<void>;
52
+ dismiss: () => Promise<void>;
53
+ onDidDismiss: () => Promise<{
54
+ role?: string;
55
+ }>;
56
+ remove: () => void;
57
+ }
58
+ declare class VanillaAlertController {
59
+ create(options: AlertOptions): Promise<AlertOverlay>;
60
+ }
61
+ export declare const alertController: VanillaAlertController;
62
+ export {};
@@ -0,0 +1 @@
1
+ export declare const iconMap: Record<string, string>;
@@ -0,0 +1,6 @@
1
+ export { default as MsgIcon } from './MsgIcon.vue';
2
+ export { default as MsgSpinner } from './MsgSpinner.vue';
3
+ export { default as MsgTextarea } from './MsgTextarea.vue';
4
+ export { iconMap } from './icons';
5
+ export { actionSheetController, alertController } from './actionSheet';
6
+ export type { ActionSheetButton, ActionSheetOptions, ActionSheetOverlay, AlertButton, AlertOptions, AlertOverlay } from './actionSheet';
@@ -0,0 +1,7 @@
1
+ export interface WidgetConfig {
2
+ /** Base route path for the full messenger page (default: '/messages') */
3
+ messagesRoute: string;
4
+ }
5
+ export declare function getWidgetConfig(): WidgetConfig;
6
+ export declare function setWidgetConfig(overrides: Partial<WidgetConfig>): void;
7
+ export declare function resetWidgetConfig(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingfactory/messenger-client",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Shared messaging frontend: UI components, state management, API helpers, and realtime composables.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -37,19 +37,16 @@
37
37
  "date-fns": "^4.0.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
- "date-fns": { "optional": true },
41
- "@ionic/vue": { "optional": true }
40
+ "date-fns": { "optional": true }
42
41
  },
43
42
  "devDependencies": {
44
43
  "@eslint/js": "^10.0.1",
45
- "@ionic/vue": "^8.8.1",
46
44
  "@types/node": "^25.3.5",
47
45
  "@vitejs/plugin-vue": "^6.0.5",
48
46
  "@vue/test-utils": "^2.4.6",
49
47
  "date-fns": "^4.1.0",
50
48
  "eslint": "^10.0.3",
51
49
  "globals": "^17.4.0",
52
- "ionicons": "^8.0.13",
53
50
  "jsdom": "^28.1.0",
54
51
  "pinia": "^3.0.4",
55
52
  "typescript": "^5.9.3",