@smwb/ui-solid 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +564 -0
- package/dist/assets/styles/less/components/appBar/appBar.entry.css +1 -1
- package/dist/assets/styles/less/components/button/button.entry.css +1 -1
- package/dist/assets/styles/less/components/checkbox/checkbox.entry.css +1 -1
- package/dist/assets/styles/less/components/chip/chip.entry.css +1 -1
- package/dist/assets/styles/less/components/commandPalette/commandPalette.entry.css +1 -0
- package/dist/assets/styles/less/components/composer/composer.entry.css +1 -0
- package/dist/assets/styles/less/components/diffStat/diffStat.entry.css +1 -0
- package/dist/assets/styles/less/components/kbd/kbd.entry.css +1 -0
- package/dist/assets/styles/less/components/list/list.entry.css +1 -1
- package/dist/assets/styles/less/components/qrCode/qrCode.entry.css +1 -0
- package/dist/assets/styles/less/components/radioButton/radioButton.entry.css +1 -1
- package/dist/assets/styles/less/components/selectField/selectField.entry.css +1 -1
- package/dist/assets/styles/less/components/sidebar/sidebar.entry.css +1 -1
- package/dist/assets/styles/less/components/statusDot/statusDot.entry.css +1 -0
- package/dist/assets/styles/less/components/swimlanes/swimlanes.entry.css +1 -0
- package/dist/assets/styles/less/components/tabGroups/tabGroups.entry.css +1 -0
- package/dist/assets/styles/less/components/tabs/tab/tab.entry.css +1 -1
- package/dist/assets/styles/less/components/tabs/tabPanel/tabPanel.entry.css +1 -0
- package/dist/assets/styles/less/components/tabs/tabs.entry.css +1 -1
- package/dist/assets/styles/less/components/textField/textField.entry.css +1 -1
- package/dist/assets/styles/less/components/toggle/toggle.entry.css +1 -1
- package/dist/assets/styles/less/components/treeView/treeView.entry.css +1 -1
- package/dist/assets/styles/less/tokens.entry.css +1 -1
- package/dist/components/dataDisplay/chat/chat.d.ts +42 -0
- package/dist/components/dataDisplay/chat/chat.js +116 -57
- package/dist/components/dataDisplay/chat/chat.js.map +1 -1
- package/dist/components/dataDisplay/chat/chatComposer.d.ts +17 -0
- package/dist/components/dataDisplay/chat/chatComposer.js +21 -19
- package/dist/components/dataDisplay/chat/chatComposer.js.map +1 -1
- package/dist/components/dataDisplay/chat/index.d.ts +1 -1
- package/dist/components/dataDisplay/chat/utils.d.ts +14 -0
- package/dist/components/dataDisplay/chat/utils.js.map +1 -1
- package/dist/components/dataDisplay/dagView/dagView.js +238 -223
- package/dist/components/dataDisplay/dagView/dagView.js.map +1 -1
- package/dist/components/dataDisplay/diffStat/diffStat.d.ts +55 -0
- package/dist/components/dataDisplay/diffStat/diffStat.js +70 -0
- package/dist/components/dataDisplay/diffStat/diffStat.js.map +1 -0
- package/dist/components/dataDisplay/diffStat/index.d.ts +2 -0
- package/dist/components/dataDisplay/kbd/index.d.ts +4 -0
- package/dist/components/dataDisplay/kbd/kbd.d.ts +41 -0
- package/dist/components/dataDisplay/kbd/kbd.js +47 -0
- package/dist/components/dataDisplay/kbd/kbd.js.map +1 -0
- package/dist/components/dataDisplay/kbd/kbdKeys.d.ts +18 -0
- package/dist/components/dataDisplay/kbd/kbdKeys.js +70 -0
- package/dist/components/dataDisplay/kbd/kbdKeys.js.map +1 -0
- package/dist/components/dataDisplay/list/listItem.d.ts +34 -0
- package/dist/components/dataDisplay/list/listItem.js +57 -20
- package/dist/components/dataDisplay/list/listItem.js.map +1 -1
- package/dist/components/dataDisplay/qrCode/index.d.ts +2 -0
- package/dist/components/dataDisplay/qrCode/qrCode.d.ts +30 -0
- package/dist/components/dataDisplay/qrCode/qrCode.js +88 -0
- package/dist/components/dataDisplay/qrCode/qrCode.js.map +1 -0
- package/dist/components/dataDisplay/qrCode/qrCodePath.d.ts +7 -0
- package/dist/components/dataDisplay/qrCode/qrCodePath.js +20 -0
- package/dist/components/dataDisplay/qrCode/qrCodePath.js.map +1 -0
- package/dist/components/dataDisplay/statusDot/index.d.ts +2 -0
- package/dist/components/dataDisplay/statusDot/statusDot.d.ts +35 -0
- package/dist/components/dataDisplay/statusDot/statusDot.js +31 -0
- package/dist/components/dataDisplay/statusDot/statusDot.js.map +1 -0
- package/dist/components/dataDisplay/swimlanes/index.d.ts +2 -0
- package/dist/components/dataDisplay/swimlanes/swimlanes.d.ts +75 -0
- package/dist/components/dataDisplay/swimlanes/swimlanes.js +361 -0
- package/dist/components/dataDisplay/swimlanes/swimlanes.js.map +1 -0
- package/dist/components/dataDisplay/treeView/treeView.d.ts +20 -0
- package/dist/components/dataDisplay/treeView/treeView.js +161 -95
- package/dist/components/dataDisplay/treeView/treeView.js.map +1 -1
- package/dist/components/feedBack/modal/modal.d.ts +9 -0
- package/dist/components/feedBack/modal/modal.js +68 -54
- package/dist/components/feedBack/modal/modal.js.map +1 -1
- package/dist/components/inputs/button/button.d.ts +12 -0
- package/dist/components/inputs/button/button.js +44 -37
- package/dist/components/inputs/button/button.js.map +1 -1
- package/dist/components/inputs/composer/composer.d.ts +148 -0
- package/dist/components/inputs/composer/composer.js +276 -0
- package/dist/components/inputs/composer/composer.js.map +1 -0
- package/dist/components/inputs/composer/composerFiles.d.ts +26 -0
- package/dist/components/inputs/composer/composerFiles.js +18 -0
- package/dist/components/inputs/composer/composerFiles.js.map +1 -0
- package/dist/components/inputs/composer/composerKeys.d.ts +29 -0
- package/dist/components/inputs/composer/composerKeys.js +7 -0
- package/dist/components/inputs/composer/composerKeys.js.map +1 -0
- package/dist/components/inputs/composer/index.d.ts +3 -0
- package/dist/components/layout/sheet/sheet.d.ts +12 -0
- package/dist/components/layout/sheet/sheet.js +100 -86
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/tabGroups/index.d.ts +4 -0
- package/dist/components/layout/tabGroups/tabGroups.d.ts +102 -0
- package/dist/components/layout/tabGroups/tabGroups.js +895 -0
- package/dist/components/layout/tabGroups/tabGroups.js.map +1 -0
- package/dist/components/layout/tabGroups/tabGroupsFocus.d.ts +55 -0
- package/dist/components/layout/tabGroups/tabGroupsFocus.js +192 -0
- package/dist/components/layout/tabGroups/tabGroupsFocus.js.map +1 -0
- package/dist/components/layout/tabGroups/tabGroupsLayout.d.ts +250 -0
- package/dist/components/layout/tabGroups/tabGroupsLayout.js +480 -0
- package/dist/components/layout/tabGroups/tabGroupsLayout.js.map +1 -0
- package/dist/components/navigation/appBar/appBar.d.ts +22 -0
- package/dist/components/navigation/appBar/appBar.js +60 -22
- package/dist/components/navigation/appBar/appBar.js.map +1 -1
- package/dist/components/navigation/commandPalette/commandPalette.d.ts +126 -0
- package/dist/components/navigation/commandPalette/commandPalette.js +457 -0
- package/dist/components/navigation/commandPalette/commandPalette.js.map +1 -0
- package/dist/components/navigation/commandPalette/commandPaletteFilter.d.ts +11 -0
- package/dist/components/navigation/commandPalette/commandPaletteFilter.js +15 -0
- package/dist/components/navigation/commandPalette/commandPaletteFilter.js.map +1 -0
- package/dist/components/navigation/commandPalette/commandPaletteNavigation.d.ts +13 -0
- package/dist/components/navigation/commandPalette/commandPaletteNavigation.js +38 -0
- package/dist/components/navigation/commandPalette/commandPaletteNavigation.js.map +1 -0
- package/dist/components/navigation/commandPalette/commandPaletteTypes.d.ts +39 -0
- package/dist/components/navigation/commandPalette/index.d.ts +6 -0
- package/dist/components/navigation/sidebar/sidebar.d.ts +10 -0
- package/dist/components/navigation/sidebar/sidebar.js +12 -10
- package/dist/components/navigation/sidebar/sidebar.js.map +1 -1
- package/dist/components/navigation/tabs/index.d.ts +3 -1
- package/dist/components/navigation/tabs/tab/tab.d.ts +89 -2
- package/dist/components/navigation/tabs/tab/tab.js +164 -44
- package/dist/components/navigation/tabs/tab/tab.js.map +1 -1
- package/dist/components/navigation/tabs/tabPanel/tabPanel.d.ts +20 -0
- package/dist/components/navigation/tabs/tabPanel/tabPanel.js +34 -0
- package/dist/components/navigation/tabs/tabPanel/tabPanel.js.map +1 -0
- package/dist/components/navigation/tabs/tabs.d.ts +73 -3
- package/dist/components/navigation/tabs/tabs.js +387 -160
- package/dist/components/navigation/tabs/tabs.js.map +1 -1
- package/dist/components/navigation/tabs/tabs.utils.d.ts +20 -0
- package/dist/components/navigation/tabs/tabs.utils.js +11 -0
- package/dist/components/navigation/tabs/tabs.utils.js.map +1 -0
- package/dist/components/navigation/tabs/tabsContext.d.ts +31 -1
- package/dist/components/navigation/tabs/tabsContext.js.map +1 -1
- package/dist/headless/components/dataDisplay/chat/chat.js +116 -57
- package/dist/headless/components/dataDisplay/chat/chat.js.map +1 -1
- package/dist/headless/components/dataDisplay/chat/chatComposer.js +21 -19
- package/dist/headless/components/dataDisplay/chat/chatComposer.js.map +1 -1
- package/dist/headless/components/dataDisplay/chat/utils.js.map +1 -1
- package/dist/headless/components/dataDisplay/dagView/dagView.js +238 -223
- package/dist/headless/components/dataDisplay/dagView/dagView.js.map +1 -1
- package/dist/headless/components/dataDisplay/diffStat/diffStat.js +68 -0
- package/dist/headless/components/dataDisplay/diffStat/diffStat.js.map +1 -0
- package/dist/headless/components/dataDisplay/kbd/kbd.js +45 -0
- package/dist/headless/components/dataDisplay/kbd/kbd.js.map +1 -0
- package/dist/headless/components/dataDisplay/kbd/kbdKeys.js +70 -0
- package/dist/headless/components/dataDisplay/kbd/kbdKeys.js.map +1 -0
- package/dist/headless/components/dataDisplay/list/listItem.js +57 -20
- package/dist/headless/components/dataDisplay/list/listItem.js.map +1 -1
- package/dist/headless/components/dataDisplay/qrCode/qrCode.js +86 -0
- package/dist/headless/components/dataDisplay/qrCode/qrCode.js.map +1 -0
- package/dist/headless/components/dataDisplay/qrCode/qrCodePath.js +20 -0
- package/dist/headless/components/dataDisplay/qrCode/qrCodePath.js.map +1 -0
- package/dist/headless/components/dataDisplay/statusDot/statusDot.js +29 -0
- package/dist/headless/components/dataDisplay/statusDot/statusDot.js.map +1 -0
- package/dist/headless/components/dataDisplay/swimlanes/swimlanes.js +359 -0
- package/dist/headless/components/dataDisplay/swimlanes/swimlanes.js.map +1 -0
- package/dist/headless/components/dataDisplay/treeView/treeView.js +161 -95
- package/dist/headless/components/dataDisplay/treeView/treeView.js.map +1 -1
- package/dist/headless/components/feedBack/modal/modal.js +68 -54
- package/dist/headless/components/feedBack/modal/modal.js.map +1 -1
- package/dist/headless/components/inputs/button/button.js +42 -35
- package/dist/headless/components/inputs/button/button.js.map +1 -1
- package/dist/headless/components/inputs/composer/composer.js +274 -0
- package/dist/headless/components/inputs/composer/composer.js.map +1 -0
- package/dist/headless/components/inputs/composer/composerFiles.js +18 -0
- package/dist/headless/components/inputs/composer/composerFiles.js.map +1 -0
- package/dist/headless/components/inputs/composer/composerKeys.js +7 -0
- package/dist/headless/components/inputs/composer/composerKeys.js.map +1 -0
- package/dist/headless/components/layout/sheet/sheet.js +100 -86
- package/dist/headless/components/layout/sheet/sheet.js.map +1 -1
- package/dist/headless/components/layout/tabGroups/tabGroups.js +893 -0
- package/dist/headless/components/layout/tabGroups/tabGroups.js.map +1 -0
- package/dist/headless/components/layout/tabGroups/tabGroupsFocus.js +192 -0
- package/dist/headless/components/layout/tabGroups/tabGroupsFocus.js.map +1 -0
- package/dist/headless/components/layout/tabGroups/tabGroupsLayout.js +480 -0
- package/dist/headless/components/layout/tabGroups/tabGroupsLayout.js.map +1 -0
- package/dist/headless/components/navigation/appBar/appBar.js +64 -26
- package/dist/headless/components/navigation/appBar/appBar.js.map +1 -1
- package/dist/headless/components/navigation/commandPalette/commandPalette.js +455 -0
- package/dist/headless/components/navigation/commandPalette/commandPalette.js.map +1 -0
- package/dist/headless/components/navigation/commandPalette/commandPaletteFilter.js +15 -0
- package/dist/headless/components/navigation/commandPalette/commandPaletteFilter.js.map +1 -0
- package/dist/headless/components/navigation/commandPalette/commandPaletteNavigation.js +38 -0
- package/dist/headless/components/navigation/commandPalette/commandPaletteNavigation.js.map +1 -0
- package/dist/headless/components/navigation/sidebar/sidebar.js +28 -26
- package/dist/headless/components/navigation/sidebar/sidebar.js.map +1 -1
- package/dist/headless/components/navigation/tabs/tab/tab.js +164 -44
- package/dist/headless/components/navigation/tabs/tab/tab.js.map +1 -1
- package/dist/headless/components/navigation/tabs/tabPanel/tabPanel.js +32 -0
- package/dist/headless/components/navigation/tabs/tabPanel/tabPanel.js.map +1 -0
- package/dist/headless/components/navigation/tabs/tabs.js +387 -160
- package/dist/headless/components/navigation/tabs/tabs.js.map +1 -1
- package/dist/headless/components/navigation/tabs/tabs.utils.js +11 -0
- package/dist/headless/components/navigation/tabs/tabs.utils.js.map +1 -0
- package/dist/headless/components/navigation/tabs/tabsContext.js.map +1 -1
- package/dist/headless/index.js +405 -367
- package/dist/headless/index.js.map +1 -1
- package/dist/headless/primitives/createFocusTrap.js +17 -17
- package/dist/headless/primitives/createFocusTrap.js.map +1 -1
- package/dist/headless/primitives/createKeyboardShortcut.js +16 -0
- package/dist/headless/primitives/createKeyboardShortcut.js.map +1 -0
- package/dist/headless/primitives/restoreFocus.js +10 -0
- package/dist/headless/primitives/restoreFocus.js.map +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chat.jsx +38 -4
- package/dist/headless/source/components/dataDisplay/chat/chat.jsx.map +1 -1
- package/dist/headless/source/components/dataDisplay/chat/chatComposer.jsx +1 -0
- package/dist/headless/source/components/dataDisplay/chat/chatComposer.jsx.map +1 -1
- package/dist/headless/source/components/dataDisplay/chat/index.js.map +1 -1
- package/dist/headless/source/components/dataDisplay/chat/utils.js.map +2 -2
- package/dist/headless/source/components/dataDisplay/dagView/dagView.jsx +30 -21
- package/dist/headless/source/components/dataDisplay/dagView/dagView.jsx.map +1 -1
- package/dist/headless/source/components/dataDisplay/diffStat/diffStat.jsx +76 -0
- package/dist/headless/source/components/dataDisplay/diffStat/diffStat.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/diffStat/index.js +19 -0
- package/dist/headless/source/components/dataDisplay/diffStat/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/kbd/index.js +9 -0
- package/dist/headless/source/components/dataDisplay/kbd/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/kbd/kbd.jsx +48 -0
- package/dist/headless/source/components/dataDisplay/kbd/kbd.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/kbd/kbdKeys.js +79 -0
- package/dist/headless/source/components/dataDisplay/kbd/kbdKeys.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/list/listItem.jsx +37 -7
- package/dist/headless/source/components/dataDisplay/list/listItem.jsx.map +1 -1
- package/dist/headless/source/components/dataDisplay/qrCode/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/qrCode/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/qrCode/qrCode.jsx +94 -0
- package/dist/headless/source/components/dataDisplay/qrCode/qrCode.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/qrCode/qrCodePath.js +24 -0
- package/dist/headless/source/components/dataDisplay/qrCode/qrCodePath.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/statusDot/index.js +6 -0
- package/dist/headless/source/components/dataDisplay/statusDot/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/statusDot/statusDot.jsx +28 -0
- package/dist/headless/source/components/dataDisplay/statusDot/statusDot.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/swimlanes/index.js +15 -0
- package/dist/headless/source/components/dataDisplay/swimlanes/index.js.map +7 -0
- package/dist/headless/source/components/dataDisplay/swimlanes/swimlanes.jsx +450 -0
- package/dist/headless/source/components/dataDisplay/swimlanes/swimlanes.jsx.map +1 -0
- package/dist/headless/source/components/dataDisplay/treeView/treeView.jsx +118 -37
- package/dist/headless/source/components/dataDisplay/treeView/treeView.jsx.map +1 -1
- package/dist/headless/source/components/feedBack/modal/modal.jsx +34 -4
- package/dist/headless/source/components/feedBack/modal/modal.jsx.map +1 -1
- package/dist/headless/source/components/inputs/button/button.jsx +6 -2
- package/dist/headless/source/components/inputs/button/button.jsx.map +1 -1
- package/dist/headless/source/components/inputs/composer/composer.jsx +319 -0
- package/dist/headless/source/components/inputs/composer/composer.jsx.map +1 -0
- package/dist/headless/source/components/inputs/composer/composerFiles.js +27 -0
- package/dist/headless/source/components/inputs/composer/composerFiles.js.map +7 -0
- package/dist/headless/source/components/inputs/composer/composerKeys.js +11 -0
- package/dist/headless/source/components/inputs/composer/composerKeys.js.map +7 -0
- package/dist/headless/source/components/inputs/composer/index.js +5 -0
- package/dist/headless/source/components/inputs/composer/index.js.map +7 -0
- package/dist/headless/source/components/layout/sheet/sheet.jsx +33 -11
- package/dist/headless/source/components/layout/sheet/sheet.jsx.map +1 -1
- package/dist/headless/source/components/layout/tabGroups/index.js +8 -0
- package/dist/headless/source/components/layout/tabGroups/index.js.map +7 -0
- package/dist/headless/source/components/layout/tabGroups/tabGroups.jsx +1117 -0
- package/dist/headless/source/components/layout/tabGroups/tabGroups.jsx.map +1 -0
- package/dist/headless/source/components/layout/tabGroups/tabGroupsFocus.js +222 -0
- package/dist/headless/source/components/layout/tabGroups/tabGroupsFocus.js.map +7 -0
- package/dist/headless/source/components/layout/tabGroups/tabGroupsLayout.js +629 -0
- package/dist/headless/source/components/layout/tabGroups/tabGroupsLayout.js.map +7 -0
- package/dist/headless/source/components/navigation/appBar/appBar.jsx +27 -3
- package/dist/headless/source/components/navigation/appBar/appBar.jsx.map +1 -1
- package/dist/headless/source/components/navigation/commandPalette/commandPalette.jsx +506 -0
- package/dist/headless/source/components/navigation/commandPalette/commandPalette.jsx.map +1 -0
- package/dist/headless/source/components/navigation/commandPalette/commandPaletteFilter.js +16 -0
- package/dist/headless/source/components/navigation/commandPalette/commandPaletteFilter.js.map +7 -0
- package/dist/headless/source/components/navigation/commandPalette/commandPaletteNavigation.js +54 -0
- package/dist/headless/source/components/navigation/commandPalette/commandPaletteNavigation.js.map +7 -0
- package/dist/headless/source/components/navigation/commandPalette/commandPaletteTypes.js +1 -0
- package/dist/headless/source/components/navigation/commandPalette/commandPaletteTypes.js.map +7 -0
- package/dist/headless/source/components/navigation/commandPalette/index.js +11 -0
- package/dist/headless/source/components/navigation/commandPalette/index.js.map +7 -0
- package/dist/headless/source/components/navigation/sidebar/sidebar.jsx +5 -2
- package/dist/headless/source/components/navigation/sidebar/sidebar.jsx.map +1 -1
- package/dist/headless/source/components/navigation/tabs/index.js +2 -0
- package/dist/headless/source/components/navigation/tabs/index.js.map +2 -2
- package/dist/headless/source/components/navigation/tabs/tab/tab.jsx +135 -8
- package/dist/headless/source/components/navigation/tabs/tab/tab.jsx.map +1 -1
- package/dist/headless/source/components/navigation/tabs/tabPanel/tabPanel.jsx +28 -0
- package/dist/headless/source/components/navigation/tabs/tabPanel/tabPanel.jsx.map +1 -0
- package/dist/headless/source/components/navigation/tabs/tabs.jsx +361 -13
- package/dist/headless/source/components/navigation/tabs/tabs.jsx.map +1 -1
- package/dist/headless/source/components/navigation/tabs/tabs.utils.js +18 -0
- package/dist/headless/source/components/navigation/tabs/tabs.utils.js.map +7 -0
- package/dist/headless/source/components/navigation/tabs/tabsContext.js.map +2 -2
- package/dist/headless/source/index.js +41 -1
- package/dist/headless/source/index.js.map +2 -2
- package/dist/headless/source/primitives/createFocusTrap.js +8 -3
- package/dist/headless/source/primitives/createFocusTrap.js.map +2 -2
- package/dist/headless/source/primitives/createKeyboardShortcut.js +23 -0
- package/dist/headless/source/primitives/createKeyboardShortcut.js.map +7 -0
- package/dist/headless/source/primitives/restoreFocus.js +14 -0
- package/dist/headless/source/primitives/restoreFocus.js.map +7 -0
- package/dist/headless/source/utils/keyboardShortcut.js +74 -0
- package/dist/headless/source/utils/keyboardShortcut.js.map +7 -0
- package/dist/headless/source/utils/linkAttrs.js +16 -0
- package/dist/headless/source/utils/linkAttrs.js.map +7 -0
- package/dist/headless/utils/keyboardShortcut.js +48 -0
- package/dist/headless/utils/keyboardShortcut.js.map +1 -0
- package/dist/headless/utils/linkAttrs.js +13 -0
- package/dist/headless/utils/linkAttrs.js.map +1 -0
- package/dist/index.d.ts +24 -3
- package/dist/index.js +405 -367
- package/dist/index.js.map +1 -1
- package/dist/primitives/createFocusTrap.d.ts +5 -0
- package/dist/primitives/createFocusTrap.js +17 -17
- package/dist/primitives/createFocusTrap.js.map +1 -1
- package/dist/primitives/createKeyboardShortcut.d.ts +23 -0
- package/dist/primitives/createKeyboardShortcut.js +16 -0
- package/dist/primitives/createKeyboardShortcut.js.map +1 -0
- package/dist/primitives/restoreFocus.d.ts +8 -0
- package/dist/primitives/restoreFocus.js +10 -0
- package/dist/primitives/restoreFocus.js.map +1 -0
- package/dist/source/components/dataDisplay/chat/chat.jsx +38 -4
- package/dist/source/components/dataDisplay/chat/chat.jsx.map +1 -1
- package/dist/source/components/dataDisplay/chat/chatComposer.jsx +1 -0
- package/dist/source/components/dataDisplay/chat/chatComposer.jsx.map +1 -1
- package/dist/source/components/dataDisplay/chat/index.js.map +1 -1
- package/dist/source/components/dataDisplay/chat/utils.js.map +2 -2
- package/dist/source/components/dataDisplay/dagView/dagView.jsx +30 -21
- package/dist/source/components/dataDisplay/dagView/dagView.jsx.map +1 -1
- package/dist/source/components/dataDisplay/diffStat/diffStat.jsx +78 -0
- package/dist/source/components/dataDisplay/diffStat/diffStat.jsx.map +1 -0
- package/dist/source/components/dataDisplay/diffStat/index.js +19 -0
- package/dist/source/components/dataDisplay/diffStat/index.js.map +7 -0
- package/dist/source/components/dataDisplay/kbd/index.js +9 -0
- package/dist/source/components/dataDisplay/kbd/index.js.map +7 -0
- package/dist/source/components/dataDisplay/kbd/kbd.jsx +50 -0
- package/dist/source/components/dataDisplay/kbd/kbd.jsx.map +1 -0
- package/dist/source/components/dataDisplay/kbd/kbdKeys.js +79 -0
- package/dist/source/components/dataDisplay/kbd/kbdKeys.js.map +7 -0
- package/dist/source/components/dataDisplay/list/listItem.jsx +37 -7
- package/dist/source/components/dataDisplay/list/listItem.jsx.map +1 -1
- package/dist/source/components/dataDisplay/qrCode/index.js +6 -0
- package/dist/source/components/dataDisplay/qrCode/index.js.map +7 -0
- package/dist/source/components/dataDisplay/qrCode/qrCode.jsx +96 -0
- package/dist/source/components/dataDisplay/qrCode/qrCode.jsx.map +1 -0
- package/dist/source/components/dataDisplay/qrCode/qrCodePath.js +24 -0
- package/dist/source/components/dataDisplay/qrCode/qrCodePath.js.map +7 -0
- package/dist/source/components/dataDisplay/statusDot/index.js +6 -0
- package/dist/source/components/dataDisplay/statusDot/index.js.map +7 -0
- package/dist/source/components/dataDisplay/statusDot/statusDot.jsx +30 -0
- package/dist/source/components/dataDisplay/statusDot/statusDot.jsx.map +1 -0
- package/dist/source/components/dataDisplay/swimlanes/index.js +15 -0
- package/dist/source/components/dataDisplay/swimlanes/index.js.map +7 -0
- package/dist/source/components/dataDisplay/swimlanes/swimlanes.jsx +452 -0
- package/dist/source/components/dataDisplay/swimlanes/swimlanes.jsx.map +1 -0
- package/dist/source/components/dataDisplay/treeView/treeView.jsx +118 -37
- package/dist/source/components/dataDisplay/treeView/treeView.jsx.map +1 -1
- package/dist/source/components/feedBack/modal/modal.jsx +34 -4
- package/dist/source/components/feedBack/modal/modal.jsx.map +1 -1
- package/dist/source/components/inputs/button/button.jsx +6 -2
- package/dist/source/components/inputs/button/button.jsx.map +1 -1
- package/dist/source/components/inputs/composer/composer.jsx +321 -0
- package/dist/source/components/inputs/composer/composer.jsx.map +1 -0
- package/dist/source/components/inputs/composer/composerFiles.js +27 -0
- package/dist/source/components/inputs/composer/composerFiles.js.map +7 -0
- package/dist/source/components/inputs/composer/composerKeys.js +11 -0
- package/dist/source/components/inputs/composer/composerKeys.js.map +7 -0
- package/dist/source/components/inputs/composer/index.js +5 -0
- package/dist/source/components/inputs/composer/index.js.map +7 -0
- package/dist/source/components/layout/sheet/sheet.jsx +33 -11
- package/dist/source/components/layout/sheet/sheet.jsx.map +1 -1
- package/dist/source/components/layout/tabGroups/index.js +8 -0
- package/dist/source/components/layout/tabGroups/index.js.map +7 -0
- package/dist/source/components/layout/tabGroups/tabGroups.jsx +1119 -0
- package/dist/source/components/layout/tabGroups/tabGroups.jsx.map +1 -0
- package/dist/source/components/layout/tabGroups/tabGroupsFocus.js +222 -0
- package/dist/source/components/layout/tabGroups/tabGroupsFocus.js.map +7 -0
- package/dist/source/components/layout/tabGroups/tabGroupsLayout.js +629 -0
- package/dist/source/components/layout/tabGroups/tabGroupsLayout.js.map +7 -0
- package/dist/source/components/navigation/appBar/appBar.jsx +27 -3
- package/dist/source/components/navigation/appBar/appBar.jsx.map +1 -1
- package/dist/source/components/navigation/commandPalette/commandPalette.jsx +508 -0
- package/dist/source/components/navigation/commandPalette/commandPalette.jsx.map +1 -0
- package/dist/source/components/navigation/commandPalette/commandPaletteFilter.js +16 -0
- package/dist/source/components/navigation/commandPalette/commandPaletteFilter.js.map +7 -0
- package/dist/source/components/navigation/commandPalette/commandPaletteNavigation.js +54 -0
- package/dist/source/components/navigation/commandPalette/commandPaletteNavigation.js.map +7 -0
- package/dist/source/components/navigation/commandPalette/commandPaletteTypes.js +1 -0
- package/dist/source/components/navigation/commandPalette/commandPaletteTypes.js.map +7 -0
- package/dist/source/components/navigation/commandPalette/index.js +11 -0
- package/dist/source/components/navigation/commandPalette/index.js.map +7 -0
- package/dist/source/components/navigation/sidebar/sidebar.jsx +5 -2
- package/dist/source/components/navigation/sidebar/sidebar.jsx.map +1 -1
- package/dist/source/components/navigation/tabs/index.js +2 -0
- package/dist/source/components/navigation/tabs/index.js.map +2 -2
- package/dist/source/components/navigation/tabs/tab/tab.jsx +135 -8
- package/dist/source/components/navigation/tabs/tab/tab.jsx.map +1 -1
- package/dist/source/components/navigation/tabs/tabPanel/tabPanel.jsx +30 -0
- package/dist/source/components/navigation/tabs/tabPanel/tabPanel.jsx.map +1 -0
- package/dist/source/components/navigation/tabs/tabs.jsx +361 -13
- package/dist/source/components/navigation/tabs/tabs.jsx.map +1 -1
- package/dist/source/components/navigation/tabs/tabs.utils.js +18 -0
- package/dist/source/components/navigation/tabs/tabs.utils.js.map +7 -0
- package/dist/source/components/navigation/tabs/tabsContext.js.map +2 -2
- package/dist/source/index.js +41 -1
- package/dist/source/index.js.map +2 -2
- package/dist/source/primitives/createFocusTrap.js +8 -3
- package/dist/source/primitives/createFocusTrap.js.map +2 -2
- package/dist/source/primitives/createKeyboardShortcut.js +23 -0
- package/dist/source/primitives/createKeyboardShortcut.js.map +7 -0
- package/dist/source/primitives/restoreFocus.js +14 -0
- package/dist/source/primitives/restoreFocus.js.map +7 -0
- package/dist/source/utils/keyboardShortcut.js +74 -0
- package/dist/source/utils/keyboardShortcut.js.map +7 -0
- package/dist/source/utils/linkAttrs.js +16 -0
- package/dist/source/utils/linkAttrs.js.map +7 -0
- package/dist/utils/keyboardShortcut.d.ts +12 -0
- package/dist/utils/keyboardShortcut.js +48 -0
- package/dist/utils/keyboardShortcut.js.map +1 -0
- package/dist/utils/linkAttrs.d.ts +13 -0
- package/dist/utils/linkAttrs.js +13 -0
- package/dist/utils/linkAttrs.js.map +1 -0
- package/package.json +66 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/components/dataDisplay/dagView/dagView.tsx"],"sourcesContent":["import {\n DEV,\n For,\n type JSX,\n Show,\n createEffect,\n createMemo,\n createSelector,\n createSignal,\n createUniqueId,\n mergeProps,\n on,\n onCleanup,\n onMount,\n splitProps,\n untrack,\n} from \"solid-js\";\nimport cn from \"clsx\";\nimport { createControllableState } from \"../../../primitives/createControllableState\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\nimport { mergeStyle } from \"../../../primitives/mergeStyle\";\nimport {\n type DagDirection,\n type DagLayoutEdge,\n type DagLayoutInput,\n type DagLayoutNode,\n type DagLayoutResult,\n dagEdgePath,\n dagLayout,\n} from \"./dagLayout\";\nimport { type Viewport, centerOn, createPanZoom, fitBounds, isVisible, viewportTransform, zoomAt } from \"./panZoom\";\n\n/** A node's status: a built-in one, coloured by the theme, or any word of the app's, styled by `[data-status]`. */\nexport type DagViewStatus =\n | \"idle\"\n | \"pending\"\n | \"running\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"skipped\"\n | (string & {});\n\nexport interface DagViewNode<T = unknown> {\n /** Unique among the nodes; edges name nodes by it. */\n id: string;\n /** What the default node shows, and its accessible name; the id unless given. */\n label?: JSX.Element;\n /** Colours the node's accent from the theme. */\n status?: DagViewStatus | undefined;\n /** The node's accent colour, over its status colour: any CSS colour. */\n accent?: string | undefined;\n /** The node's width in pixels; `nodeWidth` unless given. */\n width?: number | undefined;\n /** The node's height in pixels; `nodeHeight` unless given. */\n height?: number | undefined;\n /** Anything of the app's, handed back to `renderNode` and `onNodeClick`. */\n data?: T;\n /** Shown, focusable, but not selectable. */\n disabled?: boolean | undefined;\n}\n\nexport interface DagViewEdge {\n /** `source->target` unless given. */\n id?: string | undefined;\n /** The id of the node the edge starts from: the one depended on. */\n source: string;\n /** The id of the node the edge points to: the one that depends on `source`. */\n target: string;\n}\n\n/** A node's state for `renderNode`. Its fields are reactive: read them in JSX or an effect. */\nexport interface DagViewNodeState {\n readonly selected: boolean;\n /** Next to the selected node: \"upstream\" feeds it, \"downstream\" depends on it. */\n readonly related: \"upstream\" | \"downstream\" | null;\n /** Set apart from the selected node and its neighbours, with `dimUnrelated`. */\n readonly dimmed: boolean;\n /** Has keyboard focus. */\n readonly focused: boolean;\n}\n\n/** Where the graph is: moved by x, y (pixels) and scaled by zoom. */\nexport type DagViewViewport = Viewport;\n\n/** Moves the view from outside; handed over by `apiRef` once the graph is in the page. */\nexport interface DagViewApi {\n /** Fits the whole graph in view. */\n fitView(): void;\n /** Zooms to `zoom` around the middle of the view. */\n zoomTo(zoom: number): void;\n /** Zooms by `factor` around the middle of the view. */\n zoomBy(factor: number): void;\n /** Moves the node with this id to the middle of the view. */\n centerNode(id: string): void;\n}\n\n/** Texts for assistive technology and the zoom buttons, English by default. */\nexport interface DagViewLabels {\n /** What the graph is called as a widget: \"dependency graph\". */\n roleDescription: string;\n /** \"Status\", before a node's status word. */\n status: string;\n /** \"Depends on\", before the names of the nodes a node's edges come from. */\n dependsOn: string;\n /** \"Required by\", before the names of the nodes a node's edges go to. */\n requiredBy: string;\n /** Status words, shown on the default nodes and read out: { running: \"Running\", … }. */\n statuses: Record<string, string>;\n zoomIn: string;\n zoomOut: string;\n fitView: string;\n /** The name of the group of zoom buttons. */\n controls: string;\n}\n\nexport interface DagViewProps<T = unknown> extends Omit<JSX.HTMLAttributes<HTMLDivElement>, \"onClick\"> {\n /** What the graph shows: its accessible name. */\n label: string;\n /** The graph in words, for screen readers; it is there on the server too. */\n summary?: string | undefined;\n /** The nodes. A change of status, label or data alone does not lay the graph out again. */\n nodes: readonly DagViewNode<T>[];\n /** The edges, from the node depended on to the node that depends on it. */\n edges: readonly DagViewEdge[];\n /**\n * Draws a node's content inside its box; the default shows a status dot,\n * the label and the status word. Called once per node: `node` and `state`\n * are reactive, so read their fields in JSX. Keep the content\n * non-interactive where you can: a node is an ARIA option, whose content\n * assistive technology may read as plain text, and a click in it also\n * selects the node. Links and buttons in it are left out of the Tab order\n * except in the node that is the graph's Tab stop.\n */\n renderNode?: ((node: DagViewNode<T>, state: DagViewNodeState) => JSX.Element) | undefined;\n /** Which way the layers run: \"LR\" (left to right, default) or \"TB\" (top to bottom). */\n direction?: DagDirection | undefined;\n /** A node's width in pixels, unless the node sets its own; 180 by default. */\n nodeWidth?: number | undefined;\n /** A node's height in pixels, unless the node sets its own; 56 by default. */\n nodeHeight?: number | undefined;\n /** The space between layers in pixels; 64 by default. */\n rankGap?: number | undefined;\n /** The space between nodes in a layer in pixels; 24 by default. */\n nodeGap?: number | undefined;\n /** Lays the graph out in place of the built-in layout, e.g. with dagre or elk. It must be synchronous. */\n layout?: ((input: DagLayoutInput) => DagLayoutResult) | undefined;\n /** The selected node's id (controlled); null selects nothing. */\n selectedId?: string | null | undefined;\n /** The node selected at first (uncontrolled). */\n defaultSelectedId?: string | null | undefined;\n /** A node was selected (its id) or the selection was cleared (null). */\n onSelectedChange?: ((id: string | null) => void) | undefined;\n /** A node was clicked, or chosen with Enter or Space. Not called for a disabled node. */\n onNodeClick?: ((node: DagViewNode<T>, event: MouseEvent | KeyboardEvent) => void) | undefined;\n /** Fades the nodes and edges that are not next to the selected node. */\n dimUnrelated?: boolean | undefined;\n /** Where the graph is (controlled). */\n viewport?: DagViewViewport | undefined;\n /** Where the graph is at first (uncontrolled); with `fit={false}` the page does not move after it loads. */\n defaultViewport?: DagViewViewport | undefined;\n /** The view moved or zoomed: at most once per frame during a gesture. */\n onViewportChange?: ((viewport: DagViewViewport) => void) | undefined;\n /** Fits the graph in view once it is in the page, and again when its nodes or edges change; true by default. */\n fit?: boolean | undefined;\n /** The smallest zoom; 0.1 by default. */\n minZoom?: number | undefined;\n /** The largest zoom; 2 by default. */\n maxZoom?: number | undefined;\n /** What a plain mouse wheel does: \"zoom\" (default), \"pan\", or \"none\" (the page scrolls). Ctrl+wheel and a trackpad pinch always zoom. */\n wheel?: \"zoom\" | \"pan\" | \"none\" | undefined;\n /** Shows the zoom in, zoom out and fit buttons; true by default. */\n controls?: boolean | undefined;\n /** Texts for assistive technology and the buttons, over the English defaults. */\n labels?: Partial<DagViewLabels> | undefined;\n /**\n * The graph's height: a number of pixels or any CSS length; 480 by default,\n * from the stylesheet, so a height in `style` works too. It fills the width.\n */\n height?: number | string | undefined;\n /** Gets the functions that move the view from outside. */\n apiRef?: ((api: DagViewApi) => void) | undefined;\n /** Test id of the root `<div>`; `dag-view` unless given. */\n \"data-testid\"?: string | undefined;\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Room around the graph inside its world, in pixels. */\nconst PADDING = 24;\n\nconst DEFAULT_LABELS: DagViewLabels = {\n roleDescription: \"dependency graph\",\n status: \"Status\",\n dependsOn: \"Depends on\",\n requiredBy: \"Required by\",\n statuses: {\n idle: \"Idle\",\n pending: \"Pending\",\n running: \"Running\",\n success: \"Success\",\n warning: \"Warning\",\n error: \"Error\",\n skipped: \"Skipped\",\n },\n zoomIn: \"Zoom in\",\n zoomOut: \"Zoom out\",\n fitView: \"Fit to view\",\n controls: \"Zoom\",\n};\n\nconst NODE_KEYS = [\"label\", \"status\", \"accent\", \"width\", \"height\", \"data\", \"disabled\"] as const;\n\n/** What can take focus inside a node's own content. */\nconst INNER_FOCUSABLE =\n 'a[href], button, input, select, textarea, iframe, summary, audio[controls], video[controls], [tabindex], [contenteditable]:not([contenteditable=\"false\"])';\n\nconst cssLength =(value: number | string): string => (typeof value === \"number\" ? `${value}px` : value);\n\nconst sameList = (a: readonly string[], b: readonly string[]): boolean =>\n a.length === b.length && a.every((value, i) => value === b[i]);\n\n/** A node's name in words, for descriptions: its label when that is text, else its id. */\nconst nameOf = (node: DagViewNode<unknown> | undefined, id: string): string => {\n const label = node?.label;\n return typeof label === \"string\" || typeof label === \"number\" ? String(label) : id;\n};\n\nconst warn = DEV ? (message: string): void => console.warn(`[smwb] DagView: ${message}`) : undefined;\n\n/**\n * A directed graph of dependencies: nodes in layers, left to right or top to\n * bottom, joined by arrows. A node is selected by a click or the keyboard, and\n * the edges into and out of it light up; the view pans and zooms with a mouse,\n * a trackpad, touch or the keyboard.\n */\nexport function DagView<T = unknown>(props: DagViewProps<T>): JSX.Element {\n const merged = mergeProps(\n {\n direction: \"LR\" as DagDirection,\n nodeWidth: 180,\n nodeHeight: 56,\n rankGap: 64,\n nodeGap: 24,\n fit: true,\n minZoom: 0.1,\n maxZoom: 2,\n wheel: \"zoom\" as \"zoom\" | \"pan\" | \"none\",\n controls: true,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"style\",\n \"label\",\n \"summary\",\n \"nodes\",\n \"edges\",\n \"renderNode\",\n \"direction\",\n \"nodeWidth\",\n \"nodeHeight\",\n \"rankGap\",\n \"nodeGap\",\n \"layout\",\n \"selectedId\",\n \"defaultSelectedId\",\n \"onSelectedChange\",\n \"onNodeClick\",\n \"dimUnrelated\",\n \"viewport\",\n \"defaultViewport\",\n \"onViewportChange\",\n \"fit\",\n \"minZoom\",\n \"maxZoom\",\n \"wheel\",\n \"controls\",\n \"labels\",\n \"height\",\n \"apiRef\",\n \"ref\",\n \"data-testid\",\n ]);\n\n const uid = createUniqueId();\n const arrowId = `${uid}-arrow`;\n const activeArrowId = `${uid}-arrow-active`;\n const summaryId = `${uid}-summary`;\n let root!: HTMLDivElement;\n const elements = new Map<string, HTMLElement>();\n\n const labels = createMemo(\n (): DagViewLabels => ({\n ...DEFAULT_LABELS,\n ...local.labels,\n statuses: { ...DEFAULT_LABELS.statuses, ...local.labels?.statuses },\n })\n );\n const statusWord = (status: string): string => labels().statuses[status] ?? status;\n\n // ---- Nodes and layout ----\n\n const byId = createMemo(() => {\n const map = new Map<string, DagViewNode<T>>();\n for (const node of local.nodes) if (!map.has(node.id)) map.set(node.id, node);\n return map;\n });\n // Nodes are drawn by id, so content stays mounted when the app replaces a\n // node object to change its status.\n const ids = createMemo(() => [...byId().keys()], [], { equals: sameList });\n\n // The layout depends only on the graph's shape; a status change leaves it be.\n const structure = createMemo(\n () => {\n const nodes = [...byId().values()].map((node) => ({\n id: node.id,\n width: node.width ?? local.nodeWidth,\n height: node.height ?? local.nodeHeight,\n }));\n const edges = local.edges.map((edge) => ({ id: edge.id, source: edge.source, target: edge.target }));\n const input: DagLayoutInput = {\n nodes,\n edges,\n direction: local.direction,\n rankGap: local.rankGap,\n nodeGap: local.nodeGap,\n warn,\n };\n const key = JSON.stringify([\n local.direction,\n local.rankGap,\n local.nodeGap,\n nodes.map((n) => [n.id, n.width, n.height]),\n edges.map((e) => [e.id ?? null, e.source, e.target]),\n ]);\n return { key, input };\n },\n undefined,\n { equals: (a, b) => a.key === b.key }\n );\n const layout = createMemo(() => (local.layout ?? dagLayout)(structure().input));\n\n // The flow of a layer runs along x in LR and along y in TB; across it is the other one.\n const across = (node: DagLayoutNode): number => (local.direction === \"TB\" ? node.x : node.y);\n\n const graph = createMemo(() => {\n const result = layout();\n const incoming = new Map<string, DagLayoutEdge[]>();\n const outgoing = new Map<string, DagLayoutEdge[]>();\n for (const edge of result.edges) {\n if (!incoming.has(edge.target)) incoming.set(edge.target, []);\n if (!outgoing.has(edge.source)) outgoing.set(edge.source, []);\n incoming.get(edge.target)!.push(edge);\n outgoing.get(edge.source)!.push(edge);\n }\n const ordered = [...result.nodes.values()].sort((a, b) => a.layer - b.layer || across(a) - across(b));\n const layers = new Map<number, DagLayoutNode[]>();\n for (const node of ordered) {\n if (!layers.has(node.layer)) layers.set(node.layer, []);\n layers.get(node.layer)!.push(node);\n }\n return { incoming, outgoing, ordered, layers };\n });\n\n // ---- Selection ----\n\n const [selected, setSelected] = createControllableState<string | null>({\n value: () => local.selectedId,\n defaultValue: untrack(() => local.defaultSelectedId) ?? null,\n onChange: (id) => local.onSelectedChange?.(id),\n });\n const isSelected = createSelector(selected);\n\n const relations = createMemo(() => {\n const id = selected();\n const edges = new Map<string, \"upstream\" | \"downstream\">();\n const nodes = new Map<string, \"upstream\" | \"downstream\">();\n if (id === null || !layout().nodes.has(id)) return { active: false, edges, nodes };\n const { incoming, outgoing } = graph();\n for (const edge of incoming.get(id) ?? []) {\n edges.set(edge.id, \"upstream\");\n nodes.set(edge.source, \"upstream\");\n }\n for (const edge of outgoing.get(id) ?? []) {\n edges.set(edge.id, \"downstream\");\n nodes.set(edge.target, \"downstream\");\n }\n return { active: true, edges, nodes };\n });\n\n // ---- Focus: one tab stop, on the last focused node, else the selected one, else the first ----\n\n const [active, setActive] = createSignal<string | null>(null);\n const [focused, setFocused] = createSignal<string | null>(null);\n const tabStop = createMemo(() => {\n const nodes = layout().nodes;\n const last = active();\n if (last !== null && nodes.has(last)) return last;\n const chosen = selected();\n if (chosen !== null && nodes.has(chosen)) return chosen;\n return graph().ordered[0]?.id ?? null;\n });\n\n // ---- Viewport ----\n\n const [viewport, setViewport] = createControllableState<Viewport>({\n value: () => local.viewport,\n defaultValue: untrack(() => local.defaultViewport) ?? { x: 0, y: 0, zoom: 1 },\n onChange: (next) => local.onViewportChange?.(next),\n });\n const [interacting, setInteracting] = createSignal(false);\n const far = createMemo(() => viewport().zoom < 0.45);\n\n const size = (): { width: number; height: number } => ({\n width: root?.clientWidth ?? 0,\n height: root?.clientHeight ?? 0,\n });\n const hasSize = (): boolean => {\n const { width, height } = size();\n return width > 0 && height > 0;\n };\n const worldSize = (): { width: number; height: number } => ({\n width: layout().width + PADDING * 2,\n height: layout().height + PADDING * 2,\n });\n const nodeRect = (id: string): { x: number; y: number; width: number; height: number } | undefined => {\n const box = layout().nodes.get(id);\n return box && { x: box.x + PADDING, y: box.y + PADDING, width: box.width, height: box.height };\n };\n\n const api: DagViewApi = {\n fitView() {\n if (!hasSize()) return;\n const world = worldSize();\n setViewport(\n fitBounds(\n { x: 0, y: 0, ...world },\n size(),\n 0,\n local.minZoom,\n Math.max(local.minZoom, Math.min(1, local.maxZoom))\n )\n );\n },\n zoomTo(zoom) {\n api.zoomBy(zoom / viewport().zoom);\n },\n zoomBy(factor) {\n const { width, height } = size();\n setViewport(zoomAt(viewport(), { x: width / 2, y: height / 2 }, factor, local.minZoom, local.maxZoom));\n },\n centerNode(id) {\n const rect = nodeRect(id);\n if (!rect) return;\n setViewport(centerOn(viewport(), { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 }, size()));\n },\n };\n\n const ensureVisible = (id: string): void => {\n const rect = nodeRect(id);\n if (rect && hasSize() && !isVisible(viewport(), rect, size(), 8)) api.centerNode(id);\n };\n\n // Fit once the graph has a size, and again when its shape changes. At zero\n // size (a hidden tab) the fit waits for the first resize that gives one.\n let fitPending = false;\n const tryFit = (): void => {\n if (!fitPending || !hasSize()) return;\n fitPending = false;\n api.fitView();\n };\n createEffect(\n on(\n layout,\n () => {\n if (!untrack(() => local.fit)) return;\n fitPending = true;\n tryFit();\n },\n { defer: true }\n )\n );\n\n onMount(() => {\n const dispose = createPanZoom(root, {\n viewport,\n write: setViewport,\n minZoom: () => local.minZoom,\n maxZoom: () => local.maxZoom,\n wheel: () => local.wheel,\n onInteracting: setInteracting,\n });\n let frame = 0;\n const resizeObserver =\n typeof ResizeObserver === \"function\"\n ? new ResizeObserver(() => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(tryFit);\n })\n : undefined;\n resizeObserver?.observe(root);\n onCleanup(() => {\n dispose();\n resizeObserver?.disconnect();\n cancelAnimationFrame(frame);\n });\n fitPending = local.fit;\n tryFit();\n local.apiRef?.(api);\n });\n\n // ---- Interaction ----\n\n const choose = (id: string, event: MouseEvent | KeyboardEvent): void => {\n const node = byId().get(id);\n if (!node || node.disabled) return;\n setSelected(id);\n local.onNodeClick?.(node, event);\n };\n\n const focusNode = (id: string | undefined): void => {\n if (id === undefined) return;\n setActive(id);\n elements.get(id)?.focus({ preventScroll: true });\n ensureVisible(id);\n };\n\n // A node that goes away takes its selection with it, and focus moves to the\n // Tab stop rather than dropping to the page. Only a node that was there\n // counts: a selection given before its node loads is kept.\n createEffect<readonly string[] | undefined>((before) => {\n const now = ids();\n if (before) {\n untrack(() => {\n const present = new Set(now);\n const chosen = selected();\n if (chosen !== null && !present.has(chosen) && before.includes(chosen)) setSelected(null);\n const had = focused();\n if (had === null || present.has(had)) return;\n setFocused(null);\n const doc = root?.ownerDocument;\n const stop = tabStop();\n if (doc && (doc.activeElement === null || doc.activeElement === doc.body) && stop !== null)\n elements.get(stop)?.focus({ preventScroll: true });\n });\n }\n return now;\n });\n\n // One Tab stop: focusables in `renderNode` content (a link, a button) are\n // taken out of the Tab order, except in the node that is the Tab stop. Their\n // own tabindex comes back when their node becomes it.\n const ownTabIndex = new WeakMap<Element, string | null>();\n const syncInnerTabStops = (): void => {\n const stop = untrack(tabStop);\n for (const [id, el] of elements) {\n for (const inner of el.querySelectorAll(INNER_FOCUSABLE)) {\n if (!ownTabIndex.has(inner)) ownTabIndex.set(inner, inner.getAttribute(\"tabindex\"));\n const own = ownTabIndex.get(inner) ?? null;\n const next = id === stop ? own : \"-1\";\n if (inner.getAttribute(\"tabindex\") === next) continue;\n if (next === null) inner.removeAttribute(\"tabindex\");\n else inner.setAttribute(\"tabindex\", next);\n }\n }\n };\n onMount(() => {\n if (!local.renderNode) return;\n createEffect(on(tabStop, syncInnerTabStops));\n if (typeof MutationObserver !== \"function\") return;\n // Content that changes later (a link that shows up with a status) is caught too.\n const observer = new MutationObserver(syncInnerTabStops);\n observer.observe(root, { childList: true, subtree: true });\n onCleanup(() => observer.disconnect());\n });\n\n /** The node an arrow key leads to from `id`: along the edges, or to a neighbour in the layer. */\n const neighbour = (id: string, key: string): string | undefined => {\n const tb = local.direction === \"TB\";\n const forward = tb ? \"ArrowDown\" : \"ArrowRight\";\n const back = tb ? \"ArrowUp\" : \"ArrowLeft\";\n const before = tb ? \"ArrowLeft\" : \"ArrowUp\";\n const after = tb ? \"ArrowRight\" : \"ArrowDown\";\n const nodes = layout().nodes;\n const first = (list: string[]): string | undefined =>\n list\n .map((other) => nodes.get(other))\n .filter((node): node is DagLayoutNode => node !== undefined)\n .sort((a, b) => across(a) - across(b))[0]?.id;\n if (key === forward) return first((graph().outgoing.get(id) ?? []).map((e) => e.target));\n if (key === back) return first((graph().incoming.get(id) ?? []).map((e) => e.source));\n const self = nodes.get(id);\n if (!self) return undefined;\n const layer = graph().layers.get(self.layer) ?? [];\n const index = layer.findIndex((node) => node.id === id);\n if (key === before) return layer[index - 1]?.id;\n if (key === after) return layer[index + 1]?.id;\n return undefined;\n };\n\n const onKeyDown = (event: KeyboardEvent): void => {\n const target = event.target as HTMLElement;\n const id = target.dataset?.[\"dagId\"];\n // Keys pressed in a node's own content (a link, a field) are its own.\n if (id === undefined || !target.classList.contains(\"smwb-dag-view__node\")) return;\n // Ctrl, Cmd and Alt shortcuts are the browser's: page zoom, history, tabs.\n if (event.ctrlKey || event.metaKey || event.altKey) return;\n const key = event.key;\n if (key.startsWith(\"Arrow\") && event.shiftKey) {\n const step = 48;\n const v = viewport();\n const dx = key === \"ArrowLeft\" ? step : key === \"ArrowRight\" ? -step : 0;\n const dy = key === \"ArrowUp\" ? step : key === \"ArrowDown\" ? -step : 0;\n setViewport({ x: v.x + dx, y: v.y + dy, zoom: v.zoom });\n event.preventDefault();\n return;\n }\n if (key.startsWith(\"Arrow\")) {\n event.preventDefault();\n focusNode(neighbour(id, key));\n return;\n }\n switch (key) {\n case \"Home\":\n event.preventDefault();\n focusNode(graph().ordered[0]?.id);\n return;\n case \"End\":\n event.preventDefault();\n focusNode(graph().ordered[graph().ordered.length - 1]?.id);\n return;\n case \"Enter\":\n case \" \":\n event.preventDefault();\n choose(id, event);\n return;\n case \"Escape\":\n // Handled only when there was a selection, so an enclosing dialog still gets it otherwise.\n if (selected() === null) return;\n event.preventDefault();\n setSelected(null);\n return;\n case \"+\":\n case \"=\":\n event.preventDefault();\n api.zoomBy(1.25);\n return;\n case \"-\":\n case \"_\":\n event.preventDefault();\n api.zoomBy(0.8);\n return;\n case \"0\":\n event.preventDefault();\n api.fitView();\n return;\n }\n };\n\n const defaultRender = (node: DagViewNode<T>): JSX.Element => (\n <>\n <span class=\"smwb-dag-view__dot\" aria-hidden=\"true\" />\n <span class=\"smwb-dag-view__label\">{node.label ?? node.id}</span>\n <Show when={node.status}>{(status) => <span class=\"smwb-dag-view__status\">{statusWord(status())}</span>}</Show>\n </>\n );\n\n const description = (id: string): string => {\n const node = byId().get(id);\n const parts: string[] = [];\n if (node?.status) parts.push(`${labels().status}: ${statusWord(node.status)}.`);\n const names = (list: string[]): string => list.map((other) => nameOf(byId().get(other), other)).join(\", \");\n const from = (graph().incoming.get(id) ?? []).map((e) => e.source);\n const to = (graph().outgoing.get(id) ?? []).map((e) => e.target);\n if (from.length) parts.push(`${labels().dependsOn}: ${names(from)}.`);\n if (to.length) parts.push(`${labels().requiredBy}: ${names(to)}.`);\n return parts.join(\" \");\n };\n\n const renderNodeFor = (id: string, index: () => number): JSX.Element => {\n const node = (): DagViewNode<T> | undefined => byId().get(id);\n // The node as `renderNode` sees it: its fields read the app's latest object.\n const view = { id } as DagViewNode<T>;\n for (const key of NODE_KEYS) Object.defineProperty(view, key, { enumerable: true, get: () => node()?.[key] });\n const state: DagViewNodeState = {\n get selected() {\n return isSelected(id);\n },\n get related() {\n return relations().nodes.get(id) ?? null;\n },\n get dimmed() {\n const r = relations();\n return Boolean(local.dimUnrelated) && r.active && !isSelected(id) && !r.nodes.has(id);\n },\n get focused() {\n return focused() === id;\n },\n };\n const descriptionId = (): string => `${uid}-node-${index()}`;\n const style = (): JSX.CSSProperties => {\n const box = layout().nodes.get(id);\n const css: JSX.CSSProperties = box\n ? {\n left: `${box.x + PADDING}px`,\n top: `${box.y + PADDING}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n }\n : { display: \"none\" };\n const accent = node()?.accent;\n if (accent) css[\"--smwb-dag-view-node-accent\"] = accent;\n return css;\n };\n const onFocus = (event: FocusEvent): void => {\n if (event.target !== event.currentTarget) return;\n setActive(id);\n setFocused(id);\n let keyboard = true;\n try {\n keyboard = (event.currentTarget as HTMLElement).matches(\":focus-visible\");\n } catch {\n // An engine without :focus-visible: treat it as the keyboard.\n }\n if (keyboard) ensureVisible(id);\n };\n const onBlur = (event: FocusEvent): void => {\n if (event.target === event.currentTarget && focused() === id) setFocused(null);\n };\n const content = untrack(() => (local.renderNode ?? defaultRender)(view, state));\n return (\n <div\n role=\"option\"\n data-dag-id={id}\n ref={(el) => {\n elements.set(id, el);\n onCleanup(() => elements.get(id) === el && elements.delete(id));\n }}\n class={cn(\"smwb-dag-view__node\", {\n \"smwb-dag-view__node--selected\": state.selected,\n \"smwb-dag-view__node--upstream\": state.related === \"upstream\",\n \"smwb-dag-view__node--downstream\": state.related === \"downstream\",\n \"smwb-dag-view__node--dimmed\": state.dimmed,\n \"smwb-dag-view__node--disabled\": Boolean(node()?.disabled),\n })}\n data-status={node()?.status}\n aria-selected={state.selected ? \"true\" : \"false\"}\n aria-disabled={node()?.disabled ? \"true\" : undefined}\n aria-describedby={description(id) ? descriptionId() : undefined}\n tabIndex={tabStop() === id ? 0 : -1}\n style={style()}\n onClick={(event) => choose(id, event)}\n onFocus={onFocus}\n onBlur={onBlur}\n >\n {content}\n <span id={descriptionId()} hidden>\n {description(id)}\n </span>\n </div>\n );\n };\n\n const edgeClass = (edge: DagLayoutEdge): string => {\n const r = relations();\n const relation = r.edges.get(edge.id);\n return cn(\"smwb-dag-view__edge\", {\n \"smwb-dag-view__edge--active\": relation !== undefined,\n \"smwb-dag-view__edge--upstream\": relation === \"upstream\",\n \"smwb-dag-view__edge--downstream\": relation === \"downstream\",\n \"smwb-dag-view__edge--dimmed\": Boolean(local.dimUnrelated) && r.active && relation === undefined,\n \"smwb-dag-view__edge--reversed\": edge.reversed,\n });\n };\n\n // The default height is the stylesheet's, so a height in the caller's style is not overridden.\n const rootStyle = (): JSX.CSSProperties | string | undefined =>\n mergeStyle(local.style, { height: local.height === undefined ? undefined : cssLength(local.height) });\n\n return (\n <div\n data-testid={local[\"data-testid\"] ?? \"dag-view\"}\n {...rest}\n ref={mergeRefs(local.ref, (el) => (root = el))}\n class={cn(\"smwb-dag-view\", local.class)}\n // Only when there is one: the server would print an empty style=\"\".\n {...(rootStyle() === undefined ? {} : { style: rootStyle() })}\n data-direction={local.direction}\n data-zoom={far() ? \"far\" : undefined}\n data-interacting={interacting() ? \"\" : undefined}\n >\n <div\n class=\"smwb-dag-view__world\"\n role=\"listbox\"\n aria-label={local.label}\n aria-roledescription={labels().roleDescription}\n aria-describedby={local.summary ? summaryId : undefined}\n style={{\n width: `${worldSize().width}px`,\n height: `${worldSize().height}px`,\n transform: viewportTransform(viewport()),\n }}\n onKeyDown={onKeyDown}\n >\n <svg class=\"smwb-dag-view__edges\" width={worldSize().width} height={worldSize().height} aria-hidden=\"true\">\n <defs>\n <marker\n id={arrowId}\n viewBox=\"0 0 10 10\"\n refX=\"9\"\n refY=\"5\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n markerUnits=\"userSpaceOnUse\"\n orient=\"auto-start-reverse\"\n >\n <path class=\"smwb-dag-view__arrow\" d=\"M0,1 L9,5 L0,9 z\" />\n </marker>\n <marker\n id={activeArrowId}\n viewBox=\"0 0 10 10\"\n refX=\"9\"\n refY=\"5\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n markerUnits=\"userSpaceOnUse\"\n orient=\"auto-start-reverse\"\n >\n <path class=\"smwb-dag-view__arrow smwb-dag-view__arrow--active\" d=\"M0,1 L9,5 L0,9 z\" />\n </marker>\n </defs>\n <g transform={`translate(${PADDING} ${PADDING})`}>\n <For each={layout().edges}>\n {(edge) => (\n <path\n class={edgeClass(edge)}\n data-source={edge.source}\n data-target={edge.target}\n d={dagEdgePath(edge.points, local.direction)}\n marker-end={`url(#${relations().edges.has(edge.id) ? activeArrowId : arrowId})`}\n />\n )}\n </For>\n </g>\n </svg>\n <For each={ids()}>{(id, index) => renderNodeFor(id, index)}</For>\n </div>\n <Show when={local.summary}>\n <p id={summaryId} class=\"smwb-dag-view__summary\">\n {local.summary}\n </p>\n </Show>\n <Show when={local.controls}>\n <div class=\"smwb-dag-view__controls\" role=\"group\" aria-label={labels().controls}>\n <button\n type=\"button\"\n class=\"smwb-dag-view__control\"\n title={labels().zoomIn}\n onClick={() => api.zoomBy(1.25)}\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"smwb-dag-view__control\"\n title={labels().zoomOut}\n onClick={() => api.zoomBy(0.8)}\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M5 12h14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"smwb-dag-view__control\"\n title={labels().fitView}\n onClick={() => api.fitView()}\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5\" />\n </svg>\n </button>\n </div>\n </Show>\n </div>\n );\n}\n\nexport default DagView;\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,QAAQ;AACf,SAAS,+BAA+B;AACxC,SAAS,iBAA2B;AACpC,SAAS,kBAAkB;AAC3B;AAAA,EAME;AAAA,EACA;AAAA,OACK;AACP,SAAwB,UAAU,eAAe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AAA,IAChB,SAAS,MAAM,IAAI,OAAO,GAAG;AAAA,GAC9B;AAAA,YACC,CAAC,IAAI,QAAQ,YAAY,YAAY,OAAO;AAAA,cAC1C,CAAC,KAAK,EAAE,WAAW,EAAE;AAAA,YACvB,EAFC,IAEK;AAAA,UACR,EATC,OASQ;AAAA,UACT,CAAC;AAAA,IACC,KAAK;AAAA,IACL,MAAM;AAAA,IACN,OAAO,OAAO,EAAE;AAAA,IAChB,SAAS,MAAM,IAAI,QAAQ;AAAA,GAC5B;AAAA,YACC,CAAC,IAAI,QAAQ,YAAY,YAAY,OAAO;AAAA,cAC1C,CAAC,KAAK,EAAE,yCAAyC,EAAE;AAAA,YACrD,EAFC,IAEK;AAAA,UACR,EATC,OASQ;AAAA,QACX,EA/BC,IA+BK;AAAA,MACR,EAjCC,KAiCM;AAAA,IACT,EA1GC;AA4GL;AAEA,IAAO,kBAAQ;","names":[],"file":"dagView.jsx"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/components/dataDisplay/dagView/dagView.tsx"],"sourcesContent":["import {\n DEV,\n For,\n type JSX,\n Show,\n createEffect,\n createMemo,\n createSelector,\n createSignal,\n createUniqueId,\n mergeProps,\n on,\n onCleanup,\n onMount,\n splitProps,\n untrack,\n} from \"solid-js\";\nimport cn from \"clsx\";\nimport { createControllableState } from \"../../../primitives/createControllableState\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\nimport { mergeStyle } from \"../../../primitives/mergeStyle\";\nimport {\n type DagDirection,\n type DagLayoutEdge,\n type DagLayoutInput,\n type DagLayoutNode,\n type DagLayoutResult,\n dagEdgePath,\n dagLayout,\n} from \"./dagLayout\";\nimport { type Viewport, centerOn, createPanZoom, fitBounds, isVisible, viewportTransform, zoomAt } from \"./panZoom\";\n\n/** A node's status: a built-in one, coloured by the theme, or any word of the app's, styled by `[data-status]`. */\nexport type DagViewStatus =\n | \"idle\"\n | \"pending\"\n | \"running\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"skipped\"\n | (string & {});\n\nexport interface DagViewNode<T = unknown> {\n /** Unique among the nodes; edges name nodes by it. */\n id: string;\n /** What the default node shows, and its accessible name; the id unless given. */\n label?: JSX.Element;\n /** Colours the node's accent from the theme. */\n status?: DagViewStatus | undefined;\n /** The node's accent colour, over its status colour: any CSS colour. */\n accent?: string | undefined;\n /** The node's width in pixels; `nodeWidth` unless given. */\n width?: number | undefined;\n /** The node's height in pixels; `nodeHeight` unless given. */\n height?: number | undefined;\n /** Anything of the app's, handed back to `renderNode` and `onNodeClick`. */\n data?: T;\n /** Shown, focusable, but not selectable. */\n disabled?: boolean | undefined;\n}\n\nexport interface DagViewEdge {\n /** `source->target` unless given. */\n id?: string | undefined;\n /** The id of the node the edge starts from: the one depended on. */\n source: string;\n /** The id of the node the edge points to: the one that depends on `source`. */\n target: string;\n}\n\n/** A node's state for `renderNode`. Its fields are reactive: read them in JSX or an effect. */\nexport interface DagViewNodeState {\n readonly selected: boolean;\n /** Next to the selected node: \"upstream\" feeds it, \"downstream\" depends on it. */\n readonly related: \"upstream\" | \"downstream\" | null;\n /** Set apart from the selected node and its neighbours, with `dimUnrelated`. */\n readonly dimmed: boolean;\n /** Has keyboard focus. */\n readonly focused: boolean;\n}\n\n/** Where the graph is: moved by x, y (pixels) and scaled by zoom. */\nexport type DagViewViewport = Viewport;\n\n/** Moves the view from outside; handed over by `apiRef` once the graph is in the page. */\nexport interface DagViewApi {\n /** Fits the whole graph in view. */\n fitView(): void;\n /** Zooms to `zoom` around the middle of the view. */\n zoomTo(zoom: number): void;\n /** Zooms by `factor` around the middle of the view. */\n zoomBy(factor: number): void;\n /** Moves the node with this id to the middle of the view. */\n centerNode(id: string): void;\n}\n\n/** Texts for assistive technology and the zoom buttons, English by default. */\nexport interface DagViewLabels {\n /** What the graph is called as a widget: \"dependency graph\". */\n roleDescription: string;\n /** \"Status\", before a node's status word. */\n status: string;\n /** \"Depends on\", before the names of the nodes a node's edges come from. */\n dependsOn: string;\n /** \"Required by\", before the names of the nodes a node's edges go to. */\n requiredBy: string;\n /** Status words, shown on the default nodes and read out: { running: \"Running\", … }. */\n statuses: Record<string, string>;\n zoomIn: string;\n zoomOut: string;\n fitView: string;\n /** The name of the group of zoom buttons. */\n controls: string;\n}\n\nexport interface DagViewProps<T = unknown> extends Omit<JSX.HTMLAttributes<HTMLDivElement>, \"onClick\"> {\n /** What the graph shows: its accessible name. */\n label: string;\n /** The graph in words, for screen readers; it is there on the server too. */\n summary?: string | undefined;\n /** The nodes. A change of status, label or data alone does not lay the graph out again. */\n nodes: readonly DagViewNode<T>[];\n /** The edges, from the node depended on to the node that depends on it. */\n edges: readonly DagViewEdge[];\n /**\n * Draws a node's content inside its box; the default shows a status dot,\n * the label and the status word. Called once per node: `node` and `state`\n * are reactive, so read their fields in JSX. Keep the content\n * non-interactive where you can: a node is an ARIA option, whose content\n * assistive technology may read as plain text, and a click in it also\n * selects the node. Links and buttons in it are left out of the Tab order\n * except in the node that is the graph's Tab stop.\n */\n renderNode?: ((node: DagViewNode<T>, state: DagViewNodeState) => JSX.Element) | undefined;\n /** Which way the layers run: \"LR\" (left to right, default) or \"TB\" (top to bottom). */\n direction?: DagDirection | undefined;\n /** A node's width in pixels, unless the node sets its own; 180 by default. */\n nodeWidth?: number | undefined;\n /** A node's height in pixels, unless the node sets its own; 56 by default. */\n nodeHeight?: number | undefined;\n /** The space between layers in pixels; 64 by default. */\n rankGap?: number | undefined;\n /** The space between nodes in a layer in pixels; 24 by default. */\n nodeGap?: number | undefined;\n /** Lays the graph out in place of the built-in layout, e.g. with dagre or elk. It must be synchronous. */\n layout?: ((input: DagLayoutInput) => DagLayoutResult) | undefined;\n /** The selected node's id (controlled); null selects nothing. */\n selectedId?: string | null | undefined;\n /** The node selected at first (uncontrolled). */\n defaultSelectedId?: string | null | undefined;\n /** A node was selected (its id) or the selection was cleared (null). */\n onSelectedChange?: ((id: string | null) => void) | undefined;\n /** A node was clicked, or chosen with Enter or Space. Not called for a disabled node. */\n onNodeClick?: ((node: DagViewNode<T>, event: MouseEvent | KeyboardEvent) => void) | undefined;\n /** Fades the nodes and edges that are not next to the selected node. */\n dimUnrelated?: boolean | undefined;\n /** Where the graph is (controlled). */\n viewport?: DagViewViewport | undefined;\n /** Where the graph is at first (uncontrolled); with `fit={false}` the page does not move after it loads. */\n defaultViewport?: DagViewViewport | undefined;\n /** The view moved or zoomed: at most once per frame during a gesture. */\n onViewportChange?: ((viewport: DagViewViewport) => void) | undefined;\n /** Fits the graph in view once it is in the page, and again when its nodes or edges change; true by default. */\n fit?: boolean | undefined;\n /** The smallest zoom; 0.1 by default. */\n minZoom?: number | undefined;\n /** The largest zoom; 2 by default. */\n maxZoom?: number | undefined;\n /** What a plain mouse wheel does: \"zoom\" (default), \"pan\", or \"none\" (the page scrolls). Ctrl+wheel and a trackpad pinch always zoom. */\n wheel?: \"zoom\" | \"pan\" | \"none\" | undefined;\n /** Shows the zoom in, zoom out and fit buttons; true by default. */\n controls?: boolean | undefined;\n /** Texts for assistive technology and the buttons, over the English defaults. */\n labels?: Partial<DagViewLabels> | undefined;\n /**\n * The graph's height: a number of pixels or any CSS length; 480 by default,\n * from the stylesheet, so a height in `style` works too. It fills the width.\n */\n height?: number | string | undefined;\n /** Gets the functions that move the view from outside. */\n apiRef?: ((api: DagViewApi) => void) | undefined;\n /** Test id of the root `<div>`; `dag-view` unless given. */\n \"data-testid\"?: string | undefined;\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Room around the graph inside its world, in pixels. */\nconst PADDING = 24;\n\nconst DEFAULT_LABELS: DagViewLabels = {\n roleDescription: \"dependency graph\",\n status: \"Status\",\n dependsOn: \"Depends on\",\n requiredBy: \"Required by\",\n statuses: {\n idle: \"Idle\",\n pending: \"Pending\",\n running: \"Running\",\n success: \"Success\",\n warning: \"Warning\",\n error: \"Error\",\n skipped: \"Skipped\",\n },\n zoomIn: \"Zoom in\",\n zoomOut: \"Zoom out\",\n fitView: \"Fit to view\",\n controls: \"Zoom\",\n};\n\nconst NODE_KEYS = [\"label\", \"status\", \"accent\", \"width\", \"height\", \"data\", \"disabled\"] as const;\n\n/** What can take focus inside a node's own content. */\nconst INNER_FOCUSABLE =\n 'a[href], button, input, select, textarea, iframe, summary, audio[controls], video[controls], [tabindex], [contenteditable]:not([contenteditable=\"false\"])';\n\nconst cssLength = (value: number | string): string => (typeof value === \"number\" ? `${value}px` : value);\n\nconst sameList = (a: readonly string[], b: readonly string[]): boolean =>\n a.length === b.length && a.every((value, i) => value === b[i]);\n\n/** A node's name in words, for descriptions: its label when that is text, else its id. */\nconst nameOf = (node: DagViewNode<unknown> | undefined, id: string): string => {\n const label = node?.label;\n return typeof label === \"string\" || typeof label === \"number\" ? String(label) : id;\n};\n\nconst warn = DEV ? (message: string): void => console.warn(`[smwb] DagView: ${message}`) : undefined;\n\n/**\n * A directed graph of dependencies: nodes in layers, left to right or top to\n * bottom, joined by arrows. A node is selected by a click or the keyboard, and\n * the edges into and out of it light up; the view pans and zooms with a mouse,\n * a trackpad, touch or the keyboard.\n */\nexport function DagView<T = unknown>(props: DagViewProps<T>): JSX.Element {\n const merged = mergeProps(\n {\n direction: \"LR\" as DagDirection,\n nodeWidth: 180,\n nodeHeight: 56,\n rankGap: 64,\n nodeGap: 24,\n fit: true,\n minZoom: 0.1,\n maxZoom: 2,\n wheel: \"zoom\" as \"zoom\" | \"pan\" | \"none\",\n controls: true,\n },\n props\n );\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"style\",\n \"label\",\n \"summary\",\n \"nodes\",\n \"edges\",\n \"renderNode\",\n \"direction\",\n \"nodeWidth\",\n \"nodeHeight\",\n \"rankGap\",\n \"nodeGap\",\n \"layout\",\n \"selectedId\",\n \"defaultSelectedId\",\n \"onSelectedChange\",\n \"onNodeClick\",\n \"dimUnrelated\",\n \"viewport\",\n \"defaultViewport\",\n \"onViewportChange\",\n \"fit\",\n \"minZoom\",\n \"maxZoom\",\n \"wheel\",\n \"controls\",\n \"labels\",\n \"height\",\n \"apiRef\",\n \"ref\",\n \"data-testid\",\n ]);\n\n const uid = createUniqueId();\n const arrowId = `${uid}-arrow`;\n const activeArrowId = `${uid}-arrow-active`;\n const summaryId = `${uid}-summary`;\n let root!: HTMLDivElement;\n const elements = new Map<string, HTMLElement>();\n\n const labels = createMemo(\n (): DagViewLabels => ({\n ...DEFAULT_LABELS,\n ...local.labels,\n statuses: { ...DEFAULT_LABELS.statuses, ...local.labels?.statuses },\n })\n );\n const statusWord = (status: string): string => labels().statuses[status] ?? status;\n\n // ---- Nodes and layout ----\n\n const byId = createMemo(() => {\n const map = new Map<string, DagViewNode<T>>();\n for (const node of local.nodes) if (!map.has(node.id)) map.set(node.id, node);\n return map;\n });\n // Nodes are drawn by id, so content stays mounted when the app replaces a\n // node object to change its status.\n const ids = createMemo(() => [...byId().keys()], [], { equals: sameList });\n\n // The layout depends only on the graph's shape; a status change leaves it be.\n const structure = createMemo(\n () => {\n const nodes = [...byId().values()].map((node) => ({\n id: node.id,\n width: node.width ?? local.nodeWidth,\n height: node.height ?? local.nodeHeight,\n }));\n const edges = local.edges.map((edge) => ({ id: edge.id, source: edge.source, target: edge.target }));\n const input: DagLayoutInput = {\n nodes,\n edges,\n direction: local.direction,\n rankGap: local.rankGap,\n nodeGap: local.nodeGap,\n warn,\n };\n const key = JSON.stringify([\n local.direction,\n local.rankGap,\n local.nodeGap,\n nodes.map((n) => [n.id, n.width, n.height]),\n edges.map((e) => [e.id ?? null, e.source, e.target]),\n ]);\n return { key, input };\n },\n undefined,\n { equals: (a, b) => a.key === b.key }\n );\n const layout = createMemo(() => (local.layout ?? dagLayout)(structure().input));\n\n // The flow of a layer runs along x in LR and along y in TB; across it is the other one.\n const across = (node: DagLayoutNode): number => (local.direction === \"TB\" ? node.x : node.y);\n\n const graph = createMemo(() => {\n const result = layout();\n const incoming = new Map<string, DagLayoutEdge[]>();\n const outgoing = new Map<string, DagLayoutEdge[]>();\n for (const edge of result.edges) {\n if (!incoming.has(edge.target)) incoming.set(edge.target, []);\n if (!outgoing.has(edge.source)) outgoing.set(edge.source, []);\n incoming.get(edge.target)!.push(edge);\n outgoing.get(edge.source)!.push(edge);\n }\n const ordered = [...result.nodes.values()].sort((a, b) => a.layer - b.layer || across(a) - across(b));\n const layers = new Map<number, DagLayoutNode[]>();\n for (const node of ordered) {\n if (!layers.has(node.layer)) layers.set(node.layer, []);\n layers.get(node.layer)!.push(node);\n }\n return { incoming, outgoing, ordered, layers };\n });\n\n // ---- Selection ----\n\n const [selected, setSelected] = createControllableState<string | null>({\n value: () => local.selectedId,\n defaultValue: untrack(() => local.defaultSelectedId) ?? null,\n onChange: (id) => local.onSelectedChange?.(id),\n });\n const isSelected = createSelector(selected);\n\n const relations = createMemo(() => {\n const id = selected();\n const edges = new Map<string, \"upstream\" | \"downstream\">();\n const nodes = new Map<string, \"upstream\" | \"downstream\">();\n if (id === null || !layout().nodes.has(id)) return { active: false, edges, nodes };\n const { incoming, outgoing } = graph();\n for (const edge of incoming.get(id) ?? []) {\n edges.set(edge.id, \"upstream\");\n nodes.set(edge.source, \"upstream\");\n }\n for (const edge of outgoing.get(id) ?? []) {\n edges.set(edge.id, \"downstream\");\n nodes.set(edge.target, \"downstream\");\n }\n return { active: true, edges, nodes };\n });\n\n // ---- Focus: one tab stop, on the last focused node, else the selected one, else the first ----\n\n const [active, setActive] = createSignal<string | null>(null);\n const [focused, setFocused] = createSignal<string | null>(null);\n const tabStop = createMemo(() => {\n const nodes = layout().nodes;\n const last = active();\n if (last !== null && nodes.has(last)) return last;\n const chosen = selected();\n if (chosen !== null && nodes.has(chosen)) return chosen;\n return graph().ordered[0]?.id ?? null;\n });\n\n // ---- Viewport ----\n\n const [viewport, setViewport] = createControllableState<Viewport>({\n value: () => local.viewport,\n defaultValue: untrack(() => local.defaultViewport) ?? { x: 0, y: 0, zoom: 1 },\n onChange: (next) => local.onViewportChange?.(next),\n });\n const [interacting, setInteracting] = createSignal(false);\n const far = createMemo(() => viewport().zoom < 0.45);\n\n const size = (): { width: number; height: number } => ({\n width: root?.clientWidth ?? 0,\n height: root?.clientHeight ?? 0,\n });\n const hasSize = (): boolean => {\n const { width, height } = size();\n return width > 0 && height > 0;\n };\n const worldSize = (): { width: number; height: number } => ({\n width: layout().width + PADDING * 2,\n height: layout().height + PADDING * 2,\n });\n const nodeRect = (id: string): { x: number; y: number; width: number; height: number } | undefined => {\n const box = layout().nodes.get(id);\n return box && { x: box.x + PADDING, y: box.y + PADDING, width: box.width, height: box.height };\n };\n\n const api: DagViewApi = {\n fitView() {\n if (!hasSize()) return;\n const world = worldSize();\n setViewport(\n fitBounds(\n { x: 0, y: 0, ...world },\n size(),\n 0,\n local.minZoom,\n Math.max(local.minZoom, Math.min(1, local.maxZoom))\n )\n );\n },\n zoomTo(zoom) {\n api.zoomBy(zoom / viewport().zoom);\n },\n zoomBy(factor) {\n const { width, height } = size();\n setViewport(zoomAt(viewport(), { x: width / 2, y: height / 2 }, factor, local.minZoom, local.maxZoom));\n },\n centerNode(id) {\n const rect = nodeRect(id);\n if (!rect) return;\n setViewport(centerOn(viewport(), { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 }, size()));\n },\n };\n\n const ensureVisible = (id: string): void => {\n const rect = nodeRect(id);\n if (rect && hasSize() && !isVisible(viewport(), rect, size(), 8)) api.centerNode(id);\n };\n\n // Fit once the graph has a size, and again when its shape changes. At zero\n // size (a hidden tab) the fit waits for the first resize that gives one.\n let fitPending = false;\n const tryFit = (): void => {\n if (!fitPending || !hasSize()) return;\n fitPending = false;\n api.fitView();\n };\n createEffect(\n on(\n layout,\n () => {\n if (!untrack(() => local.fit)) return;\n fitPending = true;\n tryFit();\n },\n { defer: true }\n )\n );\n\n onMount(() => {\n const dispose = createPanZoom(root, {\n viewport,\n write: setViewport,\n minZoom: () => local.minZoom,\n maxZoom: () => local.maxZoom,\n wheel: () => local.wheel,\n onInteracting: setInteracting,\n });\n let frame = 0;\n const resizeObserver =\n typeof ResizeObserver === \"function\"\n ? new ResizeObserver(() => {\n cancelAnimationFrame(frame);\n frame = requestAnimationFrame(tryFit);\n })\n : undefined;\n resizeObserver?.observe(root);\n onCleanup(() => {\n dispose();\n resizeObserver?.disconnect();\n cancelAnimationFrame(frame);\n });\n fitPending = local.fit;\n tryFit();\n local.apiRef?.(api);\n });\n\n // ---- Interaction ----\n\n const choose = (id: string, event: MouseEvent | KeyboardEvent): void => {\n const node = byId().get(id);\n if (!node || node.disabled) return;\n setSelected(id);\n local.onNodeClick?.(node, event);\n };\n\n const focusNode = (id: string | undefined): void => {\n if (id === undefined) return;\n setActive(id);\n elements.get(id)?.focus({ preventScroll: true });\n ensureVisible(id);\n };\n\n // A node that goes away takes its selection with it, and focus moves to the\n // Tab stop rather than dropping to the page. Only a node that was there\n // counts: a selection given before its node loads is kept.\n createEffect<readonly string[] | undefined>((before) => {\n const now = ids();\n if (before) {\n untrack(() => {\n const present = new Set(now);\n const chosen = selected();\n if (chosen !== null && !present.has(chosen) && before.includes(chosen)) setSelected(null);\n const had = focused();\n if (had === null || present.has(had)) return;\n setFocused(null);\n const doc = root?.ownerDocument;\n const stop = tabStop();\n if (doc && (doc.activeElement === null || doc.activeElement === doc.body) && stop !== null)\n elements.get(stop)?.focus({ preventScroll: true });\n });\n }\n return now;\n });\n\n // One Tab stop: focusables in `renderNode` content (a link, a button) are\n // taken out of the Tab order, except in the node that is the Tab stop. Their\n // own tabindex comes back when their node becomes it.\n const ownTabIndex = new WeakMap<Element, string | null>();\n // The value the component wrote last, so its own writes can be told apart\n // from the caller's in the attribute records below.\n const writtenTabIndex = new WeakMap<Element, string | null>();\n const syncInnerTabStops = (): void => {\n const stop = untrack(tabStop);\n for (const [id, el] of elements) {\n for (const inner of el.querySelectorAll(INNER_FOCUSABLE)) {\n if (!ownTabIndex.has(inner)) ownTabIndex.set(inner, inner.getAttribute(\"tabindex\"));\n const own = ownTabIndex.get(inner) ?? null;\n const next = id === stop ? own : \"-1\";\n if (inner.getAttribute(\"tabindex\") === next) continue;\n if (next === null) inner.removeAttribute(\"tabindex\");\n else inner.setAttribute(\"tabindex\", next);\n writtenTabIndex.set(inner, next);\n }\n }\n };\n onMount(() => {\n if (!local.renderNode) return;\n createEffect(on(tabStop, syncInnerTabStops));\n if (typeof MutationObserver !== \"function\") return;\n // Content that changes later (a link that shows up with a status) is caught\n // too, and so is a tabindex the caller writes from a signal: that write is\n // taken as the content's own value, then the Tab order is restored over it.\n const observer = new MutationObserver((records) => {\n let sync = false;\n for (const record of records) {\n if (record.type !== \"attributes\") {\n sync = true;\n continue;\n }\n const target = record.target as Element;\n // A node's own roving tabindex is the component's, not its content's.\n if (target.classList.contains(\"smwb-dag-view__node\")) continue;\n const now = target.getAttribute(\"tabindex\");\n if (writtenTabIndex.has(target) && writtenTabIndex.get(target) === now) continue;\n ownTabIndex.set(target, now);\n sync = true;\n }\n if (sync) syncInnerTabStops();\n });\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: [\"tabindex\"],\n });\n onCleanup(() => observer.disconnect());\n });\n\n /** The node an arrow key leads to from `id`: along the edges, or to a neighbour in the layer. */\n const neighbour = (id: string, key: string): string | undefined => {\n const tb = local.direction === \"TB\";\n const forward = tb ? \"ArrowDown\" : \"ArrowRight\";\n const back = tb ? \"ArrowUp\" : \"ArrowLeft\";\n const before = tb ? \"ArrowLeft\" : \"ArrowUp\";\n const after = tb ? \"ArrowRight\" : \"ArrowDown\";\n const nodes = layout().nodes;\n const first = (list: string[]): string | undefined =>\n list\n .map((other) => nodes.get(other))\n .filter((node): node is DagLayoutNode => node !== undefined)\n .sort((a, b) => across(a) - across(b))[0]?.id;\n if (key === forward) return first((graph().outgoing.get(id) ?? []).map((e) => e.target));\n if (key === back) return first((graph().incoming.get(id) ?? []).map((e) => e.source));\n const self = nodes.get(id);\n if (!self) return undefined;\n const layer = graph().layers.get(self.layer) ?? [];\n const index = layer.findIndex((node) => node.id === id);\n if (key === before) return layer[index - 1]?.id;\n if (key === after) return layer[index + 1]?.id;\n return undefined;\n };\n\n const onKeyDown = (event: KeyboardEvent): void => {\n const target = event.target as HTMLElement;\n const id = target.dataset?.[\"dagId\"];\n // Keys pressed in a node's own content (a link, a field) are its own.\n if (id === undefined || !target.classList.contains(\"smwb-dag-view__node\")) return;\n // Ctrl, Cmd and Alt shortcuts are the browser's: page zoom, history, tabs.\n if (event.ctrlKey || event.metaKey || event.altKey) return;\n const key = event.key;\n if (key.startsWith(\"Arrow\") && event.shiftKey) {\n const step = 48;\n const v = viewport();\n const dx = key === \"ArrowLeft\" ? step : key === \"ArrowRight\" ? -step : 0;\n const dy = key === \"ArrowUp\" ? step : key === \"ArrowDown\" ? -step : 0;\n setViewport({ x: v.x + dx, y: v.y + dy, zoom: v.zoom });\n event.preventDefault();\n return;\n }\n if (key.startsWith(\"Arrow\")) {\n event.preventDefault();\n focusNode(neighbour(id, key));\n return;\n }\n switch (key) {\n case \"Home\":\n event.preventDefault();\n focusNode(graph().ordered[0]?.id);\n return;\n case \"End\":\n event.preventDefault();\n focusNode(graph().ordered[graph().ordered.length - 1]?.id);\n return;\n case \"Enter\":\n case \" \":\n event.preventDefault();\n choose(id, event);\n return;\n case \"Escape\":\n // Handled only when there was a selection, so an enclosing dialog still gets it otherwise.\n if (selected() === null) return;\n event.preventDefault();\n setSelected(null);\n return;\n case \"+\":\n case \"=\":\n event.preventDefault();\n api.zoomBy(1.25);\n return;\n case \"-\":\n case \"_\":\n event.preventDefault();\n api.zoomBy(0.8);\n return;\n case \"0\":\n event.preventDefault();\n api.fitView();\n return;\n }\n };\n\n const defaultRender = (node: DagViewNode<T>): JSX.Element => (\n <>\n <span class=\"smwb-dag-view__dot\" aria-hidden=\"true\" />\n <span class=\"smwb-dag-view__label\">{node.label ?? node.id}</span>\n <Show when={node.status}>{(status) => <span class=\"smwb-dag-view__status\">{statusWord(status())}</span>}</Show>\n </>\n );\n\n const description = (id: string): string => {\n const node = byId().get(id);\n const parts: string[] = [];\n if (node?.status) parts.push(`${labels().status}: ${statusWord(node.status)}.`);\n const names = (list: string[]): string => list.map((other) => nameOf(byId().get(other), other)).join(\", \");\n const from = (graph().incoming.get(id) ?? []).map((e) => e.source);\n const to = (graph().outgoing.get(id) ?? []).map((e) => e.target);\n if (from.length) parts.push(`${labels().dependsOn}: ${names(from)}.`);\n if (to.length) parts.push(`${labels().requiredBy}: ${names(to)}.`);\n return parts.join(\" \");\n };\n\n const renderNodeFor = (id: string, index: () => number): JSX.Element => {\n const node = (): DagViewNode<T> | undefined => byId().get(id);\n // The node as `renderNode` sees it: its fields read the app's latest object.\n const view = { id } as DagViewNode<T>;\n for (const key of NODE_KEYS) Object.defineProperty(view, key, { enumerable: true, get: () => node()?.[key] });\n const state: DagViewNodeState = {\n get selected() {\n return isSelected(id);\n },\n get related() {\n return relations().nodes.get(id) ?? null;\n },\n get dimmed() {\n const r = relations();\n return Boolean(local.dimUnrelated) && r.active && !isSelected(id) && !r.nodes.has(id);\n },\n get focused() {\n return focused() === id;\n },\n };\n const descriptionId = (): string => `${uid}-node-${index()}`;\n const style = (): JSX.CSSProperties => {\n const box = layout().nodes.get(id);\n const css: JSX.CSSProperties = box\n ? {\n left: `${box.x + PADDING}px`,\n top: `${box.y + PADDING}px`,\n width: `${box.width}px`,\n height: `${box.height}px`,\n }\n : { display: \"none\" };\n const accent = node()?.accent;\n if (accent) css[\"--smwb-dag-view-node-accent\"] = accent;\n return css;\n };\n const onFocus = (event: FocusEvent): void => {\n if (event.target !== event.currentTarget) return;\n setActive(id);\n setFocused(id);\n let keyboard = true;\n try {\n keyboard = (event.currentTarget as HTMLElement).matches(\":focus-visible\");\n } catch {\n // An engine without :focus-visible: treat it as the keyboard.\n }\n if (keyboard) ensureVisible(id);\n };\n const onBlur = (event: FocusEvent): void => {\n if (event.target !== event.currentTarget || focused() !== id) return;\n // A browser blurs a node while it is being removed, before the removal\n // effect below runs. Clearing `focused` there would leave the effect\n // nothing to move on, and focus would fall to the page.\n if (!ids().includes(id)) return;\n setFocused(null);\n };\n const content = untrack(() => (local.renderNode ?? defaultRender)(view, state));\n return (\n <div\n role=\"option\"\n data-dag-id={id}\n ref={(el) => {\n elements.set(id, el);\n onCleanup(() => elements.get(id) === el && elements.delete(id));\n }}\n class={cn(\"smwb-dag-view__node\", {\n \"smwb-dag-view__node--selected\": state.selected,\n \"smwb-dag-view__node--upstream\": state.related === \"upstream\",\n \"smwb-dag-view__node--downstream\": state.related === \"downstream\",\n \"smwb-dag-view__node--dimmed\": state.dimmed,\n \"smwb-dag-view__node--disabled\": Boolean(node()?.disabled),\n })}\n data-status={node()?.status}\n aria-selected={state.selected ? \"true\" : \"false\"}\n aria-disabled={node()?.disabled ? \"true\" : undefined}\n aria-describedby={description(id) ? descriptionId() : undefined}\n tabIndex={tabStop() === id ? 0 : -1}\n style={style()}\n onClick={(event) => choose(id, event)}\n onFocus={onFocus}\n onBlur={onBlur}\n >\n {content}\n <span id={descriptionId()} hidden>\n {description(id)}\n </span>\n </div>\n );\n };\n\n const edgeClass = (edge: DagLayoutEdge): string => {\n const r = relations();\n const relation = r.edges.get(edge.id);\n return cn(\"smwb-dag-view__edge\", {\n \"smwb-dag-view__edge--active\": relation !== undefined,\n \"smwb-dag-view__edge--upstream\": relation === \"upstream\",\n \"smwb-dag-view__edge--downstream\": relation === \"downstream\",\n \"smwb-dag-view__edge--dimmed\": Boolean(local.dimUnrelated) && r.active && relation === undefined,\n \"smwb-dag-view__edge--reversed\": edge.reversed,\n });\n };\n\n // The default height is the stylesheet's, so a height in the caller's style is not overridden.\n const rootStyle = (): JSX.CSSProperties | string | undefined =>\n mergeStyle(local.style, { height: local.height === undefined ? undefined : cssLength(local.height) });\n\n return (\n <div\n data-testid={local[\"data-testid\"] ?? \"dag-view\"}\n {...rest}\n ref={mergeRefs(local.ref, (el) => (root = el))}\n class={cn(\"smwb-dag-view\", local.class)}\n // Only when there is one: the server would print an empty style=\"\".\n {...(rootStyle() === undefined ? {} : { style: rootStyle() })}\n data-direction={local.direction}\n data-zoom={far() ? \"far\" : undefined}\n data-interacting={interacting() ? \"\" : undefined}\n >\n <div\n class=\"smwb-dag-view__world\"\n role=\"listbox\"\n aria-label={local.label}\n aria-roledescription={labels().roleDescription}\n aria-describedby={local.summary ? summaryId : undefined}\n style={{\n width: `${worldSize().width}px`,\n height: `${worldSize().height}px`,\n transform: viewportTransform(viewport()),\n }}\n onKeyDown={onKeyDown}\n >\n <svg class=\"smwb-dag-view__edges\" width={worldSize().width} height={worldSize().height} aria-hidden=\"true\">\n <defs>\n <marker\n id={arrowId}\n viewBox=\"0 0 10 10\"\n refX=\"9\"\n refY=\"5\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n markerUnits=\"userSpaceOnUse\"\n orient=\"auto-start-reverse\"\n >\n <path class=\"smwb-dag-view__arrow\" d=\"M0,1 L9,5 L0,9 z\" />\n </marker>\n <marker\n id={activeArrowId}\n viewBox=\"0 0 10 10\"\n refX=\"9\"\n refY=\"5\"\n markerWidth=\"10\"\n markerHeight=\"10\"\n markerUnits=\"userSpaceOnUse\"\n orient=\"auto-start-reverse\"\n >\n <path class=\"smwb-dag-view__arrow smwb-dag-view__arrow--active\" d=\"M0,1 L9,5 L0,9 z\" />\n </marker>\n </defs>\n <g transform={`translate(${PADDING} ${PADDING})`}>\n <For each={layout().edges}>\n {(edge) => (\n <path\n class={edgeClass(edge)}\n data-source={edge.source}\n data-target={edge.target}\n d={dagEdgePath(edge.points, local.direction)}\n marker-end={`url(#${relations().edges.has(edge.id) ? activeArrowId : arrowId})`}\n />\n )}\n </For>\n </g>\n </svg>\n <For each={ids()}>{(id, index) => renderNodeFor(id, index)}</For>\n </div>\n <Show when={local.summary}>\n <p id={summaryId} class=\"smwb-dag-view__summary\">\n {local.summary}\n </p>\n </Show>\n <Show when={local.controls}>\n <div class=\"smwb-dag-view__controls\" role=\"group\" aria-label={labels().controls}>\n <button type=\"button\" class=\"smwb-dag-view__control\" title={labels().zoomIn} onClick={() => api.zoomBy(1.25)}>\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n </button>\n <button type=\"button\" class=\"smwb-dag-view__control\" title={labels().zoomOut} onClick={() => api.zoomBy(0.8)}>\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M5 12h14\" />\n </svg>\n </button>\n <button type=\"button\" class=\"smwb-dag-view__control\" title={labels().fitView} onClick={() => api.fitView()}>\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5\" />\n </svg>\n </button>\n </div>\n </Show>\n </div>\n );\n}\n\nexport default DagView;\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,QAAQ;AACf,SAAS,+BAA+B;AACxC,SAAS,iBAA2B;AACpC,SAAS,kBAAkB;AAC3B;AAAA,EAME;AAAA,EACA;AAAA,OACK;AACP,SAAwB,UAAU,eAAe,WAAW,WAAW,mBAAmB,cAAc;AA8JxG,MAAM,UAAU;AAEhB,MAAM,iBAAgC;AAAA,EACpC,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,IACP,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,UAAU;AACZ;AAEA,MAAM,YAAY,CAAC,SAAS,UAAU,UAAU,SAAS,UAAU,QAAQ,UAAU;AAGrF,MAAM,kBACJ;AAEF,MAAM,YAAY,CAAC,UAAoC,OAAO,UAAU,WAAW,GAAG,KAAK,OAAO;AAElG,MAAM,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,EAAE,SAAS,SAAS,MAAM,IAAI,OAAO,GAAG,GAAG;AAAA,YAC5G,CAAC,IAAI,QAAQ,YAAY,YAAY,OAAO;AAAA,cAC1C,CAAC,KAAK,EAAE,WAAW,EAAE;AAAA,YACvB,EAFC,IAEK;AAAA,UACR,EAJC,OAIQ;AAAA,UACT,CAAC,OAAO,KAAK,SAAS,MAAM,yBAAyB,OAAO,OAAO,EAAE,SAAS,SAAS,MAAM,IAAI,QAAQ,GAAG;AAAA,YAC1G,CAAC,IAAI,QAAQ,YAAY,YAAY,OAAO;AAAA,cAC1C,CAAC,KAAK,EAAE,yCAAyC,EAAE;AAAA,YACrD,EAFC,IAEK;AAAA,UACR,EAJC,OAIQ;AAAA,QACX,EAhBC,IAgBK;AAAA,MACR,EAlBC,KAkBM;AAAA,IACT,EA3FC;AA6FL;AAEA,IAAO,kBAAQ;","names":[],"file":"dagView.jsx"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Index, Show, mergeProps, splitProps } from "solid-js";
|
|
2
|
+
import cn from "clsx";
|
|
3
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
4
|
+
const DIFF_STAT_CELLS = 5;
|
|
5
|
+
const GROUP_SEPARATOR = "\u202F";
|
|
6
|
+
const DEFAULT_DIFF_STAT_FORMAT = (added, removed) => `added ${added}, removed ${removed}`;
|
|
7
|
+
function diffStatCount(value) {
|
|
8
|
+
return Number.isFinite(value) ? Math.max(0, Math.trunc(value)) : 0;
|
|
9
|
+
}
|
|
10
|
+
function groupDiffStatCount(value) {
|
|
11
|
+
return String(diffStatCount(value)).replace(/\B(?=(\d{3})+(?!\d))/g, GROUP_SEPARATOR);
|
|
12
|
+
}
|
|
13
|
+
function diffStatCells(added, removed) {
|
|
14
|
+
const up = diffStatCount(added);
|
|
15
|
+
const down = diffStatCount(removed);
|
|
16
|
+
const all = up + down;
|
|
17
|
+
const cellsOf = (count, cell) => Array.from({ length: count }, () => cell);
|
|
18
|
+
if (all === 0) return cellsOf(DIFF_STAT_CELLS, "neutral");
|
|
19
|
+
const upCells = Math.floor(DIFF_STAT_CELLS * up / all);
|
|
20
|
+
const downCells = Math.floor(DIFF_STAT_CELLS * down / all);
|
|
21
|
+
return [
|
|
22
|
+
...cellsOf(upCells, "added"),
|
|
23
|
+
...cellsOf(downCells, "removed"),
|
|
24
|
+
...cellsOf(DIFF_STAT_CELLS - upCells - downCells, "neutral")
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
function DiffStat(props) {
|
|
28
|
+
const merged = mergeProps({ format: DEFAULT_DIFF_STAT_FORMAT, group: groupDiffStatCount }, props);
|
|
29
|
+
const [local, rest] = splitProps(merged, [
|
|
30
|
+
"class",
|
|
31
|
+
"added",
|
|
32
|
+
"removed",
|
|
33
|
+
"bar",
|
|
34
|
+
"compact",
|
|
35
|
+
"format",
|
|
36
|
+
"group",
|
|
37
|
+
"aria-label",
|
|
38
|
+
"ref",
|
|
39
|
+
"data-testid"
|
|
40
|
+
]);
|
|
41
|
+
const upCount = () => diffStatCount(local.added);
|
|
42
|
+
const downCount = () => diffStatCount(local.removed);
|
|
43
|
+
const showBar = () => local.bar ?? !local.compact;
|
|
44
|
+
const label = () => local["aria-label"] ?? local.format(upCount(), downCount());
|
|
45
|
+
return <span
|
|
46
|
+
{...rest}
|
|
47
|
+
ref={mergeRefs(local.ref)}
|
|
48
|
+
role="img"
|
|
49
|
+
aria-label={label()}
|
|
50
|
+
data-testid={local["data-testid"] ?? "diff-stat"}
|
|
51
|
+
class={cn("smwb-diff-stat", { "smwb-diff-stat_compact": local.compact }, local.class)}
|
|
52
|
+
>
|
|
53
|
+
<span class="smwb-diff-stat__text" aria-hidden="true">
|
|
54
|
+
<span class="smwb-diff-stat__added">{`+${local.group(upCount())}`}</span>
|
|
55
|
+
<span class="smwb-diff-stat__removed">{`\u2212${local.group(downCount())}`}</span>
|
|
56
|
+
</span>
|
|
57
|
+
<Show when={showBar()}>
|
|
58
|
+
<span class="smwb-diff-stat__bar" aria-hidden="true">
|
|
59
|
+
<Index each={diffStatCells(upCount(), downCount())}>
|
|
60
|
+
{(cell) => <span class={cn("smwb-diff-stat__cell", `smwb-diff-stat__cell_${cell()}`)} />}
|
|
61
|
+
</Index>
|
|
62
|
+
</span>
|
|
63
|
+
</Show>
|
|
64
|
+
</span>;
|
|
65
|
+
}
|
|
66
|
+
var diffStat_default = DiffStat;
|
|
67
|
+
export {
|
|
68
|
+
DEFAULT_DIFF_STAT_FORMAT,
|
|
69
|
+
DIFF_STAT_CELLS,
|
|
70
|
+
DiffStat,
|
|
71
|
+
diffStat_default as default,
|
|
72
|
+
diffStatCells,
|
|
73
|
+
diffStatCount,
|
|
74
|
+
groupDiffStatCount
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=diffStat.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/components/dataDisplay/diffStat/diffStat.tsx"],"sourcesContent":["import { type JSX, Index, Show, mergeProps, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\n/** How many cells the bar has. */\nexport const DIFF_STAT_CELLS = 5;\n\n/** One cell of the bar: whose it is, or nobody's. */\nexport type DiffStatCell = \"added\" | \"removed\" | \"neutral\";\n\n/** The accessible name, built from the two counts as numbers (already normalised by `diffStatCount`). */\nexport type DiffStatFormat = (added: number, removed: number) => string;\n\n// A narrow no-break space: the grouping separator, so a figure cannot break across lines.\nconst GROUP_SEPARATOR = \"\\u202f\";\n\n/** \"added 12345, removed 3\" — the default accessible name; plain digits, so a speech engine reads one number. */\nexport const DEFAULT_DIFF_STAT_FORMAT: DiffStatFormat = (added, removed) => `added ${added}, removed ${removed}`;\n\n/**\n * A count as the component takes it: a whole number, never below 0. Fractions are cut off,\n * negative counts are 0, and so are NaN, `undefined` and ±Infinity (data that has not\n * arrived yet, or arrived broken). The figures, the accessible name and the bar all use this\n * one value, so they cannot disagree.\n */\nexport function diffStatCount(value: number): number {\n return Number.isFinite(value) ? Math.max(0, Math.trunc(value)) : 0;\n}\n\n/**\n * A count (as `diffStatCount` takes it) as digits, grouped by three with U+202F NARROW NO-BREAK SPACE (\"1\\u202f234\"), the\n * fraction dropped. The separator is fixed rather than taken from a locale on purpose: the\n * server and the browser would group the same figure differently and break hydration. Pass\n * `group` to an app that knows its reader's locale.\n */\nexport function groupDiffStatCount(value: number): string {\n return String(diffStatCount(value)).replace(/\\B(?=(\\d{3})+(?!\\d))/g, GROUP_SEPARATOR);\n}\n\n/**\n * Which cell belongs to which side (counts as `diffStatCount` takes them): each takes `floor(DIFF_STAT_CELLS * its share)`, so the\n * cells the two sides leave over are neutral and 0 of 0 leaves all of them neutral. A side\n * under a fifth of the change reaches no cell and shows in its figure only.\n */\nexport function diffStatCells(added: number, removed: number): DiffStatCell[] {\n const up = diffStatCount(added);\n const down = diffStatCount(removed);\n const all = up + down;\n const cellsOf = (count: number, cell: DiffStatCell): DiffStatCell[] => Array.from({ length: count }, () => cell);\n if (all === 0) return cellsOf(DIFF_STAT_CELLS, \"neutral\");\n\n const upCells = Math.floor((DIFF_STAT_CELLS * up) / all);\n const downCells = Math.floor((DIFF_STAT_CELLS * down) / all);\n return [\n ...cellsOf(upCells, \"added\"),\n ...cellsOf(downCells, \"removed\"),\n ...cellsOf(DIFF_STAT_CELLS - upCells - downCells, \"neutral\"),\n ];\n}\n\nexport interface DiffStatProps extends Omit<JSX.HTMLAttributes<HTMLSpanElement>, \"role\"> {\n /** Lines added; the figure behind \"+N\". NaN, `undefined`, Infinity and negatives count as 0. */\n added: number;\n /** Lines removed; the figure behind \"−M\". NaN, `undefined`, Infinity and negatives count as 0. */\n removed: number;\n /** The five cells beside the figures. Shown by default, hidden in `compact`; set it either way. */\n bar?: boolean | undefined;\n /** The tab variant: smaller figures, and no bar unless `bar` asks for one. */\n compact?: boolean | undefined;\n /** How the accessible name is made from the two counts, as numbers: `DEFAULT_DIFF_STAT_FORMAT` unless given. */\n format?: DiffStatFormat | undefined;\n /** How each figure is written (it gets the count as `diffStatCount` takes it): `groupDiffStatCount` — three digits per group — unless given. */\n group?: ((value: number) => string) | undefined;\n /** Test id of the root `<span>`; `diff-stat` unless given. */\n \"data-testid\"?: string | undefined;\n ref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * How big a change is: \"+N −M\" with the two figures' counts, and a five-cell bar of the\n * same proportions. One accessible name for the whole (\"added N, removed M\"), so the\n * digits are not read twice; the bar is the theme's success and error, shaded toward the\n * surface ink to stay readable as text.\n */\nexport function DiffStat(props: DiffStatProps): JSX.Element {\n const merged = mergeProps({ format: DEFAULT_DIFF_STAT_FORMAT, group: groupDiffStatCount }, props);\n const [local, rest] = splitProps(merged, [\n \"class\",\n \"added\",\n \"removed\",\n \"bar\",\n \"compact\",\n \"format\",\n \"group\",\n \"aria-label\",\n \"ref\",\n \"data-testid\",\n ]);\n\n const upCount = (): number => diffStatCount(local.added);\n const downCount = (): number => diffStatCount(local.removed);\n const showBar = (): boolean => local.bar ?? !local.compact;\n // An aria-label the caller gives wins over the one built from the figures.\n const label = (): string => local[\"aria-label\"] ?? local.format(upCount(), downCount());\n\n return (\n <span\n {...rest}\n ref={mergeRefs(local.ref)}\n role=\"img\"\n aria-label={label()}\n data-testid={local[\"data-testid\"] ?? \"diff-stat\"}\n class={cn(\"smwb-diff-stat\", { \"smwb-diff-stat_compact\": local.compact }, local.class)}\n >\n <span class=\"smwb-diff-stat__text\" aria-hidden=\"true\">\n <span class=\"smwb-diff-stat__added\">{`+${local.group(upCount())}`}</span>\n <span class=\"smwb-diff-stat__removed\">{`\\u2212${local.group(downCount())}`}</span>\n </span>\n <Show when={showBar()}>\n <span class=\"smwb-diff-stat__bar\" aria-hidden=\"true\">\n <Index each={diffStatCells(upCount(), downCount())}>\n {(cell) => <span class={cn(\"smwb-diff-stat__cell\", `smwb-diff-stat__cell_${cell()}`)} />}\n </Index>\n </span>\n </Show>\n </span>\n );\n}\n\nexport default DiffStat;\n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IFF_STAT_FORMAT,
|
|
7
|
+
DIFF_STAT_CELLS,
|
|
8
|
+
default as default2
|
|
9
|
+
} from "./diffStat";
|
|
10
|
+
export {
|
|
11
|
+
DEFAULT_DIFF_STAT_FORMAT,
|
|
12
|
+
DIFF_STAT_CELLS,
|
|
13
|
+
DiffStat,
|
|
14
|
+
default2 as default,
|
|
15
|
+
diffStatCells,
|
|
16
|
+
diffStatCount,
|
|
17
|
+
groupDiffStatCount
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/dataDisplay/diffStat/index.ts"],
|
|
4
|
+
"sourcesContent": ["export {\n DiffStat,\n diffStatCells,\n diffStatCount,\n groupDiffStatCount,\n DEFAULT_DIFF_STAT_FORMAT,\n DIFF_STAT_CELLS,\n default,\n} from \"./diffStat\";\nexport type { DiffStatProps, DiffStatCell, DiffStatFormat } from \"./diffStat\";\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAAA;AAAA,OACK;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/dataDisplay/kbd/index.ts"],
|
|
4
|
+
"sourcesContent": ["export { Kbd, default } from \"./kbd\";\nexport { detectKbdPlatform, kbdKeyLabel } from \"./kbdKeys\";\nexport type { KbdProps } from \"./kbd\";\nexport type { KbdPlatform, KbdKeyLabel } from \"./kbdKeys\";\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,KAAK,WAAAA,gBAAe;AAC7B,SAAS,mBAAmB,mBAAmB;",
|
|
6
|
+
"names": ["default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { For, Show, createSignal, onMount, splitProps } from "solid-js";
|
|
2
|
+
import cn from "clsx";
|
|
3
|
+
import { mergeRefs } from "../../../primitives/mergeRefs";
|
|
4
|
+
import { detectKbdPlatform, kbdKeyLabel } from "./kbdKeys";
|
|
5
|
+
function Kbd(props) {
|
|
6
|
+
const [local, rest] = splitProps(props, [
|
|
7
|
+
"class",
|
|
8
|
+
"keys",
|
|
9
|
+
"platform",
|
|
10
|
+
"separator",
|
|
11
|
+
"label",
|
|
12
|
+
"ref",
|
|
13
|
+
"data-testid"
|
|
14
|
+
]);
|
|
15
|
+
const [detected, setDetected] = createSignal("other");
|
|
16
|
+
onMount(() => setDetected(detectKbdPlatform()));
|
|
17
|
+
const platform = () => local.platform ?? detected();
|
|
18
|
+
const labels = () => local.keys.map((key) => kbdKeyLabel(key, platform()));
|
|
19
|
+
const between = () => local.separator ?? (platform() === "mac" ? "" : "+");
|
|
20
|
+
const spoken = () => local.label ?? labels().map((item) => item.name).join(platform() === "mac" ? " " : "+");
|
|
21
|
+
return <kbd
|
|
22
|
+
{...rest}
|
|
23
|
+
ref={mergeRefs(local.ref)}
|
|
24
|
+
data-testid={local["data-testid"] ?? "kbd"}
|
|
25
|
+
data-platform={platform()}
|
|
26
|
+
class={cn("smwb-kbd", local.class)}
|
|
27
|
+
>
|
|
28
|
+
<span class="smwb-kbd__text">{spoken()}</span>
|
|
29
|
+
<For each={labels()}>
|
|
30
|
+
{(item, index) => <>
|
|
31
|
+
<Show when={index() > 0 && between() !== ""}>
|
|
32
|
+
<span class="smwb-kbd__separator" aria-hidden="true">
|
|
33
|
+
{between()}
|
|
34
|
+
</span>
|
|
35
|
+
</Show>
|
|
36
|
+
<kbd class="smwb-kbd__key" aria-hidden="true">
|
|
37
|
+
{item.text}
|
|
38
|
+
</kbd>
|
|
39
|
+
</>}
|
|
40
|
+
</For>
|
|
41
|
+
</kbd>;
|
|
42
|
+
}
|
|
43
|
+
var kbd_default = Kbd;
|
|
44
|
+
export {
|
|
45
|
+
Kbd,
|
|
46
|
+
kbd_default as default
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=kbd.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/components/dataDisplay/kbd/kbd.tsx"],"sourcesContent":["import { type JSX, For, Show, createSignal, onMount, splitProps } from \"solid-js\";\nimport cn from \"clsx\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\nimport { detectKbdPlatform, kbdKeyLabel, type KbdPlatform } from \"./kbdKeys\";\n\nexport interface KbdProps extends Omit<JSX.HTMLAttributes<HTMLElement>, \"children\"> {\n /**\n * The keys of the shortcut in order, e.g. `[\"Mod\", \"K\"]` or `[\"Shift\", \"Enter\"]`. `Mod` is the\n * Command key on macOS and Ctrl elsewhere. On macOS, `Shift`, `Alt`/`Option`, `Ctrl`/`Control`,\n * `Meta`/`Cmd`/`Command`, `Enter`, `Escape`, `Tab`, `Backspace` and `Delete` are drawn as the\n * symbols of the Mac keyboard; elsewhere the same names are drawn as Ctrl, Alt, Shift, Meta, Enter,\n * Esc, Tab, Backspace and Del, whatever their case. `\" \"` and `Space` are the Space key, `+` and\n * `Plus` the plus key.\n * Arrow names (`ArrowUp` or `Up`, …) are arrows everywhere; any other key is drawn as given\n * (a single letter in upper case).\n */\n keys: string[];\n /**\n * The platform whose keys are drawn. Without it the browser's own is used: `other` on the\n * server and in the first client render (so that hydration matches), `mac` right after on a Mac.\n * Set it for a fixed look, in stories and in tests.\n */\n platform?: KbdPlatform | undefined;\n /**\n * Drawn between the key caps. By default `+` on `other` and nothing on `mac`, where the symbols\n * stand side by side; `\"\"` draws none. It is for the eye only; assistive technology reads `label`.\n */\n separator?: string | undefined;\n /**\n * What assistive technology reads instead of the key caps. By default the key names, joined\n * with `+` on `other` (\"Ctrl+K\") and with a space on `mac` (\"Command K\").\n */\n label?: string | undefined;\n /** Test id of the root `<kbd>`; `kbd` unless given. */\n \"data-testid\"?: string | undefined;\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * A keyboard shortcut as key caps, for a tooltip, a menu item or a command palette. The root and\n * every cap are `<kbd>`; assistive technology reads one text (\"Ctrl+K\", \"Command K\") and skips the caps.\n */\nexport function Kbd(props: KbdProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n \"class\",\n \"keys\",\n \"platform\",\n \"separator\",\n \"label\",\n \"ref\",\n \"data-testid\",\n ]);\n\n // `other` on the server and in the first client render, so that hydration matches.\n const [detected, setDetected] = createSignal<KbdPlatform>(\"other\");\n onMount(() => setDetected(detectKbdPlatform()));\n\n const platform = (): KbdPlatform => local.platform ?? detected();\n const labels = () => local.keys.map((key) => kbdKeyLabel(key, platform()));\n const between = (): string => local.separator ?? (platform() === \"mac\" ? \"\" : \"+\");\n const spoken = (): string =>\n local.label ??\n labels()\n .map((item) => item.name)\n .join(platform() === \"mac\" ? \" \" : \"+\");\n\n return (\n <kbd\n {...rest}\n ref={mergeRefs(local.ref)}\n data-testid={local[\"data-testid\"] ?? \"kbd\"}\n data-platform={platform()}\n class={cn(\"smwb-kbd\", local.class)}\n >\n <span class=\"smwb-kbd__text\">{spoken()}</span>\n <For each={labels()}>\n {(item, index) => (\n <>\n <Show when={index() > 0 && between() !== \"\"}>\n <span class=\"smwb-kbd__separator\" aria-hidden=\"true\">\n {between()}\n </span>\n </Show>\n <kbd class=\"smwb-kbd__key\" aria-hidden=\"true\">\n {item.text}\n </kbd>\n </>\n )}\n </For>\n </kbd>\n );\n}\n\nexport default Kbd;\n"],"mappings":"AAAA,SAAmB,KAAK,MAAM,cAAc,SAAS,kBAAkB;AACvE,OAAO,QAAQ;AACf,SAAS,iBAA2B;AACpC,SAAS,mBAAmB,mBAAqC;AAuC1D,SAAS,IAAI,OAA8B;AAChD,QAAM,CAAC,OAAO,IAAI,IAAI,WAAW,OAAO;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAA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191", "Up arrow"),
|
|
4
|
+
arrowup: arrow("\u2191", "Up arrow"),
|
|
5
|
+
down: arrow("\u2193", "Down arrow"),
|
|
6
|
+
arrowdown: arrow("\u2193", "Down arrow"),
|
|
7
|
+
left: arrow("\u2190", "Left arrow"),
|
|
8
|
+
arrowleft: arrow("\u2190", "Left arrow"),
|
|
9
|
+
right: arrow("\u2192", "Right arrow"),
|
|
10
|
+
arrowright: arrow("\u2192", "Right arrow"),
|
|
11
|
+
// `KeyboardEvent.key` is " " for the space bar, and a bare "+" would read "Ctrl++".
|
|
12
|
+
" ": { text: "Space", name: "Space" },
|
|
13
|
+
space: { text: "Space", name: "Space" },
|
|
14
|
+
spacebar: { text: "Space", name: "Space" },
|
|
15
|
+
"+": { text: "+", name: "Plus" },
|
|
16
|
+
plus: { text: "+", name: "Plus" }
|
|
17
|
+
};
|
|
18
|
+
const COMMAND = { text: "\u2318", name: "Command" };
|
|
19
|
+
const MAC = {
|
|
20
|
+
mod: COMMAND,
|
|
21
|
+
meta: COMMAND,
|
|
22
|
+
cmd: COMMAND,
|
|
23
|
+
command: COMMAND,
|
|
24
|
+
shift: { text: "\u21E7", name: "Shift" },
|
|
25
|
+
alt: { text: "\u2325", name: "Option" },
|
|
26
|
+
option: { text: "\u2325", name: "Option" },
|
|
27
|
+
ctrl: { text: "\u2303", name: "Control" },
|
|
28
|
+
control: { text: "\u2303", name: "Control" },
|
|
29
|
+
enter: { text: "\u21A9", name: "Return" },
|
|
30
|
+
return: { text: "\u21A9", name: "Return" },
|
|
31
|
+
escape: { text: "\u238B", name: "Escape" },
|
|
32
|
+
esc: { text: "\u238B", name: "Escape" },
|
|
33
|
+
tab: { text: "\u21E5", name: "Tab" },
|
|
34
|
+
backspace: { text: "\u232B", name: "Delete" },
|
|
35
|
+
delete: { text: "\u2326", name: "Forward delete" },
|
|
36
|
+
del: { text: "\u2326", name: "Forward delete" }
|
|
37
|
+
};
|
|
38
|
+
const META = { text: "Meta", name: "Meta" };
|
|
39
|
+
const named = (text, name = text) => ({ text, name });
|
|
40
|
+
const OTHER = {
|
|
41
|
+
mod: named("Ctrl"),
|
|
42
|
+
ctrl: named("Ctrl"),
|
|
43
|
+
control: named("Ctrl"),
|
|
44
|
+
alt: named("Alt"),
|
|
45
|
+
option: named("Alt"),
|
|
46
|
+
shift: named("Shift"),
|
|
47
|
+
meta: META,
|
|
48
|
+
cmd: META,
|
|
49
|
+
command: META,
|
|
50
|
+
enter: named("Enter"),
|
|
51
|
+
return: named("Enter"),
|
|
52
|
+
escape: named("Esc", "Escape"),
|
|
53
|
+
esc: named("Esc", "Escape"),
|
|
54
|
+
tab: named("Tab"),
|
|
55
|
+
backspace: named("Backspace"),
|
|
56
|
+
delete: named("Del", "Delete"),
|
|
57
|
+
del: named("Del", "Delete")
|
|
58
|
+
};
|
|
59
|
+
function detectKbdPlatform() {
|
|
60
|
+
if (typeof navigator === "undefined") {
|
|
61
|
+
return "other";
|
|
62
|
+
}
|
|
63
|
+
const hinted = navigator.userAgentData?.platform;
|
|
64
|
+
return /mac|iphone|ipad|ipod/i.test(hinted || navigator.platform || "") ? "mac" : "other";
|
|
65
|
+
}
|
|
66
|
+
function kbdKeyLabel(key, platform) {
|
|
67
|
+
const lower = key.trim().toLowerCase() || key;
|
|
68
|
+
const known = (platform === "mac" ? MAC : OTHER)[lower] ?? COMMON[lower];
|
|
69
|
+
if (known) {
|
|
70
|
+
return known;
|
|
71
|
+
}
|
|
72
|
+
const text = key.length === 1 ? key.toUpperCase() : key;
|
|
73
|
+
return { text, name: text };
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
detectKbdPlatform,
|
|
77
|
+
kbdKeyLabel
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=kbdKeys.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/dataDisplay/kbd/kbdKeys.ts"],
|
|
4
|
+
"sourcesContent": ["export type KbdPlatform = \"mac\" | \"other\";\n\n/** How one key is drawn, and how it is read out. */\nexport interface KbdKeyLabel {\n /** What is drawn on the key cap. */\n text: string;\n /** What assistive technology reads. */\n name: string;\n}\n\nconst arrow = (text: string, name: string): KbdKeyLabel => ({ text, name });\n\n// Names, in lower case, the same on every platform.\nconst COMMON: Record<string, KbdKeyLabel> = {\n up: arrow(\"\u2191\", \"Up arrow\"),\n arrowup: arrow(\"\u2191\", \"Up arrow\"),\n down: arrow(\"\u2193\", \"Down arrow\"),\n arrowdown: arrow(\"\u2193\", \"Down arrow\"),\n left: arrow(\"\u2190\", \"Left arrow\"),\n arrowleft: arrow(\"\u2190\", \"Left arrow\"),\n right: arrow(\"\u2192\", \"Right arrow\"),\n arrowright: arrow(\"\u2192\", \"Right arrow\"),\n // `KeyboardEvent.key` is \" \" for the space bar, and a bare \"+\" would read \"Ctrl++\".\n \" \": { text: \"Space\", name: \"Space\" },\n space: { text: \"Space\", name: \"Space\" },\n spacebar: { text: \"Space\", name: \"Space\" },\n \"+\": { text: \"+\", name: \"Plus\" },\n plus: { text: \"+\", name: \"Plus\" },\n};\n\nconst COMMAND: KbdKeyLabel = { text: \"\u2318\", name: \"Command\" };\n\n// On macOS the modifiers and the editing keys are drawn as the symbols the Mac\n// keyboard and its menus use.\nconst MAC: Record<string, KbdKeyLabel> = {\n mod: COMMAND,\n meta: COMMAND,\n cmd: COMMAND,\n command: COMMAND,\n shift: { text: \"\u21E7\", name: \"Shift\" },\n alt: { text: \"\u2325\", name: \"Option\" },\n option: { text: \"\u2325\", name: \"Option\" },\n ctrl: { text: \"\u2303\", name: \"Control\" },\n control: { text: \"\u2303\", name: \"Control\" },\n enter: { text: \"\u21A9\", name: \"Return\" },\n return: { text: \"\u21A9\", name: \"Return\" },\n escape: { text: \"\u238B\", name: \"Escape\" },\n esc: { text: \"\u238B\", name: \"Escape\" },\n tab: { text: \"\u21E5\", name: \"Tab\" },\n backspace: { text: \"\u232B\", name: \"Delete\" },\n delete: { text: \"\u2326\", name: \"Forward delete\" },\n del: { text: \"\u2326\", name: \"Forward delete\" },\n};\n\n// Elsewhere the same names are written in their usual capitalisation, so one `keys` array\n// looks alike on every platform. `Meta`, `Cmd` and `Command` have no key of their own here\n// and are drawn as `Meta`.\nconst META: KbdKeyLabel = { text: \"Meta\", name: \"Meta\" };\nconst named = (text: string, name = text): KbdKeyLabel => ({ text, name });\nconst OTHER: Record<string, KbdKeyLabel> = {\n mod: named(\"Ctrl\"),\n ctrl: named(\"Ctrl\"),\n control: named(\"Ctrl\"),\n alt: named(\"Alt\"),\n option: named(\"Alt\"),\n shift: named(\"Shift\"),\n meta: META,\n cmd: META,\n command: META,\n enter: named(\"Enter\"),\n return: named(\"Enter\"),\n escape: named(\"Esc\", \"Escape\"),\n esc: named(\"Esc\", \"Escape\"),\n tab: named(\"Tab\"),\n backspace: named(\"Backspace\"),\n delete: named(\"Del\", \"Delete\"),\n del: named(\"Del\", \"Delete\"),\n};\n\n/**\n * The platform of the running browser: `mac` for macOS (and iPadOS, which reports itself\n * so), `other` everywhere else and without a `navigator` (on the server).\n */\nexport function detectKbdPlatform(): KbdPlatform {\n if (typeof navigator === \"undefined\") {\n return \"other\";\n }\n const hinted = (navigator as Navigator & { userAgentData?: { platform?: string } }).userAgentData?.platform;\n return /mac|iphone|ipad|ipod/i.test(hinted || navigator.platform || \"\") ? \"mac\" : \"other\";\n}\n\n/**\n * The cap and the spoken name of a key. `Mod` is Command on `mac` and Ctrl on `other`; see the\n * tables above for the rest. A single letter is drawn in upper case; any other key as given.\n */\nexport function kbdKeyLabel(key: string, platform: KbdPlatform): KbdKeyLabel {\n const lower = key.trim().toLowerCase() || key; // a lone \" \" is the space bar\n const known = (platform === \"mac\" ? MAC : OTHER)[lower] ?? COMMON[lower];\n if (known) {\n return known;\n }\n const text = key.length === 1 ? key.toUpperCase() : key;\n return { text, name: text };\n}\n"],
|
|
5
|
+
"mappings": "AAUA,MAAM,QAAQ,CAAC,MAAc,UAA+B,EAAE,MA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