@ogc-maps/storybook-components 0.4.1 → 0.5.0

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.
Files changed (36) hide show
  1. package/dist/SearchPanel-DCY01Wa-.js +363 -0
  2. package/dist/components/SearchPanel/AutocompleteInput.d.ts +12 -0
  3. package/dist/components/SearchPanel/AutocompleteInput.d.ts.map +1 -0
  4. package/dist/components/SearchPanel/DateRangeInput.d.ts +11 -0
  5. package/dist/components/SearchPanel/DateRangeInput.d.ts.map +1 -0
  6. package/dist/components/SearchPanel/NumberInput.d.ts +11 -0
  7. package/dist/components/SearchPanel/NumberInput.d.ts.map +1 -0
  8. package/dist/components/SearchPanel/SearchPanel.d.ts +7 -3
  9. package/dist/components/SearchPanel/SearchPanel.d.ts.map +1 -1
  10. package/dist/components/SearchPanel/index.js +1 -1
  11. package/dist/cql2-BaKDic7B.js +288 -0
  12. package/dist/hooks/index.d.ts +3 -2
  13. package/dist/hooks/index.d.ts.map +1 -1
  14. package/dist/hooks/index.js +31 -10
  15. package/dist/hooks/useCsvExport.d.ts +2 -1
  16. package/dist/hooks/useCsvExport.d.ts.map +1 -1
  17. package/dist/index-BLgVA46J.js +2854 -0
  18. package/dist/main.js +74 -49
  19. package/dist/schemas/config.d.ts +836 -64
  20. package/dist/schemas/config.d.ts.map +1 -1
  21. package/dist/schemas/index.js +21 -2822
  22. package/dist/style.css +1 -1
  23. package/dist/types/index.d.ts +17 -3
  24. package/dist/types/index.d.ts.map +1 -1
  25. package/dist/types/index.js +20 -16
  26. package/dist/utils/__tests__/cql2.test.d.ts +2 -0
  27. package/dist/utils/__tests__/cql2.test.d.ts.map +1 -0
  28. package/dist/utils/cql2.d.ts +75 -0
  29. package/dist/utils/cql2.d.ts.map +1 -0
  30. package/dist/utils/index.d.ts +1 -0
  31. package/dist/utils/index.d.ts.map +1 -1
  32. package/dist/utils/ogcApi.d.ts +17 -0
  33. package/dist/utils/ogcApi.d.ts.map +1 -1
  34. package/package.json +4 -2
  35. package/dist/SearchPanel-B5GPX1gF.js +0 -106
  36. package/dist/useCsvExport-C4WAm7kG.js +0 -146
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--mapui-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--mapui-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--mapui-color-blue-50:oklch(97% .014 254.604);--mapui-color-blue-100:oklch(93.2% .032 255.585);--mapui-color-blue-300:oklch(80.9% .105 251.813);--mapui-color-blue-500:oklch(62.3% .214 259.815);--mapui-color-blue-600:oklch(54.6% .245 262.881);--mapui-color-blue-700:oklch(48.8% .243 264.376);--mapui-color-gray-100:oklch(96.7% .003 264.542);--mapui-color-gray-200:oklch(92.8% .006 264.531);--mapui-color-gray-300:oklch(87.2% .01 258.338);--mapui-color-gray-400:oklch(70.7% .022 261.325);--mapui-color-gray-500:oklch(55.1% .027 264.364);--mapui-color-gray-600:oklch(44.6% .03 256.802);--mapui-color-gray-700:oklch(37.3% .034 259.733);--mapui-color-gray-800:oklch(27.8% .033 256.848);--mapui-color-black:#000;--mapui-color-white:#fff;--mapui-spacing:.25rem;--mapui-container-lg:32rem;--mapui-text-xs:.75rem;--mapui-text-xs--line-height:calc(1/.75);--mapui-text-sm:.875rem;--mapui-text-sm--line-height:calc(1.25/.875);--mapui-text-lg:1.125rem;--mapui-text-lg--line-height:calc(1.75/1.125);--mapui-font-weight-medium:500;--mapui-font-weight-semibold:600;--mapui-tracking-wide:.025em;--mapui-radius-sm:.25rem;--mapui-radius-md:.375rem;--mapui-radius-lg:.5rem;--mapui-default-transition-duration:.15s;--mapui-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--mapui-default-font-family:var(--mapui-font-sans);--mapui-default-mono-font-family:var(--mapui-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--mapui-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--mapui-default-font-feature-settings,normal);font-variation-settings:var(--mapui-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--mapui-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--mapui-default-mono-font-feature-settings,normal);font-variation-settings:var(--mapui-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.mapui\:absolute{position:absolute}.mapui\:fixed{position:fixed}.mapui\:relative{position:relative}.mapui\:inset-0{inset:calc(var(--mapui-spacing)*0)}.mapui\:top-0{top:calc(var(--mapui-spacing)*0)}.mapui\:top-full{top:100%}.mapui\:right-0{right:calc(var(--mapui-spacing)*0)}.mapui\:right-full{right:100%}.mapui\:bottom-full{bottom:100%}.mapui\:z-10{z-index:10}.mapui\:z-50{z-index:50}.mapui\:m-0{margin:calc(var(--mapui-spacing)*0)}.mapui\:mt-0{margin-top:calc(var(--mapui-spacing)*0)}.mapui\:mt-1{margin-top:calc(var(--mapui-spacing)*1)}.mapui\:mt-2{margin-top:calc(var(--mapui-spacing)*2)}.mapui\:mr-2{margin-right:calc(var(--mapui-spacing)*2)}.mapui\:mb-0{margin-bottom:calc(var(--mapui-spacing)*0)}.mapui\:mb-1{margin-bottom:calc(var(--mapui-spacing)*1)}.mapui\:mb-1\.5{margin-bottom:calc(var(--mapui-spacing)*1.5)}.mapui\:mb-2{margin-bottom:calc(var(--mapui-spacing)*2)}.mapui\:contents{display:contents}.mapui\:flex{display:flex}.mapui\:grid{display:grid}.mapui\:inline-block{display:inline-block}.mapui\:inline-flex{display:inline-flex}.mapui\:h-0\.5{height:calc(var(--mapui-spacing)*.5)}.mapui\:h-3{height:calc(var(--mapui-spacing)*3)}.mapui\:h-4{height:calc(var(--mapui-spacing)*4)}.mapui\:h-6{height:calc(var(--mapui-spacing)*6)}.mapui\:h-10{height:calc(var(--mapui-spacing)*10)}.mapui\:h-12{height:calc(var(--mapui-spacing)*12)}.mapui\:max-h-\[80vh\]{max-height:80vh}.mapui\:max-h-\[calc\(100vh-4rem\)\]{max-height:calc(100vh - 4rem)}.mapui\:w-3{width:calc(var(--mapui-spacing)*3)}.mapui\:w-4{width:calc(var(--mapui-spacing)*4)}.mapui\:w-6{width:calc(var(--mapui-spacing)*6)}.mapui\:w-10{width:calc(var(--mapui-spacing)*10)}.mapui\:w-16{width:calc(var(--mapui-spacing)*16)}.mapui\:w-64{width:calc(var(--mapui-spacing)*64)}.mapui\:w-72{width:calc(var(--mapui-spacing)*72)}.mapui\:w-full{width:100%}.mapui\:max-w-\[240px\]{max-width:240px}.mapui\:max-w-lg{max-width:var(--mapui-container-lg)}.mapui\:min-w-\[140px\]{min-width:140px}.mapui\:min-w-\[160px\]{min-width:160px}.mapui\:flex-1{flex:1}.mapui\:shrink-0{flex-shrink:0}.mapui\:cursor-grab{cursor:grab}.mapui\:cursor-not-allowed{cursor:not-allowed}.mapui\:cursor-pointer{cursor:pointer}.mapui\:list-none{list-style-type:none}.mapui\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.mapui\:flex-col{flex-direction:column}.mapui\:flex-wrap{flex-wrap:wrap}.mapui\:items-center{align-items:center}.mapui\:justify-between{justify-content:space-between}.mapui\:justify-center{justify-content:center}.mapui\:gap-0\.5{gap:calc(var(--mapui-spacing)*.5)}.mapui\:gap-1{gap:calc(var(--mapui-spacing)*1)}.mapui\:gap-1\.5{gap:calc(var(--mapui-spacing)*1.5)}.mapui\:gap-2{gap:calc(var(--mapui-spacing)*2)}.mapui\:gap-3{gap:calc(var(--mapui-spacing)*3)}.mapui\:gap-4{gap:calc(var(--mapui-spacing)*4)}:where(.mapui\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.mapui\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.mapui\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.mapui\:gap-x-4{column-gap:calc(var(--mapui-spacing)*4)}.mapui\:gap-y-2{row-gap:calc(var(--mapui-spacing)*2)}.mapui\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mapui\:overflow-hidden{overflow:hidden}.mapui\:overflow-y-auto{overflow-y:auto}.mapui\:rounded{border-radius:.25rem}.mapui\:rounded-full{border-radius:3.40282e38px}.mapui\:rounded-lg{border-radius:var(--mapui-radius-lg)}.mapui\:rounded-md{border-radius:var(--mapui-radius-md)}.mapui\:rounded-sm{border-radius:var(--mapui-radius-sm)}.mapui\:border{border-style:var(--tw-border-style);border-width:1px}.mapui\:border-0{border-style:var(--tw-border-style);border-width:0}.mapui\:border-2{border-style:var(--tw-border-style);border-width:2px}.mapui\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.mapui\:border-none{--tw-border-style:none;border-style:none}.mapui\:border-blue-500{border-color:var(--mapui-color-blue-500)}.mapui\:border-gray-100{border-color:var(--mapui-color-gray-100)}.mapui\:border-gray-200{border-color:var(--mapui-color-gray-200)}.mapui\:border-gray-300{border-color:var(--mapui-color-gray-300)}.mapui\:bg-black\/40{background-color:var(--mapui-color-black)}@supports (color:color-mix(in lab,red,red)){.mapui\:bg-black\/40{background-color:color-mix(in oklab,var(--mapui-color-black)40%,transparent)}}.mapui\:bg-black\/60{background-color:var(--mapui-color-black)}@supports (color:color-mix(in lab,red,red)){.mapui\:bg-black\/60{background-color:color-mix(in oklab,var(--mapui-color-black)60%,transparent)}}.mapui\:bg-blue-50{background-color:var(--mapui-color-blue-50)}.mapui\:bg-blue-100{background-color:var(--mapui-color-blue-100)}.mapui\:bg-blue-500{background-color:var(--mapui-color-blue-500)}.mapui\:bg-gray-100{background-color:var(--mapui-color-gray-100)}.mapui\:bg-transparent{background-color:#0000}.mapui\:bg-white{background-color:var(--mapui-color-white)}.mapui\:object-cover{object-fit:cover}.mapui\:p-0{padding:calc(var(--mapui-spacing)*0)}.mapui\:p-2{padding:calc(var(--mapui-spacing)*2)}.mapui\:p-3{padding:calc(var(--mapui-spacing)*3)}.mapui\:p-4{padding:calc(var(--mapui-spacing)*4)}.mapui\:px-2{padding-inline:calc(var(--mapui-spacing)*2)}.mapui\:px-3{padding-inline:calc(var(--mapui-spacing)*3)}.mapui\:px-4{padding-inline:calc(var(--mapui-spacing)*4)}.mapui\:py-0\.5{padding-block:calc(var(--mapui-spacing)*.5)}.mapui\:py-1{padding-block:calc(var(--mapui-spacing)*1)}.mapui\:py-1\.5{padding-block:calc(var(--mapui-spacing)*1.5)}.mapui\:py-2{padding-block:calc(var(--mapui-spacing)*2)}.mapui\:py-3{padding-block:calc(var(--mapui-spacing)*3)}.mapui\:pb-2{padding-bottom:calc(var(--mapui-spacing)*2)}.mapui\:pl-1{padding-left:calc(var(--mapui-spacing)*1)}.mapui\:font-mono{font-family:var(--mapui-font-mono)}.mapui\:text-lg{font-size:var(--mapui-text-lg);line-height:var(--tw-leading,var(--mapui-text-lg--line-height))}.mapui\:text-sm{font-size:var(--mapui-text-sm);line-height:var(--tw-leading,var(--mapui-text-sm--line-height))}.mapui\:text-xs{font-size:var(--mapui-text-xs);line-height:var(--tw-leading,var(--mapui-text-xs--line-height))}.mapui\:leading-none{--tw-leading:1;line-height:1}.mapui\:font-medium{--tw-font-weight:var(--mapui-font-weight-medium);font-weight:var(--mapui-font-weight-medium)}.mapui\:font-semibold{--tw-font-weight:var(--mapui-font-weight-semibold);font-weight:var(--mapui-font-weight-semibold)}.mapui\:tracking-wide{--tw-tracking:var(--mapui-tracking-wide);letter-spacing:var(--mapui-tracking-wide)}.mapui\:break-words{overflow-wrap:break-word}.mapui\:text-blue-300{color:var(--mapui-color-blue-300)}.mapui\:text-blue-600{color:var(--mapui-color-blue-600)}.mapui\:text-blue-700{color:var(--mapui-color-blue-700)}.mapui\:text-gray-400{color:var(--mapui-color-gray-400)}.mapui\:text-gray-500{color:var(--mapui-color-gray-500)}.mapui\:text-gray-600{color:var(--mapui-color-gray-600)}.mapui\:text-gray-700{color:var(--mapui-color-gray-700)}.mapui\:text-gray-800{color:var(--mapui-color-gray-800)}.mapui\:text-white{color:var(--mapui-color-white)}.mapui\:uppercase{text-transform:uppercase}.mapui\:accent-blue-600{accent-color:var(--mapui-color-blue-600)}.mapui\:opacity-50{opacity:.5}.mapui\:opacity-100{opacity:1}.mapui\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mapui\:shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mapui\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--mapui-default-transition-timing-function));transition-duration:var(--tw-duration,var(--mapui-default-transition-duration))}.mapui\:outline-none{--tw-outline-style:none;outline-style:none}.mapui\:select-none{-webkit-user-select:none;user-select:none}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
1
+ /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--mapui-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--mapui-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--mapui-color-blue-50:oklch(97% .014 254.604);--mapui-color-blue-100:oklch(93.2% .032 255.585);--mapui-color-blue-300:oklch(80.9% .105 251.813);--mapui-color-blue-500:oklch(62.3% .214 259.815);--mapui-color-blue-600:oklch(54.6% .245 262.881);--mapui-color-blue-700:oklch(48.8% .243 264.376);--mapui-color-gray-100:oklch(96.7% .003 264.542);--mapui-color-gray-200:oklch(92.8% .006 264.531);--mapui-color-gray-300:oklch(87.2% .01 258.338);--mapui-color-gray-400:oklch(70.7% .022 261.325);--mapui-color-gray-500:oklch(55.1% .027 264.364);--mapui-color-gray-600:oklch(44.6% .03 256.802);--mapui-color-gray-700:oklch(37.3% .034 259.733);--mapui-color-gray-800:oklch(27.8% .033 256.848);--mapui-color-black:#000;--mapui-color-white:#fff;--mapui-spacing:.25rem;--mapui-container-lg:32rem;--mapui-text-xs:.75rem;--mapui-text-xs--line-height:calc(1/.75);--mapui-text-sm:.875rem;--mapui-text-sm--line-height:calc(1.25/.875);--mapui-text-lg:1.125rem;--mapui-text-lg--line-height:calc(1.75/1.125);--mapui-font-weight-medium:500;--mapui-font-weight-semibold:600;--mapui-tracking-wide:.025em;--mapui-radius-sm:.25rem;--mapui-radius-md:.375rem;--mapui-radius-lg:.5rem;--mapui-default-transition-duration:.15s;--mapui-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--mapui-default-font-family:var(--mapui-font-sans);--mapui-default-mono-font-family:var(--mapui-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--mapui-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--mapui-default-font-feature-settings,normal);font-variation-settings:var(--mapui-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--mapui-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--mapui-default-mono-font-feature-settings,normal);font-variation-settings:var(--mapui-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.mapui\:absolute{position:absolute}.mapui\:fixed{position:fixed}.mapui\:relative{position:relative}.mapui\:inset-0{inset:calc(var(--mapui-spacing)*0)}.mapui\:top-0{top:calc(var(--mapui-spacing)*0)}.mapui\:top-full{top:100%}.mapui\:right-0{right:calc(var(--mapui-spacing)*0)}.mapui\:right-full{right:100%}.mapui\:bottom-full{bottom:100%}.mapui\:z-10{z-index:10}.mapui\:z-50{z-index:50}.mapui\:m-0{margin:calc(var(--mapui-spacing)*0)}.mapui\:mt-0{margin-top:calc(var(--mapui-spacing)*0)}.mapui\:mt-1{margin-top:calc(var(--mapui-spacing)*1)}.mapui\:mt-2{margin-top:calc(var(--mapui-spacing)*2)}.mapui\:mr-2{margin-right:calc(var(--mapui-spacing)*2)}.mapui\:mb-0{margin-bottom:calc(var(--mapui-spacing)*0)}.mapui\:mb-1{margin-bottom:calc(var(--mapui-spacing)*1)}.mapui\:mb-1\.5{margin-bottom:calc(var(--mapui-spacing)*1.5)}.mapui\:mb-2{margin-bottom:calc(var(--mapui-spacing)*2)}.mapui\:contents{display:contents}.mapui\:flex{display:flex}.mapui\:grid{display:grid}.mapui\:inline-block{display:inline-block}.mapui\:inline-flex{display:inline-flex}.mapui\:h-0\.5{height:calc(var(--mapui-spacing)*.5)}.mapui\:h-3{height:calc(var(--mapui-spacing)*3)}.mapui\:h-4{height:calc(var(--mapui-spacing)*4)}.mapui\:h-6{height:calc(var(--mapui-spacing)*6)}.mapui\:h-10{height:calc(var(--mapui-spacing)*10)}.mapui\:h-12{height:calc(var(--mapui-spacing)*12)}.mapui\:max-h-48{max-height:calc(var(--mapui-spacing)*48)}.mapui\:max-h-\[80vh\]{max-height:80vh}.mapui\:max-h-\[calc\(100vh-4rem\)\]{max-height:calc(100vh - 4rem)}.mapui\:w-1\/2{width:50%}.mapui\:w-3{width:calc(var(--mapui-spacing)*3)}.mapui\:w-4{width:calc(var(--mapui-spacing)*4)}.mapui\:w-6{width:calc(var(--mapui-spacing)*6)}.mapui\:w-8{width:calc(var(--mapui-spacing)*8)}.mapui\:w-10{width:calc(var(--mapui-spacing)*10)}.mapui\:w-16{width:calc(var(--mapui-spacing)*16)}.mapui\:w-64{width:calc(var(--mapui-spacing)*64)}.mapui\:w-72{width:calc(var(--mapui-spacing)*72)}.mapui\:w-full{width:100%}.mapui\:max-w-\[240px\]{max-width:240px}.mapui\:max-w-lg{max-width:var(--mapui-container-lg)}.mapui\:min-w-12{min-width:calc(var(--mapui-spacing)*12)}.mapui\:min-w-\[140px\]{min-width:140px}.mapui\:min-w-\[160px\]{min-width:160px}.mapui\:flex-1{flex:1}.mapui\:shrink-0{flex-shrink:0}.mapui\:cursor-grab{cursor:grab}.mapui\:cursor-not-allowed{cursor:not-allowed}.mapui\:cursor-pointer{cursor:pointer}.mapui\:list-none{list-style-type:none}.mapui\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.mapui\:flex-col{flex-direction:column}.mapui\:flex-wrap{flex-wrap:wrap}.mapui\:items-center{align-items:center}.mapui\:justify-between{justify-content:space-between}.mapui\:justify-center{justify-content:center}.mapui\:gap-0\.5{gap:calc(var(--mapui-spacing)*.5)}.mapui\:gap-1{gap:calc(var(--mapui-spacing)*1)}.mapui\:gap-1\.5{gap:calc(var(--mapui-spacing)*1.5)}.mapui\:gap-2{gap:calc(var(--mapui-spacing)*2)}.mapui\:gap-3{gap:calc(var(--mapui-spacing)*3)}.mapui\:gap-4{gap:calc(var(--mapui-spacing)*4)}:where(.mapui\:space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.mapui\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.mapui\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--mapui-spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--mapui-spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.mapui\:gap-x-4{column-gap:calc(var(--mapui-spacing)*4)}.mapui\:gap-y-2{row-gap:calc(var(--mapui-spacing)*2)}.mapui\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mapui\:overflow-hidden{overflow:hidden}.mapui\:overflow-y-auto{overflow-y:auto}.mapui\:rounded{border-radius:.25rem}.mapui\:rounded-full{border-radius:3.40282e38px}.mapui\:rounded-lg{border-radius:var(--mapui-radius-lg)}.mapui\:rounded-md{border-radius:var(--mapui-radius-md)}.mapui\:rounded-sm{border-radius:var(--mapui-radius-sm)}.mapui\:border{border-style:var(--tw-border-style);border-width:1px}.mapui\:border-0{border-style:var(--tw-border-style);border-width:0}.mapui\:border-2{border-style:var(--tw-border-style);border-width:2px}.mapui\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.mapui\:border-none{--tw-border-style:none;border-style:none}.mapui\:border-blue-500{border-color:var(--mapui-color-blue-500)}.mapui\:border-gray-100{border-color:var(--mapui-color-gray-100)}.mapui\:border-gray-200{border-color:var(--mapui-color-gray-200)}.mapui\:border-gray-300{border-color:var(--mapui-color-gray-300)}.mapui\:bg-black\/40{background-color:var(--mapui-color-black)}@supports (color:color-mix(in lab,red,red)){.mapui\:bg-black\/40{background-color:color-mix(in oklab,var(--mapui-color-black)40%,transparent)}}.mapui\:bg-black\/60{background-color:var(--mapui-color-black)}@supports (color:color-mix(in lab,red,red)){.mapui\:bg-black\/60{background-color:color-mix(in oklab,var(--mapui-color-black)60%,transparent)}}.mapui\:bg-blue-50{background-color:var(--mapui-color-blue-50)}.mapui\:bg-blue-100{background-color:var(--mapui-color-blue-100)}.mapui\:bg-blue-500{background-color:var(--mapui-color-blue-500)}.mapui\:bg-gray-100{background-color:var(--mapui-color-gray-100)}.mapui\:bg-transparent{background-color:#0000}.mapui\:bg-white{background-color:var(--mapui-color-white)}.mapui\:object-cover{object-fit:cover}.mapui\:p-0{padding:calc(var(--mapui-spacing)*0)}.mapui\:p-2{padding:calc(var(--mapui-spacing)*2)}.mapui\:p-3{padding:calc(var(--mapui-spacing)*3)}.mapui\:p-4{padding:calc(var(--mapui-spacing)*4)}.mapui\:px-2{padding-inline:calc(var(--mapui-spacing)*2)}.mapui\:px-3{padding-inline:calc(var(--mapui-spacing)*3)}.mapui\:px-4{padding-inline:calc(var(--mapui-spacing)*4)}.mapui\:py-0\.5{padding-block:calc(var(--mapui-spacing)*.5)}.mapui\:py-1{padding-block:calc(var(--mapui-spacing)*1)}.mapui\:py-1\.5{padding-block:calc(var(--mapui-spacing)*1.5)}.mapui\:py-2{padding-block:calc(var(--mapui-spacing)*2)}.mapui\:py-3{padding-block:calc(var(--mapui-spacing)*3)}.mapui\:pb-2{padding-bottom:calc(var(--mapui-spacing)*2)}.mapui\:pl-1{padding-left:calc(var(--mapui-spacing)*1)}.mapui\:text-right{text-align:right}.mapui\:font-mono{font-family:var(--mapui-font-mono)}.mapui\:text-lg{font-size:var(--mapui-text-lg);line-height:var(--tw-leading,var(--mapui-text-lg--line-height))}.mapui\:text-sm{font-size:var(--mapui-text-sm);line-height:var(--tw-leading,var(--mapui-text-sm--line-height))}.mapui\:text-xs{font-size:var(--mapui-text-xs);line-height:var(--tw-leading,var(--mapui-text-xs--line-height))}.mapui\:leading-none{--tw-leading:1;line-height:1}.mapui\:font-medium{--tw-font-weight:var(--mapui-font-weight-medium);font-weight:var(--mapui-font-weight-medium)}.mapui\:font-semibold{--tw-font-weight:var(--mapui-font-weight-semibold);font-weight:var(--mapui-font-weight-semibold)}.mapui\:tracking-wide{--tw-tracking:var(--mapui-tracking-wide);letter-spacing:var(--mapui-tracking-wide)}.mapui\:break-words{overflow-wrap:break-word}.mapui\:whitespace-nowrap{white-space:nowrap}.mapui\:text-blue-300{color:var(--mapui-color-blue-300)}.mapui\:text-blue-600{color:var(--mapui-color-blue-600)}.mapui\:text-blue-700{color:var(--mapui-color-blue-700)}.mapui\:text-gray-400{color:var(--mapui-color-gray-400)}.mapui\:text-gray-500{color:var(--mapui-color-gray-500)}.mapui\:text-gray-600{color:var(--mapui-color-gray-600)}.mapui\:text-gray-700{color:var(--mapui-color-gray-700)}.mapui\:text-gray-800{color:var(--mapui-color-gray-800)}.mapui\:text-white{color:var(--mapui-color-white)}.mapui\:uppercase{text-transform:uppercase}.mapui\:accent-blue-600{accent-color:var(--mapui-color-blue-600)}.mapui\:opacity-50{opacity:.5}.mapui\:opacity-100{opacity:1}.mapui\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mapui\:shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mapui\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--mapui-default-transition-timing-function));transition-duration:var(--tw-duration,var(--mapui-default-transition-duration))}.mapui\:outline-none{--tw-outline-style:none;outline-style:none}.mapui\:select-none{-webkit-user-select:none;user-select:none}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { ViewConfigSchema, OgcApiSourceSchema, FillPaintSchema, LinePaintSchema, CirclePaintSchema, FillStyleSchema, LineStyleSchema, CircleStyleSchema, StyleConfigSchema, LegendEntrySchema, LegendConfigSchema, SearchFieldSchema, SearchConfigSchema, FilterConfigSchema, LayerConfigSchema, BasemapConfigSchema, UIConfigSchema, MapConfigSchema } from '../schemas/config';
2
+ import { ViewConfigSchema, OgcApiSourceSchema, FillPaintSchema, LinePaintSchema, CirclePaintSchema, FillStyleSchema, LineStyleSchema, CircleStyleSchema, StyleConfigSchema, LegendEntrySchema, LegendConfigSchema, TextSearchFieldSchema, NumberSearchFieldSchema, DatetimeSearchFieldSchema, SelectSearchFieldSchema, SearchFieldSchema, SearchConfigSchema, FilterConfigSchema, LayerConfigSchema, BasemapConfigSchema, UIConfigSchema, MapConfigSchema } from '../schemas/config';
3
3
  export type ViewConfig = z.infer<typeof ViewConfigSchema>;
