@react-hive/honey-layout 2.4.0 → 2.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.
@@ -2,5 +2,24 @@ import { HoneyOverlayId, HoneyOverlayEventListenerHandler } from '../types';
2
2
  type UseHoneyOverlayOptions = {
3
3
  onKeyUp?: HoneyOverlayEventListenerHandler;
4
4
  };
5
+ /**
6
+ * Hook to interact with a specific overlay managed by the `HoneyLayoutProvider`.
7
+ *
8
+ * @param targetOverlayId - The unique identifier of the overlay to interact with.
9
+ * @param options - Configuration options for the overlay, such as keyboard event handling.
10
+ *
11
+ * @returns The overlay object associated with the provided `targetOverlayId`, or `undefined` if not found.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const overlay = useHoneyOverlay('my-overlay-id', {
16
+ * onKeyUp: (keyCode, e) => {
17
+ * if (keyCode === 'Escape') {
18
+ * console.log('Escape key pressed');
19
+ * }
20
+ * },
21
+ * });
22
+ * ```
23
+ */
5
24
  export declare const useHoneyOverlay: (targetOverlayId: HoneyOverlayId, { onKeyUp }?: UseHoneyOverlayOptions) => import('../types').HoneyOverlay | undefined;
6
25
  export {};
@@ -188,7 +188,7 @@ interface BaseHoneyColors {
188
188
  * Example of augmenting the colors interface.
189
189
  *
190
190
  * @example
191
- * ```typescript
191
+ * ```ts
192
192
  * declare module '@react-hive/honey-layout' {
193
193
  * export interface HoneyColors {
194
194
  * neutral: Record<'charcoalDark' | 'charcoalGray' | 'crimsonRed', HoneyCSSColor>;
@@ -207,7 +207,7 @@ export interface HoneyColors extends BaseHoneyColors {
207
207
  * @example
208
208
  *
209
209
  * Given the `HoneyColors` interface:
210
- * ```typescript
210
+ * ```ts
211
211
  * interface HoneyColors {
212
212
  * primary: Record<'blue' | 'green', HoneyCSSColor>;
213
213
  * neutral: Record<'charcoalDark' | 'charcoalGray' | 'crimsonRed', HoneyCSSColor>;
@@ -215,7 +215,7 @@ export interface HoneyColors extends BaseHoneyColors {
215
215
  * ```
216
216
  *
217
217
  * The resulting `HoneyColorKey` type will be:
218
- * ```typescript
218
+ * ```ts
219
219
  * type HoneyColorKey = 'neutral.charcoalDark' | 'neutral.charcoalGray' | 'neutral.crimsonRed' | 'primary.blue' | 'primary.green';
220
220
  * ```
221
221
  */
@@ -233,7 +233,7 @@ export type HoneyFont = {
233
233
  * Example of augmenting the fonts interface.
234
234
  *
235
235
  * @example
236
- * ```typescript
236
+ * ```ts
237
237
  * declare module '@react-hive/honey-layout' {
238
238
  * export interface HoneyFonts {
239
239
  * body: HoneyFont;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-hive/honey-layout",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "react",