@motifx-community/ui 0.1.0-beta.6 → 0.1.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +324 -0
- package/dist/components/accordion/Accordion.d.ts +3 -0
- package/dist/components/accordion/AccordionItem.d.ts +9 -7
- package/dist/components/appbar/AppBar.d.ts +9 -3
- package/dist/components/appbar/app-bar-props.d.ts +2 -2
- package/dist/components/appmenu/AppMenu.d.ts +204 -0
- package/dist/components/appmenu/app-menu-item-click-event-args.d.ts +11 -0
- package/dist/components/appmenu/app-menu-item.d.ts +46 -0
- package/dist/components/appmenu/app-menu-items-changed-event-args.d.ts +7 -0
- package/dist/components/appmenu/app-menu-props.d.ts +38 -0
- package/dist/components/appmenu/app-menu-search-text-changed-event-args.d.ts +5 -0
- package/dist/components/appmenu/app-menu-selecting-event-args.d.ts +5 -0
- package/dist/components/appmenu/app-menu-selection-changed-event-args.d.ts +13 -0
- package/dist/components/appmenu/index.d.ts +8 -0
- package/dist/components/avatar/Avatar.d.ts +2 -0
- package/dist/components/avatar/AvatarGroup.d.ts +18 -2
- package/dist/components/badge/Badge.d.ts +4 -1
- package/dist/components/barcode/Barcode.d.ts +7 -1
- package/dist/components/bargauge/BarGauge.d.ts +35 -22
- package/dist/components/bottomnavigation/BottomNavigation.d.ts +44 -12
- package/dist/components/bottomnavigation/bottom-navigation-item.d.ts +1 -1
- package/dist/components/bottomnavigation/bottom-navigation-props.d.ts +2 -2
- package/dist/components/breadcrumb/Breadcrumb.d.ts +12 -8
- package/dist/components/button/Button.d.ts +24 -3
- package/dist/components/button/button-props.d.ts +1 -0
- package/dist/components/button/menu-item-of.d.ts +4 -0
- package/dist/components/buttongroup/ButtonGroup.d.ts +2 -1
- package/dist/components/calendar/Calendar.d.ts +11 -3
- package/dist/components/calendar/calendar-props.d.ts +2 -0
- package/dist/components/card/Card.d.ts +10 -0
- package/dist/components/card/card-props.d.ts +1 -1
- package/dist/components/chart/Chart.d.ts +30 -17
- package/dist/components/chart/ChartLegend.d.ts +10 -7
- package/dist/components/chart/ChartPlot.d.ts +40 -31
- package/dist/components/chart/ChartTable.d.ts +0 -1
- package/dist/components/chart/ChartTooltip.d.ts +23 -4
- package/dist/components/chart/PartsPlot.d.ts +19 -7
- package/dist/components/chart/RadarPlot.d.ts +23 -9
- package/dist/components/chart/chart-export.d.ts +3 -3
- package/dist/components/chart/chart-look.d.ts +7 -5
- package/dist/components/chart/chart-tooltip-options.d.ts +3 -2
- package/dist/components/chart/plot-room.d.ts +9 -0
- package/dist/components/chart/plot-view.d.ts +12 -2
- package/dist/components/chart/text-parts.d.ts +12 -0
- package/dist/components/checkbox/ToggleField.d.ts +6 -4
- package/dist/components/chip/Chip.d.ts +16 -7
- package/dist/components/chip/ChipGroup.d.ts +14 -1
- package/dist/components/chip/chip-props.d.ts +1 -1
- package/dist/components/colorbox/ColorBox.d.ts +5 -3
- package/dist/components/colorpicker/ColorPicker.d.ts +3 -0
- package/dist/components/combobox/ComboBox.d.ts +8 -4
- package/dist/components/combobox/combo-box-props.d.ts +2 -2
- package/dist/components/contextmenu/ContextMenu.d.ts +26 -15
- package/dist/components/contextmenu/attach-context-menu.d.ts +3 -3
- package/dist/components/contextmenu/context-menu-opening-event-args.d.ts +8 -4
- package/dist/components/contextmenu/context-menu-props.d.ts +2 -2
- package/dist/components/contextmenu/context-menu-target.d.ts +2 -2
- package/dist/components/datagrid/DataGrid.d.ts +104 -31
- package/dist/components/datagrid/filter-editor-context.d.ts +22 -0
- package/dist/components/datagrid/grid-action.d.ts +2 -2
- package/dist/components/datagrid/grid-cell-click-event-args.d.ts +3 -3
- package/dist/components/datagrid/grid-cell-prepared-event-args.d.ts +6 -4
- package/dist/components/datagrid/grid-column.d.ts +10 -2
- package/dist/components/datagrid/grid-editor-prepared-event-args.d.ts +2 -2
- package/dist/components/datagrid/grid-lookup.d.ts +4 -4
- package/dist/components/datagrid/grid-master-detail.d.ts +1 -1
- package/dist/components/datagrid/grid-row-click-event-args.d.ts +3 -3
- package/dist/components/datagrid/grid-row-drag-event-args.d.ts +3 -2
- package/dist/components/datagrid/grid-row-dragging.d.ts +8 -8
- package/dist/components/datagrid/grid-row-prepared-event-args.d.ts +4 -2
- package/dist/components/datagrid/grid-visible-row.d.ts +3 -1
- package/dist/components/datagrid/index.d.ts +1 -0
- package/dist/components/datagrid/model/CellFormatter.d.ts +8 -1
- package/dist/components/datagrid/model/ChoiceListAdapter.d.ts +23 -0
- package/dist/components/datagrid/model/GridExport.d.ts +1 -1
- package/dist/components/datagrid/model/GridModel.d.ts +5 -0
- package/dist/components/datagrid/model/ListChoices.d.ts +28 -0
- package/dist/components/datagrid/model/row-dragging-values.d.ts +3 -2
- package/dist/components/datagrid/view/ActionWidths.d.ts +16 -4
- package/dist/components/datagrid/view/BandRows.d.ts +12 -14
- package/dist/components/datagrid/view/CellEditor.d.ts +3 -5
- package/dist/components/datagrid/view/CellTip.d.ts +20 -8
- package/dist/components/datagrid/view/ColumnMenu.d.ts +4 -2
- package/dist/components/datagrid/view/ColumnStyles.d.ts +3 -2
- package/dist/components/datagrid/view/DetailRow.d.ts +9 -4
- package/dist/components/datagrid/view/DragSelect.d.ts +19 -7
- package/dist/components/datagrid/view/EditForm.d.ts +4 -0
- package/dist/components/datagrid/view/FilterCell.d.ts +30 -7
- package/dist/components/datagrid/view/FilterPanel.d.ts +1 -1
- package/dist/components/datagrid/view/FilterRow.d.ts +10 -6
- package/dist/components/datagrid/view/GridBody.d.ts +87 -43
- package/dist/components/datagrid/view/GridPager.d.ts +8 -1
- package/dist/components/datagrid/view/GridRow.d.ts +32 -17
- package/dist/components/datagrid/view/GridToolbar.d.ts +6 -5
- package/dist/components/datagrid/view/GroupFooterRow.d.ts +7 -1
- package/dist/components/datagrid/view/GroupPanel.d.ts +26 -8
- package/dist/components/datagrid/view/GroupRow.d.ts +17 -10
- package/dist/components/datagrid/view/HeaderFilter.d.ts +2 -1
- package/dist/components/datagrid/view/HeaderRow.d.ts +18 -3
- package/dist/components/datagrid/view/MenuPopup.d.ts +3 -2
- package/dist/components/datagrid/view/RowActions.d.ts +13 -5
- package/dist/components/datagrid/view/RowDrag.d.ts +24 -10
- package/dist/components/datagrid/view/TotalRow.d.ts +4 -2
- package/dist/components/datagrid/view/action-button.d.ts +11 -5
- package/dist/components/datagrid/view/cell-tip-target.d.ts +11 -0
- package/dist/components/datagrid/view/check-mark.d.ts +4 -3
- package/dist/components/datagrid/view/column-fit.d.ts +9 -0
- package/dist/components/datagrid/view/drag-handle.d.ts +3 -2
- package/dist/components/datagrid/view/drag-select-host.d.ts +5 -5
- package/dist/components/datagrid/view/expand-button.d.ts +4 -3
- package/dist/components/datagrid/view/group-drop.d.ts +7 -0
- package/dist/components/datagrid/view/group-panel-host.d.ts +7 -4
- package/dist/components/datagrid/view/header-host.d.ts +3 -2
- package/dist/components/datagrid/view/row-drag-host.d.ts +5 -3
- package/dist/components/datagrid/view/summary-cell.d.ts +5 -3
- package/dist/components/datagrid/view/toolbar-host.d.ts +3 -2
- package/dist/components/datebox/DateBox.d.ts +5 -3
- package/dist/components/daterangebox/DateRangeBox.d.ts +12 -9
- package/dist/components/draggable/Draggable.d.ts +24 -11
- package/dist/components/draggable/draggable-props.d.ts +3 -3
- package/dist/components/drawer/Drawer.d.ts +18 -10
- package/dist/components/drawer/drawer-props.d.ts +2 -2
- package/dist/components/dropdown/DropDown.d.ts +12 -3
- package/dist/components/dropdown/drop-down-props.d.ts +3 -3
- package/dist/components/fileuploader/FileUploader.d.ts +9 -6
- package/dist/components/filterbuilder/FilterBuilder.d.ts +42 -13
- package/dist/components/form/MxForm.d.ts +33 -12
- package/dist/components/form/form-props.d.ts +1 -1
- package/dist/components/form/message-box-options.d.ts +1 -1
- package/dist/components/formlayout/FormLayout.d.ts +26 -5
- package/dist/components/gallery/Gallery.d.ts +30 -17
- package/dist/components/gauge/Gauge.d.ts +51 -37
- package/dist/components/layout/ChildSettings.d.ts +2 -2
- package/dist/components/layout/GroupBox.d.ts +7 -5
- package/dist/components/layout/Panel.d.ts +1 -0
- package/dist/components/layout/SplitContainer.d.ts +8 -8
- package/dist/components/layout/set-padding.d.ts +2 -1
- package/dist/components/layout/set-space.d.ts +2 -1
- package/dist/components/listbox/ListBox.d.ts +7 -5
- package/dist/components/listbox/item-template.d.ts +7 -2
- package/dist/components/listbox/list-rows.d.ts +2 -0
- package/dist/components/loadpanel/LoadPanel.d.ts +7 -3
- package/dist/components/loadpanel/load-panel-props.d.ts +1 -1
- package/dist/components/loadpanel/load-panel-target.d.ts +2 -2
- package/dist/components/lookup/Lookup.d.ts +1 -1
- package/dist/components/menubar/MenuBar.d.ts +115 -5
- package/dist/components/menubar/index.d.ts +7 -0
- package/dist/components/menubar/menu-bar-added-item.d.ts +11 -0
- package/dist/components/menubar/menu-bar-custom-menu-opening-event-args.d.ts +19 -0
- package/dist/components/menubar/menu-bar-customization.d.ts +18 -0
- package/dist/components/menubar/menu-bar-customized-event-args.d.ts +7 -0
- package/dist/components/menubar/menu-bar-items-changed-event-args.d.ts +7 -0
- package/dist/components/menubar/menu-bar-merge-when.d.ts +5 -0
- package/dist/components/menubar/menu-bar-merged-event-args.d.ts +7 -0
- package/dist/components/menubar/menu-bar-props.d.ts +43 -1
- package/dist/components/menubar/menu-merge.d.ts +10 -0
- package/dist/components/menubar/menu-node.d.ts +4 -0
- package/dist/components/menubar/merge-hosts.d.ts +9 -0
- package/dist/components/menubar/merged-item.d.ts +18 -0
- package/dist/components/numberbox/NumberBox.d.ts +13 -4
- package/dist/components/numberbox/number-box-props.d.ts +1 -1
- package/dist/components/otpinput/OtpInput.d.ts +19 -8
- package/dist/components/pagination/Pagination.d.ts +9 -4
- package/dist/components/popover/Popover.d.ts +24 -7
- package/dist/components/popover/popover-props.d.ts +1 -1
- package/dist/components/progress/ProgressBar.d.ts +1 -0
- package/dist/components/progress/ProgressWave.d.ts +13 -12
- package/dist/components/progress/Spinner.d.ts +5 -5
- package/dist/components/progress/progress-bar-props.d.ts +1 -1
- package/dist/components/qrcode/QRCode.d.ts +5 -1
- package/dist/components/radiogroup/RadioGroup.d.ts +8 -6
- package/dist/components/rating/Rating.d.ts +2 -2
- package/dist/components/resizable/Resizable.d.ts +19 -17
- package/dist/components/resizable/resizable-props.d.ts +3 -3
- package/dist/components/resizable/resize-start.d.ts +11 -0
- package/dist/components/ribbonmenu/RibbonGallery.d.ts +32 -0
- package/dist/components/ribbonmenu/RibbonKeyHints.d.ts +61 -0
- package/dist/components/ribbonmenu/RibbonMenu.d.ts +419 -0
- package/dist/components/ribbonmenu/index.d.ts +22 -0
- package/dist/components/ribbonmenu/ribbon-app-button-event-args.d.ts +8 -0
- package/dist/components/ribbonmenu/ribbon-command-click-event-args.d.ts +15 -0
- package/dist/components/ribbonmenu/ribbon-command-size.d.ts +2 -0
- package/dist/components/ribbonmenu/ribbon-command-type.d.ts +7 -0
- package/dist/components/ribbonmenu/ribbon-command.d.ts +63 -0
- package/dist/components/ribbonmenu/ribbon-gallery-item.d.ts +18 -0
- package/dist/components/ribbonmenu/ribbon-group-more-event-args.d.ts +12 -0
- package/dist/components/ribbonmenu/ribbon-group.d.ts +31 -0
- package/dist/components/ribbonmenu/ribbon-menu-custom-menu-opening-event-args.d.ts +22 -0
- package/dist/components/ribbonmenu/ribbon-menu-customization.d.ts +18 -0
- package/dist/components/ribbonmenu/ribbon-menu-customized-event-args.d.ts +7 -0
- package/dist/components/ribbonmenu/ribbon-menu-display-changed-event-args.d.ts +8 -0
- package/dist/components/ribbonmenu/ribbon-menu-display.d.ts +5 -0
- package/dist/components/ribbonmenu/ribbon-menu-items-changed-event-args.d.ts +7 -0
- package/dist/components/ribbonmenu/ribbon-menu-layout-changed-event-args.d.ts +8 -0
- package/dist/components/ribbonmenu/ribbon-menu-layout.d.ts +2 -0
- package/dist/components/ribbonmenu/ribbon-menu-props.d.ts +79 -0
- package/dist/components/ribbonmenu/ribbon-quick-bar-position.d.ts +2 -0
- package/dist/components/ribbonmenu/ribbon-tab-selecting-event-args.d.ts +5 -0
- package/dist/components/ribbonmenu/ribbon-tab-selection-changed-event-args.d.ts +10 -0
- package/dist/components/ribbonmenu/ribbon-tab.d.ts +24 -0
- package/dist/components/scheduler/AppointmentEditor.d.ts +16 -7
- package/dist/components/scheduler/Scheduler.d.ts +23 -9
- package/dist/components/scheduler/view/AgendaView.d.ts +7 -2
- package/dist/components/scheduler/view/AppointmentDrag.d.ts +26 -3
- package/dist/components/scheduler/view/CellAttributes.d.ts +1 -0
- package/dist/components/scheduler/view/CellWriter.d.ts +6 -3
- package/dist/components/scheduler/view/KeyedParts.d.ts +2 -0
- package/dist/components/scheduler/view/MonthView.d.ts +18 -7
- package/dist/components/scheduler/view/SchedulerTouch.d.ts +8 -2
- package/dist/components/scheduler/view/TimeView.d.ts +23 -11
- package/dist/components/scheduler/view/TimelineLine.d.ts +19 -2
- package/dist/components/scheduler/view/TimelineView.d.ts +27 -16
- package/dist/components/scheduler/view/scheduler-host.d.ts +4 -4
- package/dist/components/scheduler/view/shown-view.d.ts +11 -0
- package/dist/components/scheduler/view/touch-host.d.ts +6 -2
- package/dist/components/scrollview/ScrollView.d.ts +27 -8
- package/dist/components/sheet/BottomSheet.d.ts +13 -6
- package/dist/components/shortcuteditor/ShortcutEditor.d.ts +82 -0
- package/dist/components/shortcuteditor/index.d.ts +3 -0
- package/dist/components/shortcuteditor/shortcut-editor-keys-changed-event-args.d.ts +9 -0
- package/dist/components/shortcuteditor/shortcut-editor-props.d.ts +21 -0
- package/dist/components/signature/Signature.d.ts +18 -13
- package/dist/components/slider/Slider.d.ts +7 -6
- package/dist/components/slider/slider-props.d.ts +1 -1
- package/dist/components/sortable/Sortable.d.ts +24 -12
- package/dist/components/sortable/sortable-props.d.ts +1 -1
- package/dist/components/sparkline/Sparkline.d.ts +17 -19
- package/dist/components/speeddial/SpeedDial.d.ts +8 -2
- package/dist/components/speeddial/speed-dial-action.d.ts +1 -1
- package/dist/components/splitter/SplitPane.d.ts +3 -0
- package/dist/components/splitter/Splitter.d.ts +11 -5
- package/dist/components/stepper/Stepper.d.ts +30 -12
- package/dist/components/tabdocs/AutoHideStrip.d.ts +10 -4
- package/dist/components/tabdocs/DockGuides.d.ts +6 -4
- package/dist/components/tabdocs/DocumentList.d.ts +19 -7
- package/dist/components/tabdocs/DocumentTab.d.ts +12 -9
- package/dist/components/tabdocs/DropMarks.d.ts +8 -3
- package/dist/components/tabdocs/MoveByKeys.d.ts +2 -1
- package/dist/components/tabdocs/PhoneBar.d.ts +2 -1
- package/dist/components/tabdocs/PhoneList.d.ts +14 -4
- package/dist/components/tabdocs/PhoneTools.d.ts +8 -1
- package/dist/components/tabdocs/SplitSash.d.ts +3 -5
- package/dist/components/tabdocs/TabBrowserWindow.d.ts +3 -2
- package/dist/components/tabdocs/TabDockArea.d.ts +5 -2
- package/dist/components/tabdocs/TabDocumentManager.d.ts +51 -25
- package/dist/components/tabdocs/TabDrag.d.ts +27 -12
- package/dist/components/tabdocs/TabGroup.d.ts +30 -16
- package/dist/components/tabdocs/TabMenus.d.ts +11 -4
- package/dist/components/tabdocs/TabPresenter.d.ts +21 -5
- package/dist/components/tabdocs/TabSplit.d.ts +10 -4
- package/dist/components/tabdocs/TabWindow.d.ts +7 -4
- package/dist/components/tabdocs/item-part.d.ts +4 -0
- package/dist/components/tabdocs/layout-item.d.ts +4 -1
- package/dist/components/tabdocs/place-node.d.ts +11 -4
- package/dist/components/tabdocs/strip-room.d.ts +13 -0
- package/dist/components/tabdocs/tab-header.d.ts +3 -0
- package/dist/components/tabs/PanelContent.d.ts +1 -1
- package/dist/components/tabs/Tab.d.ts +4 -4
- package/dist/components/tabs/Tabs.d.ts +11 -6
- package/dist/components/tagbox/TagBox.d.ts +24 -6
- package/dist/components/textarea/TextArea.d.ts +9 -5
- package/dist/components/textbox/TextBox.d.ts +13 -4
- package/dist/components/tileview/TileView.d.ts +15 -5
- package/dist/components/timeline/Timeline.d.ts +11 -0
- package/dist/components/toast/Toaster.d.ts +9 -2
- package/dist/components/toolbar/Toolbar.d.ts +18 -5
- package/dist/components/toolbar/toolbar-item.d.ts +5 -0
- package/dist/components/tooltip/Tooltip.d.ts +10 -2
- package/dist/components/tooltip/add-tooltip.d.ts +3 -3
- package/dist/components/tooltip/tooltip-hub.d.ts +5 -3
- package/dist/components/tooltip/tooltip-props.d.ts +1 -1
- package/dist/components/tooltip/tooltip-target.d.ts +2 -2
- package/dist/components/treeview/TreeView.d.ts +34 -9
- package/dist/components/treeview/tree-row-parts.d.ts +13 -0
- package/dist/components/treeview/tree-view-item-template.d.ts +7 -2
- package/dist/components/treeview/tree-view-props.d.ts +1 -1
- package/dist/components/validationsummary/ValidationSummary.d.ts +1 -1
- package/dist/core/access-key-entry.d.ts +10 -0
- package/dist/core/access-key.d.ts +24 -12
- package/dist/core/chord.d.ts +9 -0
- package/dist/core/command-fields.d.ts +17 -0
- package/dist/core/command-registry.d.ts +37 -0
- package/dist/core/command-run-event-args.d.ts +11 -0
- package/dist/core/command.d.ts +41 -0
- package/dist/core/commands-changed-event-args.d.ts +4 -0
- package/dist/core/component-tree.d.ts +10 -0
- package/dist/core/container.d.ts +8 -5
- package/dist/core/control.d.ts +44 -15
- package/dist/core/cover-record.d.ts +9 -0
- package/dist/core/cover.d.ts +11 -0
- package/dist/core/draw-parts.d.ts +12 -20
- package/dist/core/flow-home.d.ts +7 -4
- package/dist/core/focus-mark.d.ts +8 -0
- package/dist/core/focus.d.ts +109 -10
- package/dist/core/glyphs.d.ts +42 -40
- package/dist/core/icon-source.d.ts +15 -2
- package/dist/core/key-windows.d.ts +8 -0
- package/dist/core/keyboard.d.ts +25 -30
- package/dist/core/keymap-changed-event-args.d.ts +7 -0
- package/dist/core/keymap.d.ts +6 -0
- package/dist/core/language-look.d.ts +20 -7
- package/dist/core/live-controls.d.ts +12 -0
- package/dist/core/look-watch.d.ts +4 -1
- package/dist/core/measure/box.d.ts +21 -0
- package/dist/core/measure/element-of.d.ts +12 -0
- package/dist/core/measure/every-frame.d.ts +8 -0
- package/dist/core/measure/hit-cover.d.ts +8 -0
- package/dist/core/measure/hit-options.d.ts +12 -0
- package/dist/core/measure/hits.d.ts +18 -0
- package/dist/core/measure/index.d.ts +27 -0
- package/dist/core/measure/job.d.ts +9 -0
- package/dist/core/measure/layout-change.d.ts +2 -0
- package/dist/core/measure/layout-options.d.ts +11 -0
- package/dist/core/measure/lengths.d.ts +13 -0
- package/dist/core/measure/look.d.ts +11 -0
- package/dist/core/measure/loop.d.ts +10 -0
- package/dist/core/measure/media.d.ts +8 -0
- package/dist/core/measure/motion.d.ts +10 -0
- package/dist/core/measure/observers.d.ts +13 -0
- package/dist/core/measure/on-layout.d.ts +23 -0
- package/dist/core/measure/page-events.d.ts +6 -0
- package/dist/core/measure/page.d.ts +11 -0
- package/dist/core/measure/pending-scroll.d.ts +9 -0
- package/dist/core/measure/pending-scrolls.d.ts +7 -0
- package/dist/core/measure/point.d.ts +5 -0
- package/dist/core/measure/probe-set.d.ts +35 -0
- package/dist/core/measure/read.d.ts +54 -0
- package/dist/core/measure/rect.d.ts +9 -0
- package/dist/core/measure/reveal-options.d.ts +20 -0
- package/dist/core/measure/reveal-range.d.ts +7 -0
- package/dist/core/measure/round-reads.d.ts +14 -0
- package/dist/core/measure/rounds.d.ts +36 -0
- package/dist/core/measure/scroll-motion.d.ts +5 -0
- package/dist/core/measure/scroll-place.d.ts +5 -0
- package/dist/core/measure/scroll.d.ts +41 -0
- package/dist/core/measure/size-box.d.ts +2 -0
- package/dist/core/measure/size.d.ts +5 -0
- package/dist/core/measure/text-probes.d.ts +19 -0
- package/dist/core/measure/text-widths.d.ts +14 -0
- package/dist/core/measure/view.d.ts +2 -0
- package/dist/core/measure/viewport-rect.d.ts +10 -0
- package/dist/core/measure/viewport.d.ts +12 -0
- package/dist/core/measure/watch.d.ts +35 -0
- package/dist/core/measure/watcher.d.ts +41 -0
- package/dist/core/measure/window-bound.d.ts +11 -0
- package/dist/core/measure/window-frame.d.ts +25 -0
- package/dist/core/order-controls.d.ts +7 -0
- package/dist/core/page-documents.d.ts +13 -0
- package/dist/core/page-layer.d.ts +18 -0
- package/dist/core/parsed-access-key.d.ts +9 -0
- package/dist/core/part-writes.d.ts +25 -0
- package/dist/core/press-origin.d.ts +3 -0
- package/dist/core/shortcut-conflict.d.ts +12 -0
- package/dist/core/shortcut-handler.d.ts +2 -0
- package/dist/core/shortcut-info.d.ts +19 -0
- package/dist/core/shortcut-options.d.ts +33 -0
- package/dist/core/shortcut-registration.d.ts +21 -0
- package/dist/core/shortcut-registry.d.ts +46 -0
- package/dist/core/shortcut-text.d.ts +2 -0
- package/dist/core/show-icon.d.ts +7 -0
- package/dist/core/stacked-window.d.ts +9 -0
- package/dist/core/ui-locale.d.ts +2 -2
- package/dist/core/ui-strings.d.ts +128 -0
- package/dist/core/window-events.d.ts +14 -0
- package/dist/core/window-stack.d.ts +11 -11
- package/dist/generated/tokens.d.ts +1391 -11
- package/dist/index.d.ts +16 -1
- package/dist/index.js +35277 -22566
- package/dist/index.js.map +1 -1
- package/dist/locales/en.json +121 -2
- package/dist/locales/tr.json +121 -2
- package/dist/parts/chart/chart-text.d.ts +29 -5
- package/dist/parts/chart/svg-parts.d.ts +11 -7
- package/dist/parts/chart/value-motion.d.ts +3 -2
- package/dist/parts/code/code-image.d.ts +6 -9
- package/dist/parts/customizer/Customizer.d.ts +64 -0
- package/dist/parts/customizer/NameForm.d.ts +10 -0
- package/dist/parts/customizer/customizer-command.d.ts +5 -0
- package/dist/parts/customizer/customizer-names.d.ts +9 -0
- package/dist/parts/customizer/customizer-node.d.ts +15 -0
- package/dist/parts/customizer/customizer-source.d.ts +27 -0
- package/dist/parts/data/DataItems.d.ts +2 -0
- package/dist/parts/data/KeyedItems.d.ts +2 -1
- package/dist/parts/data/empty-key.d.ts +2 -0
- package/dist/parts/drag/DragGhost.d.ts +23 -16
- package/dist/parts/drag/auto-scroll-options.d.ts +19 -0
- package/dist/parts/drag/auto-scroll.d.ts +11 -0
- package/dist/parts/drag/drag-boxes.d.ts +33 -0
- package/dist/parts/drag/stack-cover.d.ts +7 -0
- package/dist/parts/field/Field.d.ts +37 -9
- package/dist/parts/field/pressed-focusable.d.ts +3 -0
- package/dist/parts/item-layout/ItemLayout.d.ts +61 -0
- package/dist/parts/item-layout/item-layout-options.d.ts +17 -0
- package/dist/parts/item-layout/layout-added-item.d.ts +13 -0
- package/dist/parts/item-layout/layout-customization.d.ts +13 -0
- package/dist/parts/item-layout/layout-node.d.ts +24 -0
- package/dist/parts/item-tree/ItemTree.d.ts +34 -0
- package/dist/parts/item-tree/children-at.d.ts +2 -0
- package/dist/parts/item-tree/item-paths.d.ts +18 -0
- package/dist/parts/item-tree/ordered.d.ts +2 -0
- package/dist/parts/list/OptionList.d.ts +73 -17
- package/dist/parts/list/item-source.d.ts +4 -0
- package/dist/parts/list/option-parts.d.ts +10 -0
- package/dist/parts/mask/InputMask.d.ts +11 -4
- package/dist/parts/menu/MenuList.d.ts +35 -11
- package/dist/parts/menu/menu-item-merge-at.d.ts +6 -0
- package/dist/parts/menu/menu-item-merge.d.ts +6 -0
- package/dist/parts/menu/menu-item.d.ts +17 -2
- package/dist/parts/overlay/OverlayPanel.d.ts +21 -12
- package/dist/parts/overlay/inert-around.d.ts +6 -3
- package/dist/parts/overlay/overlay-container.d.ts +2 -2
- package/dist/parts/overlay/overlay-panel-props.d.ts +2 -2
- package/dist/parts/popup/Popup.d.ts +17 -2
- package/dist/parts/popup/place-near.d.ts +10 -0
- package/dist/parts/popup/place-options.d.ts +10 -0
- package/dist/parts/popup/place-popup.d.ts +4 -1
- package/dist/parts/popup/placed.d.ts +7 -0
- package/dist/parts/popup/popup-anchor.d.ts +4 -0
- package/dist/parts/popup/popup-open-options.d.ts +9 -4
- package/dist/parts/slide/slide-track-host.d.ts +3 -2
- package/dist/parts/slide/slide-track.d.ts +10 -4
- package/dist/parts/validation/validate-fields.d.ts +6 -2
- package/dist/parts/validation/validation-target.d.ts +3 -1
- package/dist/parts/window/follow-pointer.d.ts +2 -1
- package/dist/parts/window/resize-frame-parts.d.ts +7 -0
- package/dist/parts/window/resize-frame.d.ts +3 -2
- package/dist/styles.css +2144 -12
- package/dist/tokens/index.d.ts +14836 -13454
- package/dist/tokens/index.js +1397 -12
- package/dist/tokens/index.js.map +1 -1
- package/dist/{tr-DhIFcH3c.js → tr-BvKE8jSF.js} +241 -3
- package/dist/tr-BvKE8jSF.js.map +1 -0
- package/docs/accordion.md +2 -2
- package/docs/actionsheet.md +4 -3
- package/docs/appbar.md +3 -3
- package/docs/appmenu-api.md +83 -0
- package/docs/appmenu-programmatic.md +76 -0
- package/docs/appmenu-search.md +66 -0
- package/docs/appmenu.md +150 -0
- package/docs/avatar.md +2 -2
- package/docs/badge.md +1 -1
- package/docs/bar-gauge-angles.md +1 -1
- package/docs/bar-gauge-data.md +1 -1
- package/docs/bar-gauge-labels.md +1 -1
- package/docs/bar-gauge.md +1 -1
- package/docs/barcode.md +1 -1
- package/docs/bottomnavigation.md +3 -3
- package/docs/bottomsheet.md +3 -3
- package/docs/breadcrumb.md +1 -1
- package/docs/button.md +4 -4
- package/docs/buttongroup.md +1 -1
- package/docs/buttons.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/card.md +2 -2
- package/docs/chart-bars.md +1 -1
- package/docs/chart-candles.md +1 -1
- package/docs/chart-funnel.md +1 -1
- package/docs/chart-heatmap.md +1 -1
- package/docs/chart-lines.md +1 -1
- package/docs/chart-live.md +1 -1
- package/docs/chart-pie.md +1 -1
- package/docs/chart-radar.md +1 -1
- package/docs/chart-ranges.md +1 -1
- package/docs/chart-references.md +1 -1
- package/docs/chart-scatter.md +1 -1
- package/docs/chart-waterfall.md +1 -1
- package/docs/chart-zoom.md +1 -1
- package/docs/chart.md +1 -1
- package/docs/checkbox.md +2 -2
- package/docs/chip.md +7 -8
- package/docs/choice.md +1 -1
- package/docs/colorbox.md +1 -1
- package/docs/combobox.md +1 -1
- package/docs/control.md +2 -2
- package/docs/data.md +1 -1
- package/docs/datagrid-api.md +7 -4
- package/docs/datagrid-bands.md +1 -1
- package/docs/datagrid-drag-select.md +1 -1
- package/docs/datagrid-drag.md +4 -4
- package/docs/datagrid-editing.md +1 -1
- package/docs/datagrid-filtering.md +106 -1
- package/docs/datagrid-forms.md +2 -2
- package/docs/datagrid-grouping.md +1 -1
- package/docs/datagrid-layout.md +7 -7
- package/docs/datagrid-lookups.md +3 -3
- package/docs/datagrid-master-detail.md +3 -3
- package/docs/datagrid-scrolling.md +1 -1
- package/docs/datagrid-selection.md +1 -1
- package/docs/datagrid.md +1 -1
- package/docs/datebox.md +2 -2
- package/docs/daterangebox.md +2 -2
- package/docs/display.md +1 -1
- package/docs/draggable.md +4 -4
- package/docs/drawer.md +2 -2
- package/docs/dropdown.md +5 -5
- package/docs/editors.md +1 -1
- package/docs/feedback.md +1 -1
- package/docs/fileuploader.md +1 -1
- package/docs/filterbuilder.md +2 -2
- package/docs/formlayout.md +1 -1
- package/docs/foundations.md +1 -1
- package/docs/gallery.md +1 -1
- package/docs/gauge-base.md +1 -1
- package/docs/gauge-circular.md +1 -1
- package/docs/gauge-dashboards.md +1 -1
- package/docs/gauge-linear.md +1 -1
- package/docs/gauge-markers.md +1 -1
- package/docs/gauge-marks.md +1 -1
- package/docs/gauge-ranges.md +1 -1
- package/docs/gauge-scales.md +1 -1
- package/docs/gauge.md +1 -1
- package/docs/home.md +1 -1
- package/docs/keyboard.md +2 -4
- package/docs/language.md +2 -2
- package/docs/layout.md +3 -3
- package/docs/listbox.md +5 -5
- package/docs/loadpanel.md +4 -4
- package/docs/lookup.md +1 -1
- package/docs/menus.md +17 -16
- package/docs/multiview.md +1 -1
- package/docs/navigation.md +1 -1
- package/docs/numberbox.md +5 -4
- package/docs/otpinput.md +1 -1
- package/docs/pagination.md +1 -1
- package/docs/popover.md +10 -9
- package/docs/progress.md +5 -5
- package/docs/qrcode.md +1 -1
- package/docs/radiogroup.md +3 -3
- package/docs/rating.md +1 -1
- package/docs/resizable.md +4 -4
- package/docs/ribbonmenu-api.md +130 -0
- package/docs/ribbonmenu-commands.md +118 -0
- package/docs/ribbonmenu-customization.md +93 -0
- package/docs/ribbonmenu-display.md +96 -0
- package/docs/ribbonmenu-layouts.md +59 -0
- package/docs/ribbonmenu-programmatic.md +91 -0
- package/docs/ribbonmenu.md +233 -0
- package/docs/scheduler-agenda.md +1 -1
- package/docs/scheduler-big-data.md +1 -1
- package/docs/scheduler-editing.md +1 -1
- package/docs/scheduler-form.md +1 -1
- package/docs/scheduler-icalendar.md +1 -1
- package/docs/scheduler-mobile.md +1 -1
- package/docs/scheduler-recurrence.md +1 -1
- package/docs/scheduler-resources.md +1 -1
- package/docs/scheduler-timeline.md +1 -1
- package/docs/scheduler.md +1 -1
- package/docs/scrollview.md +7 -6
- package/docs/showcase-home.md +1 -1
- package/docs/showcase.md +2 -2
- package/docs/signature.md +1 -1
- package/docs/skeleton.md +1 -1
- package/docs/slider.md +4 -4
- package/docs/sortable.md +2 -2
- package/docs/sparkline.md +1 -1
- package/docs/speeddial.md +2 -2
- package/docs/splitter.md +1 -1
- package/docs/stepper.md +6 -8
- package/docs/switch.md +2 -2
- package/docs/tabdocs-dock.md +2 -2
- package/docs/tabdocs-drag.md +1 -1
- package/docs/tabdocs-menus.md +1 -1
- package/docs/tabdocs-mobile.md +1 -1
- package/docs/tabdocs-tabs.md +1 -1
- package/docs/tabdocs-windows.md +1 -2
- package/docs/tabdocs-workspace.md +1 -1
- package/docs/tabdocs.md +1 -1
- package/docs/tabs.md +2 -2
- package/docs/tagbox.md +9 -10
- package/docs/textarea.md +2 -2
- package/docs/textbox.md +6 -3
- package/docs/tileview.md +1 -1
- package/docs/timeline.md +1 -1
- package/docs/toast.md +1 -1
- package/docs/tokens.md +265 -1
- package/docs/toolbar.md +1 -1
- package/docs/tooltip.md +3 -3
- package/docs/treeview.md +15 -24
- package/docs/validationsummary.md +1 -1
- package/docs/window.md +3 -3
- package/docs/wizard.md +1 -1
- package/llms-full.txt +1904 -290
- package/llms.txt +18 -1
- package/package.json +4 -4
- package/dist/components/datagrid/view/next-frame.d.ts +0 -4
- package/dist/components/datagrid/view/place-in-order.d.ts +0 -6
- package/dist/components/tabdocs/keep-scroll.d.ts +0 -6
- package/dist/core/control-map.d.ts +0 -7
- package/dist/core/document-watch.d.ts +0 -10
- package/dist/core/enable.d.ts +0 -16
- package/dist/core/fonts-loaded.d.ts +0 -2
- package/dist/core/icon-node.d.ts +0 -10
- package/dist/core/next-frame.d.ts +0 -6
- package/dist/core/resize-watch.d.ts +0 -21
- package/dist/core/scroll-watch.d.ts +0 -13
- package/dist/parts/chart/token-lengths.d.ts +0 -16
- package/dist/parts/overlay/css-length.d.ts +0 -2
- package/dist/tr-DhIFcH3c.js.map +0 -1
package/dist/core/focus.d.ts
CHANGED
|
@@ -1,39 +1,138 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
import type { Control } from './control';
|
|
3
|
+
import type { FocusMark } from './focus-mark';
|
|
1
4
|
/**
|
|
2
5
|
* The element that really has focus, descending through open shadow roots
|
|
3
6
|
* (inside a shadow tree `document.activeElement` is only the host). In the
|
|
4
7
|
* document of `near` when given; else in the page's document, or in the
|
|
5
|
-
* connected window (see `connectDocument`) focus went to last.
|
|
8
|
+
* connected window (see `connectDocument`) focus went to last. Focus layer only.
|
|
6
9
|
*/
|
|
7
10
|
export declare function deepActiveElement(near?: Node | null): HTMLElement | null;
|
|
8
|
-
/** Rendered and not hidden by CSS (`display`, `visibility`, `content-visibility`); true where the API is missing. */
|
|
11
|
+
/** Rendered and not hidden by CSS (`display`, `visibility`, `content-visibility`); true where the API is missing. Focus layer only. */
|
|
9
12
|
export declare function isShown(el: Element): boolean;
|
|
10
|
-
/** Focusable elements under `root` in document order, skipping hidden, inert and CSS-hidden ones. */
|
|
13
|
+
/** Focusable elements under `root` in document order, skipping hidden, inert and CSS-hidden ones. Focus layer only. */
|
|
11
14
|
export declare function focusableIn(root: Element): HTMLElement[];
|
|
12
15
|
/**
|
|
13
|
-
* The elements Tab visits under `root`, in document order: focusable, not
|
|
14
|
-
*
|
|
16
|
+
* The elements Tab visits under `root`, in document order: focusable, not `tabindex="-1"`, and not inside a window (a
|
|
17
|
+
* Control that is one) nested in `root`. Focus layer only.
|
|
15
18
|
*/
|
|
16
19
|
export declare function tabbableIn(root: Element): HTMLElement[];
|
|
17
20
|
/**
|
|
18
21
|
* The first tabbable element of `scope` after `anchor` in document order
|
|
19
|
-
* (before it when `forward` is false), skipping `anchor`'s own subtree.
|
|
22
|
+
* (before it when `forward` is false), skipping `anchor`'s own subtree. Focus layer only.
|
|
20
23
|
*/
|
|
21
24
|
export declare function nextTabbable(anchor: Node, scope: Element, forward?: boolean): HTMLElement | null;
|
|
22
25
|
/**
|
|
23
26
|
* Where focus goes when `anchor` can no longer hold it: the next tabbable element of `scope`, else the one
|
|
24
|
-
* before it. An iframe is the last choice, because keys pressed inside it never reach the page.
|
|
27
|
+
* before it. An iframe is the last choice, because keys pressed inside it never reach the page. Focus layer only.
|
|
25
28
|
*/
|
|
26
29
|
export declare function rescueStop(anchor: Node, scope: Element): HTMLElement | null;
|
|
27
30
|
/**
|
|
28
31
|
* Whether `el` can take focus at all (by Tab or programmatically): a
|
|
29
32
|
* focusable kind of element, or any `tabindex` including -1, and not
|
|
30
|
-
* disabled, hidden or inert.
|
|
33
|
+
* disabled, hidden or inert. Focus layer only.
|
|
31
34
|
*/
|
|
32
35
|
export declare function isFocusable(el: Element): boolean;
|
|
33
|
-
/** Keys pressed inside an iframe never reach the page, so focus on open skips it and Escape keeps working. */
|
|
36
|
+
/** Keys pressed inside an iframe never reach the page, so focus on open skips it and Escape keeps working. Focus layer only. */
|
|
34
37
|
export declare function keepsKeys(el: Element): boolean;
|
|
35
38
|
/**
|
|
36
39
|
* Moves focus to the first `[autofocus]` element under `root`, else the first
|
|
37
|
-
* focusable one that is not an iframe. Returns `false` when there is nothing to focus.
|
|
40
|
+
* focusable one that is not an iframe. Returns `false` when there is nothing to focus. Focus layer only.
|
|
38
41
|
*/
|
|
39
42
|
export declare function focusInitial(root: Element): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Where focus goes when `area` stops being usable while it holds focus: the
|
|
45
|
+
* next tabbable element after it in the same window (or page), else the one
|
|
46
|
+
* before it. `null` when focus is not inside `area` or nothing else is usable. Focus layer only.
|
|
47
|
+
*/
|
|
48
|
+
export declare function rescueTarget(area: Element): HTMLElement | null;
|
|
49
|
+
/** The element of the innermost window (a Control that is one) holding `node`, `null` when none does. Focus layer only. */
|
|
50
|
+
export declare function windowElementAround(node: Node | null): Element | null;
|
|
51
|
+
/**
|
|
52
|
+
* The element of the nearest window (a Control that is one) above `part` in the component tree, `part` itself
|
|
53
|
+
* included with `self`; `null` when there is none. Focus layer only.
|
|
54
|
+
*/
|
|
55
|
+
export declare function windowElementOf(part: ComponentBase, self?: boolean): Element | null;
|
|
56
|
+
/** The Control `part` counts as: the part itself when it is one, else the Control it stands for (`standFor`). */
|
|
57
|
+
export declare function controlFor(part: ComponentBase): Control | null;
|
|
58
|
+
/** Whether `node` is in `part`, or in a part standing for it or for a component inside it. Focus layer only. */
|
|
59
|
+
export declare function holdsNode(part: ComponentBase, node: Node): boolean;
|
|
60
|
+
/** Whether an event started in a part that stands for a component (`standFor`). Focus layer only. */
|
|
61
|
+
export declare function isFromStandIn(e: Event): boolean;
|
|
62
|
+
/** The place of `el`, to give it focus again later. Focus layer only. */
|
|
63
|
+
export declare function markOf(el: HTMLElement): FocusMark;
|
|
64
|
+
/** Sets focus on a component's element. */
|
|
65
|
+
export declare function focusOn(part: ComponentBase, options?: FocusOptions): void;
|
|
66
|
+
/** Sets focus on a text field or text area and selects all of its text, as the page's selection. */
|
|
67
|
+
export declare function focusAndSelect(part: ComponentBase): void;
|
|
68
|
+
/** Whether focus is on a component's element. */
|
|
69
|
+
export declare function isFocused(part: ComponentBase): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether focus is on a component or inside it (CSS `:focus-within`), a part standing for it (`standFor`) included:
|
|
72
|
+
* focus in the component's document, or with `event` in the document the event came from (a key goes where focus is).
|
|
73
|
+
*/
|
|
74
|
+
export declare function holdsFocus(part: ComponentBase, event?: Event): boolean;
|
|
75
|
+
/** Whether a component can take focus now: a focusable kind of element or one with a tabindex, not disabled, hidden or inert, and shown. */
|
|
76
|
+
export declare function canTakeFocus(part: ComponentBase): boolean;
|
|
77
|
+
/** Whether anything inside a component can take focus now. */
|
|
78
|
+
export declare function hasFocusableIn(part: ComponentBase): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Moves focus to the first element of a kind inside a component: `'any'` (the default) an `[autofocus]` one, else
|
|
81
|
+
* the first that takes focus and keeps the keys (not a frame); `'autofocus'` only an `[autofocus]` one; `'field'` the
|
|
82
|
+
* first field (a box, a list, a check box, a slider…); `'text'` the first field to type in or pick from; `'stop'` the
|
|
83
|
+
* first Tab stop that keeps the keys. Returns whether focus is there now.
|
|
84
|
+
*/
|
|
85
|
+
export declare function focusFirstIn(part: ComponentBase, kind?: 'any' | 'autofocus' | 'field' | 'text' | 'stop', options?: FocusOptions): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Moves focus among the Tab stops inside a component: to the first or the last, or to the next or the previous one
|
|
88
|
+
* from where focus is. Returns `false` when there is none there (an edge, or no stop at all).
|
|
89
|
+
*/
|
|
90
|
+
export declare function focusStopIn(part: ComponentBase, which: 'first' | 'last' | 'next' | 'previous', options?: FocusOptions): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Moves focus off a component: to the next Tab stop after it in its window (or the page), else to the one before it,
|
|
93
|
+
* never to one inside it. A frame is the last choice: keys pressed inside it never reach the page. Returns whether
|
|
94
|
+
* focus moved there.
|
|
95
|
+
*/
|
|
96
|
+
export declare function focusAway(part: ComponentBase, options?: FocusOptions): boolean;
|
|
97
|
+
/** Moves focus to the first Tab stop past a component in its window (or the page), before it when `forward` is false. */
|
|
98
|
+
export declare function focusPast(part: ComponentBase, forward?: boolean, options?: FocusOptions): boolean;
|
|
99
|
+
/** Takes focus off whatever has it inside a component; focus goes to the page. */
|
|
100
|
+
export declare function releaseFocus(part: ComponentBase): void;
|
|
101
|
+
/**
|
|
102
|
+
* Moves focus out of `area` when it holds it and is about to stop being usable: to the next tabbable element
|
|
103
|
+
* of its window (or page), else the one before. The page is not scrolled: the user did not move there.
|
|
104
|
+
*/
|
|
105
|
+
export declare function rescueFocus(area: ComponentBase): void;
|
|
106
|
+
/** Remembers where focus is now (with `event`, in the document the event came from), to give it back later; `null` when nothing has it. */
|
|
107
|
+
export declare function rememberFocus(event?: Event): FocusMark | null;
|
|
108
|
+
/** Whether focus is in a field that takes typing: a text box, a text area, a list box, an editable region. */
|
|
109
|
+
export declare function focusInTextField(event?: Event): boolean;
|
|
110
|
+
/** Whether focus is in a field that keeps the arrow keys and Home and End for itself: a text field, or a slider. */
|
|
111
|
+
export declare function focusInArrowField(event?: Event): boolean;
|
|
112
|
+
/** Whether focus is going into the part (or a part standing for it): the related target of a focus event. */
|
|
113
|
+
export declare function focusGoesInto(part: ComponentBase, e: FocusEvent): boolean;
|
|
114
|
+
/** Whether the focus is shown as keyboard focus (the browser's focus-visible rule), in the document the event came from. */
|
|
115
|
+
export declare function focusIsVisible(event?: Event): boolean;
|
|
116
|
+
/** Whether focus is in a field on one line, where Enter does not start a new line. */
|
|
117
|
+
export declare function focusInLineField(event?: Event): boolean;
|
|
118
|
+
/** The window (a Control that is one) focus is in, the innermost; `null` when focus is in none. */
|
|
119
|
+
export declare function focusedWindow(event?: Event): Control | null;
|
|
120
|
+
/** The browser window focus is in: the page's own, or the one it opened (`connectDocument`) focus went to last. */
|
|
121
|
+
export declare function windowWithFocus(): Window | null;
|
|
122
|
+
/**
|
|
123
|
+
* Whether the browser window `part` is in (`windowOf`) has focus: the one the user works in. True where the page
|
|
124
|
+
* cannot tell (no `hasFocus`), so a check never stops what it guards; false without a window.
|
|
125
|
+
*/
|
|
126
|
+
export declare function windowHasFocus(part: ComponentBase): boolean;
|
|
127
|
+
/** Brings the browser window `part` is in to the front, unless it has focus already. */
|
|
128
|
+
export declare function bringWindowUp(part: ComponentBase): void;
|
|
129
|
+
/** The browser window an event came from: the page's own, or one the page opened. */
|
|
130
|
+
export declare function windowOfEvent(e: Event): Window | null;
|
|
131
|
+
/** Whether a component is rendered: in the page, and not hidden by CSS (`display`, `visibility`, `content-visibility`). */
|
|
132
|
+
export declare function isRendered(part: ComponentBase): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Makes focus in `part` count as focus in `owner`, for a part of a component that stands elsewhere: a tab's header in
|
|
135
|
+
* its strip, a page of a component moved into a window of its own. It ends when `part` is disposed, or with the
|
|
136
|
+
* function returned.
|
|
137
|
+
*/
|
|
138
|
+
export declare function standFor(part: ComponentBase, owner: ComponentBase): () => void;
|
package/dist/core/glyphs.d.ts
CHANGED
|
@@ -1,67 +1,69 @@
|
|
|
1
|
+
import { Component } from '@motifx/core';
|
|
1
2
|
/**
|
|
2
|
-
* The kit's glyphs, by name: each is a `span.mx-glyph` that CSS draws (a mask of `--mx-icon-<name>`
|
|
3
|
-
* in the text color). A design language brings its own set
|
|
4
|
-
* and nothing here changes; the names and the kit's own drawings
|
|
3
|
+
* The kit's glyphs, by name: each is a `span.mx-glyph` component that CSS draws (a mask of `--mx-icon-<name>`
|
|
4
|
+
* in the text color), not placed yet: give it as an icon, or add it to a part. A design language brings its own set
|
|
5
|
+
* as tokens (`tokens/icons/<language>.icons.json`) and nothing here changes; the names and the kit's own drawings
|
|
6
|
+
* are in `tokens/icons/kit.icons.json`. `glyphPart` (core/draw-parts) makes one as a part of a parent.
|
|
5
7
|
*/
|
|
6
|
-
export declare function glyph(name: string): HTMLSpanElement
|
|
8
|
+
export declare function glyph(name: string): Component<HTMLSpanElement>;
|
|
7
9
|
/** The arrow of a control that opens something below it. */
|
|
8
|
-
export declare const chevronDown: () => HTMLSpanElement
|
|
10
|
+
export declare const chevronDown: () => Component<HTMLSpanElement>;
|
|
9
11
|
/** The mark of a checked item. */
|
|
10
|
-
export declare const checkMark: () => HTMLSpanElement
|
|
11
|
-
export declare const chevronUp: () => HTMLSpanElement
|
|
12
|
-
export declare const dismissMark: () => HTMLSpanElement
|
|
13
|
-
export declare const eyeOpen: () => HTMLSpanElement
|
|
14
|
-
export declare const eyeClosed: () => HTMLSpanElement
|
|
15
|
-
export declare const infoMark: () => HTMLSpanElement
|
|
16
|
-
export declare const successMark: () => HTMLSpanElement
|
|
17
|
-
export declare const cautionMark: () => HTMLSpanElement
|
|
18
|
-
export declare const dangerMark: () => HTMLSpanElement
|
|
12
|
+
export declare const checkMark: () => Component<HTMLSpanElement>;
|
|
13
|
+
export declare const chevronUp: () => Component<HTMLSpanElement>;
|
|
14
|
+
export declare const dismissMark: () => Component<HTMLSpanElement>;
|
|
15
|
+
export declare const eyeOpen: () => Component<HTMLSpanElement>;
|
|
16
|
+
export declare const eyeClosed: () => Component<HTMLSpanElement>;
|
|
17
|
+
export declare const infoMark: () => Component<HTMLSpanElement>;
|
|
18
|
+
export declare const successMark: () => Component<HTMLSpanElement>;
|
|
19
|
+
export declare const cautionMark: () => Component<HTMLSpanElement>;
|
|
20
|
+
export declare const dangerMark: () => Component<HTMLSpanElement>;
|
|
19
21
|
/** The mark of a checkbox that is neither checked nor unchecked. */
|
|
20
|
-
export declare const dashMark: () => HTMLSpanElement
|
|
21
|
-
export declare const plusMark: () => HTMLSpanElement
|
|
22
|
-
export declare const calendarMark: () => HTMLSpanElement
|
|
23
|
-
export declare const clockMark: () => HTMLSpanElement
|
|
22
|
+
export declare const dashMark: () => Component<HTMLSpanElement>;
|
|
23
|
+
export declare const plusMark: () => Component<HTMLSpanElement>;
|
|
24
|
+
export declare const calendarMark: () => Component<HTMLSpanElement>;
|
|
25
|
+
export declare const clockMark: () => Component<HTMLSpanElement>;
|
|
24
26
|
/** The mark of the chosen item of a group. */
|
|
25
|
-
export declare const radioMark: () => HTMLSpanElement
|
|
27
|
+
export declare const radioMark: () => Component<HTMLSpanElement>;
|
|
26
28
|
/** Three dots: more commands. */
|
|
27
|
-
export declare const moreMark: () => HTMLSpanElement
|
|
29
|
+
export declare const moreMark: () => Component<HTMLSpanElement>;
|
|
28
30
|
/** The arrow of a branch that opens towards the end (mirrored right to left by CSS). */
|
|
29
|
-
export declare const chevronEnd: () => HTMLSpanElement
|
|
31
|
+
export declare const chevronEnd: () => Component<HTMLSpanElement>;
|
|
30
32
|
/** The arrow towards the start: back, earlier (mirrored right to left by CSS). */
|
|
31
|
-
export declare const chevronStart: () => HTMLSpanElement
|
|
33
|
+
export declare const chevronStart: () => Component<HTMLSpanElement>;
|
|
32
34
|
/** A window filling the screen. */
|
|
33
|
-
export declare const maximizeMark: () => HTMLSpanElement
|
|
35
|
+
export declare const maximizeMark: () => Component<HTMLSpanElement>;
|
|
34
36
|
/** A window back to its own size. */
|
|
35
|
-
export declare const restoreMark: () => HTMLSpanElement
|
|
37
|
+
export declare const restoreMark: () => Component<HTMLSpanElement>;
|
|
36
38
|
/** A frame cut in two side by side: split. */
|
|
37
|
-
export declare const splitMark: () => HTMLSpanElement
|
|
39
|
+
export declare const splitMark: () => Component<HTMLSpanElement>;
|
|
38
40
|
/** A window folded away. */
|
|
39
|
-
export declare const minimizeMark: () => HTMLSpanElement
|
|
41
|
+
export declare const minimizeMark: () => Component<HTMLSpanElement>;
|
|
40
42
|
/** A funnel: filter by values. */
|
|
41
|
-
export declare const filterMark: () => HTMLSpanElement
|
|
43
|
+
export declare const filterMark: () => Component<HTMLSpanElement>;
|
|
42
44
|
/** Edit. */
|
|
43
|
-
export declare const pencilMark: () => HTMLSpanElement
|
|
45
|
+
export declare const pencilMark: () => Component<HTMLSpanElement>;
|
|
44
46
|
/** Delete. */
|
|
45
|
-
export declare const trashMark: () => HTMLSpanElement
|
|
47
|
+
export declare const trashMark: () => Component<HTMLSpanElement>;
|
|
46
48
|
/** Take back. */
|
|
47
|
-
export declare const undoMark: () => HTMLSpanElement
|
|
49
|
+
export declare const undoMark: () => Component<HTMLSpanElement>;
|
|
48
50
|
/** Save to a file. */
|
|
49
|
-
export declare const downloadMark: () => HTMLSpanElement
|
|
51
|
+
export declare const downloadMark: () => Component<HTMLSpanElement>;
|
|
50
52
|
/** Keep the changes (a disk). */
|
|
51
|
-
export declare const saveMark: () => HTMLSpanElement
|
|
53
|
+
export declare const saveMark: () => Component<HTMLSpanElement>;
|
|
52
54
|
/** The list of columns. */
|
|
53
|
-
export declare const columnsMark: () => HTMLSpanElement
|
|
55
|
+
export declare const columnsMark: () => Component<HTMLSpanElement>;
|
|
54
56
|
/** Look for something. */
|
|
55
|
-
export declare const searchMark: () => HTMLSpanElement
|
|
57
|
+
export declare const searchMark: () => Component<HTMLSpanElement>;
|
|
56
58
|
/** A pushpin: a tab kept at the start. */
|
|
57
|
-
export declare const pinMark: () => HTMLSpanElement
|
|
59
|
+
export declare const pinMark: () => Component<HTMLSpanElement>;
|
|
58
60
|
/** A padlock: closed to new things. */
|
|
59
|
-
export declare const lockMark: () => HTMLSpanElement
|
|
61
|
+
export declare const lockMark: () => Component<HTMLSpanElement>;
|
|
60
62
|
/** A head and shoulders: someone with no picture or name to show. */
|
|
61
|
-
export declare const personMark: () => HTMLSpanElement
|
|
63
|
+
export declare const personMark: () => Component<HTMLSpanElement>;
|
|
62
64
|
/** Two columns of dots: something to take hold of and drag. */
|
|
63
|
-
export declare const gripMark: () => HTMLSpanElement
|
|
65
|
+
export declare const gripMark: () => Component<HTMLSpanElement>;
|
|
64
66
|
/** A dock guide: a window with the part a drop there would take marked. */
|
|
65
|
-
export declare const dockGuideMark: (side: 'center' | 'left' | 'right' | 'up' | 'down') => HTMLSpanElement
|
|
67
|
+
export declare const dockGuideMark: (side: 'center' | 'left' | 'right' | 'up' | 'down') => Component<HTMLSpanElement>;
|
|
66
68
|
/** Two columns of three dots: a row to take hold of and drag. */
|
|
67
|
-
export declare const dragDots: () => HTMLSpanElement
|
|
69
|
+
export declare const dragDots: () => Component<HTMLSpanElement>;
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
import type { ComponentBase } from '@motifx/core';
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* An icon: an image address, or a component (an `<svg>` or an icon font tag in JSX, `glyph(name)`).
|
|
4
|
+
*
|
|
5
|
+
* A component stands in one place. Where the kit shows an icon a second time (the "more" menu of a toolbar or a
|
|
6
|
+
* ribbon, the row and the grid of a gallery, the rows of a grid's actions), give a component icon as a function,
|
|
7
|
+
* `icon={() => <svg …/>}`: the kit calls it again for each copy, so every place builds its own. A component given
|
|
8
|
+
* as is stays where it was first shown, and a copy shows none.
|
|
9
|
+
*/
|
|
10
|
+
export type IconSource = string | ComponentBase;
|
|
11
|
+
/**
|
|
12
|
+
* A new copy of an icon given as `given`, a value or a function: an address as it is, the function called again for
|
|
13
|
+
* a new component. `null` for a component given as is, and for one the function hands out again (`shown`, the one
|
|
14
|
+
* already in place): it stays where it is.
|
|
15
|
+
*/
|
|
16
|
+
export declare function iconCopy(given: unknown, shown?: IconSource | null): IconSource | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
/** The window of the kit (a Control that is one) keys go to, and the modal one on top, in the browser window of a key. */
|
|
3
|
+
export interface KeyWindows {
|
|
4
|
+
/** The modal window on top, or `null`. */
|
|
5
|
+
readonly modal: ComponentBase | null;
|
|
6
|
+
/** The modal one when there is one, else the window focus is in, or `null`. Found the first time it is asked. */
|
|
7
|
+
readonly active: ComponentBase | null;
|
|
8
|
+
}
|
package/dist/core/keyboard.d.ts
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
export
|
|
18
|
-
interface Chord {
|
|
19
|
-
ctrl: boolean;
|
|
20
|
-
alt: boolean;
|
|
21
|
-
shift: boolean;
|
|
22
|
-
meta: boolean;
|
|
23
|
-
/** Lower-case `KeyboardEvent.key`, or a single lower-case character. */
|
|
24
|
-
key: string;
|
|
25
|
-
}
|
|
1
|
+
import { Emitter } from '@motifx/core';
|
|
2
|
+
import type { Chord } from './chord';
|
|
3
|
+
import type { ShortcutHandler } from './shortcut-handler';
|
|
4
|
+
import type { ShortcutOptions } from './shortcut-options';
|
|
5
|
+
import type { ShortcutRegistration } from './shortcut-registration';
|
|
6
|
+
export type { Chord } from './chord';
|
|
7
|
+
export type { ShortcutHandler } from './shortcut-handler';
|
|
8
|
+
export type { ShortcutOptions } from './shortcut-options';
|
|
9
|
+
export type { ShortcutRegistration } from './shortcut-registration';
|
|
10
|
+
/** @internal Tells `shortcuts` that one was added (the registration) or taken away (`null`). */
|
|
11
|
+
export declare const shortcutChanges: Emitter<ShortcutRegistration | null>;
|
|
12
|
+
/** @internal The shortcuts registered now, in the order they came. */
|
|
13
|
+
export declare function registered(): readonly ShortcutRegistration[];
|
|
14
|
+
/** @internal The keys the user gave, by name (`shortcuts.keymap`). */
|
|
15
|
+
export declare function givenKeys(): Readonly<Record<string, readonly string[]>>;
|
|
16
|
+
/** @internal Sets the keys the user gave: every shortcut with one of those names takes them at once. */
|
|
17
|
+
export declare function setGivenKeys(map: Readonly<Record<string, readonly string[]>>): void;
|
|
26
18
|
/**
|
|
27
19
|
* Parses `'Ctrl+S'`, `'Mod+Shift+P'`, `'F2'`, `'Alt+ArrowUp'`. Modifiers:
|
|
28
20
|
* Ctrl (Control), Alt (Option), Shift, Meta (Cmd, Win) and Mod (Cmd on
|
|
@@ -31,19 +23,23 @@ interface Chord {
|
|
|
31
23
|
export declare function parseChord(text: string): Chord;
|
|
32
24
|
/** Parses one chord or chords one after the other, split by spaces: `'Ctrl+K W'`. */
|
|
33
25
|
export declare function parseShortcut(text: string): Chord[];
|
|
26
|
+
/** Whether a text reads as keys `addShortcut` takes: one without a key does not. */
|
|
27
|
+
export declare function isKeys(text: string): boolean;
|
|
34
28
|
/**
|
|
35
29
|
* Registers a keyboard shortcut. It is application-wide by default, except while a
|
|
36
30
|
* modal form is open and for plain keys while focus is in a window. With `scope`, it
|
|
37
31
|
* is active only while focus is inside that component. Returns a function that
|
|
38
32
|
* removes it. `Control.addShortcut` does the same and removes it when the control
|
|
39
|
-
* is disposed. Two chords separated by a space are pressed in sequence (`'Ctrl+K W'`)
|
|
33
|
+
* is disposed. Two chords separated by a space are pressed in sequence (`'Ctrl+K W'`);
|
|
34
|
+
* a list gives several keys that do the same. With a `name`, the keys the user gave
|
|
35
|
+
* to that name (`shortcuts.keymap`) take the place of these.
|
|
40
36
|
*
|
|
41
37
|
* @example
|
|
42
|
-
* const remove = addShortcut('Ctrl+S', () => model.save());
|
|
38
|
+
* const remove = addShortcut('Ctrl+S', () => model.save(), { name: 'save', text: 'Save' });
|
|
43
39
|
* addShortcut('Delete', () => grid.deleteSelected(), { scope: grid });
|
|
44
|
-
* addShortcut('Ctrl+K Ctrl+W', () => docs.closeAll());
|
|
40
|
+
* addShortcut(['Ctrl+K Ctrl+W', 'Ctrl+Shift+W'], () => docs.closeAll());
|
|
45
41
|
*/
|
|
46
|
-
export declare function addShortcut(
|
|
42
|
+
export declare function addShortcut(keys: string | readonly string[], handler: ShortcutHandler, options?: ShortcutOptions): () => void;
|
|
47
43
|
/**
|
|
48
44
|
* Whether a key event is one of the chords (`'Shift+Tab'`, `'Ctrl+Alt+ArrowLeft'`), as a shortcut
|
|
49
45
|
* would match it. For keys a component reads itself while a mode of its own is on.
|
|
@@ -51,4 +47,3 @@ export declare function addShortcut(chord: string, handler: ShortcutHandler, opt
|
|
|
51
47
|
export declare function isChord(chords: readonly string[], e: KeyboardEvent): boolean;
|
|
52
48
|
/** @internal Installs the document listener (once). Access keys call it when they first appear. */
|
|
53
49
|
export declare function installKeyboard(): void;
|
|
54
|
-
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Keymap } from './keymap';
|
|
2
|
+
export interface KeymapChangedEventArgs {
|
|
3
|
+
/** The keys the user gave so far, to save. */
|
|
4
|
+
keymap: Keymap;
|
|
5
|
+
/** The name of the shortcut whose keys changed, or `null` when the whole keymap was given. */
|
|
6
|
+
name: string | null;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The keys the user gave to keyboard shortcuts, by the shortcut's name (the key of a command, or a component's own name
|
|
3
|
+
* such as `tabDocuments.closeTab`): they take the place of the shortcut's own keys, and an empty list leaves it without
|
|
4
|
+
* keys. A plain object, to save and give back.
|
|
5
|
+
*/
|
|
6
|
+
export type Keymap = Readonly<Record<string, readonly string[]>>;
|
|
@@ -1,18 +1,31 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
1
2
|
/**
|
|
2
|
-
* What the design language decides for a control that is not told: keywords read from the control's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* What the design language decides for a control that is not told: keywords read from the control's slots on its own
|
|
4
|
+
* element (`--_button-variant: ghost`), so the place a control sits in can decide them too (a toolbar's buttons, a list's
|
|
5
|
+
* search box). Read with the reads of the control's window when asked (once it is in the page, after a change of the
|
|
6
|
+
* look), every control of a window in one read phase; `changed` runs in the write when a value differs. It follows no
|
|
7
|
+
* lifecycle of its own, so a list of many controls pays for no subscription per control: a control found out of the page
|
|
8
|
+
* reads again once core places it.
|
|
6
9
|
*/
|
|
7
10
|
export declare class LanguageLook<K extends string> {
|
|
8
|
-
private readonly
|
|
11
|
+
private readonly component;
|
|
9
12
|
private readonly tokens;
|
|
10
13
|
private readonly changed;
|
|
11
14
|
private readonly values;
|
|
12
|
-
|
|
15
|
+
private waiting;
|
|
16
|
+
constructor(component: ComponentBase, tokens: Record<K, string>, changed: () => void);
|
|
13
17
|
/** The language's keyword, or null before it is read or when the token is not there. */
|
|
14
18
|
get(name: K): string | null;
|
|
19
|
+
/** Reads with the next reads of the control's window. */
|
|
15
20
|
read(): void;
|
|
16
|
-
/** Reads
|
|
21
|
+
/** Reads at once, in the write of a fit that tries a layout and measures it: counted as a read after writes. */
|
|
22
|
+
readNow(): void;
|
|
23
|
+
/** Reads several at once with one layout, after a fit wrote all it tries (each control's look would cost its own). */
|
|
24
|
+
static readNowTogether(looks: readonly LanguageLook<string>[]): void;
|
|
25
|
+
/** Reads again after every change of the look; returns what stops it. */
|
|
17
26
|
watch(): () => void;
|
|
27
|
+
private readonly take;
|
|
28
|
+
private readonly apply;
|
|
29
|
+
/** Found out of the page: reads once core places it again. */
|
|
30
|
+
private again;
|
|
18
31
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
import type { Control } from './control';
|
|
3
|
+
/** @internal Called by every Control once it is made; it leaves when it is disposed. */
|
|
4
|
+
export declare function addLiveControl(control: Control): void;
|
|
5
|
+
/** The Controls alive now, in the order they were made. */
|
|
6
|
+
export declare function liveControls(): ReadonlySet<Control>;
|
|
7
|
+
/** Whether `component` is a Control alive now. */
|
|
8
|
+
export declare function isLiveControl(component: ComponentBase | null | undefined): component is Control;
|
|
9
|
+
/** @internal Notes a Control's `tabIndex`: containers ask whether a control inside them has one other than 0. */
|
|
10
|
+
export declare function noteTabIndex(control: Control, index: number): void;
|
|
11
|
+
/** The Controls whose `tabIndex` is not 0. */
|
|
12
|
+
export declare function controlsWithTabIndex(): ReadonlySet<Control>;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Calls `changed` (once per microtask) after a design language, theme or density changes anywhere, or fonts of a
|
|
3
|
+
* document of the page finish loading. Returns the function that stops it.
|
|
4
|
+
*/
|
|
2
5
|
export declare function onLookChanged(changed: () => void): () => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Rect } from './rect';
|
|
2
|
+
/** A component's element as read at one moment: where it is, its sizes, its scroll and its direction. A copy. */
|
|
3
|
+
export interface Box extends Rect {
|
|
4
|
+
/** The border box as laid out, in whole pixels; transforms do not count. */
|
|
5
|
+
readonly offsetWidth: number;
|
|
6
|
+
readonly offsetHeight: number;
|
|
7
|
+
/** Its start and top borders (and a scroll bar on the left, right to left). */
|
|
8
|
+
readonly clientLeft: number;
|
|
9
|
+
readonly clientTop: number;
|
|
10
|
+
/** The room inside its borders, without its scroll bars. */
|
|
11
|
+
readonly clientWidth: number;
|
|
12
|
+
readonly clientHeight: number;
|
|
13
|
+
/** All of its content, what is scrolled out of view too. */
|
|
14
|
+
readonly scrollWidth: number;
|
|
15
|
+
readonly scrollHeight: number;
|
|
16
|
+
/** How far it is scrolled: from its inline start (never negative, right to left too) and from its top. */
|
|
17
|
+
readonly scrollStart: number;
|
|
18
|
+
readonly scrollTop: number;
|
|
19
|
+
/** Written right to left. */
|
|
20
|
+
readonly rtl: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
import type { View } from './view';
|
|
3
|
+
/** The element the layer reads for `component`: its own; none for a fragment, a text or a disposed component. */
|
|
4
|
+
export declare function elementOf(component: ComponentBase | null | undefined): Element | null;
|
|
5
|
+
/** Whether `component` lays its children out where it stands, with no element of its own (a list, a branch, a function component). */
|
|
6
|
+
export declare function isFragment(component: ComponentBase): boolean;
|
|
7
|
+
/** Whether `component` is a text: it has no element and no children to walk. */
|
|
8
|
+
export declare function isText(component: ComponentBase): boolean;
|
|
9
|
+
/** The window `component` is in, from the component tree; none once it is disposed. */
|
|
10
|
+
export declare function viewOf(component: ComponentBase): View | null;
|
|
11
|
+
/** Calls `gone` with each window of the page that goes away (one the page opened, closed or loading another page). */
|
|
12
|
+
export declare function whenWindowGoes(gone: (view: View) => void): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
/**
|
|
3
|
+
* `read`, then `write` with what it read, at every frame of the window `owner` is in, in the first round of the frame
|
|
4
|
+
* with every other read: a drag, a scroll near an edge, a drawing that follows the page. It waits while `owner` is out of
|
|
5
|
+
* the page and goes on in the window it comes back to. It ends when `write` returns false, when the returned function
|
|
6
|
+
* is called, or with `owner`; nothing is registered per call.
|
|
7
|
+
*/
|
|
8
|
+
export declare function everyFrame<T>(owner: ComponentBase, read: () => T, write: (value: T) => void | false): () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
/** What may lie over the candidates of a hit test in one window: the kit's surfaces there, front first, and the modal one. */
|
|
3
|
+
export interface HitCover {
|
|
4
|
+
/** Windows, popups and other surfaces that may stand over candidates, front first. */
|
|
5
|
+
readonly surfaces: readonly ComponentBase[];
|
|
6
|
+
/** The modal surface among them: nothing outside it and the surfaces in front of it can be hit, not even under its backdrop. */
|
|
7
|
+
readonly modal?: ComponentBase | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
import type { HitCover } from './hit-cover';
|
|
3
|
+
import type { Rect } from './rect';
|
|
4
|
+
/** How `componentAt` looks for the candidate under a point. */
|
|
5
|
+
export interface HitOptions {
|
|
6
|
+
/** A component of the window the point is in: candidates in other windows are passed over. */
|
|
7
|
+
space?: ComponentBase;
|
|
8
|
+
/** What may lie over the candidates: a candidate under another surface, or behind a modal one, is not hit. */
|
|
9
|
+
cover?: HitCover;
|
|
10
|
+
/** The part of a candidate or a surface on the screen when the caller keeps them (a drag); read now otherwise. */
|
|
11
|
+
rects?: (component: ComponentBase) => Rect | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
import type { HitOptions } from './hit-options';
|
|
3
|
+
import type { Point } from './point';
|
|
4
|
+
import type { Rect } from './rect';
|
|
5
|
+
/**
|
|
6
|
+
* The part of `component` on the screen: its box cut by the viewport of its window and by every component around it
|
|
7
|
+
* that clips, up to one that is fixed (the top layer, a fixed bar); null when none of it shows.
|
|
8
|
+
*/
|
|
9
|
+
export declare function visibleRectOf(component: ComponentBase): Rect | null;
|
|
10
|
+
/**
|
|
11
|
+
* The first of `candidates` whose part on the screen holds `point`. Give them front first, in the kit's own order (the
|
|
12
|
+
* window stack; inner parts first: `compareTreeOrder` reversed). With `space`, candidates in other windows are passed
|
|
13
|
+
* over. With `cover`, the front surface under the point decides: only candidates inside it can be hit, and on a modal
|
|
14
|
+
* surface's backdrop nothing can.
|
|
15
|
+
*/
|
|
16
|
+
export declare function componentAt<C extends ComponentBase>(point: Point, candidates: readonly C[], options?: HitOptions): C | null;
|
|
17
|
+
/** How far along `component` a point is: 0 at its start edge (the right one across, right to left; the top one down), 1 at its end. */
|
|
18
|
+
export declare function shareAlong(component: ComponentBase, point: Point, axis?: 'x' | 'y'): number;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type { Box } from './box';
|
|
2
|
+
export type { HitCover } from './hit-cover';
|
|
3
|
+
export type { HitOptions } from './hit-options';
|
|
4
|
+
export type { LayoutChange } from './layout-change';
|
|
5
|
+
export type { LayoutOptions } from './layout-options';
|
|
6
|
+
export type { Page } from './page';
|
|
7
|
+
export type { Point } from './point';
|
|
8
|
+
export type { Rect } from './rect';
|
|
9
|
+
export type { RevealOptions } from './reveal-options';
|
|
10
|
+
export type { RevealRange } from './reveal-range';
|
|
11
|
+
export type { ScrollMotion } from './scroll-motion';
|
|
12
|
+
export type { ScrollPlace } from './scroll-place';
|
|
13
|
+
export type { Size } from './size';
|
|
14
|
+
export type { SizeBox } from './size-box';
|
|
15
|
+
export type { Viewport } from './viewport-rect';
|
|
16
|
+
export { everyFrame } from './every-frame';
|
|
17
|
+
export { componentAt, shareAlong, visibleRectOf } from './hits';
|
|
18
|
+
export { lengthOf, probeLengths } from './lengths';
|
|
19
|
+
export { onLookChange } from './look';
|
|
20
|
+
export { mediaOf, onMedia } from './media';
|
|
21
|
+
export { afterStyle, hasMotion, transitionTime } from './motion';
|
|
22
|
+
export { onLayout } from './on-layout';
|
|
23
|
+
export { boxOf, canMeasure, holderOf, isInPage, isRendered, isRtl, pageBackgroundOf, pageOf, rectOf, sameWindow, styleOf } from './read';
|
|
24
|
+
export { isMeasurePending, measure, measureNow, readAgain, whenMeasured } from './rounds';
|
|
25
|
+
export { keepScroll, reveal, scrollBy, scrollerOf, scrollerUnder, scrollIntoView, scrollTo } from './scroll';
|
|
26
|
+
export { textSizes, textWidths } from './text-widths';
|
|
27
|
+
export { viewportOf } from './viewport';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
/** A read and the write that uses what it read, for a round of the owner's window. */
|
|
3
|
+
export interface Job {
|
|
4
|
+
readonly owner: ComponentBase;
|
|
5
|
+
readonly read: () => unknown;
|
|
6
|
+
readonly write: (value: unknown) => void;
|
|
7
|
+
/** Taken back, or its loop stopped. */
|
|
8
|
+
cancelled: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
import type { SizeBox } from './size-box';
|
|
3
|
+
/** How `onLayout` watches. */
|
|
4
|
+
export interface LayoutOptions {
|
|
5
|
+
/** The component the watch belongs to when it is not the one watched (a parent's size): it ends with either. */
|
|
6
|
+
owner?: ComponentBase;
|
|
7
|
+
/** For `size`: the box reported; the border box by default. */
|
|
8
|
+
box?: SizeBox;
|
|
9
|
+
/** For `scroll`: scrolls that start inside this component are not told (a popup's own list). */
|
|
10
|
+
except?: ComponentBase;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentBase } from '@motifx/core';
|
|
2
|
+
/**
|
|
3
|
+
* Makes the probes of the lengths `owner` reads, while it is built, so the first read gives the real length. The probes
|
|
4
|
+
* are parts of `owner`, kept until it goes: pick an owner whose children are its own parts.
|
|
5
|
+
*/
|
|
6
|
+
export declare function probeLengths(owner: ComponentBase, lengths: readonly string[], axis?: 'inline' | 'block'): void;
|
|
7
|
+
/**
|
|
8
|
+
* A CSS length in pixels as it comes out in `owner`: a token or any length (`calc(...)`, `50vh`, a share of its room),
|
|
9
|
+
* 0 included. Read from its probe once per look (a change of language, theme or density reads it again) and again when
|
|
10
|
+
* the probe's size observer sees it change, which `owner`'s look watches hear. `fallback` where nothing is laid out. A
|
|
11
|
+
* length not made with `probeLengths` answers `fallback` the first time, and its probe is made with the next write.
|
|
12
|
+
*/
|
|
13
|
+
export declare function lengthOf(owner: ComponentBase, length: string, fallback?: number, axis?: 'inline' | 'block'): number;
|