4
4
  export type OgcApiSource = z.infer<typeof OgcApiSourceSchema>;
5
5
  export type FillPaint = z.infer<typeof FillPaintSchema>;
@@ -11,13 +11,27 @@ export type CircleStyle = z.infer<typeof CircleStyleSchema>;
11
11
  export type StyleConfig = z.infer<typeof StyleConfigSchema>;
12
12
  export type LegendEntry = z.infer<typeof LegendEntrySchema>;
13
13
  export type LegendConfig = z.infer<typeof LegendConfigSchema>;
14
+ export type TextSearchField = z.infer<typeof TextSearchFieldSchema>;
15
+ export type NumberSearchField = z.infer<typeof NumberSearchFieldSchema>;
16
+ export type DatetimeSearchField = z.infer<typeof DatetimeSearchFieldSchema>;
17
+ export type SelectSearchField = z.infer<typeof SelectSearchFieldSchema>;
14
18
  export type SearchField = z.infer<typeof SearchFieldSchema>;
15
19
  export type SearchConfig = z.infer<typeof SearchConfigSchema>;
16
- export type SearchFilterValues = Record<string, string | number | undefined>;
20
+ export type SearchFilterValue = string | number | {
21
+ start: string;
22
+ end: string;
23
+ } | {
24
+ value: number;
25
+ operator: string;
26
+ } | {
27
+ min: number;
28
+ max: number;
29
+ } | undefined;
30
+ export type SearchFilterValues = Record<string, SearchFilterValue>;
17
31
  export type FilterConfig = z.infer<typeof FilterConfigSchema>;
