@manafishrov/ui 1.5.8 → 1.5.9
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/Locale.js +1 -1
- package/dist/components/Accordion.js +2 -2
- package/dist/components/AlertDialog.js +2 -2
- package/dist/components/AspectRatio.js +1 -1
- package/dist/components/Avatar.js +2 -2
- package/dist/components/Badge.js +1 -1
- package/dist/components/Breadcrumb.js +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/Card.js +1 -1
- package/dist/components/Carousel.js +2 -2
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/Collapsible.js +2 -2
- package/dist/components/Combobox.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/Dialog.js +2 -2
- package/dist/components/Empty.js +1 -1
- package/dist/components/Field.js +3 -3
- package/dist/components/HoverCard.js +2 -2
- package/dist/components/InputGroup.js +1 -1
- package/dist/components/Item.js +1 -1
- package/dist/components/Kbd.js +1 -1
- package/dist/components/Link.js +1 -1
- package/dist/components/Menu.js +2 -2
- package/dist/components/MenuCombobox.js +2 -2
- package/dist/components/MenuComboboxList.js +3 -3
- package/dist/components/MenuComboboxList.js.map +1 -1
- package/dist/components/NavigationMenu.js +2 -2
- package/dist/components/NumberInput.js +2 -2
- package/dist/components/Pagination.js +2 -2
- package/dist/components/PasswordInput.js +2 -2
- package/dist/components/PinInput.js +2 -2
- package/dist/components/Popover.js +2 -2
- package/dist/components/Progress.js +2 -2
- package/dist/components/RadioGroup.js +2 -2
- package/dist/components/ScrollArea.js +2 -2
- package/dist/components/Select.js +2 -2
- package/dist/components/Separator.js +1 -1
- package/dist/components/Sheet.js +2 -2
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/Slider.js +3 -3
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Splitter.js +2 -2
- package/dist/components/Swap.js +2 -2
- package/dist/components/Switch.js +2 -2
- package/dist/components/Table.js +1 -1
- package/dist/components/Tabs.js +2 -2
- package/dist/components/TagsInput.js +2 -2
- package/dist/components/TextInput.js +2 -2
- package/dist/components/Toggle.js +3 -3
- package/dist/components/Tooltip.js +2 -2
- package/dist/components/TreeView.js +3 -3
- package/dist/components/Typography.js +1 -1
- package/dist/components/form/AutoSubmit.js +1 -1
- package/dist/components/form/AutoSubmit.js.map +1 -1
- package/dist/components/form/Form.js +1 -1
- package/dist/components/marquee/Marquee.js +2 -2
- package/dist/components/sidebar/SidebarDesktop.js +1 -1
- package/dist/components/sidebar/SidebarMenu.js +2 -2
- package/dist/components/sidebar/SidebarProvider.js +1 -1
- package/dist/components/sidebar/SidebarSubComponents.js +1 -1
- package/dist/components/toaster/Toaster.js +2 -2
- package/dist/index.js +11 -11
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/24WXBTEA.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/24WXBTEA.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/262SJY3P.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/262SJY3P.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/4YNGVMW2.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/4YNGVMW2.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/5BSMJBO7.js +2 -2
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/5BSMJBO7.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/6P2AQNUE.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/6P2AQNUE.js.map +1 -1
- package/dist/node_modules/.bun/@ark-ui_solid@5.37.1_ee58d66d663bac7b/node_modules/@ark-ui/solid/dist/chunk/6WEDGJKQ.js +7 -0
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/6WEDGJKQ.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/7CKWCVWS.js +2 -2
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/7CKWCVWS.js.map +1 -1
- package/dist/node_modules/.bun/@ark-ui_solid@5.37.1_ee58d66d663bac7b/node_modules/@ark-ui/solid/dist/chunk/7IUG3E2V.js +11 -0
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/7IUG3E2V.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/7TJ23CV6.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/7TJ23CV6.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/7ZWSMUDG.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/7ZWSMUDG.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/ABFLCPUB.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/ABFLCPUB.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/ACLCLMIV.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/ACLCLMIV.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/B4FK2JQ2.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/B4FK2JQ2.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/BRHQTJMC.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/BRHQTJMC.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/BYLUEJKC.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/BYLUEJKC.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/DK7UDQTF.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/DK7UDQTF.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/EFII6TXL.js +2 -2
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/EFII6TXL.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/EIL4Q3B2.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/EIL4Q3B2.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/EQKTJ63X.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/EQKTJ63X.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/F42QOCL3.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/F42QOCL3.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/FDUCX4MC.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/FDUCX4MC.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/GQGTRTK7.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/GQGTRTK7.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/GSOOONDM.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/GSOOONDM.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/GYKEGNPI.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/GYKEGNPI.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/HDGILMRT.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/HDGILMRT.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/HOPBYFHD.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/HOPBYFHD.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/HRY5AU2J.js +2 -2
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/HRY5AU2J.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/JCNWK3IN.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/JCNWK3IN.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/JFFM62IG.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/JFFM62IG.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/KD4YD745.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/KD4YD745.js.map +1 -1
- package/dist/node_modules/.bun/@ark-ui_solid@5.37.1_ee58d66d663bac7b/node_modules/@ark-ui/solid/dist/chunk/KGOB2IMX.js +6 -0
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/KGOB2IMX.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/KNU3M6A2.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/KNU3M6A2.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/LESIO3YG.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/LESIO3YG.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/LXG74MYL.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/LXG74MYL.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/M2R7NELL.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/M2R7NELL.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/MGY733CD.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/MGY733CD.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/MLPK6MO2.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/MLPK6MO2.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/MPLFL3UT.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/MPLFL3UT.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/MU5CM6ZP.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/MU5CM6ZP.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/NCE6DH5U.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/NCE6DH5U.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/NEU4F4NG.js +2 -2
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/NEU4F4NG.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/OEGORBLT.js +3 -3
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/OEGORBLT.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/OWH3LOUE.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/OWH3LOUE.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/PT2CJE3O.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/PT2CJE3O.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/RKHQFO6B.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/RKHQFO6B.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/T7LMRH7K.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/T7LMRH7K.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/TD72MSSI.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/TD72MSSI.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/TG3BV4FJ.js +5 -5
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/TG3BV4FJ.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/TPQNIWB6.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/TPQNIWB6.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/TPTP4FRI.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/TPTP4FRI.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/UFYZ7HLU.js +2 -2
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/UFYZ7HLU.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/UZJJWJQM.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/UZJJWJQM.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/VNMGX67M.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/VNMGX67M.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/VQPWR4W5.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/VQPWR4W5.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/WZBYH43M.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/WZBYH43M.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/X4OUYL6X.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/X4OUYL6X.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/XRMLYMEN.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/XRMLYMEN.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/XVU3GCCX.js +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/XVU3GCCX.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/YW4KS3S5.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/YW4KS3S5.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/ZJ6ILZ5N.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/ZJ6ILZ5N.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/ZOCG4ZHL.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/chunk/ZOCG4ZHL.js.map +1 -1
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/components/navigation-menu/index.js +4 -4
- package/dist/node_modules/.bun/{@ark-ui_solid@5.37.1_da624007e3df32b4 → @ark-ui_solid@5.37.1_ee58d66d663bac7b}/node_modules/@ark-ui/solid/dist/components/navigation-menu/index.js.map +1 -1
- package/dist/node_modules/.bun/{@floating-ui_core@1.7.5 → @floating-ui_core@1.8.0}/node_modules/@floating-ui/core/dist/floating-ui.core.js +30 -50
- package/dist/node_modules/.bun/@floating-ui_core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/.bun/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +324 -0
- package/dist/node_modules/.bun/@floating-ui_dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/.bun/{@floating-ui_utils@0.2.11 → @floating-ui_utils@0.2.12}/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
- package/dist/node_modules/.bun/{@floating-ui_utils@0.2.11 → @floating-ui_utils@0.2.12}/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -1
- package/dist/node_modules/.bun/{@floating-ui_utils@0.2.11 → @floating-ui_utils@0.2.12}/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +5 -6
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/.bun/{@solid-primitives_keyed@1.5.3_da624007e3df32b4 → @solid-primitives_keyed@1.5.3_ee58d66d663bac7b}/node_modules/@solid-primitives/keyed/dist/index.js +1 -1
- package/dist/node_modules/.bun/{@solid-primitives_keyed@1.5.3_da624007e3df32b4 → @solid-primitives_keyed@1.5.3_ee58d66d663bac7b}/node_modules/@solid-primitives/keyed/dist/index.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_checkbox@1.41.2/node_modules/@zag-js/checkbox/dist/checkbox.machine.js +1 -1
- package/dist/node_modules/.bun/@zag-js_checkbox@1.41.2/node_modules/@zag-js/checkbox/dist/checkbox.machine.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_collection@1.41.2/node_modules/@zag-js/collection/dist/list-collection.js +2 -2
- package/dist/node_modules/.bun/@zag-js_collection@1.41.2/node_modules/@zag-js/collection/dist/list-collection.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_combobox@1.41.2/node_modules/@zag-js/combobox/dist/combobox.machine.js +1 -1
- package/dist/node_modules/.bun/@zag-js_combobox@1.41.2/node_modules/@zag-js/combobox/dist/combobox.machine.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_date-utils@1.41.2_3f114a46406f1e64/node_modules/@zag-js/date-utils/dist/locale.js +1 -1
- package/dist/node_modules/.bun/@zag-js_date-utils@1.41.2_3f114a46406f1e64/node_modules/@zag-js/date-utils/dist/locale.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_dialog@1.41.2/node_modules/@zag-js/dialog/dist/dialog.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_dialog@1.41.2/node_modules/@zag-js/dialog/dist/dialog.connect.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_dialog@1.41.2/node_modules/@zag-js/dialog/dist/dialog.machine.js +1 -1
- package/dist/node_modules/.bun/@zag-js_dialog@1.41.2/node_modules/@zag-js/dialog/dist/dialog.machine.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_focus-trap@1.41.2/node_modules/@zag-js/focus-trap/dist/focus-trap.js +3 -3
- package/dist/node_modules/.bun/@zag-js_focus-trap@1.41.2/node_modules/@zag-js/focus-trap/dist/focus-trap.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_hover-card@1.41.2/node_modules/@zag-js/hover-card/dist/hover-card.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_hover-card@1.41.2/node_modules/@zag-js/hover-card/dist/hover-card.connect.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_menu@1.41.2/node_modules/@zag-js/menu/dist/menu.connect.js +2 -2
- package/dist/node_modules/.bun/@zag-js_menu@1.41.2/node_modules/@zag-js/menu/dist/menu.connect.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_pin-input@1.41.2/node_modules/@zag-js/pin-input/dist/pin-input.utils.js +1 -1
- package/dist/node_modules/.bun/@zag-js_pin-input@1.41.2/node_modules/@zag-js/pin-input/dist/pin-input.utils.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_popover@1.41.2/node_modules/@zag-js/popover/dist/popover.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_popover@1.41.2/node_modules/@zag-js/popover/dist/popover.connect.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_popper@1.41.2/node_modules/@zag-js/popper/dist/get-placement.js +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/bindable.js +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/bindable.js.map +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/machine.js +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/machine.js.map +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/merge-props.js +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/merge-props.js.map +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/normalize-props.js +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/normalize-props.js.map +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/refs.js +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/refs.js.map +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/track.js +1 -1
- package/dist/node_modules/.bun/{@zag-js_solid@1.41.2_da624007e3df32b4 → @zag-js_solid@1.41.2_ee58d66d663bac7b}/node_modules/@zag-js/solid/dist/track.js.map +1 -1
- package/dist/node_modules/.bun/@zag-js_tooltip@1.41.2/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +1 -1
- package/dist/node_modules/.bun/@zag-js_tooltip@1.41.2/node_modules/@zag-js/tooltip/dist/tooltip.connect.js.map +1 -1
- package/dist/node_modules/.bun/{tailwind-variants@3.2.2_353585be07126f0c → tailwind-variants@3.2.2_836190697928d5d4}/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js +1 -1
- package/dist/node_modules/.bun/{tailwind-variants@3.2.2_353585be07126f0c → tailwind-variants@3.2.2_836190697928d5d4}/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js.map +1 -1
- package/dist/node_modules/.bun/{tailwind-variants@3.2.2_353585be07126f0c → tailwind-variants@3.2.2_836190697928d5d4}/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js +1 -1
- package/dist/node_modules/.bun/{tailwind-variants@3.2.2_353585be07126f0c → tailwind-variants@3.2.2_836190697928d5d4}/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js.map +1 -1
- package/dist/node_modules/.bun/{tailwind-variants@3.2.2_353585be07126f0c → tailwind-variants@3.2.2_836190697928d5d4}/node_modules/tailwind-variants/dist/index.js +1 -1
- package/dist/node_modules/.bun/{tailwind-variants@3.2.2_353585be07126f0c → tailwind-variants@3.2.2_836190697928d5d4}/node_modules/tailwind-variants/dist/index.js.map +1 -1
- package/dist/paraglide/messages/_index.d.ts +2 -1
- package/dist/paraglide/messages/ui_breadcrumb_label.d.ts +3 -3
- package/dist/paraglide/messages/ui_carousel_next.d.ts +3 -3
- package/dist/paraglide/messages/ui_carousel_previous.d.ts +3 -3
- package/dist/paraglide/messages/ui_checkbox_checked.d.ts +3 -3
- package/dist/paraglide/messages/ui_common_close.d.ts +3 -3
- package/dist/paraglide/messages/ui_common_loading.d.ts +3 -3
- package/dist/paraglide/messages/ui_common_more.d.ts +3 -3
- package/dist/paraglide/messages/ui_pagination_more.d.ts +3 -3
- package/dist/paraglide/messages/ui_pagination_next.d.ts +3 -3
- package/dist/paraglide/messages/ui_pagination_previous.d.ts +3 -3
- package/dist/paraglide/messages/ui_sidebar_description.d.ts +3 -3
- package/dist/paraglide/messages/ui_sidebar_title.d.ts +3 -3
- package/dist/paraglide/messages/ui_sidebar_toggle.d.ts +3 -3
- package/dist/paraglide/messages/ui_skeleton_loading.d.ts +3 -3
- package/dist/paraglide/runtime.d.ts +492 -273
- package/package.json +3 -3
- package/src/components/form/AutoSubmit.tsx +2 -2
- package/dist/node_modules/.bun/@ark-ui_solid@5.37.1_da624007e3df32b4/node_modules/@ark-ui/solid/dist/chunk/6WEDGJKQ.js +0 -7
- package/dist/node_modules/.bun/@ark-ui_solid@5.37.1_da624007e3df32b4/node_modules/@ark-ui/solid/dist/chunk/7IUG3E2V.js +0 -11
- package/dist/node_modules/.bun/@ark-ui_solid@5.37.1_da624007e3df32b4/node_modules/@ark-ui/solid/dist/chunk/KGOB2IMX.js +0 -6
- package/dist/node_modules/.bun/@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
- package/dist/node_modules/.bun/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -330
- package/dist/node_modules/.bun/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
- package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
|
@@ -1,3 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The project's base locale.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* if (locale === baseLocale) {
|
|
6
|
+
* // do something
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export declare const baseLocale = "en-gb";
|
|
10
|
+
/**
|
|
11
|
+
* The project's locales that have been specified in the settings.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* if (locales.includes(userSelectedLocale) === false) {
|
|
15
|
+
* throw new Error('Locale is not available');
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
export declare const locales: readonly ["en-gb", "nb"];
|
|
19
|
+
/** @type {string} */
|
|
20
|
+
export declare const cookieName: string;
|
|
21
|
+
/** @type {number} */
|
|
22
|
+
export declare const cookieMaxAge: number;
|
|
23
|
+
/** @type {string} */
|
|
24
|
+
export declare const cookieDomain: string;
|
|
25
|
+
/** @type {string} */
|
|
26
|
+
export declare const localStorageKey: string;
|
|
27
|
+
/**
|
|
28
|
+
* @type {Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage" | `custom-${string}`>}
|
|
29
|
+
*/
|
|
30
|
+
export declare const strategy: Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage" | `custom-${string}`>;
|
|
31
|
+
/**
|
|
32
|
+
* Route-level strategy overrides.
|
|
33
|
+
*
|
|
34
|
+
* `match` uses URLPattern syntax.
|
|
35
|
+
*
|
|
36
|
+
* @type {Array<{
|
|
37
|
+
* match: string;
|
|
38
|
+
* strategy?: Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage" | `custom-${string}`>;
|
|
39
|
+
* exclude?: boolean;
|
|
40
|
+
* }>}
|
|
41
|
+
*/
|
|
42
|
+
export declare const routeStrategies: Array<{
|
|
43
|
+
match: string;
|
|
44
|
+
strategy?: Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage" | `custom-${string}`>;
|
|
45
|
+
exclude?: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* The used URL patterns.
|
|
49
|
+
*
|
|
50
|
+
* @type {Array<{ pattern: string, localized: Array<[Locale, string]> }>}
|
|
51
|
+
*/
|
|
52
|
+
export declare const urlPatterns: Array<{
|
|
53
|
+
pattern: string;
|
|
54
|
+
localized: Array<[Locale, string]>;
|
|
55
|
+
}>;
|
|
1
56
|
/**
|
|
2
57
|
* Returns the strategy to use for a specific URL.
|
|
3
58
|
*
|
|
@@ -7,14 +62,51 @@
|
|
|
7
62
|
* @param {string | URL} url
|
|
8
63
|
* @returns {typeof strategy}
|
|
9
64
|
*/
|
|
10
|
-
export function getStrategyForUrl(url: string | URL): typeof strategy;
|
|
65
|
+
export declare function getStrategyForUrl(url: string | URL): typeof strategy;
|
|
11
66
|
/**
|
|
12
67
|
* Returns whether the given URL is excluded from middleware i18n processing.
|
|
13
68
|
*
|
|
14
69
|
* @param {string | URL} url
|
|
15
70
|
* @returns {boolean}
|
|
16
71
|
*/
|
|
17
|
-
export function isExcludedByRouteStrategy(url: string | URL): boolean;
|
|
72
|
+
export declare function isExcludedByRouteStrategy(url: string | URL): boolean;
|
|
73
|
+
export type ParaglideAsyncLocalStorage = {
|
|
74
|
+
getStore(): {
|
|
75
|
+
locale?: Locale;
|
|
76
|
+
origin?: string;
|
|
77
|
+
messageCalls?: Set<string>;
|
|
78
|
+
} | undefined;
|
|
79
|
+
run: (store: {
|
|
80
|
+
locale?: Locale;
|
|
81
|
+
origin?: string;
|
|
82
|
+
messageCalls?: Set<string>;
|
|
83
|
+
}, cb: any) => any;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* @typedef {{
|
|
87
|
+
* getStore(): {
|
|
88
|
+
* locale?: Locale,
|
|
89
|
+
* origin?: string,
|
|
90
|
+
* messageCalls?: Set<string>
|
|
91
|
+
* } | undefined,
|
|
92
|
+
* run: (store: { locale?: Locale, origin?: string, messageCalls?: Set<string>},
|
|
93
|
+
* cb: any) => any
|
|
94
|
+
* }} ParaglideAsyncLocalStorage
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* Server side async local storage that is set by `serverMiddleware()`.
|
|
98
|
+
*
|
|
99
|
+
* The variable is used to retrieve the locale and origin in a server-side
|
|
100
|
+
* rendering context without effecting other requests.
|
|
101
|
+
*
|
|
102
|
+
* @type {ParaglideAsyncLocalStorage | undefined}
|
|
103
|
+
*/
|
|
104
|
+
export declare let serverAsyncLocalStorage: ParaglideAsyncLocalStorage | undefined;
|
|
105
|
+
export declare const disableAsyncLocalStorage = false;
|
|
106
|
+
export declare const experimentalMiddlewareLocaleSplitting = false;
|
|
107
|
+
export declare const isServer: any;
|
|
108
|
+
/** @type {Locale | undefined} */
|
|
109
|
+
export declare const experimentalStaticLocale: Locale | undefined;
|
|
18
110
|
/**
|
|
19
111
|
* Sets the server side async local storage.
|
|
20
112
|
*
|
|
@@ -25,14 +117,49 @@ export function isExcludedByRouteStrategy(url: string | URL): boolean;
|
|
|
25
117
|
*
|
|
26
118
|
* @param {ParaglideAsyncLocalStorage | undefined} value
|
|
27
119
|
*/
|
|
28
|
-
export function overwriteServerAsyncLocalStorage(value: ParaglideAsyncLocalStorage | undefined): void;
|
|
120
|
+
export declare function overwriteServerAsyncLocalStorage(value: ParaglideAsyncLocalStorage | undefined): void;
|
|
121
|
+
/**
|
|
122
|
+
* Get the current locale.
|
|
123
|
+
*
|
|
124
|
+
* The locale is resolved using your configured strategies (URL, cookie, localStorage, etc.)
|
|
125
|
+
* in the order they are defined. In SSR contexts, the locale is retrieved from AsyncLocalStorage
|
|
126
|
+
* which is set by the `paraglideMiddleware()`.
|
|
127
|
+
*
|
|
128
|
+
* @see https://paraglidejs.com/strategy - Configure locale detection strategies
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* if (getLocale() === 'de') {
|
|
132
|
+
* console.log('Germany 🇩🇪');
|
|
133
|
+
* } else if (getLocale() === 'nl') {
|
|
134
|
+
* console.log('Netherlands 🇳🇱');
|
|
135
|
+
* }
|
|
136
|
+
*
|
|
137
|
+
* @returns {Locale} The current locale.
|
|
138
|
+
*/
|
|
139
|
+
export declare let getLocale: () => Locale;
|
|
29
140
|
/**
|
|
30
141
|
* Resolve locale for a given URL using route-aware strategies.
|
|
31
142
|
*
|
|
32
143
|
* @param {string | URL} url
|
|
33
144
|
* @returns {Locale}
|
|
34
145
|
*/
|
|
35
|
-
export function getLocaleForUrl(url: string | URL): Locale;
|
|
146
|
+
export declare function getLocaleForUrl(url: string | URL): Locale;
|
|
147
|
+
/**
|
|
148
|
+
* Overwrite the `getLocale()` function.
|
|
149
|
+
*
|
|
150
|
+
* Use this function to overwrite how the locale is resolved. This is useful
|
|
151
|
+
* for custom locale resolution or advanced use cases like SSG with concurrent rendering.
|
|
152
|
+
*
|
|
153
|
+
* @see https://paraglidejs.com/strategy
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* overwriteGetLocale(() => {
|
|
157
|
+
* return Cookies.get('locale') ?? baseLocale
|
|
158
|
+
* });
|
|
159
|
+
*
|
|
160
|
+
* @param {() => Locale} fn - The new implementation for `getLocale()`.
|
|
161
|
+
*/
|
|
162
|
+
export declare const overwriteGetLocale: (fn: () => Locale) => void;
|
|
36
163
|
/**
|
|
37
164
|
* Get writing direction for a locale.
|
|
38
165
|
*
|
|
@@ -47,14 +174,76 @@ export function getLocaleForUrl(url: string | URL): Locale;
|
|
|
47
174
|
* @param {string} [locale] - Target locale. If not provided, uses `getLocale()`
|
|
48
175
|
* @returns {"ltr" | "rtl"}
|
|
49
176
|
*/
|
|
50
|
-
export function getTextDirection(locale?: string): "ltr" | "rtl";
|
|
177
|
+
export declare function getTextDirection(locale?: string): "ltr" | "rtl";
|
|
178
|
+
export type SetLocaleFn = (newLocale: Locale, options?: {
|
|
179
|
+
reload?: boolean;
|
|
180
|
+
}) => void | Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* @typedef {(newLocale: Locale, options?: { reload?: boolean }) => void | Promise<void>} SetLocaleFn
|
|
183
|
+
*/
|
|
184
|
+
/**
|
|
185
|
+
* Set the locale.
|
|
186
|
+
*
|
|
187
|
+
* Updates the locale using your configured strategies (cookie, localStorage, URL, etc.).
|
|
188
|
+
* By default, this reloads the page on the client to reflect the new locale. Reloading
|
|
189
|
+
* can be disabled by passing `reload: false` as an option, but you'll need to ensure
|
|
190
|
+
* the UI updates to reflect the new locale.
|
|
191
|
+
*
|
|
192
|
+
* If any custom strategy's `setLocale` function is async, then this function
|
|
193
|
+
* will become async as well.
|
|
194
|
+
*
|
|
195
|
+
* @see https://paraglidejs.com/strategy
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* setLocale('en');
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* setLocale('en', { reload: false });
|
|
202
|
+
*
|
|
203
|
+
* @type {SetLocaleFn}
|
|
204
|
+
*/
|
|
205
|
+
export declare let setLocale: SetLocaleFn;
|
|
206
|
+
/**
|
|
207
|
+
* Overwrite the `setLocale()` function.
|
|
208
|
+
*
|
|
209
|
+
* Use this function to overwrite how the locale is set. For example,
|
|
210
|
+
* modify a cookie, env variable, or a user's preference.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* overwriteSetLocale((newLocale) => {
|
|
214
|
+
* // set the locale in a cookie
|
|
215
|
+
* return Cookies.set('locale', newLocale)
|
|
216
|
+
* });
|
|
217
|
+
*
|
|
218
|
+
* @param {SetLocaleFn} fn
|
|
219
|
+
*/
|
|
220
|
+
export declare const overwriteSetLocale: (fn: SetLocaleFn) => void;
|
|
221
|
+
/**
|
|
222
|
+
* The origin of the current URL.
|
|
223
|
+
*
|
|
224
|
+
* Defaults to "http://y.com" in non-browser environments. If this
|
|
225
|
+
* behavior is not desired, the implementation can be overwritten
|
|
226
|
+
* by `overwriteGetUrlOrigin()`.
|
|
227
|
+
*
|
|
228
|
+
* @type {() => string}
|
|
229
|
+
*/
|
|
230
|
+
export declare let getUrlOrigin: () => string;
|
|
231
|
+
/**
|
|
232
|
+
* Overwrite the getUrlOrigin function.
|
|
233
|
+
*
|
|
234
|
+
* Use this function in server environments to
|
|
235
|
+
* define how the URL origin is resolved.
|
|
236
|
+
*
|
|
237
|
+
* @param {() => string} fn - The new implementation for `getUrlOrigin()`.
|
|
238
|
+
*/
|
|
239
|
+
export declare let overwriteGetUrlOrigin: (fn: () => string) => void;
|
|
51
240
|
/**
|
|
52
241
|
* Coerces a locale-like string to the canonical locale value used by the runtime.
|
|
53
242
|
*
|
|
54
243
|
* @param {unknown} value
|
|
55
244
|
* @returns {Locale | undefined}
|
|
56
245
|
*/
|
|
57
|
-
export function toLocale(value: unknown): Locale | undefined;
|
|
246
|
+
export declare function toLocale(value: unknown): Locale | undefined;
|
|
58
247
|
/**
|
|
59
248
|
* Check if something is an available locale with the canonical project casing.
|
|
60
249
|
*
|
|
@@ -70,7 +259,7 @@ export function toLocale(value: unknown): Locale | undefined;
|
|
|
70
259
|
* @param {unknown} locale
|
|
71
260
|
* @returns {locale is Locale}
|
|
72
261
|
*/
|
|
73
|
-
export function isLocale(locale: unknown): locale is Locale;
|
|
262
|
+
export declare function isLocale(locale: unknown): locale is Locale;
|
|
74
263
|
/**
|
|
75
264
|
* Asserts that the input can be normalized to a locale.
|
|
76
265
|
*
|
|
@@ -78,7 +267,81 @@ export function isLocale(locale: unknown): locale is Locale;
|
|
|
78
267
|
* @returns {Locale} The input normalized to a Locale.
|
|
79
268
|
* @throws {Error} If the input is not a locale.
|
|
80
269
|
*/
|
|
81
|
-
export function assertIsLocale(input: unknown): Locale;
|
|
270
|
+
export declare function assertIsLocale(input: unknown): Locale;
|
|
271
|
+
export type ExtractLocaleFromRequestOptions = {
|
|
272
|
+
/**
|
|
273
|
+
* - Effective request URL to use for route matching and locale detection with the URL strategy.
|
|
274
|
+
*/
|
|
275
|
+
effectiveRequestUrl?: string | URL;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* @typedef {object} ExtractLocaleFromRequestOptions
|
|
279
|
+
* @property {string | URL} [effectiveRequestUrl] - Effective request URL to use for route matching and locale detection with the URL strategy.
|
|
280
|
+
*/
|
|
281
|
+
/**
|
|
282
|
+
* Extracts a locale from a request.
|
|
283
|
+
*
|
|
284
|
+
* Use the function on the server to extract the locale
|
|
285
|
+
* from a request.
|
|
286
|
+
*
|
|
287
|
+
* The function goes through the strategies in the order
|
|
288
|
+
* they are defined. If a strategy returns an invalid locale,
|
|
289
|
+
* it will fall back to the next strategy.
|
|
290
|
+
*
|
|
291
|
+
* Note: Custom server strategies are not supported in this synchronous version.
|
|
292
|
+
* Use `extractLocaleFromRequestAsync` if you need custom server strategies with async getLocale methods.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* const locale = extractLocaleFromRequest(request);
|
|
296
|
+
*
|
|
297
|
+
* @param {Request} request
|
|
298
|
+
* @param {ExtractLocaleFromRequestOptions} [options]
|
|
299
|
+
* @returns {Locale}
|
|
300
|
+
*/
|
|
301
|
+
export declare const extractLocaleFromRequest: (request: Request, options?: ExtractLocaleFromRequestOptions) => Locale;
|
|
302
|
+
/**
|
|
303
|
+
* Extracts a locale from a request using the provided strategy order.
|
|
304
|
+
*
|
|
305
|
+
* @param {Request} request
|
|
306
|
+
* @param {typeof strategy} strategies
|
|
307
|
+
* @param {string | URL} [url]
|
|
308
|
+
* @returns {Locale}
|
|
309
|
+
*/
|
|
310
|
+
export declare const extractLocaleFromRequestWithStrategies: (request: Request, strategies: typeof strategy, url?: string | URL) => Locale;
|
|
311
|
+
/**
|
|
312
|
+
* Asynchronously extracts a locale from a request.
|
|
313
|
+
*
|
|
314
|
+
* This function supports async custom server strategies, unlike the synchronous
|
|
315
|
+
* `extractLocaleFromRequest`. Use this function when you have custom server strategies
|
|
316
|
+
* that need to perform asynchronous operations (like database calls) in their getLocale method.
|
|
317
|
+
*
|
|
318
|
+
* The function first processes any custom server strategies asynchronously, then falls back
|
|
319
|
+
* to the synchronous `extractLocaleFromRequest` for all other strategies.
|
|
320
|
+
*
|
|
321
|
+
* @see {@link https://github.com/opral/inlang-paraglide-js/issues/527#issuecomment-2978151022}
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* // Basic usage
|
|
325
|
+
* const locale = await extractLocaleFromRequestAsync(request);
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* // With custom async server strategy
|
|
329
|
+
* defineCustomServerStrategy("custom-database", {
|
|
330
|
+
* getLocale: async (request) => {
|
|
331
|
+
* const userId = extractUserIdFromRequest(request);
|
|
332
|
+
* return await getUserLocaleFromDatabase(userId);
|
|
333
|
+
* }
|
|
334
|
+
* });
|
|
335
|
+
*
|
|
336
|
+
* const locale = await extractLocaleFromRequestAsync(request);
|
|
337
|
+
*
|
|
338
|
+
* @param {Request} request - The request object to extract the locale from.
|
|
339
|
+
* @param {{ effectiveRequestUrl?: string | URL }} [options] - Effective request URL to use for route matching and locale detection with the URL strategy.
|
|
340
|
+
* @returns {Promise<Locale>} The extracted locale.
|
|
341
|
+
*/
|
|
342
|
+
export declare const extractLocaleFromRequestAsync: (request: Request, options?: {
|
|
343
|
+
effectiveRequestUrl?: string | URL;
|
|
344
|
+
}) => Promise<Locale>;
|
|
82
345
|
/**
|
|
83
346
|
* Extracts a cookie from the document.
|
|
84
347
|
*
|
|
@@ -87,7 +350,7 @@ export function assertIsLocale(input: unknown): Locale;
|
|
|
87
350
|
*
|
|
88
351
|
* @returns {Locale | undefined}
|
|
89
352
|
*/
|
|
90
|
-
export function extractLocaleFromCookie(): Locale | undefined;
|
|
353
|
+
export declare function extractLocaleFromCookie(): Locale | undefined;
|
|
91
354
|
/**
|
|
92
355
|
* Extracts a locale from the accept-language header.
|
|
93
356
|
*
|
|
@@ -100,7 +363,7 @@ export function extractLocaleFromCookie(): Locale | undefined;
|
|
|
100
363
|
* @param {Request} request - The request object to extract the locale from.
|
|
101
364
|
* @returns {Locale | undefined} The negotiated preferred language.
|
|
102
365
|
*/
|
|
103
|
-
export function extractLocaleFromHeader(request: Request): Locale | undefined;
|
|
366
|
+
export declare function extractLocaleFromHeader(request: Request): Locale | undefined;
|
|
104
367
|
/**
|
|
105
368
|
* Negotiates a preferred language from navigator.languages.
|
|
106
369
|
*
|
|
@@ -112,7 +375,7 @@ export function extractLocaleFromHeader(request: Request): Locale | undefined;
|
|
|
112
375
|
*
|
|
113
376
|
* @returns {Locale | undefined}
|
|
114
377
|
*/
|
|
115
|
-
export function extractLocaleFromNavigator(): Locale | undefined;
|
|
378
|
+
export declare function extractLocaleFromNavigator(): Locale | undefined;
|
|
116
379
|
/**
|
|
117
380
|
* Extracts the locale from a given URL using native URLPattern.
|
|
118
381
|
*
|
|
@@ -123,7 +386,7 @@ export function extractLocaleFromNavigator(): Locale | undefined;
|
|
|
123
386
|
* @param {URL|string} url - The full URL from which to extract the locale.
|
|
124
387
|
* @returns {Locale|undefined} The extracted locale, or undefined if no locale is found.
|
|
125
388
|
*/
|
|
126
|
-
export function extractLocaleFromUrl(url: URL | string): Locale | undefined;
|
|
389
|
+
export declare function extractLocaleFromUrl(url: URL | string): Locale | undefined;
|
|
127
390
|
/**
|
|
128
391
|
* Lower-level URL localization function, primarily used in server contexts.
|
|
129
392
|
*
|
|
@@ -168,7 +431,7 @@ export function extractLocaleFromUrl(url: URL | string): Locale | undefined;
|
|
|
168
431
|
* @param {Locale} [options.locale] - Target locale. If not provided, uses getLocale()
|
|
169
432
|
* @returns {URL} The localized URL, always absolute
|
|
170
433
|
*/
|
|
171
|
-
export function localizeUrl(url: string | URL, options?: {
|
|
434
|
+
export declare function localizeUrl(url: string | URL, options?: {
|
|
172
435
|
locale?: Locale;
|
|
173
436
|
}): URL;
|
|
174
437
|
/**
|
|
@@ -210,7 +473,7 @@ export function localizeUrl(url: string | URL, options?: {
|
|
|
210
473
|
* @param {string | URL} url - The URL to de-localize. If string, must be absolute.
|
|
211
474
|
* @returns {URL} The de-localized URL, always absolute
|
|
212
475
|
*/
|
|
213
|
-
export function deLocalizeUrl(url: string | URL): URL;
|
|
476
|
+
export declare function deLocalizeUrl(url: string | URL): URL;
|
|
214
477
|
/**
|
|
215
478
|
* Aggregates named groups from various parts of the URLPattern match result.
|
|
216
479
|
*
|
|
@@ -218,7 +481,35 @@ export function deLocalizeUrl(url: string | URL): URL;
|
|
|
218
481
|
* @param {any} match - The URLPattern match result object.
|
|
219
482
|
* @returns {Record<string, string | null | undefined>} An object containing all named groups from the match.
|
|
220
483
|
*/
|
|
221
|
-
export function aggregateGroups(match: any): Record<string, string | null | undefined>;
|
|
484
|
+
export declare function aggregateGroups(match: any): Record<string, string | null | undefined>;
|
|
485
|
+
export type ShouldRedirectServerInput = {
|
|
486
|
+
request: Request;
|
|
487
|
+
/**
|
|
488
|
+
* - Effective request URL to use for route matching, locale detection with the URL strategy, and redirect targets.
|
|
489
|
+
*/
|
|
490
|
+
effectiveRequestUrl?: string | URL;
|
|
491
|
+
locale?: Locale;
|
|
492
|
+
};
|
|
493
|
+
export type ShouldRedirectClientInput = {
|
|
494
|
+
request?: undefined;
|
|
495
|
+
url?: string | URL;
|
|
496
|
+
locale?: Locale;
|
|
497
|
+
};
|
|
498
|
+
export type ShouldRedirectInput = ShouldRedirectServerInput | ShouldRedirectClientInput;
|
|
499
|
+
export type ShouldRedirectResult = {
|
|
500
|
+
/**
|
|
501
|
+
* - Indicates whether the consumer should perform a redirect.
|
|
502
|
+
*/
|
|
503
|
+
shouldRedirect: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* - Locale resolved using the configured strategies.
|
|
506
|
+
*/
|
|
507
|
+
locale: Locale;
|
|
508
|
+
/**
|
|
509
|
+
* - Destination URL when a redirect is required.
|
|
510
|
+
*/
|
|
511
|
+
redirectUrl: URL | undefined;
|
|
512
|
+
};
|
|
222
513
|
/**
|
|
223
514
|
* @typedef {object} ShouldRedirectServerInput
|
|
224
515
|
* @property {Request} request
|
|
@@ -290,7 +581,7 @@ export function aggregateGroups(match: any): Record<string, string | null | unde
|
|
|
290
581
|
* @param {ShouldRedirectInput} [input]
|
|
291
582
|
* @returns {Promise<ShouldRedirectResult>}
|
|
292
583
|
*/
|
|
293
|
-
export function shouldRedirect(input?: ShouldRedirectInput): Promise<ShouldRedirectResult>;
|
|
584
|
+
export declare function shouldRedirect(input?: ShouldRedirectInput): Promise<ShouldRedirectResult>;
|
|
294
585
|
/**
|
|
295
586
|
* High-level URL localization function optimized for client-side UI usage.
|
|
296
587
|
*
|
|
@@ -331,7 +622,7 @@ export function shouldRedirect(input?: ShouldRedirectInput): Promise<ShouldRedir
|
|
|
331
622
|
* @param {Locale} [options.locale] - Target locale. If not provided, uses `getLocale()`
|
|
332
623
|
* @returns {string} The localized href, relative if input was relative
|
|
333
624
|
*/
|
|
334
|
-
export function localizeHref(href: string, options?: {
|
|
625
|
+
export declare function localizeHref(href: string, options?: {
|
|
335
626
|
locale?: Locale;
|
|
336
627
|
}): string;
|
|
337
628
|
/**
|
|
@@ -374,12 +665,12 @@ export function localizeHref(href: string, options?: {
|
|
|
374
665
|
* @param {string} href - The href to de-localize (can be relative or absolute)
|
|
375
666
|
* @returns {string} The de-localized href, relative if input was relative
|
|
376
667
|
*/
|
|
377
|
-
export function deLocalizeHref(href: string): string;
|
|
668
|
+
export declare function deLocalizeHref(href: string): string;
|
|
378
669
|
/**
|
|
379
670
|
* @param {string} safeModuleId
|
|
380
671
|
* @param {Locale} locale
|
|
381
672
|
*/
|
|
382
|
-
export function trackMessageCall(safeModuleId: string, locale: Locale): void;
|
|
673
|
+
export declare function trackMessageCall(safeModuleId: string, locale: Locale): void;
|
|
383
674
|
/**
|
|
384
675
|
* Generates localized URL variants for all provided URLs based on your configured locales and URL patterns.
|
|
385
676
|
*
|
|
@@ -423,7 +714,40 @@ export function trackMessageCall(safeModuleId: string, locale: Locale): void;
|
|
|
423
714
|
* @returns {URL[]} Array of URL objects representing all localized variants.
|
|
424
715
|
* The order follows each input URL with all its locale variants before moving to the next URL.
|
|
425
716
|
*/
|
|
426
|
-
export function generateStaticLocalizedUrls(urls: (string | URL)[]): URL[];
|
|
717
|
+
export declare function generateStaticLocalizedUrls(urls: (string | URL)[]): URL[];
|
|
718
|
+
export type BuiltInStrategy = "cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage";
|
|
719
|
+
export type CustomStrategy = `custom_${string}`;
|
|
720
|
+
export type Strategy = BuiltInStrategy | CustomStrategy;
|
|
721
|
+
export type Strategies = Array<Strategy>;
|
|
722
|
+
export type CustomServerStrategyHandler = {
|
|
723
|
+
getLocale: (request?: Request) => Promise<string | undefined> | (string | undefined);
|
|
724
|
+
};
|
|
725
|
+
export type CustomClientStrategyHandler = {
|
|
726
|
+
getLocale: () => Promise<string | undefined> | (string | undefined);
|
|
727
|
+
setLocale: (locale: string) => Promise<void> | void;
|
|
728
|
+
};
|
|
729
|
+
/**
|
|
730
|
+
* @typedef {"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage"} BuiltInStrategy
|
|
731
|
+
*/
|
|
732
|
+
/**
|
|
733
|
+
* @typedef {`custom_${string}`} CustomStrategy
|
|
734
|
+
*/
|
|
735
|
+
/**
|
|
736
|
+
* @typedef {BuiltInStrategy | CustomStrategy} Strategy
|
|
737
|
+
*/
|
|
738
|
+
/**
|
|
739
|
+
* @typedef {Array<Strategy>} Strategies
|
|
740
|
+
*/
|
|
741
|
+
/**
|
|
742
|
+
* @typedef {{ getLocale: (request?: Request) => Promise<string | undefined> | (string | undefined) }} CustomServerStrategyHandler
|
|
743
|
+
*/
|
|
744
|
+
/**
|
|
745
|
+
* @typedef {{ getLocale: () => Promise<string|undefined> | (string | undefined), setLocale: (locale: string) => Promise<void> | void }} CustomClientStrategyHandler
|
|
746
|
+
*/
|
|
747
|
+
/** @type {Map<string, CustomServerStrategyHandler>} */
|
|
748
|
+
export declare const customServerStrategies: Map<string, CustomServerStrategyHandler>;
|
|
749
|
+
/** @type {Map<string, CustomClientStrategyHandler>} */
|
|
750
|
+
export declare const customClientStrategies: Map<string, CustomClientStrategyHandler>;
|
|
427
751
|
/**
|
|
428
752
|
* Checks if the given strategy is a custom strategy.
|
|
429
753
|
*
|
|
@@ -431,7 +755,7 @@ export function generateStaticLocalizedUrls(urls: (string | URL)[]): URL[];
|
|
|
431
755
|
* Must be a string that starts with "custom-" followed by alphanumeric characters, hyphens, or underscores.
|
|
432
756
|
* @returns {boolean} Returns true if it is a custom strategy, false otherwise.
|
|
433
757
|
*/
|
|
434
|
-
export function isCustomStrategy(strategy: unknown): boolean;
|
|
758
|
+
export declare function isCustomStrategy(strategy: unknown): boolean;
|
|
435
759
|
/**
|
|
436
760
|
* Defines a custom strategy that is executed on the server.
|
|
437
761
|
*
|
|
@@ -442,7 +766,7 @@ export function isCustomStrategy(strategy: unknown): boolean;
|
|
|
442
766
|
* the method getLocale.
|
|
443
767
|
* @returns {void}
|
|
444
768
|
*/
|
|
445
|
-
export function defineCustomServerStrategy(strategy: string, handler: CustomServerStrategyHandler): void;
|
|
769
|
+
export declare function defineCustomServerStrategy(strategy: string, handler: CustomServerStrategyHandler): void;
|
|
446
770
|
/**
|
|
447
771
|
* Defines a custom strategy that is executed on the client.
|
|
448
772
|
*
|
|
@@ -453,217 +777,66 @@ export function defineCustomServerStrategy(strategy: string, handler: CustomServ
|
|
|
453
777
|
* methods getLocale and setLocale.
|
|
454
778
|
* @returns {void}
|
|
455
779
|
*/
|
|
456
|
-
export function defineCustomClientStrategy(strategy: string, handler: CustomClientStrategyHandler): void;
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
* if (locale === baseLocale) {
|
|
462
|
-
* // do something
|
|
463
|
-
* }
|
|
464
|
-
*/
|
|
465
|
-
export const baseLocale: "en-gb";
|
|
466
|
-
/**
|
|
467
|
-
* The project's locales that have been specified in the settings.
|
|
468
|
-
*
|
|
469
|
-
* @example
|
|
470
|
-
* if (locales.includes(userSelectedLocale) === false) {
|
|
471
|
-
* throw new Error('Locale is not available');
|
|
472
|
-
* }
|
|
473
|
-
*/
|
|
474
|
-
export const locales: readonly ["en-gb", "nb"];
|
|
475
|
-
/** @type {string} */
|
|
476
|
-
export const cookieName: string;
|
|
477
|
-
/** @type {number} */
|
|
478
|
-
export const cookieMaxAge: number;
|
|
479
|
-
/** @type {string} */
|
|
480
|
-
export const cookieDomain: string;
|
|
481
|
-
/** @type {string} */
|
|
482
|
-
export const localStorageKey: string;
|
|
483
|
-
/**
|
|
484
|
-
* @type {Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage" | `custom-${string}`>}
|
|
485
|
-
*/
|
|
486
|
-
export const strategy: Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage" | `custom-${string}`>;
|
|
487
|
-
/**
|
|
488
|
-
* Route-level strategy overrides.
|
|
489
|
-
*
|
|
490
|
-
* `match` uses URLPattern syntax.
|
|
491
|
-
*
|
|
492
|
-
* @type {Array<{
|
|
493
|
-
* match: string;
|
|
494
|
-
* strategy?: Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage" | `custom-${string}`>;
|
|
495
|
-
* exclude?: boolean;
|
|
496
|
-
* }>}
|
|
497
|
-
*/
|
|
498
|
-
export const routeStrategies: Array<{
|
|
499
|
-
match: string;
|
|
500
|
-
strategy?: Array<"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage" | `custom-${string}`>;
|
|
501
|
-
exclude?: boolean;
|
|
502
|
-
}>;
|
|
503
|
-
/**
|
|
504
|
-
* The used URL patterns.
|
|
505
|
-
*
|
|
506
|
-
* @type {Array<{ pattern: string, localized: Array<[Locale, string]> }>}
|
|
507
|
-
*/
|
|
508
|
-
export const urlPatterns: Array<{
|
|
509
|
-
pattern: string;
|
|
510
|
-
localized: Array<[Locale, string]>;
|
|
511
|
-
}>;
|
|
512
|
-
/**
|
|
513
|
-
* @typedef {{
|
|
514
|
-
* getStore(): {
|
|
515
|
-
* locale?: Locale,
|
|
516
|
-
* origin?: string,
|
|
517
|
-
* messageCalls?: Set<string>
|
|
518
|
-
* } | undefined,
|
|
519
|
-
* run: (store: { locale?: Locale, origin?: string, messageCalls?: Set<string>},
|
|
520
|
-
* cb: any) => any
|
|
521
|
-
* }} ParaglideAsyncLocalStorage
|
|
522
|
-
*/
|
|
523
|
-
/**
|
|
524
|
-
* Server side async local storage that is set by `serverMiddleware()`.
|
|
525
|
-
*
|
|
526
|
-
* The variable is used to retrieve the locale and origin in a server-side
|
|
527
|
-
* rendering context without effecting other requests.
|
|
528
|
-
*
|
|
529
|
-
* @type {ParaglideAsyncLocalStorage | undefined}
|
|
530
|
-
*/
|
|
531
|
-
export let serverAsyncLocalStorage: ParaglideAsyncLocalStorage | undefined;
|
|
532
|
-
export const disableAsyncLocalStorage: false;
|
|
533
|
-
export const experimentalMiddlewareLocaleSplitting: false;
|
|
534
|
-
export const isServer: any;
|
|
535
|
-
/** @type {Locale | undefined} */
|
|
536
|
-
export const experimentalStaticLocale: Locale | undefined;
|
|
537
|
-
export function getLocale(): Locale;
|
|
538
|
-
export function overwriteGetLocale(fn: () => Locale): void;
|
|
539
|
-
/**
|
|
540
|
-
* @typedef {(newLocale: Locale, options?: { reload?: boolean }) => void | Promise<void>} SetLocaleFn
|
|
541
|
-
*/
|
|
542
|
-
/**
|
|
543
|
-
* Set the locale.
|
|
544
|
-
*
|
|
545
|
-
* Updates the locale using your configured strategies (cookie, localStorage, URL, etc.).
|
|
546
|
-
* By default, this reloads the page on the client to reflect the new locale. Reloading
|
|
547
|
-
* can be disabled by passing `reload: false` as an option, but you'll need to ensure
|
|
548
|
-
* the UI updates to reflect the new locale.
|
|
549
|
-
*
|
|
550
|
-
* If any custom strategy's `setLocale` function is async, then this function
|
|
551
|
-
* will become async as well.
|
|
552
|
-
*
|
|
553
|
-
* @see https://paraglidejs.com/strategy
|
|
554
|
-
*
|
|
555
|
-
* @example
|
|
556
|
-
* setLocale('en');
|
|
557
|
-
*
|
|
558
|
-
* @example
|
|
559
|
-
* setLocale('en', { reload: false });
|
|
560
|
-
*
|
|
561
|
-
* @type {SetLocaleFn}
|
|
562
|
-
*/
|
|
563
|
-
export let setLocale: SetLocaleFn;
|
|
564
|
-
export function overwriteSetLocale(fn: SetLocaleFn): void;
|
|
565
|
-
/**
|
|
566
|
-
* The origin of the current URL.
|
|
567
|
-
*
|
|
568
|
-
* Defaults to "http://y.com" in non-browser environments. If this
|
|
569
|
-
* behavior is not desired, the implementation can be overwritten
|
|
570
|
-
* by `overwriteGetUrlOrigin()`.
|
|
571
|
-
*
|
|
572
|
-
* @type {() => string}
|
|
573
|
-
*/
|
|
574
|
-
export let getUrlOrigin: () => string;
|
|
575
|
-
export function overwriteGetUrlOrigin(fn: () => string): void;
|
|
576
|
-
export function extractLocaleFromRequest(request: Request, options?: ExtractLocaleFromRequestOptions): Locale;
|
|
577
|
-
export function extractLocaleFromRequestWithStrategies(request: Request, strategies: typeof strategy, url?: string | URL): Locale;
|
|
578
|
-
export function extractLocaleFromRequestAsync(request: Request, options?: {
|
|
579
|
-
effectiveRequestUrl?: string | URL;
|
|
580
|
-
}): Promise<Locale>;
|
|
581
|
-
/**
|
|
582
|
-
* @typedef {"cookie" | "baseLocale" | "globalVariable" | "url" | "preferredLanguage" | "localStorage"} BuiltInStrategy
|
|
583
|
-
*/
|
|
584
|
-
/**
|
|
585
|
-
* @typedef {`custom_${string}`} CustomStrategy
|
|
586
|
-
*/
|
|
587
|
-
/**
|
|
588
|
-
* @typedef {BuiltInStrategy | CustomStrategy} Strategy
|
|
589
|
-
*/
|
|
590
|
-
/**
|
|
591
|
-
* @typedef {Array<Strategy>} Strategies
|
|
592
|
-
*/
|
|
593
|
-
/**
|
|
594
|
-
* @typedef {{ getLocale: (request?: Request) => Promise<string | undefined> | (string | undefined) }} CustomServerStrategyHandler
|
|
595
|
-
*/
|
|
596
|
-
/**
|
|
597
|
-
* @typedef {{ getLocale: () => Promise<string|undefined> | (string | undefined), setLocale: (locale: string) => Promise<void> | void }} CustomClientStrategyHandler
|
|
598
|
-
*/
|
|
599
|
-
/** @type {Map<string, CustomServerStrategyHandler>} */
|
|
600
|
-
export const customServerStrategies: Map<string, CustomServerStrategyHandler>;
|
|
601
|
-
/** @type {Map<string, CustomClientStrategyHandler>} */
|
|
602
|
-
export const customClientStrategies: Map<string, CustomClientStrategyHandler>;
|
|
603
|
-
export type ShouldRedirectServerInput = {
|
|
604
|
-
request: Request;
|
|
605
|
-
/**
|
|
606
|
-
* - Effective request URL to use for route matching, locale detection with the URL strategy, and redirect targets.
|
|
607
|
-
*/
|
|
608
|
-
effectiveRequestUrl?: string | URL;
|
|
609
|
-
locale?: Locale;
|
|
610
|
-
};
|
|
611
|
-
export type ShouldRedirectClientInput = {
|
|
612
|
-
request?: undefined;
|
|
613
|
-
url?: string | URL;
|
|
614
|
-
locale?: Locale;
|
|
780
|
+
export declare function defineCustomClientStrategy(strategy: string, handler: CustomClientStrategyHandler): void;
|
|
781
|
+
export {};
|
|
782
|
+
export type Locale = typeof locales[number];
|
|
783
|
+
export type LocalizedString = string & {
|
|
784
|
+
readonly __brand: 'LocalizedString';
|
|
615
785
|
};
|
|
616
|
-
export type
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
* - Indicates whether the consumer should perform a redirect.
|
|
620
|
-
*/
|
|
621
|
-
shouldRedirect: boolean;
|
|
622
|
-
/**
|
|
623
|
-
* - Locale resolved using the configured strategies.
|
|
624
|
-
*/
|
|
625
|
-
locale: Locale;
|
|
626
|
-
/**
|
|
627
|
-
* - Destination URL when a redirect is required.
|
|
628
|
-
*/
|
|
629
|
-
redirectUrl: URL | undefined;
|
|
786
|
+
export type MessageMarkupOption = {
|
|
787
|
+
name: string;
|
|
788
|
+
value: unknown;
|
|
630
789
|
};
|
|
631
|
-
export type
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
origin?: string;
|
|
635
|
-
messageCalls?: Set<string>;
|
|
636
|
-
} | undefined;
|
|
637
|
-
run: (store: {
|
|
638
|
-
locale?: Locale;
|
|
639
|
-
origin?: string;
|
|
640
|
-
messageCalls?: Set<string>;
|
|
641
|
-
}, cb: any) => any;
|
|
790
|
+
export type MessageMarkupAttribute = {
|
|
791
|
+
name: string;
|
|
792
|
+
value: string | true;
|
|
642
793
|
};
|
|
643
|
-
export type
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
*/
|
|
650
|
-
effectiveRequestUrl?: string | URL;
|
|
794
|
+
export type MessageMarkupOptions = Record<string, unknown>;
|
|
795
|
+
export type MessageMarkupAttributes = Record<string, string | true>;
|
|
796
|
+
export type MessageMarkupTag = {
|
|
797
|
+
options: MessageMarkupOptions;
|
|
798
|
+
attributes: MessageMarkupAttributes;
|
|
799
|
+
children: boolean;
|
|
651
800
|
};
|
|
652
|
-
export type
|
|
653
|
-
export type
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
801
|
+
export type MessageMarkupSchema = Record<string, MessageMarkupTag>;
|
|
802
|
+
export type MessageMetadata<Inputs, Options, Markup extends MessageMarkupSchema = MessageMarkupSchema> = {
|
|
803
|
+
readonly __paraglide?: {
|
|
804
|
+
inputs: Inputs;
|
|
805
|
+
options: Options;
|
|
806
|
+
markup: Markup;
|
|
807
|
+
};
|
|
658
808
|
};
|
|
659
|
-
export type
|
|
660
|
-
|
|
661
|
-
|
|
809
|
+
export type MessagePart = {
|
|
810
|
+
type: "text";
|
|
811
|
+
value: string;
|
|
812
|
+
} | {
|
|
813
|
+
type: "markup-start";
|
|
814
|
+
name: string;
|
|
815
|
+
options: MessageMarkupOptions;
|
|
816
|
+
attributes: MessageMarkupAttributes;
|
|
817
|
+
} | {
|
|
818
|
+
type: "markup-end";
|
|
819
|
+
name: string;
|
|
820
|
+
options: MessageMarkupOptions;
|
|
821
|
+
attributes: MessageMarkupAttributes;
|
|
822
|
+
} | {
|
|
823
|
+
type: "markup-standalone";
|
|
824
|
+
name: string;
|
|
825
|
+
options: MessageMarkupOptions;
|
|
826
|
+
attributes: MessageMarkupAttributes;
|
|
662
827
|
};
|
|
828
|
+
export type MessageFunction = (inputs?: Record<string, never>) => LocalizedString;
|
|
829
|
+
export type MessageBundleFunction<T extends string> = (params: Record<string, never>, options: {
|
|
830
|
+
locale: T;
|
|
831
|
+
}) => LocalizedString;
|
|
663
832
|
/**
|
|
664
833
|
* A locale that is available in the project.
|
|
834
|
+
*
|
|
835
|
+
* @example
|
|
836
|
+
* setLocale(request.locale as Locale)
|
|
837
|
+
*
|
|
838
|
+
* @typedef {typeof locales[number]} Locale
|
|
665
839
|
*/
|
|
666
|
-
export type Locale = (typeof locales)[number];
|
|
667
840
|
/**
|
|
668
841
|
* A branded type representing a localized string.
|
|
669
842
|
*
|
|
@@ -674,85 +847,131 @@ export type Locale = (typeof locales)[number];
|
|
|
674
847
|
*
|
|
675
848
|
* Since \`LocalizedString\` is a branded subtype of \`string\`, it remains fully
|
|
676
849
|
* backward compatible—you can pass it anywhere a \`string\` is expected.
|
|
850
|
+
*
|
|
851
|
+
* @example
|
|
852
|
+
* // Enforce localized strings in your components
|
|
853
|
+
* function PageTitle(props: { title: LocalizedString }) {
|
|
854
|
+
* return <h1>{props.title}</h1>
|
|
855
|
+
* }
|
|
856
|
+
*
|
|
857
|
+
* // ✅ Correct: using a message function
|
|
858
|
+
* <PageTitle title={m.welcome_title()} />
|
|
859
|
+
*
|
|
860
|
+
* // ❌ Type error: raw strings are not LocalizedString
|
|
861
|
+
* <PageTitle title="Welcome" />
|
|
862
|
+
*
|
|
863
|
+
* @example
|
|
864
|
+
* // LocalizedString is assignable to string (backward compatible)
|
|
865
|
+
* const localized: LocalizedString = m.greeting()
|
|
866
|
+
* const str: string = localized // ✅ works fine
|
|
867
|
+
*
|
|
868
|
+
* // But string is not assignable to LocalizedString
|
|
869
|
+
* const raw: LocalizedString = "Hello" // ❌ Type error
|
|
870
|
+
*
|
|
871
|
+
* @example
|
|
872
|
+
* // Catches accidental string concatenation
|
|
873
|
+
* function showMessage(msg: LocalizedString) { ... }
|
|
874
|
+
*
|
|
875
|
+
* showMessage(m.hello()) // ✅
|
|
876
|
+
* showMessage("Hello " + userName) // ❌ Type error
|
|
877
|
+
* showMessage(m.hello_user({ name: userName })) // ✅ use params instead
|
|
878
|
+
*
|
|
879
|
+
* @typedef {string & { readonly __brand: 'LocalizedString' }} LocalizedString
|
|
677
880
|
*/
|
|
678
|
-
export type LocalizedString = string & {
|
|
679
|
-
readonly __brand: "LocalizedString";
|
|
680
|
-
};
|
|
681
881
|
/**
|
|
682
882
|
* A single markup option passed to a tag instance.
|
|
883
|
+
*
|
|
884
|
+
* @typedef {{
|
|
885
|
+
* name: string;
|
|
886
|
+
* value: unknown;
|
|
887
|
+
* }} MessageMarkupOption
|
|
683
888
|
*/
|
|
684
|
-
export type MessageMarkupOption = {
|
|
685
|
-
name: string;
|
|
686
|
-
value: unknown;
|
|
687
|
-
};
|
|
688
889
|
/**
|
|
689
890
|
* A single static markup attribute attached to a tag instance.
|
|
891
|
+
*
|
|
892
|
+
* @typedef {{
|
|
893
|
+
* name: string;
|
|
894
|
+
* value: string | true;
|
|
895
|
+
* }} MessageMarkupAttribute
|
|
690
896
|
*/
|
|
691
|
-
export type MessageMarkupAttribute = {
|
|
692
|
-
name: string;
|
|
693
|
-
value: string | true;
|
|
694
|
-
};
|
|
695
897
|
/**
|
|
696
898
|
* Record of markup options for a tag instance.
|
|
899
|
+
*
|
|
900
|
+
* @typedef {Record<string, unknown>} MessageMarkupOptions
|
|
697
901
|
*/
|
|
698
|
-
export type MessageMarkupOptions = Record<string, unknown>;
|
|
699
902
|
/**
|
|
700
903
|
* Record of markup attributes for a tag instance.
|
|
904
|
+
*
|
|
905
|
+
* @typedef {Record<string, string | true>} MessageMarkupAttributes
|
|
701
906
|
*/
|
|
702
|
-
export type MessageMarkupAttributes = Record<string, string | true>;
|
|
703
907
|
/**
|
|
704
908
|
* Type-level schema for a single markup tag.
|
|
909
|
+
*
|
|
910
|
+
* @typedef {{
|
|
911
|
+
* options: MessageMarkupOptions;
|
|
912
|
+
* attributes: MessageMarkupAttributes;
|
|
913
|
+
* children: boolean;
|
|
914
|
+
* }} MessageMarkupTag
|
|
705
915
|
*/
|
|
706
|
-
export type MessageMarkupTag = {
|
|
707
|
-
options: MessageMarkupOptions;
|
|
708
|
-
attributes: MessageMarkupAttributes;
|
|
709
|
-
children: boolean;
|
|
710
|
-
};
|
|
711
916
|
/**
|
|
712
917
|
* Type-level schema for all markup tags in a message.
|
|
918
|
+
*
|
|
919
|
+
* @typedef {Record<string, MessageMarkupTag>} MessageMarkupSchema
|
|
713
920
|
*/
|
|
714
|
-
export type MessageMarkupSchema = Record<string, MessageMarkupTag>;
|
|
715
921
|
/**
|
|
716
922
|
* Type-only metadata attached to compiled message functions.
|
|
923
|
+
*
|
|
924
|
+
* @template Inputs
|
|
925
|
+
* @template Options
|
|
926
|
+
* @template {MessageMarkupSchema} [Markup = MessageMarkupSchema]
|
|
927
|
+
* @typedef {{
|
|
928
|
+
* readonly __paraglide?: {
|
|
929
|
+
* inputs: Inputs;
|
|
930
|
+
* options: Options;
|
|
931
|
+
* markup: Markup;
|
|
932
|
+
* };
|
|
933
|
+
* }} MessageMetadata
|
|
717
934
|
*/
|
|
718
|
-
export type MessageMetadata<Inputs, Options, Markup extends MessageMarkupSchema = Record<string, MessageMarkupTag>> = {
|
|
719
|
-
readonly __paraglide?: {
|
|
720
|
-
inputs: Inputs;
|
|
721
|
-
options: Options;
|
|
722
|
-
markup: Markup;
|
|
723
|
-
};
|
|
724
|
-
};
|
|
725
935
|
/**
|
|
726
936
|
* A compiled, framework-neutral message part.
|
|
937
|
+
*
|
|
938
|
+
* @typedef {{
|
|
939
|
+
* type: "text";
|
|
940
|
+
* value: string;
|
|
941
|
+
* } | {
|
|
942
|
+
* type: "markup-start";
|
|
943
|
+
* name: string;
|
|
944
|
+
* options: MessageMarkupOptions;
|
|
945
|
+
* attributes: MessageMarkupAttributes;
|
|
946
|
+
* } | {
|
|
947
|
+
* type: "markup-end";
|
|
948
|
+
* name: string;
|
|
949
|
+
* options: MessageMarkupOptions;
|
|
950
|
+
* attributes: MessageMarkupAttributes;
|
|
951
|
+
* } | {
|
|
952
|
+
* type: "markup-standalone";
|
|
953
|
+
* name: string;
|
|
954
|
+
* options: MessageMarkupOptions;
|
|
955
|
+
* attributes: MessageMarkupAttributes;
|
|
956
|
+
* }} MessagePart
|
|
727
957
|
*/
|
|
728
|
-
export type MessagePart = {
|
|
729
|
-
type: "text";
|
|
730
|
-
value: string;
|
|
731
|
-
} | {
|
|
732
|
-
type: "markup-start";
|
|
733
|
-
name: string;
|
|
734
|
-
options: MessageMarkupOptions;
|
|
735
|
-
attributes: MessageMarkupAttributes;
|
|
736
|
-
} | {
|
|
737
|
-
type: "markup-end";
|
|
738
|
-
name: string;
|
|
739
|
-
options: MessageMarkupOptions;
|
|
740
|
-
attributes: MessageMarkupAttributes;
|
|
741
|
-
} | {
|
|
742
|
-
type: "markup-standalone";
|
|
743
|
-
name: string;
|
|
744
|
-
options: MessageMarkupOptions;
|
|
745
|
-
attributes: MessageMarkupAttributes;
|
|
746
|
-
};
|
|
747
958
|
/**
|
|
748
959
|
* A message function is a message for a specific locale.
|
|
960
|
+
*
|
|
961
|
+
* @example
|
|
962
|
+
* m.hello({ name: 'world' })
|
|
963
|
+
*
|
|
964
|
+
* @typedef {(inputs?: Record<string, never>) => LocalizedString} MessageFunction
|
|
749
965
|
*/
|
|
750
|
-
export type MessageFunction = (inputs?: Record<string, never>) => LocalizedString;
|
|
751
966
|
/**
|
|
752
967
|
* A message bundle function that selects the message to be returned.
|
|
753
968
|
*
|
|
754
969
|
* Uses `getLocale()` under the hood to determine the locale with an option.
|
|
970
|
+
*
|
|
971
|
+
* @template {string} T
|
|
972
|
+
*
|
|
973
|
+
* @example
|
|
974
|
+
* * m.hello({ name: 'world' }, { locale: "en" })
|
|
975
|
+
*
|
|
976
|
+
* @typedef {(params: Record<string, never>, options: { locale: T }) => LocalizedString} MessageBundleFunction
|
|
755
977
|
*/
|
|
756
|
-
export type MessageBundleFunction<T extends string> = (params: Record<string, never>, options: {
|
|
757
|
-
locale: T;
|
|
758
|
-
}) => LocalizedString;
|