fermmap-shared 0.1.10 → 0.1.12

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
@@ -2479,6 +2479,61 @@ function $73303ac6ce50c127$export$3d96ec278d3efce4({ children: children, ...prop
2479
2479
 
2480
2480
 
2481
2481
 
2482
+ /**
2483
+ * Safe browser API wrappers that work in SSR
2484
+ */ const $20eaf1306ff19a16$export$4e09c449d6c407f7 = typeof window !== 'undefined';
2485
+ const $20eaf1306ff19a16$export$62858bae88b53fd0 = typeof document !== 'undefined';
2486
+ const $20eaf1306ff19a16$export$7dd80fbc14cd23b1 = {
2487
+ get innerHeight () {
2488
+ return $20eaf1306ff19a16$export$4e09c449d6c407f7 ? window.innerHeight : 0;
2489
+ },
2490
+ get location () {
2491
+ return $20eaf1306ff19a16$export$4e09c449d6c407f7 ? window.location : null;
2492
+ },
2493
+ matchMedia: (query)=>{
2494
+ if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return {
2495
+ matches: false,
2496
+ media: query,
2497
+ addEventListener: ()=>{},
2498
+ removeEventListener: ()=>{}
2499
+ };
2500
+ return window.matchMedia(query);
2501
+ },
2502
+ reload: ()=>{
2503
+ if ($20eaf1306ff19a16$export$4e09c449d6c407f7) window.location.reload();
2504
+ }
2505
+ };
2506
+ const $20eaf1306ff19a16$export$9aee702616bdf23c = {
2507
+ get documentElement () {
2508
+ return $20eaf1306ff19a16$export$62858bae88b53fd0 ? document.documentElement : null;
2509
+ },
2510
+ get referrer () {
2511
+ return $20eaf1306ff19a16$export$62858bae88b53fd0 ? document.referrer : '';
2512
+ },
2513
+ createElement: (tag)=>{
2514
+ return $20eaf1306ff19a16$export$62858bae88b53fd0 ? document.createElement(tag) : HTMLUnknownElement.prototype;
2515
+ }
2516
+ };
2517
+ const $20eaf1306ff19a16$export$2aa78e70b3d79ddc = {
2518
+ getItem: (key)=>{
2519
+ if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return null;
2520
+ try {
2521
+ return localStorage.getItem(key);
2522
+ } catch {
2523
+ return null;
2524
+ }
2525
+ },
2526
+ setItem: (key, value)=>{
2527
+ if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return;
2528
+ try {
2529
+ localStorage.setItem(key, value);
2530
+ } catch {
2531
+ // Silent fail
2532
+ }
2533
+ }
2534
+ };
2535
+
2536
+
2482
2537
  const $db470a4073e4639a$var$textareaStyles = function anonymous(props) {
2483
2538
  let rules = " ";
2484
2539
  rules += ' Te12';
@@ -2531,7 +2586,7 @@ function $db470a4073e4639a$export$f5c9f3c2c4054eec({ label: label, error: error,
2531
2586
  // Reset height to recalculate
2532
2587
  textarea.style.height = '75px';
2533
2588
  // Set to scrollHeight (content height)
2534
- const newHeight = Math.min(textarea.scrollHeight, typeof window !== 'undefined' ? window?.innerHeight * 0.75 : 64);
2589
+ const newHeight = Math.min(textarea.scrollHeight, (0, $20eaf1306ff19a16$export$7dd80fbc14cd23b1).innerHeight * 0.75 || 64);
2535
2590
  textarea.style.height = `${newHeight}px`;
2536
2591
  }, [
2537
2592
  value
@@ -2574,24 +2629,28 @@ $parcel$export($b9dc9736b0835428$exports, "AxeDevTools", () => $cc88703bd59b1580
2574
2629
  // Contexts & Providers
2575
2630
 
2576
2631
 
2632
+
2577
2633
  const $14dac782240849bf$var$ThemeContext = /*#__PURE__*/ (0, $3A86U$createContext)(undefined);
2578
2634
  const $14dac782240849bf$var$THEME_STORAGE_KEY = 'fermmap-theme';
2579
2635
  // Get initial theme synchronously to prevent flicker
2580
2636
  function $14dac782240849bf$var$getInitialTheme() {
2581
- if (typeof window === 'undefined' || typeof document === 'undefined') return 'light';
2637
+ if (!(0, $20eaf1306ff19a16$export$4e09c449d6c407f7)) return 'light';
2582
2638
  // 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;
2639
+ const htmlElement = (0, $20eaf1306ff19a16$export$9aee702616bdf23c).documentElement;
2640
+ if (htmlElement) {
2641
+ const htmlAttribute = htmlElement.getAttribute('data-color-scheme');
2642
+ if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) return htmlAttribute;
2643
+ }
2585
2644
  // Fallback to localStorage
2586
- const stored = localStorage.getItem($14dac782240849bf$var$THEME_STORAGE_KEY);
2645
+ const stored = (0, $20eaf1306ff19a16$export$2aa78e70b3d79ddc).getItem($14dac782240849bf$var$THEME_STORAGE_KEY);
2587
2646
  if (stored && (stored === 'light' || stored === 'dark')) return stored;
2588
2647
  // Final fallback to system preference
2589
- return typeof window !== 'undefined' && window?.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
2648
+ return (0, $20eaf1306ff19a16$export$7dd80fbc14cd23b1).matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
2590
2649
  }
2591
2650
  function $14dac782240849bf$export$d8964aec282183a3({ children: children }) {
2592
2651
  // Initialize with a function to avoid SSR issues
2593
2652
  const [colorScheme, setColorScheme] = (0, $3A86U$useState)(()=>{
2594
- if (typeof window === 'undefined') return 'light';
2653
+ if (!(0, $20eaf1306ff19a16$export$4e09c449d6c407f7)) return 'light';
2595
2654
  return $14dac782240849bf$var$getInitialTheme();
2596
2655
  });
2597
2656
  const [mounted, setMounted] = (0, $3A86U$useState)(false);
@@ -2604,9 +2663,10 @@ function $14dac782240849bf$export$d8964aec282183a3({ children: children }) {
2604
2663
  }, []);
2605
2664
  // Update html attribute and localStorage when scheme changes
2606
2665
  (0, $3A86U$useEffect)(()=>{
2607
- if (!mounted) return;
2608
- document.documentElement.setAttribute('data-color-scheme', colorScheme);
2609
- localStorage.setItem($14dac782240849bf$var$THEME_STORAGE_KEY, colorScheme);
2666
+ if (!mounted || !(0, $20eaf1306ff19a16$export$4e09c449d6c407f7)) return;
2667
+ const htmlElement = (0, $20eaf1306ff19a16$export$9aee702616bdf23c).documentElement;
2668
+ if (htmlElement) htmlElement.setAttribute('data-color-scheme', colorScheme);
2669
+ (0, $20eaf1306ff19a16$export$2aa78e70b3d79ddc).setItem($14dac782240849bf$var$THEME_STORAGE_KEY, colorScheme);
2610
2670
  }, [
2611
2671
  colorScheme,
2612
2672
  mounted
@@ -2732,6 +2792,11 @@ var $b5d45cad097c69a9$exports = {};
2732
2792
  $parcel$export($b5d45cad097c69a9$exports, "textFieldInputStyles", () => $4ae0d6a0ccb53610$export$457d6d213bf79459);
2733
2793
  $parcel$export($b5d45cad097c69a9$exports, "getCategoryColors", () => $b413b04534c20d7d$export$2514cbae0d5c71c5);
2734
2794
  $parcel$export($b5d45cad097c69a9$exports, "api", () => $0e62a2c35fb1f646$export$644d8ea042df96a6);
2795
+ $parcel$export($b5d45cad097c69a9$exports, "isBrowser", () => $20eaf1306ff19a16$export$4e09c449d6c407f7);
2796
+ $parcel$export($b5d45cad097c69a9$exports, "isDocument", () => $20eaf1306ff19a16$export$62858bae88b53fd0);
2797
+ $parcel$export($b5d45cad097c69a9$exports, "safeWindow", () => $20eaf1306ff19a16$export$7dd80fbc14cd23b1);
2798
+ $parcel$export($b5d45cad097c69a9$exports, "safeDocument", () => $20eaf1306ff19a16$export$9aee702616bdf23c);
2799
+ $parcel$export($b5d45cad097c69a9$exports, "safeLocalStorage", () => $20eaf1306ff19a16$export$2aa78e70b3d79ddc);
2735
2800
  // Utilities
2736
2801
  const $4ae0d6a0ccb53610$export$457d6d213bf79459 = ()=>({
2737
2802
  padding: 12,
@@ -2869,6 +2934,7 @@ const $4ae0d6a0ccb53610$export$457d6d213bf79459 = ()=>({
2869
2934
 
2870
2935
 
2871
2936
 
2937
+
2872
2938
  var $be9c1f6b736f678e$exports = {};
2873
2939
  var $2c570e2bb65234ea$exports = {};
2874
2940
 
@@ -2878,5 +2944,5 @@ $parcel$exportWildcard($be9c1f6b736f678e$exports, $2c570e2bb65234ea$exports);
2878
2944
 
2879
2945
 
2880
2946
 
2881
- export {$a6c6e9de70b2177d$export$de466dd8317b0b75 as AlertDialog, $a6c6e9de70b2177d$export$a551a871839880f9 as PromptDialog, $f156c2ac5fd12c51$export$2f2b9559550c7bbc as Autocomplete, $07375c4c274a5e99$export$5f8b5a1eceff31bd as AutocompleteTable, $e2023e6e190b3690$export$37acb3580601e69a as Badge, $4aac1ae7c2a46df4$export$353f5b6fc5456de1 as Button, $35fcc32020885daa$export$48513f6b9f8ce62d as Checkbox, $07aaa6869c77f679$export$de65de8213222d10 as CloseButton, $d6f6f2bb59cbf8cf$export$72b9695b8216309a as ComboBox, $5ddfe94eba6154eb$export$944aceb4f8c89f10 as DisclosureGroup, $a7c96df248e47957$export$221f31a87e5a826c as FilterTabs, $e6c4d3d9e51c440a$export$d1328f67a56fa517 as LabeledValue, $7e3a08a0d5ffc4c6$export$a6c7ac8248d6e38a as Link, $61479464bb5fd0ad$export$c17561cb55d4db30 as ProgressBar, $4f3552ad992cebcc$export$a98f0dcb43a68a25 as RadioGroup, $9260936bb33ab2d4$export$b94867ecbd698f21 as SearchField, $dc7b7ce521817383$export$668709c620d0b8e2 as SegmentedControl, $4c94f3494e92f172$export$ef9b1a59e592288f as Select, $c7af66d6eab82960$export$b5cddb1a6bf990a0 as StatCard, $b32787d33db6deae$export$b5d5cf8927ab7262 as Switch, $8fd64f6a3d6adad1$export$54ec01a60f47d33d as Table, $73303ac6ce50c127$export$b2539bed5023c21c as Tabs, $73303ac6ce50c127$export$e51a686c67fdaa2d as TabList, $73303ac6ce50c127$export$3e41faf802a29e71 as Tab, $73303ac6ce50c127$export$3d96ec278d3efce4 as TabPanel, $db470a4073e4639a$export$f5c9f3c2c4054eec as TextArea, $f62becf1f473d668$export$2c73285ae9390cec as TextField, $14dac782240849bf$export$d8964aec282183a3 as ThemeProvider, $14dac782240849bf$export$93d4e7f90805808f as useTheme, $e4a23425e1acf543$export$a54013f0d02a8f82 as I18nProvider, $e4a23425e1acf543$export$5aebe9a147f4d146 as useIntl, $5035dda096f080f5$export$66b627500eff8faa as FilterProvider, $5035dda096f080f5$export$973ca22476b0e05f as useFilters, $cc88703bd59b1580$export$dad69b6e16969c68 as AxeDevTools, $63f988b4583af0b2$export$42d0f19526e5d9da as DEFAULT_FILTERS, $63f988b4583af0b2$export$a15c90bdf31a4ff3 as hasActiveFilters, $63f988b4583af0b2$export$d0e6b6bfede2a57 as clearFilters, $63f988b4583af0b2$export$fa59a93dacecf201 as updateFilter, $63f988b4583af0b2$export$5d7f9913734d3d5f as filtersToQueryParams, $4ae0d6a0ccb53610$export$457d6d213bf79459 as textFieldInputStyles, $b413b04534c20d7d$export$2514cbae0d5c71c5 as getCategoryColors, $0e62a2c35fb1f646$export$644d8ea042df96a6 as api};
2947
+ export {$a6c6e9de70b2177d$export$de466dd8317b0b75 as AlertDialog, $a6c6e9de70b2177d$export$a551a871839880f9 as PromptDialog, $f156c2ac5fd12c51$export$2f2b9559550c7bbc as Autocomplete, $07375c4c274a5e99$export$5f8b5a1eceff31bd as AutocompleteTable, $e2023e6e190b3690$export$37acb3580601e69a as Badge, $4aac1ae7c2a46df4$export$353f5b6fc5456de1 as Button, $35fcc32020885daa$export$48513f6b9f8ce62d as Checkbox, $07aaa6869c77f679$export$de65de8213222d10 as CloseButton, $d6f6f2bb59cbf8cf$export$72b9695b8216309a as ComboBox, $5ddfe94eba6154eb$export$944aceb4f8c89f10 as DisclosureGroup, $a7c96df248e47957$export$221f31a87e5a826c as FilterTabs, $e6c4d3d9e51c440a$export$d1328f67a56fa517 as LabeledValue, $7e3a08a0d5ffc4c6$export$a6c7ac8248d6e38a as Link, $61479464bb5fd0ad$export$c17561cb55d4db30 as ProgressBar, $4f3552ad992cebcc$export$a98f0dcb43a68a25 as RadioGroup, $9260936bb33ab2d4$export$b94867ecbd698f21 as SearchField, $dc7b7ce521817383$export$668709c620d0b8e2 as SegmentedControl, $4c94f3494e92f172$export$ef9b1a59e592288f as Select, $c7af66d6eab82960$export$b5cddb1a6bf990a0 as StatCard, $b32787d33db6deae$export$b5d5cf8927ab7262 as Switch, $8fd64f6a3d6adad1$export$54ec01a60f47d33d as Table, $73303ac6ce50c127$export$b2539bed5023c21c as Tabs, $73303ac6ce50c127$export$e51a686c67fdaa2d as TabList, $73303ac6ce50c127$export$3e41faf802a29e71 as Tab, $73303ac6ce50c127$export$3d96ec278d3efce4 as TabPanel, $db470a4073e4639a$export$f5c9f3c2c4054eec as TextArea, $f62becf1f473d668$export$2c73285ae9390cec as TextField, $14dac782240849bf$export$d8964aec282183a3 as ThemeProvider, $14dac782240849bf$export$93d4e7f90805808f as useTheme, $e4a23425e1acf543$export$a54013f0d02a8f82 as I18nProvider, $e4a23425e1acf543$export$5aebe9a147f4d146 as useIntl, $5035dda096f080f5$export$66b627500eff8faa as FilterProvider, $5035dda096f080f5$export$973ca22476b0e05f as useFilters, $cc88703bd59b1580$export$dad69b6e16969c68 as AxeDevTools, $63f988b4583af0b2$export$42d0f19526e5d9da as DEFAULT_FILTERS, $63f988b4583af0b2$export$a15c90bdf31a4ff3 as hasActiveFilters, $63f988b4583af0b2$export$d0e6b6bfede2a57 as clearFilters, $63f988b4583af0b2$export$fa59a93dacecf201 as updateFilter, $63f988b4583af0b2$export$5d7f9913734d3d5f as filtersToQueryParams, $4ae0d6a0ccb53610$export$457d6d213bf79459 as textFieldInputStyles, $b413b04534c20d7d$export$2514cbae0d5c71c5 as getCategoryColors, $0e62a2c35fb1f646$export$644d8ea042df96a6 as api, $20eaf1306ff19a16$export$4e09c449d6c407f7 as isBrowser, $20eaf1306ff19a16$export$62858bae88b53fd0 as isDocument, $20eaf1306ff19a16$export$7dd80fbc14cd23b1 as safeWindow, $20eaf1306ff19a16$export$9aee702616bdf23c as safeDocument, $20eaf1306ff19a16$export$2aa78e70b3d79ddc as safeLocalStorage};
2882
2948
  //# sourceMappingURL=module.mjs.map