claude-code-memory-explorer 0.3.0 → 0.4.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/app.js +20 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-memory-explorer",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Memory explorer dashboard for Claude Code",
5
5
  "main": "server.js",
6
6
  "bin": {
package/public/app.js CHANGED
@@ -871,6 +871,26 @@ function _hubNavigate(app, url) {
871
871
  window.parent?.postMessage({ type: 'hub:navigate', app, url }, '*');
872
872
  }
873
873
 
874
+ (function initHubTheme() {
875
+ const getTheme = () => (document.body.classList.contains('light') ? 'light' : 'dark');
876
+ const hubOrigin = () => (window.__HUB__?.url ? new URL(window.__HUB__.url).origin : null);
877
+ let lastTheme = getTheme();
878
+ window.addEventListener('message', (e) => {
879
+ if (e.source !== window.parent || e.origin !== hubOrigin()) return;
880
+ if (e.data?.type !== 'hub:theme') return;
881
+ if (getTheme() === e.data.theme) return;
882
+ window.toggleTheme();
883
+ lastTheme = getTheme();
884
+ });
885
+ new MutationObserver(() => {
886
+ const t = getTheme();
887
+ if (t === lastTheme) return;
888
+ lastTheme = t;
889
+ const origin = hubOrigin();
890
+ if (origin) window.parent.postMessage({ type: 'hub:theme', theme: t }, origin);
891
+ }).observe(document.body, { attributes: true, attributeFilter: ['class'] });
892
+ })();
893
+
874
894
  // #endregion HUB_INTEGRATION
875
895
 
876
896
  // #region RESIZE