@spotlightjs/overlay 2.4.0 → 2.5.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/dist/index.d.ts CHANGED
@@ -24,7 +24,7 @@ export declare function onClose(cb: EventListener): Promise<void>;
24
24
  /**
25
25
  * Send an event to spotlight without the sidecar
26
26
  */
27
- export declare function sendEvent(contentType: string, data: string): Promise<void>;
27
+ export declare function sendEvent(contentType: string, data: string | Uint8Array): Promise<void>;
28
28
  /**
29
29
  * Invokes the passed in callback when the Spotlight debugger Window is opened
30
30
  */
@@ -35,4 +35,4 @@ export declare function onOpen(cb: EventListener): Promise<void>;
35
35
  * A count of the number of collected severe events is passed to the callback.
36
36
  */
37
37
  export declare function onSevereEvent(cb: (count: number) => void): Promise<void>;
38
- export declare function init({ openOnInit, showTriggerButton, injectImmediately, sidecarUrl, anchor, debug, integrations, experiments, fullPage, showClearEventsButton, }?: SpotlightOverlayOptions): Promise<void>;
38
+ export declare function init({ openOnInit, showTriggerButton, injectImmediately, sidecarUrl, anchor, debug, integrations, experiments, fullPage, showClearEventsButton, initialEvents, }?: SpotlightOverlayOptions): Promise<void>;
@@ -1,7 +1,10 @@
1
+ type ModifierKeys = 'altKey' | 'ctrlKey' | 'shiftKey' | 'metaKey';
1
2
  /**
2
3
  * useKeyPress
3
- * @param {string[]} keys - an array of keys to respond to, compared against event.key
4
+ * @param {string} key - The letter or name of the key to respond to -- this is normalized to lower case
5
+ * @param {ModifierKeys[]} modifiers - The modifiers that needs to be activated such as ctrlKey
4
6
  * @param {function} action - the action to perform on key press
5
7
  * @param {boolean} propagate - whether to stop event propagation (default is false)
6
8
  */
7
- export default function useKeyPress(keys: string[], action: () => void, propagate?: boolean): void;
9
+ export default function useKeyPress(key: string, modifiers: ModifierKeys[], action: () => void, propagate?: boolean): void;
10
+ export {};
@@ -1,4 +1,4 @@
1
- import { g as St, r as Ct, c as wt } from "./index-4cc92fd8.js";
1
+ import { g as St, r as Ct, c as wt } from "./index-4373983e.js";
2
2
  function At(rt, pt) {
3
3
  for (var Ye = 0; Ye < pt.length; Ye++) {
4
4
  const o = pt[Ye];
@@ -2779,4 +2779,4 @@ window.Spotlight && Spotlight.init();
2779
2779
  export {
2780
2780
  Ft as m
2781
2781
  };
2782
- //# sourceMappingURL=main-edd185de.js.map
2782
+ //# sourceMappingURL=main-6b16141c.js.map