fermmap-shared 0.1.7 → 0.1.8

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/module.mjs CHANGED
@@ -2526,7 +2526,6 @@ function $db470a4073e4639a$export$f5c9f3c2c4054eec({ label: label, error: error,
2526
2526
  const textareaRef = (0, $3A86U$useRef)(null);
2527
2527
  // Auto-grow on value change
2528
2528
  (0, $3A86U$useEffect)(()=>{
2529
- if (typeof window === 'undefined') return;
2530
2529
  const textarea = textareaRef.current;
2531
2530
  if (!textarea) return;
2532
2531
  // Reset height to recalculate
@@ -2580,19 +2579,14 @@ const $14dac782240849bf$var$THEME_STORAGE_KEY = 'fermmap-theme';
2580
2579
  // Get initial theme synchronously to prevent flicker
2581
2580
  function $14dac782240849bf$var$getInitialTheme() {
2582
2581
  if (typeof window === 'undefined') return 'light';
2583
- try {
2584
- // First check if blocking script already set the attribute
2585
- const htmlAttribute = document.documentElement.getAttribute('data-color-scheme');
2586
- if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) return htmlAttribute;
2587
- // Fallback to localStorage
2588
- const stored = localStorage.getItem($14dac782240849bf$var$THEME_STORAGE_KEY);
2589
- if (stored && (stored === 'light' || stored === 'dark')) return stored;
2590
- // Final fallback to system preference
2591
- return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
2592
- } catch {
2593
- // Fallback if any browser API fails
2594
- return 'light';
2595
- }
2582
+ // First check if blocking script already set the attribute
2583
+ const htmlAttribute = document.documentElement.getAttribute('data-color-scheme');
2584
+ if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) return htmlAttribute;
2585
+ // Fallback to localStorage
2586
+ const stored = localStorage.getItem($14dac782240849bf$var$THEME_STORAGE_KEY);
2587
+ if (stored && (stored === 'light' || stored === 'dark')) return stored;
2588
+ // Final fallback to system preference
2589
+ return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
2596
2590
  }
2597
2591
  function $14dac782240849bf$export$d8964aec282183a3({ children: children }) {
2598
2592
  // Initialize with a function to avoid SSR issues