aboutsummaryrefslogtreecommitdiff
path: root/packages/memory-graph/src/lib
diff options
context:
space:
mode:
authornexxeln <[email protected]>2025-12-02 18:37:24 +0000
committernexxeln <[email protected]>2025-12-02 18:37:24 +0000
commitdfb0c05ab33cb20537002eaeb896e6b2ab35af25 (patch)
tree49ecaa46903671d96f2f9ebc5af688ab2ea2c7bd /packages/memory-graph/src/lib
parentFix: Update discord links in README.md and CONTRIBUTING.md (#598) (diff)
downloadsupermemory-update-memory-graph.tar.xz
supermemory-update-memory-graph.zip
add spaces selector with search (#600)update-memory-graph
relevant files to review: \- memory-graph.tsx \- spaces-dropdown.tsx \- spaces-dropdown.css.ts
Diffstat (limited to 'packages/memory-graph/src/lib')
-rw-r--r--packages/memory-graph/src/lib/inject-styles.ts34
1 files changed, 17 insertions, 17 deletions
diff --git a/packages/memory-graph/src/lib/inject-styles.ts b/packages/memory-graph/src/lib/inject-styles.ts
index 1a6bf4eb..e50b4f5e 100644
--- a/packages/memory-graph/src/lib/inject-styles.ts
+++ b/packages/memory-graph/src/lib/inject-styles.ts
@@ -4,33 +4,33 @@
*/
// This will be replaced by the build plugin with the actual CSS content
-declare const __MEMORY_GRAPH_CSS__: string;
+declare const __MEMORY_GRAPH_CSS__: string
// Track injection state
-let injected = false;
+let injected = false
/**
* Inject memory-graph styles into the document head.
* Safe to call multiple times - will only inject once.
*/
export function injectStyles(): void {
- // Only run in browser
- if (typeof document === "undefined") return;
+ // Only run in browser
+ if (typeof document === "undefined") return
- // Only inject once
- if (injected) return;
+ // Only inject once
+ if (injected) return
- // Check if already injected (e.g., by another instance)
- if (document.querySelector('style[data-memory-graph]')) {
- injected = true;
- return;
- }
+ // Check if already injected (e.g., by another instance)
+ if (document.querySelector("style[data-memory-graph]")) {
+ injected = true
+ return
+ }
- injected = true;
+ injected = true
- // Create and inject style element
- const style = document.createElement("style");
- style.setAttribute("data-memory-graph", "");
- style.textContent = __MEMORY_GRAPH_CSS__;
- document.head.appendChild(style);
+ // Create and inject style element
+ const style = document.createElement("style")
+ style.setAttribute("data-memory-graph", "")
+ style.textContent = __MEMORY_GRAPH_CSS__
+ document.head.appendChild(style)
}