@astryx-vue/core 0.3.0 → 0.4.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.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-RAVA_cT1.js → AlertDialog-C2inDZWG.js} +5 -5
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-0wTvOo3H.js → AppShell-CumzH-8z.js} +3 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-pPZ4dI_s.js → Avatar-BW0TE8t9.js} +47 -34
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-B--NQSB3.js → AvatarGroup-DLC_FFR5.js} +57 -13
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-GbGxrqQO.js → Banner-C5VAwo4D.js} +68 -34
- package/dist/Blockquote/index.js +1 -1
- package/dist/Blockquote-DRoKdcxZ.js +27 -0
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-pt7m4CvC.js → BottomSheet-B4sc3F1S.js} +286 -140
- package/dist/{BottomSheet-JYMB_Ofl.js → BottomSheet-m54uCMJN.js} +20 -4
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Breadcrumbs-CTaz7Kh4.js +223 -0
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-B6Hj_O_s.js → Button-ONOoHdkg.js} +25 -15
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/ButtonGroup-DnkSZ9a5.js +87 -0
- package/dist/{ButtonTooltip-nWWrth8j.js → ButtonTooltip-CNKOQHYR.js} +7 -4
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-B7vIowKq.js → Calendar-BAqzzQm2.js} +5 -5
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-CA8zpD9v.js → Carousel-DXC22UWq.js} +4 -4
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-Bmna9EOA.js → Chat-BdJW6IX5.js} +147 -83
- package/dist/CheckboxIndicator/index.js +1 -1
- package/dist/{CheckboxIndicator-D37cm2Rh.js → CheckboxIndicator-fH4d-JE1.js} +9 -3
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BS9J6edf.js → CheckboxInput-DJHCbwgC.js} +19 -11
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-CX1i_jVP.js → CheckboxList-BdZIP4_J.js} +155 -38
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-Djgwa0ko.js → Citation-DbZn2vms.js} +8 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-DUsC-j03.js → ClickableCard-ChAfiw9T.js} +9 -6
- package/dist/Code/index.js +3 -3
- package/dist/{Code-XnPuGxey.js → Code-Bg7GBdxy.js} +2 -1
- package/dist/{CodeBlock-D0BFubut.js → CodeBlock-Caaflp7C.js} +3 -3
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-Cov3Pyq5.js → Collapsible-Bdj0WYpb.js} +13 -11
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-YHsUNg3V.js → CommandPalette-C_MClfAg.js} +143 -63
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-DWLdKPGI.js → ComplexSelector-BeVQaqRf.js} +85 -20
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-Bq9b3Ti5.js → ContextMenu-C6hPYvYz.js} +297 -179
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DT518j5E.js → DateInput-BjLdmYor.js} +567 -76
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-Bqi5tlIA.js → DateRangeInput-Br3wVEfD.js} +85 -20
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/DateTimeInput-CAZBwoRe.js +562 -0
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +2 -2
- package/dist/{Dialog-BiOSKQso.js → Dialog-Dce4Y97V.js} +28 -11
- package/dist/{Dialog-FGHfDu5M.js → Dialog-fhyxB00e.js} +32 -5
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Divider/index.js +1 -1
- package/dist/{Divider-BtwnL18I.js → Divider-mOZ6vIQw.js} +5 -1
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-CoOQVlRp.js → DropdownMenu-BdGmQVb1.js} +85 -57
- package/dist/{DropdownMenu-DEb2dSSP.js → DropdownMenu-BzQrNV9C.js} +479 -264
- package/dist/{DropdownMenuRadioItem.vue-CXEURBcq.d.ts → DropdownMenuRadioItem.vue-Qd-8Rg4Q.d.ts} +236 -230
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-C_GH7IV5.js → EmptyState-CmOQf2SH.js} +2 -2
- package/dist/Field/index.d.ts +4 -3
- package/dist/Field/index.js +4 -3
- package/dist/{Field-D5gUEGw4.js → Field--OEsLBfE.js} +4 -3
- package/dist/{FieldInfoTip-Ds-sW_jY.js → FieldInfoTip-gxsnfkZw.js} +3 -3
- package/dist/{FieldLabel-BNeXRuGH.js → FieldLabel-jxIiWgLw.js} +12 -7
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BpdiO1V8.js → FileInput-B_pUxB0Y.js} +106 -29
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-D47FjiOq.js → FormLayout-B9dUB6Ps.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BnwWEWkp.js → Heading-BzBunfN7.js} +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-ycY50pRN.js → HoverCard-BpJhT0sn.js} +35 -22
- package/dist/Icon/index.d.ts +4 -4
- package/dist/Icon/index.js +1 -1
- package/dist/{Icon-bteSId7T.js → Icon-KDnUyY7f.js} +12 -20
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DDNgNl7B.js → IconButton-DI-XBbtV.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/Indicator/index.js +2 -1
- package/dist/InputClearButton-CwXPan8c.js +40 -0
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +2 -2
- package/dist/{InputGroup-CA03Smrs.js → InputGroup-DiiocoIW.js} +2 -2
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-DJay_w3B.js → InternationalizationProvider-kBapgKAQ.js} +5 -9
- package/dist/{Item-KhFKX9St.js → Item-DWMIjN8n.js} +34 -9
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd-BB-Dw6zE.js → Kbd-CV3LO2Ge.js} +18 -2
- package/dist/LayerContentBoundary-CvsKxwwm.js +27 -0
- package/dist/LayerProvider/index.js +1 -1
- package/dist/{LayerProvider-D9NsQFzL.js → LayerProvider-B6zpMBWC.js} +15 -3
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-C6RHllr-.js → Layout-JJRCG7Mf.js} +1 -1
- package/dist/{LayoutPanel-DXOsaeQb.js → LayoutPanel-zM5vjrKS.js} +12 -8
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DTF9EdTG.js → Lightbox-D8wyPgMK.js} +8 -6
- package/dist/Link/index.js +1 -1
- package/dist/{Link-BqHCtiyt.js → Link-DweIpOtN.js} +29 -12
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-8RWT8XAG.js → ListItem-BQXMu1Tb.js} +1 -1
- package/dist/Markdown/index.d.ts +5 -2
- package/dist/Markdown/index.js +5 -2
- package/dist/Markdown/parser/index.d.ts +4 -0
- package/dist/Markdown/parser/index.js +3 -0
- package/dist/Markdown/plugin-protocol/index.d.ts +35 -0
- package/dist/Markdown/plugin-protocol/index.js +107 -0
- package/dist/Markdown/plugin-renderer/index.d.ts +31 -0
- package/dist/Markdown/plugin-renderer/index.js +42 -0
- package/dist/{Markdown-CvtN7HnF.js → Markdown-DhVfOvXk.js} +195 -484
- package/dist/MediaTheme-DlLqYhDy.js +433 -0
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-B-OelQlt.js → MetadataList-CEYceIlN.js} +15 -7
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DxGz0xKA.js → MobileNavToggle-pdoJFZHx.js} +52 -17
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dlb7MLlW.js → MoreMenu-CFNqSRev.js} +72 -59
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/MultiSelector-DuVatmq5.js +1456 -0
- package/dist/{NavDisclosure-C_fugrQ3.js → NavDisclosure-Bq9DTZLO.js} +29 -7
- package/dist/{NavHeadingSurface-B3yJspSN.js → NavHeadingSurface-C4v_MtkX.js} +29 -26
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +2 -2
- package/dist/{NavItem-BBIGSvDj.js → NavItem-BPb3yfgz.js} +17 -4
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-ThXguZAz.js → NavMenu-BYIDzjix.js} +42 -15
- package/dist/{NavMenuItem-BvJNsDFC.js → NavMenuItem-D3FO90GR.js} +14 -12
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-B0vzOg3N.js +727 -0
- package/dist/Outline/index.d.ts +2 -2
- package/dist/Outline/index.js +2 -2
- package/dist/{Outline-755h-lMP.js → Outline-CfGv2F1o.js} +91 -6
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-NmrSMbxb.js → OverflowList-BgRLZ3dh.js} +23 -6
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DqwNQFRp.js → Pagination-Bfe12018.js} +2 -2
- package/dist/PickerWheel-CSwUYfes.js +69 -0
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DJf8POzL.js → Popover-78dFjTb9.js} +20 -15
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DvjiPqMZ.js → PowerSearch-BoAMdFaT.js} +774 -586
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-CVLzdoBK.js → ProgressBar-VP4JS7vm.js} +10 -7
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-Bfu6JSNV.js → RadioGroup-BIipql-L.js} +94 -26
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-xY1cwLdZ.js → RadioList-GyhgBg4j.js} +57 -8
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-q4nD_586.js → ResizeHandle-TPlUCAHD.js} +103 -50
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-D4dCJv9I.js → ScrollableArea-0u6RWtGG.js} +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-ChHmFrrC.js → SegmentedControl-D1wWGBZo.js} +11 -5
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-Cku4dRzc.js → SelectableCard-BEqnhPaX.js} +16 -11
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-CPISLzp7.js +1049 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BF8mYDxl.js → SideNav-CN2QeAtY.js} +51 -37
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DWobsPgm.js → Slider-pdC0jpHu.js} +172 -46
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner-DdVUadii.js +200 -0
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stack/index.js +2 -2
- package/dist/{Stack-CTsTFfar.js → Stack-Bb_h60t3.js} +1 -1
- package/dist/{Stack-kQlYbbL4.js → Stack-Bp-XN9J4.js} +12 -7
- package/dist/StatusDot/index.d.ts +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-BPUhMOff.js → StatusDot-BS_ohXhd.js} +8 -4
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CE8dHysu.js → Stepper-CyaSRSdu.js} +101 -79
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DaVPRxvN.js → Switch-Z2Vfiiic.js} +38 -22
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DIkK9sgK.js → TabList-DRqP0Hrv.js} +205 -63
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-fecqnm7P.js → Table-BcrrylMX.js} +726 -452
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CV3LmscH.js → Text-CmTOgYXf.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Ab5Sw60T.js → TextArea-DA9CCG_J.js} +104 -50
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-zFT1_qgI.js → TextInput-CI96einV.js} +71 -38
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +3 -2
- package/dist/Theme-BbDT8B_C.js +2125 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-C3NnJUFG.js → Thumbnail-B2ZAY59J.js} +13 -10
- package/dist/{TimeField-CoHDGmsP.js → TimeField-CpAgja9D.js} +297 -40
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D2k3Ux3p.js → TimeInput-Bw_lHS4M.js} +78 -9
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-avMQk5DN.js → Timer-CH7GsEVu.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-xpQKCk0d.js → Timestamp-BFNuoTZ0.js} +5 -5
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast-DwnPjx6j.js +685 -0
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B-C-Q7XP.js → ToggleButton-cLjh9W-x.js} +5 -4
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-DsntTYhQ.js → Token-BfS4vi__.js} +32 -17
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-B5C_qY7t.js → Tokenizer-Ci3E5bvP.js} +107 -23
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-BrgvvTCk.js → Toolbar-C0pMWL4S.js} +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/{Tooltip-C4Vaqd3G.js → Tooltip-sAM8i1eO.js} +23 -19
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-Ciq0l1w7.js → TopNav-gW59zp1o.js} +16 -15
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-BUz-KZJd.js → TreeList-DaoI7zaH.js} +124 -41
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-JP9RT87x.js → Typeahead-D4JjvjK4.js} +123 -26
- package/dist/{TypeaheadMenu-DBW6rHeO.js → TypeaheadMenu-BQlMrfqX.js} +141 -51
- package/dist/{announce-Cnio10Wk.js → announce-B210eJVf.js} +17 -2
- package/dist/characterReferences-BJ-jLhsR.js +65 -0
- package/dist/characters-rcDbGt71.d.ts +29 -0
- package/dist/characters-wTnzjkkR.js +58 -0
- package/dist/{colorMode-CBgdgDSn.js → colorMode-BxqfDP4P.js} +1 -4
- package/dist/composables/index.d.ts +5 -4
- package/dist/composables/index.js +23 -18
- package/dist/{composables-CbKx9C1Y.js → composables-Bc02zKAO.js} +167 -197
- package/dist/context-B6UElI5X.js +5 -0
- package/dist/{context-Cfjh8te1.js → context-Cfml4jaK.js} +5 -3
- package/dist/{context-iABt_ueM.js → context-DWfi56sq.js} +451 -122
- package/dist/context-IvbU9c3T.js +8 -0
- package/dist/context-pjBxaMSh.js +28 -0
- package/dist/fieldParts--SyRZVQG.js +44 -0
- package/dist/fieldParts-LXpQMKE8.d.ts +27 -0
- package/dist/{focus-CpficIgf.js → focus-l8jVTcqd.js} +1 -1
- package/dist/hoverIntent-DMHGb85c.js +115 -0
- package/dist/{index-Cde5JvtX.d.ts → index-B-nESNam.d.ts} +8 -7
- package/dist/{index-CsNi1I8j.d.ts → index-B08-Uxhv.d.ts} +4 -2
- package/dist/{index-Cn-sSds-.d.ts → index-B56j4eI2.d.ts} +24 -1
- package/dist/{index-BkjSF265.d.ts → index-BEZ4ezJk.d.ts} +3 -3
- package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
- package/dist/{index-0QGtSf3r.d.ts → index-BO9TY87G.d.ts} +3 -2
- package/dist/{index-IBAInumL.d.ts → index-BQEJj72c.d.ts} +23 -10
- package/dist/{index-D97pQbua.d.ts → index-BV2D2x_u.d.ts} +1 -1
- package/dist/{index-Crp3NFLW.d.ts → index-BZKgbyN9.d.ts} +1 -1
- package/dist/index-BkUkm6Al.d.ts +11 -0
- package/dist/{index-ClNU2Th8.d.ts → index-Bn-v89Vt.d.ts} +10 -6
- package/dist/{index-Bu8NA2SD.d.ts → index-BnEhvmdR.d.ts} +16 -7
- package/dist/index-Bo-ofFyg.d.ts +166 -0
- package/dist/{index-i0tNFWfz.d.ts → index-BqhgeAT4.d.ts} +2 -0
- package/dist/{index-DWh2WC8W.d.ts → index-C4Cjz6OK.d.ts} +2 -2
- package/dist/{index-B7yhzGUT.d.ts → index-C7sam-SB.d.ts} +2 -2
- package/dist/{index-BrJzFA5X.d.ts → index-C90l2rH1.d.ts} +1 -1
- package/dist/{index-vP0EtrJJ.d.ts → index-C9gAlDt_.d.ts} +6 -3
- package/dist/{index-xrzJC4wm.d.ts → index-CJ6ajsUC.d.ts} +1 -1
- package/dist/{index-B9e52paP.d.ts → index-CK-Dbh0f.d.ts} +1 -1
- package/dist/index-CKUfpmFL.d.ts +375 -0
- package/dist/{index-DXpSFlPG.d.ts → index-CKgBTAzC.d.ts} +4 -4
- package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/{index-B4OOtNP8.d.ts → index-CPtDjmcX.d.ts} +3 -3
- package/dist/{index-12QYAbiz.d.ts → index-CRrSHbok.d.ts} +3 -2
- package/dist/{index-DG52Bg0W.d.ts → index-CTf3SK0b.d.ts} +6 -0
- package/dist/{index-BVKivP59.d.ts → index-CTjkJP4x.d.ts} +32 -3
- package/dist/{index-COgrQZIL.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-GI9xIV9l.d.ts → index-CikMzeab.d.ts} +2 -2
- package/dist/{index-DUaLJO7l.d.ts → index-CpNlPLBF.d.ts} +172 -126
- package/dist/{index-yT1yiiww.d.ts → index-Cs1xsHKi.d.ts} +24 -12
- package/dist/{index-Cyb9Du5Z.d.ts → index-CtTGt6Dv.d.ts} +1 -1
- package/dist/{index-Byar3h1e.d.ts → index-D05JGsT3.d.ts} +6 -3
- package/dist/{index-B3Fomy15.d.ts → index-D0_HsuC3.d.ts} +3 -3
- package/dist/{index-BgT6mH3U.d.ts → index-D7ShT2c-.d.ts} +1 -1
- package/dist/{index-CkKPMIeX.d.ts → index-D7XRtUTY.d.ts} +9 -0
- package/dist/{index-TntQsADQ.d.ts → index-DEm3kRBO.d.ts} +4 -3
- package/dist/{index-C2nbK2AA.d.ts → index-DLAG3m9W.d.ts} +13 -3
- package/dist/{index-DVmgNb78.d.ts → index-DRJZ-v1E.d.ts} +4 -4
- package/dist/{index-CL1T2j4y.d.ts → index-DY8Wph-A.d.ts} +3 -3
- package/dist/{index-B1WJxt-n.d.ts → index-DfC05uKG.d.ts} +17 -7
- package/dist/{index-C5e-7Obr.d.ts → index-Dj1_1t3j.d.ts} +19 -6
- package/dist/{index-D41_xqjs.d.ts → index-Dr4b_oji.d.ts} +20 -13
- package/dist/{index-CqE4Bf3Q.d.ts → index-Ds201-d2.d.ts} +16 -2
- package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
- package/dist/{index-B42oE_F-.d.ts → index-IfsSCj8J.d.ts} +18 -5
- package/dist/{index-XuAAcYiP.d.ts → index-f3d9cVtj.d.ts} +1 -1
- package/dist/{index-T2FOcOuI.d.ts → index-jOwU3YoR.d.ts} +400 -90
- package/dist/{index-CICeEoZV.d.ts → index-pNtfr-RW.d.ts} +1 -1
- package/dist/{index-BhpAUzUr.d.ts → index-unAZVFGz.d.ts} +2 -2
- package/dist/index.d.ts +80 -74
- package/dist/index.js +149 -134
- package/dist/inlineSize-BNe8wggI.js +66 -0
- package/dist/inputPresentation-BOyHkCDr.js +62 -0
- package/dist/interactionModality-ACpTMhak.js +44 -0
- package/dist/isApplePlatform-B1ju6F5B.js +27 -0
- package/dist/isRenderable-BnKHIqfd.js +21 -0
- package/dist/layerDepth-CNDh-IHb.js +181 -0
- package/dist/link-DuuA2eCL.js +30 -0
- package/dist/{loadCatalog-BGHKG_9N.d.ts → loadCatalog-DlLFZreI.d.ts} +281 -7
- package/dist/loadCatalog-eopw74qb.js +424 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -3
- package/dist/locale-CabGJlGp.js +343 -0
- package/dist/modalOutlet-CUOcrhIu.js +56 -0
- package/dist/optionAction-Cg7xQLUA.d.ts +6 -0
- package/dist/{power-search-DrDfcoL1.d.ts → power-search-gHLIYXs5.d.ts} +2 -0
- package/dist/protocol-DHxY0NI8.js +113 -0
- package/dist/protocol-RSeMzAN1.d.ts +238 -0
- package/dist/publicParser-B0MRoikr.d.ts +141 -0
- package/dist/publicParser-uHC_T0Fo.js +895 -0
- package/dist/resizableChannel-3vivrEcT.js +20 -0
- package/dist/safeUrl-CsvfcZ9m.js +54 -0
- package/dist/scopedProvide-C-Df7c15.js +30 -0
- package/dist/scrollKeyboardDelegation-D7cumnOl.js +238 -0
- package/dist/scrollLock-C3aT4-0z.js +102 -0
- package/dist/{searchResultMessage-hXXNOFJP.js → searchResultMessage-mCpJBvra.js} +5 -14
- package/dist/{semantic-CKH9XVqa.d.ts → semantic-BF_AjLvk.d.ts} +6 -3
- package/dist/slug-C65CUsf9.js +32 -0
- package/dist/syntaxContext-DmIfNNtb.js +4 -0
- package/dist/triggerVariant-BsL8jMHs.js +16 -0
- package/dist/{types-0Q_SJv_F.d.ts → types-Bb7OGivY.d.ts} +6 -1
- package/dist/{types-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
- package/dist/{types-gKsEkk2g.d.ts → types-CsqwQkf1.d.ts} +143 -10
- package/dist/upstreamMap-xr3gvREu.js +731 -0
- package/dist/{useAnchoredListbox-DwztMNjP.js → useAnchoredListbox-DGxxKHZb.js} +2 -2
- package/dist/{useAsyncSource-xpQovjV_.d.ts → useAsyncSource-aGzrvRkI.d.ts} +3 -0
- package/dist/{useClickableContainer-DyNpnSEa.js → useClickableContainer-CdGp_Cev.js} +1 -1
- package/dist/{useClipboard-BDfbEsWd.js → useClipboard-Dk8cS810.js} +1 -1
- package/dist/useHoverLayerDismiss-kYJ_NqL4.js +27 -0
- package/dist/{useIndicator-i1NORM7W.js → useIndicator-MZmfBWid.js} +5 -23
- package/dist/{useInputContainer-CpgDe2-4.js → useInputContainer-CLcYrby4.js} +1 -1
- package/dist/{useInputStatusIcon-DBOwxV4x.js → useInputStatusIcon-DAE7PExr.js} +1 -1
- package/dist/useLayerMountTarget-BmZyeKWE.js +156 -0
- package/dist/{useListFocus-D0iOJl39.js → useListFocus-ChxLg0b4.js} +3 -2
- package/dist/{useMenuDrillIn-DzKGkTho.js → useMenuDrillIn-DhUnPvKs.js} +6 -5
- package/dist/useMenuHover-Djreu23i.js +170 -0
- package/dist/useMenuPress-8foxY8z4.js +764 -0
- package/dist/{useMergedRefs-CfHHlCsn.js → useMergedRefs-Cb6_w93m.js} +24 -4
- package/dist/{useNumberField-4-dIGVed.js → useNumberField-Dk1BE3-K.js} +3 -3
- package/dist/useOptionActionGrid-CkJcuvaU.js +97 -0
- package/dist/{usePositionedLayer-Cru9_00b.js → usePositionedLayer-B7cvG-_v.js} +43 -49
- package/dist/usePressFeedback-BJCpjEpv.js +319 -0
- package/dist/{useResizable-DDwPpPe6.d.ts → useResizable-1MHPNaRD.d.ts} +19 -1
- package/dist/{useResizable-B3ahKLoZ.js → useResizable-I3BCiLSL.js} +72 -40
- package/dist/useResolvedLabelHidden-B2rlWiaI.js +30 -0
- package/dist/{useRestoreFocus-Djw9RUIf.js → useRestoreFocus-XEKs5-gp.js} +49 -7
- package/dist/useScrollOverflow-DuMoGXmm.js +67 -0
- package/dist/useScrollableArea-BE8b3qm7.js +222 -0
- package/dist/{useTimeValue-6ufHM15W.js → useTimeValue-BJd0xBhG.js} +4 -22
- package/dist/useTranslator-BmWt2BBt.js +35 -0
- package/dist/{useTypeahead-PAK8lMYz.js → useTypeahead-BvtflkRk.js} +4 -5
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +5 -0
- package/dist/{utils-D33VQDnk.js → utils-ClVseK2w.js} +29 -2
- package/dist/utils-z3Q6BGIJ.js +819 -0
- package/locales/SOURCE.json +1 -1
- package/package.json +18 -2
- package/reset.css +364 -1
- package/styles/avatar-group.css +9 -1
- package/styles/badge.css +8 -5
- package/styles/banner.css +124 -26
- package/styles/blockquote.css +1 -0
- package/styles/bordered-control.css +1 -1
- package/styles/bottom-sheet.css +74 -6
- package/styles/breadcrumbs.css +16 -2
- package/styles/button-group.css +3 -1
- package/styles/button.css +53 -11
- package/styles/card.css +1 -1
- package/styles/chat.css +16 -6
- package/styles/checkbox-input.css +10 -0
- package/styles/clickable-card.css +10 -3
- package/styles/collapsible.css +12 -5
- package/styles/command-palette.css +29 -14
- package/styles/complex-selector.css +22 -5
- package/styles/context-menu.css +3 -3
- package/styles/date-input.css +111 -1
- package/styles/dialog-header.css +4 -1
- package/styles/dialog.css +7 -0
- package/styles/dropdown-menu.css +12 -3
- package/styles/field.css +5 -0
- package/styles/form-layout.css +1 -0
- package/styles/heading.css +18 -8
- package/styles/icon.css +4 -0
- package/styles/kbd.css +1 -1
- package/styles/layer.css +72 -0
- package/styles/list.css +9 -2
- package/styles/metadata-list.css +1 -0
- package/styles/mobile-nav.css +4 -1
- package/styles/multi-selector.css +48 -1
- package/styles/nav-item.css +9 -2
- package/styles/nav-menu.css +12 -2
- package/styles/number-input.css +9 -1
- package/styles/overflow-list.css +1 -1
- package/styles/popover.css +2 -1
- package/styles/power-search.css +5 -3
- package/styles/pressable.css +63 -22
- package/styles/progress-bar.css +15 -3
- package/styles/radio.css +16 -0
- package/styles/resize-handle.css +42 -0
- package/styles/segmented-control.css +12 -4
- package/styles/selector.css +53 -1
- package/styles/side-nav.css +19 -0
- package/styles/slider.css +4 -3
- package/styles/spinner.css +48 -42
- package/styles/stepper.css +58 -4
- package/styles/switch.css +26 -0
- package/styles/tab-list.css +132 -3
- package/styles/table.css +88 -10
- package/styles/text-area.css +1 -1
- package/styles/text-input.css +1 -1
- package/styles/text.css +6 -6
- package/styles/thumbnail.css +11 -3
- package/styles/time-input.css +8 -0
- package/styles/toast.css +37 -3
- package/styles/token.css +2 -2
- package/styles/tokenizer.css +1 -1
- package/styles/toolbar.css +4 -1
- package/styles/tree-list.css +1 -1
- package/styles/typeahead.css +34 -1
- package/styles.css +1 -0
- package/dist/Blockquote-DFqBv_oJ.js +0 -18
- package/dist/Breadcrumbs-DIm4figq.js +0 -141
- package/dist/ButtonGroup-ySQWanDP.js +0 -125
- package/dist/DateTimeInput-A7m2O3bg.js +0 -268
- package/dist/MultiSelector-BtAUfQ3t.js +0 -990
- package/dist/NumberInput-AZ9x3oja.js +0 -473
- package/dist/Selector-DJ2BhUTV.js +0 -677
- package/dist/Spinner-9cYUCnDy.js +0 -84
- package/dist/Theme-CtaUWo4g.js +0 -1246
- package/dist/Toast-BuqIZV5z.js +0 -322
- package/dist/context-4PuqD1Ic.js +0 -4
- package/dist/context-D5-MwxnN.js +0 -4
- package/dist/index-BH9PzQ1F.d.ts +0 -87
- package/dist/link-C4_WogdF.js +0 -18
- package/dist/loadCatalog-CXKqEB9s.js +0 -877
- package/dist/locale-DgkZEMTn.js +0 -105
- package/dist/platform-B_9W_aHW.js +0 -33
- package/dist/scrollLock-BzIvIimL.js +0 -42
- package/dist/useMenuPress-D-FRNrBW.js +0 -573
- package/dist/useScrollableArea-DDk_CluT.js +0 -172
- /package/dist/{index-lgvUFSCO.d.ts → index-CryFtTT6.d.ts} +0 -0
|
@@ -1,877 +0,0 @@
|
|
|
1
|
-
import { s as astryxMessages } from "./context-iABt_ueM.js";
|
|
2
|
-
//#region src/locale/icu.ts
|
|
3
|
-
const pluralRules = /* @__PURE__ */ new Map();
|
|
4
|
-
const ordinalRules = /* @__PURE__ */ new Map();
|
|
5
|
-
const numberFormats = /* @__PURE__ */ new Map();
|
|
6
|
-
function rulesFor(locale, ordinal) {
|
|
7
|
-
const cache = ordinal ? ordinalRules : pluralRules;
|
|
8
|
-
let rules = cache.get(locale);
|
|
9
|
-
if (rules == null) {
|
|
10
|
-
rules = new Intl.PluralRules(locale, ordinal ? { type: "ordinal" } : void 0);
|
|
11
|
-
cache.set(locale, rules);
|
|
12
|
-
}
|
|
13
|
-
return rules;
|
|
14
|
-
}
|
|
15
|
-
function numberFor(locale) {
|
|
16
|
-
let format = numberFormats.get(locale);
|
|
17
|
-
if (format == null) {
|
|
18
|
-
format = new Intl.NumberFormat(locale);
|
|
19
|
-
numberFormats.set(locale, format);
|
|
20
|
-
}
|
|
21
|
-
return format;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* 解析原版目录里的 ICU MessageFormat。
|
|
25
|
-
* 覆盖 `{name}`、`{name, number}`、`plural`、`selectordinal` 和 `select`。
|
|
26
|
-
* 解析失败时抛错,调用方负责把这个键记进未映射列表。
|
|
27
|
-
*/
|
|
28
|
-
function formatIcu(message, values, locale) {
|
|
29
|
-
return render(parseMessage(message), values, locale, void 0);
|
|
30
|
-
}
|
|
31
|
-
function icuPlaceholderNames(message) {
|
|
32
|
-
const names = /* @__PURE__ */ new Set();
|
|
33
|
-
collectNames(parseMessage(message), names);
|
|
34
|
-
return [...names];
|
|
35
|
-
}
|
|
36
|
-
function collectNames(nodes, names) {
|
|
37
|
-
for (const node of nodes) {
|
|
38
|
-
if (node.type === "arg" || node.type === "number" || node.type === "plural" || node.type === "select") names.add(node.name);
|
|
39
|
-
if (node.type === "plural" || node.type === "select") for (const option of node.options) collectNames(option.nodes, names);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function render(nodes, values, locale, pound) {
|
|
43
|
-
let text = "";
|
|
44
|
-
for (const node of nodes) text += renderNode(node, values, locale, pound);
|
|
45
|
-
return text;
|
|
46
|
-
}
|
|
47
|
-
function renderNode(node, values, locale, pound) {
|
|
48
|
-
if (node.type === "text") return node.value;
|
|
49
|
-
if (node.type === "pound") return pound == null ? "" : numberFor(locale).format(pound);
|
|
50
|
-
if (node.type === "arg") return textValue(values[node.name]);
|
|
51
|
-
if (node.type === "number") {
|
|
52
|
-
const value = numericValue(values[node.name]);
|
|
53
|
-
return value == null ? "" : numberFor(locale).format(value);
|
|
54
|
-
}
|
|
55
|
-
if (node.type === "select") return renderChoice(node.options, selectSelector(values[node.name]), values, locale, pound);
|
|
56
|
-
const value = numericValue(values[node.name]);
|
|
57
|
-
const rounded = value == null ? void 0 : value - node.offset;
|
|
58
|
-
const selector = value == null ? "other" : pluralSelector(value, node.options, locale, node.ordinal);
|
|
59
|
-
return renderChoice(node.options, selector, values, locale, rounded);
|
|
60
|
-
}
|
|
61
|
-
function pluralSelector(value, options, locale, ordinal) {
|
|
62
|
-
const exact = exactSelector(value);
|
|
63
|
-
if (exact != null && options.some((option) => option.selector === exact)) return exact;
|
|
64
|
-
return rulesFor(locale, ordinal).select(value);
|
|
65
|
-
}
|
|
66
|
-
function renderChoice(options, selector, values, locale, pound) {
|
|
67
|
-
const match = options.find((option) => option.selector === selector) ?? options.find((option) => option.selector === "other") ?? options[0];
|
|
68
|
-
return match == null ? "" : render(match.nodes, values, locale, pound);
|
|
69
|
-
}
|
|
70
|
-
function textValue(value) {
|
|
71
|
-
if (value == null) return "";
|
|
72
|
-
return typeof value === "number" ? String(value) : value;
|
|
73
|
-
}
|
|
74
|
-
function numericValue(value) {
|
|
75
|
-
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
76
|
-
if (typeof value === "string" && value.trim() !== "") {
|
|
77
|
-
const parsed = Number(value);
|
|
78
|
-
if (Number.isFinite(parsed)) return parsed;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
function exactSelector(value) {
|
|
82
|
-
return Number.isInteger(value) ? `=${value}` : void 0;
|
|
83
|
-
}
|
|
84
|
-
function selectSelector(value) {
|
|
85
|
-
if (value == null) return "other";
|
|
86
|
-
return String(value);
|
|
87
|
-
}
|
|
88
|
-
function parseMessage(input) {
|
|
89
|
-
let index = 0;
|
|
90
|
-
function parseNodes(stop, pluralPound) {
|
|
91
|
-
const nodes = [];
|
|
92
|
-
let text = "";
|
|
93
|
-
const flush = () => {
|
|
94
|
-
if (text !== "") {
|
|
95
|
-
nodes.push({
|
|
96
|
-
type: "text",
|
|
97
|
-
value: text
|
|
98
|
-
});
|
|
99
|
-
text = "";
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
while (index < input.length) {
|
|
103
|
-
const char = input[index];
|
|
104
|
-
if (char === "'") {
|
|
105
|
-
if (input[index + 1] === "'") {
|
|
106
|
-
text += "'";
|
|
107
|
-
index += 2;
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
index += 1;
|
|
111
|
-
while (index < input.length && input[index] !== "'") {
|
|
112
|
-
text += input[index];
|
|
113
|
-
index += 1;
|
|
114
|
-
}
|
|
115
|
-
if (input[index] === "'") index += 1;
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
if (char === "#" && pluralPound) {
|
|
119
|
-
flush();
|
|
120
|
-
nodes.push({ type: "pound" });
|
|
121
|
-
index += 1;
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
if (char === "{") {
|
|
125
|
-
flush();
|
|
126
|
-
index += 1;
|
|
127
|
-
nodes.push(parseArgument());
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
if (stop != null && char === stop) {
|
|
131
|
-
flush();
|
|
132
|
-
return nodes;
|
|
133
|
-
}
|
|
134
|
-
text += char;
|
|
135
|
-
index += 1;
|
|
136
|
-
}
|
|
137
|
-
if (stop != null) throw new Error("ICU 消息没有闭合");
|
|
138
|
-
flush();
|
|
139
|
-
return nodes;
|
|
140
|
-
}
|
|
141
|
-
function parseArgument() {
|
|
142
|
-
skipSpace();
|
|
143
|
-
const name = readIdentifier();
|
|
144
|
-
skipSpace();
|
|
145
|
-
if (input[index] === "}") {
|
|
146
|
-
index += 1;
|
|
147
|
-
return {
|
|
148
|
-
type: "arg",
|
|
149
|
-
name
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
if (input[index] !== ",") throw new Error(`ICU 参数 ${name} 格式不对`);
|
|
153
|
-
index += 1;
|
|
154
|
-
skipSpace();
|
|
155
|
-
const kind = readIdentifier();
|
|
156
|
-
skipSpace();
|
|
157
|
-
if (kind === "number") {
|
|
158
|
-
if (input[index] === ",") skipNumberStyle();
|
|
159
|
-
expectChar("}");
|
|
160
|
-
index += 1;
|
|
161
|
-
return {
|
|
162
|
-
type: "number",
|
|
163
|
-
name
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
if (kind === "plural" || kind === "selectordinal" || kind === "select") {
|
|
167
|
-
expectChar(",");
|
|
168
|
-
index += 1;
|
|
169
|
-
skipSpace();
|
|
170
|
-
let offset = 0;
|
|
171
|
-
if (kind !== "select" && input.startsWith("offset:", index)) {
|
|
172
|
-
index += 7;
|
|
173
|
-
skipSpace();
|
|
174
|
-
offset = readInteger();
|
|
175
|
-
skipSpace();
|
|
176
|
-
}
|
|
177
|
-
const options = [];
|
|
178
|
-
while (index < input.length && input[index] !== "}") {
|
|
179
|
-
skipSpace();
|
|
180
|
-
if (input[index] === "}") break;
|
|
181
|
-
const selector = readSelector();
|
|
182
|
-
skipSpace();
|
|
183
|
-
expectChar("{");
|
|
184
|
-
index += 1;
|
|
185
|
-
const nodes = parseNodes("}", kind !== "select");
|
|
186
|
-
expectChar("}");
|
|
187
|
-
index += 1;
|
|
188
|
-
options.push({
|
|
189
|
-
selector,
|
|
190
|
-
nodes
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
expectChar("}");
|
|
194
|
-
index += 1;
|
|
195
|
-
if (options.length === 0) throw new Error(`ICU ${kind} 没有选项`);
|
|
196
|
-
if (kind === "select") return {
|
|
197
|
-
type: "select",
|
|
198
|
-
name,
|
|
199
|
-
options
|
|
200
|
-
};
|
|
201
|
-
return {
|
|
202
|
-
type: "plural",
|
|
203
|
-
name,
|
|
204
|
-
offset,
|
|
205
|
-
ordinal: kind === "selectordinal",
|
|
206
|
-
options
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
throw new Error(`不支持的 ICU 类型 ${kind}`);
|
|
210
|
-
}
|
|
211
|
-
function skipNumberStyle() {
|
|
212
|
-
let depth = 0;
|
|
213
|
-
while (index < input.length) {
|
|
214
|
-
const char = input[index];
|
|
215
|
-
if (char === "{") depth += 1;
|
|
216
|
-
else if (char === "}") {
|
|
217
|
-
if (depth === 0) return;
|
|
218
|
-
depth -= 1;
|
|
219
|
-
}
|
|
220
|
-
index += 1;
|
|
221
|
-
}
|
|
222
|
-
throw new Error("ICU number 没有闭合");
|
|
223
|
-
}
|
|
224
|
-
function skipSpace() {
|
|
225
|
-
while (index < input.length && (input[index] === " " || input[index] === "\n" || input[index] === "\r" || input[index] === " ")) index += 1;
|
|
226
|
-
}
|
|
227
|
-
function readIdentifier() {
|
|
228
|
-
const start = index;
|
|
229
|
-
while (index < input.length && /[\w$]/.test(input[index])) index += 1;
|
|
230
|
-
if (start === index) throw new Error("ICU 缺少参数名");
|
|
231
|
-
return input.slice(start, index);
|
|
232
|
-
}
|
|
233
|
-
function readSelector() {
|
|
234
|
-
if (input[index] === "=") {
|
|
235
|
-
index += 1;
|
|
236
|
-
const sign = input[index] === "-" ? "-" : "";
|
|
237
|
-
if (sign) index += 1;
|
|
238
|
-
return `=${sign}${readInteger()}`;
|
|
239
|
-
}
|
|
240
|
-
return readIdentifier();
|
|
241
|
-
}
|
|
242
|
-
function readInteger() {
|
|
243
|
-
const start = index;
|
|
244
|
-
while (index < input.length && input[index] >= "0" && input[index] <= "9") index += 1;
|
|
245
|
-
if (start === index) throw new Error("ICU 缺少数字");
|
|
246
|
-
return Number(input.slice(start, index));
|
|
247
|
-
}
|
|
248
|
-
function expectChar(char) {
|
|
249
|
-
if (input[index] !== char) throw new Error(`ICU 期望 ${char}`);
|
|
250
|
-
}
|
|
251
|
-
return parseNodes(null, false);
|
|
252
|
-
}
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region src/locale/upstreamMap.ts
|
|
255
|
-
const operatorNames = [
|
|
256
|
-
"contains",
|
|
257
|
-
"notContains",
|
|
258
|
-
"startsWith",
|
|
259
|
-
"notStartsWith",
|
|
260
|
-
"endsWith",
|
|
261
|
-
"notEndsWith",
|
|
262
|
-
"is",
|
|
263
|
-
"isNot",
|
|
264
|
-
"equals",
|
|
265
|
-
"notEquals",
|
|
266
|
-
"greaterThan",
|
|
267
|
-
"lessThan",
|
|
268
|
-
"greaterThanOrEqual",
|
|
269
|
-
"lessThanOrEqual",
|
|
270
|
-
"before",
|
|
271
|
-
"after",
|
|
272
|
-
"between",
|
|
273
|
-
"isTrue",
|
|
274
|
-
"isFalse",
|
|
275
|
-
"isAnyOf",
|
|
276
|
-
"isNoneOf"
|
|
277
|
-
];
|
|
278
|
-
const valueNames = [
|
|
279
|
-
"value",
|
|
280
|
-
"values",
|
|
281
|
-
"time",
|
|
282
|
-
"date",
|
|
283
|
-
"relativeDate",
|
|
284
|
-
"startDate",
|
|
285
|
-
"endDate",
|
|
286
|
-
"entities",
|
|
287
|
-
"searchPlaceholder",
|
|
288
|
-
"enterValuePlaceholder",
|
|
289
|
-
"addValuesPlaceholder",
|
|
290
|
-
"enterNumberPlaceholder",
|
|
291
|
-
"selectValuesPlaceholder"
|
|
292
|
-
];
|
|
293
|
-
function operatorTargets() {
|
|
294
|
-
return Object.fromEntries(operatorNames.map((name) => [`@astryx.powersearch.operator.${name}`, [{ path: `powerSearch.operators.${name}` }]]));
|
|
295
|
-
}
|
|
296
|
-
function valueTargets() {
|
|
297
|
-
return Object.fromEntries(valueNames.map((name) => [`@astryx.powersearch.valueEditor.${name}`, [{ path: `powerSearch.value.${name}` }]]));
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* 原版 `@astryx.*` 键到 `AstryxMessages` 字段的对照。
|
|
301
|
-
* 一个键可以填多个字段。占位符对不上的键不会写入,由加载器列出来。
|
|
302
|
-
*/
|
|
303
|
-
const upstreamMessageMap = {
|
|
304
|
-
"@astryx.pagination.label": [{ path: "pagination.nav" }],
|
|
305
|
-
"@astryx.pagination.previous": [{ path: "pagination.previous" }],
|
|
306
|
-
"@astryx.pagination.next": [{ path: "pagination.next" }],
|
|
307
|
-
"@astryx.pagination.pageAnnounce": [{
|
|
308
|
-
path: "pagination.page",
|
|
309
|
-
args: ["current"]
|
|
310
|
-
}],
|
|
311
|
-
"@astryx.pagination.itemsPerPage": [{ path: "pagination.perPage" }],
|
|
312
|
-
"@astryx.pagination.count": [{
|
|
313
|
-
path: "pagination.total",
|
|
314
|
-
args: [
|
|
315
|
-
"total",
|
|
316
|
-
"from",
|
|
317
|
-
"to"
|
|
318
|
-
]
|
|
319
|
-
}],
|
|
320
|
-
"@astryx.pagination.pageOfTotal": [{
|
|
321
|
-
path: "pagination.pageOf",
|
|
322
|
-
args: ["current", "total"]
|
|
323
|
-
}],
|
|
324
|
-
"@astryx.calendar.previousMonth": [{ path: "calendar.previousMonth" }],
|
|
325
|
-
"@astryx.calendar.nextMonth": [{ path: "calendar.nextMonth" }],
|
|
326
|
-
"@astryx.calendar.rangeStartAnnounce": [{
|
|
327
|
-
path: "calendar.rangeStart",
|
|
328
|
-
args: ["date"]
|
|
329
|
-
}],
|
|
330
|
-
"@astryx.calendar.rangeClearedAnnounce": [{
|
|
331
|
-
path: "calendar.rangeCleared",
|
|
332
|
-
args: ["date"]
|
|
333
|
-
}],
|
|
334
|
-
"@astryx.calendar.rangeCompleteAnnounce": [{
|
|
335
|
-
path: "calendar.rangeComplete",
|
|
336
|
-
args: ["start", "end"]
|
|
337
|
-
}],
|
|
338
|
-
"@astryx.calendar.dayRangeStart": [{
|
|
339
|
-
path: "calendar.rangeStartName",
|
|
340
|
-
args: ["date"]
|
|
341
|
-
}],
|
|
342
|
-
"@astryx.calendar.dayRangeEnd": [{
|
|
343
|
-
path: "calendar.rangeEndName",
|
|
344
|
-
args: ["date"]
|
|
345
|
-
}],
|
|
346
|
-
"@astryx.calendar.dayRangeStartAndEnd": [{
|
|
347
|
-
path: "calendar.rangeBoth",
|
|
348
|
-
args: ["date"]
|
|
349
|
-
}],
|
|
350
|
-
"@astryx.carousel.label": [{ path: "carousel.label" }],
|
|
351
|
-
"@astryx.carousel.scrollLeft": [{ path: "carousel.scrollLeft" }],
|
|
352
|
-
"@astryx.carousel.scrollRight": [{ path: "carousel.scrollRight" }],
|
|
353
|
-
"@astryx.carousel.slideLabel": [{
|
|
354
|
-
path: "carousel.slide",
|
|
355
|
-
args: ["current", "total"]
|
|
356
|
-
}],
|
|
357
|
-
"@astryx.chat.status.sending": [{ path: "chat.statusSending" }],
|
|
358
|
-
"@astryx.chat.status.sent": [{ path: "chat.statusSent" }],
|
|
359
|
-
"@astryx.chat.status.delivered": [{ path: "chat.statusDelivered" }],
|
|
360
|
-
"@astryx.chat.status.read": [{ path: "chat.statusRead" }],
|
|
361
|
-
"@astryx.chat.status.failed": [{ path: "chat.statusFailed" }],
|
|
362
|
-
"@astryx.chat.messageAriaLabel": [{
|
|
363
|
-
path: "chat.messageStatus",
|
|
364
|
-
args: ["status"]
|
|
365
|
-
}],
|
|
366
|
-
"@astryx.chat.pastedText.expand": [{ path: "chat.expandPastedText" }],
|
|
367
|
-
"@astryx.chatTypingIndicator.one": [{
|
|
368
|
-
path: "chat.typingOne",
|
|
369
|
-
args: ["name"]
|
|
370
|
-
}],
|
|
371
|
-
"@astryx.chat.composer.placeholder": [{ path: "chat.placeholder" }],
|
|
372
|
-
"@astryx.chat.composerDrawer.label": [{ path: "chat.drawerLabel" }],
|
|
373
|
-
"@astryx.chat.composerInput.label": [{ path: "chat.inputLabel" }],
|
|
374
|
-
"@astryx.chat.speechRecognition.noSpeechDetected": [{ path: "chat.noSpeechDetected" }],
|
|
375
|
-
"@astryx.chatComposerDrawer.expand": [{
|
|
376
|
-
path: "chat.drawerExpand",
|
|
377
|
-
args: ["label"]
|
|
378
|
-
}],
|
|
379
|
-
"@astryx.chatComposerDrawer.collapse": [{
|
|
380
|
-
path: "chat.drawerCollapse",
|
|
381
|
-
args: ["label"]
|
|
382
|
-
}],
|
|
383
|
-
"@astryx.chatDictationButton.startDictation": [{ path: "chat.startDictation" }],
|
|
384
|
-
"@astryx.chatDictationButton.stopDictation": [{ path: "chat.stopDictation" }],
|
|
385
|
-
"@astryx.chatLayout.newMessages": [{ path: "chat.newMessages" }],
|
|
386
|
-
"@astryx.chatLayoutScrollButton.scrollToBottom": [{ path: "chat.scrollToBottom" }],
|
|
387
|
-
"@astryx.chatMessage.messageFrom": [{
|
|
388
|
-
path: "chat.messageFrom",
|
|
389
|
-
args: ["sender"]
|
|
390
|
-
}],
|
|
391
|
-
"@astryx.chatSendButton.stop": [{ path: "chat.stop" }],
|
|
392
|
-
"@astryx.chatSendButton.send": [{ path: "chat.send" }],
|
|
393
|
-
"@astryx.chatToolCalls.error": [{
|
|
394
|
-
path: "chat.toolError",
|
|
395
|
-
args: ["message"]
|
|
396
|
-
}],
|
|
397
|
-
"@astryx.chatToolCalls.groupLabel": [{
|
|
398
|
-
path: "chat.toolGroup",
|
|
399
|
-
args: ["count"]
|
|
400
|
-
}],
|
|
401
|
-
"@astryx.chatToolCalls.status.pending": [{ path: "chat.toolPending" }],
|
|
402
|
-
"@astryx.chatToolCalls.status.running": [{ path: "chat.toolRunning" }],
|
|
403
|
-
"@astryx.chatTriggerMenu.suggestions": [{ path: "chat.suggestions" }],
|
|
404
|
-
"@astryx.citation.label": [{
|
|
405
|
-
path: "citation.label",
|
|
406
|
-
args: ["number", "title"]
|
|
407
|
-
}],
|
|
408
|
-
"@astryx.commandPalette.label": [{ path: "commandPalette.label" }],
|
|
409
|
-
"@astryx.commandPalette.emptySearch": [
|
|
410
|
-
{ path: "commandPalette.emptySearch" },
|
|
411
|
-
{ path: "powerSearch.empty" },
|
|
412
|
-
{ path: "tokenizer.empty" },
|
|
413
|
-
{ path: "chat.noResults" }
|
|
414
|
-
],
|
|
415
|
-
"@astryx.commandPalette.emptyBootstrap": [{ path: "commandPalette.emptyBootstrap" }],
|
|
416
|
-
"@astryx.commandPalette.input.placeholder": [{ path: "commandPalette.placeholder" }],
|
|
417
|
-
"@astryx.commandPalette.input.label": [{ path: "commandPalette.inputLabel" }],
|
|
418
|
-
"@astryx.commandPalette.list.label": [{ path: "commandPalette.listLabel" }],
|
|
419
|
-
"@astryx.commandPalette.loading": [{ path: "commandPalette.loading" }],
|
|
420
|
-
"@astryx.commandPalette.noResultsFor": [{
|
|
421
|
-
path: "commandPalette.noResultsFor",
|
|
422
|
-
args: ["query"]
|
|
423
|
-
}],
|
|
424
|
-
"@astryx.commandPalette.resultCount": [{
|
|
425
|
-
path: "commandPalette.resultCount",
|
|
426
|
-
args: ["count"]
|
|
427
|
-
}],
|
|
428
|
-
"@astryx.commandPalette.footer.navigate": [{ path: "commandPalette.navigate" }],
|
|
429
|
-
"@astryx.commandPalette.footer.select": [{ path: "commandPalette.select" }],
|
|
430
|
-
"@astryx.commandPalette.footer.close": [{ path: "commandPalette.close" }],
|
|
431
|
-
"@astryx.dateInput.placeholder": [{ path: "dateInput.placeholder" }],
|
|
432
|
-
"@astryx.dateInput.dialogLabel": [{ path: "dateInput.dialogLabel" }],
|
|
433
|
-
"@astryx.dateInput.openCalendar": [{ path: "dateInput.openCalendar" }],
|
|
434
|
-
"@astryx.dateInput.closeCalendar": [{ path: "dateInput.closeCalendar" }],
|
|
435
|
-
"@astryx.dateInput.clear": [
|
|
436
|
-
{
|
|
437
|
-
path: "dateInput.clear",
|
|
438
|
-
args: ["label"]
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
path: "dateRangeInput.clear",
|
|
442
|
-
args: ["label"]
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
path: "dateTimeInput.clear",
|
|
446
|
-
args: ["label"]
|
|
447
|
-
}
|
|
448
|
-
],
|
|
449
|
-
"@astryx.dateInput.invalidDate": [{ path: "dateInput.invalidDate" }],
|
|
450
|
-
"@astryx.dateRangeInput.placeholder": [{ path: "dateRangeInput.placeholder" }],
|
|
451
|
-
"@astryx.dateRangeInput.dialogLabel": [{ path: "dateRangeInput.dialogLabel" }],
|
|
452
|
-
"@astryx.dateTimeInput.dateTab": [{ path: "dateTimeInput.dateLabel" }],
|
|
453
|
-
"@astryx.dateTimeInput.timeTab": [{ path: "dateTimeInput.timeLabel" }],
|
|
454
|
-
"@astryx.dateTimeInput.timeHint12h": [{ path: "timeInput.formatHint12" }],
|
|
455
|
-
"@astryx.dateTimeInput.timeHint24h": [{ path: "timeInput.formatHint24" }],
|
|
456
|
-
"@astryx.dropdownMenu.back": [{ path: "dropdownMenu.back" }],
|
|
457
|
-
"@astryx.dropdownMenu.backTo": [{
|
|
458
|
-
path: "dropdownMenu.backTo",
|
|
459
|
-
args: ["parent"]
|
|
460
|
-
}],
|
|
461
|
-
"@astryx.fileInput.placeholder": [{ path: "fileInput.placeholder" }],
|
|
462
|
-
"@astryx.fileInput.placeholderMultiple": [{ path: "fileInput.placeholderMultiple" }],
|
|
463
|
-
"@astryx.fileInput.required": [{ path: "fileInput.required" }],
|
|
464
|
-
"@astryx.fileInput.fileSelected": [{
|
|
465
|
-
path: "fileInput.fileSelected",
|
|
466
|
-
args: ["fileName"]
|
|
467
|
-
}],
|
|
468
|
-
"@astryx.fileInput.filesSelected": [{
|
|
469
|
-
path: "fileInput.filesSelected",
|
|
470
|
-
args: ["count"]
|
|
471
|
-
}],
|
|
472
|
-
"@astryx.fileInput.errorInvalidType": [{
|
|
473
|
-
path: "fileInput.errorType",
|
|
474
|
-
args: ["fileName"]
|
|
475
|
-
}],
|
|
476
|
-
"@astryx.fileInput.errorMaxSize": [{
|
|
477
|
-
path: "fileInput.errorSize",
|
|
478
|
-
args: ["fileName", "maxSize"]
|
|
479
|
-
}],
|
|
480
|
-
"@astryx.fileInput.errorMaxFiles": [{
|
|
481
|
-
path: "fileInput.errorCount",
|
|
482
|
-
args: ["maxFiles"]
|
|
483
|
-
}],
|
|
484
|
-
"@astryx.selector.clearLabel": [{
|
|
485
|
-
path: "selector.clearField",
|
|
486
|
-
args: ["label"]
|
|
487
|
-
}],
|
|
488
|
-
"@astryx.multiSelector.clearAll": [{
|
|
489
|
-
path: "multiSelector.clearAll",
|
|
490
|
-
args: ["label"]
|
|
491
|
-
}],
|
|
492
|
-
"@astryx.tabList.label": [{ path: "tabList.label" }],
|
|
493
|
-
"@astryx.inputClearButton.tooltip": [
|
|
494
|
-
{ path: "fileInput.clear" },
|
|
495
|
-
{ path: "selector.clear" },
|
|
496
|
-
{ path: "multiSelector.clear" }
|
|
497
|
-
],
|
|
498
|
-
"@astryx.input.statusButton.error": [{ path: "input.statusError" }],
|
|
499
|
-
"@astryx.input.statusButton.warning": [{ path: "input.statusWarning" }],
|
|
500
|
-
"@astryx.input.statusButton.success": [{ path: "input.statusSuccess" }],
|
|
501
|
-
"@astryx.input.readOnly": [{ path: "selector.readOnly" }, { path: "multiSelector.readOnly" }],
|
|
502
|
-
"@astryx.button.loading": [
|
|
503
|
-
{ path: "checkboxList.loading" },
|
|
504
|
-
{ path: "selector.loading" },
|
|
505
|
-
{ path: "multiSelector.loading" },
|
|
506
|
-
{ path: "dateInput.loading" }
|
|
507
|
-
],
|
|
508
|
-
"@astryx.appShell.skipToContent": [{ path: "layout.skipToContent" }],
|
|
509
|
-
"@astryx.resizable.handle.label": [{ path: "layout.resizeHandle" }],
|
|
510
|
-
"@astryx.resizable.collapsed": [{ path: "layout.collapsed" }],
|
|
511
|
-
"@astryx.appShell.mobileNavigation": [{ path: "layout.mobileNavigation" }],
|
|
512
|
-
"@astryx.lightbox.close": [{ path: "lightbox.close" }],
|
|
513
|
-
"@astryx.lightbox.previous": [{ path: "lightbox.previous" }],
|
|
514
|
-
"@astryx.lightbox.next": [{ path: "lightbox.next" }],
|
|
515
|
-
"@astryx.lightbox.mediaViewer": [{ path: "lightbox.mediaViewer" }],
|
|
516
|
-
"@astryx.lightbox.zoom": [{ path: "lightbox.zoom" }],
|
|
517
|
-
"@astryx.lightbox.zoomedIn": [{ path: "lightbox.zoomedIn" }],
|
|
518
|
-
"@astryx.lightbox.zoomedOut": [{ path: "lightbox.zoomedOut" }],
|
|
519
|
-
"@astryx.lightbox.imagePosition": [{
|
|
520
|
-
path: "lightbox.imagePosition",
|
|
521
|
-
args: ["index", "total"]
|
|
522
|
-
}],
|
|
523
|
-
"@astryx.lightbox.mediaPosition": [{
|
|
524
|
-
path: "lightbox.mediaPosition",
|
|
525
|
-
args: [
|
|
526
|
-
"alt",
|
|
527
|
-
"index",
|
|
528
|
-
"total"
|
|
529
|
-
]
|
|
530
|
-
}],
|
|
531
|
-
"@astryx.markdownHeadingLinks.copy": [{
|
|
532
|
-
path: "markdown.headingLink",
|
|
533
|
-
args: ["heading"]
|
|
534
|
-
}],
|
|
535
|
-
"@astryx.markdown.taskList": [{ path: "markdown.taskList" }],
|
|
536
|
-
"@astryx.metadataList.showMore": [{ path: "metadataList.showMore" }],
|
|
537
|
-
"@astryx.metadataList.showLess": [{ path: "metadataList.showLess" }],
|
|
538
|
-
"@astryx.multiSelector.selectPlaceholder": [{ path: "multiSelector.placeholder" }],
|
|
539
|
-
"@astryx.multiSelector.searchPlaceholder": [{ path: "multiSelector.search" }],
|
|
540
|
-
"@astryx.multiSelector.empty": [{ path: "multiSelector.empty" }],
|
|
541
|
-
"@astryx.multiSelector.emptySearchResults": [{ path: "multiSelector.emptySearch" }],
|
|
542
|
-
"@astryx.multiSelector.selectAll": [{ path: "multiSelector.selectAll" }],
|
|
543
|
-
"@astryx.multiSelector.resultCount": [{
|
|
544
|
-
path: "multiSelector.resultCount",
|
|
545
|
-
args: ["count"]
|
|
546
|
-
}],
|
|
547
|
-
"@astryx.multiSelector.createOption": [{
|
|
548
|
-
path: "multiSelector.create",
|
|
549
|
-
args: ["query"]
|
|
550
|
-
}, {
|
|
551
|
-
path: "tokenizer.create",
|
|
552
|
-
args: ["query"]
|
|
553
|
-
}],
|
|
554
|
-
"@astryx.multiSelector.optionCreated": [{
|
|
555
|
-
path: "multiSelector.created",
|
|
556
|
-
args: ["label"]
|
|
557
|
-
}],
|
|
558
|
-
"@astryx.table.selection.selectedCount": [{
|
|
559
|
-
path: "table.selectedCount",
|
|
560
|
-
args: ["count"]
|
|
561
|
-
}, {
|
|
562
|
-
path: "multiSelector.selected",
|
|
563
|
-
args: ["count"]
|
|
564
|
-
}],
|
|
565
|
-
"@astryx.sideNav.label": [{ path: "nav.sideNav" }],
|
|
566
|
-
"@astryx.topNav.landmarkLabel": [{ path: "nav.topNav" }],
|
|
567
|
-
"@astryx.mobileNav.navigation": [{ path: "nav.mobileNav" }],
|
|
568
|
-
"@astryx.sideNavCollapseButton.collapseSidebar": [{ path: "nav.collapseSidebar" }],
|
|
569
|
-
"@astryx.sideNavCollapseButton.expandSidebar": [{ path: "nav.expandSidebar" }],
|
|
570
|
-
"@astryx.sideNav.heading.openMenu": [{ path: "nav.openMenu" }],
|
|
571
|
-
"@astryx.mobileNav.toggle.open": [{ path: "nav.openNavigation" }],
|
|
572
|
-
"@astryx.mobileNav.closeNavigation": [{ path: "nav.close" }],
|
|
573
|
-
"@astryx.avatarGroup.overflow": [{
|
|
574
|
-
path: "nav.avatarOverflow",
|
|
575
|
-
args: ["count"]
|
|
576
|
-
}],
|
|
577
|
-
"@astryx.avatar.nameWithStatus": [{
|
|
578
|
-
path: "nav.avatarNameWithStatus",
|
|
579
|
-
args: ["name", "status"]
|
|
580
|
-
}],
|
|
581
|
-
"@astryx.sideNavItem.expand": [{
|
|
582
|
-
path: "nav.expandItem",
|
|
583
|
-
args: ["label"]
|
|
584
|
-
}],
|
|
585
|
-
"@astryx.sideNavItem.collapse": [{
|
|
586
|
-
path: "nav.collapseItem",
|
|
587
|
-
args: ["label"]
|
|
588
|
-
}],
|
|
589
|
-
"@astryx.sideNavItem.submenuLabel": [{
|
|
590
|
-
path: "nav.submenu",
|
|
591
|
-
args: ["label"]
|
|
592
|
-
}],
|
|
593
|
-
"@astryx.numberInput.incrementLabel": [{
|
|
594
|
-
path: "numberInput.increment",
|
|
595
|
-
args: ["label"]
|
|
596
|
-
}],
|
|
597
|
-
"@astryx.numberInput.decrementLabel": [{
|
|
598
|
-
path: "numberInput.decrement",
|
|
599
|
-
args: ["label"]
|
|
600
|
-
}],
|
|
601
|
-
"@astryx.outline.label": [{ path: "outline.label" }],
|
|
602
|
-
"@astryx.powersearch.label": [{ path: "powerSearch.label" }],
|
|
603
|
-
"@astryx.powersearch.placeholder": [{ path: "powerSearch.placeholder" }],
|
|
604
|
-
"@astryx.powersearch.resultCount": [{
|
|
605
|
-
path: "powerSearch.resultCount",
|
|
606
|
-
args: ["count"]
|
|
607
|
-
}],
|
|
608
|
-
"@astryx.powersearch.valueEditor.itemsCount": [{
|
|
609
|
-
path: "powerSearch.itemsCount",
|
|
610
|
-
args: ["count"]
|
|
611
|
-
}],
|
|
612
|
-
"@astryx.powersearch.valueEditor.entitiesCount": [{
|
|
613
|
-
path: "powerSearch.entitiesCount",
|
|
614
|
-
args: ["count"]
|
|
615
|
-
}],
|
|
616
|
-
"@astryx.powersearch.valueEditor.filtersCount": [{
|
|
617
|
-
path: "powerSearch.filtersCount",
|
|
618
|
-
args: ["count"]
|
|
619
|
-
}],
|
|
620
|
-
"@astryx.powersearch.valueEditor.dateRange": [{ path: "powerSearch.dateRange" }],
|
|
621
|
-
"@astryx.powersearch.editor.field": [{ path: "powerSearch.editor.field" }],
|
|
622
|
-
"@astryx.powersearch.editor.operator": [{ path: "powerSearch.editor.operator" }],
|
|
623
|
-
"@astryx.powersearch.editor.addFilter": [{ path: "powerSearch.editor.addFilter" }],
|
|
624
|
-
"@astryx.powersearch.editor.removeFilter": [{ path: "powerSearch.editor.removeFilter" }],
|
|
625
|
-
"@astryx.powersearch.editor.group": [{ path: "powerSearch.editor.group" }],
|
|
626
|
-
"@astryx.powersearch.editor.delete": [{ path: "powerSearch.editor.delete" }],
|
|
627
|
-
"@astryx.powersearch.editor.cancel": [{ path: "powerSearch.editor.cancel" }],
|
|
628
|
-
"@astryx.powersearch.editor.apply": [{ path: "powerSearch.editor.apply" }],
|
|
629
|
-
...operatorTargets(),
|
|
630
|
-
...valueTargets(),
|
|
631
|
-
"@astryx.selector.placeholder": [{ path: "selector.placeholder" }],
|
|
632
|
-
"@astryx.selector.searchPlaceholder": [{ path: "selector.search" }],
|
|
633
|
-
"@astryx.selector.empty": [{ path: "selector.empty" }],
|
|
634
|
-
"@astryx.selector.emptySearchResults": [{ path: "selector.emptySearch" }],
|
|
635
|
-
"@astryx.selector.resultCount": [{
|
|
636
|
-
path: "selector.resultCount",
|
|
637
|
-
args: ["count"]
|
|
638
|
-
}],
|
|
639
|
-
"@astryx.stepper.label": [{ path: "stepper.progress" }],
|
|
640
|
-
"@astryx.step.optional": [{ path: "stepper.optional" }],
|
|
641
|
-
"@astryx.stepper.previousStep": [{ path: "stepper.previous" }],
|
|
642
|
-
"@astryx.stepper.nextStep": [{ path: "stepper.next" }],
|
|
643
|
-
"@astryx.step.status.completed": [{ path: "stepper.status.completed" }],
|
|
644
|
-
"@astryx.step.status.warning": [{ path: "stepper.status.warning" }],
|
|
645
|
-
"@astryx.step.status.error": [{ path: "stepper.status.error" }],
|
|
646
|
-
"@astryx.table.label": [{ path: "table.label" }],
|
|
647
|
-
"@astryx.table.noData": [{ path: "table.noData" }],
|
|
648
|
-
"@astryx.table.filter.allPlaceholder": [{ path: "table.filterAll" }],
|
|
649
|
-
"@astryx.table.filter.reset": [{ path: "table.reset" }],
|
|
650
|
-
"@astryx.table.filter.apply": [{ path: "table.apply" }],
|
|
651
|
-
"@astryx.table.selection.selectAllRows": [{ path: "table.selectAllRows" }],
|
|
652
|
-
"@astryx.table.selection.selectRow": [{ path: "table.selectRow" }],
|
|
653
|
-
"@astryx.table.selection.selectRowNamed": [{
|
|
654
|
-
path: "table.selectRowNamed",
|
|
655
|
-
args: ["label"]
|
|
656
|
-
}],
|
|
657
|
-
"@astryx.table.sort.ascending": [{ path: "table.sortAscending" }],
|
|
658
|
-
"@astryx.table.sort.descending": [{ path: "table.sortDescending" }],
|
|
659
|
-
"@astryx.table.sort.clear": [{ path: "table.clearSort" }],
|
|
660
|
-
"@astryx.table.sort.direction.ascending": [{ path: "table.sortedAscending" }],
|
|
661
|
-
"@astryx.table.sort.direction.descending": [{ path: "table.sortedDescending" }],
|
|
662
|
-
"@astryx.table.sort.sortBy": [{
|
|
663
|
-
path: "table.sortBy",
|
|
664
|
-
args: ["label"]
|
|
665
|
-
}],
|
|
666
|
-
"@astryx.table.selection.bulkActionsLabel": [{ path: "table.bulkActionsLabel" }],
|
|
667
|
-
"@astryx.table.selection.clearAll": [{ path: "table.clearAll" }],
|
|
668
|
-
"@astryx.table.pagination.label": [{ path: "table.paginationLabel" }],
|
|
669
|
-
"@astryx.table.pagination.labelAbove": [{
|
|
670
|
-
path: "table.paginationLabelAbove",
|
|
671
|
-
args: ["label"]
|
|
672
|
-
}],
|
|
673
|
-
"@astryx.table.pagination.labelBelow": [{
|
|
674
|
-
path: "table.paginationLabelBelow",
|
|
675
|
-
args: ["label"]
|
|
676
|
-
}],
|
|
677
|
-
"@astryx.tableGroupedRows.expandGroup": [{
|
|
678
|
-
path: "table.expandGroup",
|
|
679
|
-
args: ["groupKey"]
|
|
680
|
-
}],
|
|
681
|
-
"@astryx.tableGroupedRows.collapseGroup": [{
|
|
682
|
-
path: "table.collapseGroup",
|
|
683
|
-
args: ["groupKey"]
|
|
684
|
-
}],
|
|
685
|
-
"@astryx.tableRowExpansion.expandRow": [{ path: "table.expandRow" }],
|
|
686
|
-
"@astryx.tableRowExpansion.collapseRow": [{ path: "table.collapseRow" }],
|
|
687
|
-
"@astryx.tableRowExpansion.expandAllRows": [{ path: "table.expandAllRows" }],
|
|
688
|
-
"@astryx.tableRowExpansion.collapseAllRows": [{ path: "table.collapseAllRows" }],
|
|
689
|
-
"@astryx.tableRowExpansion.columnHeader": [{ path: "table.rowExpansion" }],
|
|
690
|
-
"@astryx.table.rowStatus.columnHeader": [{ path: "table.rowStatus" }],
|
|
691
|
-
"@astryx.thumbnail.remove": [{
|
|
692
|
-
path: "thumbnail.remove",
|
|
693
|
-
args: ["accessibleName"]
|
|
694
|
-
}],
|
|
695
|
-
"@astryx.thumbnail.open": [{
|
|
696
|
-
path: "thumbnail.open",
|
|
697
|
-
args: ["accessibleName"]
|
|
698
|
-
}],
|
|
699
|
-
"@astryx.thumbnail.fallbackName": [{ path: "thumbnail.fallbackName" }],
|
|
700
|
-
"@astryx.timeInput.placeholder": [{ path: "timeInput.placeholder" }],
|
|
701
|
-
"@astryx.timeInput.clearLabel": [{
|
|
702
|
-
path: "timeInput.clear",
|
|
703
|
-
args: ["label"]
|
|
704
|
-
}],
|
|
705
|
-
"@astryx.timestamp.copyValue": [{
|
|
706
|
-
path: "timestamp.copyValue",
|
|
707
|
-
args: ["value"]
|
|
708
|
-
}],
|
|
709
|
-
"@astryx.timestamp.copy": [{ path: "timestamp.copy" }],
|
|
710
|
-
"@astryx.timestamp.copied": [{ path: "timestamp.copied" }],
|
|
711
|
-
"@astryx.timestamp.detailsLabel": [{ path: "timestamp.detailsLabel" }],
|
|
712
|
-
"@astryx.token.remove": [{
|
|
713
|
-
path: "token.remove",
|
|
714
|
-
args: ["label"]
|
|
715
|
-
}],
|
|
716
|
-
"@astryx.tokenizer.clearAll": [{ path: "tokenizer.clear" }, { path: "powerSearch.clear" }],
|
|
717
|
-
"@astryx.tokenizer.tokenAdded": [{
|
|
718
|
-
path: "tokenizer.added",
|
|
719
|
-
args: ["label"]
|
|
720
|
-
}],
|
|
721
|
-
"@astryx.tokenizer.tokenRemoved": [{
|
|
722
|
-
path: "tokenizer.removed",
|
|
723
|
-
args: ["label"]
|
|
724
|
-
}],
|
|
725
|
-
"@astryx.typeahead.searchPlaceholder": [{ path: "typeahead.placeholder" }],
|
|
726
|
-
"@astryx.typeahead.emptySearchResults": [{ path: "typeahead.empty" }],
|
|
727
|
-
"@astryx.typeahead.loading": [{ path: "typeahead.loading" }],
|
|
728
|
-
"@astryx.typeahead.clearSelection": [{ path: "typeahead.clear" }],
|
|
729
|
-
"@astryx.typeahead.searchResults": [
|
|
730
|
-
{ path: "typeahead.results" },
|
|
731
|
-
{ path: "tokenizer.results" },
|
|
732
|
-
{ path: "powerSearch.results" }
|
|
733
|
-
],
|
|
734
|
-
"@astryx.treeList.toggleChildren": [{ path: "treeList.toggleChildren" }]
|
|
735
|
-
};
|
|
736
|
-
//#endregion
|
|
737
|
-
//#region src/locale/loadCatalog.ts
|
|
738
|
-
/**
|
|
739
|
-
* 把一份原版 Astryx locale JSON 映射成 `AstryxMessages`。
|
|
740
|
-
* 内置的 `en` 和 `zh-CN` 不会被改掉。返回值要交给 `provideAstryxLocale` 的第二个参数。
|
|
741
|
-
* `unmapped` 列出每一个没写进文案树的键。
|
|
742
|
-
*/
|
|
743
|
-
function loadAstryxCatalog(locale, catalog) {
|
|
744
|
-
const messages = cloneMessages(astryxMessages.en);
|
|
745
|
-
const tree = messages;
|
|
746
|
-
const assigned = /* @__PURE__ */ new Set();
|
|
747
|
-
const unmapped = [];
|
|
748
|
-
const present = /* @__PURE__ */ new Set();
|
|
749
|
-
for (const key of Object.keys(catalog).sort()) {
|
|
750
|
-
present.add(key);
|
|
751
|
-
const read = readMessage(catalog[key]);
|
|
752
|
-
if (read.message == null) {
|
|
753
|
-
unmapped.push({
|
|
754
|
-
key,
|
|
755
|
-
message: read.invalid,
|
|
756
|
-
reason: "invalid-entry"
|
|
757
|
-
});
|
|
758
|
-
continue;
|
|
759
|
-
}
|
|
760
|
-
const targets = upstreamMessageMap[key];
|
|
761
|
-
if (targets == null) {
|
|
762
|
-
unmapped.push({
|
|
763
|
-
key,
|
|
764
|
-
message: read.message,
|
|
765
|
-
reason: "no-slot"
|
|
766
|
-
});
|
|
767
|
-
continue;
|
|
768
|
-
}
|
|
769
|
-
if (!writeTargets(tree, assigned, targets, read.message, locale)) unmapped.push({
|
|
770
|
-
key,
|
|
771
|
-
message: read.message,
|
|
772
|
-
reason: failureReason(targets, assigned, read.message)
|
|
773
|
-
});
|
|
774
|
-
}
|
|
775
|
-
const missingKeys = Object.keys(upstreamMessageMap).filter((key) => !present.has(key)).sort();
|
|
776
|
-
const fallbackFields = collectLeaves(tree).filter((path) => !assigned.has(path)).sort();
|
|
777
|
-
unmapped.sort((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0);
|
|
778
|
-
return {
|
|
779
|
-
locale,
|
|
780
|
-
messages,
|
|
781
|
-
unmapped,
|
|
782
|
-
missingKeys,
|
|
783
|
-
fallbackFields
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
function writeTargets(tree, assigned, targets, message, locale) {
|
|
787
|
-
let wrote = false;
|
|
788
|
-
let names;
|
|
789
|
-
try {
|
|
790
|
-
names = icuPlaceholderNames(message);
|
|
791
|
-
} catch {
|
|
792
|
-
return false;
|
|
793
|
-
}
|
|
794
|
-
for (const target of targets) {
|
|
795
|
-
if (assigned.has(target.path)) continue;
|
|
796
|
-
const args = target.args ?? [];
|
|
797
|
-
if (names.some((name) => !args.includes(name))) continue;
|
|
798
|
-
let value;
|
|
799
|
-
try {
|
|
800
|
-
value = target.args == null ? cleanup(formatIcu(message, {}, locale)) : bindMessage(message, target.args, locale);
|
|
801
|
-
} catch {
|
|
802
|
-
continue;
|
|
803
|
-
}
|
|
804
|
-
setPath(tree, target.path, value);
|
|
805
|
-
assigned.add(target.path);
|
|
806
|
-
wrote = true;
|
|
807
|
-
}
|
|
808
|
-
return wrote;
|
|
809
|
-
}
|
|
810
|
-
function failureReason(targets, assigned, message) {
|
|
811
|
-
let names;
|
|
812
|
-
try {
|
|
813
|
-
names = icuPlaceholderNames(message);
|
|
814
|
-
} catch {
|
|
815
|
-
return "unsupported-message";
|
|
816
|
-
}
|
|
817
|
-
const openTargets = targets.filter((target) => !assigned.has(target.path));
|
|
818
|
-
if (openTargets.length === 0) return "slot-taken";
|
|
819
|
-
return openTargets.some((target) => {
|
|
820
|
-
const args = target.args ?? [];
|
|
821
|
-
return names.some((name) => !args.includes(name));
|
|
822
|
-
}) ? "placeholder-mismatch" : "unsupported-message";
|
|
823
|
-
}
|
|
824
|
-
function bindMessage(message, args, locale) {
|
|
825
|
-
return (...values) => {
|
|
826
|
-
const bag = {};
|
|
827
|
-
args.forEach((name, index) => {
|
|
828
|
-
bag[name] = coerce(values[index]);
|
|
829
|
-
});
|
|
830
|
-
return cleanup(formatIcu(message, bag, locale));
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
function coerce(value) {
|
|
834
|
-
if (typeof value === "number" || typeof value === "string") return value;
|
|
835
|
-
if (value == null) return void 0;
|
|
836
|
-
return String(value);
|
|
837
|
-
}
|
|
838
|
-
function cleanup(text) {
|
|
839
|
-
return text.replace(/[ \t]{2,}/g, " ").trim();
|
|
840
|
-
}
|
|
841
|
-
function readMessage(entry) {
|
|
842
|
-
if (typeof entry === "string") return { message: entry };
|
|
843
|
-
if (entry != null && typeof entry === "object" && typeof entry.defaultMessage === "string") return { message: entry.defaultMessage };
|
|
844
|
-
return { invalid: JSON.stringify(entry) };
|
|
845
|
-
}
|
|
846
|
-
function cloneMessages(source) {
|
|
847
|
-
return cloneValue(source);
|
|
848
|
-
}
|
|
849
|
-
function cloneValue(value) {
|
|
850
|
-
if (typeof value === "function" || value == null || typeof value !== "object") return value;
|
|
851
|
-
const copy = {};
|
|
852
|
-
for (const [key, child] of Object.entries(value)) copy[key] = cloneValue(child);
|
|
853
|
-
return copy;
|
|
854
|
-
}
|
|
855
|
-
function setPath(tree, path, value) {
|
|
856
|
-
const parts = path.split(".");
|
|
857
|
-
let cursor = tree;
|
|
858
|
-
for (const part of parts.slice(0, -1)) {
|
|
859
|
-
const next = cursor[part];
|
|
860
|
-
if (next == null || typeof next === "function" || typeof next === "string") throw new Error(`消息路径不存在:${path}`);
|
|
861
|
-
cursor = next;
|
|
862
|
-
}
|
|
863
|
-
const leaf = parts[parts.length - 1];
|
|
864
|
-
if (leaf == null || !Object.hasOwn(cursor, leaf)) throw new Error(`消息路径不存在:${path}`);
|
|
865
|
-
cursor[leaf] = value;
|
|
866
|
-
}
|
|
867
|
-
function collectLeaves(tree, prefix = "") {
|
|
868
|
-
const paths = [];
|
|
869
|
-
for (const [key, value] of Object.entries(tree)) {
|
|
870
|
-
const path = prefix === "" ? key : `${prefix}.${key}`;
|
|
871
|
-
if (typeof value === "string" || typeof value === "function") paths.push(path);
|
|
872
|
-
else paths.push(...collectLeaves(value, path));
|
|
873
|
-
}
|
|
874
|
-
return paths;
|
|
875
|
-
}
|
|
876
|
-
//#endregion
|
|
877
|
-
export { icuPlaceholderNames as i, upstreamMessageMap as n, formatIcu as r, loadAstryxCatalog as t };
|