@crystaltech/hsms-shared-ui 0.7.16-alpha.2 → 0.7.16-alpha.4

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.
@@ -1,6 +1,11 @@
1
1
  import { default as React } from 'react';
2
2
  interface FooterProps {
3
- footerText: string;
3
+ /**
4
+ * Replaces the default attribution entirely. Hosts that already render
5
+ * their own copyright line should pass it here — the default is not
6
+ * appended, so the two never appear together.
7
+ */
8
+ footerText?: React.ReactNode;
4
9
  }
5
10
  declare const Footer: React.FC<FooterProps>;
6
11
  export default Footer;
@@ -1,5 +1,17 @@
1
1
  /**
2
- * Sync a JSON value from localStorage with both cross-tab storage events and
3
- * same-tab custom events. Returns the parsed value or null.
2
+ * Same-tab localStorage writes fire no `storage` event the browser only
3
+ * notifies *other* tabs. Consumers therefore never learn about a value the
4
+ * host app wrote after they mounted (e.g. user_info during login) until the
5
+ * next page load.
6
+ *
7
+ * Wrapping the mutators once makes every same-tab write observable, whoever
8
+ * performs it, without asking writers to dispatch anything.
9
+ */
10
+ export declare const STORAGE_WRITE_EVENT = "hsms-storage-write";
11
+ export declare function observeLocalStorageWrites(): void;
12
+ /**
13
+ * Sync a JSON value from localStorage. Picks up cross-tab storage events,
14
+ * same-tab writes from any source, and an optional explicit custom event.
15
+ * Returns the parsed value or null.
4
16
  */
5
17
  export declare function useSyncedLocalStorageJSON<T>(key: string, customEventName?: string): T | null;