uapp-communication-sdk 1.0.0-dev.60 → 1.0.0-dev.62

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.
Files changed (29) hide show
  1. package/communication-sdk.cjs +2 -2
  2. package/communication-sdk.js +4680 -4551
  3. package/communication-sdk.standalone.js +159 -159
  4. package/package.json +1 -1
  5. package/types/app/shell/NotificationsMenu.d.ts.map +1 -1
  6. package/types/features/chat/presentation/MediaViewer.d.ts.map +1 -1
  7. package/types/features/chat/presentation/use-conversations.d.ts +14 -1
  8. package/types/features/chat/presentation/use-conversations.d.ts.map +1 -1
  9. package/types/features/feed/presentation/Lightbox.d.ts.map +1 -1
  10. package/types/features/feed/presentation/SharePostModal.d.ts.map +1 -1
  11. package/types/sdk/CommsProvider.d.ts.map +1 -1
  12. package/types/sdk/SdkProviders.d.ts +4 -1
  13. package/types/sdk/SdkProviders.d.ts.map +1 -1
  14. package/types/sdk/index.d.ts +5 -0
  15. package/types/sdk/index.d.ts.map +1 -1
  16. package/types/sdk/notifications/notification-client.d.ts +67 -0
  17. package/types/sdk/notifications/notification-client.d.ts.map +1 -0
  18. package/types/sdk/runtime/SdkNotificationBridge.d.ts +22 -0
  19. package/types/sdk/runtime/SdkNotificationBridge.d.ts.map +1 -0
  20. package/types/sdk/types.d.ts +28 -0
  21. package/types/sdk/types.d.ts.map +1 -1
  22. package/types/shared/ui/Drawer/Drawer.d.ts +10 -0
  23. package/types/shared/ui/Drawer/Drawer.d.ts.map +1 -1
  24. package/types/shared/ui/Modal/Modal.d.ts.map +1 -1
  25. package/types/shared/ui/TimePicker/TimePicker.d.ts.map +1 -1
  26. package/types/shared/ui/index.d.ts +1 -0
  27. package/types/shared/ui/index.d.ts.map +1 -1
  28. package/types/shared/ui/is-event-outside.d.ts +17 -0
  29. package/types/shared/ui/is-event-outside.d.ts.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uapp-communication-sdk",
3
- "version": "1.0.0-dev.60",
3
+ "version": "1.0.0-dev.62",
4
4
  "description": "Embeddable Communication Hub widgets (chat, feed, bookings, schedule).",
5
5
  "type": "module",
