fermmap-shared 0.1.9 → 0.1.10
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/main.cjs +10 -63
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +11 -64
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +0 -20
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.mjs
CHANGED
|
@@ -2478,49 +2478,6 @@ function $73303ac6ce50c127$export$3d96ec278d3efce4({ children: children, ...prop
|
|
|
2478
2478
|
|
|
2479
2479
|
|
|
2480
2480
|
|
|
2481
|
-
/**
|
|
2482
|
-
* Safe browser API wrappers that work in SSR
|
|
2483
|
-
*/ const $20eaf1306ff19a16$export$4e09c449d6c407f7 = typeof window !== 'undefined';
|
|
2484
|
-
const $20eaf1306ff19a16$export$7dd80fbc14cd23b1 = {
|
|
2485
|
-
get innerHeight () {
|
|
2486
|
-
return $20eaf1306ff19a16$export$4e09c449d6c407f7 ? window.innerHeight : 0;
|
|
2487
|
-
},
|
|
2488
|
-
matchMedia: (query)=>{
|
|
2489
|
-
if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return {
|
|
2490
|
-
matches: false,
|
|
2491
|
-
media: query,
|
|
2492
|
-
addEventListener: ()=>{},
|
|
2493
|
-
removeEventListener: ()=>{}
|
|
2494
|
-
};
|
|
2495
|
-
return window.matchMedia(query);
|
|
2496
|
-
}
|
|
2497
|
-
};
|
|
2498
|
-
const $20eaf1306ff19a16$export$9aee702616bdf23c = {
|
|
2499
|
-
get documentElement () {
|
|
2500
|
-
if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return null;
|
|
2501
|
-
return document.documentElement;
|
|
2502
|
-
}
|
|
2503
|
-
};
|
|
2504
|
-
const $20eaf1306ff19a16$export$2aa78e70b3d79ddc = {
|
|
2505
|
-
getItem: (key)=>{
|
|
2506
|
-
if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return null;
|
|
2507
|
-
try {
|
|
2508
|
-
return localStorage.getItem(key);
|
|
2509
|
-
} catch {
|
|
2510
|
-
return null;
|
|
2511
|
-
}
|
|
2512
|
-
},
|
|
2513
|
-
setItem: (key, value)=>{
|
|
2514
|
-
if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return;
|
|
2515
|
-
try {
|
|
2516
|
-
localStorage.setItem(key, value);
|
|
2517
|
-
} catch {
|
|
2518
|
-
// Silent fail
|
|
2519
|
-
}
|
|
2520
|
-
}
|
|
2521
|
-
};
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
2481
|
|
|
2525
2482
|
const $db470a4073e4639a$var$textareaStyles = function anonymous(props) {
|
|
2526
2483
|
let rules = " ";
|
|
@@ -2574,7 +2531,7 @@ function $db470a4073e4639a$export$f5c9f3c2c4054eec({ label: label, error: error,
|
|
|
2574
2531
|
// Reset height to recalculate
|
|
2575
2532
|
textarea.style.height = '75px';
|
|
2576
2533
|
// Set to scrollHeight (content height)
|
|
2577
|
-
const newHeight = Math.min(textarea.scrollHeight,
|
|
2534
|
+
const newHeight = Math.min(textarea.scrollHeight, typeof window !== 'undefined' ? window?.innerHeight * 0.75 : 64);
|
|
2578
2535
|
textarea.style.height = `${newHeight}px`;
|
|
2579
2536
|
}, [
|
|
2580
2537
|
value
|
|
@@ -2617,28 +2574,24 @@ $parcel$export($b9dc9736b0835428$exports, "AxeDevTools", () => $cc88703bd59b1580
|
|
|
2617
2574
|
// Contexts & Providers
|
|
2618
2575
|
|
|
2619
2576
|
|
|
2620
|
-
|
|
2621
2577
|
const $14dac782240849bf$var$ThemeContext = /*#__PURE__*/ (0, $3A86U$createContext)(undefined);
|
|
2622
2578
|
const $14dac782240849bf$var$THEME_STORAGE_KEY = 'fermmap-theme';
|
|
2623
2579
|
// Get initial theme synchronously to prevent flicker
|
|
2624
2580
|
function $14dac782240849bf$var$getInitialTheme() {
|
|
2625
|
-
if (
|
|
2581
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') return 'light';
|
|
2626
2582
|
// First check if blocking script already set the attribute
|
|
2627
|
-
const
|
|
2628
|
-
if (
|
|
2629
|
-
const htmlAttribute = htmlElement.getAttribute('data-color-scheme');
|
|
2630
|
-
if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) return htmlAttribute;
|
|
2631
|
-
}
|
|
2583
|
+
const htmlAttribute = document?.documentElement.getAttribute('data-color-scheme');
|
|
2584
|
+
if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) return htmlAttribute;
|
|
2632
2585
|
// Fallback to localStorage
|
|
2633
|
-
const stored =
|
|
2586
|
+
const stored = localStorage.getItem($14dac782240849bf$var$THEME_STORAGE_KEY);
|
|
2634
2587
|
if (stored && (stored === 'light' || stored === 'dark')) return stored;
|
|
2635
2588
|
// Final fallback to system preference
|
|
2636
|
-
return
|
|
2589
|
+
return typeof window !== 'undefined' && window?.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
2637
2590
|
}
|
|
2638
2591
|
function $14dac782240849bf$export$d8964aec282183a3({ children: children }) {
|
|
2639
2592
|
// Initialize with a function to avoid SSR issues
|
|
2640
2593
|
const [colorScheme, setColorScheme] = (0, $3A86U$useState)(()=>{
|
|
2641
|
-
if (
|
|
2594
|
+
if (typeof window === 'undefined') return 'light';
|
|
2642
2595
|
return $14dac782240849bf$var$getInitialTheme();
|
|
2643
2596
|
});
|
|
2644
2597
|
const [mounted, setMounted] = (0, $3A86U$useState)(false);
|
|
@@ -2651,10 +2604,9 @@ function $14dac782240849bf$export$d8964aec282183a3({ children: children }) {
|
|
|
2651
2604
|
}, []);
|
|
2652
2605
|
// Update html attribute and localStorage when scheme changes
|
|
2653
2606
|
(0, $3A86U$useEffect)(()=>{
|
|
2654
|
-
if (!mounted
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
(0, $20eaf1306ff19a16$export$2aa78e70b3d79ddc).setItem($14dac782240849bf$var$THEME_STORAGE_KEY, colorScheme);
|
|
2607
|
+
if (!mounted) return;
|
|
2608
|
+
document.documentElement.setAttribute('data-color-scheme', colorScheme);
|
|
2609
|
+
localStorage.setItem($14dac782240849bf$var$THEME_STORAGE_KEY, colorScheme);
|
|
2658
2610
|
}, [
|
|
2659
2611
|
colorScheme,
|
|
2660
2612
|
mounted
|
|
@@ -2780,10 +2732,6 @@ var $b5d45cad097c69a9$exports = {};
|
|
|
2780
2732
|
$parcel$export($b5d45cad097c69a9$exports, "textFieldInputStyles", () => $4ae0d6a0ccb53610$export$457d6d213bf79459);
|
|
2781
2733
|
$parcel$export($b5d45cad097c69a9$exports, "getCategoryColors", () => $b413b04534c20d7d$export$2514cbae0d5c71c5);
|
|
2782
2734
|
$parcel$export($b5d45cad097c69a9$exports, "api", () => $0e62a2c35fb1f646$export$644d8ea042df96a6);
|
|
2783
|
-
$parcel$export($b5d45cad097c69a9$exports, "isBrowser", () => $20eaf1306ff19a16$export$4e09c449d6c407f7);
|
|
2784
|
-
$parcel$export($b5d45cad097c69a9$exports, "safeWindow", () => $20eaf1306ff19a16$export$7dd80fbc14cd23b1);
|
|
2785
|
-
$parcel$export($b5d45cad097c69a9$exports, "safeDocument", () => $20eaf1306ff19a16$export$9aee702616bdf23c);
|
|
2786
|
-
$parcel$export($b5d45cad097c69a9$exports, "safeLocalStorage", () => $20eaf1306ff19a16$export$2aa78e70b3d79ddc);
|
|
2787
2735
|
// Utilities
|
|
2788
2736
|
const $4ae0d6a0ccb53610$export$457d6d213bf79459 = ()=>({
|
|
2789
2737
|
padding: 12,
|
|
@@ -2921,7 +2869,6 @@ const $4ae0d6a0ccb53610$export$457d6d213bf79459 = ()=>({
|
|
|
2921
2869
|
|
|
2922
2870
|
|
|
2923
2871
|
|
|
2924
|
-
|
|
2925
2872
|
var $be9c1f6b736f678e$exports = {};
|
|
2926
2873
|
var $2c570e2bb65234ea$exports = {};
|
|
2927
2874
|
|
|
@@ -2931,5 +2878,5 @@ $parcel$exportWildcard($be9c1f6b736f678e$exports, $2c570e2bb65234ea$exports);
|
|
|
2931
2878
|
|
|
2932
2879
|
|
|
2933
2880
|
|
|
2934
|
-
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
|
|
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};
|
|
2935
2882
|
//# sourceMappingURL=module.mjs.map
|