@persona/design-system 0.9.1 → 0.10.1
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/CHANGELOG.md +56 -0
- package/README.md +1 -1
- package/dist/Accordion.d.mts +1 -1
- package/dist/AccordionItem.d.mts +1 -1
- package/dist/{Action-BleGvmsy.d.mts → Action-DT8WqfEg.d.mts} +3 -3
- package/dist/Action.d.mts +1 -1
- package/dist/AdvancedFilterRuleRow.d.mts +2 -2
- package/dist/AdvancedFilterRulesPopover.d.mts +2 -2
- package/dist/ArrayValueControl.d.mts +1 -1
- package/dist/Attribute.d.mts +4 -4
- package/dist/{Badge-BYa-iqNE.mjs → Badge-Bvn3afds.mjs} +2 -2
- package/dist/{Badge-BYa-iqNE.mjs.map → Badge-Bvn3afds.mjs.map} +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumb-CEHEUe8l.d.mts → Breadcrumb-BDbY1Ffu.d.mts} +1 -1
- package/dist/Breadcrumb.d.mts +1 -1
- package/dist/{Breadcrumbs-BQ-Gj6UV.d.mts → Breadcrumbs-C2ThOYJ-.d.mts} +2 -2
- package/dist/{Breadcrumbs-BmlndU4V.mjs → Breadcrumbs-CQUe9VTM.mjs} +8 -8
- package/dist/{Breadcrumbs-BmlndU4V.mjs.map → Breadcrumbs-CQUe9VTM.mjs.map} +1 -1
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-Dx7mHjWC.d.mts → Button-CyjqQa5v.d.mts} +5 -5
- package/dist/Button.d.mts +1 -1
- package/dist/{Calendar-BvsTQ3e1.d.mts → Calendar-CkjYG7Mj.d.mts} +1 -1
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-BPY0OU7e.d.mts → Card-CzRHVUFo.d.mts} +4 -4
- package/dist/Card.d.mts +1 -1
- package/dist/Card2.d.mts +1 -1
- package/dist/CardGrouping.d.mts +2 -2
- package/dist/{CardV2-Cq4QODeE.mjs → CardV2-Dp4eHSE-.mjs} +11 -11
- package/dist/{CardV2-Cq4QODeE.mjs.map → CardV2-Dp4eHSE-.mjs.map} +1 -1
- package/dist/{Checkbox-CVa8WOf2.d.mts → Checkbox-B2MZShdu.d.mts} +1 -1
- package/dist/{Checkbox-Cttn1t8T.mjs → Checkbox-BaJ-dGdX.mjs} +5 -5
- package/dist/{Checkbox-Cttn1t8T.mjs.map → Checkbox-BaJ-dGdX.mjs.map} +1 -1
- package/dist/Checkbox.d.mts +1 -1
- package/dist/{CheckboxGroupField-BpHN_2QP.d.mts → CheckboxGroupField-4dc7YXJY.d.mts} +3 -3
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-C4C2P8lF.d.mts → Combobox-Bm2eSg56.d.mts} +3 -3
- package/dist/{Combobox-CsXnJKvB.mjs → Combobox-CcFJo68g.mjs} +19 -11
- package/dist/Combobox-CcFJo68g.mjs.map +1 -0
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-2nVpt8oj.d.mts → ComboboxBase-B7ZcqU9p.d.mts} +7 -7
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-BvJ--m6z.d.mts → ComboboxMultiSelect-BkdRrH6K.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-BWrnRA2x.d.mts → ComboboxSingleSelect-DIBRZmvS.d.mts} +4 -4
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-CmTT9iuT.d.mts → CompactBar-CfrrZ69k.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-C0orlWwb.mjs → ConfigFormGroup-CidT_cE9.mjs} +2 -2
- package/dist/{ConfigFormGroup-C0orlWwb.mjs.map → ConfigFormGroup-CidT_cE9.mjs.map} +1 -1
- package/dist/{ControlBar-Cg36sjz3.d.mts → ControlBar-D9KflqmH.d.mts} +22 -9
- package/dist/ControlBar.d.mts +1 -1
- package/dist/DataTable--_f1Obhj.d.mts +441 -0
- package/dist/DataTable-BoAAKhVH.mjs +1547 -0
- package/dist/DataTable-BoAAKhVH.mjs.map +1 -0
- package/dist/DataTable.d.mts +2 -396
- package/dist/{DateField-BXUuqbnb.d.mts → DateField-CwSq77Ri.d.mts} +2 -2
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-DQHVCGnP.mjs → DatePicker-D0cvVbzq.mjs} +374 -374
- package/dist/DatePicker-D0cvVbzq.mjs.map +1 -0
- package/dist/{DatePicker-Cmn1vViU.d.mts → DatePicker-DRhY_0st.d.mts} +2 -2
- package/dist/DatePicker.d.mts +1 -1
- package/dist/{DateRangePicker-CKhp9Obv.d.mts → DateRangePicker-CLuBLF1q.d.mts} +3 -3
- package/dist/DateRangePicker.d.mts +1 -1
- package/dist/DateRangeValueControl.d.mts +2 -2
- package/dist/DateValueControl.d.mts +1 -1
- package/dist/{DropdownButton-C9wWnB5w.mjs → DropdownButton-5oNcpsOq.mjs} +3 -3
- package/dist/{DropdownButton-C9wWnB5w.mjs.map → DropdownButton-5oNcpsOq.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-BZ62b8Cv.d.mts → DropdownMenu-Bie2cWjb.d.mts} +3 -3
- package/dist/{DropdownMenu-CPE8Q56k.mjs → DropdownMenu-CedsmO5h.mjs} +2 -2
- package/dist/{DropdownMenu-CPE8Q56k.mjs.map → DropdownMenu-CedsmO5h.mjs.map} +1 -1
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-oCHtJzEB.d.mts → ErrorProps-DH0fzeGf.d.mts} +1 -1
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-DAk_3PhH.d.mts → FieldRegistry-B5E-GN91.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-C7ch6kYM.d.mts → FilterBar-BQWpTi2b.d.mts} +4 -4
- package/dist/FilterBar.d.mts +1 -1
- package/dist/FilterPickerMenu.d.mts +2 -2
- package/dist/FilterPill.d.mts +1 -1
- package/dist/FilterPopover.d.mts +1 -1
- package/dist/FloatValueControl.d.mts +1 -1
- package/dist/FloatingActionBar-CpvLefPm.d.mts +41 -0
- package/dist/FloatingActionBar.d.mts +2 -41
- package/dist/{FormControl-CD_FdAXA.mjs → FormControl-C4CiA0H-.mjs} +4 -4
- package/dist/{FormControl-CD_FdAXA.mjs.map → FormControl-C4CiA0H-.mjs.map} +1 -1
- package/dist/{FormControl-DX4vtUp6.d.mts → FormControl-DEG_0oXt.d.mts} +3 -3
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +2 -2
- package/dist/{FormField-DjysBTKn.mjs → FormField-C4B2qFgh.mjs} +15 -15
- package/dist/{FormField-DjysBTKn.mjs.map → FormField-C4B2qFgh.mjs.map} +1 -1
- package/dist/{FormField-C80kGAIV.d.mts → FormField-mLbXDJ9B.d.mts} +2 -2
- package/dist/FormField.d.mts +1 -1
- package/dist/{Grid-D0mlxk8_.mjs → Grid-DXVkhyNQ.mjs} +1 -1
- package/dist/{Grid-D0mlxk8_.mjs.map → Grid-DXVkhyNQ.mjs.map} +1 -1
- package/dist/{Header-C-a5fL3k.d.mts → Header-ayDu4VWE.d.mts} +2 -2
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-hhMFkKmn.d.mts → HelperTooltip-BB9Vznnx.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/HighlightedText.d.mts +3 -3
- package/dist/{HoverCopyableField-Cgu3W31s.mjs → HoverCopyableField-D-BubaRd.mjs} +4 -4
- package/dist/{HoverCopyableField-Cgu3W31s.mjs.map → HoverCopyableField-D-BubaRd.mjs.map} +1 -1
- package/dist/{I18nContext-ioYM_vqG.d.mts → I18nContext-TXS9M8t5.d.mts} +2 -2
- package/dist/I18nContext.d.mts +1 -1
- package/dist/{IconButton-DJ3L_ZqN.d.mts → IconButton-Bigvu1Q4.d.mts} +2 -2
- package/dist/{IconButton-D4awF770.mjs → IconButton-HWx5Hlmi.mjs} +14 -11
- package/dist/{IconButton-D4awF770.mjs.map → IconButton-HWx5Hlmi.mjs.map} +1 -1
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +4 -3
- package/dist/IndexTableLayout.d.mts +45 -0
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-D3lXfJHq.d.mts → Input-Bg4bi6VZ.d.mts} +4 -4
- package/dist/{Input-DD4jzJhK.mjs → Input-Dap055xf.mjs} +5 -5
- package/dist/{Input-DD4jzJhK.mjs.map → Input-Dap055xf.mjs.map} +1 -1
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-BU9iiBBz.d.mts → InputProps-Bl-G826g.d.mts} +2 -2
- package/dist/InputProps.d.mts +1 -1
- package/dist/Inserter-BKVrJ4M5.d.mts +12 -0
- package/dist/Inserter.d.mts +2 -12
- package/dist/IntegerValueControl.d.mts +1 -1
- package/dist/{Link-DGZu4J0x.mjs → Link-Cf__H8gD.mjs} +4 -4
- package/dist/{Link-DGZu4J0x.mjs.map → Link-Cf__H8gD.mjs.map} +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/{ListBox-CjGb0mMY.d.mts → ListBox-DIk8suJM.d.mts} +3 -3
- package/dist/{ListBox-BhWLad_L.mjs → ListBox-eoyBHtnJ.mjs} +12 -12
- package/dist/{ListBox-BhWLad_L.mjs.map → ListBox-eoyBHtnJ.mjs.map} +1 -1
- package/dist/ListBox.d.mts +1 -1
- package/dist/{ListBoxField-BUkPeLiB.d.mts → ListBoxField-DF8rqPsu.d.mts} +4 -4
- package/dist/ListBoxField.d.mts +1 -1
- package/dist/LoadingShimmer.d.mts +2 -2
- package/dist/{LogicRow-Bt6NPLOd.d.mts → LogicRow-uxpe1vZ1.d.mts} +3 -3
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/MatchHighlight.d.mts +1 -1
- package/dist/{Menu-BMrsN-Jz.d.mts → Menu-CrThaUX2.d.mts} +4 -4
- package/dist/{Menu-DlN0A5Nb.mjs → Menu-Dw6Rcpk6.mjs} +4 -4
- package/dist/{Menu-DlN0A5Nb.mjs.map → Menu-Dw6Rcpk6.mjs.map} +1 -1
- package/dist/Menu.d.mts +1 -1
- package/dist/{Modal-BoeGuR-h.d.mts → Modal-BuxggahW.d.mts} +7 -3
- package/dist/{Modal-Cs5cZpEr.mjs → Modal-kjUptzg1.mjs} +8 -6
- package/dist/Modal-kjUptzg1.mjs.map +1 -0
- package/dist/Modal.d.mts +1 -1
- package/dist/PageHeader-Czj42pyK.d.mts +40 -0
- package/dist/{PageHeader-CCoAJUwJ.mjs → PageHeader-DJF7nxgN.mjs} +2 -2
- package/dist/{PageHeader-CCoAJUwJ.mjs.map → PageHeader-DJF7nxgN.mjs.map} +1 -1
- package/dist/PageHeader.d.mts +2 -40
- package/dist/{PageLayout-BlCo4hN4.d.mts → PageLayout-TBemv7oL.d.mts} +2 -2
- package/dist/{PageLayout-C7ZC7GBA.mjs → PageLayout-fXJW7daI.mjs} +2 -2
- package/dist/{PageLayout-C7ZC7GBA.mjs.map → PageLayout-fXJW7daI.mjs.map} +1 -1
- package/dist/PageLayout.d.mts +1 -1
- package/dist/{PageLayoutFrame--HlvI4Pp.d.mts → PageLayoutFrame-DzwlkNZ1.d.mts} +1 -1
- package/dist/PageLayoutFrame.d.mts +1 -1
- package/dist/{PageSelector-BmevrorJ.d.mts → PageSelector-DXCeBUoU.d.mts} +3 -3
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-C67fsrxl.d.mts → Pagination-COcFWlha.d.mts} +2 -2
- package/dist/{Pagination-Du2CPW2l.mjs → Pagination-DtK-jbEY.mjs} +5 -5
- package/dist/{Pagination-Du2CPW2l.mjs.map → Pagination-DtK-jbEY.mjs.map} +1 -1
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-CFVWZ_Yx.mjs → Pii-DueIK287.mjs} +2 -2
- package/dist/{Pii-CFVWZ_Yx.mjs.map → Pii-DueIK287.mjs.map} +1 -1
- package/dist/{PillShell-jr6OyAd3.d.mts → PillShell-DqglbFHe.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-DewrGOJB.mjs → Popover-BcII7usF.mjs} +2 -2
- package/dist/{Popover-DewrGOJB.mjs.map → Popover-BcII7usF.mjs.map} +1 -1
- package/dist/{ProgressIndicator-CdhC2LVI.d.mts → ProgressIndicator-C5sbFQcd.d.mts} +1 -1
- package/dist/{ProgressIndicator-xV5Cl2Bw.mjs → ProgressIndicator-CM37EU1B.mjs} +3 -3
- package/dist/{ProgressIndicator-xV5Cl2Bw.mjs.map → ProgressIndicator-CM37EU1B.mjs.map} +1 -1
- package/dist/ProgressIndicator.d.mts +1 -1
- package/dist/{PseudoClassProps-CverE9Ni.d.mts → PseudoClassProps-BFFh2-u8.d.mts} +1 -1
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{Radio-i7AEQZHb.mjs → Radio-BstZg3DI.mjs} +4 -4
- package/dist/{Radio-i7AEQZHb.mjs.map → Radio-BstZg3DI.mjs.map} +1 -1
- package/dist/{RadioGroup-CDEfCg-b.d.mts → RadioGroup-BxEmipHa.d.mts} +1 -1
- package/dist/{RadioGroup-B0KcQpS7.mjs → RadioGroup-erKerwSt.mjs} +2 -2
- package/dist/{RadioGroup-B0KcQpS7.mjs.map → RadioGroup-erKerwSt.mjs.map} +1 -1
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/{RangeCalendar-BOt59kTG.d.mts → RangeCalendar-CK5ArbIQ.d.mts} +2 -2
- package/dist/RangeCalendar.d.mts +1 -1
- package/dist/RangeCalendarPresets.d.mts +1 -1
- package/dist/{RouterContext-D7HBESqO.d.mts → RouterContext-CoDbEb_X.d.mts} +2 -2
- package/dist/RouterContext.d.mts +1 -1
- package/dist/{RouterLink-dppNWLgP.d.mts → RouterLink-BnIEi8d4.d.mts} +2 -2
- package/dist/RouterLink.d.mts +1 -1
- package/dist/RuleEditorFields.d.mts +2 -2
- package/dist/RulesPill.d.mts +1 -1
- package/dist/{SearchInput-B7JYHJZI.d.mts → SearchInput-DLC7-A7K.d.mts} +2 -2
- package/dist/SearchInput.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-B2_bS806.mjs → SegmentedControl-DQjIO6iX.mjs} +2 -2
- package/dist/{SegmentedControl-B2_bS806.mjs.map → SegmentedControl-DQjIO6iX.mjs.map} +1 -1
- package/dist/{SegmentedControl-C_7mTcuL.d.mts → SegmentedControl-xjU-2IsJ.d.mts} +1 -1
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-oVJ0uLa7.mjs → Select-BJ9ACmRD.mjs} +8 -8
- package/dist/{Select-oVJ0uLa7.mjs.map → Select-BJ9ACmRD.mjs.map} +1 -1
- package/dist/{Select-BpAA5ETS.d.mts → Select-CsxK6A5m.d.mts} +3 -3
- package/dist/Select.d.mts +1 -1
- package/dist/{SingleColumnLayout-ByWxiD7d.d.mts → SingleColumnLayout-CBynMc76.d.mts} +2 -2
- package/dist/SingleColumnLayout.d.mts +1 -1
- package/dist/SmartTextInput.d.mts +23 -6
- package/dist/SmartTextInputField.d.mts +2 -2
- package/dist/SmartTextInputFunctionDialog.d.mts +4 -4
- package/dist/SmartTextInputListbox.d.mts +2 -2
- package/dist/SmartTextInputPopover.d.mts +2 -2
- package/dist/{Spinner-0Vqw_68r.mjs → Spinner-uVZyOh1T.mjs} +2 -2
- package/dist/{Spinner-0Vqw_68r.mjs.map → Spinner-uVZyOh1T.mjs.map} +1 -1
- package/dist/{SplitColumnLayout-DYyJabQ3.d.mts → SplitColumnLayout-BVzGbEDC.d.mts} +2 -2
- package/dist/SplitColumnLayout.d.mts +1 -1
- package/dist/{Stack-DpWl6orU.d.mts → Stack-BZyboHQl.d.mts} +2 -2
- package/dist/Stack.d.mts +1 -1
- package/dist/{StatusIndicator-QsVgjRrt.mjs → StatusIndicator-Bunn9YLV.mjs} +3 -3
- package/dist/{StatusIndicator-QsVgjRrt.mjs.map → StatusIndicator-Bunn9YLV.mjs.map} +1 -1
- package/dist/{Sticker-C260e6kl.d.mts → Sticker-CsUSNIH-.d.mts} +5 -5
- package/dist/{Sticker-CUqHa9Mo.mjs → Sticker-yhxtIYH8.mjs} +5 -5
- package/dist/{Sticker-CUqHa9Mo.mjs.map → Sticker-yhxtIYH8.mjs.map} +1 -1
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +1 -1
- package/dist/Tab.d.mts +2 -2
- package/dist/{TabBar-w_gxXSwA.mjs → TabBar-SX8E9-Bk.mjs} +5 -5
- package/dist/{TabBar-w_gxXSwA.mjs.map → TabBar-SX8E9-Bk.mjs.map} +1 -1
- package/dist/{Table-PbYGf3PG.mjs → Table--o4ZLRbb.mjs} +8 -8
- package/dist/{Table-PbYGf3PG.mjs.map → Table--o4ZLRbb.mjs.map} +1 -1
- package/dist/{Table-BtNYI6QX.d.mts → Table-CadXF71E.d.mts} +1 -1
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-DQ7pivxP.d.mts → TableBody-BKSHNSTo.d.mts} +1 -1
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-DMYLTIpr.mjs → TableBox-3qunC9Nl.mjs} +13 -13
- package/dist/{TableBox-DMYLTIpr.mjs.map → TableBox-3qunC9Nl.mjs.map} +1 -1
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-DwAOA-oO.d.mts → TableBoxCell-okcOQ5Ec.d.mts} +7 -7
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/{TableBoxField-Bdj_nY7j.d.mts → TableBoxField-DR-SJY9z.d.mts} +5 -5
- package/dist/TableBoxField.d.mts +1 -1
- package/dist/{TableBoxRow-5WBwyAyn.d.mts → TableBoxRow-DiuAB_rV.d.mts} +3 -3
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-Dq_Z2ted.d.mts → TableBoxRowActions-Cm4KJsAD.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-DXBHZ52E.d.mts → TableCell-4u5_BgTC.d.mts} +3 -3
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-Cw7LDHWj.d.mts → TableControls-B9bvsNUc.d.mts} +20 -8
- package/dist/{TableControls-C1MF2JvY.mjs → TableControls-n16XKO9S.mjs} +973 -469
- package/dist/TableControls-n16XKO9S.mjs.map +1 -0
- package/dist/TableControls.d.mts +2 -2
- package/dist/{TableControlsContext-DgoZhMpQ.d.mts → TableControlsContext-CZThYoj5.d.mts} +4 -4
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-BGUg_aXc.d.mts → TableHead-BuCQeDAq.d.mts} +1 -1
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-DcZcMQyR.d.mts → TableHeaderCell-DIcQlZps.d.mts} +1 -1
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-CwYQaZlA.d.mts → TableLayout-ScEVdvvA.d.mts} +1 -1
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-Dad6_CoD.d.mts → TableRow-lCsvG0a-.d.mts} +2 -2
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-BGuWAarQ.d.mts → TableViewConfigurationDropdown-CvN7tE98.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-RQ-4_Tdr.mjs → TechnicalSticker-CALVwnrT.mjs} +5 -5
- package/dist/{TechnicalSticker-RQ-4_Tdr.mjs.map → TechnicalSticker-CALVwnrT.mjs.map} +1 -1
- package/dist/{Text-BBMau410.d.mts → Text-RSzei6Se.d.mts} +4 -4
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-BaA8H7s7.mjs → TextArea-CaIEBz8d.mjs} +2 -2
- package/dist/{TextArea-BaA8H7s7.mjs.map → TextArea-CaIEBz8d.mjs.map} +1 -1
- package/dist/{TextArea-Djd1uT3B.d.mts → TextArea-DFn4XuG-.d.mts} +2 -2
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-C4N0bqbh.d.mts → TextUnderlineTooltip-B0iYaPM1.d.mts} +3 -3
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +1 -1
- package/dist/Toast.d.mts +1 -1
- package/dist/{Toggle-C9cZnajR.mjs → Toggle-BsqSNYok.mjs} +6 -6
- package/dist/{Toggle-C9cZnajR.mjs.map → Toggle-BsqSNYok.mjs.map} +1 -1
- package/dist/{Toggle-EYpW34LO.d.mts → Toggle-xtPgGaGD.d.mts} +1 -1
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-DogEteGl.mjs → Tooltip-B-0VRuKT.mjs} +2 -2
- package/dist/{Tooltip-DogEteGl.mjs.map → Tooltip-B-0VRuKT.mjs.map} +1 -1
- package/dist/{Tooltip-Dj-DtGKz.d.mts → Tooltip-Blfhi2gT.d.mts} +3 -3
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-BDNFUuhG.d.mts → TruncatedText-BMQmveJG.d.mts} +2 -2
- package/dist/VersionHistory.d.mts +1 -1
- package/dist/{VersionHistoryItem-iUabmk_y.d.mts → VersionHistoryItem-BExp7oSr.d.mts} +1 -1
- package/dist/VersionHistoryItem.d.mts +1 -1
- package/dist/WizardModal.d.mts +2 -2
- package/dist/{accordionTitleTypography-C7VVJvlx.d.mts → accordionTitleTypography-PMKnfoy0.d.mts} +2 -2
- package/dist/accordionTitleTypography.d.mts +1 -1
- package/dist/{chainTypes-DT-9j_sG.d.mts → chainTypes-Cjp0zZ4E.d.mts} +4 -4
- package/dist/clientFilterUtils-BXEpzorX.d.mts +20 -0
- package/dist/clientFilterUtils.d.mts +2 -0
- package/dist/{codec-CGj8cwcj.d.mts → codec-KAvQRjTW.d.mts} +2 -2
- package/dist/codec.d.mts +1 -1
- package/dist/{color-BOm5A1Si.d.mts → color-C5B1pN1D.d.mts} +2 -2
- package/dist/components/Accordion/index.d.mts +1 -1
- package/dist/components/Accordion/index.mjs +4 -4
- package/dist/components/Attribute/index.mjs +4 -4
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +3 -3
- package/dist/components/BottomPanel/index.mjs +4 -4
- package/dist/components/Breadcrumbs/index.d.mts +1 -1
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/Button/index.d.mts +2 -2
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +2 -2
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/CardV2/index.d.mts +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Checkbox/index.d.mts +1 -1
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/CodeHighlight/index.mjs +3 -3
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +2 -2
- package/dist/components/DataTable/TableControls/index.d.mts +22 -20
- package/dist/components/DataTable/TableControls/index.mjs +2 -2
- package/dist/components/DataTable/index.d.mts +9 -8
- package/dist/components/DataTable/index.mjs +2 -1474
- package/dist/components/DataTable/types.d.mts +2 -166
- package/dist/components/DatePicker/index.d.mts +5 -5
- package/dist/components/DatePicker/index.mjs +1 -1
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FloatingPanel/index.mjs +5 -5
- package/dist/components/FormControl/index.d.mts +2 -2
- package/dist/components/FormControl/index.mjs +2 -2
- package/dist/components/FormField/index.d.mts +5 -5
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/Grid/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +30 -17
- package/dist/components/ImageTile/index.mjs.map +1 -1
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +1 -1
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.d.mts +1 -1
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/components/PageHeader/index.d.mts +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +3 -3
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/ProgressBar/index.mjs +1 -1
- package/dist/components/ProgressIndicator/index.d.mts +1 -1
- package/dist/components/ProgressIndicator/index.mjs +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.d.mts +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RightPanel/index.mjs +2 -2
- package/dist/components/SegmentedControl/index.d.mts +1 -1
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/Slider/index.mjs +2 -2
- package/dist/components/SmartTextInput/index.d.mts +2 -2
- package/dist/components/SmartTextInput/index.mjs +17 -8
- package/dist/components/SmartTextInput/index.mjs.map +1 -1
- package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +1 -1
- package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +2 -2
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/StatusIndicator/index.mjs +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +8 -8
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +2 -2
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -1
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/TextArea/index.d.mts +1 -1
- package/dist/components/TextArea/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +2 -2
- package/dist/components/Toast/index.mjs +4 -4
- package/dist/components/Toggle/index.d.mts +1 -1
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/Tooltip/index.mjs +1 -1
- package/dist/components/VersionHistory/index.d.mts +1 -1
- package/dist/components/VersionHistory/index.mjs +7 -7
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{constants-CwzbyAdc.d.mts → constants-4rSh8e5G.d.mts} +1 -1
- package/dist/constants-BaMvTUbS.d.mts +10 -0
- package/dist/constants.d.mts +1 -1
- package/dist/constants2.d.mts +2 -10
- package/dist/{createPath-C4jIHe68.d.mts → createPath-B_CLq82C.d.mts} +2 -2
- package/dist/createPath.d.mts +1 -1
- package/dist/{date-filter-CWgCXz85.mjs → date-filter-D0ys8s0D.mjs} +1 -1
- package/dist/{date-filter-CWgCXz85.mjs.map → date-filter-D0ys8s0D.mjs.map} +1 -1
- package/dist/{date-range-rule-value-BkbGpLNH.d.mts → date-range-rule-value-Dk6pZHnD.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/{date-rule-intent-zdKP-tW_.d.mts → date-rule-intent-C5C8HB1v.d.mts} +3 -3
- package/dist/date-rule-intent.d.mts +1 -1
- package/dist/display.d.mts +2 -2
- package/dist/fieldPickerOptions.d.mts +2 -2
- package/dist/{filter-size-context-CW1guBfI.d.mts → filter-size-context-5xQ3ycnC.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/filters-ogUUmLEf.d.mts +22 -0
- package/dist/filters.d.mts +2 -0
- package/dist/{formatDateTime-zyRMjfH8.d.mts → formatDateTime-Dd9inM5H.d.mts} +1 -1
- package/dist/formatDateTime.d.mts +1 -1
- package/dist/helpers-Dqw5PEva.d.mts +90 -0
- package/dist/helpers.d.mts +2 -90
- package/dist/{i18n-CeRarJIa.mjs → i18n-BscB9FUy.mjs} +14 -2
- package/dist/i18n-BscB9FUy.mjs.map +1 -0
- package/dist/{index-DxFh2ArY.d.mts → index-Ck939aXd.d.mts} +3 -3
- package/dist/{index-C7hEdRqK.d.mts → index-DTAcGzW4.d.mts} +2 -2
- package/dist/{index-B7KIL3U6.d.mts → index-EGvEhP1j.d.mts} +2 -2
- package/dist/index-NKYLt_R9.d.mts +1 -0
- package/dist/index-VWno75SQ.d.mts +1 -0
- package/dist/index-uMNhmxEh.d.mts +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index2.d.mts +1 -1
- package/dist/index3.d.mts +3 -3
- package/dist/index4.d.mts +1 -1
- package/dist/index5.d.mts +14 -14
- package/dist/{input-DMPo8gRT.d.mts → input-CKhARTlS.d.mts} +3 -3
- package/dist/{inputFields-BCNC1FWx.d.mts → inputFields-DVLg_2wz.d.mts} +11 -11
- package/dist/inputFields.d.mts +1 -1
- package/dist/{intersperse-B8s6clcc.mjs → intersperse-ObkRVOag.mjs} +1 -1
- package/dist/{intersperse-B8s6clcc.mjs.map → intersperse-ObkRVOag.mjs.map} +1 -1
- package/dist/{jsonSchema-6mcLrVG3.d.mts → jsonSchema-DmOA0Lnu.d.mts} +2 -2
- package/dist/lib/PDSProvider.d.mts +11 -3
- package/dist/lib/PDSProvider.mjs +16 -12
- package/dist/lib/PDSProvider.mjs.map +1 -1
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
- package/dist/lib/chainTypes.d.mts +1 -1
- package/dist/lib/color.d.mts +1 -1
- package/dist/lib/colorMode.d.mts +30 -0
- package/dist/lib/colorMode.mjs +71 -0
- package/dist/lib/colorMode.mjs.map +1 -0
- package/dist/lib/customFunctionSchema.d.mts +1 -1
- package/dist/lib/date-filter/index.d.mts +2 -2
- package/dist/lib/date-filter/index.mjs +1 -1
- package/dist/lib/i18n/index.d.mts +3 -3
- package/dist/lib/i18n/index.mjs +1 -1
- package/dist/lib/jsonSchema.d.mts +1 -1
- package/dist/lib/jsonSchema.mjs.map +1 -1
- package/dist/lib/jsonSchemaType.d.mts +1 -1
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/methodChain.d.mts +2 -2
- package/dist/lib/methodChainNormalize.d.mts +2 -2
- package/dist/lib/methodChainTypes.d.mts +1 -1
- package/dist/lib/objectSchemaTypes.d.mts +1 -1
- package/dist/lib/platformObject.d.mts +1 -1
- package/dist/lib/pseudoClass.d.mts +1 -1
- package/dist/lib/router/adapters/reactRouter.d.mts +1 -1
- package/dist/lib/router/adapters/tanstack.d.mts +1 -1
- package/dist/lib/router/index.d.mts +5 -5
- package/dist/lib/schemaOptions.d.mts +2 -2
- package/dist/lib/schemaOptions.mjs +20 -2
- package/dist/lib/schemaOptions.mjs.map +1 -1
- package/dist/lib/semanticColor.d.mts +1 -1
- package/dist/lib/useChain.d.mts +1 -1
- package/dist/{listbox-options-yLjqZp4H.d.mts → listbox-options-DCmqWWgy.d.mts} +3 -3
- package/dist/listbox-options.d.mts +1 -1
- package/dist/{message-C5n7wFiN.d.mts → message-Dti22dmx.d.mts} +1 -1
- package/dist/{methodChain-BNDytoaD.d.mts → methodChain-DaDvXsHF.d.mts} +4 -4
- package/dist/{methodChainTypes-BuwpPC73.d.mts → methodChainTypes-a7kHYhs7.d.mts} +2 -2
- package/dist/mixins/focus.d.mts +1 -1
- package/dist/mixins/focus.mjs +1 -1
- package/dist/mixins/hoverable.d.mts +2 -2
- package/dist/mixins/hoverable.mjs +1 -1
- package/dist/mixins/input.d.mts +1 -1
- package/dist/mixins/input.mjs +2 -2
- package/dist/mixins/menuItem.d.mts +2 -2
- package/dist/mixins/scrollbar.d.mts +1 -1
- package/dist/mixins/text.d.mts +1 -1
- package/dist/{operators-C34nhBuK.d.mts → operators-Seez5p9U.d.mts} +3 -3
- package/dist/operators.d.mts +1 -1
- package/dist/{palette-BCszfY7I.d.mts → palette-Bp5G-S_5.d.mts} +3 -3
- package/dist/palette.d.mts +1 -1
- package/dist/patterns/CardGrouping/index.mjs +8 -8
- package/dist/patterns/IndexTableLayout/index.d.mts +3 -0
- package/dist/patterns/IndexTableLayout/index.mjs +87 -0
- package/dist/patterns/IndexTableLayout/index.mjs.map +1 -0
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +3 -3
- package/dist/patterns/PageLayout/index.d.mts +4 -4
- package/dist/patterns/PageLayout/index.mjs +1 -1
- package/dist/patterns/WizardModal/index.mjs +3 -3
- package/dist/reactRouterFallback.d.mts +1 -1
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/safe-parse.d.mts +1 -1
- package/dist/{schemaOptions-DBOUChxi.d.mts → schemaOptions-BQgLOgtD.d.mts} +9 -4
- package/dist/{semantic-Duoh2Pxp.d.mts → semantic-DjKvtUi8.d.mts} +1 -1
- package/dist/{semanticColor-BuG977_M.d.mts → semanticColor-CmGmGRj8.d.mts} +3 -3
- package/dist/{strings-CUZrwL-Q.d.mts → strings-FWNWdSn1.d.mts} +14 -2
- package/dist/strings.d.mts +1 -1
- package/dist/{text-B7hx6G99.d.mts → text-BNfECpa5.d.mts} +1 -1
- package/dist/{theme-BKg55Zk1.d.mts → theme-VNhXxAF3.d.mts} +3 -3
- package/dist/theme.d.mts +1 -1
- package/dist/tone.d.mts +3 -3
- package/dist/tree.d.mts +1 -1
- package/dist/{types-BjMJFNYH.d.mts → types-39QvBZuZ.d.mts} +1 -1
- package/dist/types-BQP14Fng.d.mts +180 -0
- package/dist/types-Bdi8Y7ll.d.mts +95 -0
- package/dist/{types-6QeQmbFm.d.mts → types-CFe4tA8Q.d.mts} +1 -1
- package/dist/{types-CEQWndtF.d.mts → types-DWU0Dmy9.d.mts} +4 -4
- package/dist/{types-VgGkS4JB.d.mts → types-DfpVVjso.d.mts} +2 -2
- package/dist/{types-DEzlAdZW.d.mts → types-EodOhsjw.d.mts} +2 -2
- package/dist/{types-CgKSEQyB.d.mts → types-HxiGiwQN.d.mts} +1 -1
- package/dist/{types-4wnr5R9P.d.mts → types-Kmnood9Y.d.mts} +1 -1
- package/dist/{types-C_ZEgHNa.d.mts → types-SOkNtcBq.d.mts} +2 -2
- package/dist/types.d.mts +1 -1
- package/dist/types2.d.mts +2 -2
- package/dist/types3.d.mts +1 -1
- package/dist/types4.d.mts +1 -1
- package/dist/types5.d.mts +2 -2
- package/dist/types6.d.mts +2 -2
- package/dist/types7.d.mts +1 -1
- package/dist/{url-state-B_gTQ9uu.d.mts → url-state-CwaRVyXR.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/{useChain-DPRVMwX8.d.mts → useChain-DXkKKe-J.d.mts} +6 -6
- package/dist/useChainAtCursor.d.mts +6 -6
- package/dist/useCodeChainFunctionPanel.d.mts +1 -1
- package/dist/useColumnConfiguration.d.mts +34 -0
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-BQZppUR0.d.mts → useFilterStateV2-Bzo27PR-.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-DAwApAKK.d.mts → useFormField-Ba8rh1CH.d.mts} +2 -2
- package/dist/{useFormField-BAmkdxtA.mjs → useFormField-CbNYbDdp.mjs} +2 -2
- package/dist/{useFormField-BAmkdxtA.mjs.map → useFormField-CbNYbDdp.mjs.map} +1 -1
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useFormGroup-BZayb9fZ.mjs → useFormGroup-CsKC93Pt.mjs} +1 -1
- package/dist/{useFormGroup-BZayb9fZ.mjs.map → useFormGroup-CsKC93Pt.mjs.map} +1 -1
- package/dist/{useLocationPathname-BHL0pgiu.d.mts → useLocationPathname-OsvI7mH5.d.mts} +1 -1
- package/dist/useLocationPathname.d.mts +1 -1
- package/dist/{useTableBoxDragAndDrop-Dq30b6yY.d.mts → useTableBoxDragAndDrop-CKPIY98e.d.mts} +1 -1
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/useTableColumns-DdU0CLcU.d.mts +72 -0
- package/dist/useTableColumns.d.mts +2 -72
- package/dist/useTruncation.d.mts +1 -1
- package/dist/{utilities-B2ry7_20.d.mts → utilities-BrEUGFGq.d.mts} +1 -1
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/testing.d.mts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils4.d.mts +5 -5
- package/dist/{validation-BODkbEvr.d.mts → validation-D6NPueNk.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/validation2.d.mts +4 -4
- package/dist/{value-control-resolver-BcZiReQ7.d.mts → value-control-resolver-C-UrXVlB.d.mts} +2 -2
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/variables/effect.d.mts +1 -1
- package/dist/variables/semantic.d.mts +1 -1
- package/llms.txt +14 -2
- package/package.json +7 -3
- package/skills/ui-authoring/COMPONENTS.md +2 -1
- package/skills/ui-authoring/PATTERNS.md +4 -2
- package/skills/ui-authoring/SKILL.md +9 -2
- package/skills/ui-authoring/TOKENS.md +467 -119
- package/dist/Combobox-CsXnJKvB.mjs.map +0 -1
- package/dist/DatePicker-DQHVCGnP.mjs.map +0 -1
- package/dist/Modal-Cs5cZpEr.mjs.map +0 -1
- package/dist/TableControls-C1MF2JvY.mjs.map +0 -1
- package/dist/components/DataTable/index.mjs.map +0 -1
- package/dist/i18n-CeRarJIa.mjs.map +0 -1
- package/dist/types-CwzwClJx.d.mts +0 -27
- /package/dist/{index-7in8TPrM.d.mts → index-AnhM47-e2.d.mts} +0 -0
- /package/dist/{index-8SLBz2NH.d.mts → index-B33elXxm.d.mts} +0 -0
- /package/dist/{index-B24gUwOx.d.mts → index-B4woaFSm.d.mts} +0 -0
- /package/dist/{index-B8M0Grl_2.d.mts → index-B6T7ov8p.d.mts} +0 -0
- /package/dist/{index-BFnNtGdX.d.mts → index-BNRXMhlr.d.mts} +0 -0
- /package/dist/{index-BjgW3E7y.d.mts → index-BOaE2xDE.d.mts} +0 -0
- /package/dist/{index-BwFl_eS0.d.mts → index-BPiqSRRl.d.mts} +0 -0
- /package/dist/{index-C3kE54DD.d.mts → index-BcsXXrHq.d.mts} +0 -0
- /package/dist/{index-C3usUse7.d.mts → index-Bo9LXG4r.d.mts} +0 -0
- /package/dist/{index-C6HcjJiY.d.mts → index-BrGZHEgX.d.mts} +0 -0
- /package/dist/{index-CP2eJYlK.d.mts → index-Bt4QNofW.d.mts} +0 -0
- /package/dist/{index-CSf15oCd.d.mts → index-CFuHCx9T.d.mts} +0 -0
- /package/dist/{index-CX869wwk.d.mts → index-CLTQPxoD.d.mts} +0 -0
- /package/dist/{index-CXaDbCtw.d.mts → index-CaqYCRmZ.d.mts} +0 -0
- /package/dist/{index-D4DUvwPf.d.mts → index-CjDodOH2.d.mts} +0 -0
- /package/dist/{index-DB7t8whN.d.mts → index-CjmAoxrR2.d.mts} +0 -0
- /package/dist/{index-Deol7ZWO.d.mts → index-Cx0vQ6ld.d.mts} +0 -0
- /package/dist/{index-DhiymMxa.d.mts → index-CzItj62a.d.mts} +0 -0
- /package/dist/{index-DjOaHFU3.d.mts → index-CzUpNo0e.d.mts} +0 -0
- /package/dist/{index-DkrC-i1D.d.mts → index-DBGd4WeR.d.mts} +0 -0
- /package/dist/{index-DvwPIy8X.d.mts → index-DMRtRo7y.d.mts} +0 -0
- /package/dist/{index-Oio5ygqN.d.mts → index-DNjQe1D8.d.mts} +0 -0
- /package/dist/{index-Wc1llEvP.d.mts → index-DW3xeuzq.d.mts} +0 -0
- /package/dist/{index-bHnO4ZKt.d.mts → index-DZlqSwCF.d.mts} +0 -0
- /package/dist/{index-dzI_9J-Z.d.mts → index-De7MV8-j.d.mts} +0 -0
- /package/dist/{index-gpCH5158.d.mts → index-DjG1RCY5.d.mts} +0 -0
- /package/dist/{index-lIMqGGJz.d.mts → index-Dlcv6Ku22.d.mts} +0 -0
- /package/dist/{index-luywJTzJ.d.mts → index-DrK1_jKY.d.mts} +0 -0
- /package/dist/{index-sViox9YW.d.mts → index-DztUdPP_.d.mts} +0 -0
- /package/dist/{index-xAZnxq0d2.d.mts → index-K614ZhWK.d.mts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colorMode.mjs","names":[],"sources":["../../lib/colorMode.tsx"],"sourcesContent":["/**\n * Colour-mode helpers for apps embedded in the Persona dashboard.\n *\n * The host stamps the dashboard's mode on `<html data-color-mode>` before first paint (an inline\n * script in each app's `index.html`). These helpers read it, install the matching semantic palette\n * on the styled-components theme, and publish that palette as `--pds-*` CSS custom properties so\n * plain stylesheets resolve the same colours as PDS components.\n *\n * Most apps only need `PDSProvider colorMode={readDocumentColorMode()}`. `ColorModeScope` renders\n * part of a page in the other mode.\n *\n * Portals: PDS overlays portal to `document.body`. styled-components context crosses the portal, so\n * a PDS overlay opened inside a `ColorModeScope` renders in the scope's mode. CSS custom properties\n * don't: plain CSS inside a portaled overlay resolves the `:root` palette, not the scope's.\n */\nimport { type FC, type PropsWithChildren, useMemo } from 'react';\nimport styled, { createGlobalStyle, ThemeProvider, useTheme } from 'styled-components';\n\nimport defaultTheme, {\n type PdsThemingMode,\n type PersonaTheme,\n withPdsTheming,\n} from 'design-system/theme';\nimport { semanticDark, semanticLight, type SemanticTokens } from 'design-system/variables/semantic';\n\nexport type ColorMode = Exclude<PdsThemingMode, 'off'>;\n\n/** `'dark'` only when `<html data-color-mode=\"dark\">`; anything else (absent, `DARK`, junk) is light. */\nexport function readDocumentColorMode(doc: Document = document): ColorMode {\n return doc.documentElement.dataset.colorMode === 'dark' ? 'dark' : 'light';\n}\n\n/** `withPdsTheming(baseTheme, mode)`; `baseTheme` defaults to the PDS default theme. */\nexport function createPdsTheme(\n mode: ColorMode,\n baseTheme: PersonaTheme = defaultTheme,\n): PersonaTheme {\n return withPdsTheming(baseTheme, mode);\n}\n\n/** `FgPrimary` -> `--pds-fg-primary`, `FeedbackDanger1` -> `--pds-feedback-danger-1`. */\nexport function semanticCssVariable(token: keyof SemanticTokens): string {\n return `--pds-${token\n .replace(/([a-z])([A-Z0-9])/g, '$1-$2')\n .replace(/([0-9])([A-Z])/g, '$1-$2')\n .toLowerCase()}`;\n}\n\n/** `--pds-*: value;` for every semantic token. */\nexport function semanticCssDeclarations(semantic: SemanticTokens): string {\n return (Object.keys(semantic) as (keyof SemanticTokens)[])\n .map((token) => `${semanticCssVariable(token)}: ${semantic[token]};`)\n .join('\\n');\n}\n\nconst semanticCss: Record<ColorMode, string> = {\n light: semanticCssDeclarations(semanticLight),\n dark: semanticCssDeclarations(semanticDark),\n};\n\n/** Global style: publishes the palette for `mode` on `:root`. */\nexport const SemanticCssVariables = createGlobalStyle<{ mode: ColorMode }>`\n :root {\n ${({ mode }) => semanticCss[mode]}\n }\n`;\n\nconst ColorModeScopeRoot = styled.div<{ $mode: ColorMode }>`\n display: contents;\n ${({ $mode }) => semanticCss[$mode]}\n`;\n\n/**\n * Renders `children` in `mode`, whatever the surrounding mode is: a nested `ThemeProvider` with\n * `withPdsTheming(outerTheme, mode)` and a `display: contents` wrapper carrying `data-color-mode`\n * and the `--pds-*` declarations for `mode`.\n */\nexport const ColorModeScope: FC<PropsWithChildren<{ mode: ColorMode }>> = ({ children, mode }) => {\n const outerTheme = useTheme() as PersonaTheme | undefined;\n const scopedTheme = useMemo(\n () => withPdsTheming(outerTheme ?? defaultTheme, mode),\n [outerTheme, mode],\n );\n\n return (\n <ThemeProvider theme={scopedTheme}>\n <ColorModeScopeRoot $mode={mode} data-color-mode={mode}>\n {children}\n </ColorModeScopeRoot>\n </ThemeProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,sBAAsB,MAAgB,UAAqB;AACzE,QAAO,IAAI,gBAAgB,QAAQ,cAAc,SAAS,SAAS;;;AAIrE,SAAgB,eACd,MACA,YAA0B,cACZ;AACd,QAAO,eAAe,WAAW,KAAK;;;AAIxC,SAAgB,oBAAoB,OAAqC;AACvE,QAAO,SAAS,MACb,QAAQ,sBAAsB,QAAQ,CACtC,QAAQ,mBAAmB,QAAQ,CACnC,aAAa;;;AAIlB,SAAgB,wBAAwB,UAAkC;AACxE,QAAQ,OAAO,KAAK,SAAS,CAC1B,KAAK,UAAU,GAAG,oBAAoB,MAAM,CAAC,IAAI,SAAS,OAAO,GAAG,CACpE,KAAK,KAAK;;AAGf,MAAM,cAAyC;CAC7C,OAAO,wBAAwB,cAAc;CAC7C,MAAM,wBAAwB,aAAa;CAC5C;;AAGD,MAAa,uBAAuB,iBAAsC;;OAEnE,EAAE,WAAW,YAAY,MAAM;;;AAItC,MAAM,qBAAqB,OAAO,GAAyB;;KAEtD,EAAE,YAAY,YAAY,OAAO;;;;;;;AAQtC,MAAa,kBAA8D,EAAE,UAAU,WAAW;CAChG,MAAM,aAAa,UAAU;AAM7B,QACE,oBAAC,eAAD;EAAe,OANG,cACZ,eAAe,cAAc,cAAc,KAAK,EACtD,CAAC,YAAY,KAAK,CAIe;YAC/B,oBAAC,oBAAD;GAAoB,OAAO;GAAM,mBAAiB;GAC/C;GACkB,CAAA;EACP,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as DateFilterPreset, c as RelativeDateFilterValue, n as AbsoluteDateRange, o as DateFilterValue } from "../../types-
|
|
2
|
-
import { a as selectedPresetFor, i as resolveDateFilterValue, r as parseDateFilterValue } from "../../codec-
|
|
1
|
+
import { a as DateFilterPreset, c as RelativeDateFilterValue, n as AbsoluteDateRange, o as DateFilterValue } from "../../types-39QvBZuZ.mjs";
|
|
2
|
+
import { a as selectedPresetFor, i as resolveDateFilterValue, r as parseDateFilterValue } from "../../codec-KAvQRjTW.mjs";
|
|
3
3
|
export { AbsoluteDateRange, DateFilterPreset, DateFilterValue, RelativeDateFilterValue, parseDateFilterValue, resolveDateFilterValue, selectedPresetFor };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as selectedPresetFor, n as parseDateFilterValue, r as resolveDateFilterValue } from "../../date-filter-
|
|
1
|
+
import { i as selectedPresetFor, n as parseDateFilterValue, r as resolveDateFilterValue } from "../../date-filter-D0ys8s0D.mjs";
|
|
2
2
|
export { parseDateFilterValue, resolveDateFilterValue, selectedPresetFor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DEFAULT_COMMON_STRINGS, i as CommonStrings, n as CommonStringOverrides, o as resolveCommonStrings, r as CommonStringValue, t as CommonStringKey } from "../../strings-
|
|
2
|
-
import { i as usePDSStrings, n as PDSI18nProviderProps, r as usePDSLocale, t as PDSI18nProvider } from "../../I18nContext-
|
|
3
|
-
import { a as formatDateTime, i as formatDate, n as LEGACY_DATETIME_FORMAT, o as formatTimeZoneName, r as LEGACY_DATE_FORMAT, s as usesLegacyDateFormat, t as FormatDateTimeOptions } from "../../formatDateTime-
|
|
1
|
+
import { a as DEFAULT_COMMON_STRINGS, i as CommonStrings, n as CommonStringOverrides, o as resolveCommonStrings, r as CommonStringValue, t as CommonStringKey } from "../../strings-FWNWdSn1.mjs";
|
|
2
|
+
import { i as usePDSStrings, n as PDSI18nProviderProps, r as usePDSLocale, t as PDSI18nProvider } from "../../I18nContext-TXS9M8t5.mjs";
|
|
3
|
+
import { a as formatDateTime, i as formatDate, n as LEGACY_DATETIME_FORMAT, o as formatTimeZoneName, r as LEGACY_DATE_FORMAT, s as usesLegacyDateFormat, t as FormatDateTimeOptions } from "../../formatDateTime-Dd9inM5H.mjs";
|
|
4
4
|
export { CommonStringKey, CommonStringOverrides, CommonStringValue, CommonStrings, DEFAULT_COMMON_STRINGS, FormatDateTimeOptions, LEGACY_DATETIME_FORMAT, LEGACY_DATE_FORMAT, PDSI18nProvider, PDSI18nProviderProps, formatDate, formatDateTime, formatTimeZoneName, resolveCommonStrings, usePDSLocale, usePDSStrings, usesLegacyDateFormat };
|
package/dist/lib/i18n/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as formatTimeZoneName, c as usePDSLocale, d as resolveCommonStrings, i as formatDateTime, l as usePDSStrings, n as LEGACY_DATE_FORMAT, o as usesLegacyDateFormat, r as formatDate, s as PDSI18nProvider, t as LEGACY_DATETIME_FORMAT, u as DEFAULT_COMMON_STRINGS } from "../../i18n-
|
|
1
|
+
import { a as formatTimeZoneName, c as usePDSLocale, d as resolveCommonStrings, i as formatDateTime, l as usePDSStrings, n as LEGACY_DATE_FORMAT, o as usesLegacyDateFormat, r as formatDate, s as PDSI18nProvider, t as LEGACY_DATETIME_FORMAT, u as DEFAULT_COMMON_STRINGS } from "../../i18n-BscB9FUy.mjs";
|
|
2
2
|
export { DEFAULT_COMMON_STRINGS, LEGACY_DATETIME_FORMAT, LEGACY_DATE_FORMAT, PDSI18nProvider, formatDate, formatDateTime, formatTimeZoneName, resolveCommonStrings, usePDSLocale, usePDSStrings, usesLegacyDateFormat };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as isNonPrimitiveSchema, A as getNonNullableRefSchema, B as isJsonSchemaArray, C as JsonSchemaString, D as functionParametersFromJsonSchema, E as extendSchema, F as isFileField, G as isJsonSchemaInteger, H as isJsonSchemaChoices, I as isFileSchema, J as isJsonSchemaPlatformObject, K as isJsonSchemaNumber, L as isFileType, M as humanizeSchemaType, N as isArrayWithFileItems, O as genericArrayItemSchema, P as isConvertedTypeSchema, Q as isJsonType, R as isFunctionSchema, S as JsonSchemaRef, T as JsonSchemaTypes, U as isJsonSchemaDate, V as isJsonSchemaBoolean, W as isJsonSchemaDateTime, X as isJsonSchemaSecret, Y as isJsonSchemaRef, Z as isJsonSchemaString, _ as JsonSchemaNull, a as JsonSchemaArray, b as JsonSchemaObjectKey, c as JsonSchemaBasicTypes, d as JsonSchemaCore, et as isOneOfSchema, f as JsonSchemaCustomTypes, g as JsonSchemaInteger, h as JsonSchemaFieldTypeRegistry, i as JsonSchemaAnyOf, j as getNonNullableType, k as getArrayItemType, l as JsonSchemaBoolean, m as JsonSchemaFieldType, n as JsonSchema, nt as isPrecedingSchema, o as JsonSchemaBase, p as JsonSchemaEmpty, q as isJsonSchemaObject, r as JsonSchemaAllTypes, rt as isSchemaTypeAllowed, s as JsonSchemaBasic, t as EMPTY_JSON_SCHEMA_OBJECT, tt as isOneOfStringSchema, u as JsonSchemaConst, v as JsonSchemaNumber, w as JsonSchemaStringifiableTypes, x as JsonSchemaObjectKeyRegistry, y as JsonSchemaObject, z as isGenericParameterSchema } from "../jsonSchema-
|
|
1
|
+
import { $ as isNonPrimitiveSchema, A as getNonNullableRefSchema, B as isJsonSchemaArray, C as JsonSchemaString, D as functionParametersFromJsonSchema, E as extendSchema, F as isFileField, G as isJsonSchemaInteger, H as isJsonSchemaChoices, I as isFileSchema, J as isJsonSchemaPlatformObject, K as isJsonSchemaNumber, L as isFileType, M as humanizeSchemaType, N as isArrayWithFileItems, O as genericArrayItemSchema, P as isConvertedTypeSchema, Q as isJsonType, R as isFunctionSchema, S as JsonSchemaRef, T as JsonSchemaTypes, U as isJsonSchemaDate, V as isJsonSchemaBoolean, W as isJsonSchemaDateTime, X as isJsonSchemaSecret, Y as isJsonSchemaRef, Z as isJsonSchemaString, _ as JsonSchemaNull, a as JsonSchemaArray, b as JsonSchemaObjectKey, c as JsonSchemaBasicTypes, d as JsonSchemaCore, et as isOneOfSchema, f as JsonSchemaCustomTypes, g as JsonSchemaInteger, h as JsonSchemaFieldTypeRegistry, i as JsonSchemaAnyOf, j as getNonNullableType, k as getArrayItemType, l as JsonSchemaBoolean, m as JsonSchemaFieldType, n as JsonSchema, nt as isPrecedingSchema, o as JsonSchemaBase, p as JsonSchemaEmpty, q as isJsonSchemaObject, r as JsonSchemaAllTypes, rt as isSchemaTypeAllowed, s as JsonSchemaBasic, t as EMPTY_JSON_SCHEMA_OBJECT, tt as isOneOfStringSchema, u as JsonSchemaConst, v as JsonSchemaNumber, w as JsonSchemaStringifiableTypes, x as JsonSchemaObjectKeyRegistry, y as JsonSchemaObject, z as isGenericParameterSchema } from "../jsonSchema-DmOA0Lnu.mjs";
|
|
2
2
|
export { EMPTY_JSON_SCHEMA_OBJECT, JsonSchema, JsonSchemaAllTypes, JsonSchemaAnyOf, JsonSchemaArray, JsonSchemaBase, JsonSchemaBasic, JsonSchemaBasicTypes, JsonSchemaBoolean, JsonSchemaConst, JsonSchemaCore, JsonSchemaCustomTypes, JsonSchemaEmpty, JsonSchemaFieldType, JsonSchemaFieldTypeRegistry, JsonSchemaInteger, JsonSchemaNull, JsonSchemaNumber, JsonSchemaObject, JsonSchemaObjectKey, JsonSchemaObjectKeyRegistry, JsonSchemaRef, JsonSchemaString, JsonSchemaStringifiableTypes, JsonSchemaTypes, extendSchema, functionParametersFromJsonSchema, genericArrayItemSchema, getArrayItemType, getNonNullableRefSchema, getNonNullableType, humanizeSchemaType, isArrayWithFileItems, isConvertedTypeSchema, isFileField, isFileSchema, isFileType, isFunctionSchema, isGenericParameterSchema, isJsonSchemaArray, isJsonSchemaBoolean, isJsonSchemaChoices, isJsonSchemaDate, isJsonSchemaDateTime, isJsonSchemaInteger, isJsonSchemaNumber, isJsonSchemaObject, isJsonSchemaPlatformObject, isJsonSchemaRef, isJsonSchemaSecret, isJsonSchemaString, isJsonType, isNonPrimitiveSchema, isOneOfSchema, isOneOfStringSchema, isPrecedingSchema, isSchemaTypeAllowed };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonSchema.mjs","names":[],"sources":["../../lib/jsonSchema.ts"],"sourcesContent":["import { startCase } from 'lodash-es';\n\nimport type {\n FunctionConvertedTypeSchema,\n FunctionGenericParameterSchema,\n FunctionJsonSchema,\n FunctionParameterJsonSchema,\n FunctionReturnTypeJsonSchema,\n ObjectSchemaMap,\n} from './objectSchemaTypes';\n/**\n * Consumers with a known set of platform object keys can narrow `objectKey`\n * via declaration merging:\n *\n * declare module '@persona/design-system/lib/jsonSchema' {\n * interface JsonSchemaObjectKeyRegistry { objectKey: MyObjectKeyEnum }\n * }\n */\nexport interface JsonSchemaObjectKeyRegistry {}\n\nexport type JsonSchemaObjectKey = JsonSchemaObjectKeyRegistry extends {\n objectKey: infer K extends string;\n}\n ? K\n : string;\n\n/**\n * Field types are consumer-defined. Register them by mapping each field type to the JSON type it\n * serializes as (`null` when it has no fixed JSON type); PDS derives the full `fieldType` set and\n * each JSON schema interface's allowed `fieldType`s from the map:\n *\n * const FIELD_TYPE_JSON_TYPES = {\n * [MyFieldType.File]: 'object',\n * [MyFieldType.Alias]: null,\n * } as const satisfies Record<MyFieldType, `${JsonSchemaTypes}` | null>;\n *\n * declare module '@persona/design-system/lib/jsonSchema' {\n * interface JsonSchemaFieldTypeRegistry { fieldTypes: typeof FIELD_TYPE_JSON_TYPES }\n * }\n *\n * See the \"Lib/JSON Schema\" docs page for the full guide.\n */\nexport interface JsonSchemaFieldTypeRegistry {}\n\nexport type JsonSchemaFieldType = JsonSchemaFieldTypeRegistry extends { fieldTypes: infer M }\n ? keyof M & string\n : string;\n\ntype FieldTypeKind = `${Exclude<JsonSchemaTypes, JsonSchemaTypes.Null>}`;\n\ntype FieldTypeFor<K extends FieldTypeKind> = JsonSchemaFieldTypeRegistry extends {\n fieldTypes: infer M;\n}\n ? { [P in keyof M]: M[P] extends K ? P : never }[keyof M] & string\n : string;\n\n/** A field type this module gives runtime meaning to, as the consumer's type spells it. */\ntype KnownFieldType<V extends string> = string extends JsonSchemaFieldType\n ? V\n : Extract<JsonSchemaFieldType, V>;\n\nexport enum JsonSchemaTypes {\n Array = 'array',\n Boolean = 'boolean',\n Integer = 'integer',\n Number = 'number',\n Object = 'object',\n String = 'string',\n Null = 'null',\n}\n\nexport enum JsonSchemaCustomTypes {\n Date = 'date',\n Datetime = 'datetime',\n Enum = 'enum',\n File = 'file',\n MultiEnum = 'multi-enum',\n GroupedEnum = 'grouped-enum',\n Relation = 'relation',\n MaskedString = 'secret',\n Unknown = 'unknown',\n}\n\nexport type JsonSchemaAllTypes = JsonSchemaTypes | JsonSchemaCustomTypes;\nexport const JsonSchemaAllTypes = {\n ...JsonSchemaTypes,\n ...JsonSchemaCustomTypes,\n};\n\nexport const JsonSchemaStringifiableTypes = [\n JsonSchemaTypes.Boolean,\n JsonSchemaTypes.Integer,\n JsonSchemaTypes.Number,\n JsonSchemaTypes.String,\n JsonSchemaCustomTypes.Date,\n JsonSchemaCustomTypes.Enum,\n];\n\nexport type JsonSchemaBasicTypes =\n | JsonSchemaTypes.Boolean\n | JsonSchemaTypes.Integer\n | JsonSchemaTypes.Number\n | JsonSchemaTypes.String;\n\nexport interface JsonSchemaBase {\n title?: string;\n description?: string;\n examples?: (string | number)[];\n oneOf?: JsonSchema[];\n $ref?: string;\n $id?: string;\n id?: string; // custom\n // TODO: This likely should be a `JsonSchema` not an object containing only `type` but currently\n // only simple objects with a `type` property are expected.\n // Setting the correct type causes too-deep type recursion errors elsewhere.\n serializedSchema?: { type: JsonSchemaTypes } | null; // custom;\n default?: unknown;\n readOnly?: boolean;\n}\n\nexport interface JsonSchemaArray<ItemSchema = JsonSchema> extends JsonSchemaBase {\n type: JsonSchemaTypes.Array;\n items: ItemSchema;\n uniqueItems?: boolean;\n fieldType?: FieldTypeFor<'array'>; // custom\n default?: unknown[];\n supportedFunctions?: string[];\n}\n\nexport interface JsonSchemaBoolean extends JsonSchemaBase {\n type: JsonSchemaTypes.Boolean;\n fieldType?: FieldTypeFor<'boolean'>; // custom\n default?: boolean;\n}\n\nexport interface JsonSchemaInteger extends JsonSchemaBase {\n type: JsonSchemaTypes.Integer;\n enum?: number[];\n minimum?: number;\n maximum?: number;\n fieldType?: FieldTypeFor<'integer'>; // custom\n default?: number;\n}\n\nexport interface JsonSchemaNumber extends JsonSchemaBase {\n type: JsonSchemaTypes.Number;\n enum?: number[];\n minimum?: number;\n maximum?: number;\n fieldType?: FieldTypeFor<'number'>; // custom\n default?: number;\n}\n\nexport interface JsonSchemaNull extends JsonSchemaBase {\n type: JsonSchemaTypes.Null;\n default?: null;\n}\n\nexport interface JsonSchemaObject<PropertySchema = JsonSchema> extends JsonSchemaBase {\n type: JsonSchemaTypes.Object;\n properties: Record<string, PropertySchema>;\n required?: string[];\n // custom\n objectKey?: JsonSchemaObjectKey;\n // custom\n fieldType?: FieldTypeFor<'object'>;\n // custom\n isVariable?: boolean;\n // custom: picker subtitle for a chain root; generated root `description`s\n // otherwise just repeat the label and are hidden\n rootDescription?: string;\n additionalProperties?: boolean;\n baseSupportedFunctions?: string[];\n}\n\nexport const EMPTY_JSON_SCHEMA_OBJECT: JsonSchemaObject = {\n type: JsonSchemaTypes.Object,\n properties: {},\n};\n\nexport interface JsonSchemaString extends JsonSchemaBase {\n type: JsonSchemaTypes.String;\n enum?: string[];\n oneOf?: JsonSchemaConst[];\n const?: string;\n format?: string;\n group?: string; // custom\n labels?: string[]; // custom\n maxLength?: number | null;\n fieldType?: FieldTypeFor<'string'>; // custom\n default?: string;\n}\n\nexport interface JsonSchemaAnyOf extends JsonSchemaBase {\n anyOf: JsonSchema[];\n}\n\nexport interface JsonSchemaConst extends JsonSchemaBase {\n const: string;\n}\n\nexport interface JsonSchemaRef extends JsonSchemaBase {\n $ref: string;\n // custom\n objectKey?: JsonSchemaObjectKey;\n}\n\nexport type JsonSchemaEmpty = Record<string, never>;\n\nexport type JsonSchemaBasic =\n | JsonSchemaBoolean\n | JsonSchemaInteger\n | JsonSchemaNumber\n | JsonSchemaString;\n\n// This is an explicit type for json schemas that only use the standard types.\n// e.g. All subschemas will have a `type` attribute.\n// This is useful for when you know you won't be dealing with any uncommon schemas like anyOf.\nexport type JsonSchemaCore =\n | JsonSchemaArray<JsonSchemaCore>\n | JsonSchemaBoolean\n | JsonSchemaInteger\n | JsonSchemaNumber\n | JsonSchemaObject<JsonSchemaCore>\n | JsonSchemaString;\n\nexport type JsonSchema =\n | JsonSchemaArray\n | JsonSchemaBoolean\n | JsonSchemaInteger\n | JsonSchemaNumber\n | JsonSchemaObject\n | JsonSchemaString\n | JsonSchemaAnyOf\n | JsonSchemaConst\n | JsonSchemaRef\n | JsonSchemaBase;\n\nexport const isJsonSchemaObject = (schema: JsonSchema): schema is JsonSchemaObject => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Object;\n};\n\nexport const isJsonSchemaArray = (schema: JsonSchema): schema is JsonSchemaArray => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Array;\n};\n\n/** Returns true for non-primitive schemas (object, array, or $ref to a platform object). */\nexport const isNonPrimitiveSchema = (schema: JsonSchema): boolean =>\n isJsonSchemaObject(schema) || isJsonSchemaArray(schema) || isJsonSchemaRef(schema);\n\nexport const isFileType = (\n fieldType: JsonSchemaFieldType | undefined,\n): fieldType is KnownFieldType<'file'> => fieldType === 'file';\n\nexport const isJsonType = (\n fieldType: JsonSchemaFieldType | undefined,\n): fieldType is KnownFieldType<'json'> => fieldType === 'json';\n\nexport const isFileField = (schema: JsonSchema): boolean =>\n 'fieldType' in schema && isFileType(schema.fieldType);\n\nexport const isArrayWithFileItems = (schema: JsonSchema): boolean =>\n isJsonSchemaArray(schema) &&\n !!schema.items &&\n typeof schema.items === 'object' &&\n 'fieldType' in schema.items &&\n isFileType(schema.items.fieldType);\n\n/** ImageGallery accepts file schemas or arrays of file items. */\nexport const isFileSchema = (schema: JsonSchema): boolean =>\n isFileField(schema) || isArrayWithFileItems(schema);\n\nexport const isJsonSchemaRef = (schema: JsonSchema): schema is JsonSchemaRef => {\n return '$ref' in schema;\n};\n\nexport const isJsonSchemaPlatformObject = (schema: JsonSchema): schema is JsonSchemaRef => {\n return isJsonSchemaRef(schema) && 'objectKey' in schema;\n};\n\nexport const isJsonSchemaString = (schema: JsonSchema): schema is JsonSchemaString => {\n return 'type' in schema && schema.type === JsonSchemaTypes.String;\n};\n\nexport const isJsonSchemaDate = (schema: JsonSchema): schema is JsonSchemaString => {\n return (\n 'type' in schema &&\n schema.type === JsonSchemaTypes.String &&\n 'format' in schema &&\n schema.format === 'date'\n );\n};\n\nexport const isJsonSchemaDateTime = (schema: JsonSchema): schema is JsonSchemaString => {\n return (\n 'type' in schema &&\n schema.type === JsonSchemaTypes.String &&\n 'format' in schema &&\n schema.format === 'date-time'\n );\n};\n\nexport const isJsonSchemaSecret = (schema: JsonSchema): schema is JsonSchemaString => {\n return (\n 'type' in schema &&\n schema.type === JsonSchemaTypes.String &&\n 'format' in schema &&\n schema.format === 'secret'\n );\n};\n\nexport const isOneOfSchema = (\n schema: JsonSchema,\n): schema is JsonSchemaBase & { oneOf: JsonSchemaConst[] } => {\n return 'oneOf' in schema && schema.oneOf != null && Array.isArray(schema.oneOf);\n};\n\nexport const isOneOfStringSchema = (\n schema: JsonSchema,\n): schema is JsonSchemaString & { oneOf: JsonSchemaConst[] } => {\n return (\n isJsonSchemaString(schema) &&\n 'oneOf' in schema &&\n schema.oneOf != null &&\n Array.isArray(schema.oneOf)\n );\n};\n\nexport const isFunctionSchema = (schema: JsonSchema): schema is FunctionJsonSchema => {\n return schema && 'function' in schema && !!schema.function;\n};\n\nexport const genericArrayItemSchema = (\n object: JsonSchema,\n schema: FunctionParameterJsonSchema | FunctionReturnTypeJsonSchema,\n): JsonSchema | null => {\n if (!('genericType' in schema) || schema.genericType !== 'array_item_schema') {\n return null;\n }\n const array = withNameableType(object);\n return array != null && isJsonSchemaArray(array) && isSubschema(array.items) ? array.items : null;\n};\n\nexport const isPrecedingSchema = (\n schema: FunctionParameterJsonSchema | FunctionReturnTypeJsonSchema,\n) => {\n return 'genericType' in schema && schema.genericType === 'preceding_schema';\n};\n\nexport const isGenericParameterSchema = (\n schema: FunctionParameterJsonSchema | FunctionReturnTypeJsonSchema,\n): schema is FunctionGenericParameterSchema => {\n return (\n 'genericType' in schema && schema.genericType === 'parameter_schema' && 'position' in schema\n );\n};\n\nexport const isConvertedTypeSchema = (\n schema: FunctionParameterJsonSchema | FunctionReturnTypeJsonSchema,\n): schema is FunctionConvertedTypeSchema => {\n return (\n 'genericType' in schema && schema.genericType === 'converted_type' && 'schemaByValue' in schema\n );\n};\n\nexport const isJsonSchemaChoices = (schema: JsonSchema): schema is JsonSchemaString => {\n return 'type' in schema && schema.type === JsonSchemaTypes.String && 'enum' in schema;\n};\n\nexport const isJsonSchemaInteger = (schema: JsonSchema): schema is JsonSchemaInteger => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Integer;\n};\n\nexport const isJsonSchemaNumber = (schema: JsonSchema): schema is JsonSchemaNumber => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Number;\n};\n\nexport const isJsonSchemaBoolean = (schema: JsonSchema): schema is JsonSchemaBoolean => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Boolean;\n};\n\nexport const functionParametersFromJsonSchema = (\n functionSchema: JsonSchema,\n currentSchema: JsonSchema,\n): JsonSchema[] => {\n if (!isFunctionSchema(functionSchema)) {\n return [];\n }\n\n const paramTypes = functionSchema.properties.parameterTypes;\n const orderedParams: JsonSchema[] = [];\n Object.entries(paramTypes.properties).forEach(([title, paramObject]) => {\n orderedParams[paramObject.position] = {\n title,\n ...(genericArrayItemSchema(currentSchema, paramObject) ?? paramObject),\n };\n });\n return orderedParams;\n};\n\nexport const getArrayItemType = (schema: JsonSchema): JsonSchemaTypes | null => {\n if (!isJsonSchemaArray(schema) || !('type' in schema.items) || schema.items.type == null) {\n return null;\n }\n\n const itemType = schema.items.type;\n\n switch (itemType) {\n case JsonSchemaTypes.Boolean:\n case JsonSchemaTypes.Integer:\n case JsonSchemaTypes.Number:\n case JsonSchemaTypes.Object:\n case JsonSchemaTypes.String:\n return itemType;\n case JsonSchemaTypes.Array:\n // Nested arrays are not supported for simple array item types\n return null;\n default:\n return null;\n }\n};\n\n/**\n * Display labels for field-backed schemas, whose JSON type alone is too coarse to identify them:\n * every file and relation field serializes as `object`, so only `fieldType` distinguishes a document\n * from a selfie from a plain hash. Shared by both the array-item and object branches below so a type\n * can't be labelled two ways depending on whether it is wrapped in an array.\n *\n * Values follow `FIELD_SCHEMA_TYPE_DISPLAY` in `front-end/lib/fields` so the same field reads the same in the\n * field-schema editor and in these pickers. They are duplicated rather than imported because\n * `front-end/lib/fields` imports this module, and this label map is deliberately dependency-free.\n *\n * These are names, so they are intentionally finer-grained than `getDataTypeFromJsonSchema`, which\n * resolves the same schemas to a rendering strategy: it has no relation case (base `Field::Relation`\n * lands on `DataType.Hash`) and folds NFC into `DataType.GovernmentId`. A label wants to be as\n * specific as the schema allows; a DataType wants to be as specific as the renderer supports.\n *\n * The base `Field::Relation` appears when a producer erases the concrete subtype; \"Relation\" is\n * vague but still truer than the bare JSON type.\n */\nconst FIELD_TYPE_LABELS: Partial<Record<string, string>> = {\n 'Field::Relation::Document::Generic': 'Document',\n file: 'File',\n 'Field::Relation::Document::GovernmentId': 'Government ID',\n 'Field::Relation::Document::GovernmentIdNfc': 'Government ID NFC',\n hash: 'Hash',\n json: 'JSON',\n 'platform-file': 'Platform File',\n 'Field::Relation': 'Relation',\n 'Field::Relation::Selfie': 'Selfie',\n};\n\n/**\n * Names the field types that are all `type: 'string'` in JSON Schema and are told apart only by a\n * marker, so an item inside an array reads the same as it would on its own. Returns null for a\n * plain string, leaving the caller to fall back to the JSON type.\n */\nconst stringSubtypeLabel = (schema: JsonSchema): string | null => {\n if (!isJsonSchemaString(schema)) {\n return null;\n }\n if (schema.fieldType === 'choices') {\n return 'Choices';\n }\n // The backend platform-object schema sends both markers for an email address; a schema built\n // from a field schema on the client sends `format` alone.\n if (schema.fieldType === 'email-address' || schema.format === 'email') {\n return 'Email Address';\n }\n if (schema.format === 'date-time') {\n return 'Datetime';\n }\n if (schema.format === 'date') {\n return 'Date';\n }\n if (schema.format === 'secret') {\n return 'Secret';\n }\n return null;\n};\n\n/**\n * An `items` slot holds a boolean in JSON Schema 2020-12, and anything at all in a hand-written\n * schema, so a label rule can only treat it as a schema once it is an object.\n */\nconst isSubschema = (items: unknown): items is JsonSchema =>\n items != null && typeof items === 'object';\n\n/**\n * Restates a `type` union as the single type it names, so a caller can apply one label rule to a\n * nullable schema and its non-nullable form alike. Returns null when the type names nothing a label\n * can use: no `type` at all, or a union wider than nullable.\n */\nconst withNameableType = (\n schema: JsonSchema | FunctionJsonSchema,\n): (JsonSchema & { type: JsonSchemaTypes }) | null => {\n if (!('type' in schema)) {\n return null;\n }\n const type = schema.type as JsonSchemaTypes | JsonSchemaTypes[];\n const nameable = typeof type === 'string' ? type : getNonNullableType(schema);\n if (nameable == null) {\n return null;\n }\n const named = { ...schema, type: nameable };\n return named as JsonSchema & { type: JsonSchemaTypes };\n};\n\nexport const humanizeSchemaType = ({\n schema,\n parentSchema = {},\n}: {\n schema: JsonSchema | FunctionJsonSchema;\n parentSchema?: JsonSchema;\n}): string => {\n if ('function' in schema && schema.function) {\n return 'Function';\n }\n\n const format = (typeName: string, { asArray = false }: { asArray?: boolean } = {}): string => {\n return startCase(typeName.split('/')[0]) + (asArray ? '[]' : '');\n };\n\n // Unlike a `type`, an `objectKey` is never narrowed before it gets here, and a customer-authored\n // schema can hold anything in it.\n const formatObjectKey = (objectKey: unknown, options: { asArray?: boolean } = {}): string =>\n typeof objectKey === 'string' ? format(objectKey, options) : 'Unsupported';\n\n if ('genericType' in schema && schema.genericType === 'array_item_schema') {\n const parent = withNameableType(parentSchema);\n\n if (parent != null && isJsonSchemaArray(parent) && isSubschema(parent.items)) {\n if ('objectKey' in parent.items && parent.items.objectKey) {\n return formatObjectKey(parent.items.objectKey);\n }\n\n if ('type' in parent.items) {\n // The option here is the item itself, so an item type that names nothing leaves no outer\n // type to fall back on.\n const items = withNameableType(parent.items);\n return items == null ? 'Unsupported' : (stringSubtypeLabel(items) ?? format(items.type));\n }\n }\n }\n\n if (isJsonSchemaRef(schema) && schema.objectKey) {\n return formatObjectKey(schema.objectKey);\n }\n\n if (!('type' in schema)) {\n return '';\n }\n\n // Resolved before any rule reads the type, so a nullable schema is labelled the same way whether\n // it stands alone or sits in an array.\n const named = withNameableType(schema);\n if (named == null) {\n // TODO(PLO-345): return one label per non-null type for multi-non-null schemas.\n return 'Unsupported';\n }\n\n if (isJsonSchemaArray(named)) {\n if (named.fieldType === 'multi-choices') {\n return 'Multi Choices';\n }\n\n if (isSubschema(named.items)) {\n if ('objectKey' in named.items && named.items.objectKey) {\n return formatObjectKey(named.items.objectKey, { asArray: true });\n }\n\n // An item schema with no nameable type leaves the array reading as its own `Array` type,\n // which is still true of the value.\n const items = withNameableType(named.items);\n if (items != null) {\n // Object items are named by their `fieldType`; ones without a recognized marker read as\n // `Hash[]` rather than `Object[]`, since a bare `object` says nothing useful to a reader.\n if (isJsonSchemaObject(items)) {\n const itemLabel = items.fieldType && FIELD_TYPE_LABELS[items.fieldType];\n return `${itemLabel ?? 'Hash'}[]`;\n }\n\n const itemLabel = stringSubtypeLabel(items);\n if (itemLabel) {\n return `${itemLabel}[]`;\n }\n\n return format(items.type, { asArray: true });\n }\n }\n }\n\n if (isJsonSchemaString(named)) {\n if ('objectKey' in named && named.objectKey != null) {\n return formatObjectKey(named.objectKey);\n }\n const label = stringSubtypeLabel(named);\n if (label) {\n return label;\n }\n }\n\n if (isJsonSchemaObject(named)) {\n if (named.objectKey) {\n return formatObjectKey(named.objectKey);\n }\n\n // An untagged object has no field type to name it, so it falls through to its JSON type.\n const label = named.fieldType && FIELD_TYPE_LABELS[named.fieldType];\n if (label) {\n return label;\n }\n }\n\n return format(named.type);\n};\n\nexport const getNonNullableType = (\n schema: JsonSchema | FunctionJsonSchema | null | undefined,\n): JsonSchemaTypes | null => {\n if (!schema || !('type' in schema)) {\n return null;\n }\n const type = schema.type as JsonSchemaTypes | JsonSchemaTypes[];\n if (!Array.isArray(type)) {\n return null;\n }\n if (type.length !== 2 || !type.includes(JsonSchemaTypes.Null)) {\n return null;\n }\n // Only the cast above makes a member a `JsonSchemaTypes`; a hand-written schema can put anything\n // in the union, and callers splat this into a `type` their own callers then read as a name.\n const nonNullable = type.find((t) => t !== JsonSchemaTypes.Null);\n return typeof nonNullable === 'string' ? nonNullable : null;\n};\n\n/**\n * Unwraps an exactly-nullable platform-object union — a `oneOf` of one `$ref`\n * member and one `null` member — to its `$ref` member. Any other shape\n * (arbitrary unions, multiple refs, inline members) returns null so it is\n * never treated as a single receiver type.\n */\nexport const getNonNullableRefSchema = (\n schema: JsonSchema | null | undefined,\n): JsonSchemaRef | null => {\n if (!schema || !('oneOf' in schema) || !Array.isArray(schema.oneOf)) {\n return null;\n }\n if ('type' in schema || schema.oneOf.length !== 2) {\n return null;\n }\n const nullMembers: JsonSchema[] = schema.oneOf.filter(\n (member) => 'type' in member && (member.type as JsonSchemaTypes) === JsonSchemaTypes.Null,\n );\n if (nullMembers.length !== 1) {\n return null;\n }\n const refMember = schema.oneOf.find((member) => !nullMembers.includes(member));\n return refMember && isJsonSchemaRef(refMember) ? refMember : null;\n};\n\nexport const isSchemaTypeAllowed = (\n schema: JsonSchema | FunctionJsonSchema | null | undefined,\n allowedTypes: readonly string[],\n): boolean => {\n if (!schema) {\n return false;\n }\n const nonNullable = getNonNullableType(schema);\n if (nonNullable) {\n return allowedTypes.includes(nonNullable);\n }\n if ('type' in schema && !Array.isArray(schema.type) && allowedTypes.includes(schema.type)) {\n return true;\n }\n if ('format' in schema && typeof schema.format === 'string') {\n return allowedTypes.includes(schema.format);\n }\n return false;\n};\n\nexport const extendSchema = (\n schemaMap: ObjectSchemaMap,\n schemaToAdd: Partial<Record<keyof typeof schemaMap, Record<string, JsonSchema>>>,\n): ObjectSchemaMap => {\n return Object.fromEntries(\n Object.entries(schemaMap).map(([key, schema]) => {\n return [\n key,\n {\n ...schema,\n properties: {\n ...schema?.properties,\n ...schemaToAdd[key],\n },\n },\n ];\n }),\n );\n};\n"],"mappings":";;AA6DA,IAAY,kBAAL,yBAAA,iBAAA;AACL,iBAAA,WAAA;AACA,iBAAA,aAAA;AACA,iBAAA,aAAA;AACA,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ACY;AACZ,KAAI,CAAC,OACH,QAAO;CAET,MAAM,cAAc,mBAAmB,OAAO;AAC9C,KAAI,YACF,QAAO,aAAa,SAAS,YAAY;AAE3C,KAAI,UAAU,UAAU,CAAC,MAAM,QAAQ,OAAO,KAAK,IAAI,aAAa,SAAS,OAAO,KAAK,CACvF,QAAO;AAET,KAAI,YAAY,UAAU,OAAO,OAAO,WAAW,SACjD,QAAO,aAAa,SAAS,OAAO,OAAO;AAE7C,QAAO;;AAGT,MAAa,gBACX,WACA,gBACoB;AACpB,QAAO,OAAO,YACZ,OAAO,QAAQ,UAAU,CAAC,KAAK,CAAC,KAAK,YAAY;AAC/C,SAAO,CACL,KACA;GACE,GAAG;GACH,YAAY;IACV,GAAG,QAAQ;IACX,GAAG,YAAY;IAChB;GACF,CACF;GACD,CACH"}
|
|
1
|
+
{"version":3,"file":"jsonSchema.mjs","names":[],"sources":["../../lib/jsonSchema.ts"],"sourcesContent":["import { startCase } from 'lodash-es';\n\nimport type {\n FunctionConvertedTypeSchema,\n FunctionGenericParameterSchema,\n FunctionJsonSchema,\n FunctionParameterJsonSchema,\n FunctionReturnTypeJsonSchema,\n ObjectSchemaMap,\n} from './objectSchemaTypes';\n/**\n * Consumers with a known set of platform object keys can narrow `objectKey`\n * via declaration merging:\n *\n * declare module '@persona/design-system/lib/jsonSchema' {\n * interface JsonSchemaObjectKeyRegistry { objectKey: MyObjectKeyEnum }\n * }\n */\nexport interface JsonSchemaObjectKeyRegistry {}\n\nexport type JsonSchemaObjectKey = JsonSchemaObjectKeyRegistry extends {\n objectKey: infer K extends string;\n}\n ? K\n : string;\n\n/**\n * Field types are consumer-defined. Register them by mapping each field type to the JSON type it\n * serializes as (`null` when it has no fixed JSON type); PDS derives the full `fieldType` set and\n * each JSON schema interface's allowed `fieldType`s from the map:\n *\n * const FIELD_TYPE_JSON_TYPES = {\n * [MyFieldType.File]: 'object',\n * [MyFieldType.Alias]: null,\n * } as const satisfies Record<MyFieldType, `${JsonSchemaTypes}` | null>;\n *\n * declare module '@persona/design-system/lib/jsonSchema' {\n * interface JsonSchemaFieldTypeRegistry { fieldTypes: typeof FIELD_TYPE_JSON_TYPES }\n * }\n *\n * See the \"Lib/JSON Schema\" docs page for the full guide.\n */\nexport interface JsonSchemaFieldTypeRegistry {}\n\nexport type JsonSchemaFieldType = JsonSchemaFieldTypeRegistry extends { fieldTypes: infer M }\n ? keyof M & string\n : string;\n\ntype FieldTypeKind = `${Exclude<JsonSchemaTypes, JsonSchemaTypes.Null>}`;\n\ntype FieldTypeFor<K extends FieldTypeKind> = JsonSchemaFieldTypeRegistry extends {\n fieldTypes: infer M;\n}\n ? { [P in keyof M]: M[P] extends K ? P : never }[keyof M] & string\n : string;\n\n/** A field type this module gives runtime meaning to, as the consumer's type spells it. */\ntype KnownFieldType<V extends string> = string extends JsonSchemaFieldType\n ? V\n : Extract<JsonSchemaFieldType, V>;\n\nexport enum JsonSchemaTypes {\n Array = 'array',\n Boolean = 'boolean',\n Integer = 'integer',\n Number = 'number',\n Object = 'object',\n String = 'string',\n Null = 'null',\n}\n\nexport enum JsonSchemaCustomTypes {\n Date = 'date',\n Datetime = 'datetime',\n Enum = 'enum',\n File = 'file',\n MultiEnum = 'multi-enum',\n GroupedEnum = 'grouped-enum',\n Relation = 'relation',\n MaskedString = 'secret',\n Unknown = 'unknown',\n}\n\nexport type JsonSchemaAllTypes = JsonSchemaTypes | JsonSchemaCustomTypes;\nexport const JsonSchemaAllTypes = {\n ...JsonSchemaTypes,\n ...JsonSchemaCustomTypes,\n};\n\nexport const JsonSchemaStringifiableTypes = [\n JsonSchemaTypes.Boolean,\n JsonSchemaTypes.Integer,\n JsonSchemaTypes.Number,\n JsonSchemaTypes.String,\n JsonSchemaCustomTypes.Date,\n JsonSchemaCustomTypes.Enum,\n];\n\nexport type JsonSchemaBasicTypes =\n | JsonSchemaTypes.Boolean\n | JsonSchemaTypes.Integer\n | JsonSchemaTypes.Number\n | JsonSchemaTypes.String;\n\nexport interface JsonSchemaBase {\n title?: string;\n description?: string;\n examples?: (string | number)[];\n oneOf?: JsonSchema[];\n $ref?: string;\n $id?: string;\n id?: string; // custom\n // TODO: This likely should be a `JsonSchema` not an object containing only `type` but currently\n // only simple objects with a `type` property are expected.\n // Setting the correct type causes too-deep type recursion errors elsewhere.\n serializedSchema?: { type: JsonSchemaTypes } | null; // custom;\n default?: unknown;\n readOnly?: boolean;\n}\n\nexport interface JsonSchemaArray<ItemSchema = JsonSchema> extends JsonSchemaBase {\n type: JsonSchemaTypes.Array;\n items: ItemSchema;\n uniqueItems?: boolean;\n fieldType?: FieldTypeFor<'array'>; // custom\n default?: unknown[];\n supportedFunctions?: string[];\n}\n\nexport interface JsonSchemaBoolean extends JsonSchemaBase {\n type: JsonSchemaTypes.Boolean;\n fieldType?: FieldTypeFor<'boolean'>; // custom\n default?: boolean;\n}\n\nexport interface JsonSchemaInteger extends JsonSchemaBase {\n type: JsonSchemaTypes.Integer;\n enum?: number[];\n minimum?: number;\n maximum?: number;\n fieldType?: FieldTypeFor<'integer'>; // custom\n default?: number;\n}\n\nexport interface JsonSchemaNumber extends JsonSchemaBase {\n type: JsonSchemaTypes.Number;\n enum?: number[];\n minimum?: number;\n maximum?: number;\n fieldType?: FieldTypeFor<'number'>; // custom\n default?: number;\n}\n\nexport interface JsonSchemaNull extends JsonSchemaBase {\n type: JsonSchemaTypes.Null;\n default?: null;\n}\n\nexport interface JsonSchemaObject<PropertySchema = JsonSchema> extends JsonSchemaBase {\n type: JsonSchemaTypes.Object;\n properties: Record<string, PropertySchema>;\n required?: string[];\n // custom\n objectKey?: JsonSchemaObjectKey;\n // custom\n fieldType?: FieldTypeFor<'object'>;\n // custom\n isVariable?: boolean;\n // custom: picker subtitle for a chain root; generated root `description`s\n // otherwise just repeat the label and are hidden\n rootDescription?: string;\n // `true` admits keys missing from `properties` with an unknown type; a schema types them.\n additionalProperties?: boolean | JsonSchema;\n baseSupportedFunctions?: string[];\n}\n\nexport const EMPTY_JSON_SCHEMA_OBJECT: JsonSchemaObject = {\n type: JsonSchemaTypes.Object,\n properties: {},\n};\n\nexport interface JsonSchemaString extends JsonSchemaBase {\n type: JsonSchemaTypes.String;\n enum?: string[];\n oneOf?: JsonSchemaConst[];\n const?: string;\n format?: string;\n group?: string; // custom\n labels?: string[]; // custom\n maxLength?: number | null;\n fieldType?: FieldTypeFor<'string'>; // custom\n default?: string;\n}\n\nexport interface JsonSchemaAnyOf extends JsonSchemaBase {\n anyOf: JsonSchema[];\n}\n\nexport interface JsonSchemaConst extends JsonSchemaBase {\n const: string;\n}\n\nexport interface JsonSchemaRef extends JsonSchemaBase {\n $ref: string;\n // custom\n objectKey?: JsonSchemaObjectKey;\n}\n\nexport type JsonSchemaEmpty = Record<string, never>;\n\nexport type JsonSchemaBasic =\n | JsonSchemaBoolean\n | JsonSchemaInteger\n | JsonSchemaNumber\n | JsonSchemaString;\n\n// This is an explicit type for json schemas that only use the standard types.\n// e.g. All subschemas will have a `type` attribute.\n// This is useful for when you know you won't be dealing with any uncommon schemas like anyOf.\nexport type JsonSchemaCore =\n | JsonSchemaArray<JsonSchemaCore>\n | JsonSchemaBoolean\n | JsonSchemaInteger\n | JsonSchemaNumber\n | JsonSchemaObject<JsonSchemaCore>\n | JsonSchemaString;\n\nexport type JsonSchema =\n | JsonSchemaArray\n | JsonSchemaBoolean\n | JsonSchemaInteger\n | JsonSchemaNumber\n | JsonSchemaObject\n | JsonSchemaString\n | JsonSchemaAnyOf\n | JsonSchemaConst\n | JsonSchemaRef\n | JsonSchemaBase;\n\nexport const isJsonSchemaObject = (schema: JsonSchema): schema is JsonSchemaObject => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Object;\n};\n\nexport const isJsonSchemaArray = (schema: JsonSchema): schema is JsonSchemaArray => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Array;\n};\n\n/** Returns true for non-primitive schemas (object, array, or $ref to a platform object). */\nexport const isNonPrimitiveSchema = (schema: JsonSchema): boolean =>\n isJsonSchemaObject(schema) || isJsonSchemaArray(schema) || isJsonSchemaRef(schema);\n\nexport const isFileType = (\n fieldType: JsonSchemaFieldType | undefined,\n): fieldType is KnownFieldType<'file'> => fieldType === 'file';\n\nexport const isJsonType = (\n fieldType: JsonSchemaFieldType | undefined,\n): fieldType is KnownFieldType<'json'> => fieldType === 'json';\n\nexport const isFileField = (schema: JsonSchema): boolean =>\n 'fieldType' in schema && isFileType(schema.fieldType);\n\nexport const isArrayWithFileItems = (schema: JsonSchema): boolean =>\n isJsonSchemaArray(schema) &&\n !!schema.items &&\n typeof schema.items === 'object' &&\n 'fieldType' in schema.items &&\n isFileType(schema.items.fieldType);\n\n/** ImageGallery accepts file schemas or arrays of file items. */\nexport const isFileSchema = (schema: JsonSchema): boolean =>\n isFileField(schema) || isArrayWithFileItems(schema);\n\nexport const isJsonSchemaRef = (schema: JsonSchema): schema is JsonSchemaRef => {\n return '$ref' in schema;\n};\n\nexport const isJsonSchemaPlatformObject = (schema: JsonSchema): schema is JsonSchemaRef => {\n return isJsonSchemaRef(schema) && 'objectKey' in schema;\n};\n\nexport const isJsonSchemaString = (schema: JsonSchema): schema is JsonSchemaString => {\n return 'type' in schema && schema.type === JsonSchemaTypes.String;\n};\n\nexport const isJsonSchemaDate = (schema: JsonSchema): schema is JsonSchemaString => {\n return (\n 'type' in schema &&\n schema.type === JsonSchemaTypes.String &&\n 'format' in schema &&\n schema.format === 'date'\n );\n};\n\nexport const isJsonSchemaDateTime = (schema: JsonSchema): schema is JsonSchemaString => {\n return (\n 'type' in schema &&\n schema.type === JsonSchemaTypes.String &&\n 'format' in schema &&\n schema.format === 'date-time'\n );\n};\n\nexport const isJsonSchemaSecret = (schema: JsonSchema): schema is JsonSchemaString => {\n return (\n 'type' in schema &&\n schema.type === JsonSchemaTypes.String &&\n 'format' in schema &&\n schema.format === 'secret'\n );\n};\n\nexport const isOneOfSchema = (\n schema: JsonSchema,\n): schema is JsonSchemaBase & { oneOf: JsonSchemaConst[] } => {\n return 'oneOf' in schema && schema.oneOf != null && Array.isArray(schema.oneOf);\n};\n\nexport const isOneOfStringSchema = (\n schema: JsonSchema,\n): schema is JsonSchemaString & { oneOf: JsonSchemaConst[] } => {\n return (\n isJsonSchemaString(schema) &&\n 'oneOf' in schema &&\n schema.oneOf != null &&\n Array.isArray(schema.oneOf)\n );\n};\n\nexport const isFunctionSchema = (schema: JsonSchema): schema is FunctionJsonSchema => {\n return schema && 'function' in schema && !!schema.function;\n};\n\nexport const genericArrayItemSchema = (\n object: JsonSchema,\n schema: FunctionParameterJsonSchema | FunctionReturnTypeJsonSchema,\n): JsonSchema | null => {\n if (!('genericType' in schema) || schema.genericType !== 'array_item_schema') {\n return null;\n }\n const array = withNameableType(object);\n return array != null && isJsonSchemaArray(array) && isSubschema(array.items) ? array.items : null;\n};\n\nexport const isPrecedingSchema = (\n schema: FunctionParameterJsonSchema | FunctionReturnTypeJsonSchema,\n) => {\n return 'genericType' in schema && schema.genericType === 'preceding_schema';\n};\n\nexport const isGenericParameterSchema = (\n schema: FunctionParameterJsonSchema | FunctionReturnTypeJsonSchema,\n): schema is FunctionGenericParameterSchema => {\n return (\n 'genericType' in schema && schema.genericType === 'parameter_schema' && 'position' in schema\n );\n};\n\nexport const isConvertedTypeSchema = (\n schema: FunctionParameterJsonSchema | FunctionReturnTypeJsonSchema,\n): schema is FunctionConvertedTypeSchema => {\n return (\n 'genericType' in schema && schema.genericType === 'converted_type' && 'schemaByValue' in schema\n );\n};\n\nexport const isJsonSchemaChoices = (schema: JsonSchema): schema is JsonSchemaString => {\n return 'type' in schema && schema.type === JsonSchemaTypes.String && 'enum' in schema;\n};\n\nexport const isJsonSchemaInteger = (schema: JsonSchema): schema is JsonSchemaInteger => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Integer;\n};\n\nexport const isJsonSchemaNumber = (schema: JsonSchema): schema is JsonSchemaNumber => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Number;\n};\n\nexport const isJsonSchemaBoolean = (schema: JsonSchema): schema is JsonSchemaBoolean => {\n return 'type' in schema && schema.type === JsonSchemaTypes.Boolean;\n};\n\nexport const functionParametersFromJsonSchema = (\n functionSchema: JsonSchema,\n currentSchema: JsonSchema,\n): JsonSchema[] => {\n if (!isFunctionSchema(functionSchema)) {\n return [];\n }\n\n const paramTypes = functionSchema.properties.parameterTypes;\n const orderedParams: JsonSchema[] = [];\n Object.entries(paramTypes.properties).forEach(([title, paramObject]) => {\n orderedParams[paramObject.position] = {\n title,\n ...(genericArrayItemSchema(currentSchema, paramObject) ?? paramObject),\n };\n });\n return orderedParams;\n};\n\nexport const getArrayItemType = (schema: JsonSchema): JsonSchemaTypes | null => {\n if (!isJsonSchemaArray(schema) || !('type' in schema.items) || schema.items.type == null) {\n return null;\n }\n\n const itemType = schema.items.type;\n\n switch (itemType) {\n case JsonSchemaTypes.Boolean:\n case JsonSchemaTypes.Integer:\n case JsonSchemaTypes.Number:\n case JsonSchemaTypes.Object:\n case JsonSchemaTypes.String:\n return itemType;\n case JsonSchemaTypes.Array:\n // Nested arrays are not supported for simple array item types\n return null;\n default:\n return null;\n }\n};\n\n/**\n * Display labels for field-backed schemas, whose JSON type alone is too coarse to identify them:\n * every file and relation field serializes as `object`, so only `fieldType` distinguishes a document\n * from a selfie from a plain hash. Shared by both the array-item and object branches below so a type\n * can't be labelled two ways depending on whether it is wrapped in an array.\n *\n * Values follow `FIELD_SCHEMA_TYPE_DISPLAY` in `front-end/lib/fields` so the same field reads the same in the\n * field-schema editor and in these pickers. They are duplicated rather than imported because\n * `front-end/lib/fields` imports this module, and this label map is deliberately dependency-free.\n *\n * These are names, so they are intentionally finer-grained than `getDataTypeFromJsonSchema`, which\n * resolves the same schemas to a rendering strategy: it has no relation case (base `Field::Relation`\n * lands on `DataType.Hash`) and folds NFC into `DataType.GovernmentId`. A label wants to be as\n * specific as the schema allows; a DataType wants to be as specific as the renderer supports.\n *\n * The base `Field::Relation` appears when a producer erases the concrete subtype; \"Relation\" is\n * vague but still truer than the bare JSON type.\n */\nconst FIELD_TYPE_LABELS: Partial<Record<string, string>> = {\n 'Field::Relation::Document::Generic': 'Document',\n file: 'File',\n 'Field::Relation::Document::GovernmentId': 'Government ID',\n 'Field::Relation::Document::GovernmentIdNfc': 'Government ID NFC',\n hash: 'Hash',\n json: 'JSON',\n 'platform-file': 'Platform File',\n 'Field::Relation': 'Relation',\n 'Field::Relation::Selfie': 'Selfie',\n};\n\n/**\n * Names the field types that are all `type: 'string'` in JSON Schema and are told apart only by a\n * marker, so an item inside an array reads the same as it would on its own. Returns null for a\n * plain string, leaving the caller to fall back to the JSON type.\n */\nconst stringSubtypeLabel = (schema: JsonSchema): string | null => {\n if (!isJsonSchemaString(schema)) {\n return null;\n }\n if (schema.fieldType === 'choices') {\n return 'Choices';\n }\n // The backend platform-object schema sends both markers for an email address; a schema built\n // from a field schema on the client sends `format` alone.\n if (schema.fieldType === 'email-address' || schema.format === 'email') {\n return 'Email Address';\n }\n if (schema.format === 'date-time') {\n return 'Datetime';\n }\n if (schema.format === 'date') {\n return 'Date';\n }\n if (schema.format === 'secret') {\n return 'Secret';\n }\n return null;\n};\n\n/**\n * An `items` slot holds a boolean in JSON Schema 2020-12, and anything at all in a hand-written\n * schema, so a label rule can only treat it as a schema once it is an object.\n */\nconst isSubschema = (items: unknown): items is JsonSchema =>\n items != null && typeof items === 'object';\n\n/**\n * Restates a `type` union as the single type it names, so a caller can apply one label rule to a\n * nullable schema and its non-nullable form alike. Returns null when the type names nothing a label\n * can use: no `type` at all, or a union wider than nullable.\n */\nconst withNameableType = (\n schema: JsonSchema | FunctionJsonSchema,\n): (JsonSchema & { type: JsonSchemaTypes }) | null => {\n if (!('type' in schema)) {\n return null;\n }\n const type = schema.type as JsonSchemaTypes | JsonSchemaTypes[];\n const nameable = typeof type === 'string' ? type : getNonNullableType(schema);\n if (nameable == null) {\n return null;\n }\n const named = { ...schema, type: nameable };\n return named as JsonSchema & { type: JsonSchemaTypes };\n};\n\nexport const humanizeSchemaType = ({\n schema,\n parentSchema = {},\n}: {\n schema: JsonSchema | FunctionJsonSchema;\n parentSchema?: JsonSchema;\n}): string => {\n if ('function' in schema && schema.function) {\n return 'Function';\n }\n\n const format = (typeName: string, { asArray = false }: { asArray?: boolean } = {}): string => {\n return startCase(typeName.split('/')[0]) + (asArray ? '[]' : '');\n };\n\n // Unlike a `type`, an `objectKey` is never narrowed before it gets here, and a customer-authored\n // schema can hold anything in it.\n const formatObjectKey = (objectKey: unknown, options: { asArray?: boolean } = {}): string =>\n typeof objectKey === 'string' ? format(objectKey, options) : 'Unsupported';\n\n if ('genericType' in schema && schema.genericType === 'array_item_schema') {\n const parent = withNameableType(parentSchema);\n\n if (parent != null && isJsonSchemaArray(parent) && isSubschema(parent.items)) {\n if ('objectKey' in parent.items && parent.items.objectKey) {\n return formatObjectKey(parent.items.objectKey);\n }\n\n if ('type' in parent.items) {\n // The option here is the item itself, so an item type that names nothing leaves no outer\n // type to fall back on.\n const items = withNameableType(parent.items);\n return items == null ? 'Unsupported' : (stringSubtypeLabel(items) ?? format(items.type));\n }\n }\n }\n\n if (isJsonSchemaRef(schema) && schema.objectKey) {\n return formatObjectKey(schema.objectKey);\n }\n\n if (!('type' in schema)) {\n return '';\n }\n\n // Resolved before any rule reads the type, so a nullable schema is labelled the same way whether\n // it stands alone or sits in an array.\n const named = withNameableType(schema);\n if (named == null) {\n // TODO(PLO-345): return one label per non-null type for multi-non-null schemas.\n return 'Unsupported';\n }\n\n if (isJsonSchemaArray(named)) {\n if (named.fieldType === 'multi-choices') {\n return 'Multi Choices';\n }\n\n if (isSubschema(named.items)) {\n if ('objectKey' in named.items && named.items.objectKey) {\n return formatObjectKey(named.items.objectKey, { asArray: true });\n }\n\n // An item schema with no nameable type leaves the array reading as its own `Array` type,\n // which is still true of the value.\n const items = withNameableType(named.items);\n if (items != null) {\n // Object items are named by their `fieldType`; ones without a recognized marker read as\n // `Hash[]` rather than `Object[]`, since a bare `object` says nothing useful to a reader.\n if (isJsonSchemaObject(items)) {\n const itemLabel = items.fieldType && FIELD_TYPE_LABELS[items.fieldType];\n return `${itemLabel ?? 'Hash'}[]`;\n }\n\n const itemLabel = stringSubtypeLabel(items);\n if (itemLabel) {\n return `${itemLabel}[]`;\n }\n\n return format(items.type, { asArray: true });\n }\n }\n }\n\n if (isJsonSchemaString(named)) {\n if ('objectKey' in named && named.objectKey != null) {\n return formatObjectKey(named.objectKey);\n }\n const label = stringSubtypeLabel(named);\n if (label) {\n return label;\n }\n }\n\n if (isJsonSchemaObject(named)) {\n if (named.objectKey) {\n return formatObjectKey(named.objectKey);\n }\n\n // An untagged object has no field type to name it, so it falls through to its JSON type.\n const label = named.fieldType && FIELD_TYPE_LABELS[named.fieldType];\n if (label) {\n return label;\n }\n }\n\n return format(named.type);\n};\n\nexport const getNonNullableType = (\n schema: JsonSchema | FunctionJsonSchema | null | undefined,\n): JsonSchemaTypes | null => {\n if (!schema || !('type' in schema)) {\n return null;\n }\n const type = schema.type as JsonSchemaTypes | JsonSchemaTypes[];\n if (!Array.isArray(type)) {\n return null;\n }\n if (type.length !== 2 || !type.includes(JsonSchemaTypes.Null)) {\n return null;\n }\n // Only the cast above makes a member a `JsonSchemaTypes`; a hand-written schema can put anything\n // in the union, and callers splat this into a `type` their own callers then read as a name.\n const nonNullable = type.find((t) => t !== JsonSchemaTypes.Null);\n return typeof nonNullable === 'string' ? nonNullable : null;\n};\n\n/**\n * Unwraps an exactly-nullable platform-object union — a `oneOf` of one `$ref`\n * member and one `null` member — to its `$ref` member. Any other shape\n * (arbitrary unions, multiple refs, inline members) returns null so it is\n * never treated as a single receiver type.\n */\nexport const getNonNullableRefSchema = (\n schema: JsonSchema | null | undefined,\n): JsonSchemaRef | null => {\n if (!schema || !('oneOf' in schema) || !Array.isArray(schema.oneOf)) {\n return null;\n }\n if ('type' in schema || schema.oneOf.length !== 2) {\n return null;\n }\n const nullMembers: JsonSchema[] = schema.oneOf.filter(\n (member) => 'type' in member && (member.type as JsonSchemaTypes) === JsonSchemaTypes.Null,\n );\n if (nullMembers.length !== 1) {\n return null;\n }\n const refMember = schema.oneOf.find((member) => !nullMembers.includes(member));\n return refMember && isJsonSchemaRef(refMember) ? refMember : null;\n};\n\nexport const isSchemaTypeAllowed = (\n schema: JsonSchema | FunctionJsonSchema | null | undefined,\n allowedTypes: readonly string[],\n): boolean => {\n if (!schema) {\n return false;\n }\n const nonNullable = getNonNullableType(schema);\n if (nonNullable) {\n return allowedTypes.includes(nonNullable);\n }\n if ('type' in schema && !Array.isArray(schema.type) && allowedTypes.includes(schema.type)) {\n return true;\n }\n if ('format' in schema && typeof schema.format === 'string') {\n return allowedTypes.includes(schema.format);\n }\n return false;\n};\n\nexport const extendSchema = (\n schemaMap: ObjectSchemaMap,\n schemaToAdd: Partial<Record<keyof typeof schemaMap, Record<string, JsonSchema>>>,\n): ObjectSchemaMap => {\n return Object.fromEntries(\n Object.entries(schemaMap).map(([key, schema]) => {\n return [\n key,\n {\n ...schema,\n properties: {\n ...schema?.properties,\n ...schemaToAdd[key],\n },\n },\n ];\n }),\n );\n};\n"],"mappings":";;AA6DA,IAAY,kBAAL,yBAAA,iBAAA;AACL,iBAAA,WAAA;AACA,iBAAA,aAAA;AACA,iBAAA,aAAA;AACA,iBAAA,YAAA;AACA,iBAAA,YAAA;AACA,iBAAA,YAAA;AACA,iBAAA,UAAA;;KACD;AAED,IAAY,wBAAL,yBAAA,uBAAA;AACL,uBAAA,UAAA;AACA,uBAAA,cAAA;AACA,uBAAA,UAAA;AACA,uBAAA,UAAA;AACA,uBAAA,eAAA;AACA,uBAAA,iBAAA;AACA,uBAAA,cAAA;AACA,uBAAA,kBAAA;AACA,uBAAA,aAAA;;KACD;AAGD,MAAa,qBAAqB;CAChC,GAAG;CACH,GAAG;CACJ;AAED,MAAa,+BAA+B;;;;;;;CAO3C;AAgFD,MAAa,2BAA6C;CACxD,MAAA;CACA,YAAY,EAAE;CACf;AA4DD,MAAa,sBAAsB,WAAmD;AACpF,QAAO,UAAU,UAAU,OAAO,SAAA;;AAGpC,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,CACF;GACD,CACH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as JsonSchemaTypes, f as JsonSchemaCustomTypes, n as JsonSchema } from "../jsonSchema-
|
|
1
|
+
import { T as JsonSchemaTypes, f as JsonSchemaCustomTypes, n as JsonSchema } from "../jsonSchema-DmOA0Lnu.mjs";
|
|
2
2
|
|
|
3
3
|
//#region lib/jsonSchemaType.d.ts
|
|
4
4
|
declare const getJsonSchemaType: (schema: JsonSchema | null) => JsonSchemaTypes | JsonSchemaCustomTypes;
|
package/dist/lib/message.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MessageType } from "../message-
|
|
1
|
+
import { t as MessageType } from "../message-Dti22dmx.mjs";
|
|
2
2
|
export { MessageType };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as tryParseMethodChain, S as removeFunctionNode, _ as methodChainToString, a as getFunctionParams, b as pathContainsFunctionNode, c as isCustomFunctionNode, d as isIdentifierNode, f as isStringNode, g as methodChainRootName, h as methodChainNodeToJsonSchema, i as containsFunctionNode, l as isEmpty, m as methodChainCache, n as MethodChainNodeTypes, o as getSyntaxError, p as isValid, r as appendedMethodChain, s as isArrayNode, t as EMPTY_METHOD_CHAIN, u as isFunctionNode, v as parseMethodChain, x as pathIsNormative, y as parseWithPartialOption } from "../methodChain-
|
|
2
|
-
import { a as FunctionParamType, c as NumberNode, i as FunctionNode, l as StringNode, n as Chain, o as IdentifierNode, r as CustomFunctionNode, s as MethodChainNode, t as ArrayNode } from "../methodChainTypes-
|
|
1
|
+
import { C as tryParseMethodChain, S as removeFunctionNode, _ as methodChainToString, a as getFunctionParams, b as pathContainsFunctionNode, c as isCustomFunctionNode, d as isIdentifierNode, f as isStringNode, g as methodChainRootName, h as methodChainNodeToJsonSchema, i as containsFunctionNode, l as isEmpty, m as methodChainCache, n as MethodChainNodeTypes, o as getSyntaxError, p as isValid, r as appendedMethodChain, s as isArrayNode, t as EMPTY_METHOD_CHAIN, u as isFunctionNode, v as parseMethodChain, x as pathIsNormative, y as parseWithPartialOption } from "../methodChain-DaDvXsHF.mjs";
|
|
2
|
+
import { a as FunctionParamType, c as NumberNode, i as FunctionNode, l as StringNode, n as Chain, o as IdentifierNode, r as CustomFunctionNode, s as MethodChainNode, t as ArrayNode } from "../methodChainTypes-a7kHYhs7.mjs";
|
|
3
3
|
export { ArrayNode, Chain, CustomFunctionNode, EMPTY_METHOD_CHAIN, FunctionNode, FunctionParamType, IdentifierNode, MethodChainNode, MethodChainNodeTypes, NumberNode, StringNode, appendedMethodChain, containsFunctionNode, getFunctionParams, getSyntaxError, isArrayNode, isCustomFunctionNode, isEmpty, isFunctionNode, isIdentifierNode, isStringNode, isValid, methodChainCache, methodChainNodeToJsonSchema, methodChainRootName, methodChainToString, parseMethodChain, parseWithPartialOption, pathContainsFunctionNode, pathIsNormative, removeFunctionNode, tryParseMethodChain };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as ASTNumberNode, m as ASTStringNode, n as ASTChain, t as ASTArrayNode } from "../types-
|
|
2
|
-
import { a as FunctionParamType, c as NumberNode, l as StringNode, n as Chain } from "../methodChainTypes-
|
|
1
|
+
import { d as ASTNumberNode, m as ASTStringNode, n as ASTChain, t as ASTArrayNode } from "../types-Kmnood9Y.mjs";
|
|
2
|
+
import { a as FunctionParamType, c as NumberNode, l as StringNode, n as Chain } from "../methodChainTypes-a7kHYhs7.mjs";
|
|
3
3
|
|
|
4
4
|
//#region lib/methodChainNormalize.d.ts
|
|
5
5
|
declare function normalizeArrayItem(item: ASTStringNode | ASTNumberNode): StringNode | NumberNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FunctionParamType, c as NumberNode, i as FunctionNode, l as StringNode, n as Chain, o as IdentifierNode, r as CustomFunctionNode, s as MethodChainNode, t as ArrayNode } from "../methodChainTypes-
|
|
1
|
+
import { a as FunctionParamType, c as NumberNode, i as FunctionNode, l as StringNode, n as Chain, o as IdentifierNode, r as CustomFunctionNode, s as MethodChainNode, t as ArrayNode } from "../methodChainTypes-a7kHYhs7.mjs";
|
|
2
2
|
export { ArrayNode, Chain, CustomFunctionNode, FunctionNode, FunctionParamType, IdentifierNode, MethodChainNode, NumberNode, StringNode };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { at as FunctionConvertedTypeSchema, ct as FunctionParameterJsonSchema, dt as ObjectSchemaMap, it as CollectionMetaJsonSchema, lt as FunctionReturnTypeJsonSchema, ot as FunctionGenericParameterSchema, st as FunctionJsonSchema, ut as GenericType } from "../jsonSchema-
|
|
1
|
+
import { at as FunctionConvertedTypeSchema, ct as FunctionParameterJsonSchema, dt as ObjectSchemaMap, it as CollectionMetaJsonSchema, lt as FunctionReturnTypeJsonSchema, ot as FunctionGenericParameterSchema, st as FunctionJsonSchema, ut as GenericType } from "../jsonSchema-DmOA0Lnu.mjs";
|
|
2
2
|
export { CollectionMetaJsonSchema, FunctionConvertedTypeSchema, FunctionGenericParameterSchema, FunctionJsonSchema, FunctionParameterJsonSchema, FunctionReturnTypeJsonSchema, GenericType, ObjectSchemaMap };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as JsonSchemaRef, b as JsonSchemaObjectKey, d as JsonSchemaCore, dt as ObjectSchemaMap, n as JsonSchema, u as JsonSchemaConst, y as JsonSchemaObject } from "../jsonSchema-
|
|
1
|
+
import { S as JsonSchemaRef, b as JsonSchemaObjectKey, d as JsonSchemaCore, dt as ObjectSchemaMap, n as JsonSchema, u as JsonSchemaConst, y as JsonSchemaObject } from "../jsonSchema-DmOA0Lnu.mjs";
|
|
2
2
|
|
|
3
3
|
//#region lib/platformObject.d.ts
|
|
4
4
|
interface PlatformObjectJsonSchema extends JsonSchemaObject {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as To, n as RouterAdapter, r as RouterLinkComponentProps, t as NavigateOptions } from "../../types-
|
|
2
|
-
import { n as RouterProvider, r as useRouter, t as RouterContext } from "../../RouterContext-
|
|
3
|
-
import { t as createPath } from "../../createPath-
|
|
4
|
-
import { t as RouterLink } from "../../RouterLink-
|
|
5
|
-
import { t as usePathname } from "../../useLocationPathname-
|
|
1
|
+
import { i as To, n as RouterAdapter, r as RouterLinkComponentProps, t as NavigateOptions } from "../../types-HxiGiwQN.mjs";
|
|
2
|
+
import { n as RouterProvider, r as useRouter, t as RouterContext } from "../../RouterContext-CoDbEb_X.mjs";
|
|
3
|
+
import { t as createPath } from "../../createPath-B_CLq82C.mjs";
|
|
4
|
+
import { t as RouterLink } from "../../RouterLink-BnIEi8d4.mjs";
|
|
5
|
+
import { t as usePathname } from "../../useLocationPathname-OsvI7mH5.mjs";
|
|
6
6
|
export { NavigateOptions, RouterAdapter, RouterContext, RouterLink, RouterLinkComponentProps, RouterProvider, To, createPath, usePathname, useRouter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { Option, OptionFilters, extractPlatformObjectKey, formatDisplayValue, getFunctionSchemaForNode, getOptionForValue, getSchemaByPath, getSchemaForFieldPath, getSchemaForVariablePath, getSchemaOptions, hasRequiredPropertyShape, isTypeMatch, isValidOption, nextLinkSchema, splitAtNearestParentObject, validatePath };
|
|
1
|
+
import { _ as validatePath, a as formatDisplayValue, c as getSchemaByPath, d as getSchemaOptions, f as hasRequiredPropertyShape, g as splitAtNearestParentObject, h as nextLinkSchema, i as extractPlatformObjectKey, l as getSchemaForFieldPath, m as isValidOption, n as OptionFilters, o as getFunctionSchemaForNode, p as isTypeMatch, r as UNTYPED_ADDITIONAL_PROPERTY_SCHEMA, s as getOptionForValue, t as Option, u as getSchemaForVariablePath } from "../schemaOptions-BQgLOgtD.mjs";
|
|
2
|
+
export { Option, OptionFilters, UNTYPED_ADDITIONAL_PROPERTY_SCHEMA, extractPlatformObjectKey, formatDisplayValue, getFunctionSchemaForNode, getOptionForValue, getSchemaByPath, getSchemaForFieldPath, getSchemaForVariablePath, getSchemaOptions, hasRequiredPropertyShape, isTypeMatch, isValidOption, nextLinkSchema, splitAtNearestParentObject, validatePath };
|
|
@@ -146,6 +146,24 @@ const parseMethodChainForJSS = (path) => {
|
|
|
146
146
|
if (partial.length > 0) return appendedMethodChain(methodChain, partial);
|
|
147
147
|
return methodChain;
|
|
148
148
|
};
|
|
149
|
+
/**
|
|
150
|
+
* The schema resolved for a key admitted by `additionalProperties: true`: valid, with an unknown
|
|
151
|
+
* type. Compared by identity (e.g. by the SmartTextInput validator), so do not copy it.
|
|
152
|
+
*/
|
|
153
|
+
const UNTYPED_ADDITIONAL_PROPERTY_SCHEMA = Object.freeze({});
|
|
154
|
+
/**
|
|
155
|
+
* Resolves an identifier that is not a declared property of `currentSchema` through the object's
|
|
156
|
+
* `additionalProperties`: its schema when one is given, `UNTYPED_ADDITIONAL_PROPERTY_SCHEMA` when
|
|
157
|
+
* it is `true`, and null when extra keys are not allowed.
|
|
158
|
+
*/
|
|
159
|
+
const additionalPropertySchema = (currentSchema, link, platformObjectJsonSchema) => {
|
|
160
|
+
if (currentSchema == null || !isIdentifierNode(link)) return null;
|
|
161
|
+
const resolved = isJsonSchemaRef(currentSchema) ? resolveJssRef(currentSchema, platformObjectJsonSchema) : currentSchema;
|
|
162
|
+
if (!isJsonSchemaObject(resolved) || resolved.properties?.[link.name] != null) return null;
|
|
163
|
+
const { additionalProperties } = resolved;
|
|
164
|
+
if (additionalProperties === true) return UNTYPED_ADDITIONAL_PROPERTY_SCHEMA;
|
|
165
|
+
return typeof additionalProperties === "object" && additionalProperties != null ? additionalProperties : null;
|
|
166
|
+
};
|
|
149
167
|
const getSchemaForFieldPath = ({ path, initialSchema, platformObjectJsonSchema = {}, primitiveUtilities = {} }) => {
|
|
150
168
|
if (!initialSchema || !("type" in initialSchema) && !("$ref" in initialSchema)) return {
|
|
151
169
|
schema: null,
|
|
@@ -167,7 +185,7 @@ const getSchemaForFieldPath = ({ path, initialSchema, platformObjectJsonSchema =
|
|
|
167
185
|
nextLink: link,
|
|
168
186
|
platformObjectJsonSchema,
|
|
169
187
|
primitiveUtilities
|
|
170
|
-
});
|
|
188
|
+
}) ?? additionalPropertySchema(currentSchema, link, platformObjectJsonSchema);
|
|
171
189
|
}, schema);
|
|
172
190
|
return {
|
|
173
191
|
schema: result,
|
|
@@ -476,6 +494,6 @@ const splitAtNearestParentObject = (chain, currentSchema, platformSchemaMap, pri
|
|
|
476
494
|
}];
|
|
477
495
|
};
|
|
478
496
|
//#endregion
|
|
479
|
-
export { extractPlatformObjectKey, formatDisplayValue, getFunctionSchemaForNode, getOptionForValue, getSchemaByPath, getSchemaForFieldPath, getSchemaForVariablePath, getSchemaOptions, hasRequiredPropertyShape, isTypeMatch, isValidOption, nextLinkSchema, splitAtNearestParentObject, validatePath };
|
|
497
|
+
export { UNTYPED_ADDITIONAL_PROPERTY_SCHEMA, extractPlatformObjectKey, formatDisplayValue, getFunctionSchemaForNode, getOptionForValue, getSchemaByPath, getSchemaForFieldPath, getSchemaForVariablePath, getSchemaOptions, hasRequiredPropertyShape, isTypeMatch, isValidOption, nextLinkSchema, splitAtNearestParentObject, validatePath };
|
|
480
498
|
|
|
481
499
|
//# sourceMappingURL=schemaOptions.mjs.map
|