18
32
  export type LayerConfig = z.infer<typeof LayerConfigSchema>;
19
33
  export type BasemapConfig = z.infer<typeof BasemapConfigSchema>;
20
34
  export type UIConfig = z.infer<typeof UIConfigSchema>;
21
35
  export type MapConfig = z.infer<typeof MapConfigSchema>;
22
- export { ViewConfigSchema, OgcApiSourceSchema, FillPaintSchema, LinePaintSchema, CirclePaintSchema, FillStyleSchema, LineStyleSchema, CircleStyleSchema, StyleConfigSchema, LegendEntrySchema, LegendConfigSchema, SearchFieldSchema, SearchConfigSchema, FilterConfigSchema, LayerConfigSchema, BasemapConfigSchema, UIConfigSchema, MapConfigSchema, };
36
+ export { ViewConfigSchema, OgcApiSourceSchema, FillPaintSchema, LinePaintSchema, CirclePaintSchema, FillStyleSchema, LineStyleSchema, CircleStyleSchema, StyleConfigSchema, LegendEntrySchema, LegendConfigSchema, TextSearchFieldSchema, NumberSearchFieldSchema, DatetimeSearchFieldSchema, SelectSearchFieldSchema, SearchFieldSchema, SearchConfigSchema, FilterConfigSchema, LayerConfigSchema, BasemapConfigSchema, UIConfigSchema, MapConfigSchema, };
23
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAI3B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAA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AAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAGxD,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,eAAe,GAChB,CAAC"}
@@ -1,21 +1,25 @@
1
- import { BasemapConfigSchema as S, CirclePaintSchema as c, CircleStyleSchema as i, FillPaintSchema as h, FillStyleSchema as m, FilterConfigSchema as n, LayerConfigSchema as g, LegendConfigSchema as l, LegendEntrySchema as o, LinePaintSchema as C, LineStyleSchema as f, MapConfigSchema as r, OgcApiSourceSchema as t, SearchConfigSchema as y, SearchFieldSchema as L, StyleConfigSchema as p, UIConfigSchema as F, ViewConfigSchema as d } from "../schemas/index.js";
1
+ import { B as S, C as c, a as h, D as i, F as m, b as s, c as l, L as n, d as r, e as t, f as g, g as o, M as C, N as f, O as F, S as d, h as y, i as L, j as p, T as P, U as b, V as u } from "../index-BLgVA46J.js";
2
2
  export {
3
3
  S as BasemapConfigSchema,
4
4
  c as CirclePaintSchema,
5
- i as CircleStyleSchema,
6
- h as FillPaintSchema,
7
- m as FillStyleSchema,
8
- n as FilterConfigSchema,
9
- g as LayerConfigSchema,
10
- l as LegendConfigSchema,
11
- o as LegendEntrySchema,
12
- C as LinePaintSchema,
13
- f as LineStyleSchema,
14
- r as MapConfigSchema,
15
- t as OgcApiSourceSchema,
16
- y as SearchConfigSchema,
17
- L as SearchFieldSchema,
5
+ h as CircleStyleSchema,
6
+ i as DatetimeSearchFieldSchema,
7
+ m as FillPaintSchema,
8
+ s as FillStyleSchema,
9
+ l as FilterConfigSchema,
10
+ n as LayerConfigSchema,
11
+ r as LegendConfigSchema,
12
+ t as LegendEntrySchema,
13
+ g as LinePaintSchema,
14
+ o as LineStyleSchema,
15
+ C as MapConfigSchema,
16
+ f as NumberSearchFieldSchema,
17
+ F as OgcApiSourceSchema,
18
+ d as SearchConfigSchema,
19
+ y as SearchFieldSchema,
20
+ L as SelectSearchFieldSchema,
18
21
  p as StyleConfigSchema,
19
- F as UIConfigSchema,
20
- d as ViewConfigSchema
22
+ P as TextSearchFieldSchema,
23
+ b as UIConfigSchema,
24
+ u as ViewConfigSchema
21
25
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cql2.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cql2.test.d.ts","sourceRoot":"","sources":["../../../src/utils/__tests__/cql2.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * CQL2 JSON (OGC Common Query Language 2) types and builder utilities.
3
+ *
4
+ * CQL2 JSON spec: https://docs.ogc.org/is/21-065r2/21-065r2.html
5
+ *
6
+ * All builder functions return plain CQL2Expression objects suitable for
7
+ * JSON serialization and direct use with OGC API endpoints via the
8
+ * `filter` query parameter with `filter-lang=cql2-json`.
9
+ */
10
+ /** A reference to a feature property (column) in a CQL2 expression. */
11
+ export type CQL2PropertyRef = {
12
+ property: string;
13
+ };
14
+ /** A date literal: ISO 8601 date string "YYYY-MM-DD". */
15
+ export type CQL2Date = {
16
+ date: string;
17
+ };
18
+ /** A timestamp literal: ISO 8601 datetime string "YYYY-MM-DDTHH:MM:SSZ". */
19
+ export type CQL2Timestamp = {
20
+ timestamp: string;
21
+ };
22
+ /** A temporal interval with start and end as date/timestamp strings or "..". */
23
+ export type CQL2Interval = {
24
+ interval: [string, string];
25
+ };
26
+ /**
27
+ * A CQL2 expression node. Intentionally kept as a simple op+args structure
28
+ * rather than a complex discriminated union — builders enforce correctness
29
+ * and the type must remain JSON-serializable.
30
+ */
31
+ export type CQL2Expression = {
32
+ op: string;
33
+ args: unknown[];
34
+ };
35
+ export declare function eq(property: string, value: string | number | boolean | CQL2Date | CQL2Timestamp): CQL2Expression;
36
+ export declare function neq(property: string, value: string | number | boolean): CQL2Expression;
37
+ export declare function gt(property: string, value: number | CQL2Date | CQL2Timestamp): CQL2Expression;
38
+ export declare function gte(property: string, value: number | CQL2Date | CQL2Timestamp): CQL2Expression;
39
+ export declare function lt(property: string, value: number | CQL2Date | CQL2Timestamp): CQL2Expression;
40
+ export declare function lte(property: string, value: number | CQL2Date | CQL2Timestamp): CQL2Expression;
41
+ export declare function between(property: string, lower: number, upper: number): CQL2Expression;
42
+ /** LIKE pattern match. Use `%` as wildcard, e.g. `like('name', '%France%')`. */
43
+ export declare function like(property: string, pattern: string): CQL2Expression;
44
+ /** Checks if a property value is in a list. Named inList to avoid reserved word. */
45
+ export declare function inList(property: string, values: (string | number)[]): CQL2Expression;
46
+ export declare function isNull(property: string): CQL2Expression;
47
+ /**
48
+ * Combines expressions with AND. Filters out null/undefined entries.
49
+ * Returns null if no valid expressions remain.
50
+ */
51
+ export declare function and(...expressions: (CQL2Expression | null | undefined)[]): CQL2Expression | null;
52
+ /**
53
+ * Combines expressions with OR. Filters out null/undefined entries.
54
+ * Returns null if no valid expressions remain.
55
+ */
56
+ export declare function or(...expressions: (CQL2Expression | null | undefined)[]): CQL2Expression | null;
57
+ export declare function not(expression: CQL2Expression): CQL2Expression;
58
+ export declare function tAfter(property: string, dateOrTimestamp: CQL2Date | CQL2Timestamp): CQL2Expression;
59
+ export declare function tBefore(property: string, dateOrTimestamp: CQL2Date | CQL2Timestamp): CQL2Expression;
60
+ export declare function tDuring(property: string, start: CQL2Date | CQL2Timestamp, end: CQL2Date | CQL2Timestamp): CQL2Expression;
61
+ /**
62
+ * Converts a simple key-value filter record to a CQL2 expression.
63
+ * Each entry becomes an equality check; multiple entries are combined with AND.
64
+ * Returns null if the record is empty.
65
+ */
66
+ export declare function fromSimpleFilters(filters: Record<string, string | number>): CQL2Expression | null;
67
+ /**
68
+ * Converts structured `SearchFilterValues` (with typed shapes) to a CQL2 expression.
69
+ * Uses field configs to determine the right operator per field type.
70
+ * Returns null if no active filters remain.
71
+ */
72
+ export declare function fromStructuredFilters(filters: Record<string, import('../types').SearchFilterValue>, fields: import('../types').SearchField[]): CQL2Expression | null;
73
+ /** Serializes a CQL2 expression to a JSON string for use as a query parameter. */
74
+ export declare function serializeCql2(expr: CQL2Expression): string;
75
+ //# sourceMappingURL=cql2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cql2.d.ts","sourceRoot":"","sources":["../../src/utils/cql2.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,gFAAgF;AAChF,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB,CAAC;AAMF,wBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,GAAG,cAAc,CAEhH;AAED,wBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK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AAc,GAAG,cAAc,CAE9D;AAMD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,GAAG,aAAa,GAAG,cAAc,CAElG;AAED,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,GAAG,aAAa,GAAG,cAAc,CAEnG;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,QAAQ,GAAG,aAAa,EAC/B,GAAG,EAAE,QAAQ,GAAG,aAAa,GAC5B,cAAc,CAIhB;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GACvC,cAAc,GAAG,IAAI,CAMvB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,UAAU,EAAE,iBAAiB,CAAC,EAC7D,MAAM,EAAE,OAAO,UAAU,EAAE,WAAW,EAAE,GACvC,cAAc,GAAG,IAAI,CAwDvB;AAED,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAE1D"}
@@ -1,3 +1,4 @@
1
1
  export * from './ogcApi';
2
2
  export * from './csvExport';
3
+ export * from './cql2';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { CQL2Expression } from './cql2';
1
2
  /** A single OGC API collection. */
2
3
  export interface OgcCollection {
3
4
  id: string;
@@ -69,7 +70,10 @@ export interface FetchFeaturesOptions {
69
70
  offset?: number;
70
71
  properties?: string[];
71
72
  datetime?: string;
73
+ /** @deprecated Use cql2Filter instead. Simple key-value equality filters. */
72
74
  filter?: Record<string, string | number>;
75
+ /** CQL2 JSON filter expression. When provided, takes precedence over filter. */
76
+ cql2Filter?: CQL2Expression;
73
77
  }
74
78
  /**
75
79
  * Fetch the list of collections from an OGC API endpoint.
@@ -97,4 +101,17 @@ export declare function getVectorTileUrl(baseUrl: string, collection: string, ti
97
101
  * Returns a URL with `{z}/{x}/{y}` placeholders suitable for MapLibre.
98
102
  */
99
103
  export declare function getFilteredVectorTileUrl(baseUrl: string, collection: string, filter?: Record<string, string | number>, tileMatrixSetId?: string): string;
104
+ /**
105
+ * Fetch distinct non-null string values for a property in an OGC API collection.
106
+ * Optionally filters by a substring query using a CQL2 `like` filter.
107
+ */
108
+ export declare function fetchDistinctValues(baseUrl: string, collection: string, property: string, options?: {
109
+ query?: string;
110
+ limit?: number;
111
+ }): Promise<string[]>;
112
+ /**
113
+ * Build a vector tile URL template with a CQL2 JSON filter applied.
114
+ * Returns a URL with `{z}/{x}/{y}` placeholders suitable for MapLibre.
115
+ */
116
+ export declare function getCql2FilteredVectorTileUrl(baseUrl: string, collection: string, cql2Filter?: CQL2Expression | null, tileMatrixSetId?: string): string;
100
117
  //# sourceMappingURL=ogcApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ogcApi.d.ts","sourceRoot":"","sources":["../../src/utils/ogcApi.ts"],"names":[],"mappings":"AAIA,mCAAmC;AACnC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,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AAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3C,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBnB;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,EAClC,eAAe,GAAE,MAA0B,GAC1C,MAAM,CAUR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ogc-maps/storybook-components",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "main": "./dist/main.js",
6
6
  "publishConfig": {
@@ -76,6 +76,7 @@
76
76
  "zod": "^3.24.1"
77
77
  },
78
78
  "devDependencies": {
79
+ "vitest": "^2.1.0",
79
80
  "@chromatic-com/storybook": "^3.2.2",
80
81
  "@storybook/addon-essentials": "^8.5.0",
81
82
  "@storybook/addon-interactions": "^8.5.0",
@@ -102,6 +103,7 @@
102
103
  "dev": "vite build --watch",
103
104
  "build": "vite build",
104
105
  "storybook": "storybook dev -p 6006",
105
- "build-storybook": "storybook build"
106
+ "build-storybook": "storybook build",
107
+ "test": "vitest run"
106
108
  }
107
109
  }
@@ -1,106 +0,0 @@
1
- import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
- import { useMemo as f, useCallback as l } from "react";
3
- function C({
4
- layers: n,
5
- activeFilters: h,
6
- onFilterChange: r,
7
- onClearFilters: g,
8
- className: c = "",
9
- hideTitle: d
10
- }) {
11
- const b = f(
12
- () => n.filter((e) => {
13
- var u;
14
- return (u = e.search) == null ? void 0 : u.fields.length;
15
- }),
16
- [n]
17
- ), x = l(
18
- (e, u, m) => {
19
- r(e, u, m || void 0);
20
- },
21
- [r]
22
- ), y = l(
23
- (e, u, m) => {
24
- r(e, u, m === "" ? void 0 : Number(m));
25
- },
26
- [r]
27
- ), v = l(
28
- (e, u, m) => {
29
- r(e, u, m || void 0);
30
- },
31
- [r]
32
- );
33
- return b.length === 0 ? /* @__PURE__ */ t("div", { className: `mapui:flex mapui:flex-col mapui:gap-1 ${c}`.trim(), children: [
34
- !d && /* @__PURE__ */ i("h3", { className: "mapui:m-0 mapui:mb-2 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Search & Filter" }),
35
- /* @__PURE__ */ i("p", { className: "mapui:m-0 mapui:text-xs mapui:text-gray-500", children: "No searchable layers configured." })
36
- ] }) : /* @__PURE__ */ t("div", { className: `mapui:flex mapui:flex-col mapui:gap-3 ${c}`.trim(), children: [
37
- !d && /* @__PURE__ */ i("h3", { className: "mapui:m-0 mapui:mb-2 mapui:text-sm mapui:font-semibold mapui:text-gray-700", children: "Search & Filter" }),
38
- b.map((e) => {
39
- const u = h[e.id] ?? {}, m = Object.values(u).some((a) => a !== void 0);
40
- return /* @__PURE__ */ t("div", { className: "mapui:flex mapui:flex-col mapui:gap-2 mapui:border-b mapui:border-gray-100 mapui:pb-2 last:mapui:border-0", children: [
41
- /* @__PURE__ */ t("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
42
- /* @__PURE__ */ i("span", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: e.label }),
43
- m && /* @__PURE__ */ i(
44
- "button",
45
- {
46
- type: "button",
47
- onClick: () => g(e.id),
48
- className: "mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:p-0 mapui:text-xs mapui:text-blue-600 hover:mapui:text-blue-800",
49
- children: "Clear"
50
- }
51
- )
52
- ] }),
53
- e.search.fields.map((a) => {
54
- const o = u[a.property], s = a.options;
55
- return /* @__PURE__ */ t("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
56
- /* @__PURE__ */ i("label", { className: "mapui:text-xs mapui:text-gray-500", children: a.label }),
57
- a.type === "text" && /* @__PURE__ */ i(
58
- "input",
59
- {
60
- type: "text",
61
- value: o ?? "",
62
- placeholder: a.placeholder ?? "",
63
- onChange: (p) => x(e.id, a.property, p.target.value),
64
- className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500"
65
- }
66
- ),
67
- a.type === "number" && /* @__PURE__ */ i(
68
- "input",
69
- {
70
- type: "number",
71
- value: o ?? "",
72
- placeholder: a.placeholder ?? "",
73
- onChange: (p) => y(e.id, a.property, p.target.value),
74
- className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500"
75
- }
76
- ),
77
- a.type === "datetime" && /* @__PURE__ */ i(
78
- "input",
79
- {
80
- type: "datetime-local",
81
- value: o ?? "",
82
- onChange: (p) => x(e.id, a.property, p.target.value),
83
- className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500"
84
- }
85
- ),
86
- a.type === "select" && /* @__PURE__ */ t(
87
- "select",
88
- {
89
- value: o ?? "",
90
- onChange: (p) => v(e.id, a.property, p.target.value),
91
- className: "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500",
92
- children: [
93
- /* @__PURE__ */ i("option", { value: "", children: a.placeholder ?? "Select..." }),
94
- s == null ? void 0 : s.map((p) => /* @__PURE__ */ i("option", { value: p, children: p }, p))
95
- ]
96
- }
97
- )
98
- ] }, a.property);
99
- })
100
- ] }, e.id);
101
- })
102
- ] });
103
- }
104
- export {
105
- C as S
106
- };
@@ -1,146 +0,0 @@
1
- import { useState as d, useEffect as j, useCallback as w } from "react";
2
- function b(e) {
3
- return e.endsWith("/") ? e.slice(0, -1) : e;
4
- }
5
- async function C(e) {
6
- const n = await fetch(e);
7
- if (!n.ok)
8
- throw new Error(`OGC API request failed: ${n.status} ${n.statusText} (${e})`);
9
- return n.json();
10
- }
11
- async function R(e) {
12
- const n = `${b(e)}/collections?f=json`;
13
- return (await C(n)).collections;
14
- }
15
- async function S(e, n, t = {}) {
16
- var c;
17
- const r = b(e), s = new URLSearchParams({ f: "geojson" });
18
- if (t.limit != null && s.set("limit", String(t.limit)), t.offset != null && s.set("offset", String(t.offset)), t.bbox && s.set("bbox", t.bbox.join(",")), (c = t.properties) != null && c.length && s.set("properties", t.properties.join(",")), t.datetime && s.set("datetime", t.datetime), t.filter)
19
- for (const [a, o] of Object.entries(t.filter))
20
- s.set(a, String(o));
21
- const i = `${r}/collections/${encodeURIComponent(n)}/items?${s}`;
22
- return C(i);
23
- }
24
- async function k(e, n) {
25
- const r = `${b(e)}/collections/${encodeURIComponent(n)}/queryables?f=schemajson`;
26
- return C(r);
27
- }
28
- function v(e, n, t = "WebMercatorQuad") {
29
- return `${b(e)}/collections/${encodeURIComponent(n)}/tiles/${encodeURIComponent(t)}/tilejson.json`;
30
- }
31
- function L(e, n, t = "WebMercatorQuad") {
32
- return `${b(e)}/collections/${encodeURIComponent(n)}/tiles/${encodeURIComponent(t)}/{z}/{x}/{y}`;
33
- }
34
- function I(e, n, t, r = "WebMercatorQuad") {
35
- const i = `${b(e)}/collections/${encodeURIComponent(n)}/tiles/${encodeURIComponent(r)}/{z}/{x}/{y}`;
36
- if (!t || Object.keys(t).length === 0) return i;
37
- const c = new URLSearchParams();
38
- for (const [a, o] of Object.entries(t))
39
- c.set(a, String(o));
40
- return `${i}?${c}`;
41
- }
42
- function J(e) {
43
- const [n, t] = d([]), [r, s] = d(!1), [i, c] = d(null);
44
- return j(() => {
45
- if (!e) return;
46
- let a = !1;
47
- return s(!0), c(null), R(e).then((o) => {
48
- a || t(o);
49
- }).catch((o) => {
50
- a || c(o instanceof Error ? o : new Error(String(o)));
51
- }).finally(() => {
52
- a || s(!1);
53
- }), () => {
54
- a = !0;
55
- };
56
- }, [e]), { collections: n, loading: r, error: i };
57
- }
58
- function T(e, n, t = {}) {
59
- const [r, s] = d([]), [i, c] = d(!1), [a, o] = d(null), [g, f] = d(!1), p = JSON.stringify(t);
60
- return j(() => {
61
- if (!e || !n) return;
62
- let h = !1;
63
- c(!0), o(null);
64
- const u = JSON.parse(p);
65
- return S(e, n, u).then((l) => {
66
- if (!h) {
67
- s(l.features);
68
- const y = u.limit ?? 10, m = u.offset ?? 0;
69
- l.numberMatched != null ? f(m + l.features.length < l.numberMatched) : f(l.features.length >= y);
70
- }
71
- }).catch((l) => {
72
- h || (o(l instanceof Error ? l : new Error(String(l))), s([]), f(!1));
73
- }).finally(() => {
74
- h || c(!1);
75
- }), () => {
76
- h = !0;
77
- };
78
- }, [e, n, p]), { features: r, loading: i, error: a, hasMore: g };
79
- }
80
- function $(e, n) {
81
- return e.includes('"') || e.includes(n) || e.includes(`
82
- `) ? `"${e.replace(/"/g, '""')}"` : e;
83
- }
84
- function E(e, n) {
85
- const t = (e.properties ?? {})[n];
86
- return t == null ? "" : typeof t == "object" ? JSON.stringify(t) : String(t);
87
- }
88
- function U(e, n = {}) {
89
- const { fields: t, includeGeometry: r = !1, delimiter: s = "," } = n;
90
- if (e.length === 0) return "";
91
- const i = t ?? [...new Set(e.flatMap((o) => Object.keys(o.properties ?? {})))], c = r ? [...i, "geometry"] : i, a = e.map((o) => {
92
- const g = i.map(
93
- (f) => $(E(o, f), s)
94
- );
95
- return r && g.push($(JSON.stringify(o.geometry), s)), g.join(s);
96
- });
97
- return [c.map((o) => $(o, s)).join(s), ...a].join(`
98
- `);
99
- }
100
- function M(e, n) {
101
- const t = new Blob([e], { type: "text/csv;charset=utf-8;" }), r = URL.createObjectURL(t), s = document.createElement("a");
102
- s.href = r, s.download = n, s.style.display = "none", document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(r);
103
- }
104
- function z({
105
- baseUrl: e,
106
- limit: n = 1e3,
107
- csvOptions: t
108
- }) {
109
- const [r, s] = d(!1), [i, c] = d(null);
110
- return { exportCsv: w(
111
- async (o, g = `${o}.csv`) => {
112
- s(!0), c(null);
113
- const f = [], p = Math.min(n, 1e3);
114
- let h = 0;
115
- try {
116
- for (; f.length < n; ) {
117
- const l = n - f.length, y = Math.min(p, l), m = await S(e, o, {
118
- limit: y,
119
- offset: h
120
- });
121
- if (f.push(...m.features), h += m.features.length, m.features.length < y || m.numberMatched != null && h >= m.numberMatched) break;
122
- }
123
- const u = U(f, t);
124
- M(u, g);
125
- } catch (u) {
126
- c(u instanceof Error ? u : new Error(String(u)));
127
- } finally {
128
- s(!1);
129
- }
130
- },
131
- [e, n, t]
132
- ), loading: r, error: i };
133
- }
134
- export {
135
- S as a,
136
- k as b,
137
- v as c,
138
- L as d,
139
- J as e,
140
- R as f,
141
- I as g,
142
- T as h,
143
- M as i,
144
- U as j,
145
- z as u
146
- };