fermmap-shared 0.1.10 → 0.1.11
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 +75 -10
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +76 -11
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +25 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.mjs
CHANGED
|
@@ -2531,7 +2531,7 @@ function $db470a4073e4639a$export$f5c9f3c2c4054eec({ label: label, error: error,
|
|
|
2531
2531
|
// Reset height to recalculate
|
|
2532
2532
|
textarea.style.height = '75px';
|
|
2533
2533
|
// Set to scrollHeight (content height)
|
|
2534
|
-
const newHeight = Math.min(textarea.scrollHeight,
|
|
2534
|
+
const newHeight = Math.min(textarea.scrollHeight, safeWindow.innerHeight * 0.75 || 64);
|
|
2535
2535
|
textarea.style.height = `${newHeight}px`;
|
|
2536
2536
|
}, [
|
|
2537
2537
|
value
|
|
@@ -2574,24 +2574,82 @@ $parcel$export($b9dc9736b0835428$exports, "AxeDevTools", () => $cc88703bd59b1580
|
|
|
2574
2574
|
// Contexts & Providers
|
|
2575
2575
|
|
|
2576
2576
|
|
|
2577
|
+
/**
|
|
2578
|
+
* Safe browser API wrappers that work in SSR
|
|
2579
|
+
*/ const $20eaf1306ff19a16$export$4e09c449d6c407f7 = typeof window !== 'undefined';
|
|
2580
|
+
const $20eaf1306ff19a16$export$62858bae88b53fd0 = typeof document !== 'undefined';
|
|
2581
|
+
const $20eaf1306ff19a16$export$7dd80fbc14cd23b1 = {
|
|
2582
|
+
get innerHeight () {
|
|
2583
|
+
return $20eaf1306ff19a16$export$4e09c449d6c407f7 ? window.innerHeight : 0;
|
|
2584
|
+
},
|
|
2585
|
+
get location () {
|
|
2586
|
+
return $20eaf1306ff19a16$export$4e09c449d6c407f7 ? window.location : null;
|
|
2587
|
+
},
|
|
2588
|
+
matchMedia: (query)=>{
|
|
2589
|
+
if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return {
|
|
2590
|
+
matches: false,
|
|
2591
|
+
media: query,
|
|
2592
|
+
addEventListener: ()=>{},
|
|
2593
|
+
removeEventListener: ()=>{}
|
|
2594
|
+
};
|
|
2595
|
+
return window.matchMedia(query);
|
|
2596
|
+
},
|
|
2597
|
+
reload: ()=>{
|
|
2598
|
+
if ($20eaf1306ff19a16$export$4e09c449d6c407f7) window.location.reload();
|
|
2599
|
+
}
|
|
2600
|
+
};
|
|
2601
|
+
const $20eaf1306ff19a16$export$9aee702616bdf23c = {
|
|
2602
|
+
get documentElement () {
|
|
2603
|
+
return $20eaf1306ff19a16$export$62858bae88b53fd0 ? document.documentElement : null;
|
|
2604
|
+
},
|
|
2605
|
+
get referrer () {
|
|
2606
|
+
return $20eaf1306ff19a16$export$62858bae88b53fd0 ? document.referrer : '';
|
|
2607
|
+
},
|
|
2608
|
+
createElement: (tag)=>{
|
|
2609
|
+
return $20eaf1306ff19a16$export$62858bae88b53fd0 ? document.createElement(tag) : null;
|
|
2610
|
+
}
|
|
2611
|
+
};
|
|
2612
|
+
const $20eaf1306ff19a16$export$2aa78e70b3d79ddc = {
|
|
2613
|
+
getItem: (key)=>{
|
|
2614
|
+
if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return null;
|
|
2615
|
+
try {
|
|
2616
|
+
return localStorage.getItem(key);
|
|
2617
|
+
} catch {
|
|
2618
|
+
return null;
|
|
2619
|
+
}
|
|
2620
|
+
},
|
|
2621
|
+
setItem: (key, value)=>{
|
|
2622
|
+
if (!$20eaf1306ff19a16$export$4e09c449d6c407f7) return;
|
|
2623
|
+
try {
|
|
2624
|
+
localStorage.setItem(key, value);
|
|
2625
|
+
} catch {
|
|
2626
|
+
// Silent fail
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
};
|
|
2630
|
+
|
|
2631
|
+
|
|
2577
2632
|
const $14dac782240849bf$var$ThemeContext = /*#__PURE__*/ (0, $3A86U$createContext)(undefined);
|
|
2578
2633
|
const $14dac782240849bf$var$THEME_STORAGE_KEY = 'fermmap-theme';
|
|
2579
2634
|
// Get initial theme synchronously to prevent flicker
|
|
2580
2635
|
function $14dac782240849bf$var$getInitialTheme() {
|
|
2581
|
-
if (
|
|
2636
|
+
if (!(0, $20eaf1306ff19a16$export$4e09c449d6c407f7)) return 'light';
|
|
2582
2637
|
// First check if blocking script already set the attribute
|
|
2583
|
-
const
|
|
2584
|
-
if (
|
|
2638
|
+
const htmlElement = (0, $20eaf1306ff19a16$export$9aee702616bdf23c).documentElement;
|
|
2639
|
+
if (htmlElement) {
|
|
2640
|
+
const htmlAttribute = htmlElement.getAttribute('data-color-scheme');
|
|
2641
|
+
if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) return htmlAttribute;
|
|
2642
|
+
}
|
|
2585
2643
|
// Fallback to localStorage
|
|
2586
|
-
const stored =
|
|
2644
|
+
const stored = (0, $20eaf1306ff19a16$export$2aa78e70b3d79ddc).getItem($14dac782240849bf$var$THEME_STORAGE_KEY);
|
|
2587
2645
|
if (stored && (stored === 'light' || stored === 'dark')) return stored;
|
|
2588
2646
|
// Final fallback to system preference
|
|
2589
|
-
return
|
|
2647
|
+
return (0, $20eaf1306ff19a16$export$7dd80fbc14cd23b1).matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
2590
2648
|
}
|
|
2591
2649
|
function $14dac782240849bf$export$d8964aec282183a3({ children: children }) {
|
|
2592
2650
|
// Initialize with a function to avoid SSR issues
|
|
2593
2651
|
const [colorScheme, setColorScheme] = (0, $3A86U$useState)(()=>{
|
|
2594
|
-
if (
|
|
2652
|
+
if (!(0, $20eaf1306ff19a16$export$4e09c449d6c407f7)) return 'light';
|
|
2595
2653
|
return $14dac782240849bf$var$getInitialTheme();
|
|
2596
2654
|
});
|
|
2597
2655
|
const [mounted, setMounted] = (0, $3A86U$useState)(false);
|
|
@@ -2604,9 +2662,10 @@ function $14dac782240849bf$export$d8964aec282183a3({ children: children }) {
|
|
|
2604
2662
|
}, []);
|
|
2605
2663
|
// Update html attribute and localStorage when scheme changes
|
|
2606
2664
|
(0, $3A86U$useEffect)(()=>{
|
|
2607
|
-
if (!mounted) return;
|
|
2608
|
-
|
|
2609
|
-
|
|
2665
|
+
if (!mounted || !(0, $20eaf1306ff19a16$export$4e09c449d6c407f7)) return;
|
|
2666
|
+
const htmlElement = (0, $20eaf1306ff19a16$export$9aee702616bdf23c).documentElement;
|
|
2667
|
+
if (htmlElement) htmlElement.setAttribute('data-color-scheme', colorScheme);
|
|
2668
|
+
(0, $20eaf1306ff19a16$export$2aa78e70b3d79ddc).setItem($14dac782240849bf$var$THEME_STORAGE_KEY, colorScheme);
|
|
2610
2669
|
}, [
|
|
2611
2670
|
colorScheme,
|
|
2612
2671
|
mounted
|
|
@@ -2732,6 +2791,11 @@ var $b5d45cad097c69a9$exports = {};
|
|
|
2732
2791
|
$parcel$export($b5d45cad097c69a9$exports, "textFieldInputStyles", () => $4ae0d6a0ccb53610$export$457d6d213bf79459);
|
|
2733
2792
|
$parcel$export($b5d45cad097c69a9$exports, "getCategoryColors", () => $b413b04534c20d7d$export$2514cbae0d5c71c5);
|
|
2734
2793
|
$parcel$export($b5d45cad097c69a9$exports, "api", () => $0e62a2c35fb1f646$export$644d8ea042df96a6);
|
|
2794
|
+
$parcel$export($b5d45cad097c69a9$exports, "isBrowser", () => $20eaf1306ff19a16$export$4e09c449d6c407f7);
|
|
2795
|
+
$parcel$export($b5d45cad097c69a9$exports, "isDocument", () => $20eaf1306ff19a16$export$62858bae88b53fd0);
|
|
2796
|
+
$parcel$export($b5d45cad097c69a9$exports, "safeWindow", () => $20eaf1306ff19a16$export$7dd80fbc14cd23b1);
|
|
2797
|
+
$parcel$export($b5d45cad097c69a9$exports, "safeDocument", () => $20eaf1306ff19a16$export$9aee702616bdf23c);
|
|
2798
|
+
$parcel$export($b5d45cad097c69a9$exports, "safeLocalStorage", () => $20eaf1306ff19a16$export$2aa78e70b3d79ddc);
|
|
2735
2799
|
// Utilities
|
|
2736
2800
|
const $4ae0d6a0ccb53610$export$457d6d213bf79459 = ()=>({
|
|
2737
2801
|
padding: 12,
|
|
@@ -2869,6 +2933,7 @@ const $4ae0d6a0ccb53610$export$457d6d213bf79459 = ()=>({
|
|
|
2869
2933
|
|
|
2870
2934
|
|
|
2871
2935
|
|
|
2936
|
+
|
|
2872
2937
|
var $be9c1f6b736f678e$exports = {};
|
|
2873
2938
|
var $2c570e2bb65234ea$exports = {};
|
|
2874
2939
|
|
|
@@ -2878,5 +2943,5 @@ $parcel$exportWildcard($be9c1f6b736f678e$exports, $2c570e2bb65234ea$exports);
|
|
|
2878
2943
|
|
|
2879
2944
|
|
|
2880
2945
|
|
|
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};
|
|
2946
|
+
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
2947
|
//# sourceMappingURL=module.mjs.map
|