6
6
  "types": "./types/sdk/index.d.ts",
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationsMenu.d.ts","sourceRoot":"","sources":["../../../../../src/app/shell/NotificationsMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,OAAO,CAAC;AAyGvE,mGAAmG;AACnG,eAAO,MAAM,iBAAiB,QAAO,YA4EpC,CAAC"}
1
+ {"version":3,"file":"NotificationsMenu.d.ts","sourceRoot":"","sources":["../../../../../src/app/shell/NotificationsMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,OAAO,CAAC;AAyGvE,mGAAmG;AACnG,eAAO,MAAM,iBAAiB,QAAO,YA8EpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MediaViewer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/MediaViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,OAAO,CAAC;AAoDrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,YAAY,GAAG,IAsE7C,CAAC"}
1
+ {"version":3,"file":"MediaViewer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/MediaViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,OAAO,CAAC;AAqDrD;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,YAAY,GAAG,IA4E7C,CAAC"}
@@ -20,7 +20,20 @@ export interface UseConversationsResult {
20
20
  readonly isFetchingNextPage: boolean;
21
21
  readonly fetchNextPage: () => void;
22
22
  }
23
- export declare const useConversations: (scope: ConversationScope, search: string) => UseConversationsResult;
23
+ export interface UseConversationsOptions {
24
+ /**
25
+ * Whether to fetch at all. Defaults to true.
26
+ *
27
+ * <p>For a list that is only ever read behind a closed panel, mounting the component is not the
28
+ * same as needing the data: `SharePostModal` is rendered by every post card and takes `open` as a
29
+ * prop, so an unconditional fetch here asked the server for the whole conversation list once per
30
+ * post on every feed load, for a dialog nobody had opened. In an embedded feed it also fails —
31
+ * conversations are chat data and a feed widget holds no chat scope — so the waste showed up as a
32
+ * wall of 403s.</p>
33
+ */
34
+ readonly enabled?: boolean;
35
+ }
36
+ export declare const useConversations: (scope: ConversationScope, search: string, options?: UseConversationsOptions) => UseConversationsResult;
24
37
  /** Exact per-tab conversation counts for the chat badges (server-computed). */
25
38
  export declare const useConversationCounts: () => UseQueryResult<ConversationScopeCounts>;
26
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"use-conversations.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/use-conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,YAAY,EAEZ,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,WAAW,CAAC;AAGnB,0GAA0G;AAC1G,eAAO,MAAM,qBAAqB,oCAAqC,CAAC;AAExE,sCAAsC;AACtC,eAAO,MAAM,0BAA0B,0CAA2C,CAAC;AAEnF,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,GAAI,gBAAgB,MAAM,KAAG,SAAS,OAAO,EAI7E,CAAC;AAKF;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,GAC3B,OAAO,iBAAiB,EACxB,QAAQ,MAAM,KACb,sBAgCF,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,QAAO,cAAc,CAAC,uBAAuB,CAM9E,CAAC;AAyBF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAC1B,gBAAgB,MAAM,GAAG,IAAI,KAC5B,cAAc,CAAC,YAAY,CAkB7B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,aAAa,WAAW,KAAG,IAMtE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GAAI,aAAa,WAAW,KAAG,IAGtE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B,GAAI,aAAa,WAAW,KAAG,IAM1E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,aAAa,WAAW,EACxB,gBAAgB,MAAM,EACtB,QAAQ,CAAC,YAAY,EAAE,YAAY,KAAK,YAAY,KACnD,IAmBF,CAAC"}
1
+ {"version":3,"file":"use-conversations.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chat/presentation/use-conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,YAAY,EAEZ,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,WAAW,CAAC;AAGnB,0GAA0G;AAC1G,eAAO,MAAM,qBAAqB,oCAAqC,CAAC;AAExE,sCAAsC;AACtC,eAAO,MAAM,0BAA0B,0CAA2C,CAAC;AAEnF,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,GAAI,gBAAgB,MAAM,KAAG,SAAS,OAAO,EAI7E,CAAC;AAKF;;;;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ts","sourceRoot":"","sources":["../../../../../../src/features/feed/presentation/Lightbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,OAAO,CAAC;AAIrD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAQxD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AA2GD,eAAO,MAAM,QAAQ,GAAI,sHAYtB,aAAa,KAAG,YA2DlB,CAAC"}
1
+ {"version":3,"file":"Lightbox.d.ts","sourceRoot":"","sources":["../../../../../../src/features/feed/presentation/Lightbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAa,MAAM,OAAO,CAAC;AAKrD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAQxD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AA2GD,eAAO,MAAM,QAAQ,GAAI,sHAYtB,aAAa,KAAG,YAiElB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SharePostModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/feed/presentation/SharePostModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;AAMpD,OAAO,EAKL,KAAK,YAAY,EAElB,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAmPD,eAAO,MAAM,cAAc,GAAI,0BAI5B,mBAAmB,KAAG,YAAY,GAAG,IAwCvC,CAAC"}
1
+ {"version":3,"file":"SharePostModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/feed/presentation/SharePostModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;AAOpD,OAAO,EAKL,KAAK,YAAY,EAElB,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAqPD,eAAO,MAAM,cAAc,GAAI,0BAI5B,mBAAmB,KAAG,YAAY,GAAG,IA+CvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CommsProvider.d.ts","sourceRoot":"","sources":["../../../../src/sdk/CommsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAS1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,kBAAkB,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,KACnD,YAqDF,CAAC"}
1
+ {"version":3,"file":"CommsProvider.d.ts","sourceRoot":"","sources":["../../../../src/sdk/CommsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAS1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,kBAAkB,GAAG;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,KACnD,YAuDF,CAAC"}
@@ -1,8 +1,11 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import type { SdkComposition } from './runtime/sdk-composition-root';
3
+ import type { SdkEvent } from './types';
3
4
  export interface SdkProvidersProps {
4
5
  readonly composition: SdkComposition;
5
6
  readonly children: ReactNode;
7
+ /** Forwarded to {@link SdkNotificationBridge} so live notifications reach the host page. */
8
+ readonly onEvent?: ((event: SdkEvent) => void) | undefined;
6
9
  }
7
10
  /**
8
11
  * The widget's provider stack. Mirrors the SPA's `App.tsx` for every module the SDK actually ships,
@@ -17,5 +20,5 @@ export interface SdkProvidersProps {
17
20
  * Host-only providers (users, permissions, org, api-keys) remain absent: they gate admin surfaces
18
21
  * that are not embeddable, and nothing the widgets render consumes them.
19
22
  */
20
- export declare const SdkProviders: ({ composition, children, }: SdkProvidersProps) => ReactElement;
23
+ export declare const SdkProviders: ({ composition, children, onEvent, }: SdkProvidersProps) => ReactElement;
21
24
  //# sourceMappingURL=SdkProviders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SdkProviders.d.ts","sourceRoot":"","sources":["../../../../src/sdk/SdkProviders.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAcrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,GAAI,4BAG1B,iBAAiB,KAAG,YA4CtB,CAAC"}
1
+ {"version":3,"file":"SdkProviders.d.ts","sourceRoot":"","sources":["../../../../src/sdk/SdkProviders.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAcrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5D;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,GAAI,qCAI1B,iBAAiB,KAAG,YA8CtB,CAAC"}
@@ -11,6 +11,11 @@ import { registerFeedWidget } from './elements/uapp-feed';
11
11
  import { registerBookingsWidget } from './elements/uapp-bookings';
12
12
  import { registerScheduleWidget } from './elements/uapp-schedule';
13
13
  export { CommsProvider } from './CommsProvider';
14
+ /**
15
+ * Notifications without a widget. A host application's users are usually on one of its OTHER pages,
16
+ * where no widget is mounted and `onEvent` therefore never fires — this reaches them anyway.
17
+ */
18
+ export { createNotificationClient, type NotificationClient, type NotificationClientOptions, type SdkNotification, } from './notifications/notification-client';
14
19
  export { WidgetRoot, type WidgetRootProps } from './elements/WidgetRoot';
15
20
  export { registerChatWidget, registerFeedWidget, registerBookingsWidget, registerScheduleWidget, };
16
21
  export { SDK_MODULE_SCOPES, type AuthConfig, type CommsProviderProps, type SdkEvent, type SdkModuleScope, type ThemeConfig, type ThemeDensity, type ThemeMode, } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC;AAEF,OAAO,EACL,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,IAKvC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD;;;GAGG;AACH,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,GACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC;AAEF,OAAO,EACL,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,GACf,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,IAKvC,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { type Logger } from '@core/logger';
2
+ import type { SdkModuleScope } from '../types';
3
+ /** One notification, in the shape a host page needs to render a row. */
4
+ export interface SdkNotification {
5
+ /** Stable id — the same notification can arrive twice across a reconnect. De-duplicate on it. */
6
+ readonly id: string;
7
+ /** Which surface it came from: `feed`, `meeting`. */
8
+ readonly kind: string;
9
+ readonly actor: string;
10
+ /** ISO 8601 UTC. Format it in the reader's locale and zone — the SDK does not know either. */
11
+ readonly occurredAt: string;
12
+ readonly message?: string;
13
+ readonly detail?: string;
14
+ readonly postId?: string;
15
+ }
16
+ export interface NotificationClientOptions {
17
+ /** Origin of the Communication Hub API. */
18
+ readonly apiBaseUrl: string;
19
+ readonly clientKey: string;
20
+ /**
21
+ * Fetches a fresh signed assertion from YOUR server. Called for the first token and again whenever
22
+ * one expires — each assertion is single-use, so this must mint a new one every time.
23
+ */
24
+ readonly getAssertion: () => Promise<string>;
25
+ /**
26
+ * Module scopes to request. `commhub.feed` is required for the live connection: it is what the
27
+ * notification hub is scoped to. Others are harmless but pointless here.
28
+ */
29
+ readonly modules?: readonly SdkModuleScope[];
30
+ /** Called for every notification, live and from the initial unread load. */
31
+ readonly onNotification: (notification: SdkNotification) => void;
32
+ readonly logger?: Logger;
33
+ }
34
+ export interface NotificationClient {
35
+ /** Loads what is unread, then opens the live connection. Safe to call twice. */
36
+ start: () => Promise<void>;
37
+ /** Closes the connection. The client can be started again afterwards. */
38
+ stop: () => Promise<void>;
39
+ /** Marks one notification read in the Hub, so the count agrees on the next load. */
40
+ markAsRead: (id: string) => Promise<void>;
41
+ /** Everything currently unread, newest first. Refreshed by {@link start}. */
42
+ unread: () => readonly SdkNotification[];
43
+ }
44
+ /**
45
+ * Notifications WITHOUT a widget.
46
+ *
47
+ * <p>A widget only receives notifications while it is mounted, and the person using a host
48
+ * application is usually on one of its other pages. Everything needed to reach them anyway — the
49
+ * assertion exchange, the socket, the token that expires in half an hour and has no refresh, the
50
+ * payload shape — is protocol this SDK owns. Left to each host it is re-implemented per integration,
51
+ * and the token lifetime is the part everyone gets wrong: the socket simply goes quiet after thirty
52
+ * minutes and nothing reports it.</p>
53
+ *
54
+ * <p>Deliberately headless. It renders nothing and holds no React: a host mounts it once, wherever
55
+ * its own notification state lives, and feeds its own bell.</p>
56
+ *
57
+ * @example
58
+ * const client = createNotificationClient({
59
+ * apiBaseUrl: 'https://api.commhub.example',
60
+ * clientKey: 'sk_live_…',
61
+ * getAssertion: () => fetch('/api/commhub-assertion').then((r) => r.text()),
62
+ * onNotification: (n) => bell.add(n),
63
+ * });
64
+ * await client.start();
65
+ */
66
+ export declare const createNotificationClient: (options: NotificationClientOptions) => NotificationClient;
67
+ //# sourceMappingURL=notification-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-client.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/notifications/notification-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAK1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8FAA8F;IAC9F,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,yBAAyB;IACxC,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,4EAA4E;IAC5E,QAAQ,CAAC,cAAc,EAAE,CAAC,YAAY,EAAE,eAAe,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,yEAAyE;IACzE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,oFAAoF;IACpF,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,6EAA6E;IAC7E,MAAM,EAAE,MAAM,SAAS,eAAe,EAAE,CAAC;CAC1C;AAqGD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,yBAAyB,KACjC,kBAyFF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { SdkEvent } from '../types';
2
+ export interface SdkNotificationBridgeProps {
3
+ readonly onEvent?: ((event: SdkEvent) => void) | undefined;
4
+ }
5
+ /**
6
+ * Forwards the Hub's live notifications to the HOST page.
7
+ *
8
+ * <p>An embedded widget is one panel on somebody else's site, and the person using it is usually
9
+ * looking at the rest of that site. A notification that only lands inside the widget is a
10
+ * notification nobody sees — the host has the header, the badge and the tab title, and it already
11
+ * knows how it wants to announce things. So the SDK does not render a bell of its own; it tells the
12
+ * host what happened and lets the host decide.</p>
13
+ *
14
+ * <p>Rendering nothing is deliberate: this is a subscription, not UI. It sits inside the provider
15
+ * tree because that is where the feed module — and with it the notifications connection — exists.</p>
16
+ *
17
+ * <p>Costs nothing when the key has no feed module: the composition hands out a
18
+ * <c>NullRealtimeConnection</c> in that case, whose `on` is a no-op and whose `start` never opens a
19
+ * socket. There is no scope check to keep in step here, because the connection itself is the check.</p>
20
+ */
21
+ export declare const SdkNotificationBridge: ({ onEvent }: SdkNotificationBridgeProps) => null;
22
+ //# sourceMappingURL=SdkNotificationBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdkNotificationBridge.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/runtime/SdkNotificationBridge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5D;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,GAAI,aAAa,0BAA0B,KAAG,IAoD/E,CAAC"}
@@ -60,6 +60,34 @@ export type SdkEvent = {
60
60
  code: string;
61
61
  message: string;
62
62
  };
63
+ }
64
+ /**
65
+ * Somebody was notified inside the Hub — a post, a meeting invitation, a response.
66
+ *
67
+ * <p>Delivered so the HOST can announce it: its own badge, its own tab title, its own sound. A
68
+ * widget is one panel on a page whose user is usually looking somewhere else on that page, so a
69
+ * notice that only appears inside the widget is one nobody sees.</p>
70
+ *
71
+ * <p>Requires the `commhub.feed` module — that is what opens the notification connection. Fires
72
+ * only while a widget is mounted; anything that must survive a closed page belongs in a webhook on
73
+ * the server, not here.</p>
74
+ */
75
+ | {
76
+ type: 'notification';
77
+ payload: {
78
+ /** Stable id. The same notification can arrive twice across a reconnect — de-duplicate on it. */
79
+ id: string;
80
+ /** Which surface it came from, e.g. `feed`, `meeting`. */
81
+ kind: string;
82
+ /** Display name of the person who caused it. */
83
+ actor: string;
84
+ /** ISO 8601 UTC. Format it yourself: the widget does not know your locale or zone. */
85
+ occurredAt: string;
86
+ message?: string;
87
+ detail?: string;
88
+ /** Present for feed notifications — the post to open. */
89
+ postId?: string;
90
+ };
63
91
  };
64
92
  export interface CommsProviderProps {
65
93
  /** Origin of the Communication Hub API, e.g. `https://api.commhub.example`. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/sdk/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mFAKpB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,2FAA2F;AAC3F,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;AAErD,2EAA2E;AAC3E,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpD,MAAM,WAAW,WAAW;IAC1B,wFAAwF;IACxF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,0FAA0F;IAC1F,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8FAA8F;IAC9F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;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QAAQ,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE,GAC5E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE;AAC/D;;;;;;;;;;GAUG;GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE;QACP,iGAAiG;QACjG,EAAE,EAAE,MAAM,CAAC;QACX,0DAA0D;QAC1D,IAAI,EAAE,MAAM,CAAC;QACb,gDAAgD;QAChD,KAAK,EAAE,MAAM,CAAC;QACd,sFAAsF;QACtF,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,yDAAyD;QACzD,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEN,MAAM,WAAW,kBAAkB;IACjC,+EAA+E;IAC/E,UAAU,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC"}
@@ -24,5 +24,15 @@ export interface DrawerProps {
24
24
  * is `translateX(0)` — so even when the animation is skipped (reduced motion) the panel still sits
25
25
  * fully on-screen and opaque, never stranded off the edge. Token-driven CSS modules throughout.
26
26
  */
27
+ /**
28
+ * Radix locks page scrolling while this is open, via `react-remove-scroll`. That listens on the
29
+ * DOCUMENT, and inside a shadow root the browser retargets `event.target` to the host element — so
30
+ * every wheel event looks like it came from outside the dialog and gets cancelled. The panel keeps
31
+ * its scrollbar and stops responding to the wheel, which is what an embedded schedule editor did.
32
+ *
33
+ * A container is supplied only by the SDK, so it doubles as "am I inside a shadow root". Turning the
34
+ * lock off there is also the right behaviour on its own terms: a widget has no business freezing the
35
+ * scroll of the page that embeds it.
36
+ */
27
37
  export declare const Drawer: ({ open, onOpenChange, title, side, size, children, footer, }: DrawerProps) => ReactElement;
28
38
  //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/ui/Drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMrD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,qEAAqE;IACrE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;CAC7B;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GAAI,8DAQpB,WAAW,KAAG,YAgBhB,CAAC"}
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../../src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C,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC/C;AAID;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,GAAI,+EASnB,UAAU,KAAG,YA4Df,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/ui/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASrD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC/C;AAID;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,GAAI,+EASnB,UAAU,KAAG,YAmEf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/ui/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAKf,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAClC;AAwID;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,wDAOxB,eAAe,KAAG,YAqEpB,CAAC"}
1
+ {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/ui/TimePicker/TimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAMf,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAClC;AAwID;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,wDAOxB,eAAe,KAAG,YAsEpB,CAAC"}
@@ -34,4 +34,5 @@ export * from './SegmentedControl/SegmentedControl';
34
34
  export * from './TimePicker/TimePicker';
35
35
  export * from './portal-container';
36
36
  export * from './use-portal-container';
37
+ export * from './is-event-outside';
37
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Whether an event happened outside `container` — correct across a shadow boundary.
3
+ *
4
+ * <p>The obvious version, `!container.contains(event.target)`, is wrong inside the SDK. A listener on
5
+ * the DOCUMENT sees a RETARGETED event: the browser rewrites `target` to the shadow host before the
6
+ * event escapes the shadow tree, so a click on a menu item inside the widget arrives as a click on
7
+ * `&lt;uapp-schedule&gt;`. `contains` then says "outside", and a dropdown closes on the pointerdown
8
+ * that was about to select something — the option is never clicked, and the control looks dead.</p>
9
+ *
10
+ * <p><code>composedPath()</code> is the answer the platform provides: it lists every node the event
11
+ * actually travelled through, shadow trees included. Outside a shadow root it contains exactly the
12
+ * same nodes as the retargeted path, so the app behaves identically.</p>
13
+ *
14
+ * <p>Falls back to `target` where `composedPath` is unavailable, which is no worse than before.</p>
15
+ */
16
+ export declare const isEventOutside: (container: Node | null, event: Event) => boolean;
17
+ //# sourceMappingURL=is-event-outside.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-event-outside.d.ts","sourceRoot":"","sources":["../../../../../src/shared/ui/is-event-outside.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,GAAI,WAAW,IAAI,GAAG,IAAI,EAAE,OAAO,KAAK,KAAG,OAWrE,CAAC"}